mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 06:09:55 +09:00
Calendar 여러개 지원
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3342 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b6d51b3635
commit
e9e8f89d7d
3 changed files with 33 additions and 40 deletions
|
|
@ -44,39 +44,38 @@
|
|||
if(!$this->grant->view) return $this->dispLifepodMessage('msg_not_permitted');
|
||||
|
||||
$oLifepodModel = &getModel('lifepod');
|
||||
|
||||
Context::get('member_srl', $this->member_srl);
|
||||
if($this->member_srl)
|
||||
{
|
||||
$args->member_srl = $this->member_srl;
|
||||
}
|
||||
else
|
||||
{
|
||||
$oLifepodModel->setInfo($this->module_info->calendar_address);
|
||||
}
|
||||
$caladdresses = split(", ", $this->module_info->calendar_address);
|
||||
$cYear = Context::get('year');
|
||||
$cMonth = Context::get('month');
|
||||
$cDay = Context::get('day');
|
||||
|
||||
$page = $oLifepodModel->getPage($cYear, $cMonth, $cDay);
|
||||
foreach ($page->data as $key => $val)
|
||||
{
|
||||
if($val->childNodes["date-start"])
|
||||
{
|
||||
$val->childNodes["date-start"]->body = $this->dateFormatChange($val->childNodes["date-start"]->body);
|
||||
}
|
||||
if($val->childNodes["date-end"])
|
||||
{
|
||||
$plus = 0;
|
||||
if($val->childNodes["type"]->body == "daylong")
|
||||
$plus = -1;
|
||||
$val->childNodes["date-end"]->body = $this->dateFormatChange($val->childNodes["date-end"]->body, $plus);
|
||||
}
|
||||
|
||||
$val->childNodes["description"]->body = str_replace("\n", "<BR />", $val->childNodes["description"]->body);
|
||||
$calendars = array();
|
||||
|
||||
foreach($caladdresses as $key => $val)
|
||||
{
|
||||
$page = $oLifepodModel->getPage($val, $cYear, $cMonth, $cDay);
|
||||
foreach ($page->data as $key => $val)
|
||||
{
|
||||
if($val->childNodes["date-start"])
|
||||
{
|
||||
$val->childNodes["date-start"]->body = $this->dateFormatChange($val->childNodes["date-start"]->body);
|
||||
}
|
||||
|
||||
if($val->childNodes["date-end"])
|
||||
{
|
||||
$plus = 0;
|
||||
if($val->childNodes["type"]->body == "daylong")
|
||||
$plus = -1;
|
||||
$val->childNodes["date-end"]->body = $this->dateFormatChange($val->childNodes["date-end"]->body, $plus);
|
||||
}
|
||||
|
||||
$val->childNodes["description"]->body = str_replace("\n", "<BR />", $val->childNodes["description"]->body);
|
||||
}
|
||||
$calendars[] = $page;
|
||||
|
||||
}
|
||||
|
||||
Context::set('page', $page);
|
||||
Context::set('calendars', $calendars);
|
||||
|
||||
$this->setTemplateFile('list');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue