当前位置: 首页>>代码示例>>PHP>>正文


PHP getlimit函数代码示例

本文整理汇总了PHP中getlimit函数的典型用法代码示例。如果您正苦于以下问题:PHP getlimit函数的具体用法?PHP getlimit怎么用?PHP getlimit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getlimit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 function show()
 {
     global $set, $db, $apx, $html;
     quicklink('contact.add');
     $orderdef[0] = 'title';
     $orderdef['title'] = array('title', 'ASC', 'COL_TITLE');
     $orderdef['email'] = array('email', 'ASC', 'COL_EMAIL');
     $col[] = array('ID', 3, 'align="center"');
     $col[] = array('COL_TITLE', 50, 'class="title"');
     $col[] = array('COL_EMAIL', 47, '');
     list($count) = $db->first("SELECT count(id) FROM " . PRE . "_contact");
     pages('action.php?action=contact.show&sortby=' . $_REQUEST['sortby'], $count);
     $data = $db->fetch("SELECT id,title,email FROM " . PRE . "_contact " . getorder($orderdef) . getlimit());
     if (count($data)) {
         foreach ($data as $res) {
             ++$i;
             $tabledata[$i]['COL1'] = $res['id'];
             $tabledata[$i]['COL2'] = replace($res['title']);
             $tabledata[$i]['COL3'] = replace($res['email']);
             //Optionen
             if ($apx->user->has_right('contact.edit')) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'contact.edit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             }
             if ($apx->user->has_right('contact.del')) {
                 $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'contact.del', 'id=' . $res['id'], $apx->lang->get('CORE_DEL'));
             }
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     $html->table($col);
     orderstr($orderdef, 'action.php?action=contact.show');
     save_index($_SERVER['REQUEST_URI']);
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:33,代码来源:admin.php

示例2: headline

<?php

$apx->lang->drop('friends');
headline($apx->lang->get('HEADLINE_FRIENDS'), str_replace('&', '&amp;', $_SERVER['REQUEST_URI']));
titlebar($apx->lang->get('HEADLINE_FRIENDS'));
//Seitenzahlen
list($count) = $db->first("SELECT count(userid) FROM " . PRE . "_user WHERE ( active='1' " . $where . " )");
$pagelink = mklink('user.php?action=list&amp;sortby=' . $_REQUEST['sortby'] . '&amp;letter=' . $_REQUEST['letter'], 'user,list,' . $_REQUEST['letter'] . ',{P}.html' . iif($_REQUEST['sortby'], '?sortby=' . $_REQUEST['sortby']));
pages($pagelink, $count, $set['user']['friendsepp']);
//Buddyliste
$userdata = array();
$buddies = $user->get_buddies();
if (count($buddies)) {
    $data = $db->fetch("SELECT userid,username,groupid,realname,gender,city,plz,country,city,lastactive,pub_invisible,avatar,avatar_title,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10 FROM " . PRE . "_user WHERE userid IN (" . implode(',', $buddies) . ") ORDER BY username ASC" . getlimit($set['user']['friendsepp']));
    if (count($data)) {
        foreach ($data as $res) {
            ++$i;
            $userdata[$i]['ID'] = $res['userid'];
            $userdata[$i]['USERID'] = $res['userid'];
            $userdata[$i]['USERNAME'] = replace($res['username']);
            $userdata[$i]['GROUPID'] = $res['groupid'];
            $userdata[$i]['ONLINE'] = iif(!$res['pub_invisible'] && $res['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0);
            $userdata[$i]['REALNAME'] = replace($res['realname']);
            $userdata[$i]['GENDER'] = $res['gender'];
            $userdata[$i]['CITY'] = replace($res['city']);
            $userdata[$i]['PLZ'] = replace($res['plz']);
            $userdata[$i]['COUNTRY'] = $res['country'];
            $userdata[$i]['LASTACTIVE'] = $res['lastactive'];
            $userdata[$i]['AVATAR'] = $user->mkavatar($res);
            $userdata[$i]['AVATAR_TITLE'] = $user->mkavtitle($res);
            //Custom-Felder
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:friends.php

示例3: gallery_pics

 function gallery_pics()
 {
     global $set, $apx, $db, $html;
     $_REQUEST['userid'] = (int) $_REQUEST['userid'];
     $_REQUEST['galid'] = (int) $_REQUEST['galid'];
     if (!$_REQUEST['galid']) {
         die('missing GALID!');
     }
     //AKTIONEN
     if ($_REQUEST['do2'] == 'edit') {
         return $this->gallery_pics_edit();
     } elseif ($_REQUEST['do2'] == 'del') {
         return $this->gallery_pics_del();
     }
     $orderdef[0] = 'time';
     $orderdef['time'] = array('id', 'DESC', 'COL_ADDTIME');
     $orderdef['caption'] = array('caption', 'ASC', 'COL_CAPTION');
     $col[] = array('COL_THUMBNAIL', 20, 'align="center"');
     $col[] = array('COL_CAPTION', 80, '');
     list($id, $title) = $db->first("SELECT id,title FROM " . PRE . "_user_gallery WHERE id='" . $_REQUEST['galid'] . "' LIMIT 1");
     if (!$id) {
         return;
     }
     echo '<h2>' . $apx->lang->get('GALLERY') . ': ' . $title . '</h2>';
     list($count) = $db->first("SELECT count(id) FROM " . PRE . "_user_pictures WHERE galid='" . $_REQUEST['galid'] . "'");
     pages('action.php?action=user.gallery&amp;userid=' . $_REQUEST['userid'] . '&amp;do=pics&amp;galid=' . $_REQUEST['galid'] . '&amp;sortby=' . $_REQUEST['sortby'], $count);
     //Bilder auslesen
     $data = $db->fetch("SELECT * FROM " . PRE . "_user_pictures WHERE galid='" . $_REQUEST['galid'] . "' " . getorder($orderdef) . getlimit());
     if (count($data)) {
         foreach ($data as $res) {
             ++$i;
             $caption = shorttext(strip_tags($res['caption']), 50);
             $tabledata[$i]['COL1'] = '<a href="../' . getpath('uploads') . $res['picture'] . '" target="_blank"><img src="../' . getpath('uploads') . $res['thumbnail'] . '" alt="thumbnail" /></a>';
             $tabledata[$i]['COL2'] = iif($caption, $caption, '&nbsp;');
             $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('edit.gif', 'user.gallery', 'userid=' . $_REQUEST['userid'] . '&do=pics&galid=' . $_REQUEST['galid'] . '&do2=edit&id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'user.gallery', 'userid=' . $_REQUEST['userid'] . '&do=pics&galid=' . $_REQUEST['galid'] . '&do2=del&id=' . $res['id'], $apx->lang->get('CORE_DEL'));
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     $html->table($col);
     orderstr($orderdef, 'action.php?action=user.gallery&amp;userid=' . $_REQUEST['userid'] . '&amp;do=pics&amp;galid=' . $_REQUEST['galid']);
     save_index($_SERVER['REQUEST_URI']);
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:43,代码来源:admin.php

示例4: IN

             if ($picids) {
                 $wherearr[] = 'p.picid IN (' . $picids . ')';
             }
             $albumids = getdotstring($_POST['network'][$key]['albumid'], 'int');
             if ($albumids) {
                 $wherearr[] = 'p.albumid IN (' . $albumids . ')';
             }
             $uids = getdotstring($_POST['network'][$key]['uid'], 'int');
             if ($uids) {
                 $wherearr[] = 'p.uid IN (' . $uids . ')';
             }
             if ($wherearr) {
                 $sql['where'] = 'WHERE ' . implode(' AND ', $wherearr);
             }
             $sql['order'] = 'ORDER BY p.dateline DESC';
             $sql['limit'] = getlimit($_POST['network'][$key]['start'], $_POST['network'][$key]['limit']);
             break;
     }
     $sqlstring = implode(' ', $sql);
     $_POST['network'][$key]['sql'] = $sqlstring;
     $network[$key] = $_POST['network'][$key];
 } else {
     $network[$key] = array();
     $network[$key]['usedefault'] = 1;
 }
 foreach (array('space', 'doing', 'blog', 'album', 'share', 'mtag', 'slide', 'blogfrom') as $val) {
     $sql = '';
     $sql = $val != 'blogfrom' ? trim($network[$val]['sql']) : $network[$val];
     $networkcache[$val] = empty($sql) ? '' : $sql;
 }
 include_once S_ROOT . './source/function_cache.php';
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:admincp_network.php

示例5: elseif

} elseif ($_REQUEST['do'] == 'del') {
    $_REQUEST['id'] = (int) $_REQUEST['id'];
    if (!$_REQUEST['id']) {
        die('missing ID!');
    }
    if ($_POST['send']) {
        $db->query("DELETE FROM " . PRE . "_user_blog WHERE id='" . $_REQUEST['id'] . "' AND userid='" . $user->info['userid'] . "' LIMIT 1");
        message($apx->lang->get('MSG_DEL_OK'), mklink('user.php?action=myblog', 'user,myblog.html'));
    } else {
        tmessage('delblog', array('ID' => $_REQUEST['id']));
    }
    require 'lib/_end.php';
}
//ÜBERSICHT
list($count) = $db->first("SELECT count(id) FROM " . PRE . "_user_blog WHERE userid='" . $user->info['userid'] . "'");
pages(mklink('user.php?action=myblog', 'user,myblog.html'), $count, 20);
//Einträge auslesen
$data = $db->fetch("SELECT id,title,time FROM " . PRE . "_user_blog WHERE userid='" . $user->info['userid'] . "' ORDER BY time DESC" . getlimit(20));
if (count($data)) {
    foreach ($data as $res) {
        ++$i;
        $tabledata[$i]['ID'] = $res['id'];
        $tabledata[$i]['TITLE'] = replace($res['title']);
        $tabledata[$i]['TIME'] = $res['time'];
        $tabledata[$i]['LINK_EDIT'] = mklink('user.php?action=myblog&amp;do=edit&amp;id=' . $res['id'], 'user,myblog.html?do=edit&amp;id=' . $res['id']);
        $tabledata[$i]['LINK_DEL'] = mklink('user.php?action=myblog&amp;do=del&amp;id=' . $res['id'], 'user,myblog.html?do=del&amp;id=' . $res['id']);
    }
}
$apx->tmpl->assign('ENTRY', $tabledata);
$apx->tmpl->assign('LINK_NEW', mklink('user.php?action=myblog&amp;do=add', 'user,myblog.html?do=add'));
$apx->tmpl->parse('myblog');
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:myblog.php

示例6: display

 function display()
 {
     global $db, $apx, $user, $set;
     $apx->lang->drop('comments', 'comments');
     $page = $this->getpage(array('p'));
     //Seitenzahlen
     list($count) = $db->first("SELECT count(id) FROM " . PRE . "_comments WHERE ( module='" . addslashes($this->module) . "' AND mid='" . $this->mid . "' AND active='1' )");
     pages($page, $count, $this->set['epp'], 'comp', 'COMMENT');
     //Sortierreihenfolge
     if ($this->set['order'] == 1) {
         $order = "a.time ASC";
     } else {
         $order = "a.time DESC";
     }
     //Kommentare auslesen
     $data = $db->fetch("SELECT a.* FROM " . PRE . "_comments AS a WHERE ( module='" . addslashes($this->module) . "' AND a.mid='" . $this->mid . "' AND a.active='1' ) ORDER BY " . $order . " " . getlimit($this->set['epp'], 'comp'));
     if (!count($data)) {
         return;
     }
     //Nummerierungs-Anfang
     if ($this->set['epp']) {
         if ($this->set['order'] == 0) {
             $entrynumber = $count - ($_REQUEST['comp'] - 1) * $this->set['epp'];
         } else {
             $entrynumber = 1 + ($_REQUEST['comp'] - 1) * $this->set['epp'];
         }
     } else {
         if ($this->set['order'] == 0) {
             $entrynumber = $count;
         } else {
             $entrynumber = 1;
         }
     }
     foreach ($data as $res) {
         ++$i;
         if ($res['userid'] && !isset($userinfo[$res['userid']])) {
             $userinfo[$res['userid']] = $user->get_info($res['userid'], 'username,email,pub_hidemail,homepage,avatar,avatar_title,signature,lastactive,pub_invisible,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10');
         }
         if ($res['userid'] && $userinfo[$res['userid']]) {
             $tabledata[$i]['USERID'] = $res['userid'];
             $tabledata[$i]['NAME'] = replace($userinfo[$res['userid']]['username']);
             $tabledata[$i]['EMAIL'] = replace(iif(!$userinfo[$res['userid']]['pub_hidemail'], $userinfo[$res['userid']]['email']));
             $tabledata[$i]['EMAIL_ENCRYPTED'] = replace(iif(!$userinfo[$res['userid']]['pub_hidemail'], cryptMail($userinfo[$res['userid']]['email'])));
             $tabledata[$i]['HOMEPAGE'] = replace($userinfo[$res['userid']]['homepage']);
             $tabledata[$i]['AVATAR'] = $user->mkavatar($userinfo[$res['userid']]);
             $tabledata[$i]['AVATAR_TITLE'] = $user->mkavtitle($userinfo[$res['userid']]);
             $tabledata[$i]['SIGNATURE'] = $user->mksig($userinfo[$res['userid']]);
             $tabledata[$i]['ONLINE'] = iif(!$userinfo[$res['userid']]['pub_invisible'] && $userinfo[$res['userid']]['lastactive'] + $set['user']['timeout'] * 60 >= time(), 1, 0);
             $tabledata[$i]['ISONLINE'] = $tabledata[$i]['ONLINE'];
             //Custom-Felder
             for ($ii = 1; $ii <= 10; $ii++) {
                 $tabledata[$i]['CUSTOM' . $ii . '_NAME'] = $set['user']['cusfield_names'][$ii - 1];
                 $tabledata[$i]['CUSTOM' . $ii] = compatible_hsc($userinfo[$res['userid']]['custom' . $ii]);
             }
         } else {
             $tabledata[$i]['NAME'] = replace($res['username']);
             $tabledata[$i]['EMAIL'] = replace($res['email']);
             $tabledata[$i]['EMAIL_ENCRYPTED'] = replace(cryptMail($res['email']));
             $tabledata[$i]['HOMEPAGE'] = replace($res['homepage']);
         }
         //Text
         $text = $res['text'];
         if ($this->set['badwords']) {
             $text = badwords($text);
         }
         $text = replace($text, 1);
         if ($this->set['breakline']) {
             $text = wordwrapHTML($text, $this->set['breakline'], "\n");
         }
         if ($this->set['allowsmilies']) {
             $text = dbsmilies($text);
         }
         if ($this->set['allowcode']) {
             $text = dbcodes($text);
         }
         //Titel
         $title = $res['title'];
         if ($this->set['breakline']) {
             $title = wordwrap($title, $this->set['breakline'], "\n", 1);
         }
         if ($this->set['badwords']) {
             $title = badwords($title);
         }
         $title = replace($title);
         $tabledata[$i]['TEXT'] = $text;
         $tabledata[$i]['TITLE'] = $title;
         $tabledata[$i]['TIME'] = $res['time'];
         $tabledata[$i]['NUMBER'] = $entrynumber;
         //Admin-Links
         if ($_COOKIE[$set['main']['cookie_pre'] . '_admin_userid'] && $_COOKIE[$set['main']['cookie_pre'] . '_admin_password']) {
             $tabledata[$i]['EDITLINK'] = HTTPDIR . 'admin/action.php?action=comments.edit&amp;module=' . $this->module . '&amp;mid=' . $this->mid . '&amp;id=' . $res['id'] . '&amp;outer=1';
             $tabledata[$i]['DELETELINK'] = HTTPDIR . 'admin/action.php?action=comments.del&amp;module=' . $this->module . '&amp;mid=' . $this->mid . '&amp;id=' . $res['id'] . '&amp;outer=1';
         }
         //Melden
         $link_report = "javascript:popupwin('misc.php?action=comments_report&amp;id=" . $res['id'] . "&amp;url='+escape(window.location.href),500,300);";
         $tabledata[$i]['REPORTLINK'] = $link_report;
         //Kommentarnummer
         if ($this->set['order'] == 0) {
             --$entrynumber;
         } else {
//.........这里部分代码省略.........
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:101,代码来源:class.comments.php

示例7: RecursiveTree

//Galerie sortieren nach
if ($set['gallery']['subgals']) {
    require_once BASEDIR . 'lib/class.recursivetree.php';
    $tree = new RecursiveTree(PRE . '_gallery', 'id');
    $data = $tree->getLevel(array('*'), 0, "'" . time() . "' BETWEEN starttime AND endtime " . section_filter(true, 'secid'));
} else {
    if ($_REQUEST['letter']) {
        $orderby = 'title ASC';
    } elseif ($set['gallery']['ordergal'] == 2) {
        $orderby = 'title ASC';
    } elseif ($set['gallery']['ordergal'] == 3) {
        $orderby = 'lft ASC';
    } else {
        $orderby = 'starttime DESC';
    }
    $data = $db->fetch("SELECT *,1 AS level FROM " . PRE . "_gallery WHERE ( '" . time() . "' BETWEEN starttime AND endtime " . $where . " " . section_filter() . " ) ORDER BY " . $orderby . " " . iif($set['gallery']['listepp'], getlimit($set['gallery']['listepp'])));
}
//Galerien auslesen, die veröffentlicht sind
if ($set['gallery']['subgals']) {
    $openData = $db->fetch("SELECT id FROM " . PRE . "_gallery WHERE '" . time() . "' BETWEEN starttime AND endtime");
    $openIds = get_ids($openData);
}
//Galerien auflisten
if (count($data)) {
    foreach ($data as $res) {
        ++$i;
        if ($set['gallery']['subgals']) {
            $subtreeIds = array_merge($res['children'], array($res['id']));
            $subtreeIds = array_intersect($subtreeIds, $openIds);
        } else {
            $subtreeIds = array($res['id']);
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:gallery.php

示例8: substr

 $parse = $apx->tmpl->used_vars('archive_index');
 //Headline
 $month = substr($_REQUEST['month'], 0, 2);
 $year = substr($_REQUEST['month'], 2);
 headline(getcalmonth($month) . ' ' . $year, mklink('articlearchive.php?month=' . $month . $year, 'articlearchive,' . $month . ',' . $year . ',1.html'));
 titlebar($apx->lang->get('HEADLINE_ARCHIVE') . ': ' . getcalmonth($month) . ' ' . $year);
 //Seitenzahlen generieren
 list($count) = $db->first("SELECT count(id) FROM " . PRE . "_articles WHERE ( ( ( " . time() . " BETWEEN starttime AND endtime ) AND starttime BETWEEN '" . (mktime(0, 0, 0, intval($month), 1, intval($year)) + TIMEDIFF) . "' AND '" . (mktime(0, 0, 0, intval($month + 1), 1, intval($year)) - 1 + TIMEDIFF) . "' ) " . $filter . " " . section_filter() . " )");
 pages(mklink('articlearchive.php?month=' . $_REQUEST['month'], 'articlearchive,' . $month . ',' . $year . ',{P}.html'), $count, $set['articles']['archiveepp']);
 //Artikel ausgeben
 if ($set['articles']['archiveentrysort'] == 1) {
     $orderby = ' starttime DESC ';
 } else {
     $orderby = ' starttime ASC';
 }
 $data = $db->fetch("SELECT a.*,b.userid,b.username,b.email,b.pub_hidemail FROM " . PRE . "_articles AS a LEFT JOIN " . PRE . "_user AS b USING(userid) WHERE ( ( ( " . time() . " BETWEEN starttime AND endtime ) AND starttime BETWEEN '" . (mktime(0, 0, 0, intval($month), 1, intval($year)) + TIMEDIFF) . "' AND '" . (mktime(0, 0, 0, intval($month + 1), 1, intval($year)) - 1 + TIMEDIFF) . "' ) " . $filter . " " . section_filter() . " ) ORDER BY " . $orderby . " " . getlimit($set['articles']['archiveepp']));
 $data = articles_extend_data($data, $parse);
 //Datensatz erweitern durch Preview/Review-Daten
 //Kategorien auslesen
 if (in_array('ARTICLE.CATTITLE', $parse) || in_array('ARTICLE.CATICON', $parse) || in_array('ARTICLE.CATLINK', $parse)) {
     $catinfo = articles_catinfo(get_ids($data, 'catid'));
 }
 if (count($data)) {
     foreach ($data as $res) {
         ++$i;
         //Wohin soll verlinkt werden?
         if ($res['type'] == 'normal') {
             $link2file = 'articles';
         } else {
             $link2file = $res['type'] . 's';
         }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:articlearchive.php

示例9: REGEXP

         $letterfilter = " AND title NOT REGEXP(\"^[a-zA-Z]\")";
     } else {
         $letterfilter = " AND title LIKE '" . $_REQUEST['letter'] . "%'";
     }
 }
 //Kategorie-Info auslesen
 $catinfo = $db->first("SELECT * FROM " . PRE . "_glossar_cat WHERE id='" . $_REQUEST['catid'] . "' LIMIT 1");
 $catlink = mklink('glossar.php?catid=' . $catinfo['id'], 'glossar,' . $catinfo['id'] . ',0,1' . urlformat($catinfo['title']) . '.html');
 //Headline
 headline($catinfo['title'], $catlink);
 titlebar($apx->lang->get('HEADLINE') . ': ' . $catinfo['title']);
 //Seitenzahlen
 list($count) = $db->first("SELECT count(id) FROM " . PRE . "_glossar WHERE ( catid='" . $_REQUEST['catid'] . "' AND starttime!=0 " . $letterfilter . " )");
 pages(mklink('glossar.php?catid=' . $catinfo['id'] . '&amp;letter=' . $_REQUEST['letter'], 'glossar,' . $catinfo['id'] . ',' . $_REQUEST['letter'] . ',{P}' . urlformat($catinfo['title']) . '.html'), $count, $set['glossar']['epp']);
 //Begriffe auslesen
 $data = $db->fetch("SELECT * FROM " . PRE . "_glossar WHERE ( catid='" . $_REQUEST['catid'] . "' AND starttime!=0 " . $letterfilter . " ) ORDER BY title ASC " . getlimit($set['glossar']['epp']));
 $index = array();
 if (count($data)) {
     //Nach Buchstaben sortieren
     $letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ#';
     for ($i = 0; $i < strlen($letters); $i++) {
         $index[$letters[$i]] = array();
     }
     foreach ($data as $res) {
         $letter = glossar_letter($res['title']);
         $index[$letter][] = $res;
     }
     //Index erstellen
     foreach ($index as $letter => $data) {
         //Link: Nur Begriffe mit diesem Buchstaben
         $letterlink = mklink('glossar.php?catid=' . $_REQUEST['catid'] . '&amp;letter=' . iif($letter == '#', 'spchar', strtolower($letter)), 'glossar,' . $_REQUEST['catid'] . ',' . iif($letter == '#', 'spchar', strtolower($letter)) . ',1' . urlformat($catinfo['title']) . '.html');
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:glossar.php

示例10: getmodulepath

 $apx->tmpl->assign('TITLE', $gallery['title']);
 $apx->tmpl->assign('DESCRIPTION', $gallery['description']);
 $apx->tmpl->assign('TIME', $gallery['time']);
 $apx->tmpl->assign('LASTUPDATE', $gallery['lastupdate']);
 $apx->tmpl->assign('COUNT', $images);
 //Kommentare
 if ($apx->is_module('comments') && $gallery['allowcoms']) {
     require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
     $coms = new comments('usergallery', $gallery['id']);
     $coms->assign_comments($parse);
 }
 //Seitenzahlen
 list($count) = $db->first("SELECT count(id) FROM " . PRE . "_user_pictures WHERE galid='" . $galid . "'");
 pages(mklink('user.php?action=gallery&amp;id=' . $_REQUEST['id'] . '&amp;galid=' . $galid, 'user,gallery,' . $_REQUEST['id'] . ',' . $galid . ',{P}.html'), $count, $set['user']['gallery_epp']);
 //Einträge auslesen
 $data = $db->fetch("SELECT * FROM " . PRE . "_user_pictures WHERE galid='" . $galid . "' ORDER BY addtime DESC" . getlimit($set['user']['gallery_epp']));
 if (count($data)) {
     foreach ($data as $res) {
         ++$i;
         $size = getimagesize(BASEDIR . getpath('uploads') . $res['picture']);
         $tabledata[$i]['ID'] = $res['id'];
         $tabledata[$i]['IMAGE'] = HTTPDIR . getpath('uploads') . $res['thumbnail'];
         $tabledata[$i]['FULLSIZE'] = HTTPDIR . getpath('uploads') . $res['picture'];
         $tabledata[$i]['LINK'] = "javascript:popuppic('misc.php?action=picture&amp;pic=" . $res['picture'] . "','" . $size[0] . "','" . $size[1] . "');";
         $tabledata[$i]['CAPTION'] = replace($res['caption']);
     }
 }
 //Verstoß melden
 $link_report = "javascript:popupwin('user.php?action=report&amp;contentid=gallery:" . $_REQUEST['galid'] . "',500,300);";
 $apx->tmpl->assign('LINK_REPORT', $link_report);
 $apx->tmpl->assign('PICTURE', $tabledata);
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:gallery.php

示例11: catshow

 function catshow()
 {
     global $set, $db, $apx, $html;
     quicklink('glossar.catadd');
     $col[] = array('ID', 3, 'align="center"');
     $col[] = array('COL_CATNAME', 72, 'class="title"');
     $col[] = array('COL_ENTRIES', 25, 'align="center"');
     $orderdef[0] = 'title';
     $orderdef['title'] = array('title', 'ASC', 'COL_CATNAME');
     list($count) = $db->first("SELECT count(id) FROM " . PRE . "_glossar_cat");
     pages('action.php?action=glossar.catshow', $count);
     $data = $db->fetch("SELECT * FROM " . PRE . "_glossar_cat " . getorder($orderdef) . getlimit());
     if (count($data)) {
         //Ausgabe erfolgt
         foreach ($data as $res) {
             ++$i;
             list($entries) = $db->first("SELECT count(id) FROM " . PRE . "_glossar WHERE catid='" . $res['id'] . "'");
             $tabledata[$i]['COL1'] = $res['id'];
             $tabledata[$i]['COL2'] = $space[$res['id']] . ' ' . replace($res['title']);
             $tabledata[$i]['COL3'] = $entries;
             //Optionen
             if ($apx->user->has_right('glossar.catedit')) {
                 $tabledata[$i]['OPTIONS'] .= optionHTML('edit.gif', 'glossar.catedit', 'id=' . $res['id'], $apx->lang->get('CORE_EDIT'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             if ($apx->user->has_right('glossar.catdel') && !$entries && !$res['children']) {
                 $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('del.gif', 'glossar.catdel', 'id=' . $res['id'], $apx->lang->get('CORE_DEL'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             if ($apx->user->has_right('glossar.catclean') && $entries) {
                 $tabledata[$i]['OPTIONS'] .= optionHTMLOverlay('clean.gif', 'glossar.catclean', 'id=' . $res['id'], $apx->lang->get('CLEAN'));
             } else {
                 $tabledata[$i]['OPTIONS'] .= '<img src="design/ispace.gif" alt="" />';
             }
             unset($entries);
         }
     }
     $apx->tmpl->assign('TABLE', $tabledata);
     $html->table($col);
     orderstr($orderdef, 'action.php?action=glossar.catshow');
     save_index($_SERVER['REQUEST_URI']);
 }
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:44,代码来源:admin.php

示例12: list

//Seitenzahlen
list($count) = $db->first("SELECT count(userid) FROM " . PRE . "_user WHERE ( active='1' " . $where . " )");
$pagelink = mklink('user.php?action=list&amp;sortby=' . $_REQUEST['sortby'] . '&amp;letter=' . $_REQUEST['letter'], 'user,list,' . $_REQUEST['letter'] . ',{P}.html' . iif($_REQUEST['sortby'], '?sortby=' . $_REQUEST['sortby']));
pages($pagelink, $count, $set['user']['userlistepp']);
//Orderby
$orderdef[0] = 'username';
$orderdef['regdate'] = array('reg_time', 'DESC');
$orderdef['username'] = array('username', 'ASC');
if ($apx->is_module('forum')) {
    $orderdef['forumposts'] = array('forum_posts', 'DESC');
}
$fields = 'userid,username,email,groupid,reg_time,realname,gender,city,plz,country,city,lastactive,pub_invisible,avatar,avatar_title,birthday,pub_hidemail,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10';
if ($apx->is_module('forum')) {
    $fields .= ',forum_posts';
}
$data = $db->fetch("SELECT " . $fields . " FROM " . PRE . "_user WHERE ( active='1' " . $where . " ) " . getorder($orderdef) . " " . getlimit($set['user']['userlistepp']));
if (count($data)) {
    foreach ($data as $res) {
        ++$i;
        $age = 0;
        if ($res['birthday']) {
            $bd = explode('-', $res['birthday']);
            $birthday = intval($bd[0]) . '. ' . getcalmonth($bd[1]) . iif($bd[2], ' ' . $bd[2]);
            if ($bd[2]) {
                $age = date('Y') - $bd[2];
                if (intval(sprintf('%02d%02d', $bd[1], $bd[0])) > intval(date('md'))) {
                    $age -= 1;
                }
            }
        }
        $tabledata[$i]['ID'] = $res['userid'];
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:list.php

示例13: list

            list($sendmail, $email) = $db->first("SELECT pub_gbmail,email FROM " . PRE . "_user WHERE userid='" . $_REQUEST['id'] . "' LIMIT 1");
            if ($sendmail) {
                $input = array('URL' => HTTP, 'USERNAME' => $user->info['username'], 'GOTO' => HTTP_HOST . mklink('user.php?action=guestbook&id=' . $_REQUEST['id'], 'user,guestbook,' . $_REQUEST['id'] . ',1.html'));
                sendmail($email, 'SENDENTRY', $input);
            }
        }
        //Weiterleitung
        message($apx->lang->get('MSG_OK'), mklink('user.php?action=guestbook&amp;id=' . $_REQUEST['id'], 'user,guestbook,' . $_REQUEST['id'] . ',1.html'));
    }
} else {
    //Seitenzahlen
    list($count) = $db->first("SELECT count(id) FROM " . PRE . "_user_guestbook WHERE owner='" . $_REQUEST['id'] . "'");
    pages(mklink('user.php?action=guestbook&amp;id=' . $_REQUEST['id'], 'user,guestbook,' . $_REQUEST['id'] . ',{P}.html'), $count, $set['user']['guestbook_epp']);
    //Einträge auslesen
    $tabledata = array();
    $data = $db->fetch("SELECT * FROM " . PRE . "_user_guestbook WHERE owner='" . $_REQUEST['id'] . "' ORDER BY time DESC " . getlimit($set['user']['guestbook_epp']));
    $entrynumber = $count - ($_REQUEST['p'] - 1) * $set['user']['guestbook_epp'];
    //Benutzer-Info
    $userids = get_ids($data, 'userid');
    $userinfo = array();
    if (count($userids)) {
        $userinfo = $user->get_info_multi($userids, 'username,email,pub_hidemail,homepage,avatar,avatar_title,signature,lastactive,pub_invisible');
    }
    if (count($data)) {
        foreach ($data as $res) {
            ++$i;
            //Benutzer
            $tabledata[$i]['USERID'] = $res['userid'];
            $tabledata[$i]['NAME'] = replace($userinfo[$res['userid']]['username']);
            $tabledata[$i]['EMAIL'] = replace(iif(!$userinfo[$res['userid']]['pub_hidemail'], $userinfo[$res['userid']]['email']));
            $tabledata[$i]['EMAIL_ENCRYPTED'] = replace(iif(!$userinfo[$res['userid']]['pub_hidemail'], cryptMail($userinfo[$res['userid']]['email'])));
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:guestbook.php

示例14: array

$orderdef[0] = 'title';
$orderdef['title'] = array('title', 'ASC');
$orderdef['release'] = array('minrelease', 'ASC');
//Standardsortierung
if (!$_REQUEST['sortby']) {
    if ($set['products']['sortby'] == 1) {
        $_REQUEST['sortby'] = 'title.ASC';
    } else {
        $_REQUEST['sortby'] = 'release.ASC';
    }
}
//Produkte auslesen
if ($_REQUEST['sortby'] == 'release.ASC' || $_REQUEST['sortby'] == 'release.DESC') {
    $data = $db->fetch("SELECT a.*,min(stamp) AS minrelease,IF(b.prodid IS NULL,0,1) AS isset FROM " . PRE . "_products_coll AS pc JOIN " . PRE . "_products AS a ON pc.prodid=a.id LEFT JOIN " . PRE . "_products_releases AS b ON a.id=b.prodid WHERE pc.userid='" . $userid . "' AND a.active='1' " . $where . " GROUP BY a.id " . getorder($orderdef, 'isset DESC', 1) . " " . getlimit($set['products']['epp']));
} else {
    $data = $db->fetch("SELECT a.* FROM " . PRE . "_products_coll AS pc JOIN " . PRE . "_products AS a ON pc.prodid=a.id WHERE pc.userid='" . $userid . "' AND active='1' " . $where . getorder($orderdef) . getlimit($set['products']['epp']));
}
$ids = get_ids($data, 'id');
$types = get_ids($data, 'type');
if (count($data)) {
    $unitvars = array('PRODUCT.DEVELOPER', 'PRODUCT.DEVELOPER_WEBSITE', 'PRODUCT.DEVELOPER_LINK', 'PRODUCT.PUBLISHER', 'PRODUCT.PUBLISHER_WEBSITE', 'PRODUCT.PUBLISHER_LINK', 'PRODUCT.MANUFACTURER', 'PRODUCT.MANUFACTURER_WEBSITE', 'PRODUCT.MANUFACTURER_LINK', 'PRODUCT.STUDIO', 'PRODUCT.STUDIO_WEBSITE', 'PRODUCT.STUDIO_LINK', 'PRODUCT.LABEL', 'PRODUCT.LABEL_WEBSITE', 'PRODUCT.LABEL_LINK', 'PRODUCT.ARTIST', 'PRODUCT.ARTIST_WEBSITE', 'PRODUCT.ARTIST_LINK', 'PRODUCT.AUTHOR', 'PRODUCT.AUTHOR_WEBSITE', 'PRODUCT.AUTHOR_LINK');
    //Einheiten auslesen
    $unitinfo = array();
    if (in_template($unitvars, $parse)) {
        $unitids = array_merge(get_ids($data, 'manufacturer'), get_ids($data, 'publisher'));
        $unitinfo = $db->fetch_index("SELECT id,title,website FROM " . PRE . "_products_units WHERE id IN (" . implode(',', $unitids) . ")", 'id');
    }
    //Gruppen auslesen
    $groupinfo = array();
    $groups = array();
    /*if ( in_template(array('PRODUCT.MEDIA','PRODUCT.MEDIA_ICON'),$parse) ) $groups = array_merge($groups,get_ids($data,'media'));
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:collection.php

示例15: intval

    $user->info['forum_ppp'] = intval($_POST['ppp']);
}
///////////////////////////////////////////////////////////////////////////////////////// THEMA ANZEIGEN
require_once BASEDIR . 'lib/class.mediamanager.php';
$mm = new mediamanager();
//Views eins hochzählen
$db->query("UPDATE " . PRE . "_forum_threads SET views=views+1 WHERE threadid='" . $threadinfo['threadid'] . "' LIMIT 1");
//Seitenzahlen
list($count) = $db->first("SELECT count(postid) FROM " . PRE . "_forum_posts WHERE ( threadid='" . $threadinfo['threadid'] . "' )");
pages(mkrellink('thread.php?id=' . $threadinfo['threadid'] . iif($_REQUEST['highlight'], '&amp;highlight=' . urlencode($_REQUEST['highlight'])), 'thread,' . $threadinfo['threadid'] . ',{P}' . urlformat($threadinfo['title']) . '.html' . iif($_REQUEST['highlight'], '?highlight=' . urlencode($_REQUEST['highlight']))), $count, $user->info['forum_ppp']);
//Thema als gelesen markieren (=auf der letzten Seite gewesen und es gibt neue Beiträge)
if ($_REQUEST['p'] == ceil($count / $user->info['forum_ppp']) && $threadinfo['lastposttime'] > $lastvisit) {
    thread_isread($threadinfo['threadid']);
}
//Beiträge auslesen
$data = $db->fetch("SELECT * FROM " . PRE . "_forum_posts WHERE ( threadid='" . $threadinfo['threadid'] . "' ) ORDER BY time ASC " . getlimit($user->info['forum_ppp']));
//Anhänge auslesen
$postids = get_ids($data, 'postid');
$attinfo = array();
$attimage = array();
if (count($postids)) {
    $attdata = $db->fetch("SELECT id,postid,hash,file,thumbnail,name,size FROM " . PRE . "_forum_attachments WHERE postid IN (" . implode(',', $postids) . ") ORDER BY name ASC");
    if (count($attdata)) {
        $typeinfo = array();
        $icondata = $db->fetch("SELECT ext,icon FROM " . PRE . "_forum_filetypes ORDER BY ext ASC");
        if (count($icondata)) {
            foreach ($icondata as $res) {
                $typeicon[$res['ext']] = $res['icon'];
            }
        }
        foreach ($attdata as $res) {
开发者ID:bigfraggle,项目名称:open-apexx,代码行数:31,代码来源:thread.php


注:本文中的getlimit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。