📄 index.php
字号:
<?// +----------------------------------------------------------------------+// | Feed, an RRS browser/manager based on the fase 4 RSS parser |// | Copyright (c) 2002 Kevin Clevenger (ksc@beehive.nu) |// | http://www.beehive.nu/feed/ |// +----------------------------------------------------------------------+// | The contents of this file are subject to the GNU Public License |// | You may obtain a copy of the GNU Public License at: |// | http://www.gnu.org/licenses/gpl.html |// | |// | Software distributed under the License is distributed on an "AS IS" |// | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |// | the License for the specific language governing rights and |// | limitations under the License. |// +----------------------------------------------------------------------+// +----------------------------------------------------------------------+// | Fase 4 - http://www.fase4.com/rdf/ |// | The contents of this file are subject to the Mozilla Public License |// | Version 1.1 (the "License"); you may not use this file except in |// | compliance with the License. You may obtain a copy of the License at |// | http://www.mozilla.org/MPL/ |// | |// | Software distributed under the License is distributed on an "AS IS" |// | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See |// | the License for the specific language governing rights and |// | limitations under the License. |// +----------------------------------------------------------------------+/*Feed is the first (quick & rough) step to what will become a smart informationand news retrieval agent. Feed uses a plain text file for storage and does not use a database of any sort at this point, and should work on any php enabled site.Setup: just unpack this distribution into a subdirectory somewhere in your web tree. Make sure that the directory 'cache' has 777 permissions, and the file 'sites' has 666 permissions. Edit the User Variables section to taste.See included channels.xml for a list of feeds.*/?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><title>• FEED •</title><link REL="stylesheet" TYPE="text/css" HREF="feed.css"> </head><?php/* User Variables */$l_width = "95%"; /* width of left side content listing */$r_width = 130; /* width of the right side menu listing */$refresh = 3600; /* when to refresh a cached rss file in seconds *//* ------------- *//* You need not change anything below here */require_once("rdf.class.php");$rdf = new fase4_rdf;$rdf->use_dynamic_display(true);$rdf->set_refresh($refresh);$rdf->set_table_width($l_width);$fp = fopen ("sites", "r");if (!$fp) { echo "Couldn't open sites file. Please make sure that the text file 'sites' exists in this directory and is world writeable"; } else { while (!feof($fp)) { $line_arr = explode (",", fgets($fp, 1024)); if ($line_arr[1]) { $rdf_arr = array_merge( $rdf_arr, array(trim($line_arr[0])=>trim($line_arr[1])) ); } } if (sizeof($rdf_arr) > 0) { ksort($rdf_arr); } fclose($fp);}?><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="top"><? if ($_REQUEST['site'] > '') { foreach ($rdf_arr as $key=>$val) { if ($key == stripslashes(urldecode($_REQUEST['site']))) { echo "<h1>$key</h1>"; $rdf->parse_RDF($val); $rdf->finish(); } } } elseif ($_REQUEST['action'] > '') { include($_REQUEST['action'].".php"); }?> </td> <td width="<?= $r_width ?>" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="2" class="border"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="4" class="menu"> <tr> <th>• Feed •</th> </tr> <tr> <td><? if (sizeof($rdf_arr) > 0) { foreach ($rdf_arr as $key=>$val) { echo "<li><a href=\"?site=".urlencode($key)."\">$key</a></li>"; } }?> <br> <li><a href="?action=add">Add/Delete</a></li> </td> </tr> </table> </td> </tr> </table> </td> </tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -