$tpl->assign('location', $location); $tpl->assign("pagename", $page); $tpl->assign('config', $config); $tpl->assign('debug', $debug); $tpl->assign('adminpanel', $panel); $tpl->assign('extra', $extra); $tpl->assign('content', $filetouse); $tpl->assign('dataC', $dataC); $tpl->assign("photopath", $config["photopath"] . "/"); $tpl->assign('userdisp', $userdisp); $tpl->assign('islogged', $islogged); $tpl->assign('usersname', $check['uname']); $tpl->assign('uname', $check['uname']); $tpl->assign('userid', $check['id']); $tpl->assign("timeoffset", getuseroffset($check['uname'])); $tpl->assign("serverOffset", getoffset($config['zone'])); $tpl->assign("editable", $edit); $tpl->assign("editlink", $editlink); $tpl->assign("addable", $add); $tpl->assign("addlink", $addlink); $tpl->assign("script", $script); $tpl->assign("profileAllowed", get_auth("profile", 0)); $tpl->assign("pmAllowed", get_auth("pmmain", 0)); include "page_footer.php"; //Check for user message $uid = safesql($check['uid'], "text"); $messages = $data->select_fetch_one_row("messages", "WHERE uid={$uid} AND type <> 3"); $data->delete_query("messages", "uid={$uid}"); if ($messages) { $tpl->assign("ismessage", true); $tpl->assign("infomessage", $messages['message'] . ($messages['type'] == 0 ? " (Click on the message to hide)" : ""));
function getuseroffset($uname) { global $data, $config; $uname = safesql($uname, "text"); $sql = $data->select_query("users", "WHERE uname={$uname}"); $d = $data->fetch_array($sql); return getoffset($d['timezone']) - getoffset($config['zone']); }