當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JEVHelper::getWeekdayLetter方法代碼示例

本文整理匯總了PHP中JEVHelper::getWeekdayLetter方法的典型用法代碼示例。如果您正苦於以下問題:PHP JEVHelper::getWeekdayLetter方法的具體用法?PHP JEVHelper::getWeekdayLetter怎麽用?PHP JEVHelper::getWeekdayLetter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JEVHelper的用法示例。


在下文中一共展示了JEVHelper::getWeekdayLetter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildWeekDaysCheck

 public static function buildWeekDaysCheck($reccurweekdays, $args, $name = "reccurweekdays")
 {
     // get array
     $day_name = JEVHelper::getWeekdayLetter(null, 1);
     $day_name[0] = '<span class="sunday">' . $day_name[0] . '</span>';
     $day_name[6] = '<span class="saturday">' . $day_name[6] . '</span>';
     $tosend = '';
     if ($reccurweekdays === '') {
         $split = array();
         $countsplit = 0;
     } else {
         $split = explode('|', $reccurweekdays);
         $countsplit = count($split);
     }
     for ($a = 0; $a < 7; $a++) {
         $checked = '';
         for ($x = 0; $x < $countsplit; $x++) {
             if ($split[$x] == $a) {
                 $checked = ' checked="checked"';
             }
         }
         // bootstrap version
         $tosend .= '' . '<label for="cb_wd' . $a . '" class="checkbox btn">' . '<input type="checkbox" id="cb_wd' . $a . '" name="' . $name . '[]" value="' . $a . '" ' . $args . $checked . ' onclick="updateRepeatWarning();" class="checkbox " />' . $day_name[$a] . '</label>' . "\n";
     }
     echo $tosend;
 }
開發者ID:hriggs,項目名稱:cs-website,代碼行數:26,代碼來源:jeventshtml.php

示例2: getAjaxCal

 function getAjaxCal($modid = 0, $month, $year)
 {
     // capture module id so that we can use it for ajax type navigation
     if ($modid != 0) {
         $this->_modid = $modid;
     }
     $user =& JFactory::getUser();
     $db =& JFactory::getDBO();
     static $isloaded_css = false;
     // this will get the viewname based on which classes have been implemented
     $cfg =& JEVConfig::getInstance();
     $viewname = ucfirst($cfg->get('com_calViewName', "default"));
     $cfg =& JEVConfig::getInstance();
     // get array
     $day_name = JEVHelper::getWeekdayLetter(null, 1);
     $day_name[0] = '<span class="sunday">' . $day_name[0] . '</span>';
     $day_name[6] = '<span class="saturday">' . $day_name[6] . '</span>';
     $content = "";
     $mod = "";
     if (isset($this->_modid) && $this->_modid > 0) {
         $mod = 'id="modid_' . $this->_modid . '" ';
         $content .= "<span id='testspan" . $this->_modid . "' style='display:none'></span>\n";
     }
     $temptime = JevDate::mktime(12, 0, 0, $month, 15, $year);
     //$content .= $this->_displayCalendarMod($temptime,$this->com_starday, JText::_('JEV_THIS_MONTH'),$day_name, false);
     $thisDayOfMonth = date("j", $temptime);
     $daysLeftInMonth = date("t", $temptime) - date("j", $temptime) + 1;
     // calculate month offset from first of month
     $first_of_current_month = JevDate::strtotime(date('Y-m-01', $temptime));
     $base_year = date("Y", $temptime);
     $base_month = date("m", $temptime);
     $basefirst_of_month = JevDate::mktime(0, 0, 0, $base_month, 1, $base_year);
     if ($this->disp_lastMonth && (!$this->disp_lastMonthDays || $thisDayOfMonth <= $this->disp_lastMonthDays)) {
         $content .= $this->_displayCalendarMod(JevDate::strtotime("-1 month", $first_of_current_month), $this->com_starday, JText::_('JEV_LAST_MONTH'), $day_name, $this->disp_lastMonth == 2, $first_of_current_month);
     }
     $content .= $this->_displayCalendarMod($temptime, $this->com_starday, JText::_('JEV_THIS_MONTH'), $day_name, false, $first_of_current_month);
     if ($this->disp_nextMonth && (!$this->disp_nextMonthDays || $daysLeftInMonth <= $this->disp_nextMonthDays)) {
         $content .= $this->_displayCalendarMod(JevDate::strtotime("+1 month", $first_of_current_month), $this->com_starday, JText::_('JEV_NEXT_MONTH'), $day_name, $this->disp_nextMonth == 2, $first_of_current_month);
     }
     return $content;
 }
開發者ID:affiliatelk,項目名稱:ecc,代碼行數:41,代碼來源:calendar.php

示例3: buildWeekDaysCheck

 public static function buildWeekDaysCheck($reccurweekdays, $args, $name = "reccurweekdays")
 {
     // get array
     $day_name = JEVHelper::getWeekdayLetter(null, 1);
     $day_name[0] = '<span class="sunday">' . $day_name[0] . '</span>';
     $day_name[6] = '<span class="saturday">' . $day_name[6] . '</span>';
     $tosend = '';
     if ($reccurweekdays === '') {
         $split = array();
         $countsplit = 0;
     } else {
         $split = explode('|', $reccurweekdays);
         $countsplit = count($split);
     }
     for ($a = 0; $a < 7; $a++) {
         $checked = '';
         for ($x = 0; $x < $countsplit; $x++) {
             if ($split[$x] == $a) {
                 $checked = ' checked="checked"';
             }
         }
         if (JevJoomlaVersion::isCompatible("3.0") || JComponentHelper::getParams(JEV_COM_COMPONENT)->get("useboostrap", 1)) {
             // bootstrap version
             $tosend .= '' . '<input type="checkbox" id="cb_wd' . $a . '" name="' . $name . '[]" value="' . $a . '" ' . $args . $checked . ' onclick="updateRepeatWarning();" class="checkbox btn" />' . '<label for="cb_wd' . $a . '" class="checkbox btn">' . $day_name[$a] . '</label>' . "\n";
         } else {
             $tosend .= '<li  class="r' . ($a % 2 + 1) . '" >' . '<label for="cb_wd' . $a . '">' . '<input type="checkbox" id="cb_wd' . $a . '" name="' . $name . '[]" value="' . $a . '" ' . $args . $checked . ' onclick="updateRepeatWarning();" />&nbsp;' . "\n" . $day_name[$a] . '</label></li>' . "\n";
         }
     }
     if (JevJoomlaVersion::isCompatible("3.0") || JComponentHelper::getParams(JEV_COM_COMPONENT)->get("useboostrap", 1)) {
         echo $tosend;
     } else {
         echo "<ul>\n" . $tosend . "\n</ul>\n";
     }
 }
開發者ID:pguilford,項目名稱:vcomcc,代碼行數:34,代碼來源:jeventshtml.php


注:本文中的JEVHelper::getWeekdayLetter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。