From d23c5896bc0a5b05e92f674190e0d3fb08dc0c18 Mon Sep 17 00:00:00 2001 From: wlx Date: Sun, 20 Dec 2009 07:54:34 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8F=8F=E8=BF=B0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E7=AE=80=E7=9F=AD=E5=A4=84=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5300=E5=AD=97=E4=B8=BA=E7=95=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 63b4ec95..811f3d33 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -275,8 +275,12 @@ class DataController extends Zend_Controller_Action $timexml=''; foreach($rows as $row) { $timexml.=''.htmlspecialchars($row['description']).''; + if ($row['timeend']!='') $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"'; + $timexml.= ' title="'.$row['title'].'" image="/images/westdc_40w.gif" link="/data/'.$row['uuid'].'">'; + $desc_length=mb_strlen($row['description'],"UTF-8"); + $desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8"); + if ($desc_length>300) $desc.=" ..."; + $timexml.=htmlspecialchars($desc).''; } $timexml.=''; $fp=fopen('time.xml','w');