本文整理汇总了PHP中comments::last_userid方法的典型用法代码示例。如果您正苦于以下问题:PHP comments::last_userid方法的具体用法?PHP comments::last_userid怎么用?PHP comments::last_userid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comments
的用法示例。
在下文中一共展示了comments::last_userid方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: products_print
//.........这里部分代码省略.........
$media = dash_unserialize($res['media']);
if (!is_array($media)) {
$media = array();
}
$mediadata = array();
foreach ($media as $medid) {
++$ii;
$mediadata[$ii]['TITLE'] = $groupinfo[$medid]['title'];
$mediadata[$ii]['ICON'] = $groupinfo[$medid]['icon'];
}
$publink = mklink('manufacturers.php?id=' . $res['publisher'], 'manufacturers,id' . $res['publisher'] . urlformat($unitinfo[$res['publisher']]['title']) . '.html');
$tabledata[$i]['STUDIO'] = $unitinfo[$res['publisher']]['title'];
$tabledata[$i]['STUDIO_WEBSITE'] = $unitinfo[$res['publisher']]['website'];
$tabledata[$i]['STUDIO_LINK'] = $publink;
$tabledata[$i]['REGISSEUR'] = $res['regisseur'];
$tabledata[$i]['ACTORS'] = $res['actors'];
$tabledata[$i]['LENGTH'] = $res['length'];
$tabledata[$i]['FSK'] = $res['sk'];
$tabledata[$i]['GENRE'] = $groupinfo[$res['genre']]['title'];
$tabledata[$i]['MEDIA'] = $mediadata;
} elseif ($res['type'] == 'book') {
//Media-Liste
$media = dash_unserialize($res['media']);
if (!is_array($media)) {
$media = array();
}
$mediadata = array();
foreach ($media as $medid) {
++$ii;
$mediadata[$ii]['TITLE'] = $groupinfo[$medid]['title'];
$mediadata[$ii]['ICON'] = $groupinfo[$medid]['icon'];
}
$manulink = mklink('manufacturers.php?id=' . $res['manufacturer'], 'manufacturers,id' . $res['manufacturer'] . urlformat($unitinfo[$res['manufacturer']]['title']) . '.html');
$publink = mklink('manufacturers.php?id=' . $res['publisher'], 'manufacturers,id' . $res['publisher'] . urlformat($unitinfo[$res['publisher']]['title']) . '.html');
$tabledata[$i]['AUTHOR'] = $unitinfo[$res['manufacturer']]['title'];
$tabledata[$i]['AUTHOR_WEBSITE'] = $unitinfo[$res['manufacturer']]['website'];
$tabledata[$i]['AUTHOR_LINK'] = $manulink;
$tabledata[$i]['PUBLISHER'] = $unitinfo[$res['publisher']]['title'];
$tabledata[$i]['PUBLISHER_WEBSITE'] = $unitinfo[$res['publisher']]['website'];
$tabledata[$i]['PUBLISHER_LINK'] = $publink;
$tabledata[$i]['GENRE'] = $groupinfo[$res['genre']]['title'];
$tabledata[$i]['MEDIA'] = $mediadata;
$tabledata[$i]['ISBN'] = $res['isbn'];
}
//Benutzerdefinierte Felder
for ($ii = 1; $ii <= 10; $ii++) {
$tabledata[$i]['CUSTOM' . $ii . '_NAME'] = replace($set['products']['custom_' . $res['type']][$ii - 1]);
$tabledata[$i]['CUSTOM' . $ii] = $res['custom' . $ii];
}
//Veröffentlichung
if (in_array('PRODUCT.RELEASE', $parse)) {
if ($res['releasestamp']) {
$temprel = $releaseinfo[$res['id']];
foreach ($temprel as $rel) {
if ($rel['stamp'] != $res['releasestamp']) {
continue;
}
++$ii;
$tabledata[$i]['RELEASE'][$ii] = $rel;
}
} else {
$tabledata[$i]['RELEASE'] = $releaseinfo[$res['id']];
}
}
//Kommentare
if ($apx->is_module('comments') && $set['products']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('products', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('products.php?id=' . $res['id'], 'products,id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('PRODUCT.COMMENT_LAST_USERID', 'PRODUCT.COMMENT_LAST_NAME', 'PRODUCT.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['products']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('products', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
$laststamp = date('Y/m/d', $res['addtime'] - TIMEDIFF);
}
}
$tmpl->assign('PRODUCT', $tabledata);
$tmpl->parse($template, 'products');
}
示例2: getmodulepath
//Produkt
$tabledata[$i]['PRODUCT_ID'] = $res['prodid'];
//Kommentare
if ($apx->is_module('comments') && $set['videos']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('videos', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('videos.php?id=' . $res['id'], 'videos,id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('VIDEO.COMMENT_LAST_USERID', 'VIDEO.COMMENT_LAST_NAME', 'VIDEO.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['videos']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('videos', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
示例3: calendar_print
//.........这里部分代码省略.........
}
}
//Ende berechnen (falls nötig)
if (in_template(array('EVENT.ENDDAY', 'EVENT.ENDTIME'), $parse)) {
if ($res['endday'] != $res['startday'] || $res['endtime'] != -1) {
$endday = calendar_stamp2time($res['endday']);
if ($res['endtime'] != -1) {
$time_comp = calendar_explode_stamp($res['endday']);
$tmpstamp = sprintf('%04d', $res['endtime']);
$time_comp['hour'] = substr($tmpstamp, 0, 2);
$time_comp['minute'] = substr($tmpstamp, 2, 2);
$endtime = mktime($time_comp['hour'], $time_comp['minute'], 0, $time_comp['month'], $time_comp['day'], $time_comp['year']) + TIMEDIFF;
}
}
}
//Username + eMail
if ($res['userid']) {
$username = $res['username'];
$email = iif(!$res['pub_hidemail'], $res['email']);
} else {
$username = $res['send_username'];
$email = $res['send_email'];
}
//Text
$eventtext = '';
if (in_array('EVENT.TEXT', $parse)) {
$eventtext = mediamanager_inline($res['text']);
if ($apx->is_module('glossar')) {
$eventtext = glossar_highlight($eventtext);
}
}
//Datehead
if ($laststamp != $res['startday']) {
$event['DATEHEAD'] = $startday;
}
//Tags
if (in_array('EVENT.TAG', $parse) || in_array('EVENT.TAG_IDS', $parse) || in_array('EVENT.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = calendar_tags($res['id']);
}
$event['ID'] = $res['id'];
$event['TITLE'] = $res['title'];
$event['TEXT'] = $eventtext;
$event['LINK'] = $link;
$event['LOCATION'] = compatible_hsc($res['location']);
$event['LOCATION_LINK'] = compatible_hsc($res['location_link']);
$event['PRIORITY'] = $res['priority'];
$event['RESTRICTED'] = $res['restricted'];
$event['PRIVATE'] = $res['private'];
$event['HITS'] = $res['hits'];
$event['RELATED'] = calendar_links($res['links']);
$event['PICTURE'] = $picture;
$event['PICTURE_POPUP'] = $picture_popup;
$event['PICTURE_POPUPPATH'] = $picture_popuppath;
$event['STARTDAY'] = $startday;
$event['STARTTIME'] = $starttime;
$event['ENDDAY'] = $endday;
$event['ENDTIME'] = $endtime;
$event['USERID'] = $res['userid'];
$event['USERNAME'] = replace($username);
$event['EMAIL'] = replace($email);
$event['EMAIL_ENCRYPTED'] = replace(cryptMail($email));
$event['CATID'] = $res['catid'];
$event['CATTITLE'] = $catinfo['title'];
$event['CATICON'] = $catinfo['icon'];
//Tags
$event['TAG'] = $tagdata;
$event['TAG_IDS'] = $tagids;
$event['KEYWORDS'] = $keywords;
//Galerie
if ($apx->is_module('gallery') && $res['galid'] && !$res['private'] && in_template(array('EVENT.GALLERY_ID', 'EVENT.GALLERY_TITLE', 'EVENT.GALLERY_LINK'), $parse)) {
$galinfo = gallery_info($res['galid']);
$event['GALLERY_ID'] = $galinfo['id'];
$event['GALLERY_TITLE'] = $galinfo['title'];
$event['GALLERY_LINK'] = mklink('gallery.php?id=' . $galinfo['id'], 'gallery,list' . $galinfo['id'] . ',1' . urlformat($galinfo['title']) . '.html');
}
//Kommentare
if ($apx->is_module('comments') && $set['calendar']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('calendar', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('events.php?id=' . $res['id'], 'events,id' . $res['id'] . urlformat($res['title']) . '.html');
$event['COMMENT_COUNT'] = $coms->count();
$event['COMMENT_LINK'] = $coms->link($link);
$event['DISPLAY_COMMENTS'] = 1;
if (in_template(array('EVENT.COMMENT_LAST_USERID', 'EVENT.COMMENT_LAST_NAME', 'EVENT.COMMENT_LAST_TIME'), $parse)) {
$event['COMMENT_LAST_USERID'] = $coms->last_userid();
$event['COMMENT_LAST_NAME'] = $coms->last_name();
$event['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
$eventdata[$i] = $event;
$laststamp = $res['startday'];
}
}
$tmpl->assign('EVENT', $eventdata);
$tmpl->parse($template, 'calendar');
}
示例4: links_print
//.........这里部分代码省略.........
//Linkpic
if (in_array('LINK.PICTURE', $parse) || in_array('LINK.PICTURE_POPUP', $parse) || in_array('LINK.PICTURE_POPUPPATH', $parse)) {
list($picture, $picture_popup, $picture_popuppath) = links_linkpic($res['linkpic']);
}
//Username + eMail
if ($res['userid']) {
$author = $res['username'];
$author_email = iif(!$res['pub_hidemail'], $res['email']);
} else {
$author = $res['send_username'];
$author_email = $res['send_email'];
}
//Text
$text = '';
if (in_array('LINK.TEXT', $parse)) {
$text = mediamanager_inline($res['text']);
if ($apx->is_module('glossar')) {
$text = glossar_highlight($text);
}
}
//Datehead
if ($laststamp != date('Y/m/d', $res['starttime'] - TIMEDIFF)) {
$tabledata[$i]['DATEHEAD'] = $res['starttime'];
}
//Tags
if (in_array('LINK.TAG', $parse) || in_array('LINK.TAG_IDS', $parse) || in_array('LINK.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = links_tags($res['id']);
}
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['TITLE'] = $res['title'];
$tabledata[$i]['URL'] = $res['url'];
$tabledata[$i]['TEXT'] = $text;
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['PICTURE'] = $picture;
$tabledata[$i]['PICTURE_POPUP'] = $picture_popup;
$tabledata[$i]['PICTURE_POPUPPATH'] = $picture_popuppath;
$tabledata[$i]['HITS'] = number_format($res['hits'], 0, '', '.');
$tabledata[$i]['TIME'] = $res['starttime'];
$tabledata[$i]['TOP'] = $res['top'];
$tabledata[$i]['RESTRICTED'] = $res['restricted'];
$tabledata[$i]['NEW'] = $new;
$tabledata[$i]['GOTO'] = $gotolink;
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
//Autor
$tabledata[$i]['USERID'] = $res['userid'];
$tabledata[$i]['USERNAME'] = replace($author);
$tabledata[$i]['EMAIL'] = replace($author_email);
$tabledata[$i]['EMAIL_ENCRYPTED'] = replace(cryptMail($author_email));
//Kategorien
$tabledata[$i]['CATID'] = $res['catid'];
$tabledata[$i]['CATTITLE'] = $catinfo[$res['catid']]['title'];
$tabledata[$i]['CATTEXT'] = $catinfo[$res['catid']]['text'];
$tabledata[$i]['CATICON'] = $catinfo[$res['catid']]['icon'];
$tabledata[$i]['CATLINK'] = mklink('links.php?catid=' . $res['catid'], 'links,' . $res['catid'] . ',1' . urlformat($catinfo[$res['catid']]['title']) . '.html');
//Galerie
if ($apx->is_module('gallery') && $res['galid']) {
$galinfo = gallery_info($res['galid']);
$tabledata[$i]['GALLERY_ID'] = $galinfo['id'];
$tabledata[$i]['GALLERY_TITLE'] = $galinfo['title'];
$tabledata[$i]['GALLERY_LINK'] = mklink('gallery.php?id=' . $galinfo['id'], 'gallery,list' . $galinfo['id'] . ',1' . urlformat($galinfo['title']) . '.html');
}
//Kommentare
if ($apx->is_module('comments') && $set['links']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('links', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('links.php?id=' . $res['id'], 'links,id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('LINK.COMMENT_LAST_USERID', 'LINK.COMMENT_LAST_NAME', 'LINK.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['links']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('links', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
$laststamp = date('Y/m/d', $res['starttime'] - TIMEDIFF);
}
}
$tmpl->assign('LINK', $tabledata);
$tmpl->parse($template, 'links');
}
示例5: downloads_print
//.........这里部分代码省略.........
} else {
$uploader = $res['send_username'];
$uploader_email = $res['send_email'];
}
//Datehead
if ($laststamp != date('Y/m/d', $res['starttime'] - TIMEDIFF)) {
$tabledata[$i]['DATEHEAD'] = $res['starttime'];
}
//Text
$text = '';
if (in_array('DOWNLOAD.TEXT', $parse)) {
$text = mediamanager_inline($res['text']);
if ($apx->is_module('glossar')) {
$text = glossar_highlight($text);
}
}
//Tags
if (in_array('DOWNLOAD.TAG', $parse) || in_array('DOWNLOAD.TAG_IDS', $parse) || in_array('DOWNLOAD.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = downloads_tags($res['id']);
}
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['SECID'] = $res['secid'];
$tabledata[$i]['TITLE'] = $res['title'];
$tabledata[$i]['TEXT'] = $text;
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['TEASERPIC'] = $picture;
$tabledata[$i]['TEASERPIC_POPUP'] = $picture_popup;
$tabledata[$i]['TEASERPIC_POPUPPATH'] = $picture_popuppath;
$tabledata[$i]['SIZE'] = downloads_getsize($thefsize);
$tabledata[$i]['FORMAT'] = downloads_getformat($res);
$tabledata[$i]['HITS'] = number_format($res['hits'], 0, '', '.');
$tabledata[$i]['TIME'] = $res['starttime'];
$tabledata[$i]['PICTURE'] = $picdata;
$tabledata[$i]['TOP'] = $res['top'];
$tabledata[$i]['RESTRICTED'] = $res['restricted'];
$tabledata[$i]['NEW'] = $new;
$tabledata[$i]['DOWNLOADLINK'] = $dllink;
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
//Kategorien
$tabledata[$i]['CATID'] = $res['catid'];
$tabledata[$i]['CATTITLE'] = $catinfo[$res['catid']]['title'];
$tabledata[$i]['CATTEXT'] = $catinfo[$res['catid']]['text'];
$tabledata[$i]['CATICON'] = $catinfo[$res['catid']]['icon'];
$tabledata[$i]['CATLINK'] = mklink('downloads.php?catid=' . $res['catid'], 'downloads,' . $res['catid'] . ',1' . urlformat($catinfo[$res['catid']]['title']) . '.html');
//Produkt
$tabledata[$i]['PRODUCT_ID'] = $res['prodid'];
//Uploader
$tabledata[$i]['UPLOADER_ID'] = $res['userid'];
$tabledata[$i]['UPLOADER'] = replace($uploader);
$tabledata[$i]['UPLOADER_EMAIL'] = replace($uploader_email);
$tabledata[$i]['UPLOADER_EMAIL_ENCRYPTED'] = replace(cryptMail($uploader_email));
//Autor
$tabledata[$i]['AUTHOR'] = replace($res['author']);
$tabledata[$i]['AUTHOR_LINK'] = replace($res['author_link']);
//Galerie
if ($apx->is_module('gallery') && $res['galid']) {
$galinfo = gallery_info($res['galid']);
$tabledata[$i]['GALLERY_ID'] = $galinfo['id'];
$tabledata[$i]['GALLERY_TITLE'] = $galinfo['title'];
$tabledata[$i]['GALLERY_LINK'] = mklink('gallery.php?id=' . $galinfo['id'], 'gallery,list' . $galinfo['id'] . ',1' . urlformat($galinfo['title']) . '.html');
}
//Kommentare
if ($apx->is_module('comments') && $set['downloads']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('downloads', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('downloads.php?id=' . $res['id'], 'downloads,id' . $res['id'] . urlformat($res['title']) . ',1.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('DOWNLOAD.COMMENT_LAST_USERID', 'DOWNLOAD.COMMENT_LAST_NAME', 'DOWNLOAD.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['downloads']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('downloads', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
$laststamp = date('Y/m/d', $res['starttime'] - TIMEDIFF);
}
}
$tmpl->assign('DOWNLOAD', $tabledata);
$tmpl->parse($template, 'downloads');
}
示例6: videos_print
//.........这里部分代码省略.........
//Tags
if (in_array('VIDEO.TAG', $parse) || in_array('VIDEO.TAG_IDS', $parse) || in_array('VIDEO.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = videos_tags($res['id']);
}
//Embeded?
if ($res['source'] != 'apexx' && $res['source'] != 'external') {
$embedcode = videos_embedcode($res['source'], $res['flvfile']);
$file = '';
$flvfile = '';
$dllink = '';
} elseif ($res['source'] == 'external') {
$embedcode = '';
$flvfile = $res['flvfile'];
if ($res['file']) {
$file = $res['file'];
} else {
$dllink = '';
}
} else {
$embedcode = '';
$flvfile = HTTPDIR . getpath('uploads') . $res['flvfile'];
if ($res['file']) {
$file = HTTP_HOST . HTTPDIR . getpath('uploads') . $res['file'];
} else {
$dllink = '';
}
}
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['SECID'] = $res['secid'];
$tabledata[$i]['USERID'] = $res['userid'];
$tabledata[$i]['USERNAME'] = replace($uploader);
$tabledata[$i]['EMAIL'] = replace($uploader_email);
$tabledata[$i]['EMAIL_ENCRYPTED'] = replace(cryptMail($uploader_email));
$tabledata[$i]['TITLE'] = $res['title'];
$tabledata[$i]['TEXT'] = $text;
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['PICTURE'] = $picture;
$tabledata[$i]['PICTURE_POPUP'] = $picture_popup;
$tabledata[$i]['PICTURE_POPUPPATH'] = $picture_popuppath;
$tabledata[$i]['SIZE'] = videos_getsize($thefsize);
$tabledata[$i]['HITS'] = number_format($res['hits'], 0, '', '.');
$tabledata[$i]['TIME'] = $res['starttime'];
$tabledata[$i]['SCREENSHOT'] = $picdata;
$tabledata[$i]['SOURCE'] = $res['source'] == 'external' ? 'apexx' : $res['source'];
$tabledata[$i]['VIDEOFILE'] = $flvfile;
$tabledata[$i]['EMBEDCODE'] = $embedcode;
$tabledata[$i]['LOCAL'] = $res['source'] == 'apexx';
$tabledata[$i]['TOP'] = $res['top'];
$tabledata[$i]['RESTRICTED'] = $res['restricted'];
$tabledata[$i]['NEW'] = $new;
$tabledata[$i]['DOWNLOADLINK'] = $dllink;
$tabledata[$i]['DOWNLOADFILE'] = $file;
$tabledata[$i]['DOWNLOADS'] = number_format($res['downloads'], 0, '', '.');
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
//Kategorie
$tabledata[$i]['CATID'] = $res['catid'];
$tabledata[$i]['CATTITLE'] = $catinfo[$res['catid']]['title'];
$tabledata[$i]['CATTEXT'] = $catinfo[$res['catid']]['text'];
$tabledata[$i]['CATICON'] = $catinfo[$res['catid']]['icon'];
//Produkt
$tabledata[$i]['PRODUCT_ID'] = $res['prodid'];
//Kommentare
if ($apx->is_module('comments') && $set['videos']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('videos', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('videos.php?id=' . $res['id'], 'videos,id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('VIDEO.COMMENT_LAST_USERID', 'VIDEO.COMMENT_LAST_NAME', 'VIDEO.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['videos']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('videos', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
$laststamp = date('Y/m/d', $res['starttime'] - TIMEDIFF);
}
}
$tmpl->assign('VIDEO', $tabledata);
$tmpl->parse($template, 'videos');
}
示例7: news_print
//.........这里部分代码省略.........
//Datehead
if ($laststamp != date('Y/m/d', $res['starttime'] - TIMEDIFF)) {
$tabledata[$i]['DATEHEAD'] = $res['starttime'];
}
//Links
if (in_array('NEWS.RELATED', $parse)) {
$tabledata[$i]['RELATED'] = news_links($res['links']);
}
//Text
$text = '';
if (in_array('NEWS.TEXT', $parse)) {
$text = mediamanager_inline($res['text']);
if ($apx->is_module('glossar')) {
$text = glossar_highlight($text);
}
}
//Teaser
$teaser = '';
if (in_array('NEWS.TEASER', $parse) && $set['news']['teaser']) {
$teaser = mediamanager_inline($res['teaser']);
if ($apx->is_module('glossar')) {
$teaser = glossar_highlight($teaser);
}
}
//Tags
if (in_array('NEWS.TAG', $parse) || in_array('NEWS.TAG_IDS', $parse) || in_array('NEWS.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = news_tags($res['id']);
}
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['SECID'] = $res['secid'];
$tabledata[$i]['TITLE'] = $res['title'];
$tabledata[$i]['SUBTITLE'] = $res['subtitle'];
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['TEASER'] = $teaser;
$tabledata[$i]['TEXT'] = $text;
$tabledata[$i]['TIME'] = $res['starttime'];
$tabledata[$i]['PICTURE'] = $picture;
$tabledata[$i]['PICTURE_POPUP'] = $picture_popup;
$tabledata[$i]['PICTURE_POPUPPATH'] = $picture_popuppath;
$tabledata[$i]['USERID'] = $res['userid'];
$tabledata[$i]['USERNAME'] = replace($username);
$tabledata[$i]['EMAIL'] = replace($email);
$tabledata[$i]['EMAIL_ENCRYPTED'] = replace(cryptMail($email));
$tabledata[$i]['HITS'] = number_format($res['hits'], 0, '', '.');
$tabledata[$i]['TOP'] = $res['top'];
$tabledata[$i]['RESTRICTED'] = $res['restricted'];
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
//Kategorie
$tabledata[$i]['CATID'] = $res['catid'];
$tabledata[$i]['CATTITLE'] = $catinfo[$res['catid']]['title'];
$tabledata[$i]['CATICON'] = $catinfo[$res['catid']]['icon'];
$tabledata[$i]['CATLINK'] = $catinfo[$res['catid']]['link'];
//Produkt
$tabledata[$i]['PRODUCT_ID'] = $res['prodid'];
//Galerie
if ($apx->is_module('gallery') && $res['galid']) {
$galinfo = gallery_info($res['galid']);
$tabledata[$i]['GALLERY_ID'] = $galinfo['id'];
$tabledata[$i]['GALLERY_TITLE'] = $galinfo['title'];
$tabledata[$i]['GALLERY_LINK'] = mklink('gallery.php?id=' . $galinfo['id'], 'gallery,list' . $galinfo['id'] . ',1' . urlformat($galinfo['title']) . '.html');
}
//Kommentare
if ($apx->is_module('comments') && $set['news']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('news', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('news.php?id=' . $res['id'], 'news,id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('NEWS.COMMENT_LAST_USERID', 'NEWS.COMMENT_LAST_NAME', 'NEWS.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['news']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('news', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
$laststamp = date('Y/m/d', $res['starttime'] - TIMEDIFF);
}
}
$tmpl->assign('NEWS', $tabledata);
$tmpl->parse($template, 'news');
}
示例8: user_blogs_last
function user_blogs_last($count = 5, $start = 0, $friendsonly = false, $userid = 0, $template = 'lastblogs')
{
global $set, $db, $apx, $user;
$tmpl = new tengine();
$count = (int) $count;
$start = (int) $start;
$userid = (int) $userid;
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars('functions/' . $template, 'user');
//Nach Freunde filtern
$friendfilter = '';
if ($friendsonly) {
$friends = $user->get_buddies();
$friends[] = -1;
$friendfilter = " AND userid IN (" . implode(',', $friends) . ") ";
}
//Nach Benutzer filtern
$userfilter = '';
if ($userid) {
$userfilter = " AND userid='" . $userid . "'";
}
$data = $db->fetch("SELECT * FROM " . PRE . "_user_blog WHERE 1 " . $userfilter . $friendfilter . " ORDER BY time DESC LIMIT " . iif($start, $start . ',') . $count);
if (count($data)) {
//Benutzer-Infos auslesen
$userdata = array();
if (in_template(array('BLOG.USERNAME', 'BLOG.REALNAME', 'BLOG.AVATAR', 'BLOG.AVATER_TITLE'), $parse)) {
$userids = get_ids($data, 'userid');
$userdata = $user->get_info_multi($userids, 'username,realname,avatar,avatar_title');
}
//Blogs auflisten
$tabledata = array();
foreach ($data as $res) {
++$i;
$link = mklink('user.php?action=blog&id=' . $res['userid'] . '&blogid=' . $res['id'], 'user,blog,' . $res['userid'] . ',id' . $res['id'] . urlformat($res['title']) . '.html');
//Text
$text = '';
if (in_array('BLOG.TEXT', $parse)) {
$text = $res['text'];
$text = badwords($text);
$text = replace($text, 1);
$text = dbsmilies($text);
$text = dbcodes($text);
}
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['TITLE'] = replace($res['title']);
$tabledata[$i]['TEXT'] = $res['text'];
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['TIME'] = $res['time'];
//Userinfo
$userinfo = $userdata[$res['userid']];
$tabledata[$i]['USERID'] = $res['userid'];
$tabledata[$i]['USERNAME'] = replace($userinfo['username']);
$tabledata[$i]['REALNAME'] = replace($userinfo['realname']);
$tabledata[$i]['AVATAR'] = $user->mkavatar($userinfo);
$tabledata[$i]['AVATAR_TITLE'] = $user->mkavtitle($userinfo);
//Kommentare
if ($apx->is_module('comments') && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('userblog', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('user.php?action=blog&id=' . $res['userid'] . '&blogid=' . $res['id'], 'user,blog,' . $res['userid'] . ',id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('BLOG.COMMENT_LAST_USERID', 'BLOG.COMMENT_LAST_NAME', 'BLOG.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
}
}
$tmpl->assign('BLOG', $tabledata);
//Template ausgeben
$tmpl->parse('functions/' . $template, 'user');
}
示例9: gallery_printpic
function gallery_printpic($data, $template)
{
global $set, $db, $apx, $user;
$tmpl = new tengine();
if (!$set['gallery']['picwidth'] || !$set['gallery']['picheight']) {
$set['gallery']['picwidth'] = 999999;
$set['gallery']['picheight'] = 999999;
}
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars($template, 'gallery');
if (count($data)) {
//Galerie-Info auslesen
$galinfo = array();
if (in_template(array('PICTURE.GALLERY_TITLE', 'PICTURE.GALLERY_DESCRIPTION', 'PICTURE.GALLERY_LINK', 'PICTURE.GALLERY_TIME', 'PICTURE.GALLERY_PRODUCT_ID', 'PICTURE.GALLERY_RESTRICTED'), $parse)) {
$galids = get_ids($data, 'galid');
$galinfo = $db->fetch_index("SELECT id,secid,prodid,title,description,restricted,starttime FROM " . PRE . "_gallery WHERE id IN (" . implode(',', $galids) . ")", 'id');
}
//Bilder auflisten
foreach ($data as $res) {
++$i;
//GALERIE
$gallink = mklink('gallery.php?id=' . $res['galid'], 'gallery,list' . $res['galid'] . ',1' . urlformat($galinfo[$res['galid']]['title']) . '.html');
//Tags
if (in_array('PICTURE.GALLERY_TAG', $parse) || in_array('PICTURE.GALLERY_TAG_IDS', $parse) || in_array('PICTURE.GALLERY_KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = gallery_tags($res['galid']);
}
$tabledata[$i]['GALLERY_SECID'] = $galinfo[$res['galid']]['secid'];
$tabledata[$i]['GALLERY_ID'] = $res['galid'];
$tabledata[$i]['GALLERY_TITLE'] = $galinfo[$res['galid']]['title'];
$tabledata[$i]['GALLERY_DESCRIPTION'] = $galinfo[$res['galid']]['description'];
$tabledata[$i]['GALLERY_RESTRICTED'] = $galinfo[$res['galid']]['restricted'];
$tabledata[$i]['GALLERY_TIME'] = $galinfo[$res['galid']]['starttime'];
$tabledata[$i]['GALLERY_LINK'] = $gallink;
$tabledata[$i]['GALLERY_PRODUCT_ID'] = $galinfo[$res['galid']]['prodid'];
//Tags
$tabledata[$i]['GALLERY_TAG'] = $tagdata;
$tabledata[$i]['GALLERY_TAG_IDS'] = $tagids;
$tabledata[$i]['GALLERY_KEYWORDS'] = $keywords;
//Enthaltene Bilder, Letzte Aktualisierung
if (in_template(array('PICTURE.GALLERY_COUNT', 'PICTURE.GALLERY_UPDATETIME'), $parse)) {
list($galcount, $updatetime) = $db->first("SELECT count(id), max(addtime) FROM " . PRE . "_gallery_pics WHERE ( galid='" . $res['galid'] . "' AND active='1' )");
$tabledata[$i]['GALLERY_COUNT'] = $galcount;
$tabledata[$i]['GALLERY_UPDATETIME'] = $updatetime;
}
//BILD
$link = mklink('gallery.php?pic=' . $res['id'], 'gallery,pic' . $res['id'] . urlformat($res['caption']) . '.html');
if ($set['gallery']['popup']) {
$link = "javascript:popupwin('" . $link . "','" . $set['gallery']['picwidth'] . "','" . $set['gallery']['picheight'] . "'," . iif($set['gallery']['popup_resizeable'], 1, 0) . ")";
}
$tabledata[$i]['CAPTION'] = $res['caption'];
$tabledata[$i]['IMAGE'] = HTTPDIR . getpath('uploads') . $res['thumbnail'];
$tabledata[$i]['FULLSIZE'] = HTTPDIR . getpath('uploads') . $res['picture'];
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['TIME'] = $res['addtime'];
$tabledata[$i]['HITS'] = $res['hits'];
//Kommentare
if ($apx->is_module('comments') && $set['gallery']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('gallery', $res['id']);
} else {
$coms->mid = $res['id'];
}
//Link
$link = mklink('gallery.php?pic=' . $res['id'], 'gallery,pic' . $res['id'] . urlformat($res['caption']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('PICTURE.COMMENT_LAST_USERID', 'PICTURE.COMMENT_LAST_NAME', 'PICTURE.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['gallery']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('gallery', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
}
}
$tmpl->assign('PICTURE', $tabledata);
$tmpl->parse($template, 'gallery');
}
示例10: glossar_print
function glossar_print($data, $template, $alphabetical = false)
{
global $set, $db, $apx, $user;
$tmpl = new tengine();
$apx->lang->drop('func', 'glossar');
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars($template, 'glossar');
//Kategorien auslesen & Info vorbereiten
if (in_array('INDEX.CATID', $parse) || in_array('INDEX.CATTITLE', $parse) || in_array('INDEX.CATTEXT', $parse) || in_array('INDEX.CATICON', $parse)) {
$catids = get_ids($data, 'catid');
if (count($catids)) {
$catdata = $db->fetch("SELECT * FROM " . PRE . "_glossar_cat WHERE id IN (" . implode(',', $catids) . ")");
foreach ($catdata as $res) {
$catinfo[$res['id']] = $res;
$catinfo[$res['id']]['link'] = mklink('glossar.php?catid=' . $res['id'], 'glossar,' . $res['id'] . ',0,1' . urlformat($res['title']) . '.html');
}
}
}
//Begriffe auflisten
if (count($data)) {
//Nach Buchstaben sortieren
$letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ#';
for ($i = 0; $i < strlen($letters); $i++) {
$index[$letters[$i]] = array();
}
if ($alphabetical) {
foreach ($data as $res) {
$letter = glossar_letter($res['title']);
$index[$letter][] = $res;
}
} else {
foreach ($data as $res) {
$index[0][] = $res;
}
}
//Index erstellen
foreach ($index as $letter => $data) {
//Link: Nur Begriffe mit diesem Buchstaben
$letterlink = mklink('glossar.php?catid=' . $_REQUEST['catid'] . '&letter=' . iif($letter == '#', 'spchar', strtolower($letter)), 'glossar,' . $_REQUEST['catid'] . ',' . iif($letter == '#', 'spchar', strtolower($letter)) . ',1' . urlformat($catinfo['title']) . '.html');
foreach ($data as $res) {
++$i;
//Link
$link = mklink('glossar.php?id=' . $res['id'], 'glossar,id' . $res['id'] . urlformat($res['title']) . '.html');
//Tags
if (in_array('INDEX.TAG', $parse) || in_array('INDEX.TAG_IDS', $parse) || in_array('INDEX.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = glossar_tags($res['id']);
}
$tabledata[$i]['LETTER'] = $letter;
$tabledata[$i]['LETTERLINK'] = $letterlink;
$tabledata[$i]['TITLE'] = $res['title'];
$tabledata[$i]['TEXT'] = $res['text'];
$tabledata[$i]['SPELLING'] = $res['spelling'];
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['TIME'] = $res['starttime'];
$tabledata[$i]['HITS'] = number_format($res['hits'], 0, '', '.');
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
$tabledata[$i]['CATID'] = $catinfo[$res['catid']]['id'];
$tabledata[$i]['CATTITLE'] = $catinfo[$res['catid']]['title'];
$tabledata[$i]['CATTEXT'] = $catinfo[$res['catid']]['text'];
$tabledata[$i]['CATICON'] = $catinfo[$res['catid']]['icon'];
$tabledata[$i]['CATLINK'] = $catinfo[$res['catid']]['link'];
//Kommentare
if ($apx->is_module('comments') && $set['glossar']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('glossar', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('glossar.php?id=' . $res['id'], 'glossar,id' . $res['id'] . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('INDEX.COMMENT_LAST_USERID', 'INDEX.COMMENT_LAST_NAME', 'INDEX.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['glossar']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('glossar', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
}
}
}
$tmpl->assign('INDEX', $tabledata);
$tmpl->parse($template, 'glossar');
}
示例11: poll_similar
function poll_similar($tagids = array(), $count = 5, $start = 0, $template = 'similar')
{
global $set, $db, $apx, $user;
$count = (int) $count;
$start = (int) $start;
$tmpl = new tengine();
//Verwendete Variablen auslesen
$parse = $apx->tmpl->used_vars('functions/' . $template, 'poll');
if (!is_array($tagids)) {
$tagids = getTagIds(strval($tagids));
}
$ids = poll_search_tags($tagids);
$ids[] = -1;
$tagfilter = " AND id IN (" . implode(', ', $ids) . ") ";
$data = $db->fetch("SELECT id,question,addtime,starttime,days,allowcoms FROM " . PRE . "_poll WHERE ( '" . time() . "' BETWEEN starttime AND endtime " . $tagfilter . " " . section_filter() . " ) ORDER BY starttime DESC LIMIT " . $count);
if (count($data)) {
foreach ($data as $res) {
++$i;
//Tags
if (in_array('POLL.TAG', $parse) || in_array('POLL.TAG_IDS', $parse) || in_array('POLL.KEYWORDS', $parse)) {
list($tagdata, $tagids, $keywords) = poll_tags($res['id']);
}
$tabledata[$i]['QUESTION'] = $res['question'];
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['STARTTIME'] = $res['starttime'];
$tabledata[$i]['ENDTIME'] = $res['starttime'] + $res['days'] * 24 * 3600;
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
$tabledata[$i]['LINK'] = mklink('poll.php?id=' . $res['id'], 'poll,' . $res['id'] . urlformat($res['question']) . '.html');
//Kommentare
if ($apx->is_module('comments') && $set['poll']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('poll', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink('poll.php?id=' . $res['id'], 'poll,' . $res['id'] . urlformat($res['question']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('POLL.COMMENT_LAST_USERID', 'POLL.COMMENT_LAST_NAME', 'POLL.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
}
}
$tmpl->assign('POLL', $tabledata);
$tmpl->parse('functions/' . $template, 'poll');
}
示例12: articles_print
//.........这里部分代码省略.........
if (in_array('ARTICLE.INDEX', $parse)) {
$pageIndex = articles_index($res['id'], $res['title'], $link2file);
}
$tabledata[$i]['ID'] = $res['id'];
$tabledata[$i]['SECID'] = $res['secid'];
$tabledata[$i]['TYPE'] = $res['type'];
$tabledata[$i]['TITLE'] = $res['title'];
$tabledata[$i]['SUBTITLE'] = $res['subtitle'];
$tabledata[$i]['TEASER'] = $teaser;
$tabledata[$i]['TEXT'] = $page1text;
$tabledata[$i]['LINK'] = $link;
$tabledata[$i]['TIME'] = $res['starttime'];
$tabledata[$i]['INDEX'] = $pageIndex;
$tabledata[$i]['PICTURE'] = $picture;
$tabledata[$i]['PICTURE_POPUP'] = $picture_popup;
$tabledata[$i]['PICTURE_POPUPPATH'] = $picture_popuppath;
$tabledata[$i]['USERID'] = $res['userid'];
$tabledata[$i]['USERNAME'] = replace($res['username']);
$tabledata[$i]['EMAIL'] = replace(iif(!$res['pub_hidemail'], $res['email']));
$tabledata[$i]['EMAIL_ENCRYPTED'] = replace(iif(!$res['pub_hidemail'], cryptMail($res['email'])));
$tabledata[$i]['HITS'] = number_format($res['hits'], 0, '', '.');
$tabledata[$i]['TOP'] = $res['top'];
$tabledata[$i]['RESTRICTED'] = $res['restricted'];
//Tags
$tabledata[$i]['TAG'] = $tagdata;
$tabledata[$i]['TAG_IDS'] = $tagids;
$tabledata[$i]['KEYWORDS'] = $keywords;
//Kategorie
$tabledata[$i]['CATID'] = $res['catid'];
$tabledata[$i]['CATTITLE'] = $catinfo[$res['catid']]['title'];
$tabledata[$i]['CATICON'] = $catinfo[$res['catid']]['icon'];
$tabledata[$i]['CATLINK'] = $catinfo[$res['catid']]['link'];
//Produkt
$tabledata[$i]['PRODUCT_ID'] = $res['prodid'];
//Zusätzliche Felder: PREVIEWS
if ($res['type'] == 'preview') {
for ($ii = 1; $ii <= 10; $ii++) {
if (!$set['articles']['custom_preview'][$ii - 1]) {
continue;
}
$tabledata[$i]['CUSTOM' . $ii . '_TITLE'] = $set['articles']['custom_preview'][$ii - 1];
$tabledata[$i]['CUSTOM' . $ii] = $res['custom' . $ii];
}
$tabledata[$i]['IMPRESSION'] = $res['impression'];
} elseif ($res['type'] == 'review') {
for ($ii = 1; $ii <= 10; $ii++) {
if (!$set['articles']['custom_review'][$ii - 1]) {
continue;
}
$tabledata[$i]['CUSTOM' . $ii . '_TITLE'] = $set['articles']['custom_review'][$ii - 1];
$tabledata[$i]['CUSTOM' . $ii] = $res['custom' . $ii];
}
$tabledata[$i]['FINAL_RATING'] = $res['final_rate'];
$tabledata[$i]['POSITIVE'] = $res['positive'];
$tabledata[$i]['NEGATIVE'] = $res['negative'];
$tabledata[$i]['AWARD'] = $res['award'];
}
//Galerie
if ($apx->is_module('gallery') && $res['galid']) {
$galinfo = gallery_info($res['galid']);
$tabledata[$i]['GALLERY_ID'] = $galinfo['id'];
$tabledata[$i]['GALLERY_TITLE'] = $galinfo['title'];
$tabledata[$i]['GALLERY_LINK'] = mklink('gallery.php?id=' . $galinfo['id'], 'gallery,list' . $galinfo['id'] . ',1' . urlformat($galinfo['title']) . '.html');
}
//Kommentare
if ($apx->is_module('comments') && $set['articles']['coms'] && $res['allowcoms']) {
require_once BASEDIR . getmodulepath('comments') . 'class.comments.php';
if (!isset($coms)) {
$coms = new comments('articles', $res['id']);
} else {
$coms->mid = $res['id'];
}
$link = mklink($link2file . '.php?id=' . $res['id'], $link2file . ',id' . $res['id'] . ',1' . urlformat($res['title']) . '.html');
$tabledata[$i]['COMMENT_COUNT'] = $coms->count();
$tabledata[$i]['COMMENT_LINK'] = $coms->link($link);
$tabledata[$i]['DISPLAY_COMMENTS'] = 1;
if (in_template(array('ARTICLE.COMMENT_LAST_USERID', 'ARTICLE.COMMENT_LAST_NAME', 'ARTICLE.COMMENT_LAST_TIME'), $parse)) {
$tabledata[$i]['COMMENT_LAST_USERID'] = $coms->last_userid();
$tabledata[$i]['COMMENT_LAST_NAME'] = $coms->last_name();
$tabledata[$i]['COMMENT_LAST_TIME'] = $coms->last_time();
}
}
//Bewertungen
if ($apx->is_module('ratings') && $set['articles']['ratings'] && $res['allowrating']) {
require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php';
if (!isset($rate)) {
$rate = new ratings('articles', $res['id']);
} else {
$rate->mid = $res['id'];
}
$tabledata[$i]['RATING'] = $rate->display();
$tabledata[$i]['RATING_VOTES'] = $rate->count();
$tabledata[$i]['DISPLAY_RATING'] = 1;
}
$laststamp = date('Y/m/d', $res['starttime'] - TIMEDIFF);
}
}
$tmpl->assign('ARTICLE', $tabledata);
$tmpl->parse($template, 'articles');
}