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