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


PHP e107::getDate方法代码示例

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


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

示例1: sc_timedate

 function sc_timedate($parm = '')
 {
     if ($parm == 'relative') {
         return e107::getDate()->computeLapse($this->var['comment_datestamp'], time(), false, false, 'short');
     }
     return e107::getDate()->convert_date($this->var['comment_datestamp'], "short");
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:7,代码来源:comment_shortcodes.php

示例2: sc_dateplus_year

 function sc_dateplus_year($parm)
 {
     $date = e107::getDate();
     if (isset($parm['short'])) {
         $output = $date->convert_date(time(), '%y');
     } else {
         $output = $date->convert_date(time(), '%Y');
     }
     return $output;
 }
开发者ID:gitter-badger,项目名称:dateplus,代码行数:10,代码来源:dateplus_shortcodes.php

示例3: checkTimezone

 function checkTimezone()
 {
     $mes = e107::getMessage();
     $timezone = e107::pref('core', 'timezone');
     if (e107::getDate()->isValidTimezone($timezone) == false) {
         $mes->addWarning("Your timezone setting (" . $timezone . ") is invalid. It has been reset to UTC. To Modify, please go to Admin -> Preferences -> Date Display Options.", 'default', true);
         e107::getConfig()->set('timezone', 'UTC')->save(false, true, false);
         $this->refresh = true;
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:10,代码来源:admin.php

示例4: dbCategory

 function dbCategory($mode)
 {
     global $pref, $sql, $ns, $qs, $rs, $aa, $tp, $plugintable, $e107cache, $content_cat_icon_path_large, $content_cat_icon_path_small;
     $_POST['cat_heading'] = $tp->toDB($_POST['cat_heading']);
     $_POST['cat_subheading'] = $tp->toDB($_POST['cat_subheading']);
     if (e_WYSIWYG) {
         $_POST['cat_text'] = $tp->createConstants($_POST['cat_text']);
         // convert e107_images/ to {e_IMAGE} etc.
     }
     $_POST['cat_text'] = $tp->toDB($_POST['cat_text']);
     $_POST['cat_class'] = $_POST['cat_class'] ? intval($_POST['cat_class']) : "0";
     //category create
     if (isset($qs[0]) && $qs[0] == 'cat' && isset($qs[1]) && $qs[1] == 'create') {
         if (isset($qs[2]) && is_numeric($qs[2])) {
             $parent = "0." . intval($qs[2]);
         } else {
             $parent = 0;
         }
         //category edit
     } elseif (isset($qs[0]) && $qs[0] == 'cat' && isset($qs[1]) && $qs[1] == 'edit') {
         if (isset($qs[2]) && is_numeric($qs[2])) {
             if (isset($qs[3]) && is_numeric($qs[3])) {
                 if (intval($qs[3]) == 0) {
                     $parent = 0;
                 } elseif ($qs[2] == $qs[3]) {
                     $parent = 0;
                 } else {
                     $parent = "0." . intval($qs[3]);
                 }
             } else {
                 if ($qs[2] == $_POST['cat_id']) {
                     $parent = intval($_POST['parent_id']);
                     $parent = $parent != 0 ? "0." . $parent : 0;
                 } else {
                 }
             }
         } else {
             $parent = 0;
         }
     }
     $_POST['parent'] = $parent;
     if (isset($_POST['cat_startdate']) && $_POST['cat_startdate'] != "0" && $_POST['cat_startdate'] != "") {
         $newstarttime = e107::getDate()->toTime($_POST['cat_startdate'], 'inputdatetime');
     } else {
         $newstarttime = time();
     }
     if (isset($_POST['content_datestamp']) && $_POST['content_datestamp'] != "" && $_POST['content_datestamp'] != "0") {
         if ($newstarttime != $starttime) {
             $starttime = $newstarttime;
         } else {
             $starttime = intval($_POST['content_datestamp']);
         }
     } else {
         $starttime = time();
     }
     if (isset($_POST['cat_enddate']) && $_POST['cat_enddate'] != "0" && $_POST['cat_enddate'] != "") {
         $endtime = e107::getDate()->toTime($_POST['cat_enddate'], 'inputdatetime');
     } else {
         $endtime = "0";
     }
     if ($mode == "create") {
         $sql->db_Insert($plugintable, "'0', '" . $_POST['cat_heading'] . "', '" . $_POST['cat_subheading'] . "', '', '" . $_POST['cat_text'] . "', '" . ADMINID . "', '" . $tp->toDB($_POST["cat_icon"]) . "', '', '', '" . $_POST['parent'] . "', '" . intval($_POST['cat_comment']) . "', '" . intval($_POST['cat_rate']) . "', '" . intval($_POST['cat_pe']) . "', '', '" . $starttime . "', '" . $endtime . "', '" . $_POST['cat_class'] . "', '', '0', '0', '', '' ");
         // check and insert default pref values if new main parent + create menu file
         if ($_POST['parent'] == "0") {
             $iid = mysql_insert_id();
             $content_pref = $aa->getContentPref($iid);
             $aa->CreateParentMenu($iid);
         }
         $e107cache->clear("{$plugintable}");
         //jsx_location(e_SELF."?".e_QUERY.".pc");
         $url = e_SELF . "?" . e_QUERY . ".pc";
         e107::getRedirect()->go($url);
     } elseif ($mode == "update") {
         $sql->db_Update($plugintable, "content_heading = '" . $_POST['cat_heading'] . "', content_subheading = '" . $_POST['cat_subheading'] . "', content_summary = '', content_text = '" . $_POST['cat_text'] . "', content_author = '" . ADMINID . "', content_icon = '" . $tp->toDB($_POST["cat_icon"]) . "', content_image = '', content_parent = '" . $_POST['parent'] . "', content_comment = '" . intval($_POST['cat_comment']) . "', content_rate = '" . intval($_POST['cat_rate']) . "', content_pe = '" . intval($_POST['cat_pe']) . "', content_refer = '0', content_datestamp = '" . $starttime . "', content_enddate = '" . $endtime . "', content_class = '" . intval($_POST['cat_class']) . "' WHERE content_id = '" . intval($_POST['cat_id']) . "' ");
         // check and insert default pref values if new main parent + create menu file
         if ($_POST['parent'] == "0") {
             @unlink(e_PLUGIN . "content/menus/content_" . $_POST['menuheading'] . "_menu.php");
             $content_pref = $aa->getContentPref($_POST['cat_id']);
             $aa->CreateParentMenu($_POST['cat_id']);
         }
         $e107cache->clear("{$plugintable}");
         //jsx_location(e_SELF."?".e_QUERY.".pu");
         $url = e_SELF . "?" . e_QUERY . ".pu";
         e107::getRedirect()->go($url);
     }
 }
开发者ID:Jimmi08,项目名称:content,代码行数:86,代码来源:content_db_class.php

示例5: renderPreview

 /**
  *
  */
 function renderPreview()
 {
     global $FORUM_PREVIEW;
     // BC v1.x
     $tp = e107::getParser();
     $ns = e107::getRender();
     $this->processAttachments();
     require_once HEADERF;
     if (USER) {
         $poster = USERNAME;
     } else {
         $poster = $_POST['anonname'] ? $_POST['anonname'] : LAN_ANONYMOUS;
     }
     $postdate = e107::getDate()->convert_date(time(), "forum");
     $tsubject = $tp->post_toHTML($_POST['subject'], true);
     $tpost = $tp->post_toHTML($_POST['post'], true);
     if ($_POST['poll_title'] != '' && check_class($this->forumObj->prefs->get('poll'))) {
         require_once e_PLUGIN . "poll/poll_class.php";
         $poll = new poll();
         $poll_text = $poll->render_poll($_POST, 'forum', 'notvoted', true);
     } else {
         $poll_text = false;
     }
     if (empty($FORUM_PREVIEW)) {
         if (deftrue('BOOTSTRAP')) {
             $FORUM_PREVIEW = e107::getTemplate('forum', 'forum_preview', 'item');
         } else {
             if (file_exists(THEME . "forum_preview_template.php")) {
                 require_once THEME . "forum_preview_template.php";
             } else {
                 require_once e_PLUGIN . "forum/templates/forum_preview_template.php";
             }
         }
     }
     $shortcodes = array('PREVIEW_DATE' => $postdate, 'PREVIEW_SUBJECT' => $tsubject, 'PREVIEW_POST' => $tpost);
     $text = $tp->simpleParse($FORUM_PREVIEW, $shortcodes);
     if ($poll_text) {
         $ns->tablerender($_POST['poll_title'], $poll_text);
     }
     $ns->tablerender(LAN_FORUM_3005, $text);
     /*
     		if ($this->action == 'edit')
     		{
     			if ($_POST['subject'])
     			{
     				$action = 'edit';
     			}
     			else
     			{
     				$action = 'rp';
     			}
     			$eaction = true;
     		}
     		else if($this->action == 'quote')
     		{
     			$action = 'rp';
     			$eaction = false;
     		}*/
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:62,代码来源:forum_post.php

示例6: toDate

 /**
  * Display a Date in the browser. 
  * Includes support for 'livestamp' (http://mattbradley.github.io/livestampjs/)
  * @param integer $datestamp - unix timestamp
  * @param string $format - short | long | relative 
  * @return HTML with converted date. 
  */
 public function toDate($datestamp = null, $format = 'short')
 {
     if (!is_numeric($datestamp)) {
         return;
     }
     return '<span data-livestamp="' . $datestamp . '">' . e107::getDate()->convert($datestamp, $format) . '</span>';
 }
开发者ID:timscholten,项目名称:e107,代码行数:14,代码来源:e_parse_class.php

示例7: sc_recent_post_date

 /**
  * Render date for post used in the recent forum posts menu.
  *
  * @return string
  */
 function sc_recent_post_date()
 {
     // TODO: date format.
     $format = vartrue($this->plugPrefs['asdasdsad'], 'relative');
     $date = e107::getDate();
     return $date->convert_date(vartrue($this->var['post']['post_datestamp'], 0), $format);
 }
开发者ID:lonalore,项目名称:nodejs_forum,代码行数:12,代码来源:nodejs_forum_shortcodes.php

示例8: elseif

} elseif ($action == 'active') {
    define('e_PAGETITLE', LAN_7);
} else {
    e107::redirect();
    exit;
}
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 = "\r\n\tSELECT\r\n\t\tt.*, u.user_name, ul.user_name AS user_last, f.forum_name\r\n\tFROM `#forum_thread` as t\r\n\tLEFT JOIN `#forum` AS f ON f.forum_id = t.thread_forum_id\r\n\tLEFT JOIN `#user` AS u ON u.user_id = t.thread_user\r\n\tLEFT JOIN `#user` AS ul ON ul.user_id = t.thread_lastuser\r\n\tWHERE t.thread_forum_id IN ({$forumList})\r\n\tORDER BY t.thread_views DESC\r\n\tLIMIT\r\n\t\t{$from}, {$view}\r\n\t";
    if ($sql->gen($qry)) {
        $text = "<div>\n<table style='width:auto' class='table fborder'>\n";
        $gen = e107::getDate();
        $text .= "<tr>\r\n\t\t\t<th style='width:5%' class='forumheader'>&nbsp;</th>\r\n\t\t\t<th style='width:45%' class='forumheader'>" . LAN_1 . "</th>\r\n\t\t\t<th style='width:15%; text-align:center' class='forumheader'>" . LAN_2 . "</th>\r\n\t\t\t<th style='width:5%; text-align:center' class='forumheader'>" . LAN_3 . "</th>\r\n\t\t\t<th style='width:5%; text-align:center' class='forumheader'>" . LAN_4 . "</th>\r\n\t\t\t<th style='width:25%; text-align:center' class='forumheader'>" . LAN_5 . "</th>\r\n\t\t\t</tr>\n";
        while ($row = $sql->db_Fetch(MYSQL_ASSOC)) {
            if ($row['user_name']) {
                $POSTER = "<a href='" . e107::getUrl()->create('user/profile/view', "name={$row['user_name']}&id={$row['thread_user']}") . "'>{$row['user_name']}</a>";
            } else {
                $POSTER = $row['thread_user_anon'];
            }
            $LINKTOTHREAD = e107::getUrl()->create('forum/thread/view', array('id' => $row['thread_id']));
            //$e107->url->getUrl('forum', 'thread', "func=view&id={$row['thread_id']}");
            $LINKTOFORUM = e107::getUrl()->create('forum/forum/view', array('id' => $row['thread_forum_id']));
            //$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::getUrl()->create('user/profile/view', "name={$row['user_last']}&id={$row['thread_lastuser']}") . "'>{$row['user_last']}</a><br />" . $lastpost_datestamp;
            } else {
开发者ID:gitter-badger,项目名称:e107,代码行数:31,代码来源:top.php

示例9: convertToData

 /**
  * Convert posted to model values after submit (based on field type)
  * @param array $data
  * @return void
  */
 protected function convertToData(&$data)
 {
     $model = new e_model($data);
     foreach ($this->getFields() as $key => $attributes) {
         $value = vartrue($attributes['dataPath']) ? $model->getData($attributes['dataPath']) : $model->get($key);
         if (null === $value) {
             continue;
         }
         switch ($attributes['type']) {
             case 'password':
                 //TODO more encryption options.
                 if (strlen($value) < 30) {
                     $value = md5($value);
                 }
                 break;
             case 'datestamp':
                 if (!is_numeric($value)) {
                     if (!empty($attributes['writeParms'])) {
                         if (is_string($attributes['writeParms'])) {
                             parse_str($attributes['writeParms'], $opt);
                         } elseif (is_array($attributes['writeParms'])) {
                             $opt = $attributes['writeParms'];
                         }
                     }
                     $format = $opt['type'] ? 'input' . $opt['type'] : 'inputdate';
                     $value = trim($value) ? e107::getDate()->toTime($value, $format) : 0;
                 }
                 break;
             case 'ip':
                 $value = trim($value) ? e107::getIPHandler()->ipEncode($value) : '';
                 break;
             case 'dropdown':
                 // TODO - ask Steve if this check is required
             // TODO - ask Steve if this check is required
             case 'lanlist':
             case 'userclasses':
             case 'comma':
             case 'checkboxes':
                 if (is_array($value)) {
                     // no sanitize here - data is added to model posted stack
                     // and validated & sanitized before sent to db
                     //$value = array_map(array(e107::getParser(), 'toDB'), $value);
                     $value = implode(',', $value);
                 }
                 break;
             case 'images':
             case 'files':
                 //	XXX Cam @ SecretR: didn't work here. See model_class.php line 2046.
                 // if(!is_array($value))
                 //		{
                 //		$value = e107::unserialize($value);
                 //	}
                 break;
         }
         /*
         			if($attributes['serialize'] == true)
         			{
         				$attributes['data'] = 'array';		
         			}
         
         			if($attributes['data'] != 'array')
         			{
         				$value = e107::unserialize($value);	
         			}
         */
         if (vartrue($attributes['dataPath'])) {
             $model->setData($attributes['dataPath'], $value);
         } else {
             $model->set($key, $value);
         }
     }
     $data = $model->getData();
     unset($model);
     $this->toData($data);
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:80,代码来源:admin_ui.php

示例10: pref_submit

$text .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><label for='admin-separate-plugins'>" . PRFLAN_204 . "</label></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->radio_switch('admin_separate_plugins', $pref['admin_separate_plugins']) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_205 . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t" . pref_submit('admindisp') . "\n\t\t</fieldset>\n\n\t";
// Date options.
$ga = new convert();
$date1 = $ga->convert_date(time(), "short");
$date2 = $ga->convert_date(time(), "long");
$date3 = $ga->convert_date(time(), "forum");
$date4 = e107::getDate()->convert(time(), "input");
$text .= "\n\t\t<fieldset class='e-hideme' id='core-prefs-date'>\n\t\t\t<legend>" . PRFLAN_21 . "</legend>\n\t\t\t<table class='table adminform'>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col class='col-label' />\n\t\t\t\t\t<col class='col-control' />\n\t\t\t\t</colgroup>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><label for='shortdate'>" . PRFLAN_22 . "</label></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->text('shortdate', $pref['shortdate'], 50) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_83 . ": {$date1}</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><label for='longdate'>" . PRFLAN_23 . "</label></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->text('longdate', $pref['longdate'], 50) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_83 . ": {$date2}</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><label for='forumdate'>" . PRFLAN_24 . "</label></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->text('forumdate', $pref['forumdate'], 50) . "\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_83 . ": {$date3}</div>\n\t\t\t\t\t\t\t<div class='field-help'>" . PRFLAN_25 . " <a href='http://www.php.net/manual/en/function.strftime.php' rel='external'>" . PRFLAN_93 . "</a></div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
$def = strtotime('December 21, 2012 3:45pm');
$inputdate = array("%A, %d %B, %Y" => strftime("%A, %d %B, %Y", $def), "%A, %d %b, %Y" => strftime("%A, %d %b, %Y", $def), "%a, %d %B, %Y" => strftime("%a, %d %B, %Y", $def), "%a, %d %b, %Y" => strftime("%a, %d %b, %Y", $def), "%A, %B %d, %Y" => strftime("%A, %B %d, %Y", $def), "%A, %b %d, %Y" => strftime("%A, %b %d, %Y", $def), "%A, %b %d, %y" => strftime("%A, %b %d, %y", $def), "%B %d, %Y" => strftime("%B %d, %Y", $def), "%b %d, %Y" => strftime("%b %d, %Y", $def), "%b %d, %y" => strftime("%b %d, %y", $def), "%d %B, %Y" => strftime("%d %B, %Y", $def), "%d %b, %Y" => strftime("%d %b, %Y", $def), "%d %b, %y" => strftime("%d %b, %y", $def), "%Y-%m-%d" => strftime("%Y-%m-%d", $def), "%d-%m-%Y" => strftime("%d-%m-%Y", $def), "%m/%d/%Y" => strftime("%m/%d/%Y", $def));
$inputtime = array();
$inputtime["%I:%M %p"] = strftime("%I:%M %p", $def);
if (e107::getDate()->supported('P')) {
    $inputtime["%I:%M %P"] = strftime("%I:%M %P", $def);
}
if (e107::getDate()->supported('l')) {
    $inputtime["%l:%M %p"] = strftime("%l:%M %p", $def);
    $inputtime["%l:%M %P"] = strftime("%l:%M %P", $def);
}
$inputtime["%H:%M"] = strftime("%H:%M", $def);
$inputtime["%H:%M:%S"] = strftime("%H:%M:%S", $def);
$text .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><label for='inputdate'>" . PRFLAN_230 . "</label></td>\n\t\t\t\t\t\t<td class='form-inline'>\n\t\t\t\t\t\t\t" . $frm->select('inputdate', $inputdate, e107::getPref('inputdate'));
$text .= $frm->select('inputtime', $inputtime, e107::getPref('inputtime'));
$text .= "\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><label for='time-offset'>" . PRFLAN_26 . "</label></td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t" . $frm->select_open('time_offset', 'class=tbox select time-offset');
//use form handler because of the tabindex
$toffset = array("-12", "-11", "-10", "-9", "-8", "-7", "-6", "-5", "-4", "-3", "-2", "-1", "0", "+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8", "+9", "+10", "+11", "+12", "+13", "+14", "+15", "+16");
if (!isset($pref['time_offset'])) {
    $pref['time_offset'] = "0";
}
//XXX TODO FIXME - Do we still need this?
foreach ($toffset as $o) {
开发者ID:8moustapha8,项目名称:e107,代码行数:31,代码来源:prefs.php

示例11: calendar

function calendar($req_day, $req_month, $req_year, $links = NULL, $ws = "sunday")
{
    $pref = e107::getPref();
    // prepare the day array
    $darray = e107::getDate()->terms('day-shortest');
    $marray = e107::getDate()->terms('month');
    // what day does the week start on?
    switch ($ws) {
        case "monday":
            $ws = "1";
            break;
        case "sunday":
            array_unshift($darray, array_pop($darray));
            $ws = "0";
    }
    // what's the padding we should use for the cells?
    $padding = isset($pref['blogcal_padding']) && $pref['blogcal_padding'] ? $pref['blogcal_padding'] : "2";
    $date = mktime(0, 0, 0, $req_month, 1, $req_year);
    $last_day = date('t', $date);
    $date_info = getdate($date);
    $day_of_week = $date_info['wday'];
    if ($ws && $day_of_week == 0) {
        $day_of_week = 7;
    }
    // print the daynames
    $calendar = "<table class='table blogcalendar fborder'>";
    $calendar .= '<thead><tr>';
    foreach ($darray as $dheader) {
        $calendar .= "<th class='forumheader blogcalendar-day-name'><span class='smalltext'>{$dheader}</span></th>";
    }
    $calendar .= "</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>";
    $calendar .= '<tr>';
    $day_of_month = 1;
    $tablerow = 1;
    // take care of the first "empty" days of the month
    if ($day_of_week - $ws > 0) {
        $calendar .= "<td class='muted blogcalendar-day-empty' colspan='";
        $calendar .= $day_of_week - $ws;
        $calendar .= "'>&nbsp;</td>";
    }
    // print the days of the month (take the $ws into account)
    while ($day_of_month <= $last_day) {
        if ($day_of_week - $ws == 7) {
            #start a new week
            $calendar .= "</tr><tr>";
            $day_of_week = 0 + $ws;
            $tablerow++;
        }
        if ($day_of_month == $req_day) {
            $day_style = isset($links[$day_of_month]) ? "indent blogcalendar-day-active" : "forumheader3 blogcalendar-day";
        } else {
            $day_style = isset($links[$day_of_month]) ? "indent blogcalendar-day-active " : "forumheader3 blogcalendar-day";
        }
        $label_style = isset($links[$day_of_month]) ? 'label label-info' : '';
        //TODO A pref in admin to choose between info, danger, etc.
        $calendar .= "<td class='{$day_style}' >";
        $calendar .= isset($links[$day_of_month]) ? "<a class='blogcalendar-day-link' href='" . $links[$day_of_month] . "'>" : "";
        $calendar .= "<span class='smalltext blogcalendar-day-link {$label_style}'>";
        $calendar .= $day_of_month;
        $calendar .= "</span>";
        $calendar .= isset($links[$day_of_month]) ? "</a>" : "";
        $calendar .= "</td>";
        $day_of_month++;
        $day_of_week++;
    }
    if ($day_of_week - $ws != 7) {
        $calendar .= '<td class="blogcalendar-day-empty" colspan="' . (7 - $day_of_week + $ws) . '">&nbsp;</td>';
    }
    $calendar .= "</tr>";
    if ($tablerow != 6) {
        $calendar .= "<tr><td class='blogcalendar-day-empty' colspan='7'>&nbsp;</td></tr>";
    }
    $calendar .= "</tbody></table>";
    //	$calendar .= "tablerow = ".$tablerow;
    if (deftrue('BOOTSTRAP')) {
        $active = date("n-Y") == $req_month . "-" . $req_year ? 'active' : '';
        $text = "<div class='item {$active}'>";
        $text .= "<h5>" . $marray[$req_month - 1] . " " . $req_year . "</h5>";
        $text .= $calendar;
        $text .= "</div>";
    } else {
        $text = $calendar;
    }
    return $text;
}
开发者ID:armpit,项目名称:e107,代码行数:85,代码来源:calendar.php

示例12: sc_goal

 function sc_goal()
 {
     $amount = $this->var['menu_item']['pd_goal_amount'];
     $currency = $this->var['menu_item']['pd_currency'];
     if (in_array($currency, array('HUF', 'JPY', 'TWD'))) {
         $formatted = number_format($amount, 0, '.', ',');
     } else {
         $formatted = number_format($amount, 2, '.', ',');
     }
     $text = LAN_PAYPAL_DONATION_FRONT_06 . ' <strong>' . $formatted . ' ' . $currency . '</strong>';
     $goalDate = $this->var['menu_item']['pd_goal_date'];
     if ((int) $goalDate > 0) {
         $format = isset($this->plugPrefs['date_format']) ? $this->plugPrefs['date_format'] : 'short';
         $date = e107::getDate();
         $text .= ' ' . LAN_PAYPAL_DONATION_FRONT_10;
         $text .= ' <strong>' . $date->convert_date($goalDate, $format) . '</strong>';
     }
     return $text;
 }
开发者ID:lonalore,项目名称:paypal_donation,代码行数:19,代码来源:paypal_donation_shortcodes.php

示例13: sc_latest_comment_time

 /**
  * Comment created time.
  */
 function sc_latest_comment_time()
 {
     $format = isset($this->plugPrefs['date_format']) ? $this->plugPrefs['date_format'] : 'relative';
     $date = e107::getDate();
     return $date->convert_date($this->var['comment_datestamp'], $format);
 }
开发者ID:lonalore,项目名称:nodejs_comment,代码行数:9,代码来源:nodejs_comment_shortcodes.php

示例14: strptime

 function strptime($str, $format)
 {
     return e107::getDate()->strptime($str, $format);
 }
开发者ID:armpit,项目名称:e107,代码行数:4,代码来源:php_compatibility_handler.php

示例15: sc_user_daysregged

 function sc_user_daysregged($parm)
 {
     return e107::getDate()->computeLapse($this->var['user_join']) . " " . LAN_USER_34;
 }
开发者ID:JBeezygit,项目名称:e107,代码行数:4,代码来源:user_shortcodes.php


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