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


PHP e107::getDateConvert方法代码示例

本文整理汇总了PHP中e107::getDateConvert方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getDateConvert方法的具体用法?PHP e107::getDateConvert怎么用?PHP e107::getDateConvert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在e107的用法示例。


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

示例1: sc_cpagedate

 function sc_cpagedate($parm)
 {
     if (empty($parm)) {
         return e107::getDateConvert()->convert_date($this->page['page_datestamp'], 'long');
     }
     return e107::getDateConvert()->convert_date($this->page['page_datestamp'], $parm);
 }
开发者ID:notzen,项目名称:e107,代码行数:7,代码来源:page_shortcodes.php

示例2: sc_threaddatestamp

 /**
  * What does this do?
  */
 function sc_threaddatestamp($parm = '')
 {
     $gen = e107::getDateConvert();
     // XXX _URL_ check if all required info is there
     if ($parm == 'relative') {
         return $gen->computeLapse($this->postInfo['post_datestamp'], time(), false, false, 'short');
     }
     // XXX what is this line meant to do?
     // $text = "<a id='post_{$this->postInfo['post_id']}' href='".$this->e107->url->create('forum/thread/post', array('name' => $this->postInfo['thread_name'], 'thread' => $this->postInfo['post_thread'], 'id' => $this->postInfo['post_id']))."'>".IMAGE_post."</a> ";
     return $gen->convert_date($this->postInfo['post_datestamp'], 'forum');
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:14,代码来源:view_shortcodes.php

示例3: renderOnlineUsers

 function renderOnlineUsers($data = false)
 {
     $ol = e107::getOnline();
     $tp = e107::getParser();
     $panelOnline = "\n\t\t\t\t\n\t\t\t\t<table class='table table-condensed table-striped' style='width:96%;margin-left:auto;margin-right:auto'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style='width: 10%' />\n\t\t            <col style='width: 25%' />\n\t\t\t\t\t<col style='width: 10%' />\n\t\t\t\t\t<col style='width: 40%' />\n\t\t\t\t\t<col style='width: auto' />\n\t\t\t\t</colgroup>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr class='first'>\n\t\t\t\t\t\t<th>Timestamp</th>\n\t\t\t\t\t\t<th>Username</th>\n\t\t\t\t\t\t<th>IP</th>\n\t\t\t\t\t\t<th>Page</th>\n\t\t\t\t\t\t<th class='center'>Agent</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>";
     $online = $ol->userList() + $ol->guestList();
     if ($data == 'count') {
         return count($online);
     }
     //	echo "Users: ".print_a($online);
     foreach ($online as $val) {
         $panelOnline .= "\n\t\t\t<tr>\n\t\t\t\t<td class='nowrap'>" . e107::getDateConvert()->convert_date($val['user_currentvisit'], '%H:%M:%S') . "</td>\n\t\t\t\t<td>" . $this->renderOnlineName($val['online_user_id']) . "</td>\n\t\t\t\t<td>" . e107::getIPHandler()->ipDecode($val['user_ip']) . "</td>\n\t\t\t\t<td><a class='e-tip' href='" . $val['user_location'] . "' title='" . $val['user_location'] . "'>" . $tp->html_truncate(basename($val['user_location']), 50, "...") . "</a></td>\n\t\t\t\t<td class='center'><a class='e-tip' href='#' title='" . $val['user_agent'] . "'>" . $this->browserIcon($val) . "</a></td>\n\t\t\t</tr>\n\t\t\t";
     }
     $panelOnline .= "</tbody></table>";
     return $panelOnline;
 }
开发者ID:gitye,项目名称:e107,代码行数:16,代码来源:infopanel.php

示例4: batchImportForm

 function batchImportForm()
 {
     $frm = e107::getForm();
     $mes = e107::getMessage();
     $fl = e107::getFile();
     $fl->setFileInfo('all');
     $rejectArray = array('^\\.ftpquota$', '^index\\.html$', '^null\\.txt$', '\\.bak$', '^.tmp', '.*\\.xml$', '^\\.$', '^\\.\\.$', '^\\/$', '^CVS$', 'thumbs\\.db', '.*\\._$', '^\\.htaccess$', 'index\\.html', 'null\\.txt');
     $fl->setFileFilter($rejectArray);
     //	$files = $fl->get_files(e_MEDIA."temp/");
     $files = $fl->get_files(e_IMPORT);
     //	e107::js('core','core/admin.js','prototype');
     //TODO Detect XML file, and if found - read that instead of the directory.
     if (!vartrue($_POST['batch_import_selected'])) {
         $mes->add(IMALAN_113 . " <b> " . e_IMPORT . "</b>", E_MESSAGE_INFO);
     }
     if (!count($files)) {
         if (!vartrue($_POST['batch_import_selected'])) {
             $mes->add(IMALAN_114, E_MESSAGE_INFO);
         }
         $text = $this->uploadTab();
         echo $mes->render() . $text;
         return;
     }
     $text = "\n\t\t\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='batch_import'>\n\t\t\t\t\t<fieldset id='core-mediamanager-batch'>\n\t\t\t\t\t\t<legend class='e-hideme'>" . DBLAN_20 . "</legend>\n\t\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t\t<col style='width: 5%' />\n\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th class='center'>" . e107::getForm()->checkbox_toggle('e-column-toggle', 'batch_selected') . "</th>\n\t\t\t\t\t\t\t\t\t<th class='center' style='width:50px'>" . IMALAN_121 . "</th>\n\t\t\t\t\t\t\t\t\t<th class='center'>" . LAN_FILE . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . IMALAN_115 . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . IMALAN_116 . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . LAN_AUTHOR . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . IMALAN_118 . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . IMALAN_119 . "</th>\n\t\t\t\t\t\t\t\t\t<th>" . LAN_DATESTAMP . "</th>\n\t\t\t\t\t\t\t\t\t<th class='center last'>" . IMALAN_120 . "</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>";
     //	$c = 0;
     foreach ($files as $f) {
         $default = $this->getFileXml($f['fname']);
         $f = $fl->cleanFileName($f, true);
         $c = md5($f['path'] . $f['fname']);
         if ($f['error']) {
             $text = str_replace('[x]', $f['fname'], IMALAN_122);
             $mes->addWarning($text);
         }
         $large = e107::getParser()->thumbUrl($f['path'] . $f['fname'], 'w=800', true);
         $text .= "\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class='center'>" . $frm->checkbox("batch_selected[" . $c . "]", $f['fname']) . "</td>\n\t\t\t\t<td class='center'>" . $this->preview($f) . "</td>\t\t\t\n\t\t\t\t<td><a class='e-dialog' href='" . $large . "'>" . $f['fname'] . "</a></td>\n\t\t\t\t<td>" . $frm->text('batch_import_name[' . $c . ']', $_POST['batch_import_name'][$c] ? $_POST['batch_import_name'][$c] : $default['title']) . "</td>\n\t\t\t\t<td><textarea name='batch_import_diz[" . $c . "]' rows='3' cols='50'>" . ($_POST['batch_import_diz'][$c] ? $_POST['batch_import_diz'][$c] : $default['description']) . "</textarea></td>\n\t\t\t\n\t\t\t\t<td><a href='mailto:" . $default['authorEmail'] . "'>" . $default['authorName'] . "</a><br />" . $default['authorEmail'] . "</td>\n\t\t\t\t<td>" . $f['mime'] . "</td>\n\t\t\t\t<td>" . $f['fsize'] . "</td>\n\t\t\t\t<td>" . e107::getDateConvert()->convert_date($f['modified']) . "</td>\n\t\t\t\t<td class='center last'>" . $f['img-width'] . " x " . $f['img-height'] . "</td>\n\t\t\t</tr>\n\t\t\t\n";
         // $c++;
         $lastMime = $f['mime'];
     }
     // <td>".$frm->textarea('batch_import_diz['.$c.']', ($_POST['batch_import_diz'][$c] ? $_POST['batch_import_diz'][$c] : $default['description']))."</td>
     if (!isset($_POST['batch_category']) && substr($lastMime, 0, 5) == 'image') {
         $_POST['batch_category'] = "_common_image";
     }
     $text .= "\n\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\t" . IMALAN_123 . " " . $frm->selectbox('batch_category', $this->cats, $_POST['batch_category']);
     //		$text .= $frm->checkbox_label("Add Watermark", 'batch_import_watermark',1);
     $text .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\t\t" . $frm->admin_button('batch_import_selected', IMALAN_124, 'import') . $frm->admin_button('batch_import_delete', IMALAN_125, 'delete');
     $text .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\n\n\t\t\t";
     echo $mes->render() . $text;
 }
开发者ID:e107Bulgaria,项目名称:e107,代码行数:48,代码来源:image.php

示例5: emailSend

 private function emailSend($mailId)
 {
     $log = e107::getAdminLog();
     $notify = isset($_POST['mail_notify_complete']) ? 3 : 2;
     $first = 0;
     $last = 0;
     // Set defaults for earliest and latest send times.
     if (isset($_POST['mail_earliest_time'])) {
         $first = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, FALSE);
     }
     if (isset($_POST['mail_latest_time'])) {
         $last = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, TRUE);
     }
     if ($this->mailAdmin->activateEmail($mailId, FALSE, $notify, $first, $last)) {
         e107::getMessage()->addSuccess(LAN_MAILOUT_185);
         $log->log_event('MAIL_06', 'ID: ' . $mailId, E_LOG_INFORMATIVE, '');
     } else {
         $errors[] = str_replace('--ID--', $mailId, LAN_MAILOUT_188);
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:20,代码来源:mailout.php

示例6: sc_admin_siteinfo

 function sc_admin_siteinfo($parm = '')
 {
     if ($parm == 'creditsonly' && e_PAGE != "credits.php" && e_PAGE != "phpinfo.php") {
         return;
     }
     if (ADMIN) {
         global $ns, $pref, $themename, $themeversion, $themeauthor, $themedate, $themeinfo, $mySQLdefaultdb;
         if (file_exists(e_ADMIN . 'ver.php')) {
             include e_ADMIN . 'ver.php';
         }
         if ($parm == "version") {
             return $e107info['e107_version'];
         }
         $obj = e107::getDateConvert();
         $install_date = $obj->convert_date($pref['install_date'], 'long');
         if (is_readable(THEME . "theme.xml")) {
             $xml = e107::getXml();
             $data = $xml->loadXMLfile(THEME . "theme.xml", true);
             $themename = $data['@attributes']['name'];
             $themeversion = $data['@attributes']['version'];
             $themedate = $data['@attributes']['date'];
             $themeauthor = $data['author']['@attributes']['name'];
         }
         $text = "<b>" . FOOTLAN_1 . "</b>\n\t\t\t<br />" . SITENAME . "\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_2 . "</b>\n\t\t\t<br />\n\t\t\t<a href=\"mailto:" . SITEADMINEMAIL . "\">" . SITEADMIN . "</a>\n\t\t\t<br />\n\t\t\t<br />\n\t\t\t<b>e107</b>\n\t\t\t<br />\n\t\t\t" . FOOTLAN_3 . " " . $e107info['e107_version'] . "\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_20 . "</b>\n\t\t\t<br />\n\t\t\t[" . e_SECURITY_LEVEL . "] " . defset('LAN_SECURITYL_' . e_SECURITY_LEVEL, 'n/a') . " \n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_18 . "</b>\n\t\t\t<br />" . $pref['sitetheme'] . "<br /><br />\n\t\t\t<b>" . FOOTLAN_5 . "</b>\n\t\t\t<br />\n\t\t\t" . $themename . " v" . $themeversion . " " . ($themeauthor ? FOOTLAN_6 . ' ' . $themeauthor : '') . " " . ($themedate ? "(" . $themedate . ")" : "");
         $text .= $themeinfo ? "<br />" . FOOTLAN_7 . ": " . $themeinfo : '';
         $text .= "<br /><br />\n\t\t\t<b>" . FOOTLAN_8 . "</b>\n\t\t\t<br />\n\t\t\t" . $install_date . "\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_9 . "</b>\n\t\t\t<br />" . preg_replace("/PHP.*/i", "", $_SERVER['SERVER_SOFTWARE']) . "<br />(" . FOOTLAN_10 . ": " . $_SERVER['SERVER_NAME'] . ")\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_11 . "</b>\n\t\t\t<br />\n\t\t\t" . phpversion() . "\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_12 . "</b>\n\t\t\t<br />\n\t\t\t" . e107::getDB()->mySqlServerInfo . "<br />\n\t\t\t" . FOOTLAN_16 . ": " . $mySQLdefaultdb . "\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_17 . "</b>\n\t\t\t<br />utf-8\n\t\t\t<br /><br />\n\t\t\t<b>" . FOOTLAN_19 . "</b>\n\t\t\t<br />\n\t\t\t" . date('r') . "<br />";
         return $ns->tablerender(FOOTLAN_13, $text, '', TRUE);
     }
 }
开发者ID:8moustapha8,项目名称:e107,代码行数:29,代码来源:admin_shortcodes.php

示例7: array

                    $emessage->add(str_replace(array('--ID--', '--NUM--'), array($mailId, $result['recipients']), LAN_MAILOUT_170), E_MESSAGE_SUCCESS);
                }
            }
        }
        break;
    case 'midMoveToSend':
        $notify = isset($_POST['mail_notify_complete']) ? 3 : 2;
        $first = 0;
        $last = 0;
        // Set defaults for earliest and latest send times.
        // TODO: Save these fields
        if (isset($_POST['mail_earliest_time'])) {
            $first = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, FALSE);
        }
        if (isset($_POST['mail_latest_time'])) {
            $last = e107::getDateConvert()->decodeDateTime($_POST['mail_earliest_time'], 'datetime', CORE_DATE_ORDER, TRUE);
        }
        if ($mailAdmin->activateEmail($mailId, FALSE, $notify, $first, $last)) {
            $emessage->add(LAN_MAILOUT_185, E_MESSAGE_SUCCESS);
            $admin_log->log_event('MAIL_06', 'ID: ' . $mailId, E_LOG_INFORMATIVE, '');
        } else {
            $errors[] = str_replace('--ID--', $mailId, LAN_MAILOUT_188);
        }
        break;
}
if (isset($_POST['email_sendnow'])) {
    sendImmediately($mailId);
}
// --------------------- Display errors and results ------------------------
if (is_array($errors) && count($errors) > 0) {
    foreach ($errors as $e) {
开发者ID:notzen,项目名称:e107,代码行数:31,代码来源:mailout.php

示例8: __construct

 public function __construct()
 {
     $this->e107 = e107::getInstance();
     $this->memberInfo = e107::getConfig('history');
     $this->gen = e107::getDateConvert();
 }
开发者ID:armpit,项目名称:e107,代码行数:6,代码来源:online_shortcodes.php

示例9: sc_threaddatestamp

 function sc_threaddatestamp()
 {
     $gen = e107::getDateConvert();
     // XXX _URL_ check if all required info is there
     return "<a id='post_{$this->postInfo['post_id']}' href='" . $this->e107->url->create('forum/thread/post', array('name' => $this->postInfo['thread_name'], 'thread' => $this->postInfo['post_thread'], 'id' => $this->postInfo['post_id'])) . "'>" . IMAGE_post . "</a> " . $gen->convert_date($this->postInfo['post_datestamp'], 'forum');
 }
开发者ID:notzen,项目名称:e107,代码行数:6,代码来源:view_shortcodes.php

示例10: parse_userposts_comments_table

function parse_userposts_comments_table($row, $template)
{
    //	global $USERPOSTS_COMMENTS_TABLE, $pref, $gen, $tp, $id, $sql2, $comment_files;
    $gen = e107::getDateConvert();
    $datestamp = $gen->convert_date($row['comment_datestamp'], "short");
    $bullet = '';
    if (defined('BULLET')) {
        $bullet = '<img src="' . THEME_ABS . 'images/' . BULLET . '" alt="" class="icon" />';
    } elseif (file_exists(THEME . 'images/bullet2.gif')) {
        $bullet = '<img src="' . THEME_ABS . 'images/bullet2.gif" alt="" class="icon" />';
    }
    $vars = new e_vars();
    $vars->USERPOSTS_COMMENTS_ICON = $bullet;
    $vars->USERPOSTS_COMMENTS_DATESTAMP = UP_LAN_11 . " " . $datestamp;
    $vars->USERPOSTS_COMMENTS_HEADING = $row['comment_title'];
    $vars->USERPOSTS_COMMENTS_COMMENT = $row['comment_comment'];
    $vars->USERPOSTS_COMMENTS_HREF_PRE = "<a href='" . $row['comment_url'] . "'>";
    $vars->USERPOSTS_COMMENTS_TYPE = $row['comment_type'];
    //return(preg_replace("/\{(.*?)\}/e", '$\1', $USERPOSTS_COMMENTS_TABLE));
    return e107::getParser()->simpleParse($template, $vars);
}
开发者ID:gitye,项目名称:e107,代码行数:21,代码来源:userposts.php

示例11: foreach

</div>
</div>
*/
$text .= $ns->tablerender("e107 News", $panelRSS, "core-infopanel_news", true);
// ---------------------Latest Stuff ---------------------------
require_once e_CORE . "shortcodes/batch/admin_shortcodes.php";
$text .= $ns->tablerender(ADLAN_LAT_1, $tp->parseTemplate("{ADMIN_LATEST=norender}"), "core-infopanel_latest", true);
$text .= $ns->tablerender(LAN_STATUS, $tp->parseTemplate("{ADMIN_STATUS=norender}"), "core-infopanel_latest", true);
// ---------------------- Who's Online  ------------------------
// TODO Could use a new _menu item instead.
$nOnline = e107::getDB()->db_Select('online', '*');
$panelOnline = "\n\t\n\t\t<table class='table adminlist'>\n\t\t<colgroup>\n\t\t\t<col style='width: 10%' />\n            <col style='width: 25%' />\n\t\t\t<col style='width: 10%' />\n\t\t\t<col style='width: 40%' />\n\t\t\t<col style='width: auto' />\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>Timestamp</th>\n\t\t\t\t<th>Username</th>\n\t\t\t\t<th>IP</th>\n\t\t\t\t<th>Page</th>\n\t\t\t\t<th>Agent</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>";
if (e107::getDB()->db_Select('online', '*', "online_ip !='' LIMIT 20")) {
    $newsarray = $e107->sql->db_getList();
    foreach ($newsarray as $key => $val) {
        $panelOnline .= "<tr>\n\t\t\t\t<td class='nowrap'>" . e107::getDateConvert()->convert_date($val['online_timestamp'], '%H:%M:%S') . "</td>\n\t\t\t\t\t<td>" . renderOnlineName($val['online_user_id']) . "</td>\n\t\t\t\t\t<td>" . e107::getIPHandler()->ipDecode($val['online_ip']) . "</td>\n\t\t\t\t\t<td><a href='" . $val['online_location'] . "' title='" . $val['online_location'] . "'>" . $tp->text_truncate($val['online_location'], 50, '...') . "</a></td>\n\t\t\t\t\t<td>" . $tp->text_truncate(str_replace("/", " / ", $val['online_agent']), 20, '...') . "</td>\n\t\t\t\t</tr>\n\t\t\t\t";
    }
}
$panelOnline .= "</tbody></table>\n\t";
$text .= $ns->tablerender('Visitors Online : ' . $nOnline, $panelOnline, 'core-infopanel_online', true);
// --------------------- User Selected Menus -------------------
if (varset($pref['core-infopanel-menus'])) {
    foreach ($pref['core-infopanel-menus'] as $val) {
        $id = $frm->name2id('core-infopanel_' . $val);
        $inc = $tp->parseTemplate("{PLUGIN={$val}|TRUE}");
        $text .= $inc;
        // $text .= $ns->tablerender("", $inc, $id,true);
    }
}
$text .= "<div class='clear'>&nbsp;</div>";
$text .= render_infopanel_options();
开发者ID:notzen,项目名称:e107,代码行数:31,代码来源:infopanel.php

示例12: batchImportForm

 function batchImportForm()
 {
     $frm = e107::getForm();
     $mes = e107::getMessage();
     $fl = e107::getFile();
     $fl->setFileInfo('all');
     $rejectArray = array('^\\.ftpquota$', '^index\\.html$', '^null\\.txt$', '\\.bak$', '^.tmp', '.*\\.xml$', '^\\.$', '^\\.\\.$', '^\\/$', '^CVS$', 'thumbs\\.db', '.*\\._$', '^\\.htaccess$', 'index\\.html', 'null\\.txt');
     $fl->setFileFilter($rejectArray);
     //	$files = $fl->get_files(e_MEDIA."temp/");
     $files = $fl->get_files(e_TEMP);
     e107::js('core', 'core/admin.js', 'prototype');
     //TODO Detect XML file, and if found - read that instead of the directory.
     if (!vartrue($_POST['batch_import_selected'])) {
         $mes->add("Scanning for new media (images, videos, files) in folder: <b> " . e_UPLOAD . "</b>", E_MESSAGE_INFO);
     }
     if (!count($files)) {
         if (!vartrue($_POST['batch_import_selected'])) {
             $mes->add("No media Found! Please upload some files.", E_MESSAGE_INFO);
         }
         $text = $this->uploadPage();
         echo $mes->render() . $text;
         return;
     }
     $text = "\n\t\t\t\t<form method='post' action='" . e_SELF . "?" . e_QUERY . "' id='batch_import'>\n\t\t\t\t\t<fieldset id='core-mediamanager-batch'>\n\t\t\t\t\t\t<legend class='e-hideme'>" . DBLAN_20 . "</legend>\n\t\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t\t<col style='width: 5%' />\n\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th class='center'>" . e107::getForm()->checkbox_toggle('e-column-toggle', 'batch_selected') . "</th>\n\t\t\t\t\t\t\t\t\t<th class='center' style='width:50px'>Preview</th>\n\t\t\t\t\t\t\t\t\t<th class='center'>" . LAN_FILE . "</th>\n\t\t\t\t\t\t\t\t\t<th >Title (internal use)</th>\n\t\t\t\t\t\t\t\t\t<th >Caption (seen by public)</th>\n\t\t\t\t\t\t\t\t\t<th >Author</th>\n\t\t\t\t\t\t\t\t\t<th>Mime Type</th>\n\t\t\t\t\t\t\t\t\t<th>File Size</th>\n\t\t\t\t\t\t\t\t\t<th>" . LAN_DATESTAMP . "</th>\n\t\t\t\t\t\t\t\t\t<th class='center last'>Dimensions</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>";
     //	$c = 0;
     foreach ($files as $f) {
         $default = $this->getFileXml($f['fname']);
         $f = $fl->cleanFileName($f, true);
         $c = md5($f['path'] . $f['fname']);
         if ($f['error']) {
             $mes->addWarning($f['fname'] . " couldn't be renamed. Check file perms.");
         }
         $large = e107::getParser()->thumbUrl($f['path'] . $f['fname'], 'w=800', true);
         $text .= "\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class='center'>" . $frm->checkbox("batch_selected[" . $c . "]", $f['fname']) . "</td>\n\t\t\t\t<td class='center'>" . $this->preview($f) . "</td>\t\t\t\n\t\t\t\t<td><a class='e-dialog' href='" . $large . "'>" . $f['fname'] . "</a></td>\n\t\t\t\t<td>" . $frm->text('batch_import_name[' . $c . ']', $_POST['batch_import_name'][$c] ? $_POST['batch_import_name'][$c] : $default['title']) . "</td>\n\t\t\t\t<td><textarea name='batch_import_diz[" . $c . "]' rows='3' cols='50'>" . ($_POST['batch_import_diz'][$c] ? $_POST['batch_import_diz'][$c] : $default['description']) . "</textarea></td>\n\t\t\t\n\t\t\t\t<td><a href='mailto:" . $default['authorEmail'] . "'>" . $default['authorName'] . "</a><br />" . $default['authorEmail'] . "</td>\n\t\t\t\t<td>" . $f['mime'] . "</td>\n\t\t\t\t<td>" . $f['fsize'] . "</td>\n\t\t\t\t<td>" . e107::getDateConvert()->convert_date($f['modified']) . "</td>\n\t\t\t\t<td class='center last'>" . $f['img-width'] . " x " . $f['img-height'] . "</td>\n\t\t\t</tr>\n\t\t\t\n";
         // $c++;
         $lastMime = $f['mime'];
     }
     // <td>".$frm->textarea('batch_import_diz['.$c.']', ($_POST['batch_import_diz'][$c] ? $_POST['batch_import_diz'][$c] : $default['description']))."</td>
     if (!isset($_POST['batch_category']) && substr($lastMime, 0, 5) == 'image') {
         $_POST['batch_category'] = "_common_image";
     }
     $text .= "\n\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\tImport into Category: " . $frm->selectbox('batch_category', $this->cats, $_POST['batch_category']);
     //	$waterMarkPath = e_THEME.e107::getPref('sitetheme')."/images/watermark.png"; // Now performed site-wide dynamically.
     if (is_readable($waterMarkPath)) {
         //		$text .= $frm->checkbox_label("Add Watermark", 'batch_import_watermark',1);
     }
     $text .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='buttons-bar center'>\n\t\t\t\t\t\t\t" . $frm->admin_button('batch_import_selected', "Import Selected Files", 'import') . $frm->admin_button('batch_import_delete', "Delete Selected Files", 'delete');
     $text .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\n\n\t\t\t";
     echo $mes->render() . $text;
 }
开发者ID:notzen,项目名称:e107,代码行数:50,代码来源:image.php

示例13: renderResults

 function renderResults()
 {
     global $query, $search_prefs, $pre_title, $search_chars, $search_res, $result_flag;
     $ns = e107::getRender();
     $tp = e107::getParser();
     $con = e107::getDateConvert();
     // BC Fix
     $sch = new e_search();
     // BC Fix
     $query = $this->query;
     $_GET['q'] = rawurlencode($_GET['q']);
     $_GET['t'] = preg_replace('/[^\\w\\-]/i', '', $_GET['t']);
     $search_prefs = $this->search_prefs;
     $result_flag = $this->result_flag;
     foreach ($this->search_info as $key => $a) {
         if (isset($this->searchtype[$key]) || isset($this->searchtype['all'])) {
             $text = "";
             $pre_title = $this->search_info[$key]['pre_title'] == 2 ? $this->search_info[$key]['pre_title_alt'] : $this->search_info[$key]['pre_title'];
             $search_chars = $this->search_info[$key]['chars'];
             $search_res = $this->search_info[$key]['results'];
             if (vartrue($this->search_info[$key]['sfile']) && file_exists($this->search_info[$key]['sfile'])) {
                 $text .= '<div class="search-block">';
                 require_once $this->search_info[$key]['sfile'];
                 $text .= '</div>';
             } else {
                 $className = $key . "_search";
                 if (!class_exists($className)) {
                     continue;
                 }
                 $obj = new $className($this->query);
                 $where = method_exists($obj, 'where') ? $obj->where($_GET) : "";
                 $ps = $obj->parsesearch($this->search_info[$key]['table'], $this->search_info[$key]['return_fields'], $this->search_info[$key]['search_fields'], $this->search_info[$key]['weights'], 'self', varset($this->search_info[$key]['no_results'], "<div class='alert alert-danger'>" . LAN_198 . "</div>"), $where, $this->search_info[$key]['order']);
                 if (e_DEBUG) {
                     //	echo e107::getMessage()->addDebug(print_a($this->search_info,true))->render();// "DEBUG: Order is missing";
                 }
                 //	print_a($ps);
                 $text .= '<ul id="search-results" class="list-unstyled search-block">';
                 $text .= $ps['text'];
                 $text .= '</ul>';
                 $results = $ps['results'];
             }
             //	$parms = $results.",".$search_res.",".$_GET['r'].",".e_REQUEST_SELF."?q=".$_GET['q']."&t=".$key."&r=[FROM]";
             $nextprev = array('total' => $results, 'amount' => intval($search_res), 'current' => intval($_GET['r']), 'url' => urldecode(e_REQUEST_SELF . "?q=" . $_GET['q'] . "&t=" . $key . "&r=[FROM]"), 'tmpl_prefix' => 'default');
             $npParms = http_build_query($nextprev, false, '&');
             $core_parms = array('r' => '', 'q' => '', 't' => '', 's' => '');
             foreach ($_GET as $pparm_key => $pparm_value) {
                 $temp = preg_replace('/[^\\w_]/i', '', $pparm_key);
                 $temp1 = preg_replace('/[^\\w_ +]/i', '', $pparm_value);
                 // Filter 'non-word' charcters in search term
                 if ($temp == $pparm_key && !isset($core_parms[$pparm_key])) {
                     $parms .= "&" . $pparm_key . "=" . $temp1;
                 }
             }
             if ($results > $search_res) {
                 $nextprev = $results > $search_res ? $tp->parseTemplate("{NEXTPREV={$npParms}}") : "";
                 $text .= "<div class='nextprev search form-inline'>" . $nextprev . "</div>";
             }
             if ($results > 0) {
                 $res_from = $_GET['r'] + 1;
                 $res_to = $_GET['r'] + $search_res > $results ? $results : $_GET['r'] + $search_res;
                 $res_display = $res_from . " - " . $res_to . " " . LAN_SEARCH_12 . " " . $results;
             } else {
                 $res_display = "";
             }
             $ns->tablerender(LAN_SEARCH_11 . " " . $res_display . " " . LAN_SEARCH_13 . " " . (isset($_GET[$advanced_caption['id']]) ? $advanced_caption['title'][$_GET[$advanced_caption['id']]] : $this->search_info[$key]['qtype']), $text, 'search_result');
         }
     }
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:68,代码来源:search.php

示例14: define

}
if ($action == 'top') {
    define('e_PAGETITLE', LAN_8);
} elseif ($action == 'active') {
    define('e_PAGETITLE', LAN_7);
}
require_once HEADERF;
if ($action == 'active') {
    require_once e_HANDLER . 'userclass_class.php';
    require_once e_PLUGIN . 'forum/forum_class.php';
    $forum = new e107forum();
    $forumList = implode(',', $forum->getForumPermList('view'));
    $qry = "\n\tSELECT\n\t\tt.*, u.user_name, ul.user_name AS user_last, f.forum_name\n\tFROM `#forum_thread` as t\n\tLEFT JOIN `#forum` AS f ON f.forum_id = t.thread_forum_id\n\tLEFT JOIN `#user` AS u ON u.user_id = t.thread_user\n\tLEFT JOIN `#user` AS ul ON ul.user_id = t.thread_lastuser\n\tWHERE t.thread_forum_id IN ({$forumList})\n\tORDER BY t.thread_views DESC\n\tLIMIT\n\t\t{$from}, {$view}\n\t";
    if ($sql->db_Select_gen($qry)) {
        $text = "<div style='text-align:center'>\n<table style='width:auto' class='fborder'>\n";
        $gen = e107::getDateConvert();
        $text .= "<tr>\n\t\t\t<td style='width:5%' class='forumheader'>&nbsp;</td>\n\t\t\t<td style='width:45%' class='forumheader'>" . LAN_1 . "</td>\n\t\t\t<td style='width:15%; text-align:center' class='forumheader'>" . LAN_2 . "</td>\n\t\t\t<td style='width:5%; text-align:center' class='forumheader'>" . LAN_3 . "</td>\n\t\t\t<td style='width:5%; text-align:center' class='forumheader'>" . LAN_4 . "</td>\n\t\t\t<td style='width:25%; text-align:center' class='forumheader'>" . LAN_5 . "</td>\n\t\t\t</tr>\n";
        while ($row = $sql->db_Fetch(MYSQL_ASSOC)) {
            if ($row['user_name']) {
                $POSTER = "<a href='" . $e107->url->create('user/profile/view', 'main', "name={$row['user_name']}&id={$row['thread_user']}") . "'>{$row['user_name']}</a>";
            } else {
                $POSTER = $row['thread_user_anon'];
            }
            $LINKTOTHREAD = $e107->url->getUrl('forum', 'thread', "func=view&id={$row['thread_id']}");
            $LINKTOFORUM = $e107->url->getUrl('forum', 'forum', "func=view&id={$row['thread_forum_id']}");
            $lastpost_datestamp = $gen->convert_date($row['thread_lastpost'], 'forum');
            if ($row['user_last']) {
                $LASTPOST = "<a href='" . $e107->url->create('user/profile/view', 'main', "name={$row['user_last']}&id={$row['thread_lastuser']}") . "'>{$row['user_last']}</a><br />" . $lastpost_datestamp;
            } else {
                $LASTPOST = $row['thread_lastuser_anon'] . '<br />' . $lastpost_datestamp;
            }
开发者ID:notzen,项目名称:e107,代码行数:31,代码来源:top.php


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