| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,61 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 4 |
+// Based on eFiction 1.1 |
|
| 5 |
+// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 6 |
+// http://efiction.sourceforge.net/ |
|
| 7 |
+// ---------------------------------------------------------------------- |
|
| 8 |
+// LICENSE |
|
| 9 |
+// |
|
| 10 |
+// This program is free software; you can redistribute it and/or |
|
| 11 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 12 |
+// as published by the Free Software Foundation; either version 2 |
|
| 13 |
+// of the License, or (at your option) any later version. |
|
| 14 |
+// |
|
| 15 |
+// This program is distributed in the hope that it will be useful, |
|
| 16 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
+// GNU General Public License for more details. |
|
| 19 |
+// |
|
| 20 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 21 |
+// ---------------------------------------------------------------------- |
|
| 22 |
+ |
|
| 23 |
+$current = "tens"; |
|
| 24 |
+ |
|
| 25 |
+include ("header.php");
|
|
| 26 |
+ |
|
| 27 |
+if(file_exists("$skindir/browse.tpl")) $tpl = new TemplatePower( "$skindir/browse.tpl" );
|
|
| 28 |
+else $tpl = new TemplatePower("default_tpls/browse.tpl");
|
|
| 29 |
+if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude("listings", "./$skindir/listings.tpl");
|
|
| 30 |
+else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" ); |
|
| 31 |
+$tpl->assignInclude( "header", "./$skindir/header.tpl" ); |
|
| 32 |
+$tpl->assignInclude( "footer", "./$skindir/footer.tpl" ); |
|
| 33 |
+ |
|
| 34 |
+$list = isset($_GET['list']) ? $_GET['list'] : false; |
|
| 35 |
+include("includes/pagesetup.php");
|
|
| 36 |
+ if(!$list) {
|
|
| 37 |
+ $output = "<div id='pagetitle'>".$pagelinks['tens']['text']."</div>"; |
|
| 38 |
+ $lists = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'L' AND panel_hidden != '1' AND panel_level = '0' ORDER BY panel_order");
|
|
| 39 |
+ if(dbnumrows($lists)) $output .= "<div class='tblborder' id='top10list' style='margin: 0 25%;'>"; |
|
| 40 |
+ while($l = dbassoc($lists)) {
|
|
| 41 |
+ $output .= "<a href='toplists.php?list=".$l['panel_name']."'>".$l['panel_title']."</a><br />"; |
|
| 42 |
+ } |
|
| 43 |
+ |
|
| 44 |
+ if(dbnumrows($lists)) $output .= "</div>"; |
|
| 45 |
+ } |
|
| 46 |
+ else {
|
|
| 47 |
+ $panelquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_name = '".escapestring($list)."' AND panel_type = 'L' LIMIT 1");
|
|
| 48 |
+ if(dbnumrows($panelquery)) {
|
|
| 49 |
+ $panel = dbassoc($panelquery); |
|
| 50 |
+ $output .= "<div id='pagetitle'>".$panel['panel_title']."</div>"; |
|
| 51 |
+ $numrows = 0; |
|
| 52 |
+ if($panel['panel_url'] && file_exists(_BASEDIR.$panel['panel_url'])) include($panel['panel_url']); |
|
| 53 |
+ else if(file_exists("toplists/{$type}.php")) include("toplists/{$type}.php");
|
|
| 54 |
+ else $output .= write_error(_ERROR); |
|
| 55 |
+ } |
|
| 56 |
+ else $output .= write_error(_ERROR); |
|
| 57 |
+ } |
|
| 58 |
+ |
|
| 59 |
+$tpl->assign("output", $output);
|
|
| 60 |
+$tpl->printToScreen( ); |
|
| 61 |
+?> |