PK
…ºa= trust/PK
…ºa= trust/modules/PK
…ºa= trust/modules/d3diary/PK
†ºa= trust/modules/d3diary/main/PK
fºa=*i߬ ¬ " trust/modules/d3diary/main/rdf.phpfunc->getpost_param('uid');
if (!empty($_uid)) {
if( (int)$_uid > 0 ){
$uid = $_uid;
$ret = $d3dConf->func->get_xoopsuname($uid);
$uname = $ret['uname'];
$name = $ret['name'];
if( $d3dConf->mod_config['use_name'] == 1 && !empty($name)) {
$uname = $name;
}
}
}
$cid = 0; $whr_cid = ""; //$cname = "";
$_cid = $d3dConf->func->getpost_param('cid');
if (!empty($_cid)) {
if( (int)$_cid > 0 ){
$cid = (int)$_cid;
$category->uid=$uid;
$category->cid=$cid;
$category->getchildren($mydirname);
$cname = $category->cname;
if($category->children){
$whr_cid =" AND d.cid IN (".implode(",",$category->children).") ";
} else {
$whr_cid =" AND d.cid=".$cid;
}
}
}
$_rss_ver = $d3dConf->func->getpost_param('ver');
$rss_ver = !empty($_rss_ver) ? htmlSpecialChars($_rss_ver, ENT_QUOTES ) : "rss1" ;
require_once(XOOPS_ROOT_PATH.'/class/template.php');
header ('Content-Type:text/xml; charset=utf-8');
$tpl = new XoopsTpl();
//$tpl->xoops_setCaching(2);
//$tpl->xoops_setCacheTime(10);
//if (!$tpl->is_cached("db:{$mydirname}_rdf.xml")) {
// get timezone offset
$_tzd = date('O', time());
$tzd = substr( chunk_split( $_tzd, 3, ':' ), 0, 6 );
$tzd2 = str_replace(":", "", substr( chunk_split( $_tzd, 3, ':' ), 0, 6 ));
global $xoopsModule;
$channel['mod_title'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($xoopsModule->name()), ENT_QUOTES);
if ($uname) {
$channel['title'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($uname), ENT_QUOTES);
$channel['lang_title'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8(_MD_DIARY_PERSON), ENT_QUOTES);
} else {
$channel['title'] = "";
$channel['lang_title'] = "";
}
$channel['description'] = $d3dConf->func->convert_encoding_utf8($xoopsConfig['sitename'].' - '.$xoopsConfig['slogan']);
$channel['language'] = _LANGCODE;
$channel['creator'] = "D3DIARY - XOOPS DIARY MODULE";
$channel['category'] = !empty($cname) ? $cname : $channel['mod_title'] ;
$channel['tzd'] = $tzd;
$channel['tzd2'] = $tzd2;
// for neglect future entry
$now = date( "Y-m-d H:i:s" );
$whr_ctime = " AND create_time<'".$now."'";
// query
$sql = "SELECT d.uid AS uid, d.bid AS bid, d.title AS title, d.diary AS diary, d.update_time AS update_time,
d.create_time AS create_time, d.dohtml as dohtml, u.uname, u.name, c.cid AS cid, c.cname AS cname
FROM ".$xoopsDB->prefix($mydirname.'_diary')." d
INNER JOIN ".$xoopsDB->prefix('users')." u USING(uid)
LEFT JOIN ".$xoopsDB->prefix($mydirname.'_config'). " cfg ON d.uid=cfg.uid
LEFT JOIN ".$xoopsDB->prefix($mydirname.'_category')." c
ON (d.cid=c.cid AND (d.uid=c.uid OR c.uid=0))
WHERE (d.openarea='0' OR d.openarea IS NULL) AND (cfg.openarea='0' OR cfg.openarea IS NULL)
AND (c.openarea='0' OR c.openarea IS NULL) ".$whr_cid.$whr_ctime;
if($uid>0){
$sql .= " AND d.uid='".$uid."' ";
}
$sql .= " ORDER BY create_time DESC LIMIT 0,30";
// item
$entry = array(); $entries = array();
$result = $xoopsDB->query($sql);
while ( $dbdat = $xoopsDB->fetchArray($result)){
$entry['title'] = empty( $dbdat['title'] ) ? constant('_MD_DIARY_NOTITLE') : $dbdat['title'];
$entry['title'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($entry['title']), ENT_QUOTES);
$entry['uri'] = XOOPS_URL.'/modules/'.$mydirname.'/index.php?page=detail&bid='.$dbdat['bid'];
$entry['link'] = htmlSpecialChars($entry['uri'], ENT_QUOTES);
$entry['uid'] = $dbdat['uid'];
if( $d3dConf->mod_config['use_name'] == 1 && !empty($dbdat['name'])) {
$entry['creator'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($dbdat['name']), ENT_QUOTES);
} else {
$entry['creator'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($dbdat['uname']), ENT_QUOTES);
}
$entry['cid'] = isset($dbdat['cid']) ? intval($dbdat['cid']) : 0 ;
$entry['cname'] = isset($dbdat['cname']) ? $dbdat['cname'] : constant('_MD_NOCNAME') ;
$tmp = split("[-: ]",$dbdat['update_time']);
$entry['update'] = xoops_getUserTimestamp(mktime($tmp[3],$tmp[4],$tmp[5],$tmp[1],$tmp[2],$tmp[0]), $tzd);
$tmp = split("[-: ]",$dbdat['create_time']);
$entry['tstamp'] = xoops_getUserTimestamp(mktime($tmp[3],$tmp[4],$tmp[5],$tmp[1],$tmp[2],$tmp[0]), $tzd);
$entry['description'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($d3dConf->func->substrTarea($dbdat['diary'], $dbdat['dohtml'], 300, true, "UTF-8")), ENT_QUOTES);
$entry['diary'] = htmlSpecialChars($d3dConf->func->convert_encoding_utf8($d3dConf->func->substrTarea($dbdat['diary'], $dbdat['dohtml'], 0, false, "UTF-8")), ENT_QUOTES);
$entries[]=$entry;
}
$channel['lastbuild'] = $entries[0]['tstamp'] ;
$tpl->assign(array(
"channel" => $channel,
"yd_data" => $entries,
"rss_ver" => $rss_ver,
"mod_url" => XOOPS_URL."/modules/".$mydirname,
"mydirname" => $mydirname,
"mod_config" => $d3dConf->mod_config,
));
// write to Template
$tpl->display("db:{$mydirname}_rdf.xml");
//}
?>
PK
‚²a= trust/modules/d3diary/templates/PK
d±a=~Tæú¢ ¢ ' trust/modules/d3diary/templates/rdf.xml
<{if $rss_ver == "rss1"}>
<{if $channel.title}><{$channel.title}><{$channel.lang_title}> - <{/if}><{$channel.mod_title}>
<{$mod_url}>/index.php
<{$channel.description}>
<{$channel.language}>
<{$channel.creator}>
<{foreach item=entry from=$yd_data}>
<{/foreach}>
<{foreach item=entry from=$yd_data}>
-
<{$entry.title}>
<{$entry.link}>
<{$entry.tstamp|formatTimestamp:"Y-m-d\TH:i:s"}><{$channel.tzd}>
<{$entry.creator}>
<{$entry.description}>
<{$entry.diary}>
<{/foreach}>
<{elseif $rss_ver == "rss2"}>
<{if $channel.title}><{$channel.title}><{$channel.lang_title}> - <{/if}><{$channel.mod_title}>
<{$mod_url}>/index.php
<{$channel.description}>
<{$channel.lastbuild|formatTimestamp:"D, d M Y H:i:s "}><{$channel.tzd2}>
http://backend.userland.com/rss/
<{$channel.creator}>
<{$channel.category}>
<{$channel.language}>
<{if $logo_url != ""}>
<{$feed.title}>
<{$channel.logo_url}>
<{$channel.link}>
<{$channel.logo_width}>
<{$channel.logo_height}>
<{/if}>
<{foreach item=entry from=$yd_data}>
-
<{$entry.title}>
<{$entry.link}>
<{$entry.description}>
<{$entry.tstamp|formatTimestamp:"D, d M Y H:i:s "}><{$channel.tzd2}>
<{$entry.link}>
<{/foreach}>
<{else}>
<{if $channel.title}><{$channel.title}><{$channel.lang_title}> - <{/if}><{$channel.mod_title}>
<{$channel.description}>
<{$mod_url}>/index.php
<{$channel.creator}>
<{$channel.description}>
<{$xoops_url}>/
<{$channel.lastbuild|formatTimestamp:"Y-m-d\TH:i:s"}><{$channel.tzd}>
<{foreach item=entry from=$yd_data}>
<{$entry.title}>
<{$entry.link}>
<{$entry.tstamp|formatTimestamp:"Y-m-d\TH:i:s"}><{$channel.tzd}>
<{$entry.update|formatTimestamp:"Y-m-d\TH:i:s"}><{$channel.tzd}>
<{$entry.creator}>
<{$entry.description}>
<{$entry.diary}>
<{/foreach}>
<{/if}>PK
…ºa= trust/PK
…ºa= $ trust/modules/PK
…ºa= P trust/modules/d3diary/PK
†ºa= „ trust/modules/d3diary/main/PK
fºa=*i߬ ¬ " ½ trust/modules/d3diary/main/rdf.phpPK
‚²a= © trust/modules/d3diary/templates/PK
d±a=~Tæú¢ ¢ ' ç trust/modules/d3diary/templates/rdf.xmlPK ð Î$