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


PHP request::openHoliday方法代码示例

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


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

示例1: header

 * (at your option) any later version.
 */
$checkSession = true;
require_once "../includes/library.php";
if ($_SESSION['profilSession'] != 0) {
    header('Location: ../general/permissiondenied.php');
    exit;
}
$breadcrumbs[] = buildLink('../administration/admin.php', $strings['administration'], LINK_INSIDE);
$breadcrumbs[] = $strings['holidays'];
$pageSection = 'admin';
require_once '../themes/' . THEME . '/header.php';
$block1 = new block();
$block1->headingForm($strings['delete_holidays']);
$block1->openContent();
$block1->contentTitle($strings["delete_following"]);
$block1->form = 'hoP';
$block1->openForm("../administration/listholidays.php?action=delete&id={$id}");
$id = str_replace("**", ",", $id);
$tmpquery = "WHERE hol.id IN({$id}) ORDER BY hol.comments";
$listHoliday = new request();
$listHoliday->openHoliday($tmpquery);
$comptListHoliday = count($listHoliday->hol_id);
for ($i = 0; $i < $comptListHoliday; $i++) {
    echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">#" . $listHoliday->hol_id[$i] . "</td><td>" . $listHoliday->hol_comments[$i] . "</td></tr>";
}
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"submit\" name=\"delete\" \nvalue=\"" . $strings["delete"] . "\"> <input type=\"button\" name=\"cancel\" value=\"" . $strings["cancel"] . "\" \nonClick=\"history.back();\"></td></tr>";
$block1->closeForm();
$block1->closeContent();
$block1->headingForm_close();
require_once "../themes/" . THEME . "/footer.php";
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:deleteholidays.php

示例2: block

$block1 = new block();
$block1->headingForm($strings['new_holiday']);
$block1->openContent();
$block1->form = 'hoT';
$block1->openForm("../administration/listholidays.php?action=add&amp;d=" . $d . "&amp;c=" . $c . "#" . $block1->form . "Anchor");
$block1->contentRow($strings["date"], "<input type=\"text\" style=\"width: 150px;\" name=\"d\" id=\"sel1\" size=\"20\" value=\"{$sd}\"><button type=\"reset\" id=\"trigger_a\">...</button><script type=\"text/javascript\">Calendar.setup({ inputField:\"sel1\", button:\"trigger_a\" });</script>");
$block1->contentRow($strings["comments"], "<textarea rows=\"10\" style=\"width: 400px; height: 160px;\" name=\"c\" cols=\"47\">{$c}</textarea>");
echo "<tr class=\"odd\"><td valign=\"top\" class=\"leftvalue\">&nbsp;</td><td><input type=\"SUBMIT\" value=\"" . $strings["save"] . "\"></td></tr>";
$block1->closeContent();
$block1->heading($strings["holidays"]);
$block1->openPaletteIcon();
$block1->paletteIcon(1, "remove", $strings["delete"]);
$block1->closePaletteIcon();
$tmpquery = " ORDER BY hol.date DESC";
$holidayList = new request();
$holidayList->openHoliday($tmpquery);
$comptHolidayList = count($holidayList->hol_id);
$block1->recordsTotal = $comptHolidayList;
if ($comptHolidayList > 0) {
    $block1->openResults();
    $block1->labels($labels = array(0 => $strings['date'], 1 => $strings['comments']), 'true', $sorting = false, $sortingOff = array(0 => '0', 1 => 'DESC'));
    for ($i = 0; $i < $comptHolidayList; $i++) {
        $block1->openRow($holidayList->hol_id[$i]);
        $block1->checkboxRow($holidayList->hol_id[$i]);
        $block1->cellRow($holidayList->hol_date[$i]);
        $block1->cellRow($holidayList->hol_comments[$i]);
        $block1->closeRow();
    }
    $block1->closeResults();
} else {
    $block1->noresults();
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:listholidays.php

示例3: hours_before

/**
 * Return date some hours before
 *
 * @param string $date1 Date to compare
 * @param string $hour1 Hours before
 * @access public
 */
function hours_before($date1, $hour1)
{
    global $dayHourArray;
    $timestamp1 = date2timestamp($date1);
    $diff = 0;
    while ($diff < $hour1) {
        $currDate = date("Y-m-d", $timestamp1);
        $tmpquery = " WHERE hol.date='{$currDate}'";
        $listHoliday = new request();
        $listHoliday->openHoliday($tmpquery);
        $comptListHoliday = count($listHoliday->hol_id);
        if ($comptListHoliday == 0) {
            $weekDay = date("w", $timestamp1);
            $diff += $dayHourArray[$weekDay];
            if ($diff >= $hour1) {
                break;
            }
        }
        $timestamp1 -= 3600 * 24;
    }
    return date("Y-m-d", $timestamp1);
}
开发者ID:jgatica,项目名称:Netoffice,代码行数:29,代码来源:library.php


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