| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,51 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// eFiction 3.0 |
|
| 4 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 5 |
+// Valid HTML 4.01 Transitional |
|
| 6 |
+// Based on eFiction 1.1 |
|
| 7 |
+// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 8 |
+// http://efiction.sourceforge.net/ |
|
| 9 |
+// ---------------------------------------------------------------------- |
|
| 10 |
+// LICENSE |
|
| 11 |
+// |
|
| 12 |
+// This program is free software; you can redistribute it and/or |
|
| 13 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 14 |
+// as published by the Free Software Foundation; either version 2 |
|
| 15 |
+// of the License, or (at your option) any later version. |
|
| 16 |
+// |
|
| 17 |
+// This program is distributed in the hope that it will be useful, |
|
| 18 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 19 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 20 |
+// GNU General Public License for more details. |
|
| 21 |
+// |
|
| 22 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 23 |
+// ---------------------------------------------------------------------- |
|
| 24 |
+ |
|
| 25 |
+if(!defined("_CHARSET")) exit( );
|
|
| 26 |
+ |
|
| 27 |
+$output .= "<div class='sectionheader'>"._HIDDENSKINS."</div>"; |
|
| 28 |
+ |
|
| 29 |
+if(isset($_POST['submit'])) {
|
|
| 30 |
+ $hiddenskins = isset($_POST['hiddenskins']) ? implode(",", $_POST['hiddenskins']) : "";
|
|
| 31 |
+ $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET hiddenskins = '$hiddenskins' WHERE sitekey ='".SITEKEY."' LIMIT 1");
|
|
| 32 |
+ if($result) $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 33 |
+ else $output .= write_error(_ERROR); |
|
| 34 |
+} |
|
| 35 |
+else {
|
|
| 36 |
+ $directory = opendir(_BASEDIR."skins"); |
|
| 37 |
+ if(!isset($hiddenskins)) $hiddenskins = array( ); |
|
| 38 |
+ if(is_string($hiddenskins)) $hiddenskins = explode(",", $hiddenskins);
|
|
| 39 |
+ while($filename = readdir($directory)) {
|
|
| 40 |
+ if($filename== "." || $filename== ".." || !is_dir(_BASEDIR."skins/".$filename)) continue; |
|
| 41 |
+ $skinlist[strtolower($filename)] = "<input type='checkbox' value='$filename' name='hiddenskins[]' id='hiddenskins'".(is_array($hiddenskins) && in_array($filename, $hiddenskins) ? " checked" : "")."> $filename<br />\n"; |
|
| 42 |
+ } |
|
| 43 |
+ ksort($skinlist); |
|
| 44 |
+ $output .= "<div><form method=\"POST\" style='width: 250px; margin: 1em auto;' class='tblborder' name=\"form\" enctype=\"multipart/form-data\" action=\"admin.php?action=skins\">"; |
|
| 45 |
+ foreach($skinlist as $s) { $output .= $s; }
|
|
| 46 |
+ unset($skinlist, $s); |
|
| 47 |
+ closedir($directory); |
|
| 48 |
+ $output .= "<INPUT type=\"submit\" class=\"button\" style='display: block; margin: 1ex auto;' id=\"submit\" value=\""._SUBMIT."\" name=\"submit\"></form></div>"; |
|
| 49 |
+ $output .= write_message(_HIDDENNOTE); |
|
| 50 |
+} |
|
| 51 |
+?> |
|
| 0 | 52 |
\ No newline at end of file |