Parašė Narysx· 2008 Lap. 18 17:11:17
#1
Va mano user_info vieta headeryje:
echo"<div style='padding-right:50px; padding-bottom:10px;' align='left' height='100'>";
if (iMEMBER) {
$sk = 0;
$result = dbquery("SELECT * FROM qwerty813asd1_user_ratings WHERE rate_subject = '".$userdata['user_id']."'");
if (dbrows($result)) {
while ($data = dbarray($result)) $sk = $sk+$data['rate_opt'];
}
$vert = (dbrows($result) > 0 ? round($sk/dbrows($result),2) : "Nėra.");
$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
echo ($userdata['user_avatar'] ? "<img src='".IMAGES."avatars/".$userdata['user_avatar']."' width='70' height'70' align='left' style='margin-left: 10px; margin-top: 10px;'>" : "<img src='".THEME."images/noav.gif' width='70' height'70' align='left' style='margin-left: 10px; margin-top: 10px;'>")."
<img src='".THEME."images/bullet.gif' border='0'> <b>".$userdata['user_name']."</b> - vid. įvertinimas: $vert.<br>";
if (file_exists(INFUSIONS.'user_gold_panel/functions.php'))
{
$userpoints=dbarray(dbquery("SELECT * FROM qwerty813asd1_users_points WHERE owner_id='".$userdata['user_id']."'"));
//display the result
echo "<img src='".THEME."images/bullet.gif' border='0'> Turimi <a href='http://www.nbarsn.com/infusions/user_gold_panel/index.php'>taškai</a>: $userpoints[points_total].<br>";
}
echo"<a href='".BASEDIR."edit_profile.php'><img src='".THEME."images/bullet.gif' border='0'> Redaguoti profilį</a> <br>";
echo "
<a href='".BASEDIR."messages.php'><img src='".THEME."images/bullet.gif' border='0'> Privačios žinutės</a><br>";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C"))
{
echo "";
} else {
echo "<a href='".BASEDIR."members.php'><img src='".THEME."images/bullet.gif' border='0'> Narių sąrašas</a> <br>
";
}
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo "<a href='".ADMIN."index.php".$aidlink."'><img src='".THEME."images/bullet.gif' border='0'> Administracija</a> <br>";
}
echo "<a href='".BASEDIR."setuser.php?logout=yes'><img src='".THEME."images/bullet.gif' border='0'> Atsijungti</a> ";
} else {
echo "<center><form name='loginform' method='post' action='".FUSION_SELF."'>
Vardas: <input type='text' name='user_name' class='textbox' style='width:90px;'> <br>
Slaptažodis: <input type='password' name='user_pass' class='textbox' style='width:90px;'> <br>
<input type='checkbox' name='remember_me' value='y'> prisiminti? <input type='submit' name='login' value='Prisijungti' class='button'> <br><br>
<b><a href='".BASEDIR."register.php'>Registracija</a> |
<a href='".BASEDIR."lostpassword.php'>Pamiršai slaptažodį?</a></b> </center>";
}
echo"</div>";
Kaip padaryti, kad jei ateina nauja žinutė, Privačios žinutės rodytų kaip Privačios žinutes (+ 1) jei 2, tai + 2 ir t.t...?