witam i z góry przepraszam za mój banalny temat, ale próbowałem na różne sposoby i po prostu nie umiem:(
Chcę dodać pozycję do menu użytkownika ale nie potrafię bo jak dodaję ją to ciągle wyskakuje mi błąd. Chcę dodać pozycję na samym dole panelu użytkownika
//NEW CODE BEGIN
include(INFUSIONS."rank_system2/forum.php");
//NEW CODE END
do pliku:
USER_INFO_PANEL.php
<?php
if (file_exists(INFUSIONS."user_info_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."user_info_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."user_info_panel/locale/English.php";
}
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (iMEMBER) {
openside("".$locale['WWOLD_001']." <a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."'" ."<span style='color:#".$userdata['user_color']."'>".$userdata['user_prefix'].$userdata['user_name']);
echo "</span></a>";
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
if ($msg_count > "0")
{
echo "<b><a href='".BASEDIR."messages.php?folder=inbox' class='side'><center><img border='0' src='".BASEDIR."infusions/user_info_panel/images/newpm.gif'></a></b></center><br>\n";
echo"<center><b>".$userdata['user_name']."</b>, ".$locale['on129']."<br>[<b>";
echo"<a href='".BASEDIR."messages.php?folder=inbox' class='side'>";
//echo dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_folder='0'");
echo "".sprintf($locale['on132'], $msg_count).($msg_count == 1 ? $locale['on134'] : $locale['on135'])."</a></b>] ".$locale['on130']."";
// Get folder size restrictions (room for future option to restrict number of pm's for a specific user)
$pw_user = $userdata['user_id'];
$limit = dbarray(dbquery("SELECT * FROM ".$db_prefix."messages_options WHERE user_id='0'"));
$limit_inbox = $limit['pm_inbox'];
// Set display of top bar
$how = dbquery("SELECT count(message_to) FROM ".$db_prefix."messages WHERE message_to='$pw_user' AND message_folder='0'");
if ($limit_inbox != "0") { $inbox_display = " <span class='small'>".$locale['on133']." [<b>".dbresult($how, 0)." / ".$limit_inbox."</b>]</span>"; } else { $inbox_display = " (".$cnt_inbox.")"; }
echo " <b><a href='".BASEDIR."messages.php?folder=inbox'>".$locale['on131']."</a></b><br>".$locale['on136']." <b> ".$inbox_display."</b></center>";
} else {
echo "<center>".$locale['WWOLD_701']." <span id=\"digitalclock\"></span></center>";
echo " <script language=\"javascript\">
function calctime()
{
var currenttime = new Date();
var hours = currenttime.getHours();
var minutes = currenttime.getMinutes();
var seconds = currenttime.getSeconds();
if (hours == 0)
{ hours = 12; }
if (hours < 10)
{ hours = \"0\" + hours; }
if (minutes < 10)
{ minutes = \"0\" + minutes; }
if (seconds < 10)
{ seconds = \"0\" + seconds; }
var clocklocation = document.getElementById('digitalclock');
clocklocation.innerHTML = hours + \":\" + minutes + \":\" + seconds;
setTimeout(\"calctime()\", 1000);
}
calctime();
</script>
";
}
genshadow($userdata['user_avatar']);
}
if (iMEMBER) {
echo "<br><img src='".INFUSIONS."user_info_panel/images/icon_members.gif'> <b>".$locale['WWOLD_002']."</b><br><img src='".THEME."images/bullet.gif'>
<a href='".BASEDIR."edit_profile.php'>".$locale['080']."</a><br><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."messages.php'>".$locale['081']."</a><br><img src='".THEME."images/bullet.gif'> <a href='".FORUM."my_followed_threads.php'>".$locale['on137']."</a><br><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."members.php'>".$locale['082']."</a><br>";
if (iADMIN) {
echo "<img src='".THEME."images/bullet.gif'> <a href='".ADMIN."index.php$aidlink'>".$locale['083']."</a><br>\n";
}
echo "<a href=\"javascript:show_hide(ShowHide001)\">
<img src='".THEME."images/bullet.gif' border='0'> ".$locale['WWOLD_101']."</span></a>
<div id='ShowHide001'> <img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."submit.php?stype=n' class='side'>".$locale['WWOLD_102']."</a><br> <img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."submit.php?stype=l' class='side'>".$locale['WWOLD_103']."</a><br> <img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."submit.php?stype=a' class='side'>".$locale['WWOLD_104']."</a><br> <img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."submit.php?stype=f' class='side'>".$locale['WWOLD_102a']."</a><br> <img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."submit.php?stype=p' class='side'>".$locale['WWOLD_103a']."</a></div><script>show_hide(ShowHide001)</script><br><br>";
echo "<img src='".INFUSIONS."user_info_panel/images/icon_docs.gif'> <b>".$locale['WWOLD_004']."</b><br>";
if (iMEMBER && EPS) {
echo "<img src='".THEME."images/bullet.gif' border='0'> ".$locale['560']." ".check_rang($userdata['user_id'])."<br>
<img src='".THEME."images/bullet.gif' border='0'> ".$locale['561']." ".show_points($userdata['user_id'])."<br>\n";
}
if (iMEMBER)
{
$caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$userdata['user_id']);
$caution = dbarray($caution_r);
$c_count = mysql_numrows($caution_r);
echo "<img src='".THEME."images/bullet.gif' border='0'> ".$locale['on138']." ".$c_count."<br>";
}
echo "<br><br><center><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."setuser.php?logout=yes' class='side'> ".$locale['084']." </span></a> <img src='".THEME."images/bullet.gif'></center>\n";
closeside();
} else {
openside($locale['060']);
echo "<div align='center'>".(isset($loginerror) ? $loginerror : "")."
<form name='loginform' method='post' action='".BASEDIR."setuser.php'>
".$locale['061']."<br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
".$locale['062']."<br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y'>".$locale['063']."<br><br>
<input type='submit' name='login' value='".$locale['064']."' class='button'><br>
</form>
<br>\n";
if ($settings['enable_registration']) {
echo "<img src='".THEME."images/bullet.gif'> ".$locale['065']."<br>\n";
}
echo "<img src='".THEME."images/bullet.gif'> ".$locale['066']."
</div>\n";
closeside();
}
?>
a tu zamiszczam forum.php
<?
/*--------------------------------------------+
| PHP-Fusion 5 - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/
include("../infusions/rank_system2/locale/".$settings['locale'].".php");
$row = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='1'");
$posts=dbarray($row);
$post1 = $posts['posts'];
$row2 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='2'");
$posts2=dbarray($row2);
$post2 = $posts2['posts'];
$row3 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='3'");
$posts3=dbarray($row3);
$post3 = $posts3['posts'];
$row4 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='4'");
$posts4=dbarray($row4);
$post4 = $posts4['posts'];
$row5 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='5'");
$posts5=dbarray($row5);
$post5 = $posts5['posts'];
$row6 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='6'");
$posts6=dbarray($row6);
$post6= $posts6['posts'];
$row7= dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='7'");
$posts7=dbarray($row7);
$post7 = $posts7['posts'];
$row8 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='8'");
$posts8=dbarray($row8);
$post8 = $posts8['posts'];
$row9 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='9'");
$posts9=dbarray($row9);
$post9 = $posts9['posts'];
$row11 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='11'");
$posts11=dbarray($row11);
$post11 = $posts11['posts'];
$row12 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='12'");
$posts12=dbarray($row12);
$post12 = $posts12['posts'];
$row13 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='13'");
$posts13=dbarray($row13);
$post13 = $posts13['posts'];
$row14 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='14'");
$posts14=dbarray($row14);
$post14 = $posts14['posts'];
$row15 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='15'");
$posts15=dbarray($row15);
$post15 = $posts15['posts'];
$row16 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='16'");
$posts16=dbarray($row16);
$post16 = $posts16['posts'];
$row = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='1'");
$names=dbarray($row);
$name1 = $names['names'];
$row2 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='2'");
$names2=dbarray($row2);
$name2 = $names2['names'];
$row3 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='3'");
$names3=dbarray($row3);
$name3 = $names3['names'];
$row4 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='4'");
$names4=dbarray($row4);
$name4 = $names4['names'];
$row5 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='5'");
$names5=dbarray($row5);
$name5 = $names5['names'];
$row6 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='6'");
$names6=dbarray($row6);
$name6= $names6['names'];
$row7= dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='7'");
$names7=dbarray($row7);
$name7 = $names7['names'];
$row8 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='8'");
$names8=dbarray($row8);
$name8 = $names8['names'];
$row9 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='9'");
$names9=dbarray($row9);
$name9 = $names9['names'];
$row11 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='11'");
$names11=dbarray($row11);
$name11 = $names11['names'];
$row12 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='12'");
$names12=dbarray($row12);
$name12 = $names12['names'];
$row13 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='13'");
$names13=dbarray($row13);
$name13 = $names13['names'];
$row14 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='14'");
$names14=dbarray($row14);
$name14 = $names14['names'];
$row15 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='15'");
$names15 =dbarray($row15);
$name15 = $names15['names'];
$row16 = dbquery("SELECT * FROM ".$db_prefix."forumrank WHERE id='16'");
$names16 =dbarray($row16);
$name16 = $names16['names'];
if ($data[user_level] == 252) {
echo "<span class='alt'>".RS_005."</span><br><b>".RS_099."</b><br>
<img src='../infusions/rank_system/images/rot3.gif'>
<br>";
}
else if ($data[user_level] == 251) {
echo "<span class='alt'>".RS_005."</span><br><b>".RS_000."</b><br>
<img src='../infusions/rank_system/images/rot2.gif'>
<br>";
}
else if ($data[user_posts] == 0 ) {
echo "<span class='alt'>".RS_005."</span> Kein rank
<br>";
}
else if ($data[user_posts] <= $post1 ) {
echo "<span class='alt'>".RS_005."</span><br><b>$name1</b><br>
<img src='../infusions/rank_system/images/wilk.jpg'>
<br>";
}
else if ($data[user_posts] <= $post2) {
echo "<span class='alt'>".RS_005."</span><br><b>$name2</b><br>
<img src='../infusions/rank_system/images/szkielet.jpg'>
<br>";
}
else if ($data[user_posts] <= $post3) {
echo "<span class='alt'>".RS_005."</span><br><b>$name3</b><br>
<img src='../infusions/rank_system/images/szkielet mag.jpg'>
<br>";
}
else if ($data[user_posts] <= $post4) {
echo "<span class='alt'>".RS_005."</span><br><b>$name4</b><br>
<img src='../infusions/rank_system/images/troll.jpg'>
<br>";
}
else if ($data[user_posts] <= $post5) {
echo "<span class='alt'>".RS_005."</span><br><b>$name5</b><br>
<img src='../infusions/rank_system/images/troll kaplan.jpg'>
<br>";
}
else if ($data[user_posts] <= $post6) {
echo "<span class='alt'>".RS_005."</span><br><b>$name6</b><br>
<img src='../infusions/rank_system/images/troll berserkera.jpg'>
<br>";
}
else if ($data[user_posts] <= $post7) {
echo "<span class='alt'>".RS_005."</span><br><b>$name7</b><br>
<img src='../infusions/rank_system/images/peon chaosu.jpg'>
<br>";
}
else if ($data[user_posts] <= $post8) {
echo "<span class='alt'>".RS_005."</span><br><b>$name8</b><br>
<img src='../infusions/rank_system/images/siepacz chaosu.jpg'>
<br>";
}
else if ($data[user_posts] <= $post9) {
echo "<span class='alt'>".RS_005."</span><br><b>$name9</b><br>
<img src='../infusions/rank_system/images/jezdziec chaosu.jpg'>
<br>";
}
else if ($data[user_posts] <= $post11) {
echo "<span class='alt'>".RS_005."</span><br><b>$name11</b><br>
<img src='../infusions/rank_system/images/czarownik chaosu.jpg'>
<br>";
}
else if ($data[user_posts] <= $post12) {
echo "<span class='alt'>".RS_005."</span><br><b>$name12</b><br>
<img src='../infusions/rank_system/images/gruen.gif'>
<br>";
}
else if ($data[user_posts] <= $post13) {
echo "<span class='alt'>".RS_005."</span><br><b>$name13</b><br>
<img src='../infusions/rank_system/images/gruen.gif'>
<img src='../infusions/rank_system/images/gruen.gif'>
<br>";
}
else if ($data[user_posts] <= $post14) {
echo "<span class='alt'>".RS_005."</span><br><b>$name14</b><br>
<img src='../infusions/rank_system/images/gruen.gif'>
<img src='../infusions/rank_system/images/gruen.gif'>
<img src='../infusions/rank_system/images/gruen.gif'>
<br>";
}
else if ($data[user_posts] <= $post15) {
echo "<span class='alt'>".RS_005."</span><br><b>$name15</b><br>
<img src='../infusions/rank_system/images/gruen.gif'>
<img src='../infusions/rank_system/images/gruen.gif'>
<img src='../infusions/rank_system/images/gruen.gif'>
<img src='../infusions/rank_system/images/gruen.gif'>
<br>";
}
else if ($data[user_posts] <= $post16) {
echo "<span class='alt'>".RS_005."</span><br><b>$name16</b><br>
<img src='../infusions/rank_system/images/gruen_ani.gif'>
<img src='../infusions/rank_system/images/gruen_ani.gif'>
<img src='../infusions/rank_system/images/gruen_ani.gif'>
<img src='../infusions/rank_system/images/gruen_ani.gif'>
<img src='../infusions/rank_system/images/gruen_ani.gif'>
<br>";
}
else {
echo "<span class='alt'>".RS_005."</span><br><b>".RS_006."</b><br>
<img src='../infusions/rank_system/images/best.gif'>
<img src='../infusions/rank_system/images/best.gif'>
<img src='../infusions/rank_system/images/best.gif'>
<img src='../infusions/rank_system/images/best.gif'>
<img src='../infusions/rank_system/images/best.gif'>
<br>";
}
echo"<br>";
?>
|