本文整理汇总了PHP中cnt函数的典型用法代码示例。如果您正苦于以下问题:PHP cnt函数的具体用法?PHP cnt怎么用?PHP cnt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cnt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: top_match
function top_match()
{
global $db, $allowHover, $llwars, $picformat, $sql_prefix;
$qry = db("SELECT s1.datum,s1.cid,s1.id,s1.bericht,s1.xonx,s1.punkte,s1.gpunkte,s1.squad_id,s2.icon,s2.name FROM " . $db['cw'] . " AS s1\n LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n WHERE `top` = '1'\n ORDER BY RAND()");
if ($get = _fetch($qry)) {
//Clans Mod
$clandetailssql = db("SELECT clantag, gegner FROM " . $sql_prefix . "clans WHERE id LIKE " . $get['cid']);
$clans = _fetch($clandetailssql);
$squad = '_defaultlogo.jpg';
$gegner = '_defaultlogo.jpg';
foreach ($picformat as $end) {
if (file_exists(basePath . '/inc/images/clanwars/' . $get['cid'] . '_logo.' . $end)) {
$gegner = $get['cid'] . '_logo.' . $end;
}
if (file_exists(basePath . '/inc/images/squads/' . $get['squad_id'] . '_logo.' . $end)) {
$squad = $get['squad_id'] . '_logo.' . $end;
}
}
if ($allowHover == 1 || $allowHover == 2) {
$hover = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['name'])) . '<br/>vs.<br/> ' . jsconvert(re($clans['gegner'])) . '</td></tr><tr><td><b>' . _played_at . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _cw_xonx . ':</b></td><td>' . jsconvert(re($get['xonx'])) . '</td></tr><tr><td><b>' . _result . ':</b></td><td>' . cw_result_nopic_raw($get['punkte'], $get['gpunkte']) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$topmatch .= show("menu/top_match", array("id" => $get['id'], "clantag" => re(cut($clans['clantag'], $llwars)), "team" => re(cut($get['name'], $llwars)), "game" => substr(strtoupper(str_replace('.' . $icon, '', re($get['icon']))), 0, 5), "id" => $get['id'], "gegner" => $gegner, "squad" => $squad, "hover" => $hover, "info" => $get['datum'] > time() ? date("d.m.Y", $get['datum']) : cw_result_nopic($get['punkte'], $get['gpunkte'])));
}
return empty($topmatch) ? '<center style="margin:3px 0">' . _no_top_match . '</center>' : '<table class="navContent" cellspacing="0">' . $topmatch . '</table>';
}
示例2: ftopics
function ftopics()
{
global $db, $maxftopics, $lftopics, $maxfposts, $allowHover;
$f = 0;
$qry = db("SELECT s1.*,s2.id AS subid FROM " . $db['f_threads'] . " s1, " . $db['f_skats'] . " s2, " . $db['f_kats'] . " s3\n WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100");
while ($get = _fetch($qry)) {
if ($f == $maxftopics) {
break;
}
if (fintern($get['kid'])) {
$lp = cnt($db['f_posts'], " WHERE sid = '" . $get['id'] . "'");
$pagenr = ceil($lp / $maxfposts);
if ($pagenr == 0) {
$page = 1;
} else {
$page = $pagenr;
}
if ($allowHover == 1) {
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['topic'])) . '</td></tr><tr><td><b>' . _forum_posts . ':</b></td><td>' . $lp . '</td></tr><tr><td><b>' . _forum_lpost . ':</b></td><td>' . date("d.m.Y H:i", $get['lp']) . _uhr . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$ftopics .= show("menu/forum_topics", array("id" => $get['id'], "pagenr" => $page, "p" => $lp + 1, "titel" => cut(re($get['topic']), $lftopics), "info" => $info, "kid" => $get['kid']));
$f++;
}
}
return empty($ftopics) ? '' : '<table class="navContent" cellspacing="0">' . $ftopics . '</table>';
}
示例3: l_wars
function l_wars()
{
global $db, $maxlwars, $llwars, $allowHover;
$qry = db("SELECT s1.datum,s1.gegner,s1.id,s1.bericht,s1.xonx,s1.clantag,s1.punkte,s1.gpunkte,s1.squad_id,s2.icon,s2.name FROM " . $db['cw'] . " AS s1\n LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n WHERE datum < " . time() . "\n ORDER BY datum DESC\n LIMIT " . $maxlwars . "");
while ($get = _fetch($qry)) {
if ($allowHover == 1 || $allowHover == 2) {
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['name'])) . '<br/>vs.<br/> ' . jsconvert(re($get['gegner'])) . '</td></tr><tr><td><b>' . _played_at . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _cw_xonx . ':</b></td><td>' . jsconvert(re($get['xonx'])) . '</td></tr><tr><td><b>' . _result . ':</b></td><td>' . cw_result_nopic_raw($get['punkte'], $get['gpunkte']) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$lwars .= show("menu/last_wars", array("id" => $get['id'], "clantag" => re(cut($get['clantag'], $llwars)), "icon" => re($get['icon']), "info" => $info, "result" => cw_result_pic($get['punkte'], $get['gpunkte'])));
}
return empty($lwars) ? '' : '<table class="navContent" cellspacing="0">' . $lwars . '</table>';
}
示例4: n_wars
function n_wars()
{
global $db, $maxnwars, $lnwars, $allowHover;
$qry = db("SELECT s1.id,s1.datum,s1.clantag,s1.maps,s1.gegner,s1.squad_id,s2.icon,s1.xonx,s2.name FROM " . $db['cw'] . " AS s1\n LEFT JOIN " . $db['squads'] . " AS s2 ON s1.squad_id = s2.id\n WHERE s1.datum > " . time() . "\n ORDER BY s1.datum\n LIMIT " . $maxnwars . "");
if (_rows($qry)) {
while ($get = _fetch($qry)) {
if ($allowHover == 1 || $allowHover == 2) {
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['name'])) . '<br/>vs.<br /> ' . jsconvert(re($get['gegner'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _cw_xonx . ':</b></td><td>' . jsconvert(re($get['xonx'])) . '</td></tr><tr><td><b>' . _cw_maps . ':</b></td><td>' . jsconvert(re($get['maps'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['cw_comments'], "WHERE cw = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$nwars .= show("menu/next_wars", array("id" => $get['id'], "clantag" => re(cut($get['clantag'], $lnwars)), "icon" => re($get['icon']), "info" => $info, "datum" => date("d.m.:", $get['datum'])));
}
}
return empty($nwars) ? '' : '<table class="navContent" cellspacing="0">' . $nwars . '</table>';
}
示例5: team
function team($tID = '')
{
global $db, $teamRow, $l_team;
//SQL
if (!empty($tID)) {
$where = "WHERE id = '" . intval($tID) . "' AND navi = 1";
} else {
$where = "WHERE navi = '1' ORDER BY RAND()";
}
$get = _fetch(db("SELECT * FROM " . $db['squads'] . " " . $where . ""));
//Members
$qrym = db("SELECT s1.squad,s2.id,s2.level,s2.nick,s2.status,s2.rlname,s2.bday,s4.position\n FROM " . $db['squaduser'] . " AS s1\n LEFT JOIN " . $db['users'] . " AS s2\n ON s2.id=s1.user\n LEFT JOIN " . $db['userpos'] . " AS s3\n ON s3.squad=s1.squad AND s3.user=s1.user\n LEFT JOIN " . $db['pos'] . " AS s4\n ON s4.id=s3.posi\n WHERE s1.squad='" . $get['id'] . "'\n AND s2.level != 0\n ORDER BY s4.pid");
$i = 1;
$cnt = 0;
while ($getm = _fetch($qrym)) {
unset($tr1, $tr2);
if ($i == 0 || $i == 1) {
$tr1 = "<tr>";
}
if ($i == $teamRow) {
$tr2 = "</tr>";
$i = 0;
}
$status = $getm['status'] == 1 || $getm['level'] == 1 ? _aktiv : _inaktiv;
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . rawautor($getm['id']) . '</td></tr><tr><td width=80px><b>' . _posi . ':</b></td><td>' . getrank($getm['id'], $get['id']) . '</td></tr><tr><td><b>' . _status . ':</b></td><td>' . $status . '</td></tr><tr><td><b>' . _age . ':</b></td><td>' . getAge($getm['bday']) . '</td></tr><tr><td colspan=2 align=center>' . jsconvert(userpic($getm['id'])) . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
$member .= show("menu/team_show", array("pic" => userpic($getm['id'], 40, 50), "tr1" => $tr1, "tr2" => $tr2, "squad" => $get['id'], "info" => $info, "id" => $getm['id'], "width" => round(100 / $teamRow, 0)));
$i++;
$cnt++;
}
if (is_float($cnt / $teamRow)) {
for ($e = $i; $e <= $teamRow; $e++) {
$end .= '<td></td>';
}
$end = $end . "</tr>";
}
// Next / last ID
$all = cnt($db['squads'], "WHERE `navi` = '1'");
$next = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' AND `id` > '" . $get['id'] . "' ORDER BY `id` ASC LIMIT 1"));
if (empty($next)) {
$next = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' ORDER BY `id` ASC LIMIT 1"));
}
$last = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' AND `id` < '" . $get['id'] . "' ORDER BY `id` DESC LIMIT 1"));
if (empty($last)) {
$last = _fetch(db("SELECT id FROM " . $db['squads'] . " WHERE `navi` = '1' ORDER BY `id` DESC LIMIT 1"));
}
//Output
$team = show("menu/team", array("row" => $teamRow, "team" => re($get['name']), "id" => $get['id'], "next" => $next['id'], "last" => $last['id'], "br1" => $all <= 1 ? '<!--' : '', "br2" => $all <= 1 ? '-->' : '', "member" => $member, "end" => $end));
return '<div id="navTeam">' . $team . '</div>';
}
示例6: newsticker
function newsticker()
{
global $db, $allowHover;
if (!permission("intnews")) {
$int = "AND intern = 0";
}
$qry = db("SELECT id,titel,autor,datum,kat FROM " . $db['news'] . " WHERE public = '1'AND datum <= '" . time() . "' " . $int . " ORDER BY id DESC LIMIT 20");
while ($get = _fetch($qry)) {
if ($allowHover == 1) {
$getkat = _fetch(db("SELECT kategorie FROM " . $db['newskat'] . " WHERE id = '" . $get['kat'] . "'"));
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['titel'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _autor . ':</b></td><td>' . rawautor($get['autor']) . '</td></tr><tr><td><b>' . _news_admin_kat . ':</b></td><td>' . jsconvert(re($getkat['kategorie'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['newscomments'], "WHERE news = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$news .= '<a href="../news/?action=show&id=' . $get['id'] . '" ' . $info . '>' . re($get['titel']) . '</a> | ';
}
return show("menu/newsticker", array("news" => $news));
}
示例7: l_artikel
function l_artikel()
{
global $db, $maxlartikel, $lartikel, $allowHover;
$qry = db("SELECT id,titel,text,autor,datum,kat,public FROM " . $db['artikel'] . "\n\t\t\t WHERE public = 1\n ORDER BY id DESC\n LIMIT " . $maxlartikel . "");
if (_rows($qry)) {
while ($get = _fetch($qry)) {
$qrykat = db("SELECT kategorie FROM " . $db['newskat'] . "\n WHERE id = '" . $get['kat'] . "'");
$getkat = _fetch($qrykat);
$text = strip_tags($get['text']);
if ($allowHover == 1) {
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['titel'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _autor . ':</b></td><td>' . rawautor($get['autor']) . '</td></tr><tr><td><b>' . _news_admin_kat . ':</b></td><td>' . jsconvert(re($getkat['kategorie'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['acomments'], "WHERE artikel = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$l_articles .= show("menu/last_artikel", array("id" => $get['id'], "titel" => re(cut($get['titel'], $lartikel)), "text" => cut(bbcode($text), 260), "datum" => date("d.m.Y", $get['datum']), "info" => $info));
}
}
return empty($l_articles) ? '' : '<table class="navContent" cellspacing="0">' . $l_articles . '</table>';
}
示例8: l_news
function l_news()
{
global $db, $maxlnews, $lnews, $allowHover;
if (!permission("intnews")) {
$int = "AND intern = 0";
}
$qry = db("SELECT id,titel,autor,datum,kat,public,timeshift FROM " . $db['news'] . "\n WHERE public = 1\n\t\t\t\t\t\t\t AND datum <= " . time() . "\n\t\t\t " . $int . "\n ORDER BY id DESC\n LIMIT " . $maxlnews . "");
while ($get = _fetch($qry)) {
$qrykat = db("SELECT kategorie FROM " . $db['newskat'] . "\n WHERE id = '" . $get['kat'] . "'");
$getkat = _fetch($qrykat);
if ($allowHover == 1) {
$info = 'onmouseover="DZCP.showInfo(\'<tr><td colspan=2 align=center padding=3 class=infoTop>' . jsconvert(re($get['titel'])) . '</td></tr><tr><td><b>' . _datum . ':</b></td><td>' . date("d.m.Y H:i", $get['datum']) . _uhr . '</td></tr><tr><td><b>' . _autor . ':</b></td><td>' . rawautor($get['autor']) . '</td></tr><tr><td><b>' . _news_admin_kat . ':</b></td><td>' . jsconvert(re($getkat['kategorie'])) . '</td></tr><tr><td><b>' . _comments_head . ':</b></td><td>' . cnt($db['newscomments'], "WHERE news = '" . $get['id'] . "'") . '</td></tr>\')" onmouseout="DZCP.hideInfo()"';
}
$l_news .= show("menu/last_news", array("id" => $get['id'], "titel" => re(cut($get['titel'], $lnews)), "datum" => date("d.m.Y", $get['datum']), "info" => $info));
}
return empty($l_news) ? '' : '<table class="navContent" cellspacing="0">' . $l_news . '</table>';
}
示例9: header
header("Content-type: text/html; charset=utf-8");
if ($_GET['do'] == 'edit') {
$qry = db("SELECT * FROM " . $db['cw_comments'] . "\n WHERE id = '" . intval($_GET['cid']) . "'");
$get = _fetch($qry);
$get_id = '?';
$get_userid = $get['reg'];
$get_date = $get['datum'];
if ($get['reg'] == 0) {
$regCheck = false;
} else {
$regCheck = true;
$pUId = $get['reg'];
}
$editedby = show(_edited_by, array("autor" => cleanautor($userid), "time" => date("d.m.Y H:i", time()) . _uhr));
} else {
$get_id = cnt($db['cw_comments'], " WHERE cw = " . intval($_GET['id']) . "") + 1;
$get_userid = $userid;
$get_date = time();
if ($chkMe == 'unlogged') {
$regCheck = false;
} else {
$regCheck = true;
$pUId = $userid;
}
}
$get_hp = $_POST['hp'];
$get_email = $_POST['email'];
$get_nick = $_POST['nick'];
if (!$regCheck) {
if ($get_hp) {
$hp = show(_hpicon_forum, array("hp" => links($get_hp)));
示例10: header
}
break;
case 'preview':
header("Content-type: text/html; charset=utf-8");
if (isset($_GET['edit']) && !empty($_GET['edit'])) {
$qry = db("SELECT * FROM " . $db['gb'] . "\n WHERE id = '" . intval($_GET['edit']) . "'");
$get = _fetch($qry);
$get_id = '?';
$get_userid = $get['reg'];
$get_date = $get['datum'];
if ($get['reg'] == 0) {
$regCheck = true;
}
$editby = show(_edited_by, array("autor" => cleanautor($userid), "time" => date("d.m.Y H:i", time()) . _uhr));
} else {
$get_id = cnt($db['gb']) + 1;
$get_userid = $userid;
$get_date = time();
if ($chkMe == 'unlogged') {
$regCheck = true;
}
}
$get_hp = $_POST['hp'];
$get_email = $_POST['email'];
$get_nick = $_POST['nick'];
if ($get_hp) {
$gbhp = show(_hpicon, array("hp" => links($get_hp)));
} else {
$gbhp = "";
}
if ($get_email) {
示例11: show
$show = show($dir . "/form_vote", array("head" => _votes_admin_edit_head, "value" => "edit", "id" => $_GET['id'], "what" => $what, "value" => _button_value_edit, "br1" => "", "br2" => "", "question1" => re($get['titel']), "a1" => voteanswer("a1", $_GET['id']), "a2" => voteanswer("a2", $_GET['id']), "a3" => voteanswer("a3", $_GET['id']), "a4" => voteanswer("a4", $_GET['id']), "a5" => voteanswer("a5", $_GET['id']), "a6" => voteanswer("a6", $_GET['id']), "a7" => voteanswer("a7", $_GET['id']), "error" => "", "a8" => voteanswer("a8", $_GET['id']), "a9" => voteanswer("a9", $_GET['id']), "a10" => voteanswer("a10", $_GET['id']), "intern" => $intern, "isclosed" => $isclosed, "closed" => _votes_admin_closed, "interna" => _votes_admin_intern, "question" => _votes_admin_question, "answer" => _votes_admin_answer));
} elseif ($_GET['do'] == "editvote") {
$qry = db("SELECT * FROM " . $db['vote_results'] . "\n WHERE vid = '" . intval($_GET['id']) . "'");
$get = _fetch($qry);
$upd = db("UPDATE " . $db['votes'] . "\n SET `titel` = '" . up($_POST['question']) . "',\n `intern` = '" . (int) $_POST['intern'] . "',\n `closed` = '" . (int) $_POST['closed'] . "'\n WHERE id = '" . intval($_GET['id']) . "'");
$upd1 = db("UPDATE " . $db['vote_results'] . "\n SET `sel` = '" . up($_POST['a1']) . "'\n WHERE what = 'a1'\n AND vid = '" . intval($_GET['id']) . "'");
$upd2 = db("UPDATE " . $db['vote_results'] . "\n SET `sel` = '" . up($_POST['a2']) . "'\n WHERE what = 'a2'\n AND vid = '" . intval($_GET['id']) . "'");
for ($i = 3; $i <= 10; $i++) {
if (!empty($_POST['a' . $i . ''])) {
if (cnt($db['vote_results'], " WHERE vid = '" . intval($_GET['id']) . "' AND what = 'a" . $i . "'") != 0) {
$upd = db("UPDATE " . $db['vote_results'] . "\n SET `sel` = '" . up($_POST['a' . $i . '']) . "'\n WHERE what = 'a" . $i . "'\n AND vid = '" . intval($_GET['id']) . "'");
} else {
$ins = db("INSERT INTO " . $db['vote_results'] . "\n SET `vid` = '" . $_GET['id'] . "',\n `what` = 'a" . $i . "',\n `sel` = '" . up($_POST['a' . $i . '']) . "'");
}
}
if (cnt($db['vote_results'], " WHERE vid = '" . intval($_GET['id']) . "' AND what = 'a" . $i . "'") != 0 && empty($_POST['a' . $i . ''])) {
$del = db("DELETE FROM " . $db['vote_results'] . "\n WHERE vid = '" . intval($_GET['id']) . "'\n AND what = 'a" . $i . "'");
}
}
$show = info(_vote_admin_successful_edited, "?admin=votes");
} elseif ($_GET['do'] == "menu") {
$qryv = db("SELECT intern FROM " . $db['votes'] . "\n WHERE id = '" . intval($_GET['id']) . "'\n AND intern = 1");
if (_rows($qryv)) {
$show = error(_vote_admin_menu_isintern, 1);
} else {
$qrys = db("SELECT * FROM " . $db['votes'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$get = _fetch($qrys);
if ($get['menu'] == 1) {
$qry = db("UPDATE " . $db['votes'] . "\n SET menu = '0'");
header("Location: ?admin=votes");
} else {
示例12: db
$qry = db("DELETE FROM " . $db['artikel'] . "\n WHERE id = '" . intval($_GET['id']) . "'");
$show = info(_artikel_deleted, "?admin=artikel");
} elseif ($_GET['do'] == 'public') {
if ($_GET['what'] == 'set') {
$upd = db("UPDATE " . $db['artikel'] . "\n SET `public` = '1',\n \t\t\t\t\t `datum` = '" . time() . "'\n WHERE id = '" . intval($_GET['id']) . "'");
} elseif ($_GET['what'] == 'unset') {
$upd = db("UPDATE " . $db['artikel'] . "\n SET `public` = '0'\n WHERE id = '" . intval($_GET['id']) . "'");
}
header("Location: ?admin=artikel");
} else {
if (isset($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 1;
}
$entrys = cnt($db['artikel']);
$qry = db("SELECT * FROM " . $db['artikel'] . "\n ORDER BY `public` ASC, `datum` DESC \n\t\t\t\t\t\t\t\t\t LIMIT " . ($page - 1) * $maxadminartikel . "," . $maxadminartikel . "");
while ($get = _fetch($qry)) {
$edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=artikel&do=edit", "title" => _button_title_edit));
$delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=artikel&do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_artikel)));
$titel = show(_artikel_show_link, array("titel" => re(cut($get['titel'], $lnewsadmin)), "id" => $get['id']));
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
$color++;
$public = $get['public'] == 1 ? '<a href="?admin=artikel&do=public&id=' . $get['id'] . '&what=unset"><img src="../inc/images/public.gif" alt="" title="' . _non_public . '" /></a>' : '<a href="?admin=artikel&do=public&id=' . $get['id'] . '&what=set"><img src="../inc/images/nonpublic.gif" alt="" title="' . _public . '" /></a>';
if (empty($get['datum'])) {
$datum = _no_public;
} else {
$datum = date("d.m.y H:i", $get['datum']) . _uhr;
}
$show_ .= show($dir . "/admin_show", array("date" => $datum, "titel" => $titel, "class" => $class, "autor" => autor($get['autor']), "intnews" => "", "sticky" => "", "public" => $public, "edit" => $edit, "delete" => $delete));
}
示例13: ceil
} else {
$pagenr = ceil($cntpage / $maxfposts);
}
$qrylp = db("SELECT date,nick,reg,email FROM " . $db['f_posts'] . "\n WHERE sid = '" . $get['id'] . "'\n ORDER BY date DESC");
if (_rows($qrylp)) {
$getlp = _fetch($qrylp);
$lpost = show(_forum_thread_lpost, array("nick" => autor($getlp['reg'], '', $getlp['nick'], $getlp['email']), "date" => date("d.m.y H:i", $getlp['date']) . _uhr));
$lpdate = $getlp['date'];
} else {
$lpost = "-";
$lpdate = "";
}
$threadlink = show(_forum_thread_search_link, array("topic" => cut(re($get['topic']), $lforumtopic), "id" => $get['id'], "sticky" => $sticky, "hl" => $_GET['search'], "closed" => $closed, "lpid" => $cntpage + 1, "page" => $pagenr));
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
$color++;
$results .= show($dir . "/forum_search_results", array("new" => check_new($get['lp']), "topic" => $threadlink, "subtopic" => cut(re($get['subtopic']), $lforumsubtopic), "hits" => $get['hits'], "replys" => cnt($db['f_posts'], " WHERE sid = '" . $get['id'] . "'"), "class" => $class, "lpost" => $lpost, "autor" => autor($get['t_reg'], '', $get['t_nick'], $get['t_email'])));
}
}
$nav = nav($entrys, $maxfsearch, $getstr);
$show = show($dir . "/forum_search_show", array("head" => _forum_search_results, "autor" => _autor, "thread" => _forum_thread, "lpost" => _forum_lpost, "nav" => $nav, "results" => $results, "replys" => _forum_replys, "hits" => _hits));
}
}
//Diverse Abfragen
if ($_GET['searchplugin'] == true) {
$onclick = 'onclick="more(1)" style="cursor:pointer"';
$img = '<img id="img1" src="../inc/images/expand.gif" alt="" />';
$style = 'style="display:none"';
if ($_GET['si_board'] == true) {
$si_board = "checked=\"checked\"";
}
if (empty($strkat)) {
示例14: show
$show = show($dir . "/forum_show_subkats", array("head" => _config_forum_head, "subkathead" => $skathead, "subkats" => $subkats, "add" => $add, "subkat" => _config_forum_subkat, "delete" => _deleteicon_blank, "edit" => _editicon_blank));
}
} else {
$qry = db("SELECT * FROM " . $db['f_kats'] . "\n ORDER BY kid");
while ($get = _fetch($qry)) {
$kat = show(_config_forum_kats_titel, array("kat" => re($get['name']), "id" => $get['id']));
$edit = show("page/button_edit_single", array("id" => $get['id'], "action" => "admin=" . $_GET['admin'] . "&do=edit", "title" => _button_title_edit));
$delete = show("page/button_delete_single", array("id" => $get['id'], "action" => "admin=" . $_GET['admin'] . "&do=delete", "title" => _button_title_del, "del" => convSpace(_confirm_del_entry)));
if ($get['intern'] == 1) {
$status = _config_forum_intern;
} else {
$status = _config_forum_public;
}
$class = $color % 2 ? "contentMainSecond" : "contentMainFirst";
$color++;
$kats .= show($dir . "/forum_show_kats", array("class" => $class, "kat" => $kat, "status" => $status, "skats" => cnt($db['f_skats'], " WHERE sid = '" . intval($get['id']) . "'"), "edit" => $edit, "delete" => $delete));
}
$show = show($dir . "/forum", array("head" => _config_forum_head, "mainkat" => _config_forum_mainkat, "edit" => _editicon_blank, "skats" => _cnt, "status" => _config_forum_status, "delete" => _deleteicon_blank, "add" => _config_forum_kats_add, "kats" => $kats));
if ($_GET['do'] == "newkat") {
$qry = db("SELECT * FROM " . $db['f_kats'] . "\n ORDER BY kid");
while ($get = _fetch($qry)) {
$positions .= show(_select_field, array("value" => $get['kid'] + 1, "what" => _nach . ' ' . re($get['name']), "sel" => ""));
}
$show = show($dir . "/katform", array("fkat" => _config_katname, "head" => _config_forum_kat_head, "fkid" => _position, "fart" => _kind, "positions" => $positions, "public" => _config_forum_public, "intern" => _config_forum_intern, "value" => _button_value_add, "kat" => ""));
} elseif ($_GET['do'] == "addkat") {
if (!empty($_POST['kat'])) {
if ($_POST['kid'] == "1" || "2") {
$sign = ">= ";
} else {
$sign = "> ";
}
示例15: show
$sel = "";
}
$years .= show(_select_field, array("value" => $x, "sel" => $sel, "what" => $x));
}
if ($language == "deutsch") {
$endc = "n";
} else {
$endc = "";
}
$c = cnt($db['newscomments']);
if ($c == "1") {
$com = _news_kommentar;
} else {
$com = _news_kommentare . $endc;
}
$stats = show(_news_stats, array("news" => $entrys, "comments" => cnt($db['newscomments']), "com" => $com));
$qrykat = db("SELECT * FROM " . $db['newskat'] . "");
while ($getkat = _fetch($qrykat)) {
$kategorien .= '<option value="' . $getkat['id'] . '">-> ' . $getkat['kategorie'] . '</option>';
}
for ($i = 1; $i <= 12; $i++) {
if (!$pyear) {
if ($i == date("n", time())) {
$sel[$i] = "selected=\"selected\"";
} else {
$sel[$i] = "";
}
} else {
if ($i == nonum($pmonth)) {
$sel[$i] = "selected=\"selected\"";
} else {