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


PHP calendar_event::LoadItem方法代碼示例

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


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

示例1: editEvent

<?php 
if ($events_exist) {
    ?>
    <table cellspacing="1" border="0" class="list" width="100%">
    <tr>
        <th width="2%">№</th>
        <th width="18%">Срок</th>
        <th width="78%">Тема</th>
        <th width="2%">&nbsp;</th>
    </tr>
<?php 
    $event = new calendar_event();
    for ($i = 0; $i < count($day_events); $i++) {
        $event->Init();
        $event->LoadItem($day_events[$i]);
        if (!trim($event->what)) {
            $event->what = 'Без темы';
        }
        ?>
    <tr ondblclick="return editEvent(<?php 
        echo $event->id_event;
        ?>
);" class="active" title="Двойной щелчёк для редактирования">
        <td><?php 
        echo $i + 1;
        ?>
.</td>
        <td nowrap><?php 
        echo format_date('{d}/{m}/{Y}', $event->start_date);
        ?>
開發者ID:YuriyRusinov,項目名稱:reper,代碼行數:30,代碼來源:day.php

示例2: editEvent

<?php 
if ($events_exist) {
    ?>
    <table cellspacing="1" border="0" class="list" width="100%">
    <tr>
        <th width="2%">№</th>
        <th width="18%">Срок</th>
        <th width="78%">Тема</th>
        <th width="2%">&nbsp;</th>
    </tr>
<?php 
    $event = new calendar_event();
    for ($i = 0; $i < count($week_events); $i++) {
        $event->Init();
        $event->LoadItem($week_events[$i]);
        if (!trim($event->what)) {
            $event->what = 'Без темы';
        }
        ?>
    <tr ondblclick="return editEvent(<?php 
        echo $event->id_event;
        ?>
);" class="active" title="Двойной щелчёк для редактирования">
        <td><?php 
        echo $i + 1;
        ?>
.</td>
        <td nowrap><?php 
        echo format_date('{d}/{m}/{Y}', $event->start_date);
        ?>
開發者ID:YuriyRusinov,項目名稱:reper,代碼行數:30,代碼來源:week.php

示例3: date

$where[] = '"mark"=\'yes\'';
$where[] = '"completed"=\'no\'';
$date = date('Y-m-01');
$start_day = strtotime('-1 months', strtotime($date));
$stop_day = strtotime('+3 months -1 day', $start_day);
$stop_date = date('Y-m-d', $stop_day);
$start_date = date('Y-m-d', $start_day);
$where[] = '"start_date"<=\'' . $stop_date . '\' AND "stop_date">=\'' . $start_date . '\'';
$query = 'SELECT * FROM ' . TABLE_CALENDAR_EVENT . ' WHERE ' . join(' AND ', $where) . ' ';
$db->query($query);
if (count($db->value) > 0) {
    $events = $db->value;
    $event = new calendar_event();
    for ($i = 0; $i < count($events); $i++) {
        $event->Init();
        $event->LoadItem($events[$i]);
        $start = strtotime($event->start_date);
        $start = $start > $start_day ? $start : $start_day;
        $stop = strtotime($event->stop_date);
        $stop = $stop < $stop_day ? $stop : $stop_day;
        while ($start <= $stop) {
            $dates[date('Y', $start)][date('n', $start)][date('j', $start)] = 1;
            $start = strtotime('+1 day', $start);
        }
    }
    $selector = '#yahoo-com3.yui-skin-eco .yui-calendar.y2000 .m0 .d0 a';
    foreach ($dates as $year => $monthes) {
        foreach ($monthes as $month => $days) {
            foreach ($days as $day => $val) {
                $selector .= ',' . "\n\r" . '#yahoo-com3.yui-skin-eco .yui-calendar.y' . $year . ' .m' . $month . ' .d' . $day . ' a';
            }
開發者ID:YuriyRusinov,項目名稱:reper,代碼行數:31,代碼來源:calendar3.php


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