я незнаю как вывести данные аватара ...
Код:
global $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $sitekey, $gfx_chk, $locale;
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER['HTTP_USER_AGENT'] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
cookiedecode($user);
$sql = "SELECT username FROM ".$user_prefix."_users ORDER BY user_id DESC LIMIT 0,1";
$query = $db->sql_query($sql);
list($lastuser) = $db->sql_fetchrow($query);
$sql2 = "SELECT user_id FROM ".$user_prefix."_users";
$query2 = $db->sql_query($sql2);
$numrows = $db->sql_numrows($query2);
$numrows = intval($numrows);
$sql3 = "SELECT uname, guest FROM ".$prefix."_session WHERE guest='0'";
$result = $db->sql_query($sql3);
$member_online_num = $db->sql_numrows($result);
$who_online_now = "";
$i = 1;
while (list($uname, $guest) = $db->sql_fetchrow($result)) {
if (isset($guest) and $guest == 0) {
Как я понял саму аватару нужно настраивать в выводе базы... помогите пожалуйста просто я еще не опытен помогите по подобию создать вывод аватару ...
Код:
if (is_user($user)) {
$uname = $cookie[1];
$content .= "<center><b>$uname</center></b>\n";
$content .= "<br><br><center><b>$avatar</center></b>\n<hr>\n";
Да и сама форма входа ...
Код:
$content .= "<form onsubmit=\"this.submit.disabled='true'\" action=\"modules.php?name=Your_Account\" method=\"post\">";
if (is_user($user)) {
$uname = $cookie[1];
$content .= "<center><b>$uname</center></b>\n";
$content .= "<br><br><center><b>$avatar</center></b>\n<hr>\n";
$content .= "  <img src=\"images/blocks/dot.gif\" height=\"9\" width=\"7\"> <a href=\"modules.php?name=Your_Account&op=edituser\">".Íàñòðîéêè."</a> <br>";
$content .= "  <img src=\"images/blocks/dot.gif\" height=\"9\" width=\"7\"> <a href=\"modules.php?name=Your_Account&op=logout\">".Âûéòè."</a>\n<hr>\n"; $sql = "SELECT user_id FROM " .$user_prefix."_users WHERE username='$uname'";
$query = $db->sql_query($sql);
list($user_id) = $db->sql_fetchrow($query);
$uid = intval($user_id);
$newpms_query = $db->sql_query("SELECT privmsgs_to_userid FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')");
$oldpms_query = $db->sql_query("SELECT privmsgs_to_userid FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND privmsgs_type='0'");
$newpms = $db->sql_numrows($newpms_query);
$oldpms = $db->sql_numrows($oldpms_query);
$content .= "<img src=\"images/blocks/email-y.gif\" height=\"10\" width=\"14\"> <a href=\"modules.php?name=Private_Messages\"><b><u>"._BPM."</u></b></a><br>\n";
$content .= "       "._BUNREAD.": <b>".intval($newpms)."</b><br>\n<hr>\n";
} else {
$content .=_LOGIN."   <input type=\"text\" name=\"username\" size=\"18\" maxlength=\"25\"><br>";
$content .= _PASSWORD." <input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\">  ";
if (extension_loaded('gd') AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) {
$content .= _SECURITYCODE.": <img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n";
$content .= _TYPESECCODE."<br> <input type=\"text\" name=\"gfx_check\" size=\"7\" maxlength=\"6\">\n";
$content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>\n";
} else {
$content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">";
$content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">";
}
$content .= "<input type=\"hidden\" name=\"op\" value=\"login\">";
$content .= "<input type=\"submit\" value=\"".">>"."\">\n <a href=\"modules.php?name=Your_Account&op=new_user\">"._BREG."</a><hr>";
я 2 день методом примера делаю нече ны выходит ...