本文整理汇总了PHP中adminlink函数的典型用法代码示例。如果您正苦于以下问题:PHP adminlink函数的具体用法?PHP adminlink怎么用?PHP adminlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了adminlink函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: url_from_varval
function url_from_varval($variable, $value)
{
global $mainindex, $adminindex, $home, $op;
$equalling = '';
foreach ($_GET as $var => $val) {
if ($var != 'newlang' && $var != 'name' && !($var == 'file' && $val == 'index')) {
$equalling .= htmlspecialchars($var) . '=' . htmlspecialchars($val) . '&';
}
}
$equalling .= $variable . '=' . $value;
//If under admin pages
if (defined('ADMIN_PAGES')) {
//If on admin index page
if ($op == 'index') {
$variable_url = $adminindex . '?' . $equalling;
//If not on admin index page, but still under admin pages
} else {
$variable_url = adminlink('&' . $equalling);
}
//If on site home page
} else {
if ($home) {
$variable_url = $mainindex . '?' . $equalling;
//If on some module etc
} else {
$variable_url = getlink('&' . $equalling);
}
}
return $variable_url;
}
示例2: viewdownloadcomments
function viewdownloadcomments()
{
global $downloadsprefix, $db, $bgcolor2, $module_name;
$lid = intval($_GET['lid']);
include "header.php";
downl_menu_tpl(1);
echo '<br />';
$result = $db->sql_query("SELECT ratinguser, rating, ratingcomments, ratingtimestamp FROM " . $downloadsprefix . "_votedata WHERE ratinglid = {$lid} AND ratingcomments != '' ORDER BY ratingtimestamp DESC");
$totalcomments = $db->sql_numrows($result);
$transfertitle = ereg_replace("_", " ", $ttitle);
$displaytitle = $transfertitle;
OpenTable();
echo "<center><font class=\"option\"><b>" . _DOWNLOADPROFILE . ": {$displaytitle}</b></font><br /><br />";
downl_infomenu_tpl($lid, $ttitle);
echo "<br /><br /><br />" . _TOTALOF . " {$totalcomments} " . _COMMENTS . "</font></center><br />" . "<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" width=\"450\">";
$x = 0;
while (list($ratinguser, $rating, $ratingcomments, $ratingtimestamp) = $db->sql_fetchrow($result)) {
ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $ratingtimestamp, $ratingtime);
$ratingtime = strftime("%F", mktime($ratingtime[4], $ratingtime[5], $ratingtime[6], $ratingtime[2], $ratingtime[3], $ratingtime[1]));
$date_array = explode("-", $ratingtime);
$timestamp = mktime(0, 0, 0, $date_array["1"], $date_array["2"], $date_array["0"]);
$formatted_date = date("F j, Y", $timestamp);
/* Individual user information */
$result2 = $db->sql_query("SELECT rating FROM " . $downloadsprefix . "_votedata WHERE ratinguser = '{$ratinguser}'");
$usertotalcomments = $db->sql_numrows($result2);
$useravgrating = 0;
while (list($rating2) = $db->sql_fetchrow($result2)) {
$useravgrating = $useravgrating + $rating2;
}
$useravgrating = $useravgrating / $usertotalcomments;
$useravgrating = number_format($useravgrating, 1);
echo "<tr><td bgcolor=\"{$bgcolor2}\">" . "<font class=\"content\"><b> " . _USER . ": </b><a href=\"{$nukeurl}/" . getlink("Your_Account&op=userinfo&username={$ratinguser}") . "\">{$ratinguser}</a></font></td>" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"content\"><b>" . _RATING . ": </b>{$rating}</font></td>" . "<td bgcolor=\"{$bgcolor2}\" align=\"right\"><font class=\"content\">{$formatted_date}</font></td>" . "</tr><tr>" . "<td valign=\"top\"><font class=\"tiny\">" . _USERAVGRATING . ": {$useravgrating}</font></td>" . "<td valign=\"top\" colspan=\"2\"><font class=\"tiny\">" . _NUMRATINGS . ": {$usertotalcomments}</font></td>" . "</tr><tr>" . "<td colspan=\"3\">" . "<font class=\"content\">";
if (can_admin('downloads')) {
echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/editicon.gif\" border=\"0\" alt=\"" . _EDITTHISDOWNLOAD . "\"></a>";
}
echo " {$ratingcomments}</font><br /><br /><br /></td></tr>";
$x++;
}
echo "</table><br /><br /><center>";
downloadfooter($lid);
echo "</center>";
CloseTable();
include "footer.php";
}
示例3: define
define('_MODULEUSERS', 'Bocs! Ez a terület <i>csak Regisztált tagoknak</i><br /><br />Ingyenesen regisztráltathatod magad <a href="' . getlink('Your_Account&file=register') . '">itt</a>, majd utána<br />hozzáférhető lesz. Köszi.<br /><br />');
define('_MODULEUSERS2', 'Ingyenesen regisztrálhatsz <a href="' . getlink('Your_Account&file=register') . '">ezen</a> z oldalon, ezáltal meg tudod tekinteni ezt a részét is az oldalnak.<br /><br />Megértésed köszönjük.');
define('_MODULESADMINS', ' Bocs, de ez oldal ezen része: <i>csak Adminoknak</i><br /><br />');
define('_MODULESGROUPS', 'hozzáférés a csoporthoz megtagadva');
define('_HOME', 'Kezdőlap');
define('_HOMEPROBLEM', 'Nagy probléma van: Nincs honlapunk!!!!');
define('_ADDAHOME', 'Modul a kezdőlapra');
define('_HOMEPROBLEMUSER', 'Jelen pillanatban a honlap nem üzemel, kérem térjen vissza később.');
define('_MORENEWS', 'További új témakörök');
define('_ALLCATEGORIES', 'Összes kategória');
define('_SPAMGUARDPROTECTED', 'A SpaMGuard megakadályozta az e-mail küldését');
define('_M_CHARS', 'Maximum: %s karakter ');
define('_SYS_MESSAGE', 'Rendszer Üzenet');
define('_SYS_MESSAGES', 'Rendszer Üzenetek');
define('_SYS_MAINTENANCE', 'A portál karbantartási módban üzemel');
define('_SYS_DEMO', 'Adminisztrációs üzemmódban fut a rendszer<br />Adatbázisváltozások nem végrehajthatóak<br /><a href="' . adminlink('logout') . '">Kijelentkezés!</a> ');
define('_DATE', 'Dátum');
define('_HOUR', 'óra');
define('_UMONTH', 'hónap');
define('_YEAR', 'év');
define('_JANUARY', 'Január');
define('_FEBRUARY', 'Február');
define('_MARCH', 'Március');
define('_APRIL', 'Április');
define('_MAY', 'Május');
define('_JUNE', 'Június');
define('_JULY', 'Július');
define('_AUGUST', 'Augusztus');
define('_SEPTEMBER', 'Szeptember');
define('_OCTOBER', 'Október');
define('_NOVEMBER', 'November');
示例4: adm_page_header
} else {
adm_page_header($_CLASS['core_user']->lang['SEARCH_INDEX']);
?>
<h1><?php
echo $_CLASS['core_user']->lang['SEARCH_INDEX'];
?>
</h1>
<p><?php
echo $_CLASS['core_user']->lang['SEARCH_INDEX_EXPLAIN'];
?>
</p>
<form method="post" action="<?php
echo adminlink('forums&file=admin_search');
?>
"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1">
<tr>
<td class="cat" height="28" align="center"> <input type="submit" name="start" value="<?php
echo $_CLASS['core_user']->lang['START'];
?>
" class="btnmain" /> <input type="submit" name="cancel" value="<?php
echo $_CLASS['core_user']->lang['CANCEL'];
?>
" class="btnmain" /> </td>
</tr>
</table></form>
<?php
adm_page_footer();
示例5: themeheader
function themeheader()
{
global $slogan, $sitename, $mainindex, $adminindex, $cpgtpl, $db, $prefix, $banners, $site_logo, $userinfo, $pagetitle, $module_name, $file, $op, $CPG_SESS, $MAIN_CFG, $Blocks;
if ($MAIN_CFG['global']['admingraphic'] & 4) {
include 'includes/cssmainmenu.php';
}
if (!isset($module_name)) {
$module_name = false;
}
if (!isset($file)) {
$file = 'index';
}
if (!isset($op) || !defined('ADMIN_PAGES')) {
unset($op);
}
$imgr = $imgl = '';
// left blocks
if ($Blocks->l) {
$img = $Blocks->hideblock('600') ? 'plus.png' : 'minus.png';
$imgl = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic600" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding:2px 0 4px 0;" />';
}
// right blocks
if ($Blocks->r) {
$img = $Blocks->hideblock('601') ? 'plus.png' : 'minus.png';
$imgr = '<img alt="' . _TOGGLE . '" title="' . _TOGGLE . '" id="pic601" src="themes/' . $CPG_SESS['theme'] . '/images/' . $img . '" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding:2px 0 4px 0;" />';
}
$bc = $pagetitle;
$bc_parts = explode(' ' . _BC_DELIM . ' ', $pagetitle);
if (defined('ADMIN_PAGES') && !isset($op)) {
$bc = '<a class="white" href="' . $adminindex . '">' . $bc_parts[0] . '</a>';
} elseif (defined('ADMIN_PAGES') && is_admin() && isset($op) && isset($bc_parts[1]) && (file_exists('modules/' . $op . '/admin/index.inc') || file_exists('admin/modules/' . $op . '.php'))) {
$bc = '<a class="white" href="' . adminlink($op . ($file != 'index' ? '&file=' . $file : '')) . '">' . $bc_parts[1] . '</a>';
} elseif (isset($module_name) && file_exists('modules/' . $module_name . '/index.php')) {
$bc = '<a class="white" href="' . getlink($module_name) . '">' . $bc_parts[0] . '</a>';
} elseif (isset($module_name) && $module_name == 'credits' || $module_name == 'privacy_policy') {
$bc = '<a class="white" href="' . getlink($module_name) . '">' . $bc_parts[0] . '</a>';
}
if (isset($module_name) && !defined('ADMIN_PAGES') && $file != 'index') {
$bc .= ' ' . _BC_DELIM . ' <a class="white" href="' . getlink($module_name . '&file=' . $file) . '">' . $bc_parts[1] . '</a>';
}
if (count($bc_parts) > 1) {
$a = (isset($module_name) || defined('ADMIN_PAGES')) && $file == 'index' && !isset($op) ? 1 : 2;
for ($i = $a; $i < count($bc_parts); $i++) {
$bc .= ' ' . _BC_DELIM . ' ' . $bc_parts[$i];
}
}
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$css_ie = ereg('MSIE 7.0', $user_agent) ? 'ie7' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? 'ie6' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari' ? 'safari' : (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera' ? 'opera' : '')));
$cpgtpl->assign_vars(array('CSS_IE' => $css_ie ? '<link rel="stylesheet" type="text/css" href="themes/' . $CPG_SESS['theme'] . '/style/' . $css_ie . '.css" />' : '', 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'ADMIN_PAGES' => defined('ADMIN_PAGES') && is_admin(), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_TOGGLE' => _TOGGLE, 'S_BC' => _BC_DELIM, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'A_LOGOUT' => is_admin() . ' | <a class="white" href="' . adminlink('logout') . '">' . _LOGOUT . '</a>', 'S_BANNER' => $banners ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_TRANSLATE' => getlink('CPGlang'), 'U_ADMININDEX' => $adminindex, 'I18N' => 'enctype="multipart/form-data" accept-charset="utf-8"', 'WELCOME' => is_user() ? 'Welcome ' . $userinfo['username'] : 'Welcome ' . _ANONYMOUS, 'BREADCRUMB' => defined('ADMIN_PAGES') && $op != 'logout' && $file != 'index' && !isset($bc_parts[1]) ? $bc : ' ' . _BC_DELIM . ' ' . $bc, 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false));
$Blocks->display('l');
}
示例6: while
$result = $db->sql_query("SELECT * FROM " . $prefix . "_pages WHERE cid='0' AND active='1' {$querylang} ORDER BY title", false, __FILE__, __LINE__);
if ($db->sql_numrows($result) > 0) {
echo "<center>" . _NONCLASSCONT . "</center><br /><br /><blockquote>";
while (list($pid, $title, $subtitle, $language) = $db->sql_fetchrow($result)) {
if ($subtitle != '') {
$subtitle = " ({$subtitle})";
}
echo "<b>•</b> <a href=\"" . getlink("&pid={$pid}") . "\">{$title}</a> {$subtitle}";
if (can_admin('content')) {
echo " [ <a href=\"" . adminlink("&mode=content_edit&pid={$pid}") . "\">" . _EDIT . "</a> | <a href=\"" . adminlink("&mode=content_change_status&pid={$pid}&active=1") . "\">" . _DEACTIVATE . "</a> | <a href=\"" . adminlink("&mode=content_delete&pid={$pid}") . "\">" . _DELETE . "</a> ]";
}
}
echo '<br /></blockquote>';
}
$db->sql_freeresult($result);
if (can_admin('content')) {
$sql = "SELECT pid, cid, title, subtitle, language FROM " . $prefix . "_pages WHERE active='0' ORDER BY date";
$result = $db->sql_query($sql, false, __FILE__, __LINE__);
echo '<br /><br /><center><b>' . _YOURADMINLIST . '</b></center><br /><br />';
echo '<blockquote>';
while (list($pid, $cid, $title, $subtitle, $language) = $db->sql_fetchrow($result)) {
if ($subtitle != '') {
$subtitle = " ({$subtitle}) ";
}
echo "<b>•</b> <a href=\"" . getlink("&pid={$pid}") . "\">{$title}</a> {$subtitle} [ <a href=\"" . adminlink("&mode=content_edit&pid={$pid}") . "\">" . _EDIT . "</a> | <a href=\"" . adminlink("&mode=content_change_status&pid={$pid}&active=0") . "\">" . _ACTIVATE . "</a> | <a href=\"" . adminlink("&mode=content_delete&pid={$pid}") . "\">" . _DELETE . "</a> ]<br />";
}
echo '</blockquote>';
}
}
}
CloseTable();
示例7: date
$db->sql_freeresult($anonres);
$who_where[1] .= "</ul>\n";
$day = L10NTime::tolocal(mktime(0, 0, 0, date('n'), date('j'), date('Y')) - date('Z'), $userinfo['user_dst'], $userinfo['user_timezone']);
list($last[0]) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $user_prefix . "_users WHERE user_regdate>='" . $day . "'", SQL_NUM);
list($last[1]) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $user_prefix . "_users WHERE user_regdate<'" . $day . "' AND user_regdate>='" . ($day - 86400) . "'", SQL_NUM);
list($lastuser) = $db->sql_ufetchrow("SELECT username FROM " . $user_prefix . "_users WHERE user_active = 1 AND user_level > 0 ORDER BY user_id DESC LIMIT 1", SQL_NUM);
list($numusers) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $user_prefix . "_users WHERE user_id > 1 AND user_level > 0", SQL_NUM);
$content .= '<dl class="compact_userinfo">
<dt>' . _BMEMP . ':</dt>
<dd>' . _BLATEST . ': <b><a href="' . getlink('Your_Account&profile=' . $lastuser) . '">' . $lastuser . '</a></b></dd>
<dd>' . _BTD . ': <b>' . $last[0] . '</b></dd>
<dd>' . _BYD . ': <b>' . $last[1] . '</b></dd>
<dd>' . _BOVER . ': <b>' . $numusers . '</b></dd>
<dt>' . _BVISIT . ':</dt>
<dd>' . _BMEM . ': <b>' . $online_num[0] . '</b></dd>
<dd>' . _BVIS . ': <b>' . $online_num[1] . '</b></dd>
<dd>' . _BTT . ': <b>' . $online_num[2] . '</b></dd>
<dt>' . _WHOWHERE . ":</dt>\n";
if ($online_num[0] > 0) {
$content .= '<dd>' . _BMEM . ":\n" . $who_where[0] . "</dd>\n";
}
if ($online_num[1] > 0) {
$content .= '<dd>' . _BVIS . ":\n" . $who_where[1] . "</dd>\n";
}
if ($hidden > 0) {
$content .= '<dd>' . _BHID . ': ' . $hidden . "</dd>\n";
}
if (is_admin()) {
$content .= '<dt class="admin_logout"><a href="' . adminlink('logout') . '">' . _LOGOUTADMINACCT . "</a></dt>\n";
}
$content .= "</dl>\n";
示例8: NewDownloadsDate
function NewDownloadsDate()
{
global $downloadsprefix, $db, $module_name;
$selectdate = intval($_GET['selectdate']);
$dateDB = date("d-M-Y", $selectdate);
$dateView = date("F d, Y", $selectdate);
include "header.php";
downl_menu_tpl(1);
echo '<br />';
OpenTable();
$newdownloadDB = Date("Y-m-d", $selectdate);
$totaldownloads = $db->sql_numrows($db->sql_query("SELECT * FROM " . $downloadsprefix . "_downloads WHERE date LIKE '%{$newdownloadDB}%'"));
echo "<font class=\"option\"><b>{$dateView} - {$totaldownloads} " . _NEWDOWNLOADS . "</b></font>" . "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"10\" border=\"0\"><tr><td><font class=\"content\">";
$sql = "SELECT lid, cid, title, description, date, hits, url, downloadratingsummary, totalvotes, totalcomments, filesize, version, homepage FROM " . $downloadsprefix . "_downloads WHERE date LIKE '%{$newdownloadDB}%' ORDER BY title ASC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$lid = $row['lid'];
$cid = $row['cid'];
$title = $row['title'];
$description = $row['description'];
$time = $row['date'];
$hits = $row['hits'];
$url = $row['url'];
$downloadratingsummary = $row['downloadratingsummary'];
$totalvotes = $row['totalvotes'];
$totalcomments = $row['totalcomments'];
$filesize = $row['filesize'];
$version = $row['version'];
$homepage = $row['homepage'];
$downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal);
if (can_admin('downloads')) {
if (eregi("http", $url)) {
echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>";
} else {
echo "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModDownload&lid={$lid}") . "\"><img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"" . _EDIT . "\"></a>";
}
} else {
if (eregi("http", $url)) {
echo "<img src=\"modules/{$module_name}/images/icon30.gif\" border=\"0\" alt=\"\">";
} else {
echo "<img src=\"modules/{$module_name}/images/download.gif\" border=\"0\" alt=\"\">";
}
}
echo " <a href=\"" . getlink("&d_op=getit&lid={$lid}") . "\" class=\"title\">{$title}</a>";
$datetime = formatDateTime($time . ' 00:00:00', _DATESTRING3);
newdownloadgraphic($datetime);
popgraphic($hits);
detecteditorial($lid, 1);
echo "<br /><b>" . _DESCRIPTION . ":</b> {$description}<br />";
echo "<b>" . _VERSION . ":</b> {$version} <b>" . _FILESIZE . ":</b> " . CoolSize($filesize) . "<br />";
echo "<b>" . _ADDEDON . ":</b> <b>{$datetime}</b> <b>" . _UDOWNLOADS . ":</b> {$hits}";
$transfertitle = str_replace(" ", "_", $title);
/* voting & comments stats */
$votestring = $totalvotes == 1 ? _VOTE : _VOTES;
if ($downloadratingsummary != "0" || $downloadratingsummary != "0.0") {
echo " <b>" . _RATING . ":</b> {$downloadratingsummary} ({$totalvotes} {$votestring})";
}
echo '<br />';
$sql2 = "SELECT title FROM " . $downloadsprefix . "_categories WHERE cid='{$cid}'";
$result2 = $db->sql_query($sql2);
$row2 = $db->sql_fetchrow($result2);
$ctitle = $row2[title];
$ctitle = getparent($cid, $ctitle);
echo "<B>" . _CATEGORY . ":</B> <A HREF=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$ctitle}</A><br />";
if ($homepage != "") {
echo "<br /><a href=\"{$homepage}\" target=\"new\">" . _HOMEPAGE . "</a> | ";
}
echo "<a href=\"" . getlink("&d_op=ratedownload&lid={$lid}") . "\">" . _RATERESOURCE . "</a>";
if (is_user()) {
echo " | <a href=\"" . getlink("&d_op=brokendownload&lid={$lid}") . "\">" . _REPORTBROKEN . "</a>";
}
echo " | <a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$lid}") . "\">" . _DETAILS . "</a>";
if ($totalcomments != 0) {
echo " | <a href=\"" . getlink("&d_op=viewdownloadcomments&lid={$lid}") . "\">" . _SCOMMENTS . " ({$totalcomments})</a>";
}
detecteditorial($lid, 0);
echo "<br /><br />";
}
echo "</font></td></tr></table>";
CloseTable();
include "footer.php";
}
示例9: getlink
echo '<a href="' . getlink('Your_Account&profile=' . $row[1]) . '"><strong>' . $row[1] . ':</strong></a>';
if ($shoutconf['date']) {
echo formatDateTime($row[3], '%d-%b-%Y ');
}
// date
if ($shoutconf['time']) {
echo formatDateTime($row[3], '%H:%M:%S');
}
// time
echo '<br />' . $row[2] . '</div><hr />';
}
$db->sql_freeresult($result);
$number = 0;
}
$pagetitle .= 'Shoutblock';
require_once 'header.php';
OpenTable();
if ($shoutconf['themecolors']) {
$shoutconf['color1'] = $bgcolor1;
$shoutconf['color2'] = $bgcolor2;
}
$offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
if (is_numeric($offset)) {
$offset = intval($offset);
nav_shouts();
} else {
all_shouts();
}
$admin = can_admin('shoutblock') ? ' | <a href="' . adminlink('&mode=manage') . '">Manage Shouts</a>' : '';
echo '<p align="right"><a href="' . getlink('&offset=' . $number) . '">Next</a> - <a href="' . getlink('&offset=all') . '">All</a>' . $admin . '</p>';
CloseTable();
示例10: DownloadsDelEditorial
function DownloadsDelEditorial()
{
global $downloadsprefix, $db;
$db->sql_query("delete from " . $downloadsprefix . "_editorials where downloadid=" . intval($_GET['downloadid']));
url_redirect(adminlink("&mode=DownloadsModDownload&lid={$downloadid}"));
}
示例11: index
function index()
{
global $downloadsprefix, $db, $show_links_num, $show_links_info, $show_links_inum, $module_name, $bgcolor1, $bgcolor3;
require_once 'header.php';
downl_menu_tpl(0);
echo '<br />';
OpenTable();
echo "<center><font class=\"title\"><b>" . _DOWNLOADSMAINCAT . "</b></font></center><br />";
echo "<table border=\"0\" cellspacing=\"10\" cellpadding=\"0\" align=\"center\"><tr>";
$sql = "SELECT cid, title, cdescription FROM " . $downloadsprefix . "_categories WHERE parentid='0' ORDER BY title";
$result = $db->sql_query($sql);
$count = $dum = 0;
while ($row = $db->sql_fetchrow($result)) {
$cid = $row['cid'];
$title = $row['title'];
$cdescription = $row['cdescription'];
if ($show_links_num == 1) {
list($cnumrows) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads WHERE cid='{$cid}'", SQL_NUM);
$cnumm = " ({$cnumrows})";
} else {
$cnumm = '';
}
if ($cnumrows > 0) {
$folder = "modules/Downloads/images/openfolder.gif";
} else {
$folder = "modules/Downloads/images/closedfolder.gif";
}
if (can_admin('downloads')) {
$folderImg = "<a href=\"" . adminlink("{$module_name}&mode=DownloadsModCat&cat={$cid}") . "\"><img src=\"{$folder}\" border=\"0\" alt=\"" . _EDIT . "\" /></a>";
} else {
$folderImg = "<img src=\"{$folder}\" border=\"0\" alt=\"{$title}\" />";
}
echo "<td valign=\"top\"><font class=\"title\">{$folderImg} <a href=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\"><b>{$title}</b></a></font>{$cnumm}";
categorynewdownloadgraphic($cid);
if ($cdescription) {
echo "<br /><font class=\"content\">{$cdescription}</font><br />";
} else {
echo '<br />';
}
$result2 = $db->sql_query("SELECT cid, title FROM " . $downloadsprefix . "_categories WHERE parentid='{$cid}' ORDER BY title LIMIT 0,3");
$space = 0;
while ($row2 = $db->sql_fetchrow($result2)) {
$cid = $row2['cid'];
$stitle = $row2['title'];
if ($space > 0) {
echo ', ';
}
if ($show_links_num == 1) {
list($cnumrows2) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads WHERE cid='{$cid}'", SQL_NUM);
$cnum = " ({$cnumrows2})";
} else {
$cnum = "";
}
echo "<font class=\"content\"><a href=\"" . getlink("&d_op=viewdownload&cid={$cid}") . "\">{$stitle}</a>{$cnum}</font>";
$space++;
}
if ($count < 1) {
echo "</td><td> </td>";
$dum = 1;
}
$count++;
if ($count == 2) {
echo "</td></tr><tr>";
$count = 0;
$dum = 0;
}
}
if ($dum == 1) {
echo '</tr></table>';
} elseif ($dum == 0) {
echo '<td></td></tr></table>';
}
list($numrows) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_downloads", SQL_NUM);
list($catnum) = $db->sql_ufetchrow("SELECT COUNT(*) FROM " . $downloadsprefix . "_categories", SQL_NUM);
echo "<center><font class=\"content\">" . _THEREARE . " <b>{$numrows}</b> " . _DOWNLOADS . " " . _AND . " <b>{$catnum}</b> " . _CATEGORIES . " " . _INDB . "</font></center>";
CloseTable();
if ($show_links_info == 1) {
echo '<br />';
OpenTable();
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" width=\"100%\">" . "<tr><td width=\"50%\" valign=\"top\" align=\"center\">";
echo "<div align=\"center\" class=\"title\">" . _NEWDOWNLOADS . "</div>";
echo "</td><td width=\"50%\" valign=\"top\" align=\"center\">";
echo "<div align=\"center\" class=\"title\">" . _MOSTPOPULAR . " {$show_links_inum}</div>";
echo "</td></tr>" . "<tr><td width=\"50%\" valign=\"top\" align=\"center\">";
OpenTable2();
$content = '<table border="0" width="100%">';
$color = $bgcolor3;
$result = $db->sql_query("SELECT lid, title, hits FROM " . $downloadsprefix . "_downloads ORDER BY date DESC LIMIT 0, {$show_links_inum}");
while ($row = $db->sql_fetchrow($result)) {
$title2 = ereg_replace("_", " ", $row['title']);
$color = $color == $bgcolor3 ? $bgcolor1 : $bgcolor3;
$content .= "<tr><td bgcolor=\"{$color}\" align=\"left\"><a href=\"" . getlink("&d_op=viewdownloaddetails&lid={$row['lid']}") . "\">{$title2}</a></td>" . "<td bgcolor=\"{$color}\" align=\"center\" width=\"20\">{$row['hits']}</td></tr>";
}
echo "{$content}</table>";
CloseTable2();
echo "|[ <a href=\"" . getlink("&d_op=NewDownloads") . "\">" . _NEWDOWNLOADS . "</a> ]|";
echo "</td><td width=\"50%\" valign=\"top\" align=\"center\">";
OpenTable2();
$content = "<table border=\"0\" width=\"100%\">";
$color = $bgcolor3;
//.........这里部分代码省略.........