当前位置: 首页>>代码示例>>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;未经允许,请勿转载。