本文整理汇总了PHP中getHoliday函数的典型用法代码示例。如果您正苦于以下问题:PHP getHoliday函数的具体用法?PHP getHoliday怎么用?PHP getHoliday使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getHoliday函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
//echo "$today ";
$yy = date('Y',$date);
$mm = date('m',$date);
$dd = date('d',$date);
echo "<tr c>";
echo "<td>";
echo "$dd-$mm-$yy";
echo "</td>";
echo "<td>";
$data_date=$yy."-".$mm."-".$dd;
$check_day = mktime(0, 0, 0,$mm,$dd,$yy);
$holiday=getHoliday('holiday_name',$data_date);
$check_cl_pl=getTakenLeave($emp_id,$data_date);
$weekday = date("l", mktime(0,0,0,$mm,$dd,$yy));
if($check_cl_pl!="")
{
echo $check_cl_pl;
}
/* else if(getweeklyoffDetail('off_day',$emp_id,$data_date)==$weekday)
{
$date_before=date('Y-m-d',mktime(0,0,0,$mm,$dd-1,$yy));
$date_after=date('Y-m-d',mktime(0,0,0,$mm,$dd+1,$yy));
if(getTakenLeave($emp_id,$date_before)!="" and getTakenLeave($emp_id,$date_after!=""))
{
示例2: if
$Total++;
}
} else if (getHoliday('rec_id', $date_before) != "") {
if (validate_weekoff_before($row['id'], $mm, $dd - 1, $yy)) {
$wo++;
$leave_status = 'w';
if ($row['employee_typ'] != 'daily_wages') {
$Total++;
}
} else {
$wo++;
$Total++;
$leave_status = 'w';
}
} else if (getHoliday('rec_id', $date_after) != "") {
if (validate_weekoff_after($row['id'], $mm, $dd + 1, $yy)) {
$wo++;
$leave_status = 'w';
if ($row['employee_typ'] != 'daily_wages') {
$Total++;
}
}
} else if (getLeavestatusBydate($row['id'], $date1) == "" or getLeavestatusBydate($row['id'], $date1) == "A") {
if ($before_date == 'Pl' && $after_date == 'Pl') {
$leave_status = 'Pl';
$Pl++;
$Total++;
} else if ($before_date == 'A' && $after_date == 'A') {
$leave_status = 'A';
$absent++;
示例3: action_editholiday
/**
* This function is used for adding/editing a specific holiday
*
* @uses ManageCalendar template, edit_holiday sub template
*/
public function action_editholiday()
{
global $txt, $context;
//We need this, really..
require_once SUBSDIR . '/Calendar.subs.php';
loadTemplate('ManageCalendar');
$context['is_new'] = !isset($_REQUEST['holiday']);
$context['page_title'] = $context['is_new'] ? $txt['holidays_add'] : $txt['holidays_edit'];
$context['sub_template'] = 'edit_holiday';
// Cast this for safety...
if (isset($_REQUEST['holiday'])) {
$_REQUEST['holiday'] = (int) $_REQUEST['holiday'];
}
// Submitting?
if (isset($_POST[$context['session_var']]) && (isset($_REQUEST['delete']) || $_REQUEST['title'] != '')) {
checkSession();
// Not too long good sir?
$_REQUEST['title'] = Util::substr($_REQUEST['title'], 0, 60);
$_REQUEST['holiday'] = isset($_REQUEST['holiday']) ? (int) $_REQUEST['holiday'] : 0;
if (isset($_REQUEST['delete'])) {
removeHolidays($_REQUEST['holiday']);
} else {
$date = strftime($_REQUEST['year'] <= 4 ? '0004-%m-%d' : '%Y-%m-%d', mktime(0, 0, 0, $_REQUEST['month'], $_REQUEST['day'], $_REQUEST['year']));
if (isset($_REQUEST['edit'])) {
editHoliday($_REQUEST['holiday'], $date, $_REQUEST['title']);
} else {
insertHoliday($date, $_REQUEST['title']);
}
}
redirectexit('action=admin;area=managecalendar;sa=holidays');
}
// Default states...
if ($context['is_new']) {
$context['holiday'] = array('id' => 0, 'day' => date('d'), 'month' => date('m'), 'year' => '0000', 'title' => '');
} else {
$context['holiday'] = getHoliday($_REQUEST['holiday']);
}
// Last day for the drop down?
$context['holiday']['last_day'] = (int) strftime('%d', mktime(0, 0, 0, $context['holiday']['month'] == 12 ? 1 : $context['holiday']['month'] + 1, 0, $context['holiday']['month'] == 12 ? $context['holiday']['year'] + 1 : $context['holiday']['year']));
}
示例4: if
$Total++;
$flag=1;
}
}
else if($leave_status=="Pl" and (validate_weekoff_after($emp_id,$mm,$dd+1,$yy) or $after_date=="Pl" or $after_date=="Cl"))
{
$Total++;
$flag=1;
}
else if($leave_status=="Cl" and (validate_weekoff_after($emp_id,$mm,$dd+1,$yy) or $after_date=="Pl" or $after_date=="Cl"))
{
$Total++;
$flag=1;
}
}
else if(getHoliday('rec_id',$date1)!="")
{
$date_before=date('Y-m-d',mktime(0,0,0,$mm,$dd-1,$yy));
$date_after=date('Y-m-d',mktime(0,0,0,$mm,$dd+1,$yy));
$before_date=getLeavestatusBydate($emp_id,$date_before);
$after_date=getLeavestatusBydate($emp_id,$date_after);
if($before_date=='Cl')
{
$i_before = 1;
do
{
$date_before=date('Y-m-d',mktime(0,0,0,$mm,$dd-$i_before,$yy));
$before_date=getLeavestatusBydate($emp_id,$date_before);
示例5: validate_weekoff_after
function validate_weekoff_after($emp_id, $mm, $dd, $yy)
{
$date_after = date('Y-m-d', mktime(0, 0, 0, $mm, $dd + 1, $yy));
$status = getHoliday($emp_id, $date_after);
if ($status == "H") {
validate_weekoff_after($emp_id, ${$mm}, $dd, $yy);
} else {
if (getLeavestatusBydate($emp_id, $date_after) == "P" or getLeavestatusBydate($emp_id, $date_after) == "OD") {
return true;
} else {
return false;
}
}
}
示例6: isset
西暦年:<input name="year" type="text" size="8" value="{$year}" />
<input type="submit" value="計算" />
</form>
<div style="border-style:solid; border-width:1px; margin:20px 0px 0px 0px; padding:5px; width:500px; font-size:small;">
<h3>使い方</h3>
<ol>
<li>[<span style="font-weight:bold;">西暦年</span>]に西暦年を入力し、[<span style="font-weight:bold;">計算</span>] ボタンを押してください。</li>
<li>西暦年から3年間の祝日一覧が下記に表示されます。</li>
</ol>
※参考サイト:<a href="{$refere}">{$refere}</a>
</div>
<hr />
{$res}
EOT;
return $body;
}
// メイン・プログラム =======================================================
$year = isset($_GET['year']) ? $_GET['year'] : FALSE;
$msg = getHoliday($year);
$HtmlBody = makeCommonBody($year, $msg);
// 表示処理
echo $HtmlHeader;
echo $HtmlBody;
echo $HtmlFooter;
/*
** バージョンアップ履歴 ===================================================
*
* @version 1.0 2013/05/24
*/