本文整理汇总了PHP中db_make_sites函数的典型用法代码示例。如果您正苦于以下问题:PHP db_make_sites函数的具体用法?PHP db_make_sites怎么用?PHP db_make_sites使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_make_sites函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_sitemap
function show_sitemap($q, $lv, $table, $menu, $where, $was)
{
$limit = 200;
$page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
$MPL = db_make_sites($page, $where, $limit, '?sitemap-' . $menu->get(1), $table);
$anfang = ($page - 1) * $limit;
$q = db_query($q . " LIMIT " . $anfang . "," . $limit);
$tpl = new tpl('sitemap');
$l = '';
while ($r = db_fetch_row($q)) {
$l .= $tpl->list_get('links', array(str_replace('{id}', $r[0], $lv), $r[1]));
}
$tpl->set_ar_out(array('MPL' => $MPL, 'site' => $was, 'links' => $l), 1);
}
示例2: db_make_sites
$lang['vote'];
?>
</b></td>
</tr>
<?php
$breite = 200;
if ($_SESSION['authright'] <= -1) {
$woR = '>= "1"';
} else {
$woR = '= "1"';
}
$limit = 3;
// Limit
$page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1;
$MPL = db_make_sites($page, 'WHERE `recht` ' . $woR, $limit, "?vote", 'poll');
$anfang = ($page - 1) * $limit;
$class = '';
$erg = db_query('SELECT * FROM `prefix_poll` WHERE `recht` ' . $woR . ' ORDER BY `poll_id` DESC LIMIT ' . $anfang . ',' . $limit);
while ($fraRow = db_fetch_object($erg)) {
$maxRow = db_fetch_object(db_query('SELECT MAX(`res`) as `res` FROM `prefix_poll_res` WHERE `poll_id` = "' . $fraRow->poll_id . '"'));
$gesRow = db_fetch_object(db_query('SELECT SUM(`res`) as `res` FROM `prefix_poll_res` WHERE `poll_id` = "' . $fraRow->poll_id . '"'));
$max = $maxRow->res;
$ges = $gesRow->res;
$textAr = explode('#', $fraRow->text);
if ($fraRow->recht == 2) {
$inTextAr = $_SESSION['authid'];
} elseif ($fraRow->recht == 1) {
$inTextAr = $_SERVER['REMOTE_ADDR'];
}
echo '<tr><td class="Cdark"><b>' . $fraRow->frage . '</b></td></tr>';
示例3: db_query
} else {
echo 'Datum stimmt nicht, bitte im Format DD.MM.YYYY eingeben also z.B. 29.12.2005<br />';
}
}
if (!empty($_REQUEST['pkey'])) {
$erg = db_query("SELECT `id`,DATE_FORMAT(`date`,'%d.%m.%Y') as `date`,`title`,`txt` FROM `prefix_history` WHERE `id` = '" . $_GET['pkey'] . "'");
$_ilch = db_fetch_assoc($erg);
$_ilch['pkey'] = $_REQUEST['pkey'];
} else {
$_ilch = array('pkey' => '', 'date' => date('d.m.Y'), 'title' => '', 'txt' => '');
}
$_ilch['ANTISPAM'] = get_antispam('adminuser_action', 0, true);
$tpl->set_ar_out($_ilch, 0);
if (empty($_GET['page'])) {
$_GET['page'] = 1;
}
$limit = 20;
$class = '';
$MPL = db_make_sites($_GET['page'], '', $limit, 'admin.php?history', 'history');
$anfang = ($_GET['page'] - 1) * $limit;
$abf = "SELECT `id`,DATE_FORMAT(`date`,'%d.%m.%Y') as `date`,`title` FROM `prefix_history` ORDER BY `date` LIMIT " . $anfang . "," . $limit;
$erg = db_query($abf);
while ($row = db_fetch_assoc($erg)) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$row['class'] = $class;
$tpl->set_ar($row);
$tpl->out(1);
}
$tpl->set('MPL', $MPL);
$tpl->out(2);
$design->footer();
示例4: MIN
$q2 = "SELECT DISTINCT `b`.`id` as `fid`, `a`.`name` as `titel`, `a`.`id` as `id`, MIN(`c`.`id`) AS `firstnew`, `d`.`name` as `author`\n FROM `prefix_topics` `a`\n LEFT JOIN `prefix_forums` `b` ON `b`.`id` = `a`.`fid`\n LEFT JOIN `prefix_posts` `c` ON `c`.`tid` = `a`.`id`\n LEFT JOIN `prefix_user` `d` ON `c`.`erstid` = `d`.`id`\n LEFT JOIN `prefix_groupusers` `vg` ON `vg`.`uid` = " . $_SESSION['authid'] . " AND `vg`.`gid` = `b`.`view`\n LEFT JOIN `prefix_groupusers` `rg` ON `rg`.`uid` = " . $_SESSION['authid'] . " AND `rg`.`gid` = `b`.`reply`\n LEFT JOIN `prefix_groupusers` `sg` ON `sg`.`uid` = " . $_SESSION['authid'] . " AND `sg`.`gid` = `b`.`start`\n WHERE (((`b`.`view` >= " . $_SESSION['authright'] . " AND `b`.`view` <= 0) OR\n (`b`.`reply` >= " . $_SESSION['authright'] . " AND `b`.`reply` <= 0) OR\n (`b`.`start` >= " . $_SESSION['authright'] . " AND `b`.`start` <= 0)) OR\n (`vg`.`fid` IS NOT NULL OR `rg`.`fid` IS NOT NULL OR `sg`.`fid` IS NOT NULL OR " . $_SESSION['authright'] . " = -9))\n AND `c`.`time` >= " . $_SESSION['lastlogin'] . "\n GROUP BY `b`.`id`,`a`.`id`, `a`.`name`\n ORDER BY `c`.`time` DESC";
$x = time() - 3600 * 24 * 360;
if ($such == 'aubt') {
$where = "`c`.`time` >= " . $x . " AND `a`.`rep` = 0";
$gAnz = @db_result(db_query(str_replace('{WHERE}', $where, str_replace('{SELECT}', ' COUNT(DISTINCT `a`.`id`)', $q))), 0);
$q = str_replace('{WHERE}', $where, str_replace('{SELECT}', $s, $q));
} elseif ($such == 'augt') {
$where = "`c`.`time` >= " . $x . " AND `c`.`time` >= " . $_SESSION['lastlogin'];
$gAnz = @db_result(db_query(str_replace('{WHERE}', $where, str_replace('{SELECT}', ' COUNT(DISTINCT `a`.`id`)', $q))), 0);
$q = str_replace('{WHERE}', $where, str_replace('{SELECT}', $s, $q2));
} elseif ($such == 'aeit') {
$where = "`c`.`time` >= " . $x . " AND `c`.`erstid` = " . $uid;
$gAnz = @db_result(db_query(str_replace('{WHERE}', $where, str_replace('{SELECT}', ' COUNT(DISTINCT `a`.`id`)', $q))), 0);
$q = str_replace('{WHERE}', $where, str_replace('{SELECT}', $s, $q));
}
$MPL = db_make_sites($page, "", $limit, 'index.php?forum-' . $such . ($such == 'aeit' ? '-' . $uid : ''), "", $gAnz);
$tpl = new tpl('forum/search');
$q = db_query($q . " LIMIT " . $anfang . "," . $limit);
$class = '';
$tpl->set_out('gAnz', $gAnz, 0);
while ($r = db_fetch_assoc($q)) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$r['class'] = $class;
$r['ctime'] = db_result(db_query("SELECT MAX(`time`) FROM `prefix_posts` WHERE `tid` = " . $r['id']), 0, 0);
$r['ord'] = forum_get_ordner($r['ctime'], $r['id'], $r['fid']);
$r['link'] = 'forum-showposts-' . $r['id'];
if ($menu->get(1) == 'aeit') {
$r['author'] = '';
} elseif ($such == 'aubt') {
$r['author'] = ' ' . $lang['from'] . ' ' . $r['author'];
} else {
示例5: escape
$wheres[] = 'mtyp = "' . escape($_POST['typ'], 'string') . '"';
} else {
$mtyp = dblistee('', "SELECT DISTINCT `mtyp`,`mtyp` FROM `prefix_wars` " . (count($wheres) ? $sqla . implode(' AND ', $wheres) : '') . " ORDER BY `mtyp`");
}
$tpl->set_ar_out(array('tid' => $teams, 'game' => $game, 'typ' => $mtyp, 'wlp' => $wlp), 3);
if ($menu->get(1) == 'last') {
$tpl->out(4);
$sqla = 'WHERE status = 3 ' . (!empty($wheres) ? ' AND ' . implode(' AND ', $wheres) : '');
// seiten funktion
$limit = $allgAr['wars_last_limit'];
// Limit
if (isset($_POST['page']) and is_numeric($_POST['page']) and $_POST['page'] >= 1) {
$menu->set_url(2, 'p' . intval($_POST['page']));
}
$page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
$MPL = db_make_sites($page, $sqla, $limit, "?wars-last", 'wars');
$MPL = preg_replace('%-p(\\d+)"%', '$0 onclick="return loadLWPage($1);"', $MPL);
$anfang = ($page - 1) * $limit;
// seiten funktion
$farbe1wlpar = array(1 => 'C8E1B8', 2 => 'D8B9B9', 3 => 'FDFBB7');
$farbe2wlpar = array(1 => '00FF00', 2 => 'FF0000', 3 => 'FFFF00');
$erg = db_query("SELECT a.owp,a.opp,a.wlp,a.land,a.mtyp,a.game,a.id,a.gegner,a.page,b.name as team,DATE_FORMAT(datime,'%d.%m.%Y') as time FROM prefix_wars a left join prefix_groups b ON a.tid = b.id " . $sqla . " ORDER BY a.datime DESC, id DESC LIMIT " . $anfang . "," . $limit);
while ($row = db_fetch_assoc($erg)) {
$row['erg'] = $row['opp'] . ':' . $row['owp'];
$row['farbe'] = $farbe1wlpar[$row['wlp']];
$row['farbe2'] = $farbe2wlpar[$row['wlp']];
if ($class == 'Cmite') {
$class = 'Cnorm';
} else {
$class = 'Cmite';
}
示例6: design
$design = new design($title, $hmenu, 1);
$design->addheader('<link rel="stylesheet" type="text/css" href="include/includes/css/uprofil/uprofil.css">');
$design->addheader('<script type="text/javascript" src="include/includes/js/uprofil.js"></script>');
$design->addheader('<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>');
$design->addheader('<script type="text/javascript" src="include/includes/js/jquery.textareaAutoResize.js"></script>');
$design->addheader('<script type="text/javascript" src="include/includes/js/bbcode.js"></script>');
$design->header();
//Header
include __DIR__ . DIRECTORY_SEPARATOR . 'header.php';
$tpl = new tpl('uprofil/friends.htm');
$FAnzahl = db_count_query('SELECT count(id) FROM prefix_friends WHERE uid = ' . $uid);
$limit = 6;
// Limit
$page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1;
$anfang = ($page - 1) * $limit;
$MPL = db_make_sites($page, 'WHERE uid = ' . $uid, $limit, '?user-friends-' . $uid, 'friends');
$abfF = 'SELECT u.*, f.* FROM prefix_friends f LEFT JOIN prefix_user u ON u.id = f.fid WHERE f.uid = ' . $uid . ' ORDER BY f.id ASC LIMIT ' . $anfang . ',' . $limit;
$ergF = db_query($abfF);
if ($FAnzahl > 0) {
$tpl->out(0);
while ($rowF = db_fetch_assoc($ergF)) {
$rowF['FNAME'] = '<a href="?user-details-' . $rowF['fid'] . '">' . $rowF['name'] . '</a>';
if (file_exists($rowF['avatar'])) {
$rowF['AVATAR'] = '<img src="' . $rowF['avatar'] . '" width="80" height="80" border="0">';
} else {
$rowF['AVATAR'] = '<img src="include/images/userprofil/avatar/nouser.png" width="75" height="75" border="0">';
}
$countFriends = db_count_query('SELECT count(id) FROM prefix_friends WHERE uid = ' . $rowF['fid']);
if ($countFriends == 1) {
$langFriends = 'Freund';
} else {
示例7: db_query
@chmod($bild_url, 0777);
db_query("INSERT INTO prefix_usergallery (uid,name,endung,besch) VALUES (" . $uid . ",'" . $name . "','" . $endung . "','" . $besch . "')");
$bild_thumb = 'include/images/usergallery/img_thumb_' . $id . '.' . $endung;
create_thumb($bild_url, $bild_thumb, $allgAr['gallery_preview_width']);
@chmod($bild_thumb, 0777);
echo '<b>Datei ' . $name . '.' . $endung . ' erfolgreich hochgeladen</b><br />';
$page = $_SERVER["HTTP_HOST"] . dirname($_SERVER["SCRIPT_NAME"]);
echo 'Bildlink: <a target="_blank" href="http://' . $page . '/' . $bild_url . '">http://' . $page . '/' . $bild_url . '</a><br />';
echo 'Oder klein: <a target="_blank" href="http://' . $page . '/' . $bild_thumb . '">http://' . $page . '/' . $bild_thumb . '</a><br /><br />';
}
}
}
// bilder abfragen
$limit = $img_per_site;
$page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1;
$MPL = db_make_sites($page, '', $limit, 'index.php?user-usergallery-' . $uid, "usergallery` WHERE uid = " . $uid);
$anfang = ($page - 1) * $limit;
$erg = db_query("SELECT `name`, `besch`, `endung`, `id` FROM `prefix_usergallery` WHERE `uid` = " . $uid . " ORDER BY `id` DESC LIMIT " . $anfang . "," . $limit);
$tpl->set('imgperline', $allgAr['gallery_imgs_per_line']);
$tpl->set('MPL', $MPL);
$tpl->out(0);
$class = 'Cnorm';
$i = 0;
if (db_num_rows($erg) > 0) {
while ($row = db_fetch_assoc($erg)) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$row['class'] = $class;
$row['besch'] = unescape($row['besch']);
if (loggedin() and (is_siteadmin() or $uid == $_SESSION['authid'])) {
$row['besch'] = '<a href=\'index.php?user-usergallery-' . $uid . '-p' . $page . '-d' . $row['id'] . '\'><img src=\'include/images/icons/del.gif\' border=\'0\' alt=\'löschen\' title=\'löschen\' /></a> ' . $row['besch'];
}
示例8: design
}
}
} else {
echo 'antihack';
}
exit;
}
}
$title = $allgAr['title'] . ' :: Shoutbox ' . $lang['archiv'];
$hmenu = 'Shoutbox ' . $lang['archiv'];
$design = new design($title, $hmenu);
$design->header();
$data = array();
$page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1;
$limit = $allgAr['sb_archive_limit'];
$mpl = db_make_sites($page, '', $limit, 'index.php?shoutbox', 'shoutbox');
$erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC LIMIT ' . ($page - 1) * $limit . ', ' . $limit);
while ($row = db_fetch_assoc($erg)) {
$row['textarea'] = BBCode_onlySmileys($row['textarea'], $allgAr['sb_maxwordlength']);
$time = strtotime($row['time']);
if ($time != 0) {
$dateformat = date('d.m.Y') == date('d.m.Y', $time) ? 'H:i' : 'd.m. - H:i';
$row['time'] = date($dateformat, $time);
} else {
$row['time'] = 0;
}
$data[$row['id']] = $row;
}
require_once 'include/includes/class/iSmarty.php';
$smarty = new iSmarty();
$smarty->assign(array('data' => $data, 'lang' => $lang, 'siteadmin' => is_siteadmin(), 'antihack' => get_antispam('shoutboxarchive', 0, true), 'multipages' => $mpl));
示例9: defined
<?php
defined('main') or die('no direct access');
$uid = intval($menu->get(2));
$limit = 5;
// Limit
$page = $menu->getA(3) == 'p' ? $menu->getE(3) : 1;
$anfang = ($page - 1) * $limit;
$MPL = db_make_sites($page, 'WHERE uid = ' . $uid, $limit, '?user-details-' . $uid, 'usergbook');
$abfGB = 'SELECT * FROM prefix_usergbook WHERE uid = ' . $uid . ' ORDER BY datetime DESC LIMIT ' . $anfang . ',' . $limit;
$ergGB = db_query($abfGB);
$GBAnzahl = db_count_query('SELECT count(uid) FROM prefix_usergbook WHERE uid = ' . $uid);
$tpl = new tpl('uprofil/pinnwand.htm');
if (loggedin()) {
if ($_SESSION['authid'] == $uid) {
$textareaStatus = 'Schreib, was Du gerade machst.';
} else {
$textareaStatus = 'Hinterlasse eine Nachricht.';
}
// gibt die Smilies zurück
function getPinnwadSmilies()
{
global $lang;
$i = 0;
$b = '<script language="JavaScript" type="text/javascript">function moreSmilies () { var x = window.open("about:blank", "moreSmilies", "width=250,height=200,status=no,scrollbars=yes,resizable=yes"); ';
$a = '';
$erg = db_query('SELECT emo, ent, url FROM `prefix_smilies`');
while ($row = db_fetch_object($erg)) {
$b .= 'x.document.write ("<a href=\\"javascript:opener.put(\'' . addslashes(addslashes($row->ent)) . '\')\\">");';
$b .= 'x.document.write ("<img style=\\"border: 0px; padding: 5px;\\" src=\\"include/images/smiles/' . $row->url . '\\" title=\\"' . $row->emo . '\\"></a>");';
if ($i < 15) {
示例10: array
$Frecht = '';
$Fsub = 'Eintragen';
}
$arm = array();
for ($i = 0; $i < 60; $i++) {
$arm[$i] = $i;
}
$ars = array();
for ($i = 0; $i < 24; $i++) {
$ars[$i] = $i;
}
$tpl = new tpl('kalender.htm', 1);
$limit = 30;
// Limit
$page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1;
$MPL = db_make_sites($page, '', $limit, "?kalender", 'kalender');
$anfang = ($page - 1) * $limit;
$aus = array('AKTION' => $Faktion, 'MPL' => $MPL, 'EID' => $Fid, 'TITLE' => $Ftitle, 'TEXT' => $Ftext, 'stunden' => arliste($Fhours, $ars, $tpl, 'stunden'), 'minuten' => arliste($Fmins, $arm, $tpl, 'minuten'), 'zende' => $Fzende, 'begind' => $Fbegind, 'recht' => dbliste($Frecht, $tpl, 'recht', "SELECT id,name FROM prefix_grundrechte ORDER BY id DESC"), 'FSUB' => $Fsub);
$tpl->set_ar_out($aus, 0);
if (!isset($_GET['edit'])) {
$tpl->out(1);
} else {
$tpl->out(2);
}
$tpl->out(3);
unset($aus);
//Liste
$result = db_query('SELECT gid,id,title,time FROM `prefix_kalender` ORDER BY time DESC LIMIT ' . $anfang . ',' . $limit);
while ($row = db_fetch_assoc($result)) {
$aus = array('ID' => $row['id'], 'DATE' => date('d.m.Y', $row['time']), 'TIME' => date('H:i', $row['time']), 'TITLE' => $row['title'], 'GID' => $row['gid']);
$tpl->set_ar_out($aus, 4);
示例11: escape
$q = '';
if (isset($_REQUEST['q'])) {
$q = escape($_REQUEST['q'], 'string');
}
$tpl = new tpl('user/user', 1);
$tpl->set('anzmods', db_result(db_query("SELECT COUNT(*) FROM `prefix_modules` WHERE `fright` = 1"), 0));
$tpl->set('ANTISPAM', get_antispam('adminuser_action', 0, true));
$tpl->set_out('q', unescape($q), 0);
$q = str_replace('*', '%', $q);
if (strpos($q, '%') === false) {
$q = $q . '%';
}
$limit = 15;
// Limit
$page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1;
$MPL = db_make_sites($page, "WHERE `name` LIKE '" . $q . "'", $limit, 'admin.php?user', 'user');
$anfang = ($page - 1) * $limit;
$class = '';
$grundrechte = simpleArrayFromQuery('SELECT `id`,`name` FROM `prefix_grundrechte` ORDER BY `id` ASC');
$users = allRowsFromQuery('SELECT `name`,`recht`,`id` FROM `prefix_user` WHERE `name` LIKE "' . $q . '" ORDER BY `recht`,`posts` DESC LIMIT ' . $anfang . ',' . $limit, 'id');
$userids = array_keys($users);
$modulerights = allRowsFromQuery('SELECT * FROM `prefix_modulerights` WHERE `uid` < 1 OR `uid` IN (' . implode(',', $userids) . ') ORDER BY `uid`');
$modulenames = simpleArrayFromQuery('SELECT `id`, `name` FROM `prefix_modules` WHERE `fright` = 1');
foreach ($users as $row) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$row['class'] = $class;
$row['grouplist'] = user_get_group_list($row['id']);
$row['modslist'] = user_get_mod_list($row['id'], $row['recht'], $modulenames, $modulerights);
if (strlen($row['modslist']) > 90) {
$row['modslist'] = substr($row['modslist'], 0, 87) . '...';
}
示例12: escape
$tpl->set_ar_out($outar, 1);
$design->footer();
}
break;
default:
// Gegnerliste ausgeben
$limit = 15;
$page = $menu->getA(1) == 'p' ? $menu->getE(1) : 1;
$anfang = ($page - 1) * $limit;
if (isset($_POST['submit'])) {
$suchstr = escape($_POST['suche'], 'string');
$WHERE = "WHERE name LIKE '%" . $suchstr . "%' OR tag LIKE '%" . $suchstr . "%'";
} else {
$WHERE = '';
}
$outar['siteindex'] = db_make_sites($page, $WHERE, $limit, 'admin.php?opponents', 'opponents');
$listqry = db_query("SELECT * FROM `prefix_opponents` " . $WHERE . " ORDER BY name LIMIT " . $anfang . ", " . $limit . " ");
while ($listrow = db_fetch_assoc($listqry)) {
$outar['gegnerliste'] .= '
<tr>
<td><img src="include/images/opponents/thumb_' . $listrow['logo'] . '" /></td>
<td><a href="admin.php?opponents-edit-' . $listrow['id'] . '"><img src="include/images/icons/edit.png" onClick="openEditOpp();"/></a>
<img src="include/images/icons/del.png" style="cursor: pointer; cursor: hand;" onClick="openloschfrage(' . $listrow['id'] . ')"/></td>
<td><b>' . $listrow['name'] . '</b></td>
<td>' . $listrow['tag'] . '</td>
<td><a href="' . $listrow['page'] . '" target="_blank">' . $listrow['page'] . '</a></td>
<td><img src="http://status.icq.com/online.gif?icq=' . $listrow['icq'] . '&img=5" />' . $listrow['icq'] . '</td>
</tr>
';
}
$outar['ANTISPAM'] = get_antispam('adminuser_action', 0, true);
示例13: db_query
$tpl->set_ar_out($_ilch, 0);
$page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
$class = '';
if ($page == 1) {
$abf = "SELECT `id`,`gegner`,`game` FROM `prefix_wars` WHERE `status` = 1 ORDER BY `id` DESC";
$erg = db_query($abf);
while ($r = db_fetch_assoc($erg)) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$r['class'] = $class;
$r['game'] = get_wargameimg($r['game']);
$tpl->set_ar($r);
$tpl->out(1);
}
}
$limit = 20;
$MPL = db_make_sites($page, 'WHERE status = 2', $limit, 'admin.php?wars-next', 'wars');
$anfang = ($page - 1) * $limit;
$abf = "SELECT `id`,`gegner`,`game` FROM `prefix_wars` WHERE `status` = 2 ORDER BY `id` DESC LIMIT " . $anfang . "," . $limit;
$erg = db_query($abf);
while ($row = db_fetch_assoc($erg)) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$row['class'] = $class;
$row['game'] = get_wargameimg($row['game']);
$tpl->set_ar($row);
$tpl->out(2);
}
$tpl->set('MPL', $MPL);
$tpl->out(3);
$design->footer();
break;
case 'info':
示例14: db_query
$tpl->set('msgColor', '#FF0000');
$tpl->set('Message', 'Badword existiert schon in der Datenbank!');
} else {
db_query("INSERT INTO\r\n\t\t\t\t\t\t\tprefix_bbcode_badword\r\n\t\t\t\t\t\t\t\t(fcBadPatter,fcBadReplace)\r\n\t\t\t\t\t\t\tVALUES\r\n\t\t\t\t\t\t\t\t('" . $_POST['BBCode_BadPatter'] . "','" . $_POST['BBCode_BadReplace'] . "');");
$tpl->set('msgColor', '#0033FF');
$tpl->set('Message', 'Badword wurde erfolgreich gespeichert!');
}
}
// > Badword Löschen!
if ($menu->get(2) == "delete") {
db_query('DELETE FROM `prefix_bbcode_badword` WHERE `fnBadwordNr` = "' . $menu->get(3) . '"');
}
// > Ausgabe der Liste!
$limit = 15;
$page = $menu->getA(2) == 'p' ? $menu->getE(2) : 1;
$MPL = db_make_sites($page, '', $limit, "admin.php?bbcode-badword", 'bbcode_badword');
$anfang = ($page - 1) * $limit;
// > Seitenzahlen ausgeben!
$tpl->set_ar_out(array('MPL' => $MPL), 0);
unset($sql);
$sql = db_query("SELECT\r\n\t\t\t\t\t\t\t`fnBadwordNr`,\r\n\t\t\t\t\t\t\t`fcBadPatter`,\r\n\t\t\t\t\t\t\t`fcBadReplace`\r\n\t\t\t\t\t\t FROM\r\n\t\t\t\t\t\t\t `prefix_bbcode_badword`\r\n\t\t\t\t\t\t ORDER BY\r\n\t\t\t\t\t\t \t`fnBadwordNr` DESC\r\n\t\t\t\t\t\t LIMIT " . $anfang . "," . $limit);
$class = '';
while ($row = db_fetch_object($sql)) {
$class = $class == 'Cmite' ? 'Cnorm' : 'Cmite';
$tpl->set_ar_out(array('dbId' => $row->fnBadwordNr, 'CLASS' => $class, 'dbBadword' => $row->fcBadPatter, 'dbReplace' => $row->fcBadReplace), 1);
}
// > Seitenzahlen ausgeben!
$tpl->set_ar_out(array('MPL' => $MPL), 2);
break;
}
if (!isset($design)) {
示例15: bbcode
$r1['zahl'] = $anz - $i;
$r1['text'] = bbcode($r1['text']);
if (has_right(-7, 'gbook')) {
$r1['text'] .= '<a href="index.php?gbook-show-' . $id . '-d' . $r1['id'] . '"><img src="include/images/icons/del.gif" alt="' . $lang['delete'] . '" border="0" title="' . $lang['delete'] . '" /></a>';
}
$tpl->set_ar_out($r1, 5);
$i++;
}
$tpl->out(6);
}
break;
default:
$limit = $allgAr['gbook_posts_per_site'];
// Limit
$page = $menu->getA(1) == 'p' ? escape($menu->getE(1), 'integer') : 1;
$MPL = db_make_sites($page, "", $limit, "?gbook", 'gbook');
$anfang = ($page - 1) * $limit;
$tpl = new tpl('gbook.htm');
$ei1 = @db_query("SELECT COUNT(ID) FROM prefix_gbook");
$ein = @db_result($ei1, 0);
$ar = array('EINTRAGE' => $ein);
$tpl->set_ar_out($ar, 0);
$erg = db_query("SELECT * FROM prefix_gbook ORDER BY time DESC LIMIT " . $anfang . "," . $limit) or die(db_error());
while ($row = db_fetch_object($erg)) {
$page = '';
$mail = '';
if ($row->page) {
$row->page = get_homepage($row->page);
$page = ' <a href="' . $row->page . '" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage ' . $lang['from'] . ' ' . $row->name . '"></a>';
}
if ($row->mail) {