本文整理汇总了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;
}
示例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;
}
示例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();" /> ' . "\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";
}
}