/** * */ function CheckUserStatus() { global $DB; $sql = "select * from user where userstatus !=7"; $row = $DB->getRows($sql); if ($row) { foreach ($row as $rs) { if (DateLast($rs['lastonlinetime'], toDay, 'm') > 1) { UpdateUserProfile($rs["userid"], "", "", "", 7); } } } }
function updateProfile($pass1, $pass2, $hideOffline, $theme, $language) { global $cfg; if ($pass1 != "") { $_SESSION['user'] = md5($cfg["pagetitle"]); } UpdateUserProfile($cfg["user"], $pass1, $hideOffline, $theme, $language); DisplayHead($cfg["user"] . "'s " . _PROFILE); echo "<div align=\"center\">"; echo "<table border=1 bordercolor=\"" . $cfg["table_admin_border"] . "\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"" . $cfg["table_data_bg"] . "\" width=\"760\">"; echo "<tr><td colspan=6 background=\"themes/" . $cfg["theme"] . "/images/bar.gif\">"; echo "<img src=\"images/properties.png\" width=18 height=13 border=0> <font class=\"title\">" . $cfg["user"] . "'s " . _PROFILE . "</font>"; echo "</td></tr><tr><td align=\"center\">"; ?> <br> <?php echo _PROFILEUPDATEDFOR . " " . $cfg["user"]; ?> <br><br> <?php echo "</td></tr>"; echo "</table></div><br><br>"; DisplayFoot(); }
// updateProfile -- update profile //****************************************************************************** //****************************************************************************** // updateProfile -- update profile //****************************************************************************** case "updateProfile": $tmpl->setvar('updateProfile', 1); $pass1 = tfb_getRequestVar('pass1'); $pass2 = tfb_getRequestVar('pass2'); $hideOffline = tfb_getRequestVar('hideOffline'); $theme = tfb_getRequestVar('theme'); $language = tfb_getRequestVar('language'); if ($pass1 != "") { $_SESSION['user'] = md5($cfg["pagetitle"]); } UpdateUserProfile($cfg["user"], $pass1, $hideOffline, $theme, $language); $tmpl->setvar('_PROFILEUPDATEDFOR', $cfg['_PROFILEUPDATEDFOR']); break; //****************************************************************************** // ShowCookies //****************************************************************************** //****************************************************************************** // ShowCookies //****************************************************************************** case "showCookies": case "editCookies": $tmpl->setvar('ShowCookies', 1); $cid = tfb_getRequestVar('cid'); // Cookie ID // Used for when editing a cookie $hostvalue = $datavalue = "";
$upSql = "update user set username='******',usersign='" . $strSign . "',usergender='" . $intGender . "'"; if ($strFace != '') { $upSql .= ",userface='" . $strFace . "'"; } if ($strPass != '') { if (md5($strOldPass) == $oRs["userpass"]) { $upSql .= ",userpass='******'"; $modifyInfo = "Password Changed. Please Login With The New One Next Time"; } else { $modifyInfo = "Incorrect Password"; } } $upSql .= " where id=" . $oRs['id']; $DB->Query($upSql); $modifyResult = "Profile Saved Successfully"; UpdateUserProfile($_SESSION['userid'], $strNick, $strSign, $strFace, ""); $flag = true; } else { $modifyResult = "Sorry, An Error Occurs While Saving Data"; $modifyInfo = "Internal Error"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../styles/webimpage.css" type="text/css" rel="stylesheet" media="all"> <script type="text/javascript" src="../js/webimhelper.js"></script> <script type="text/javascript" src="../js/webimpage.js"></script> <title>Profile</title>