Example #1
0
File: rss.php Project: peb317/gbamn
<item>
<title><?php 
    echo specialchars_replace($view['wr_subject']);
    ?>
</title>
<link><?php 
    echo specialchars_replace(G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&wr_id=' . $view['wr_id']);
    ?>
</link>
<description><![CDATA[<?php 
    echo $view['wr_content'];
    ?>
]]></description>
<dc:creator><?php 
    echo specialchars_replace($view['wr_name']);
    ?>
</dc:creator>
<?php 
    $date = $view['wr_datetime'];
    // rss 리더 스킨으로 호출하면 날짜가 제대로 표시되지 않음
    //$date = substr($date,0,10) . "T" . substr($date,11,8) . "+09:00";
    $date = date('r', strtotime($date));
    ?>
<dc:date><?php 
    echo $date;
    ?>
</dc:date>
</item>

<?php 
Example #2
0
$subj1 = specialchars_replace($row[gr_subject], 255);
echo "<?xml version=\"1.0\" encoding=\"{$g4['charset']}\"?>\n";
echo "<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n";
echo "<channel>\n";
echo "<title>" . specialchars_replace("{$config['cf_title']} > {$subj1} > {$subj2}") . "</title>\n";
echo "<link>" . specialchars_replace("{$g4['url']}/{$g4['bbs']}/board.php?bo_table={$bo_table}") . "</link>\n";
echo "<description>테스트 버전 0.2 (2004-04-26)</description>\n";
echo "<language>ko</language>\n";
$sql = " select wr_id, wr_subject, wr_content, wr_name, wr_datetime, wr_option \n           from {$g4['write_prefix']}{$bo_table} \n          where wr_is_comment = 0 \n            and wr_option not like '%secret%'\n          order by wr_num, wr_reply limit 0, {$lines} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $file = "";
    if (strstr($row[wr_option], 'html')) {
        $html = 1;
    } else {
        $html = 0;
    }
    echo "<item>\n";
    echo "<title>" . specialchars_replace($row[wr_subject]) . "</title>\n";
    echo "<link>" . specialchars_replace("{$g4['url']}/{$g4['bbs']}/board.php?bo_table={$bo_table}&wr_id={$row['wr_id']}") . "</link>\n";
    echo "<description><![CDATA[" . $file . conv_content($row[wr_content], $html) . "]]></description>\n";
    echo "<dc:creator>" . specialchars_replace($row[wr_name]) . "</dc:creator>\n";
    $date = $row[wr_datetime];
    // rss 리더 스킨으로 호출하면 날짜가 제대로 표시되지 않음
    //$date = substr($date,0,10) . "T" . substr($date,11,8) . "+09:00";
    $date = date('r', strtotime($date));
    echo "<dc:date>{$date}</dc:date>\n";
    echo "</item>\n";
}
echo "</channel>\n";
echo "</rss>\n";
Example #3
0
    //$date = substr($date,0,10) . "T" . substr($date,11,8) . "+09:00";
    $date = date('r', $date);
    ?>
	<item>
	<title><?php 
    echo specialchars_replace(apms_get_text($row['it_name']));
    ?>
</title>
	<link><?php 
    echo specialchars_replace($link);
    ?>
</link>
	<description><![CDATA[<?php 
    echo conv_content($rss_img . $rss_content, 1);
    ?>
]]></description>
	<dc:creator><?php 
    echo specialchars_replace($author['mb_nick']);
    ?>
</dc:creator>
	<dc:date><?php 
    echo $date;
    ?>
</dc:date>
	</item>
<?php 
}
?>
</channel>
</rss>
Example #4
0
 /**
  * gets an RDF URI
  * WARNING: conflict detection is only possible for those loomp users who created and saved at least one mashup/fragment !!!
  * 	  : If such a conflict is detected a new URI will be generated by appending "_" .i++
  *
  * @param  string    $title    identifier to get uri for (may be an e-Mail address)
  * @param  Resource  $type	   RDF Type
  * @return string              RDF URI for this item
  */
 public function getUriForTitle($title, $type)
 {
     $conflict = true;
     if (trim($title) == "" || true) {
         // always use hashes
         $title = md5(microtime() . $type . rand(0, time()));
     }
     $baseuri = LOOMP_BASE_PATH . "/" . strtolower(basename($type->getURI())) . "/" . substr(specialchars_replace($title), 0, 70);
     $uri = $baseuri;
     $i = 1;
     do {
         $uri_res = new Resource($uri);
         if (!$this->rdfModel->findFirstMatchingStatement($uri_res, NULL, NULL) && !$this->rdfModel->findFirstMatchingStatement(NULL, NULL, $uri_res) && !in_array($uri, $this->lpUsedUris)) {
             $conflict = false;
         } else {
             $uri = $baseuri . '_' . $i;
             $i++;
         }
     } while ($conflict);
     $this->lpUsedUris[] = $uri;
     return $uri;
 }