function redirect($url) { $url = $url . (strstr($url, '&') ? '&' : '?') . 't=' . time(); echo <<<EOT <hr size=1> <script language="JavaScript"> \tfunction redirect() { \t\twindow.location.replace('{$url}'); \t} \tsetTimeout('redirect();', 1000); </script> <br /><br /> >><a href="{$url}">Browser will automatically reload the page, without human intervention. If your browser does not redirect for a long time, please click here</a> <br /><br /> EOT; showfooter(); }
<? include_once $GLOBALS["DOCUMENT_ROOT"]."/lib/sql.php"; //authorize(); showheader( "Подраздел"); ?> <? showfooter(); ?>
function redirect($url) { $url = $url.(strstr($url, '&') ? '&' : '?').'t='.time(); echo <<< EOT <hr size=1> <script language="JavaScript"> function redirect() { window.location.replace('$url'); } setTimeout('redirect();', 1000); </script> <br /><br /> >><a href="$url">浏览器会自动跳转页面,无需人工干预。除非当您的浏览器长时间没有自动跳转时,请点击这里</a> <br /><br /> EOT; showfooter(); }
function showmessage($message, $url_forward = '', $vars = array(), $timeout = 1) { showheader(); $message = lang('update', $message, $vars); $messageadd = ''; $timeout = intval($timeout); if ($url_forward) { $messageadd .= "<script>setTimeout(\"redirect('{$url_forward}');\", {$timeout});</script>"; $messageadd .= ">><a href=\"index.php\"><strong>" . lang('update', 'message_stop') . "</strong></a>"; } elseif (strpos($message, lang('update', 'return'))) { $messageadd .= "<a href=\"javascript:history.go(-1);\" class=\"mediumtxt\">" . lang('update', 'message_return') . '</a><br><br>'; } $prompt = lang('update', 'prompt'); echo <<<EOT <table class="showtable"> \t<tbody><tr class="title"><td style="color: white">{$prompt}</td></tr> \t\t<tr><td style="padding: 10px; background-color: #fefefe;font-size: 14px "><br>{$message}<br><br></td></tr> \t\t<tr><td>{$messageadd}</td></tr> \t</tbody> </table> EOT; showfooter(); exit; }
function main() { global $db, $user_prefix, $pagetitle, $CLASS, $bgcolor2; if (isset($_GET['show'])) { if ($_GET['show'] == 'tmpusers') { $pagetitle .= ' ' . _BC_DELIM . ' ' . _WAITINGUSERS; } else { if ($_GET['show'] == 'sususers') { $pagetitle .= ' ' . _BC_DELIM . ' ' . _SUSPENDUSERS; } else { if ($_GET['show'] == 'delusers') { $pagetitle .= ' ' . _BC_DELIM . ' ' . _DELETEUSERS; } } } } list($tmprows) = $db->sql_ufetchrow('SELECT COUNT(*) FROM ' . $user_prefix . '_users_temp', SQL_NUM); list($usrrows) = $db->sql_ufetchrow('SELECT COUNT(*) FROM ' . $user_prefix . '_users WHERE user_level>0 AND user_id>1', SQL_NUM); list($susrows) = $db->sql_ufetchrow('SELECT COUNT(*) FROM ' . $user_prefix . '_users WHERE user_level=0 AND user_id>1', SQL_NUM); list($delrows) = $db->sql_ufetchrow('SELECT COUNT(*) FROM ' . $user_prefix . '_users WHERE user_level<0 AND user_id>1', SQL_NUM); showheader(); echo '<table> <tr><td>' . ($tmprows > 0 ? '<a href="' . URL::admin('&show=tmpusers') . '">' . _WAITINGUSERS . '</a>' : _WAITINGUSERS) . '</td><td>: ' . $tmprows . '</td></tr> <tr><td>' . _ACTIVEUSERS . '</td><td>: ' . $usrrows . '</td></tr>'; if ($susrows > 0) { echo '<tr><td><a href="' . URL::admin('&show=sususers') . '">' . _SUSPENDUSERS . '</a></td><td>: ' . $susrows . '</td></tr>'; } if ($delrows > 0) { echo '<tr><td><a href="' . URL::admin('&show=delusers') . '">' . _DELETEUSERS . '</a></td><td>: ' . $delrows . '</td></tr>'; } echo '</table><br />'; if (isset($_GET['show']) && !$CLASS['member']->demo) { if ($_GET['show'] == 'tmpusers') { /* Begin List Waiting Users */ echo open_form(URL::admin(), 'waitingusers', _WAITINGUSERS, ' class="title"'); echo '<table width="100%"> <tr bgcolor="' . $bgcolor2 . '"><td width="20"></td><td>' . _NICKNAME . '</td><td>' . _EMAIL . '</td></tr>'; $result = $db->sql_query("SELECT user_id, username, user_email FROM " . $user_prefix . "_users_temp ORDER BY username"); while ($row = $db->sql_fetchrow($result)) { echo '<tr><td><input name="members[]" type="checkbox" value="' . $row['user_id'] . '" /></td><td>' . $row['username'] . '</td><td>' . $row['user_email'] . '</td></tr>'; } echo '<tr><td colspan="4"><select name="wait"> <option value="approve">' . _APPROVE . '</option> <option value="deny">' . _DENY . '</option> <option value="resendMail">' . _RESEND . '</option> <option value="modify">' . _MODIFYINFO . '</option> </select> <input type="submit" value="' . _OK . '" /></td></tr>'; /* End List Waiting Users */ } else { if ($_GET['show'] == 'sususers') { /* Begin List Suspended Users */ echo open_form(URL::admin(), 'suspendedusers', _SUSPENDUSERS, ' class="title"'); echo '<table width="100%"> <tr bgcolor="' . $bgcolor2 . '"><td width="20">' . _RESTORE . '</td><td>' . _NICKNAME . '</td><td>' . _EMAIL . '</td><td>' . _SUSPENDREASON . '</td></tr>'; $result = $db->sql_query("SELECT user_id, username, user_email, susdel_reason FROM " . $user_prefix . "_users WHERE user_level=0 AND user_id>1 ORDER BY username"); while ($row = $db->sql_fetchrow($result)) { echo '<tr><td><input name="members[]" type="checkbox" value="' . $row['user_id'] . '" /></td><td><a href="' . URL::admin("&mode=edit&edit=profile&id={$row['user_id']}") . '">' . $row['username'] . '</a></td><td>' . $row['user_email'] . '</td><td>' . $row['susdel_reason'] . '</td></tr>'; } echo '<tr><td colspan="4"><input type="hidden" name="susdel" value="restoreUser" /><input type="submit" value="' . _RESTORE . '" /></td></tr>'; /* End List Suspended Users */ } else { if ($_GET['show'] == 'delusers') { /* Begin List Deleted Users */ echo open_form(URL::admin(), 'deletedusers', _DELETEUSERS, ' class="title"'); echo '<tr bgcolor="' . $bgcolor2 . '"><td width="20"></td><td>' . _NICKNAME . '</td><td>' . _EMAIL . '</td><td>' . _DELETEREASON . '</td></tr>'; $result = $db->sql_query("SELECT user_id, username, user_email, susdel_reason FROM " . $user_prefix . "_users WHERE user_level<0 AND user_id>1 ORDER BY username"); while ($row = $db->sql_fetchrow($result)) { echo '<tr><td><input name="members[]" type="checkbox" value="' . $row['user_id'] . '" /></td><td><a href="' . URL::admin("&mode=edit&edit=profile&id={$row['user_id']}") . '">' . $row['username'] . '</a></td><td>' . $row['user_email'] . '</td><td>' . $row['susdel_reason'] . '</td></tr>'; } echo '<tr><td colspan="4"><select name="susdel"> <option value="removeUser">' . _REMOVE . '</option> </select> <input type="submit" value="' . _OK . '" /></td></tr>'; /* End List Deleted Users */ } } } echo '</table></form></fieldset>'; } showfooter(); }
function redirect($url) { $url = $url . (strstr($url, '&') ? '&' : '?') . 't=' . time(); echo <<<EOT <hr size=1> <script language="JavaScript"> \tfunction redirect() { \t\twindow.location.replace('{$url}'); \t} \tsetTimeout('redirect();', 1000); </script> <br /><br /> >><a href="{$url}">瀏覽器會自動跳轉頁面,無需人工干預。除非當您的瀏覽器長時間沒有自動跳轉時,請點擊這裡</a> <br /><br /> EOT; showfooter(); }