| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,37 +0,0 @@ |
| 1 |
-This folder contains the files to replace in your eFiction install to bridge it with |
|
| 2 |
-an installation of SMF. These files will let you use your SMF members |
|
| 3 |
-table as the authors table for eFiction. This bridge assumes your SMF intall |
|
| 4 |
-and your eFiction install share the same database. |
|
| 5 |
- |
|
| 6 |
-Move the following files to the user/ folder in your eFiction install: |
|
| 7 |
- |
|
| 8 |
-editbio.php |
|
| 9 |
-login.php |
|
| 10 |
-profile.php |
|
| 11 |
-register.php |
|
| 12 |
-logout.php |
|
| 13 |
- |
|
| 14 |
-Move the following files to the includes/ folder in your eFiction install: |
|
| 15 |
- |
|
| 16 |
-get_session_vars.php |
|
| 17 |
-queries.php |
|
| 18 |
- |
|
| 19 |
-Move the en_SMF.php file to the languages/ folder in your eFiction install. |
|
| 20 |
- |
|
| 21 |
-Edit queries.php to point to your SMF tables and directory. |
|
| 22 |
- |
|
| 23 |
-Goto Admin->Page Links and edit your Register and Lost Password links to point to your |
|
| 24 |
-SMF pages. |
|
| 25 |
- |
|
| 26 |
-Register -> PATHTOSMF/index.php?action=register |
|
| 27 |
-Lost Password -> PATHTOSMF/index.php?action=reminder |
|
| 28 |
- |
|
| 29 |
-If eFiction is a sub-folder under SMF PATHTOSMF will be ../ |
|
| 30 |
-If they are siblings the path will be ../SMFFOLDER/ where SMFFOLDER is tha name of SMF's folder. |
|
| 31 |
-If SMF is a subfolder if eFiction PATHTOSMF will be SMFFOLDER/ where SMFFOLDER is tha name of SMF's folder. |
|
| 32 |
- |
|
| 33 |
-Move QueryString.php to the Sources folder of your SMF installation. Note this is the QueryString.php |
|
| 34 |
-from version 1.1.2 of SMF. |
|
| 35 |
- |
|
| 36 |
- |
|
| 37 |
- |
| 38 | 0 |
deleted file mode 100644 |
| ... | ... |
@@ -1,35 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
- |
|
| 4 |
-global $language; |
|
| 5 |
-$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'info'");
|
|
| 6 |
-while($block = dbassoc($blockquery)) {
|
|
| 7 |
- $blocks[$block['block_name']] = unserialize($block['block_variables']); |
|
| 8 |
- $blocks[$block['block_name']]['title'] = $block['block_title']; |
|
| 9 |
- $blocks[$block['block_name']]['file'] = $block['block_file']; |
|
| 10 |
- $blocks[$block['block_name']]['status'] = $block['block_status']; |
|
| 11 |
-} |
|
| 12 |
-include("blocks/info/info.php");
|
|
| 13 |
-if(file_exists("blocks/info/{$language}.php")) include_once("blocks/info/{$language}.php");
|
|
| 14 |
-else include_once("blocks/info/en.php");
|
|
| 15 |
- if(isset($_POST['submit'])) {
|
|
| 16 |
- $blocks['info']['style'] = !empty($_POST['style']) && isNumber($_POST['style']) ? $_POST['style'] : 0; |
|
| 17 |
- if($_POST['template'] != _NARTEXT) $blocks['info']['template'] = $_POST['template']; |
|
| 18 |
- $output .= "<center>"._ACTIONSUCCESSFUL."</center>"; |
|
| 19 |
- save_blocks( $blocks ); |
|
| 20 |
- } |
|
| 21 |
- else {
|
|
| 22 |
- $style = isset($blocks['info']['style']) ? $blocks['info']['style'] : 0; |
|
| 23 |
- if(empty($blocks['info']['template']) && $style == 1) $template = _NARTEXT; |
|
| 24 |
- else if($style == 1) $template = $blocks['info']['template']; |
|
| 25 |
- else $template = ""; |
|
| 26 |
- $output .= "<div style='margin: 1em auto; width: 80%;'><b>"._CURRENT.":</b><br /><div class=\"tblborder\" style=\"text-align: left; padding: 4px; margin: 0 auto;\">$content</div><br />"; |
|
| 27 |
- $output .= "<form method='POST' enctype='multipart/form-data' name='blockadmin' action='admin.php?action=blocks&admin=info'> |
|
| 28 |
- <label for='template'>"._TEMPLATE.":</label><br /><textarea name='template' rows='5' cols='50' style='width: 100%;'>$template</textarea>"; |
|
| 29 |
- if($tinyMCE) $output .= "<div style='display: block; margin: 0; padding: 0;'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('template');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
|
|
| 30 |
- $output .= "<label for='style'>"._DISPLAY.": </label><select name='style'class='textbox' ><option value='0'".(!$style ? " selected" : "").">"._CHART."</option> |
|
| 31 |
- <option value='1'".($style == 1 ? " selected" : "").">"._NARRATIVE."</option> |
|
| 32 |
- <option value='2'".($style == 2 ? " selected" : "").">"._VARIABLES."</option></select><br /> |
|
| 33 |
- <INPUT type='submit' class='button' name='submit' value='"._SUBMIT."'></form></div>"; |
|
| 34 |
- } |
|
| 35 |
-?> |
|
| 36 | 0 |
\ No newline at end of file |
| 37 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,41 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-define("_CHART", "Chart");
|
|
| 30 |
-define("_NARRATIVE", "Narrative");
|
|
| 31 |
-define("_LOGGEDINAS", "You are currently logged in as");
|
|
| 32 |
-define("_VARIABLES", "Variables");
|
|
| 33 |
-define("_DISPLAY", "Style of Display");
|
|
| 34 |
-define("_NARTEXT", "We are the home of {authors} authors from among our {members} members. There have been {reviews} reviews written about our {stories} stories consisting of {chapters} chapters and {totalwords} words. A special welcome to our newest member, {newest}. {loggedinas} {submissions}");
|
|
| 35 |
-define("_NEWESTMEMBER", "Newest Member");
|
|
| 36 |
-define("_REVIEWERS", "Reviewers");
|
|
| 37 |
-define("_POSTS", "Forum Posts");
|
|
| 38 |
-define("_BOARDS", "Forum Boards");
|
|
| 39 |
-define("_TOPICS", "Forum Topics");
|
|
| 40 |
-define("_FORUMCATS", "Forum Categories");
|
|
| 41 |
-?> |
|
| 42 | 0 |
\ No newline at end of file |
| 44 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,75 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
- |
|
| 4 |
-if(file_exists(_BASEDIR."blocks/info/{$language}.php")) include_once(_BASEDIR."blocks/info/{$language}.php");
|
|
| 5 |
-else include_once(_BASEDIR."blocks/info/en.php"); |
|
| 6 |
- global $noskin, $tpl; |
|
| 7 |
- |
|
| 8 |
- if(_AUTHORTABLE != TABLEPREFIX."fanfiction_authors") {
|
|
| 9 |
- list($members) = dbrow(dbquery("SELECT COUNT("._UIDFIELD.") as members FROM "._AUTHORTABLE));
|
|
| 10 |
- list($newest) = dbrow(dbquery("SELECT "._UIDFIELD." as uid FROM "._AUTHORTABLE." ORDER BY "._UIDFIELD." DESC LIMIT 1"));
|
|
| 11 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET members = $members, newestmember = '$newest' WHERE sitekey = '".SITEKEY."' LIMIT 1");
|
|
| 12 |
- } |
|
| 13 |
- $stats = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_stats WHERE sitekey = '".SITEKEY."' LIMIT 1"));
|
|
| 14 |
- list($newmember) = dbrow(dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '".$stats['newestmember']."' LIMIT 1"));
|
|
| 15 |
- $adminnotices = ""; |
|
| 16 |
- if(isADMIN) {
|
|
| 17 |
- if(file_exists(_BASEDIR."languages/".$language."_admin.php")) include_once(_BASEDIR."languages/".$language."_admin.php"); |
|
| 18 |
- else include_once(_BASEDIR."languages/en_admin.php"); |
|
| 19 |
- $countquery = dbquery("SELECT COUNT(DISTINCT chapid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE validated = '0'");
|
|
| 20 |
- list($count) = dbrow($countquery); |
|
| 21 |
- if($count) $adminnotices = sprintf(_QUEUECOUNT, $count); |
|
| 22 |
- $codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'adminnotices'");
|
|
| 23 |
- while($code = dbassoc($codequery)) {
|
|
| 24 |
- eval($code['code_text']); |
|
| 25 |
- } |
|
| 26 |
- } |
|
| 27 |
- $forums = ssi_boardStats("array");
|
|
| 28 |
- if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) {
|
|
| 29 |
- $tpl->assignGlobal("totalstories", $stats['stories']);
|
|
| 30 |
- $tpl->assignGlobal("totalauthors", $stats['authors']);
|
|
| 31 |
- $tpl->assignGlobal("totalmembers", $stats['members']);
|
|
| 32 |
- $tpl->assignGlobal("totalreviews", $stats['reviews']);
|
|
| 33 |
- $tpl->assignGlobal("totalreviewers", $stats['reviewers']);
|
|
| 34 |
- $tpl->assignGlobal("totalwords", $stats['wordcount']);
|
|
| 35 |
- $tpl->assignGlobal("totalchapters", $stats['chapters']);
|
|
| 36 |
- $tpl->assignGlobal("totalseries", $stats['series']);
|
|
| 37 |
- $tpl->assignGlobal("totalposts", $forums['posts']);
|
|
| 38 |
- $tpl->assignGlobal("totaltopics", $forums['topics']);
|
|
| 39 |
- $tpl->assignGlobal("totalboards", $forums['boards']);
|
|
| 40 |
- $tpl->assignGlobal("totalforumcategories", $forums['categories']);
|
|
| 41 |
- $tpl->assignGlobal("newestmember", "<a href=\"viewuser.php?uid=".$stats['newestmember']."\">$newmember</a>");
|
|
| 42 |
- if(isMEMBER) $tpl->assignGlobal("loggedinas", _LOGGEDINAS." ".USERPENNAME.". ".($noskin ? " "._NOSKIN : ""));
|
|
| 43 |
- $tpl->assignGlobal("submissions", $adminnotices);
|
|
| 44 |
- } |
|
| 45 |
- else {
|
|
| 46 |
- if(isMEMBER) $loggedinas = _LOGGEDINAS." ".USERPENNAME.". ".($noskin ? " "._NOSKIN : ""); |
|
| 47 |
- else $loggedinas = ""; |
|
| 48 |
- if(empty($blocks['info']['style'])) {
|
|
| 49 |
- $content = "<div id='infoblock'> |
|
| 50 |
-<div><span class='label'>"._MEMBERS.": </span>".$stats['members']."</div> |
|
| 51 |
-<div><span class='label'>"._SERIES.": </span>".$stats['series']."</div> |
|
| 52 |
-<div><span class='label'>"._STORIES.": </span>".$stats['stories']."</div> |
|
| 53 |
-<div><span class='label'>"._CHAPTERS.": </span>".$stats['chapters']."</div> |
|
| 54 |
-<div><span class='label'>"._WORDCOUNT.": </span>".$stats['wordcount']."</div> |
|
| 55 |
-<div><span class='label'>"._AUTHORS.": </span>".$stats['authors']."</div> |
|
| 56 |
-<div><span class='label'>"._REVIEWS.": </span>".$stats['reviews']."</div> |
|
| 57 |
-<div><span class='label'>"._REVIEWERS.": </span>".$stats['reviewers']."</div> |
|
| 58 |
-<div><span class='label'>"._POSTS.": </span>".$forums['posts']."</div> |
|
| 59 |
-<div><span class='label'>"._TOPICS.": </span>".$forums['topics']."</div> |
|
| 60 |
-<div><span class='label'>"._BOARDS.": </span>".$forums['boards']."</div> |
|
| 61 |
-<div><span class='label'>"._FORUMCATS.": </span>".$forums['categories']."</div> |
|
| 62 |
-<div><span class='label'>"._NEWESTMEMBER.": </span><a href=\"viewuser.php?uid=".$stats['newestmember']."\">$newmember</a></div>"; |
|
| 63 |
- } |
|
| 64 |
- else if($blocks["info"]["style"] == 1) {
|
|
| 65 |
- $replace = array($stats['authors'], $stats['members'], $stats['reviews'], $stats['reviewers'], $stats['wordcount'], $stats['chapters'], $stats['stories'], $stats['series'],"<a href=\"viewuser.php?uid=".$stats['newestmember']."\">$newmember</a>", $loggedinas, $adminnotices, $forums['posts'], $forums['topics'], $forums['boards'], $forums['categories']); |
|
| 66 |
- $search = array("@\{authors\}@", "@\{members\}@", "@\{reviews\}@", "@{reviewers\}@", "@\{totalwords\}@","@\{chapters\}@", "@\{stories\}@", "@\{series\}@", "@\{newest\}@", "@\{loggedinas\}@", "@\{submissions\}@", "@\{posts\}@", "@\{topics\}@", "@\{boards\}@", "@\{forumcats\}@");
|
|
| 67 |
- $content = preg_replace($search, $replace, (!empty($blocks['info']['template']) ? stripslashes($blocks['info']['template']) : _NARTEXT)); |
|
| 68 |
- } |
|
| 69 |
- } |
|
| 70 |
- $codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'sitestats'");
|
|
| 71 |
- while($code = dbassoc($codequery)) {
|
|
| 72 |
- eval($code['code_text']); |
|
| 73 |
- } |
|
| 74 |
- if(empty($blocks['info']['style'])) $content .= "<div class='cleaner'> </div></div>"; |
|
| 75 |
-?> |
|
| 76 | 0 |
\ No newline at end of file |
| 77 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks(`block_name`, `block_title`, `block_status`, `block_file`, `block_variables`) VALUES('info', 'Site Information', '0', 'info/info.php', '');");
|
|
| 30 |
-?> |
|
| 31 | 0 |
\ No newline at end of file |
| 32 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,20 +0,0 @@ |
| 1 |
-// ---------------------------------------------------------------------- |
|
| 2 |
-// LICENSE |
|
| 3 |
-// |
|
| 4 |
-// This program is free software; you can redistribute it and/or |
|
| 5 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 6 |
-// as published by the Free Software Foundation; either version 2 |
|
| 7 |
-// of the License, or (at your option) any later version. |
|
| 8 |
-// |
|
| 9 |
-// This program is distributed in the hope that it will be useful, |
|
| 10 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
-// GNU General Public License for more details. |
|
| 13 |
-// |
|
| 14 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 15 |
-// ---------------------------------------------------------------------- |
|
| 16 |
- |
|
| 17 |
-Copyright 2007 by Tammy Keefer. |
|
| 18 |
- |
|
| 19 |
-This block for eFiction 3.0 bridged to SMF displays a login block on your |
|
| 20 |
-eFiction site that will log you in via your SMF site. |
|
| 21 | 0 |
\ No newline at end of file |
| 22 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,45 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
-$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'login'");
|
|
| 4 |
-while($block = dbassoc($blockquery)) {
|
|
| 5 |
- $blocks[$block['block_name']] = unserialize($block['block_variables']); |
|
| 6 |
- $blocks[$block['block_name']]['title'] = $block['block_title']; |
|
| 7 |
- $blocks[$block['block_name']]['file'] = $block['block_file']; |
|
| 8 |
- $blocks[$block['block_name']]['status'] = $block['block_status']; |
|
| 9 |
-} |
|
| 10 |
-global $language; |
|
| 11 |
-// Set $loggedin to 0 to see the block |
|
| 12 |
-$loggedin = 0; |
|
| 13 |
-include("blocks/login/login.php");
|
|
| 14 |
-// Then set it back to 1. |
|
| 15 |
-$loggedin = 1; |
|
| 16 |
-if(file_exists("blocks/login/$language.php")) include("blocks/login/$language.php");
|
|
| 17 |
-else include("blocks/login/en.php");
|
|
| 18 |
- if(isset($_POST['submit'])) {
|
|
| 19 |
- $blocks['login']['acctlink'] = $_POST['acctlink']; |
|
| 20 |
- if(empty($_POST['form'])) unset($blocks['login']['form']); |
|
| 21 |
- else $blocks['login']['form'] = $_POST['form']; |
|
| 22 |
- $blocks['login']['template'] = addslashes(descript($_POST['template'])); |
|
| 23 |
- save_blocks( $blocks ); |
|
| 24 |
- unset($_GET['admin']); |
|
| 25 |
- $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 26 |
- } |
|
| 27 |
- else {
|
|
| 28 |
- if(empty($blocks['login']['template'])) $template = ""; |
|
| 29 |
- else $template = $blocks['login']['template']; |
|
| 30 |
- $output .= "<div style='text-align: center;'><span class='label'>"._CURRENT.":</span><br /><div class=\"tblborder\" style=\"width: 80%; text-align: left; margin: 1ex auto;\">$content</div></div><br />"; |
|
| 31 |
- $output .= _LOGINNOTE."<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=login\"> |
|
| 32 |
- <div><label for=\"template\">"._TEMPLATE.":</label><span style='clear: left;'> </span></div> |
|
| 33 |
- <div class=\"shorttextarea\"><textarea name=\"template\" rows=\"5\" style=\"width: 100%;\" cols=\"40\">".stripslashes($template)."</textarea>"; |
|
| 34 |
- if($tinyMCE) |
|
| 35 |
- $output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('template');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
|
|
| 36 |
- $output .= "</div> |
|
| 37 |
- <label for=\"form\">"._DEFAULTOPTS.":</label> <select name=\"form\" id=\"form\" class=\"textbox\" ><option value=\"0\"".(empty($blocks['login']['form']) ? " selected" : "").">"._SHORT."</option> |
|
| 38 |
- <option value=\"1\"".(!empty($blocks['login']['form']) ? " selected" : "").">"._LONG."</option> |
|
| 39 |
- </select><br /> |
|
| 40 |
- <label for=\"acctlink\">"._ACCTLINK."</label> <select name=\"acctlink\" id=\"acctlink\" class=\"textbox\" ><option value=\"0\"".(empty($blocks['login']['acctlink']) ? " selected" : "").">"._NO."</option> |
|
| 41 |
- <option value=\"1\"".(!empty($blocks['login']['acctlink']) ? " selected" : "").">"._YES."</option> |
|
| 42 |
- </select><br /> |
|
| 43 |
- <INPUT type=\"submit\" class=\"button\" id=\"submit\" name=\"submit\" value=\""._SUBMIT."\"></form></div>"; |
|
| 44 |
- } |
|
| 45 |
-?> |
|
| 46 | 0 |
\ No newline at end of file |
| 47 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,34 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-define ("_SHORT", "Short Form");
|
|
| 30 |
-define ("_LONG", "Long Form");
|
|
| 31 |
-define ("_ACCTLINK", "Display '".$pagelinks['login']['text']."' link:");
|
|
| 32 |
-define ("_DEFAULTOPTS", "Default Display Options");
|
|
| 33 |
-define ("_LOGINNOTE", "The 'short form' will not include the register and lost password links while the 'long form' will. You may also use the textbox to customize the display.");
|
|
| 34 |
-?> |
|
| 35 | 0 |
\ No newline at end of file |
| 37 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks(`block_name`, `block_title`, `block_status`, `block_file`, `block_variables`) VALUES('login', 'Login', '0', 'login/login.php', '');");
|
|
| 30 |
-?> |
|
| 31 | 0 |
\ No newline at end of file |
| 32 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,22 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
-if(!isMEMBER) {
|
|
| 4 |
-if(!isset($_SESSION)) session_start(); |
|
| 5 |
-if(isset($_GET['sid']) && isNumber($_GET['sid'])) $_SESSION['login_url'] = $url."/viewstory.php?sid=".$_GET['sid']; |
|
| 6 |
-else $_SESSION['login_url'] = $url."/user.php"; |
|
| 7 |
- $longform = "{penname} {password} {rememberme} {go} <div id='loginlinks'>{register} | {lostpwd}</div>";
|
|
| 8 |
- $shortform = "{penname} {password} {rememberme} {go}";
|
|
| 9 |
- $content = "<form method=\"POST\"enctype=\"multipart/form-data\" id=\"loginblock\" action=\"".PATHTOSMF."index.php?action=login2\"><input type=\"hidden\" name=\"cookielength\" value=\"-1\" />"; |
|
| 10 |
- $replace = array("<label for=\"penname\">"._PENNAME.":</label><INPUT type=\"text\" class=\"textbox\" name=\"user\" id=\"user\">",
|
|
| 11 |
- "<label for=\"pswd\">"._PASSWORD.":</label><INPUT type=\"password\" class=\"textbox\" id=\"passwrd\" name=\"passwrd\">", |
|
| 12 |
- "<span id='rememberme'><INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookieneverexp\" id=\"cookieneverexp\" value=\"1\"><label for=\"cookieneverexp\">"._REMEMBERME."</label></span>", |
|
| 13 |
- (!empty($pagelinks['register']['link']) ? $pagelinks['register']['link'] : ""), $pagelinks['lostpassword']['link'], |
|
| 14 |
- "<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._GO."\">"); |
|
| 15 |
- $search = array("@\{penname\}@", "@\{password\}@", "@\{rememberme\}@", "@\{register\}@", "@\{lostpwd\}@", "@\{go\}@");
|
|
| 16 |
- if(!empty($blocks['login']['template'])) $content .= preg_replace($search, $replace, stripslashes($blocks['login']['template'])); |
|
| 17 |
- else $content .= preg_replace( $search, $replace , (!empty($blocks['login']['form']) ? $longform : $shortform)); |
|
| 18 |
- $content .= "</form>"; |
|
| 19 |
-} |
|
| 20 |
-else if(!empty($blocks['login']['acctlink'])) $content = $pagelinks['login']['link']; |
|
| 21 |
-else $content = ""; |
|
| 22 |
-?> |
|
| 23 | 0 |
\ No newline at end of file |
| 24 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,34 +0,0 @@ |
| 1 |
-// ---------------------------------------------------------------------- |
|
| 2 |
-// LICENSE |
|
| 3 |
-// |
|
| 4 |
-// This program is free software; you can redistribute it and/or |
|
| 5 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 6 |
-// as published by the Free Software Foundation; either version 2 |
|
| 7 |
-// of the License, or (at your option) any later version. |
|
| 8 |
-// |
|
| 9 |
-// This program is distributed in the hope that it will be useful, |
|
| 10 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
-// GNU General Public License for more details. |
|
| 13 |
-// |
|
| 14 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 15 |
-// ---------------------------------------------------------------------- |
|
| 16 |
- |
|
| 17 |
-Copyright 2006 by Tammy Keefer. |
|
| 18 |
- |
|
| 19 |
-This block for eFiction 3.0 displays which of your members is currently online |
|
| 20 |
-and how many guests are visiting the site as well. In addition to the standard |
|
| 21 |
-{blockname_title} and {blockname_content}, this block also adds {guests} as
|
|
| 22 |
-the number of guests and {onlinemembers} as the hyperlinked list of members online.
|
|
| 23 |
- |
|
| 24 |
-VERY IMPORTANT NOTE: For this block to work correctly it must be set to Active |
|
| 25 |
-even if it is only displayed on the index page because the block not only displays |
|
| 26 |
-who is online it also tracks that information. If it is set to "Index Only" you |
|
| 27 |
-will only get the information for people on your index page. And it must be set |
|
| 28 |
-this way on EVERY skin. Again, even if it doesn't display, it must still be |
|
| 29 |
-set to Active for the visitor information to be recorded. |
|
| 30 |
- |
|
| 31 |
-There is no admin panel for this block. As is, it displays the people who have |
|
| 32 |
-been on the site(loaded a page) in the last minute. If you want to increase |
|
| 33 |
-that time, open online.php and go to line 13 and replace 60 with the number of |
|
| 34 |
-seconds you wish. |
|
| 35 | 0 |
\ No newline at end of file |
| 36 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-define("_GUESTS", "Guests");
|
|
| 30 |
-?> |
|
| 31 | 0 |
\ No newline at end of file |
| 33 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,35 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks(`block_name`, `block_title`, `block_status`, `block_file`, `block_variables`) VALUES('online', 'Who\'s Online', '0', 'online/online.php', '');");
|
|
| 30 |
-dbquery("CREATE TABLE IF NOT EXISTS `".TABLEPREFIX."fanfiction_online` (
|
|
| 31 |
- `online_uid` int(11) NOT NULL default '0', |
|
| 32 |
- `online_ip` int(11) NOT NULL default '0', |
|
| 33 |
- `online_timestamp` int(11) NOT NULL default '0' |
|
| 34 |
-) ENGINE=MyISAM;"); |
|
| 35 |
-?> |
|
| 36 | 0 |
\ No newline at end of file |
| 37 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,19 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
- |
|
| 4 |
- global $dateformat, $tpl; |
|
| 5 |
- |
|
| 6 |
- if(file_exists(_BASEDIR."blocks/online/{$language}.php")) include(_BASEDIR."blocks/online/{$language}.php");
|
|
| 7 |
- else include(_BASEDIR."blocks/online/en.php"); |
|
| 8 |
- |
|
| 9 |
- $onlineInfo = ssi_whosOnline("array");
|
|
| 10 |
- $tpl->assignGlobal("guests", empty($guests) ? 0 : $onlineInfo['guests']);
|
|
| 11 |
- $omlist = array( ); |
|
| 12 |
- foreach($onlineInfo['users'] as $k => $v) {
|
|
| 13 |
- $omlist[] = "<a href='viewuser.php?uid=".$v['id']."'>".$v['username']."</a>"; |
|
| 14 |
- } |
|
| 15 |
- $tpl->assignGlobal("onlinemembers", count($omlist) ? implode(", ", $omlist) : "");
|
|
| 16 |
- $content = "<div id='who_online'><span class='label'>"._GUESTS.":</span> ".($onlineInfo['guests'] ? $onlineInfo['guests'] : 0)."<br />\n |
|
| 17 |
- <span class='label'>"._MEMBERS.":</span> ".($omlist ? implode(", ", $omlist) : "")."</div>";
|
|
| 18 |
- |
|
| 19 |
-?> |
|
| 20 | 0 |
\ No newline at end of file |
| 21 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 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 .= "<script language=\"javascript\" type=\"text/javascript\"> |
|
| 28 |
-location = \"".PATHTOSMF."index.php?action=profile\"; |
|
| 29 |
-</script>"; |
|
| 30 |
-?> |
|
| 31 | 0 |
\ No newline at end of file |
| 7 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,52 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-// Get session variables from cookie data if not logged in. |
|
| 3 |
-// To bridge to another program replace (or add to) this information with the bridge to your other script. See examples in the includes/bridges/ folder. |
|
| 4 |
-if(!defined("_CHARSET")) exit( );
|
|
| 5 |
- |
|
| 6 |
-if (!empty($_COOKIE[$sitekey."_useruid"]) && !isset($_SESSION[$sitekey."_useruid"])) {
|
|
| 7 |
- $userdata = dbassoc(dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password, ap.* FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_COOKIE[$sitekey."_useruid"]."'"));
|
|
| 8 |
- if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_pwd'] == md5($userdata['email'] . $userdata['password'])) {
|
|
| 9 |
- define("USERUID", $userdata['uid']);
|
|
| 10 |
- define("USERPENNAME", $userdata['penname']);
|
|
| 11 |
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin']; |
|
| 12 |
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"]; |
|
| 13 |
- else $siteskin = $defaultskin; |
|
| 14 |
- define("uLEVEL", $userdata['level']);
|
|
| 15 |
- define("isADMIN", uLEVEL > 0 ? true : false);
|
|
| 16 |
- define("isMEMBER", true);
|
|
| 17 |
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent']; |
|
| 18 |
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"]; |
|
| 19 |
- } |
|
| 20 |
-} |
|
| 21 |
-$user_info = array( ); |
|
| 22 |
-$eFicLang = $language; |
|
| 23 |
-require_once(_BASEDIR.PATHTOSMF."SSI.php"); |
|
| 24 |
-$language = $eFicLang; |
|
| 25 |
-$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT']; |
|
| 26 |
- // SMF has already loaded it's sessions in queries.php. So we'll pull the data from the $user_info array from there. |
|
| 27 |
- if($ID_MEMBER) {
|
|
| 28 |
- $eficdata = dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, ap.level, ap.userskin, ap.ageconsent FROM ".TABLEPREFIX."fanfiction_authorprefs as ap RIGHT JOIN "._AUTHORTABLE." ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$ID_MEMBER'");
|
|
| 29 |
- if(dbnumrows($eficdata)) {
|
|
| 30 |
- $userdata = dbassoc($eficdata); |
|
| 31 |
- if($userdata['level'] != "-1") {
|
|
| 32 |
- define("USERUID", $userdata['uid']);
|
|
| 33 |
- define("USERPENNAME", $userdata['penname']);
|
|
| 34 |
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin']; |
|
| 35 |
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"]; |
|
| 36 |
- else $siteskin = $defaultskin; |
|
| 37 |
- define("uLEVEL", $userdata['level']);
|
|
| 38 |
- define("isADMIN", uLEVEL > 0 ? true : false);
|
|
| 39 |
- define("isMEMBER", true);
|
|
| 40 |
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent']; |
|
| 41 |
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"]; |
|
| 42 |
- } |
|
| 43 |
- } |
|
| 44 |
- } |
|
| 45 |
-if(!defined("USERUID")) define("USERUID", false);
|
|
| 46 |
-if(!defined("USERPENNAME")) define("USERPENNAME", false);
|
|
| 47 |
-if(!defined("uLEVEL")) define("uLEVEL", 0);
|
|
| 48 |
-if(!defined("isMEMBER")) define("isMEMBER", false);
|
|
| 49 |
-if(!defined("isADMIN")) define("isADMIN", false);
|
|
| 50 |
-if(empty($siteskin)) $siteskin = $defaultskin; |
|
| 51 |
-echo "<!-- USERUID ".USERUID." ".$ID_MEMBER." -->"; |
|
| 52 |
-?> |
|
| 53 | 0 |
\ No newline at end of file |
| 55 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,25 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
-if(!isMEMBER) {
|
|
| 4 |
- $output .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>"; |
|
| 5 |
- |
|
| 6 |
-if(!isset($_SESSION)) session_start(); |
|
| 7 |
-if(isset($_GET['sid']) && isNumber($_GET['sid'])) $_SESSION['login_url'] = $url."/viewstory.php?sid=".$_GET['sid']; |
|
| 8 |
-else $_SESSION['login_url'] = $url."/user.php"; |
|
| 9 |
- $output .= "<div style='text-align: center;'><form method=\"POST\"enctype=\"multipart/form-data\" action=\"".PATHTOSMF."index.php?action=login2\"><div style=\"width: 320px; padding: 5px; margin: 0 auto;\"> |
|
| 10 |
- <input type=\"hidden\" name=\"cookielength\" value=\"-1\" /><input type=\"hidden\" name=\"login_url\" value=\"".$_SESSION['login_url']."\" /> |
|
| 11 |
- <div class=\"label\" style=\"float: left; width: 30%; text-align: right;\"><label for=\"penname\">"._PENNAME.":</label></div><INPUT type=\"text\" class=\"textbox\" name=\"user\" id=\"user\"><br /> |
|
| 12 |
- <div class=\"label\" style=\"float: left; width: 30%; text-align: right;\"><label for=\"pswd\">"._PASSWORD.":</label></div><INPUT type=\"password\" class=\"textbox\" id=\"passwrd\" name=\"passwrd\"><br /> |
|
| 13 |
- <INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookieneverexp\" id=\"cookieneverexp\" value=\"1\"><label for=\"cookieneverexp\">"._REMEMBERME."</label><br /> |
|
| 14 |
- <INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"> |
|
| 15 |
- </div></form></div>"; |
|
| 16 |
- $linkquery = dbquery("SELECT * from ".TABLEPREFIX."fanfiction_pagelinks WHERE link_name = 'login' OR link_name = 'lostpassword'");
|
|
| 17 |
- while($link = dbassoc($linkquery)) {
|
|
| 18 |
- if($link['link_access'] && !isMEMBER) continue; |
|
| 19 |
- if($link['link_access'] == 2 && !isADMIN) continue; |
|
| 20 |
- $pagelinks[$link['link_name']] = array("id" => $link['link_id'], "text" => $link['link_text'], "url" => _BASEDIR.$link['link_url'], "link" => "<a href=\"".$link['link_url']."\" title=\"".$link['link_text']."\"".($link['link_target'] ? " target=\"_blank\"" : "").($current == $link['link_name'] ? " id=\"current\"" : "").">".$link['link_text']."</a>");
|
|
| 21 |
- } |
|
| 22 |
- $output .= "<div style='text-align: center;'>".$pagelinks['register']['link']." | ".$pagelinks['lostpassword']['link']."</div>"; |
|
| 23 |
-} |
|
| 24 |
-else accessDenied( ); |
|
| 25 |
-?> |
|
| 26 | 0 |
\ No newline at end of file |
| 27 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,37 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-// Generally, you should be able to leave this alone. This logout function will unset all session variables and cookie variables of the same name that begin with the site's sitekey. |
|
| 3 |
- |
|
| 4 |
-if(!defined("_LOGOUTCHECK")) exit( );
|
|
| 5 |
- define("_BASEDIR", "");
|
|
| 6 |
- include("config.php");
|
|
| 7 |
- include_once("includes/queries.php");
|
|
| 8 |
- session_start( ); |
|
| 9 |
- require_once(PATHTOSMF."SSI.php"); |
|
| 10 |
- $_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT']; |
|
| 11 |
- loadUserSettings( ); |
|
| 12 |
- include_once(PATHTOSMF."Sources/Subs-Auth.php"); |
|
| 13 |
- // If you log out, you aren't online anymore :P. |
|
| 14 |
- dbquery("DELETE FROM {$db_prefix}log_online WHERE ID_MEMBER = $ID_MEMBER LIMIT 1");
|
|
| 15 |
- $_SESSION['log_time'] = 0; |
|
| 16 |
- // Empty the cookie! (set it in the past, and for ID_MEMBER = 0) |
|
| 17 |
- setLoginCookie(-3600, 0); |
|
| 18 |
- foreach ($_SESSION as $VarName => $Value) {
|
|
| 19 |
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
|
|
| 20 |
- if(strpos($VarName, "skin")) continue; |
|
| 21 |
- unset($$VarName); |
|
| 22 |
- $_SESSION[$VarName] = ""; |
|
| 23 |
- setcookie($VarName, '0'); |
|
| 24 |
- } |
|
| 25 |
- } |
|
| 26 |
-require_once("header.php");
|
|
| 27 |
-//make a new TemplatePower object |
|
| 28 |
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
|
|
| 29 |
-else $tpl = new TemplatePower("default_tpls/default.tpl");
|
|
| 30 |
-if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
|
|
| 31 |
-else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" ); |
|
| 32 |
-include("includes/pagesetup.php");
|
|
| 33 |
- |
|
| 34 |
-$output .= write_message(_ACTIONSUCCESSFUL); |
|
| 35 |
-$tpl->assign("output", $output);
|
|
| 36 |
-$tpl->printToScreen( ); |
|
| 37 |
-?> |
|
| 38 | 0 |
\ No newline at end of file |
| 39 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,29 +0,0 @@ |
| 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 |
-$output .= "<script language=\"javascript\" type=\"text/javascript\"> |
|
| 27 |
-location = \"".PATHTOSMF."index.php?action=reminder\"; |
|
| 28 |
-</script>"; |
|
| 29 |
-?> |
|
| 30 | 0 |
\ No newline at end of file |
| 31 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,34 +0,0 @@ |
| 1 |
-// ---------------------------------------------------------------------- |
|
| 2 |
-// LICENSE |
|
| 3 |
-// |
|
| 4 |
-// This program is free software; you can redistribute it and/or |
|
| 5 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 6 |
-// as published by the Free Software Foundation; either version 2 |
|
| 7 |
-// of the License, or (at your option) any later version. |
|
| 8 |
-// |
|
| 9 |
-// This program is distributed in the hope that it will be useful, |
|
| 10 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
-// GNU General Public License for more details. |
|
| 13 |
-// |
|
| 14 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 15 |
-// ---------------------------------------------------------------------- |
|
| 16 |
- |
|
| 17 |
-Copyright 2006 by Tammy Keefer. |
|
| 18 |
- |
|
| 19 |
-This block for eFiction 3.0 displays which of your members is currently online |
|
| 20 |
-and how many guests are visiting the site as well. In addition to the standard |
|
| 21 |
-{blockname_title} and {blockname_content}, this block also adds {guests} as
|
|
| 22 |
-the number of guests and {onlinemembers} as the hyperlinked list of members online.
|
|
| 23 |
- |
|
| 24 |
-VERY IMPORTANT NOTE: For this block to work correctly it must be set to Active |
|
| 25 |
-even if it is only displayed on the index page because the block not only displays |
|
| 26 |
-who is online it also tracks that information. If it is set to "Index Only" you |
|
| 27 |
-will only get the information for people on your index page. And it must be set |
|
| 28 |
-this way on EVERY skin. Again, even if it doesn't display, it must still be |
|
| 29 |
-set to Active for the visitor information to be recorded. |
|
| 30 |
- |
|
| 31 |
-There is no admin panel for this block. As is, it displays the people who have |
|
| 32 |
-been on the site(loaded a page) in the last minute. If you want to increase |
|
| 33 |
-that time, open online.php and go to line 13 and replace 60 with the number of |
|
| 34 |
-seconds you wish. |
|
| 35 | 0 |
\ No newline at end of file |
| 36 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-define("_GUESTS", "Guests");
|
|
| 30 |
-?> |
|
| 31 | 0 |
\ No newline at end of file |
| 33 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,35 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// ---------------------------------------------------------------------- |
|
| 4 |
-// eFiction 3.2 |
|
| 5 |
-// Copyright (c) 2007 by Tammy Keefer |
|
| 6 |
-// Valid HTML 4.01 Transitional |
|
| 7 |
-// Based on eFiction 1.1 |
|
| 8 |
-// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 9 |
-// http://efiction.sourceforge.net/ |
|
| 10 |
-// ---------------------------------------------------------------------- |
|
| 11 |
-// LICENSE |
|
| 12 |
-// |
|
| 13 |
-// This program is free software; you can redistribute it and/or |
|
| 14 |
-// modify it under the terms of the GNU General Public License (GPL) |
|
| 15 |
-// as published by the Free Software Foundation; either version 2 |
|
| 16 |
-// of the License, or (at your option) any later version. |
|
| 17 |
-// |
|
| 18 |
-// This program is distributed in the hope that it will be useful, |
|
| 19 |
-// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 20 |
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 21 |
-// GNU General Public License for more details. |
|
| 22 |
-// |
|
| 23 |
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 24 |
-// ---------------------------------------------------------------------- |
|
| 25 |
- |
|
| 26 |
-if(!defined("_CHARSET")) exit( );
|
|
| 27 |
- |
|
| 28 |
- |
|
| 29 |
-dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks(`block_name`, `block_title`, `block_status`, `block_file`, `block_variables`) VALUES('online', 'Who\'s Online', '0', 'online/online.php', '');");
|
|
| 30 |
-dbquery("CREATE TABLE IF NOT EXISTS `".TABLEPREFIX."fanfiction_online` (
|
|
| 31 |
- `online_uid` int(11) NOT NULL default '0', |
|
| 32 |
- `online_ip` int(11) NOT NULL default '0', |
|
| 33 |
- `online_timestamp` int(11) NOT NULL default '0' |
|
| 34 |
-) ENGINE=MyISAM;"); |
|
| 35 |
-?> |
|
| 36 | 0 |
\ No newline at end of file |
| 37 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,19 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_CHARSET")) exit( );
|
|
| 3 |
- |
|
| 4 |
- global $dateformat, $tpl; |
|
| 5 |
- |
|
| 6 |
- if(file_exists(_BASEDIR."blocks/online/{$language}.php")) include(_BASEDIR."blocks/online/{$language}.php");
|
|
| 7 |
- else include(_BASEDIR."blocks/online/en.php"); |
|
| 8 |
- |
|
| 9 |
- $onlineInfo = ssi_whosOnline("array");
|
|
| 10 |
- $tpl->assignGlobal("guests", empty($guests) ? 0 : $onlineInfo['guests']);
|
|
| 11 |
- $omlist = array( ); |
|
| 12 |
- foreach($onlineInfo['users'] as $k => $v) {
|
|
| 13 |
- $omlist[] = "<a href='viewuser.php?uid=".$v['id']."'>".$v['username']."</a>"; |
|
| 14 |
- } |
|
| 15 |
- $tpl->assignGlobal("onlinemembers", count($omlist) ? implode(", ", $omlist) : "");
|
|
| 16 |
- $content = "<div id='who_online'><span class='label'>"._GUESTS.":</span> ".($onlineInfo['guests'] ? $onlineInfo['guests'] : 0)."<br />\n |
|
| 17 |
- <span class='label'>"._MEMBERS.":</span> ".($omlist ? implode(", ", $omlist) : "")."</div>";
|
|
| 18 |
- |
|
| 19 |
-?> |
|
| 20 | 0 |
\ No newline at end of file |
| 21 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,76 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-// Build the user's profile information |
|
| 3 |
-if(!defined("_CHARSET")) exit( );
|
|
| 4 |
-if(file_exists("languages/{$language}_SMF.php")) include("languages/{$language}_SMF.php");
|
|
| 5 |
-else include("languages/en_SMF.php");
|
|
| 6 |
- |
|
| 7 |
-$tpl->newBlock("profile");
|
|
| 8 |
-$result2 = dbquery("SELECT *, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
|
| 9 |
-$userinfo = dbassoc($result2); |
|
| 10 |
-$nameinfo = ""; |
|
| 11 |
-if($userinfo['emailAddress']) {
|
|
| 12 |
- list($allowGuestsContact) = dbrow(dbquery("SELECT panel_level FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'P' AND panel_name = 'contact' LIMIT 1"));
|
|
| 13 |
- if($allowGuestsContact == "0") $nameinfo .= " [<a href=\"viewuser.php?action=contact&uid=".$userinfo['uid']."\">"._CONTACT."</a>]"; |
|
| 14 |
-} |
|
| 15 |
-if(isMEMBER) {
|
|
| 16 |
- $nameinfo .= "[<a href='".PATHTOSMF."index.php?action=pm;sa=send;u=".$userinfo['uid']."'>"._PRIVATEMESSAGE."</a>]"; |
|
| 17 |
-} |
|
| 18 |
-if(!empty($favorites) && isMEMBER && $userinfo['uid'] != USERUID) {
|
|
| 19 |
- $fav = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_favorites WHERE uid = '".USERUID."' AND type = 'AU' AND item = '".$userinfo['uid']."'");
|
|
| 20 |
- if(dbnumrows($fav) == 0) $nameinfo .= " [<a href=\"user.php?uid=USERUID&action=favau&author=".$userinfo['uid']."\">"._ADDAUTHOR2FAVES."</a>]"; |
|
| 21 |
-} |
|
| 22 |
-$tpl->assign("userpenname", $userinfo['memberName']." ".$nameinfo);
|
|
| 23 |
-$tpl->assign("membersince", date("$dateformat", $userinfo['dateRegistered']));
|
|
| 24 |
-if($userinfo['realName']) |
|
| 25 |
- $tpl->assign("realname", $userinfo['realName']);
|
|
| 26 |
-if(!empty($userinfo['avatar'])) |
|
| 27 |
- $tpl->assign("image", "<img src=\"".$path_to_smf."avatars/".$userinfo['avatar']."\">");
|
|
| 28 |
-$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
|
|
| 29 |
-/* Dynamic authorinfo fields */ |
|
| 30 |
-$result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
|
|
| 31 |
-if(!empty($userinfo['websiteUrl'])) |
|
| 32 |
- $tpl->assign("website", "<a href='".$userinfo['websiteUrl']."'>".(!empty($userinfo['websiteTitle']) ? $userinfo['websiteTitle'] : $userinfo['websiteUrl'])."</a>");
|
|
| 33 |
- $tpl->assign("aol", !empty($userinfo['AOL']) ? "<img src=\"http://big.oscar.aol.com/".$userinfo['AOL']."?on_url=$url/images/aim.gif&off_url=$url/images/aim.gif\"> <a href=\"aim:goim?{aol}ScreenName=".$userinfo['AOL']."\">".$userinfo['AOL']."</a>" : "<img src=\"images/aim.gif\" alt=\""._AOL."\"> "._NONE);
|
|
| 34 |
- $tpl->assign("icq", !empty($userinfo['ICQ']) ? "<img src=\"http://status.icq.com/online.gif?icq=$userinfo[ICQ]&img=5\"> $userinfo[ICQ]" : "<img src=\"images/icq.gif\" alt=\""._ICQ."\"> "._NONE);
|
|
| 35 |
- $tpl->assign("msn", "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".($userinfo['MSN'] ? $userinfo['MSN'] : _NONE));
|
|
| 36 |
- $tpl->assign("yahoo", !empty($userinfo['YIM']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$userinfo['YIM']."&.src=pg\"><img border=\"0\" src=\"http://opi.yahoo.com/online?u=".$userinfo['YIM']."&m=g&t=1\"> ".$userinfo['YIM']."</a>" : "<img src=\"images/yim.gif\" alt=\""._YAHOO."\"> "._NONE);
|
|
| 37 |
- |
|
| 38 |
-$dynamicfields = ""; |
|
| 39 |
-while($field = dbassoc($result2)) {
|
|
| 40 |
- if($field['info'] == "") continue; |
|
| 41 |
- $fieldinfo = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_id = '".$field['field']."' LIMIT 1"));
|
|
| 42 |
- if($fieldinfo) {
|
|
| 43 |
- $thisfield = ""; |
|
| 44 |
- if($fieldinfo['field_on'] == 0) continue; |
|
| 45 |
- if($fieldinfo['field_type'] == 1) {
|
|
| 46 |
- $thisfield = preg_replace('/(\w+:\/\/)(\S+)/', '<a href="\\1\\2" target="_blank">\\1\\2</a>', $field['info']);
|
|
| 47 |
- if(strpos($thisfield, "http://") == false) $thisfield = preg_replace('/(\S+\.)(\S+)/', '<a href="http://\\1\\2" target="_blank">\\1\\2</a>', $thisfield);
|
|
| 48 |
- } |
|
| 49 |
- if($fieldinfo['field_type'] == 4) {
|
|
| 50 |
- $thisfield = preg_replace("@\{info\}@", $field['info'], $fieldinfo['field_options']);
|
|
| 51 |
- $thisfield = preg_replace('/(\w+:\/\/)(\S+)/', '<a href="\\1\\2" target="_blank">'.$field['info'].'</a>', $thisfield);
|
|
| 52 |
- if(strpos($thisfield, "http://") == false) $thisfield = preg_replace('/(\S+\.)(\S+)/', '<a href="http://\\1\\2" target="_blank">\\1\\2</a>', $thisfield);
|
|
| 53 |
- } |
|
| 54 |
- if($fieldinfo['field_type'] == 2 || $fieldinfo['field_type'] == 6) {
|
|
| 55 |
- $thisfield = stripslashes($field['info']); |
|
| 56 |
- } |
|
| 57 |
- if($fieldinfo['field_type'] == 3) {
|
|
| 58 |
- $thisfield = !empty($field['info']) ? _YES : _NO; |
|
| 59 |
- } |
|
| 60 |
- else eval($fieldinfo['field_code_out']); |
|
| 61 |
- $tpl->assign($fieldinfo['field_name'], $thisfield); |
|
| 62 |
- $dynamicfields .= "<div class='authorfields'><span class='label'>".$fieldinfo['field_title'].":</span> ".$thisfield."</div>"; |
|
| 63 |
- } |
|
| 64 |
-} |
|
| 65 |
-if(!empty($dynamicfields)) $tpl->assign("authorfields", $dynamicfields);
|
|
| 66 |
-$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&url=viewuser.php?uid=".$uid."\">"._REPORTTHIS."</a>]");
|
|
| 67 |
-/* End dynamic fields */ |
|
| 68 |
-$adminopts = ""; |
|
| 69 |
-if(isADMIN && uLEVEL < 3) {
|
|
| 70 |
- $adminopts .= "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".(isset($userinfo['validated']) && $userinfo['validated'] ? "[<a href=\"admin.php?action=members&revoke=$uid\" class=\"vuadmin\">"._REVOKEVAL."</a>] " : "[<a href=\"admin.php?action=members&validate=$uid\" class=\"vuadmin\">"._VALIDATE."</a>] ")."[<a href=\"user.php?action=editbio&uid=$uid\" class=\"vuadmin\">"._EDIT."</a>] [<a href=\"admin.php?action=members&delete=$uid\" class=\"vuadmin\">"._DELETE."</a>]"; |
|
| 71 |
- $adminopts .= " [<a href=\"admin.php?action=lock&".($userinfo['level'] < 0 ? "unlock=".$userinfo['uid']."\" class=\"vuadmin\">"._UNLOCKMEM : "do=lock&uid=".$userinfo['uid']."\" class=\"vuadmin\">"._LOCKMEM)."</a>]"; |
|
| 72 |
- $adminopts .= " [<a href=\"admin.php?action=admins&".(isset($userinfo['level']) && $userinfo['level'] > 0 ? "revoke=$uid\" class=\"vuadmin\">"._REVOKEADMIN."</a>] [<a href=\"admin.php?action=admins&do=edit&uid=$uid\" class=\"vuadmin\">"._EDITADMIN : "do=new&uid=$uid\" class=\"vuadmin\">"._MAKEADMIN)."</a>]</div>"; |
|
| 73 |
- $tpl->assign("adminoptions", $adminopts);
|
|
| 74 |
-} |
|
| 75 |
-$tpl->gotoBlock("_ROOT");
|
|
| 76 |
-?> |
|
| 77 | 0 |
\ No newline at end of file |
| 78 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,26 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// The table prefix for SMF |
|
| 4 |
-$db_prefix = "smf_"; |
|
| 5 |
- |
|
| 6 |
-// The RELATIVE path to your SMF install from your eFiction install. |
|
| 7 |
-// The example given is an SMF and eFiction install as sibling folders. |
|
| 8 |
-define("PATHTOSMF", "../smf/");
|
|
| 9 |
- |
|
| 10 |
-$db_connection = $dbconnect; |
|
| 11 |
- |
|
| 12 |
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases. |
|
| 13 |
- |
|
| 14 |
-define ("_UIDFIELD", "author.ID_MEMBER"); // Do not change the aliasing (the "author." part)!
|
|
| 15 |
-define ("_PENNAMEFIELD", "author.realName"); // Do not change the aliasing (the "author." part)!
|
|
| 16 |
-define ("_EMAILFIELD", "author.emailAddress"); // Do not change the aliasing (the "author." part)!
|
|
| 17 |
-define ("_PASSWORDFIELD", "author.passwd"); // Do not change the aliasing (the "author." part)!
|
|
| 18 |
-define ("_AUTHORTABLE", $db_prefix."members as author"); // Do not change the aliasing (the "as author" part)!
|
|
| 19 |
- |
|
| 20 |
-define ("_STORYQUERY", "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories) WHERE "._UIDFIELD." = stories.uid AND stories.validated > 0 ");
|
|
| 21 |
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
|
|
| 22 |
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
|
|
| 23 |
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
|
|
| 24 |
-define ("_MEMBERLIST", "SELECT count( stories.sid ) as stories, "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON "._UIDFIELD." = ap.uid LEFT JOIN ".TABLEPREFIX."fanfiction_stories AS stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") ");
|
|
| 25 |
-define ("_MEMBERCOUNT", "SELECT COUNT(DISTINCT "._UIDFIELD.") FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_stories as stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON "._UIDFIELD." = ap.uid");
|
|
| 26 |
-?> |
|
| 27 | 0 |
\ No newline at end of file |
| 5 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,216 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-// ---------------------------------------------------------------------- |
|
| 3 |
-// eFiction 3.2 |
|
| 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 |
-if(!function_exists("random_char")) {
|
|
| 27 |
- |
|
| 28 |
-function random_char($string) |
|
| 29 |
-{
|
|
| 30 |
- $length = strlen($string); |
|
| 31 |
- $position = mt_rand(0, $length - 1); |
|
| 32 |
- $output = ($string[$position]); |
|
| 33 |
- return $output; |
|
| 34 |
-} |
|
| 35 |
- |
|
| 36 |
-function random_string ($charset_string, $length) |
|
| 37 |
-{
|
|
| 38 |
- $return_string = random_char($charset_string); |
|
| 39 |
- for ($x = 1; $x < $length; $x++) |
|
| 40 |
- $return_string .= random_char($charset_string); |
|
| 41 |
- return $return_string; |
|
| 42 |
-} |
|
| 43 |
- |
|
| 44 |
-} |
|
| 45 |
- $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : false; |
|
| 46 |
- if(!$uid) $uid = USERUID; |
|
| 47 |
- |
|
| 48 |
- if((!isADMIN || uLEVEL > 2) && $uid != USERUID && $action == "editbio") $output .= write_error(_NOTAUTHORIZED); |
|
| 49 |
- if(isMEMBER) $output .= "<div id=\"pagetitle\">"._EDITPERSONAL."</div>"; |
|
| 50 |
- else $output .= "<div id=\"pagetitle\">"._NEWACCOUNT."</div>"; |
|
| 51 |
- if(!empty($_POST['submit'])) {
|
|
| 52 |
- $penname = isset($_POST['newpenname']) ? escapestring($_POST['newpenname']) : false; |
|
| 53 |
- $email = escapestring($_POST['email']); |
|
| 54 |
- if(!isset($email) && !isADMIN) $output .= "<div style='text-align: center;'>"._EMAILREQUIRED."</div>"; |
|
| 55 |
- else if($penname && !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= "<div style='text-align: center;'>"._BADUSERNAME."</div>";
|
|
| 56 |
- else if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) $output .= "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";
|
|
| 57 |
- else if($action == "register") {
|
|
| 58 |
- if(!$penname || empty($email) || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) || !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= write_error(_PENEMAILREQUIRED);
|
|
| 59 |
- else if($pwdsetting && empty($_POST['password'])) $output .= write_error(_PWDREQUIRED." "._TRYAGAIN); |
|
| 60 |
- else {
|
|
| 61 |
- $result = dbquery("SELECT "._PENNAMEFIELD." FROM "._AUTHORTABLE." WHERE "._PENNAMEFIELD." = '".escapestring($penname)."'");
|
|
| 62 |
- $result2 = dbquery("SELECT "._EMAILFIELD." as email FROM "._AUTHORTABLE." WHERE "._EMAILFIELD." = '$email'");
|
|
| 63 |
- if($captcha && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL); |
|
| 64 |
- else if(dbnumrows($result) > 0) $output .= write_error(_PENNAMEINUSE." "._TRYAGAIN); |
|
| 65 |
- else if(dbnumrows($result2) > 0) $output .= write_error(_EMAILINUSE." "._TRYAGAIN); |
|
| 66 |
- else if(preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) {
|
|
| 67 |
- if(!$pwdsetting) {
|
|
| 68 |
- $charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ'; |
|
| 69 |
- $pass = random_string($charset, 10); |
|
| 70 |
- $encryppass = md5($pass); |
|
| 71 |
- } |
|
| 72 |
- else {
|
|
| 73 |
- if($_POST['password'] != $_POST['password2']) {
|
|
| 74 |
- $output .= write_error(_PASSWORDTWICE); |
|
| 75 |
- $tpl->assign("output", $output);
|
|
| 76 |
- $tpl->printToScreen( ); |
|
| 77 |
- dbclose( ); |
|
| 78 |
- exit( ); |
|
| 79 |
- } |
|
| 80 |
- $pass = $_POST['password2']; |
|
| 81 |
- $encryppass = md5($pass); |
|
| 82 |
- } |
|
| 83 |
- dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." (penname, realname, bio, email, date, password) VALUES ('".escapestring($penname)."', '".escapestring(strip_tags($_POST['realname']))."', '".strip_tags(escapestring($_POST['bio']), $allowed_tags)."', '$email', now(), '$encryppass')");
|
|
| 84 |
- $useruid = dbinsertid(); |
|
| 85 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, $useruid, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG')");
|
|
| 86 |
- if(empty($siteskin)) {
|
|
| 87 |
- $skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
|
|
| 88 |
- list($skin) = dbrow($skinquery); |
|
| 89 |
- } |
|
| 90 |
- else $skin = $siteskin; |
|
| 91 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(uid, userskin, storyindex, sortby, tinyMCE) VALUES('".$useruid."', '$skin', '$displayindex', '$defaultsort', '$tinyMCE')");
|
|
| 92 |
-/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */ |
|
| 93 |
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
|
|
| 94 |
- while($field = dbassoc($fields)) {
|
|
| 95 |
- $uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false; |
|
| 96 |
- if(!$uid) continue; |
|
| 97 |
- $oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
|
|
| 98 |
- if(dbnumrows($oldfield) > 0) {
|
|
| 99 |
- $newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring($_POST["af_".$field['field_name']]) : false; |
|
| 100 |
- if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='$newinfo' WHERE uid = '$uid' AND field = '".$field['field_id']."'");
|
|
| 101 |
- else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
|
|
| 102 |
- } |
|
| 103 |
- else if(!empty($_POST["af_".$field['field_name']])) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorinfo(`uid`, `info`, `field`) VALUES('$uid', '".escapestring($_POST["af_".$field['field_name']])."', '".$field['field_id']."');");
|
|
| 104 |
- } |
|
| 105 |
-/* End dynamic fields */ |
|
| 106 |
- $subject = _SIGNUPSUBJECT; |
|
| 107 |
- $mailtext = _SIGNUPMESSAGE._LOGIN.": $penname\n"._PASSWORD.": $pass \n\n"; |
|
| 108 |
- if(!$pwdsetting) $mailtext .= _SIGNUPWARNING; |
|
| 109 |
- include("includes/emailer.php");
|
|
| 110 |
- sendemail($penname, $email, $sitename, $siteemail, $subject, $mailtext, "html"); |
|
| 111 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
|
|
| 112 |
- if(defined("AUTHORPREFIX")) dbquery("UPDATE ".AUTHORPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
|
|
| 113 |
- unset($_POST['submit']); |
|
| 114 |
- $output = write_message(_ACTIONSUCCESSFUL); |
|
| 115 |
- define("_LOGINCHECK", true);
|
|
| 116 |
- include("user/login.php");
|
|
| 117 |
- } |
|
| 118 |
- else $output .= _BADUSERNAME; |
|
| 119 |
- } |
|
| 120 |
- } |
|
| 121 |
- else{
|
|
| 122 |
- if(($_POST['password']) && ($_POST['password2'])) {
|
|
| 123 |
- if($_POST['password'] == $_POST['password2']) {
|
|
| 124 |
- $encryppassword = md5($_POST['password']); |
|
| 125 |
- dbquery("UPDATE "._AUTHORTABLE." SET password='$encryppassword' WHERE uid = '$uid'");
|
|
| 126 |
- } |
|
| 127 |
- else $output .= write_error(_PASSWORDTWICE); |
|
| 128 |
- } |
|
| 129 |
- if(isset($_POST['oldpenname']) && $penname != $_POST['oldpenname']) {
|
|
| 130 |
- $checkresult = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE penname = '".escapestring($penname)."'");
|
|
| 131 |
- if(dbnumrows($checkresult)) {
|
|
| 132 |
- $output .= write_message(_PENNAMEINUSE." "._TRYAGAIN); |
|
| 133 |
- } |
|
| 134 |
- else {
|
|
| 135 |
- dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
|
|
| 136 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB')");
|
|
| 137 |
- } |
|
| 138 |
- } |
|
| 139 |
-/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */ |
|
| 140 |
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
|
|
| 141 |
- while($field = dbassoc($fields)) {
|
|
| 142 |
- $uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false; |
|
| 143 |
- if(!$uid) continue; |
|
| 144 |
- $oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
|
|
| 145 |
- if(dbnumrows($oldfield) > 0) {
|
|
| 146 |
- $newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring(descript($_POST["af_".$field['field_name']])) : false; |
|
| 147 |
- if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='".$newinfo."' WHERE uid = '$uid' AND field = '".descript($field['field_id'])."'");
|
|
| 148 |
- else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
|
|
| 149 |
- } |
|
| 150 |
- else if(!empty($_POST["af_".$field['field_name']])) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorinfo(`uid`, `info`, `field`) VALUES('$uid', '".escapestring($_POST["af_".$field['field_name']])."', '".$field['field_id']."');");
|
|
| 151 |
- } |
|
| 152 |
-/* End dynamic fields */ |
|
| 153 |
- dbquery("UPDATE "._AUTHORTABLE." SET realname='".descript(strip_tags(escapestring($_POST['realname'])), $allowed_tags)."', email='$email', bio='".descript(strip_tags(escapestring($_POST['bio']), $allowed_tags))."', image='".($imageupload && !empty($_POST['image']) ? escapestring($_POST['image']) : "")."' WHERE uid = '$uid'");
|
|
| 154 |
- $output .= write_message(_ACTIONSUCCESSFUL." ".(isset($_GET['uid']) ? _BACK2ADMIN : _BACK2ACCT)); |
|
| 155 |
- } |
|
| 156 |
- } |
|
| 157 |
- else {
|
|
| 158 |
- if($action != "register") {
|
|
| 159 |
- $result = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
|
| 160 |
- $user = dbassoc($result); |
|
| 161 |
- $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
|
|
| 162 |
- while($field = dbassoc($result2)) {
|
|
| 163 |
- $user["af_".$field['field']] = $field['info']; |
|
| 164 |
- } |
|
| 165 |
- } |
|
| 166 |
- if($action == "register") {
|
|
| 167 |
- $query = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tos'");
|
|
| 168 |
- list($tos) = dbrow($query); |
|
| 169 |
- $output .= "<div class='tblborder' style='width: 90%; margin: 1em auto;'>$tos</div>"; |
|
| 170 |
- } |
|
| 171 |
- $output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" style='margin: 0 auto;' action=\"user.php?action=$action".($uid != USERUID ? "&uid=".$uid : "")."\"> |
|
| 172 |
- <div><label for='newpenname'>"._PENNAME.":</label>"; |
|
| 173 |
- if((isADMIN && uLEVEL == 1) || $action == "register") |
|
| 174 |
- $output .= "<INPUT name=\"newpenname\" type=\"text\" class=\"textbox\" maxlength=\"200\" value=\"".(isset($user) ? $user['penname'] : "")."\"><INPUT name=\"oldpenname\" type=\"hidden\" value=\"".(isset($user) ? $user['penname'] : "")."\"><font color=\"red\">*</font> "; |
|
| 175 |
- else if(isset($user)) $output .= " ".$user['penname']; |
|
| 176 |
- $output .= "</div> |
|
| 177 |
- <div><label for='realname'>"._REALNAME.": </label><INPUT type=\"text\" class=\"textbox=\" name=\"realname\" maxlength=\"200\" value=\"".(isset($user) ? $user['realname'] : "")."\"></div> |
|
| 178 |
- <div><label for='email'>"._EMAIL.":</label><INPUT type=\"text\" class=\"textbox=\" name=\"email\" value=\"".(isset($user) ? $user['email'] : "")."\" maxlength=\"200\" size=\"35\"><font color=\"red\">*</font></div> |
|
| 179 |
- <div><label for='bio'>"._BIO.":</label></div> |
|
| 180 |
- <div style='width: 450px; margin: 0 auto;'><textarea class=\"textbox\" name=\"bio\" cols=\"50\" rows=\"6\">".(isset($user) ? stripslashes($user['bio']) : "")."</TEXTAREA></div>"; |
|
| 181 |
-/* The section adds fields to the form from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */ |
|
| 182 |
- $authorfields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
|
|
| 183 |
- while($field = dbassoc($authorfields)) {
|
|
| 184 |
- if($field['field_type'] == 1 || $field['field_type'] == 4 || $field['field_type'] == 6) |
|
| 185 |
- $output .= "<div><label for='".$field['field_name']."'>".$field['field_title'].":</label>\n<input type='text' class='textbox' name='af_".$field['field_name']."'".(!empty($user["af_".$field['field_id']]) ? "value='".$user["af_".$field['field_id']]."'" : "").">\n</div>\n"; |
|
| 186 |
- if($field['field_type'] == 2) {
|
|
| 187 |
- $output .= "<div><label for='".$field['field_name']."'>".$field['field_title'].":</label>\n |
|
| 188 |
- <select class='textbox' name='af_".$field['field_name']."'>\n"; |
|
| 189 |
- $opts = explode("|#|", $field['field_options']);
|
|
| 190 |
- foreach($opts as $opt) {
|
|
| 191 |
- $output .= "<option".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == $opt ? " selected" : "").">$opt</option>\n"; |
|
| 192 |
- } |
|
| 193 |
- $output .= "</select>\n</div>\n"; |
|
| 194 |
- } |
|
| 195 |
- if($field['field_type'] == 5) eval(stripslashes($field['field_code_in'])); |
|
| 196 |
- if($field['field_type'] == 3) {
|
|
| 197 |
- $output .= "<div class='fieldset'><span class='label'>".$field['field_title'].":</span>\n"; |
|
| 198 |
- $output .= "<input type='radio' name='af_".$field['field_name']."' id='af_".$field['field_name']._YES."' value='"._YES."'".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == _YES ? "checked='checked'" : "")."> <label for='".$field['field_name']._YES."'>"._YES."</label>\n |
|
| 199 |
- <input type='radio' name='af_".$field['field_name']."' id='af_".$field['field_name']._NO."' value='"._NO."'".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == _NO ? "checked='checked'" : "")."> <label for='".$field['field_name']._NO."'>"._NO."</label></div>\n"; |
|
| 200 |
- } |
|
| 201 |
- } |
|
| 202 |
-/* End dynamic fields */ |
|
| 203 |
- if($imageupload == "1") |
|
| 204 |
- $output .= "<div><label for='image'>"._IMAGE.":</label> <INPUT type=\"text\" class=\"textbox=\" name=\"image\" maxlength=\"200\" value=\"".(!empty($user['image']) ? $user['image'] : "")."\"></div>"; |
|
| 205 |
- if($action != "register" || $pwdsetting) |
|
| 206 |
- $output .= "<div><label for='password'>"._PASSWORD.":</label> <INPUT name=\"password\" class=\"textbox\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div> |
|
| 207 |
- <div><label for='password2'>"._PASSWORD2.":</label> <INPUT name=\"password2\" class=\"textbox=\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>"; |
|
| 208 |
- if(!empty($captcha) && $action == "register") $output .= "<div><label for='userdigit'>"._CAPTCHANOTE."</label><input MAXLENGTH=5 SIZE=5 name=\"userdigit\" type=\"text\" value=\"\"><div style='text-align: center;'><img width=120 height=30 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div></div>"; |
|
| 209 |
- $output .= "<div style='text-align: center; margin: 1em;'><INPUT type=\"hidden\" name=\"uid\" value=\"".(isset($user) ? $user['uid'] : "")."\"><INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\">"; |
|
| 210 |
- if(!isADMIN) |
|
| 211 |
- {
|
|
| 212 |
- $output .= " [<a href=\"admin.php?action=members&delete=$uid\">"._DELETE."</a>]"; |
|
| 213 |
- } |
|
| 214 |
- $output .= "</div></form></div>".write_message("<font color=\"red\">*</font> "._REQUIREDFIELDS);
|
|
| 215 |
- } |
|
| 216 |
-?> |
|
| 217 | 0 |
\ No newline at end of file |
| 218 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,19 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases. |
|
| 4 |
- |
|
| 5 |
-define ("_AUTHORPREFIX", "");
|
|
| 6 |
- |
|
| 7 |
-define ("_UIDFIELD", "author.uid"); // Do not change the aliasing (the "author." part)!
|
|
| 8 |
-define ("_PENNAMEFIELD", "author.penname"); // Do not change the aliasing (the "author." part)!
|
|
| 9 |
-define ("_EMAILFIELD", "author.email"); // Do not change the aliasing (the "author." part)!
|
|
| 10 |
-define ("_PASSWORDFIELD", "author.password"); // Do not change the aliasing (the "author." part)!
|
|
| 11 |
-define ("_AUTHORTABLE", _AUTHORPREFIX."fanfiction_authors as author"); // Do not change the aliasing (the "as author" part)!
|
|
| 12 |
- |
|
| 13 |
-define ("_STORYQUERY", "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories) WHERE "._UIDFIELD." = stories.uid AND stories.validated > 0 ");
|
|
| 14 |
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
|
|
| 15 |
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
|
|
| 16 |
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
|
|
| 17 |
-define ("_MEMBERLIST", "SELECT count( stories.sid ) as stories, "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON "._UIDFIELD." = ap.uid LEFT JOIN ".TABLEPREFIX."fanfiction_stories AS stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") ");
|
|
| 18 |
-define ("_MEMBERCOUNT", "SELECT COUNT(DISTINCT "._UIDFIELD.") FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_stories as stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON "._UIDFIELD." = ap.uid");
|
|
| 19 |
-?> |
|
| 20 | 0 |
\ No newline at end of file |
| 21 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 1 |
-This folder contains the files to replace in your eFiction install to bridge it with |
|
| 2 |
-an installation of PHP-Fusion. These files will let you use your PHP-Fusion users |
|
| 3 |
-table as the authors table for eFiction. This bridge assumes your PHP-Fusion intall |
|
| 4 |
-and your eFiction install share the same database. |
|
| 5 |
- |
|
| 6 |
-Move the following files to the users/ folder in your eFiction install: |
|
| 7 |
- |
|
| 8 |
-editbio.php |
|
| 9 |
-login.php |
|
| 10 |
-profile.php |
|
| 11 |
-register.php |
|
| 12 |
-lostpassword.php |
|
| 13 |
- |
|
| 14 |
-Move the following files to the includes/ folder in your eFiction install: |
|
| 15 |
- |
|
| 16 |
-get_session_vars.php |
|
| 17 |
-queries.php |
|
| 18 |
- |
|
| 19 |
-Edit queries.php to point to your PHP-Fusion tables. |
|
| 20 |
- |
|
| 21 |
-Goto Admin->Page Links and edit your Register and Lost Password links to point to your |
|
| 22 |
-PHP-Fusion pages. |
|
| 23 |
- |
|
| 24 |
-Register -> PATHTOPHPFUSION/register.php |
|
| 25 |
-Lost Password -> PATHTOPHPFUSION/lostpassword.php |
|
| 26 |
- |
|
| 27 |
-If eFiction is a sub-folder under PHP-Fusion PATHTOPHPFUSION will be ../ |
|
| 28 |
- |
|
| 29 |
- |
|
| 30 |
- |
| 31 | 0 |
deleted file mode 100644 |
| ... | ... |
@@ -1,30 +0,0 @@ |
| 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 .= "<script language=\"javascript\" type=\"text/javascript\"> |
|
| 28 |
-location = \""._PATHTOFUSION."edit_profile.php".(isset($_GET['uid']) ? ";u=".$_GET['uid'] : "")."\"; |
|
| 29 |
-</script>"; |
|
| 30 |
-?> |
|
| 31 | 0 |
\ No newline at end of file |
| 32 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,54 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-// ---------------------------------------------------------------------- |
|
| 3 |
-// eFiction 3.2 |
|
| 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 |
-// Get session variables from cookie data if not logged in. |
|
| 27 |
-if (isset($_COOKIE['fusion_user']) && !defined("isMEMBER")) {
|
|
| 28 |
- $cookie_vars = explode(".", $_COOKIE['fusion_user']);
|
|
| 29 |
- $cookie_1 = preg_match("/^[0-9]+$/", $cookie_vars['0']) ? $cookie_vars['0'] : "0";
|
|
| 30 |
- $cookie_2 = (preg_match("/^[0-9a-z]{32}$/", $cookie_vars['1']) ? $cookie_vars['1'] : "");
|
|
| 31 |
- $userdata = dbassoc(dbquery("SELECT * FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_authorprefs as ap) WHERE "._UIDFIELD." = '$cookie_1' AND "._PASSWORDFIELD." ='$cookie_2' AND "._UIDFIELD." = ap.uid"));
|
|
| 32 |
- if($userdata) {
|
|
| 33 |
- if($userdata['uid'] == 0) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(uid, userskin, storyindex, sortby, tinyMCE) VALUES('".$userdata['user_id']."', '$defaultskin', '$displayindex', '$defaultsort', '$tinyMCE')");
|
|
| 34 |
- define("USERUID", $userdata['user_id']);
|
|
| 35 |
- define("USERPENNAME", $userdata['user_name']);
|
|
| 36 |
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin']; |
|
| 37 |
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"]; |
|
| 38 |
- else $siteskin = $defaultskin; |
|
| 39 |
- define("uLEVEL", $userdata['level']);
|
|
| 40 |
- define("isADMIN", uLEVEL > 0 ? true : false);
|
|
| 41 |
- define("isMEMBER", true);
|
|
| 42 |
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent']; |
|
| 43 |
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"]; |
|
| 44 |
- if (empty($_COOKIE['fusion_lastvisit'])) |
|
| 45 |
- setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600, "/", "", "0");
|
|
| 46 |
- } |
|
| 47 |
-} |
|
| 48 |
-if(!defined("USERUID")) define("USERUID", false);
|
|
| 49 |
-if(!defined("USERPENNAME")) define("USERPENNAME", false);
|
|
| 50 |
-if(!defined("uLEVEL")) define("uLEVEL", 0);
|
|
| 51 |
-if(!defined("isMEMBER")) define("isMEMBER", false);
|
|
| 52 |
-if(!defined("isADMIN")) define("isADMIN", false);
|
|
| 53 |
- |
|
| 54 |
-?> |
|
| 55 | 0 |
\ No newline at end of file |
| 57 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,71 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- if(isset($_POST['submit']) && preg_match("!^[a-z0-9_ ]{3,30}$!i", $_POST['penname'])) {
|
|
| 3 |
-if(!defined("_LOGINCHECK")) exit( );
|
|
| 4 |
- define("_BASEDIR", "");
|
|
| 5 |
- include("config.php");
|
|
| 6 |
- $settings = dbquery("SELECT tableprefix, maintenance FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 7 |
- list($tableprefix, $maintenance) = dbrow($settings); |
|
| 8 |
- include("includes/queries.php");
|
|
| 9 |
- $result = dbquery("SELECT * FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs AS ap ON ap.uid = "._UIDFIELD." WHERE "._PENNAMEFIELD." = '".$_POST['penname']."'");
|
|
| 10 |
- $passwd = dbassoc($result); |
|
| 11 |
- if($maintenance && $passwd['level'] == 0) {
|
|
| 12 |
- header("Location: maintenance.php");
|
|
| 13 |
- exit( ); |
|
| 14 |
- } |
|
| 15 |
- $encryptedpassword = md5($_POST['password']); |
|
| 16 |
- if($passwd['user_password'] == $encryptedpassword) {
|
|
| 17 |
- if(!isset($_SESSION)) session_start( ); |
|
| 18 |
- $_SESSION[$sitekey."_useruid"] = $passwd['user_id']; |
|
| 19 |
- $_SESSION[$sitekey."_salt"] = md5($passwd['user_email'] . $encryptedpassword); |
|
| 20 |
- if(isset($_POST['cookiecheck'])) {
|
|
| 21 |
- $cookie_exp = time() + 3600*24*30; } else { $cookie_exp = time() + 3600*3;
|
|
| 22 |
- } |
|
| 23 |
- $cookie_value = $passwd['user_id'].".".$passwd['user_password']; |
|
| 24 |
- setcookie("fusion_user", $cookie_value, $cookie_exp);
|
|
| 25 |
- setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600);
|
|
| 26 |
- define("USERUID", $passwd['uid']);
|
|
| 27 |
- define("USERPENNAME", $passwd['penname']);
|
|
| 28 |
- if(!isset($_SESSION[$sitekey."_skin"])) $siteskin = $passwd['userskin']; |
|
| 29 |
- else $siteskin = $_SESSION[$sitekey."_skin"]; |
|
| 30 |
- define("uLEVEL", $passwd['level']);
|
|
| 31 |
- define("isADMIN", uLEVEL > 0 ? true : false);
|
|
| 32 |
- define("isMEMBER", true);
|
|
| 33 |
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $passwd['ageconsent']; |
|
| 34 |
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"]; |
|
| 35 |
- $cookie_value = $passwd['user_id'].".".$passwd['user_password']; |
|
| 36 |
- setcookie("fusion_user", $cookie_value, time() + 3600, "/", "", "0");
|
|
| 37 |
- if (empty($_COOKIE['fusion_lastvisit'])) |
|
| 38 |
- setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600, "/", "", "0");
|
|
| 39 |
- } |
|
| 40 |
- else {
|
|
| 41 |
- require_once("header.php");
|
|
| 42 |
- //make a new TemplatePower object |
|
| 43 |
- if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
|
|
| 44 |
- else $tpl = new TemplatePower("default_tpls/default.tpl");
|
|
| 45 |
- include_once("includes/pagesetup.php");
|
|
| 46 |
- $output2 .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>"; |
|
| 47 |
- $output2 .= "<div style='text-align: center;'>"._WRONGPASSWORD."</div>"; |
|
| 48 |
- $tpl->assign("output", $output);
|
|
| 49 |
- $tpl->printToScreen( ); |
|
| 50 |
- dbclose( ); |
|
| 51 |
- exit( ); |
|
| 52 |
- } |
|
| 53 |
- } |
|
| 54 |
- else {
|
|
| 55 |
-if(!defined("_CHARSET")) exit( );
|
|
| 56 |
- $output .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>"; |
|
| 57 |
- $output .= "<div style=\"width: 250px; margin: 0 auto; text-align: center;\"><form method=\"POST\" enctype=\"multipart/form-data\" action=\"user.php?action=login".(isset($_GET['sid']) && isNumber($_GET['sid']) ? "&sid=".$_GET['sid'] : "")."\"> |
|
| 58 |
- <div class=\"label\" style=\"float: left; width: 30%; text-align: right;\"><label for=\"penname\">"._PENNAME.":</label></div><INPUT type=\"text\" class=\"textbox\" name=\"penname\" id=\"penname\"><br /> |
|
| 59 |
- <div class=\"label\" style=\"float: left; width: 30%; text-align: right;\"><label for=\"pswd\">"._PASSWORD.":</label></div><INPUT type=\"password\" class=\"textbox\" id=\"pswd\" name=\"password\"><br /> |
|
| 60 |
- <INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookiecheck\" id=\"cookiecheck\" value=\"1\"><label for=\"cookiecheck\">"._REMEMBERME."</label><br /> |
|
| 61 |
- <INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"> |
|
| 62 |
- </form></div>"; |
|
| 63 |
- $linkquery = dbquery("SELECT * from ".TABLEPREFIX."fanfiction_pagelinks WHERE link_name = 'login' OR link_name = 'lostpassword'");
|
|
| 64 |
- while($link = dbassoc($linkquery)) {
|
|
| 65 |
- if($link['link_access'] && !isMEMBER) continue; |
|
| 66 |
- if($link['link_access'] == 2 && !isADMIN) continue; |
|
| 67 |
- $pagelinks[$link['link_name']] = array("id" => $link['link_id'], "text" => $link['link_text'], "url" => _BASEDIR.$link['link_url'], "link" => "<a href=\"".$link['link_url']."\" title=\"".$link['link_text']."\"".($link['link_target'] ? " target=\"_blank\"" : "").($current == $link['link_name'] ? " id=\"current\"" : "").">".$link['link_text']."</a>");
|
|
| 68 |
- } |
|
| 69 |
- $output .= "<div style='text-align: center;'>".$pagelinks['register']['link']." | ".$pagelinks['lostpassword']['link']."</div>"; |
|
| 70 |
- } |
|
| 71 |
-?> |
|
| 72 | 0 |
\ No newline at end of file |
| 73 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,44 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
-if(!defined("_LOGOUTCHECK")) exit( );
|
|
| 3 |
- define("_BASEDIR", "");
|
|
| 4 |
- include("config.php");
|
|
| 5 |
- include("includes/queries.php");
|
|
| 6 |
- session_start( ); |
|
| 7 |
- foreach ($_SESSION as $VarName => $Value) {
|
|
| 8 |
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
|
|
| 9 |
- if(strpos($VarName, "skin")) continue; |
|
| 10 |
- $_SESSION[$VarName] = ""; |
|
| 11 |
- unset($_SESSION[$VarName]); |
|
| 12 |
- unset($_COOKIE[$VarName]); |
|
| 13 |
- setcookie($VarName, '', time() - 1000, '/', '', '' ); |
|
| 14 |
- } |
|
| 15 |
- } |
|
| 16 |
- foreach ($_COOKIE as $VarName => $Value) {
|
|
| 17 |
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
|
|
| 18 |
- unset($_COOKIE[$VarName]); |
|
| 19 |
- setcookie($VarName, "", time() - 1000, '/', '', '' ); |
|
| 20 |
- } |
|
| 21 |
- } |
|
| 22 |
- $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".$_SERVER['REMOTE_ADDR']."'");
|
|
| 23 |
- unset($_COOKIE["fusion_user"], $_COOKIE["fusion_lastvisited"], $_COOKIE['fusion_visited']); |
|
| 24 |
- setcookie("fusion_user", "", time() - 1000);
|
|
| 25 |
- setcookie("fusion_lastvisit", "", time() - 1000);
|
|
| 26 |
- setcookie("fusion_visited", "", time() - 1000);
|
|
| 27 |
- |
|
| 28 |
-require_once("header.php");
|
|
| 29 |
-//make a new TemplatePower object |
|
| 30 |
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
|
|
| 31 |
-else $tpl = new TemplatePower("default_tpls/default.tpl");
|
|
| 32 |
-if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
|
|
| 33 |
-else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" ); |
|
| 34 |
-include("includes/pagesetup.php");
|
|
| 35 |
- |
|
| 36 |
-$output .= write_message(_ACTIONSUCCESSFUL); |
|
| 37 |
-$tpl->assign("output", $output);
|
|
| 38 |
-$tpl->printToScreen( ); |
|
| 39 |
-dbclose( ); |
|
| 40 |
-exit(); |
|
| 41 |
- |
|
| 42 |
-// header("Location: index.php");
|
|
| 43 |
-// exit( ); |
|
| 44 |
-?> |
|
| 45 | 0 |
\ No newline at end of file |
| 46 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,29 +0,0 @@ |
| 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 |
-$output .= "<script language=\"javascript\" type=\"text/javascript\"> |
|
| 27 |
-location = \""._PATHTOFUSION."lostpassword.php\"; |
|
| 28 |
-</script>"; |
|
| 29 |
-?> |
|
| 30 | 0 |
\ No newline at end of file |
| 31 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,52 +0,0 @@ |
| 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 |
-// Build the user's profile information |
|
| 27 |
-$tpl->newBlock("profile");
|
|
| 28 |
-$result2 = dbquery("SELECT *,"._PENNAMEFIELD." as penname,user_avatar as image, user_email as email FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
|
| 29 |
-$userinfo = dbassoc($result2); |
|
| 30 |
-$nameinfo = ""; |
|
| 31 |
-if($userinfo['email']) |
|
| 32 |
- $nameinfo .= " [<a href=\"viewuser.php?action=contact&uid=".$userinfo['uid']."\">"._CONTACT."</a>]"; |
|
| 33 |
-if($favorites == "1" && isMEMBER) |
|
| 34 |
- $nameinfo .= " [<a href=\"viewuser.php?uid=USERUID&action=addfav&author=".$userinfo['uid']."\">"._ADDAUTHOR2FAVES."</a>]"; |
|
| 35 |
-$tpl->assign("userpenname", $userinfo['penname']." ".$nameinfo);
|
|
| 36 |
-$tpl->assign("membersince", date("$dateformat", $userinfo['user_joined']));
|
|
| 37 |
-if($userinfo['image']) |
|
| 38 |
- $tpl->assign("image", "<img src=\"../images/avatars/".$userinfo['image']."\">");
|
|
| 39 |
-$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
|
|
| 40 |
-$tpl->assign("aol", !empty($userinfo['user_aol']) ? "<img src=\"http://big.oscar.aol.com/".$userinfo['user_aol']."?on_url=$url/images/aim.gif&off_url=$url/images/aim.gif\"> <a href=\"aim:goim?{aol}ScreenName=".$userinfo['user_aol']."\">".$userinfo['user_aol']."</a>" : "<img src=\"images/aim.gif\" alt=\""._AOL."\"> "._NONE);
|
|
| 41 |
-$tpl->assign("icq", !empty($userinfo['user_icq']) ? "<img src=\"http://status.icq.com/online.gif?icq=".$userinfo['user_icq']."&img=5\"> ".$userinfo['user_icq'] : "<img src=\"images/icq.gif\" alt=\""._ICQ."\"> "._NONE);
|
|
| 42 |
-$tpl->assign("msn", "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".($userinfo['user_msn'] ? $userinfo['user_msn'] : _NONE));
|
|
| 43 |
-$tpl->assign("yahoo", !empty($userinfo['user_yahoo']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$userinfo['user_yahoo']."&.src=pg\"><img border=\"0\" src=\"http://opi.yahoo.com/online?u=".$userinfo['user_yahoo']."&m=g&t=1\"> ".$userinfo['user_yahoo']."</a>" : "<img src=\"images/yim.gif\" alt=\""._YAHOO."\"> "._NONE);
|
|
| 44 |
-$adminopts = ""; |
|
| 45 |
-if(isADMIN && uLEVEL < 3) {
|
|
| 46 |
- $adminopts .= "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".(isset($userinfo['validated']) && $userinfo['validated'] ? "[<a href=\"admin.php?action=members&revoke=$uid\" class=\"vuadmin\">"._REVOKEVAL."</a>] " : "[<a href=\"admin.php?action=members&validate=$uid\" class=\"vuadmin\">"._VALIDATE."</a>] ")."[<a href=\"user.php?action=editbio&uid=$uid\" class=\"vuadmin\">"._EDIT."</a>] [<a href=\"admin.php?action=members&delete=$uid\" class=\"vuadmin\">"._DELETE."</a>]"; |
|
| 47 |
- $adminopts .= " [<a href=\"admin.php?action=lock&".($userinfo['level'] < 0 ? "unlock=".$userinfo['uid']."\" class=\"vuadmin\">"._UNLOCKMEM : "do=lock&uid=".$userinfo['uid']."\" class=\"vuadmin\">"._LOCKMEM)."</a>]"; |
|
| 48 |
- $adminopts .= " [<a href=\"admin.php?action=admins&".(isset($userinfo['level']) && $userinfo['level'] > 0 ? "revoke=$uid\" class=\"vuadmin\">"._REVOKEADMIN."</a>] [<a href=\"admin.php?action=admins&do=edit&uid=$uid\" class=\"vuadmin\">"._EDITADMIN : "do=new&uid=$uid\" class=\"vuadmin\">"._MAKEADMIN)."</a>]</div>"; |
|
| 49 |
- $tpl->assign("adminoptions", $adminopts);
|
|
| 50 |
-} |
|
| 51 |
-$tpl->gotoBlock("_ROOT");
|
|
| 52 |
-?> |
|
| 53 | 0 |
\ No newline at end of file |
| 54 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,23 +0,0 @@ |
| 1 |
-<?php |
|
| 2 |
- |
|
| 3 |
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases. |
|
| 4 |
- |
|
| 5 |
-// Your php-fusion database prefix found in the config.php of your php-fusion directory. |
|
| 6 |
-$db_prefix = "fusion_"; |
|
| 7 |
- |
|
| 8 |
-// This should be the relative path to your PHP-Fusion installation. It will be used for your register, edit bio, etc. pages. |
|
| 9 |
-define("_PATHTOFUSION", "../fusion");
|
|
| 10 |
- |
|
| 11 |
-define("_UIDFIELD", "author.user_id"); // Do not change the aliasing (the "author." part)!
|
|
| 12 |
-define("_PENNAMEFIELD", "author.user_name"); // Do not change the aliasing (the "author." part)!
|
|
| 13 |
-define("_EMAILFIELD", "author.user_email"); // Do not change the aliasing (the "author." part)!
|
|
| 14 |
-define("_PASSWORDFIELD", "author.user_password"); // Do not change the aliasing (the "author." part)!
|
|
| 15 |
-define("_AUTHORTABLE", $db_prefix."users as author"); // Do not change the aliasing (the "as author" part)!
|
|
| 16 |
- |
|
| 17 |
-define ("_STORYQUERY", "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories) WHERE "._UIDFIELD." = stories.uid AND stories.validated > 0 ");
|
|
| 18 |
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
|
|
| 19 |
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
|
|
| 20 |
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
|
|
| 21 |
-define ("_MEMBERLIST", "SELECT count( stories.sid ) as stories, "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON "._UIDFIELD." = ap.uid LEFT JOIN ".TABLEPREFIX."fanfiction_stories AS stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") ");
|
|
| 22 |
-define ("_MEMBERCOUNT", "SELECT COUNT(DISTINCT "._UIDFIELD.") FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_stories as stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON "._UIDFIELD." = ap.uid");
|
|
| 23 |
-?> |
|
| 24 | 0 |
\ No newline at end of file |
| 25 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,29 +0,0 @@ |
| 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 |
-$output .= "<script language=\"javascript\" type=\"text/javascript\"> |
|
| 27 |
-location = \""._PATHTOFUSION."register.php\"; |
|
| 28 |
-</script>"; |
|
| 29 |
-?> |
|
| 30 | 0 |
\ No newline at end of file |
| ... | ... |
@@ -66,7 +66,7 @@ CREATE TABLE `fanfiction_authors` ( |
| 66 | 66 |
`website` varchar(200) NOT NULL default '', |
| 67 | 67 |
`bio` text NOT NULL, |
| 68 | 68 |
`image` varchar(200) NOT NULL default '', |
| 69 |
- `date` datetime NOT NULL default '0000-00-00 00:00:00', |
|
| 69 |
+ `date` int(11) NOT NULL default '0', |
|
| 70 | 70 |
`admincreated` int(11) NOT NULL default '0', |
| 71 | 71 |
`password` varchar(40) NOT NULL default '0', |
| 72 | 72 |
PRIMARY KEY (`uid`), |
| ... | ... |
@@ -222,7 +222,7 @@ CREATE TABLE `fanfiction_comments` ( |
| 222 | 222 |
`nid` int(11) NOT NULL default '0', |
| 223 | 223 |
`uid` int(11) NOT NULL default '0', |
| 224 | 224 |
`comment` text NOT NULL, |
| 225 |
- `time` datetime NOT NULL default '0000-00-00 00:00:00', |
|
| 225 |
+ `time` int(11) NOT NULL default '0', |
|
| 226 | 226 |
PRIMARY KEY (`cid`), |
| 227 | 227 |
KEY `commentlist` (`nid`,`time`) |
| 228 | 228 |
) REPLACE=MyISAM; |
| ... | ... |
@@ -254,7 +254,7 @@ CREATE TABLE `fanfiction_inseries` ( |
| 254 | 254 |
`subseriesid` int(11) NOT NULL default '0', |
| 255 | 255 |
`confirmed` int(11) NOT NULL default '0', |
| 256 | 256 |
`inorder` int(11) NOT NULL default '0', |
| 257 |
- `updated` datetime NOT NULL default '0000-00-00 00:00:00', |
|
| 257 |
+ `updated` int(11) NOT NULL default '0', |
|
| 258 | 258 |
PRIMARY KEY (`sid`,`seriesid`), |
| 259 | 259 |
KEY `seriesid` (`seriesid`,`inorder`) |
| 260 | 260 |
) REPLACE=MyISAM; |
| ... | ... |
@@ -270,7 +270,7 @@ CREATE TABLE `fanfiction_log` ( |
| 270 | 270 |
`log_action` varchar(255) default NULL, |
| 271 | 271 |
`log_uid` int(11) NOT NULL default '0', |
| 272 | 272 |
`log_ip` int(11) default NULL, |
| 273 |
- `log_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
|
| 273 |
+ `log_timestamp` int(11) NOT NULL default '0', |
|
| 274 | 274 |
`log_type` char(2) NOT NULL default '', |
| 275 | 275 |
PRIMARY KEY (`log_id`) |
| 276 | 276 |
) REPLACE=MyISAM; |
| ... | ... |
@@ -384,7 +384,7 @@ CREATE TABLE `fanfiction_reviews` ( |
| 384 | 384 |
`reviewer` varchar(60) NOT NULL default '0', |
| 385 | 385 |
`uid` int(11) NOT NULL default '0', |
| 386 | 386 |
`review` text NOT NULL, |
| 387 |
- `date` datetime NOT NULL default '0000-00-00 00:00:00', |
|
| 387 |
+ `date` int(11) NOT NULL default '0', |
|
| 388 | 388 |
`rating` int(11) NOT NULL default '0', |
| 389 | 389 |
`respond` char(1) NOT NULL default '0', |
| 390 | 390 |
`type` char(2) NOT NULL default 'ST', |
| ... | ... |
@@ -456,8 +456,8 @@ CREATE TABLE `fanfiction_stories` ( |
| 456 | 456 |
`classes` varchar(200) default NULL, |
| 457 | 457 |
`charid` varchar(250) NOT NULL default '0', |
| 458 | 458 |
`rid` varchar(25) NOT NULL default '0', |
| 459 |
- `date` datetime NOT NULL default '0000-00-00 00:00:00', |
|
| 460 |
- `updated` datetime NOT NULL default '0000-00-00 00:00:00', |
|
| 459 |
+ `date` int(11) NOT NULL default '0', |
|
| 460 |
+ `updated` int(11) NOT NULL default '0', |
|
| 461 | 461 |
`uid` int(11) NOT NULL default '0', |
| 462 | 462 |
`coauthors` varchar(200) default NULL, |
| 463 | 463 |
`featured` tinyint(4) NOT NULL default '0', |
| 464 | 464 |
deleted file mode 100644 |
| ... | ... |
@@ -1,1138 +0,0 @@ |
| 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 |
-function random_char($string) |
|
| 24 |
-{
|
|
| 25 |
- $length = strlen($string); |
|
| 26 |
- $position = mt_rand(0, $length - 1); |
|
| 27 |
- return $string[$position]; |
|
| 28 |
-} |
|
| 29 |
- |
|
| 30 |
-function random_string ($charset_string, $length) |
|
| 31 |
-{
|
|
| 32 |
- $return_string = random_char($charset_string); |
|
| 33 |
- for ($x = 1; $x < $length; $x++) |
|
| 34 |
- $return_string .= random_char($charset_string); |
|
| 35 |
- return $return_string; |
|
| 36 |
-} |
|
| 37 |
- |
|
| 38 |
- |
|
| 39 |
-$randomcharset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ'; |
|
| 40 |
- |
|
| 41 |
-// Strip out slashes if magic quotes isn't on. |
|
| 42 |
-if(ini_get("magic_quotes_gpc")) {
|
|
| 43 |
- foreach($_POST as $var => $val) {
|
|
| 44 |
- $val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val ); |
|
| 45 |
- } |
|
| 46 |
- foreach($_GET as $var => $val) {
|
|
| 47 |
- $val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val ); |
|
| 48 |
- } |
|
| 49 |
- foreach($_COOKIE as $var => $val) {
|
|
| 50 |
- $val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val ); |
|
| 51 |
- } |
|
| 52 |
-} |
|
| 53 |
- |
|
| 54 |
-Header('Cache-Control: private, no-cache, must-revalidate, max_age=0, post-check=0, pre-check=0');
|
|
| 55 |
-header ("Pragma: no-cache");
|
|
| 56 |
-header ("Expires: 0");
|
|
| 57 |
- |
|
| 58 |
-//make a new TemplatePower object |
|
| 59 |
-echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> |
|
| 60 |
-<html><head><title>eFiction 1.1 to $version Upgrade</title> |
|
| 61 |
-<style> |
|
| 62 |
-LABEL { float: left; display: block; width: 50%; text-align: right; padding-right: 10px; clear: left;}
|
|
| 63 |
-.row { float: left; width: 99%; }
|
|
| 64 |
-#settingsform FORM { width: 80%; margin; 0 auto; }
|
|
| 65 |
-#settingsform LABEL { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left; }
|
|
| 66 |
-#settingsform .fieldset SPAN { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left;}
|
|
| 67 |
-#settingsform .fieldset LABEL { float: none; width: auto; display: inline; text-align: left; clear: none; }
|
|
| 68 |
-#settingsform .tinytoggle { text-align: center; }
|
|
| 69 |
-#settingsform .tinytoggle LABEL { float: none; display: inline; width: auto; text-align: center; padding: 0; clear: none; }
|
|
| 70 |
-#settingsform #submit { display: block; margin: 1ex auto; }
|
|
| 71 |
-a.pophelp{
|
|
| 72 |
- position: relative; /* this is the key*/ |
|
| 73 |
- z-index:24; |
|
| 74 |
- vertical-align: super; |
|
| 75 |
- text-decoration: none; |
|
| 76 |
-} |
|
| 77 |
- |
|
| 78 |
-a.pophelp:hover{z-index:100; border: none; text-decoration: none;}
|
|
| 79 |
- |
|
| 80 |
-a.pophelp span{display: none; position: absolute; text-decoration: none;}
|
|
| 81 |
- |
|
| 82 |
-a.pophelp:hover span{ /*the span will display just on :hover state*/
|
|
| 83 |
- display:block; |
|
| 84 |
- position: absolute; |
|
| 85 |
- top: 0; left: 8em; width: 225px; |
|
| 86 |
- border:1px solid #000; |
|
| 87 |
- background-color:#CCC; color:#000; |
|
| 88 |
- text-decoration: none; |
|
| 89 |
- text-align: left; |
|
| 90 |
- padding: 5px; |
|
| 91 |
- font-weight: normal; |
|
| 92 |
-} |
|
| 93 |
-.required { color: red; }
|
|
| 94 |
-</style> |
|
| 95 |
-<link rel=\"stylesheet\" type=\"text/css\" href='../default_tpls/style.css'></head>"; |
|
| 96 |
- |
|
| 97 |
-$output = ""; |
|
| 98 |
-define("_BASEDIR", "../");
|
|
| 99 |
-include ("../includes/class.TemplatePower.inc.php");
|
|
| 100 |
-if(isset($_GET['step']) && $_GET['step'] > 2) {
|
|
| 101 |
- include("../config.php");
|
|
| 102 |
- $settings = dbquery("SELECT tableprefix, language FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 103 |
- list($tableprefix, $language) = dbrow($settings); |
|
| 104 |
- define("SITEKEY", $sitekey);
|
|
| 105 |
- define("TABLEPREFIX", $tableprefix);
|
|
| 106 |
-} |
|
| 107 |
-if(isset($language)) {
|
|
| 108 |
-if(file_exists("../languages/{$language}.php")) include ("../languages/{$language}.php");
|
|
| 109 |
-else include ("../languages/en.php");
|
|
| 110 |
-if(file_exists("../languages/{$language}_admin.php")) include ("../languages/{$language}_admin.php");
|
|
| 111 |
-else include ("../languages/en_admin.php");
|
|
| 112 |
-if(file_exists("languages/$language.php")) include ("languages/{$language}.php");
|
|
| 113 |
-else include("languages/en.php");
|
|
| 114 |
-} |
|
| 115 |
-else {
|
|
| 116 |
-include ("../languages/en.php");
|
|
| 117 |
-include ("../languages/en_admin.php");
|
|
| 118 |
-include("languages/en.php");
|
|
| 119 |
-} |
|
| 120 |
-include("../includes/corefunctions.php");
|
|
| 121 |
- |
|
| 122 |
- |
|
| 123 |
-// So I don't have to keep updating the version number in 3 different files. |
|
| 124 |
-include("../version.php");
|
|
| 125 |
- |
|
| 126 |
-$tpl = new TemplatePower( "../default_tpls/default.tpl" ); |
|
| 127 |
-$tpl->assignInclude( "header", "./../default_tpls/header.tpl" ); |
|
| 128 |
-$tpl->assignInclude( "footer", "./../default_tpls/footer.tpl" ); |
|
| 129 |
-$tpl->prepare( ); |
|
| 130 |
-$tpl->newBlock("header");
|
|
| 131 |
-$tpl->assign("sitename", "Upgrade eFiction 1.1 to eFiction $version");
|
|
| 132 |
-$tpl->gotoBlock( "_ROOT" ); |
|
| 133 |
-$tpl->newBlock("footer");
|
|
| 134 |
-$tpl->assign( "footer", "eFiction $version © 2006. <a href='http://efiction.org/'>http://efiction.org/</a>"); |
|
| 135 |
-$tpl->gotoBlock( "_ROOT" ); |
|
| 136 |
- |
|
| 137 |
-switch($_GET['step']) {
|
|
| 138 |
- case "18": |
|
| 139 |
- $output .= "<div id='pagetitle'>"._MISCDBUPDATE."</div>"; |
|
| 140 |
- if(isset($_GET['install'])) {
|
|
| 141 |
- if($_GET['install'] == "automatic") {
|
|
| 142 |
- include("../config.php");
|
|
| 143 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 144 |
- list($tableprefix) = dbrow($settings); |
|
| 145 |
- $alter1 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_characters` ADD `bio` TEXT NULL, ADD `image` VARCHAR( 200 ) NOT NULL");
|
|
| 146 |
- $output .= write_message(_ALTER11CHARACTERS.($alter1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 147 |
- $alter1 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_categories` CHANGE `locked` `locked` CHAR( 1 ) DEFAULT '0' NOT NULL");
|
|
| 148 |
- $output .= write_message(_ALTER11CATEGORIES.($alter1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 149 |
- $alter1 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_ratings` CHANGE `ratingwarning` `ratingwarning` CHAR( 1 ) DEFAULT '0' NOT NULL ");
|
|
| 150 |
- $output .= write_message(_ALTER11RATINGS.($alter1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 151 |
- $alter1 = dbquery("DROP TABLE IF EXISTS `".$tableprefix."fanfiction_settings_old`");
|
|
| 152 |
- dbquery("alter table ".$tableprefix."fanfiction_categories drop index category;");
|
|
| 153 |
- dbquery("alter table ".$tableprefix."fanfiction_categories drop index parentcatid;");
|
|
| 154 |
- dbquery("create index byparent on ".$tableprefix."fanfiction_categories (parentcatid,displayorder);");
|
|
| 155 |
- dbquery("create index forstoryblock on ".$tableprefix."fanfiction_chapters (sid,validated);");
|
|
| 156 |
- dbquery("alter table ".$tableprefix."fanfiction_comments drop index nid;");
|
|
| 157 |
- dbquery("alter table ".$tableprefix."fanfiction_comments add index commentlist (nid,time);");
|
|
| 158 |
- dbquery("create index avgrating on ".$tableprefix."fanfiction_reviews(type,item,rating);");
|
|
| 159 |
- dbquery("alter table ".$tableprefix."fanfiction_reviews drop index sid;");
|
|
| 160 |
- dbquery("create index bychapter on ".$tableprefix."fanfiction_reviews (chapid,rating);");
|
|
| 161 |
- dbquery("alter table ".$tableprefix."fanfiction_reviews add index byuid (uid,item,type);");
|
|
| 162 |
- dbquery("alter table ".$tableprefix."fanfiction_stories drop index validated;");
|
|
| 163 |
- dbquery("create index validateduid on ".$tableprefix."fanfiction_stories (validated,uid);");
|
|
| 164 |
- dbquery("create index recent on ".$tableprefix."fanfiction_stories (updated,validated);");
|
|
| 165 |
- $serieslist = dbquery("SELECT seriesid FROM ".$tableprefix."fanfiction_series");
|
|
| 166 |
- $totalseries = dbnumrows($serieslist); |
|
| 167 |
- while($s = dbassoc($serieslist)) {
|
|
| 168 |
- $numstories = count(storiesInSeries($s['seriesid'])); |
|
| 169 |
- dbquery("UPDATE ".$tableprefix."fanfiction_series SET numstories = '$numstories' WHERE seriesid = ".$s['seriesid']." LIMIT 1");
|
|
| 170 |
- } |
|
| 171 |
- $storiesquery =dbquery("SELECT COUNT(sid) as totals, COUNT(DISTINCT uid) as totala, SUM(wordcount) as totalwords FROM ".$tableprefix."fanfiction_stories WHERE validated > 0 ");
|
|
| 172 |
- list($stories, $authors, $words) = dbrow($storiesquery); |
|
| 173 |
- dbquery("UPDATE ".$tableprefix."fanfiction_stats SET stories = '$stories', authors = '$authors', wordcount = '$words' WHERE sitekey = '".$sitekey."'");
|
|
| 174 |
- |
|
| 175 |
- $chapterquery = dbquery("SELECT COUNT(chapid) as chapters FROM ".$tableprefix."fanfiction_chapters where validated > 0");
|
|
| 176 |
- list($chapters) = dbrow($chapterquery); |
|
| 177 |
- |
|
| 178 |
- $authorquery = dbquery("SELECT COUNT(uid) as totalm FROM ".$tableprefix."fanfiction_authors");
|
|
| 179 |
- list($members) = dbrow($authorquery); |
|
| 180 |
- |
|
| 181 |
- list($newest) = dbrow(dbquery("SELECT uid as uid FROM ".$tableprefix."fanfiction_authors ORDER BY uid DESC LIMIT 1"));
|
|
| 182 |
- $reviewquery = dbquery("SELECT COUNT(reviewid) as totalr FROM ".$tableprefix."fanfiction_reviews WHERE review != 'No Review'");
|
|
| 183 |
- list($reviews) = dbrow($reviewquery); |
|
| 184 |
- $reviewquery = dbquery("SELECT COUNT(uid) FROM ".$tableprefix."fanfiction_reviews WHERE review != 'No Review' AND uid != 0");
|
|
| 185 |
- list($reviewers) = dbrow($reviewquery); |
|
| 186 |
- dbquery("UPDATE ".$tableprefix."fanfiction_stats SET series = '$totalseries', chapters = '$chapters', members = '$members', newestmember = '$newest', reviews = '$reviews', reviewers = '$reviewers' WHERE sitekey = '".$sitekey."'");
|
|
| 187 |
- $alltables = dbquery("SHOW TABLES");
|
|
| 188 |
- while ($table = dbassoc($alltables)) {
|
|
| 189 |
- foreach ($table as $db => $tablename) {
|
|
| 190 |
- dbquery("OPTIMIZE TABLE `".$tablename."`");
|
|
| 191 |
- } |
|
| 192 |
- } |
|
| 193 |
- $output .= write_message(_UPGRADE11END); |
|
| 194 |
- } |
|
| 195 |
- else $output .= write_message(_MISCDBUPDATEMANUAL._UPGRADE11END); |
|
| 196 |
- } |
|
| 197 |
- else $output .= write_message(_MISCDBUPDATEINFO."<br /><br /><a href='upgrade11.php?step=18&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?step=18&install=manual'>"._MANUAL2."</a>"); |
|
| 198 |
- break; |
|
| 199 |
- case "17": |
|
| 200 |
- $output .= "<div id='pagetitle'>"._NEWSUPDATE."</div>"; |
|
| 201 |
- if(isset($_GET['install'])) {
|
|
| 202 |
- include("../config.php");
|
|
| 203 |
- |
|
| 204 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 205 |
- list($tableprefix) = dbrow($settings); |
|
| 206 |
- dbquery("ALTER TABLE `".$tableprefix."fanfiction_news` ADD `comments` INT NOT NULL DEFAULT '0'");
|
|
| 207 |
- $newslist = dbquery("SELECT count(cid) as count, nid FROM ".$tableprefix."fanfiction_comments GROUP BY nid");
|
|
| 208 |
- while($n = dbassoc($newslist)) {
|
|
| 209 |
- dbquery("UPDATE ".$tableprefix."fanfiction_news SET comments = '".$n['count']."' WHERE nid = ".$n['nid']);
|
|
| 210 |
- } |
|
| 211 |
- $comments = dbquery("SELECT uname FROM ".$tableprefix."fanfiction_comments GROUP BY uname");
|
|
| 212 |
- while($uname = dbassoc($comments)) {
|
|
| 213 |
- unset($uid); |
|
| 214 |
- $nameinfo = dbquery("SELECT uid FROM ".$tableprefix."fanfiction_authors WHERE penname = '".$uname['uname']."'");
|
|
| 215 |
- list($uid) = dbrow($nameinfo); |
|
| 216 |
- if(empty($uid)) $uid = 0; |
|
| 217 |
- dbquery("UPDATE ".$tableprefix."fanfiction_comments SET uname = '$uid' WHERE uname = '".$uname['uname']."'");
|
|
| 218 |
- } |
|
| 219 |
- $result2 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_comments` CHANGE `uname` `uid` INT NOT NULL DEFAULT '0';");
|
|
| 220 |
- $output .= write_message(_NEWSUPDATERESULT.($result2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 221 |
- $output .= write_message("<a href='upgrade11.php?step=18'>"._CONTINUE."</a>");
|
|
| 222 |
- |
|
| 223 |
- } |
|
| 224 |
- else $output .= write_message(_NEWSUPDATEINFO."<br /><a href='upgrade11.php?step=17&install=automatic'>"._CONTINUE."</a>"); |
|
| 225 |
- |
|
| 226 |
- break; |
|
| 227 |
- case "16": |
|
| 228 |
- $output .= "<div id='pagetitle'>"._AUTHORUPDATE."</div>"; |
|
| 229 |
- if(isset($_GET['install'])) {
|
|
| 230 |
- include("../config.php");
|
|
| 231 |
- define("_BASEDIR", "../");
|
|
| 232 |
- $settings = dbquery("SELECT tableprefix, defaultsort, displayindex, tinyMCE, storiespath FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 233 |
- list($defaultsort, $displayindex, $tinyMCE, $storiespath) = dbrow($settings); |
|
| 234 |
- $result = dbquery("INSERT INTO ".$tableprefix."fanfiction_authorprefs(`uid`, `newreviews`, `validated`, `userskin`, `level`, `categories`, `contact`) SELECT uid, newreviews, validated, userskin, level, categories, contact FROM ".$tableprefix."fanfiction_authors");
|
|
| 235 |
- $result2 = dbquery("UPDATE ".$tableprefix."fanfiction_authorprefs set sortby = '$defaultsort', storyindex = '$displayindex', tinyMCE = '$tinyMCE'");
|
|
| 236 |
- $authors = dbquery("SELECT author.penname, author.uid, count(stories.uid) as count FROM ".$tableprefix."fanfiction_authors as author, ".$tableprefix."fanfiction_stories as stories WHERE author.uid = stories.uid GROUP BY stories.uid");
|
|
| 237 |
- while($author = dbassoc($authors)) {
|
|
| 238 |
- if( file_exists( _BASEDIR.STORIESPATH."/$author[penname]/") ) {
|
|
| 239 |
- $moved = rename(_BASEDIR.STORIESPATH."/$author[penname]/", _BASEDIR.STORIESPATH."/$author[uid]/"); |
|
| 240 |
- $output .= $author['penname'].($moved ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")."<br />"; |
|
| 241 |
- } |
|
| 242 |
- } |
|
| 243 |
- $output .= write_message(_AUTHORRESULT.($result ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 244 |
- $fields = dbquery("SELECT * FROM ".$tableprefix."fanfiction_authorfields WHERE field_on = 1");
|
|
| 245 |
- while($f = dbassoc($fields)) {
|
|
| 246 |
- $col = dbquery("SHOW COLUMNS FROM ".$tableprefix."fanfiction_authors LIKE '".$f['field_name']."'");
|
|
| 247 |
- if(dbnumrows($col) > 0) {
|
|
| 248 |
- $result = dbquery("INSERT INTO ".$tableprefix."fanfiction_authorinfo(`uid`, `info`) SELECT uid, ".$f['field_name']." FROM ".$tableprefix."fanfiction_authors WHERE ".$f['field_name']." IS NOT NULL AND ".$f['field_name']." != ''");
|
|
| 249 |
- $result2 = dbquery("UPDATE ".$tableprefix."fanfiction_authorinfo SET field = ".$f['field_id']." WHERE field = 0");
|
|
| 250 |
- } |
|
| 251 |
- } |
|
| 252 |
- $result2 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_authors` DROP `validated`, DROP `userskin`, DROP `level`, DROP `contact`, DROP `categories`, DROP `carry`, CHANGE `admincreated` `admincreated` CHAR( 1 ) DEFAULT '0' NOT NULL;");
|
|
| 253 |
- $output .= write_message(_AUTHORDROPRESULT.($result2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 254 |
- $output .= write_message("<a href='upgrade11.php?step=17'>"._CONTINUE."</a>");
|
|
| 255 |
- |
|
| 256 |
- } |
|
| 257 |
- else $output .= write_message(_AUTHORUPDATEINFO."<br /><a href='upgrade11.php?step=16&install=automatic'>"._CONTINUE."</a>"); |
|
| 258 |
- break; |
|
| 259 |
- case "15": |
|
| 260 |
- $output .= "<div id='pagetitle'>"._AUTHORFIELDS."</div>"; |
|
| 261 |
- include("../config.php");
|
|
| 262 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 263 |
- list($tableprefix) = dbrow($settings); |
|
| 264 |
- if(isset($_GET['install'])) {
|
|
| 265 |
- if($_GET['install'] == "automatic") {
|
|
| 266 |
- $fields[] = array('4','lj','Live Journal','http://{info}.livejournal.com','','','0');
|
|
| 267 |
- $fields[] = array('1','website','Web Site','','','','1');
|
|
| 268 |
- $fields[] = array('5','AOL','AIM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"http://big.oscar.aol.com/".$field[\'info\']."?on_url=$url/images/aim.gif&off_url=$url/images/aim.gif\"> <a href=\"aim:goim?{aol}ScreenName=".$field[\'info\']."\">".format_email($field[\'info\'])."</a>";','1');
|
|
| 269 |
- $fields[] = array('5','ICQ','ICQ','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"http://status.icq.com/online.gif?icq=".$field[\'info\']."&img=5\"> ".$field[\'info\'];','1');
|
|
| 270 |
- $fields[] = array('5','MSN','MSN IM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".format_email($field[\'info\']);','1');
|
|
| 271 |
- $fields[] = array('5','Yahoo','Yahoo IM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$field[\'info\']."&.src=pg\"><img border=\'0\' src=\"http://opi.yahoo.com/online?u=".$field[\'info\']."&m=g&t=1\"> ".format_email($field[\'info\'])."</a>";','1');
|
|
| 272 |
- $fields[] = array('4','da','Deviant Art','http://{info}.deviantart.com','','','0');
|
|
| 273 |
- $fields[] = array('3','betareader','Beta-reader','','','','1');
|
|
| 274 |
- $fields[] = array('4','dj','DeadJournal','http://{info}.deadjournal.com/','','','0');
|
|
| 275 |
- $fields[] = array('4','xanga','Xanga','http://www.xanga.com/{info}','','','0');
|
|
| 276 |
- $fields[] = array('2', 'gender', 'Gender', 'male|#|female|#|undisclosed', '', '', '0');
|
|
| 277 |
- $fields[] = array('4','myspace','MySpace','http://www.myspace.com/{info}','','','0');
|
|
| 278 |
- |
|
| 279 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 280 |
- list($tableprefix) = dbrow($settings); |
|
| 281 |
- |
|
| 282 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._FIELD."</th><th>"._RESULT."</th></tr>"; |
|
| 283 |
- foreach($fields as $field) {
|
|
| 284 |
- $f = dbquery("INSERT INTO `".$tableprefix."fanfiction_authorfields` (`field_type`, `field_name`, `field_title`, `field_options`, `field_code_in`, `field_code_out`, `field_on`) VALUES('".$field[0]."', '".$field[1]."','".$field[2]."','".escapestring($field[3])."','".escapestring($field[4])."','".escapestring($field[5])."','".$field[6]."');");
|
|
| 285 |
- $output .= "<tr><td>".$field[2]."</td><td align='center'>" . ($f ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 286 |
- } |
|
| 287 |
- $output .= "</table>"; |
|
| 288 |
- $output .= write_message(_FIELDAUTOFAIL." "._FIELDUPDATE."<br /><br /> <a href='upgrade11.php?step=16'>"._CONTINUE."</a>"); |
|
| 289 |
- } |
|
| 290 |
- else {
|
|
| 291 |
- $output .= write_message(_FIELDMANUAL," "._FIELDUPDATE."<br /><br /><a href='upgrade11.php?step=16'>"._CONTINUE."</a>"); |
|
| 292 |
- } |
|
| 293 |
- } |
|
| 294 |
- else $output .= write_message(_FIELDDATAINFO."<br /><br /><a href='upgrade11.php?step=15&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?step=15&install=manual'>"._MANUAL2."</a>"); |
|
| 295 |
- break; |
|
| 296 |
- case "14": |
|
| 297 |
- $output .= "<div id='pagetitle'>"._UPDATECATORDER."</div>"; |
|
| 298 |
- if(isset($_GET['install'])) {
|
|
| 299 |
- if($_GET['install'] == "automatic") {
|
|
| 300 |
- include("../config.php");
|
|
| 301 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 302 |
- list($tableprefix) = dbrow($settings); |
|
| 303 |
- $selectA = "SELECT category, catid FROM ".$tableprefix."fanfiction_categories ORDER BY leveldown, displayorder"; |
|
| 304 |
- $resultA = dbquery($selectA); |
|
| 305 |
- $countA = 1; |
|
| 306 |
- while($cat = dbassoc($resultA)) {
|
|
| 307 |
- $count = 1; |
|
| 308 |
- if($cat[parentcatid] = -1) {
|
|
| 309 |
- dbquery("UPDATE ".$tableprefix."fanfiction_categories SET displayorder = $countA WHERE catid = $cat[catid]");
|
|
| 310 |
- $countA++; |
|
| 311 |
- } |
|
| 312 |
- $selectB = "SELECT category, catid FROM ".$tableprefix."fanfiction_categories WHERE parentcatid = '$cat[catid]' ORDER BY displayorder"; |
|
| 313 |
- $resultB = dbquery($selectB) or die(_FATALERROR."Query: ".$selectB."<br />Error: (".mysql_errno( ).") ".mysql_error( ));
|
|
| 314 |
- while($sub = dbassoc($resultB)) {
|
|
| 315 |
- dbquery("UPDATE ".$tableprefix."fanfiction_categories SET displayorder = $count WHERE catid = $sub[catid]");
|
|
| 316 |
- $count++; |
|
| 317 |
- } |
|
| 318 |
- } |
|
| 319 |
- $output .= write_message(_ACTIONSUCCESSFUL."<br /> <a href='upgrade11.php?step=15'>"._CONTINUE."</a>"); |
|
| 320 |
- } |
|
| 321 |
- } |
|
| 322 |
- else {
|
|
| 323 |
- include("../config.php");
|
|
| 324 |
- $output .= write_message(_UPDATECATORDERINFO." <BR /><BR /><a href='upgrade11.php?step=14&install=automatic'>"._CONTINUE."</a>"); |
|
| 325 |
- } |
|
| 326 |
- break; |
|
| 327 |
- case "13": |
|
| 328 |
- $output .= "<div id='pagetitle'>"._FAVUPDATE."</div>"; |
|
| 329 |
- if(isset($_GET['install'])) {
|
|
| 330 |
- include("../config.php");
|
|
| 331 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 332 |
- list($tableprefix) = dbrow($settings); |
|
| 333 |
- $favst = dbquery("INSERT INTO ".$tableprefix."fanfiction_favorites(uid, item, type) SELECT uid, sid, 'ST' FROM ".$tableprefix."fanfiction_favstor");
|
|
| 334 |
- $output .= write_message(_FAV1.($favst ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 335 |
- $favau = dbquery("INSERT INTO ".$tableprefix."fanfiction_favorites(uid, item, type) SELECT uid, favuid, 'AU' FROM ".$tableprefix."fanfiction_favauth");
|
|
| 336 |
- $output .= write_message(_FAV3.($favau ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 337 |
- $drop1 = dbquery("DROP TABLE `".$tableprefix."fanfiction_favstor`");
|
|
| 338 |
- $output .= write_message(_FAV4.($drop1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 339 |
- $drop3 = dbquery("DROP TABLE `".$tableprefix."fanfiction_favauth`");
|
|
| 340 |
- $output .= write_message(_FAV6.($drop3 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 341 |
- $output .= write_message("<a href='upgrade11.php?step=14'>"._CONTINUE."</a>");
|
|
| 342 |
- } |
|
| 343 |
- else $output .= write_message(_FAVUPDATEINFO11."<br /><a href='upgrade11.php?step=13&install=automatic'>"._CONTINUE."</a>"); |
|
| 344 |
- break; |
|
| 345 |
- case "12": |
|
| 346 |
- $output .= "<div id='pagetitle'>"._UPDATESTORIES11."</div>"; |
|
| 347 |
- if(isset($_GET['install'])) {
|
|
| 348 |
- if($_GET['install'] == "automatic") {
|
|
| 349 |
- include("../config.php");
|
|
| 350 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 351 |
- list($tableprefix) = dbrow($settings); |
|
| 352 |
- $characters = dbquery("SELECT charid, charname FROM ".$tableprefix."fanfiction_characters");
|
|
| 353 |
- while($char = dbassoc($characters)) {
|
|
| 354 |
- $character[stripslashes($char[charname])] = $char[charid]; |
|
| 355 |
- } |
|
| 356 |
- $ratlist = dbquery("SELECT * FROM ".$tableprefix."fanfiction_ratings");
|
|
| 357 |
- while($rate = dbassoc($ratlist)) {
|
|
| 358 |
- $ratingslist[$rate['rating']] = $rate['rid']; |
|
| 359 |
- } |
|
| 360 |
- $classresults = dbquery("SELECT * FROM ".$tableprefix."fanfiction_classes");
|
|
| 361 |
- while($class = dbassoc($classresults)) {
|
|
| 362 |
- $classlist[$class['class_name']] = array("id" => $class['class_id'], "type" => $class['class_type'], "name" => $class['class_name']);
|
|
| 363 |
- } |
|
| 364 |
- $offset = isset($_GET['offset']) ? $_GET['offset'] : 0; |
|
| 365 |
- $stories = dbquery("SELECT s.*, AVG( re.rating ) AS rating, count( re.rating ) AS reviews FROM ".$tableprefix."fanfiction_stories AS s LEFT JOIN ".$tableprefix."fanfiction_reviews AS re ON s.sid = re.chapid GROUP BY s.sid LIMIT $offset, 200");
|
|
| 366 |
- while($chapter = dbassoc($stories)) {
|
|
| 367 |
- dbquery("INSERT INTO ".$tableprefix."fanfiction_chapters(`chapid` , `title` , `inorder` , `storytext` , `validated` , `wordcount` , `rating` , `reviews` , `sid` , `uid` ) VALUES('$chapter[sid]', '".addslashes($chapter[chapter])."', '".($chapter[inorder] + 1)."', '".addslashes($chapter[storytext])."', '$chapter[validated]', '$chapter[wordcount]', '".(empty($chapter[rating]) ? "0" : $chapter[rating])."', '$chapter[reviews]', '$chapter[psid]', '$chapter[uid]')");
|
|
| 368 |
- if($chapter['sid'] == $chapter['psid']) {
|
|
| 369 |
- unset($genres, $warnings, $g, $w, $classes, $characters, $c, $clist, $rid); |
|
| 370 |
- $characters = explode(",", $chapter['charid']);
|
|
| 371 |
- foreach($characters as $c) {
|
|
| 372 |
- $clist[] = $character[$c]; |
|
| 373 |
- } |
|
| 374 |
- $genres = explode(",", $chapter['gid']);
|
|
| 375 |
- foreach($genres as $g) {
|
|
| 376 |
- if($g && $g != " " && $classlist[$g]['type'] == 1) $classes[] = $classlist[$g]['id']; |
|
| 377 |
- } |
|
| 378 |
- $warnings = explode(",", $chapter['wid']);
|
|
| 379 |
- foreach($warnings as $w) {
|
|
| 380 |
- if($w && $w != " " && $classlist[$w]['type'] == 2) $classes[] = $classlist[$w]['id']; |
|
| 381 |
- } |
|
| 382 |
- $rid = $ratingslist[$chapter['rid']]; |
|
| 383 |
- dbquery("UPDATE ".$tableprefix."fanfiction_stories SET rid = '$rid', classes = '".($classes ? implode(",", $classes) : "")."', charid = '".($clist ? implode(",", $clist) : "")."' WHERE sid = '$chapter[sid]'");
|
|
| 384 |
- } |
|
| 385 |
- } |
|
| 386 |
- if(dbnumrows($stories)) $output .= write_message(_STORIES." ".($offset + 1)."-".($offset + dbnumrows($stories)).".<br /><a href='upgrade11.php?step=12&install=automatic&offset=".($offset+200)."'>"._CONTINUE."</a>"); |
|
| 387 |
- else {
|
|
| 388 |
- dbquery("DELETE FROM ".$tableprefix."fanfiction_stories WHERE sid != psid");
|
|
| 389 |
- dbquery("ALTER TABLE `".$tableprefix."fanfiction_stories` CHANGE `featured` `featured` CHAR( 1 ) DEFAULT '0' NOT NULL ,
|
|
| 390 |
-CHANGE `validated` `validated` CHAR( 1 ) DEFAULT '0' NOT NULL , |
|
| 391 |
-CHANGE `rr` `rr` CHAR( 1 ) DEFAULT '0' NOT NULL, DROP `chapter`, |
|
| 392 |
-DROP `inorder`, |
|
| 393 |
-DROP `storytext`, |
|
| 394 |
-DROP `psid`, |
|
| 395 |
-DROP `gid`, |
|
| 396 |
-DROP `wid`, |
|
| 397 |
-CHANGE `catid` `catid` VARCHAR( 100 ) DEFAULT '0' NOT NULL, |
|
| 398 |
-ADD `rating` TINYINT( 4 ) NOT NULL"); |
|
| 399 |
- $stories = dbquery("SELECT AVG(rating) as average, item FROM ".TABLEPREFIX."fanfiction_reviews WHERE type = 'ST' AND rating != '-1' GROUP BY item");
|
|
| 400 |
- while($s = dbassoc($stories)) {
|
|
| 401 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stories SET rating = '".round($s['average'])."' WHERE sid = '".$s['item']."'");
|
|
| 402 |
- } |
|
| 403 |
- $stories = dbquery("SELECT COUNT(reviewid) as count, item FROM ".TABLEPREFIX."fanfiction_reviews WHERE type = 'ST' AND review != 'No Review' GROUP BY item");
|
|
| 404 |
- while($s = dbassoc($stories)) {
|
|
| 405 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stories SET reviews = '".$s['count']."' WHERE sid = '".$s['item']."'");
|
|
| 406 |
- } |
|
| 407 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_chapters SET rating = '0', reviews = '0'");
|
|
| 408 |
- $chapters = dbquery("SELECT AVG(rating) as average, chapid FROM ".TABLEPREFIX."fanfiction_reviews WHERE type = 'ST' AND rating != '-1' GROUP BY chapid");
|
|
| 409 |
- while($c = dbassoc($chapters)) {
|
|
| 410 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_chapters SET rating = '".round($c['average'])."' WHERE chapid = '".$c['chapid']."'");
|
|
| 411 |
- } |
|
| 412 |
- $chapters = dbquery("SELECT COUNT(reviewid) as count, chapid FROM ".TABLEPREFIX."fanfiction_reviews WHERE type = 'ST' AND review != 'No Review' GROUP BY chapid");
|
|
| 413 |
- while($c = dbassoc($chapters)) {
|
|
| 414 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_chapters SET reviews = '".$c['count']."' WHERE chapid = '".$c['chapid']."'");
|
|
| 415 |
- } $output .= write_message(_STORIESUPDATED."<br /><br /><a href='upgrade11.php?step=13&install=automatic'>"._CONTINUE."</a>"); |
|
| 416 |
- } |
|
| 417 |
- } |
|
| 418 |
- } |
|
| 419 |
- else {
|
|
| 420 |
- include("../config.php");
|
|
| 421 |
- $output .= write_message(_UPDATESTORIES11INFO."<br /><br /> <a href='upgrade11.php?step=12&install=automatic'>"._CONTINUE."</a>"); |
|
| 422 |
- } |
|
| 423 |
- break; |
|
| 424 |
- case "11": |
|
| 425 |
- $output .= "<div id='pagetitle'>"._REVIEWUPDATE."</div>"; |
|
| 426 |
- if(isset($_GET['install'])) {
|
|
| 427 |
- include("../config.php");
|
|
| 428 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 429 |
- list($tableprefix) = dbrow($settings); |
|
| 430 |
- $alter = dbquery("ALTER TABLE `".$tableprefix."fanfiction_reviews` CHANGE `psid` `item` INT( 11 ) NOT NULL DEFAULT '0'");
|
|
| 431 |
- $output .= write_message(_REVIEWALTER7.($alter ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 432 |
- $alter2 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_reviews` ADD `type` VARCHAR( 2 ) NOT NULL DEFAULT 'ST'");
|
|
| 433 |
- $output .= write_message(_REVIEWALTER2.($alter2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 434 |
- $alter3 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_reviews` CHANGE `member` `uid` INT( 11 ) NOT NULL DEFAULT '0'");
|
|
| 435 |
- $output .= write_message(_REVIEWALTER3.($alter3 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 436 |
- $alter4 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_reviews` ADD `respond` CHAR( 1 ) DEFAULT '0' NOT NULL");
|
|
| 437 |
- $output .= write_message(_REVIEWALTER5.($alter4 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 438 |
- $update1 = dbquery("UPDATE ".$tableprefix."fanfiction_reviews SET type = 'ST' WHERE item > 0");
|
|
| 439 |
- $alter5 = dbquery("ALTER TABLE `".$tableprefix."fanfiction_reviews` CHANGE `sid` `chapid` INT( 11 ) NOT NULL DEFAULT '0'");
|
|
| 440 |
- $output .= write_message(_REVIEWALTER6.($alter5 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 441 |
- |
|
| 442 |
- $output .= write_message(_REVIEWUPDATE1.($update1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 443 |
- $update3 = dbquery("UPDATE ".$tableprefix."fanfiction_reviews SET respond = 1 WHERE review LIKE \"%Author's Response:%\"");
|
|
| 444 |
- $output .= write_message(_REVIEWUPDATE3.($update3 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 445 |
- $output .= write_message("<a href='upgrade11.php?step=12'>"._CONTINUE."</a>");
|
|
| 446 |
- } |
|
| 447 |
- else $output .= write_message(_REVIEWUPDATEINFO."<br /><a href='upgrade11.php?step=11&install=automatic'>"._CONTINUE."</a>"); |
|
| 448 |
- |
|
| 449 |
- break; |
|
| 450 |
- case "10": |
|
| 451 |
- $output .= "<div id='pagetitle'>"._UPDATESTORIESTABLE11."</div>"; |
|
| 452 |
- if(isset($_GET['install'])) {
|
|
| 453 |
- if($_GET['install'] == "automatic") {
|
|
| 454 |
- include("../config.php");
|
|
| 455 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 456 |
- list($tableprefix) = dbrow($settings); |
|
| 457 |
- $result = dbquery("ALTER TABLE ".$tableprefix."fanfiction_stories ADD `classes` VARCHAR( 200 ) NULL AFTER `catid`;");
|
|
| 458 |
- if($result) $result = dbquery("ALTER TABLE ".$tableprefix."fanfiction_stories CHANGE `summary` `summary` TEXT NULL");
|
|
| 459 |
- if($result) $result = dbquery("ALTER TABLE ".$tableprefix."fanfiction_stories ADD `coauthors` tinyint(1) NULL AFTER `uid`");
|
|
| 460 |
- if($result) $result = dbquery("ALTER TABLE ".$tableprefix."fanfiction_stories CHANGE `numreviews` `reviews` SMALLINT( 6 ) DEFAULT '0' NOT NULL");
|
|
| 461 |
- if($result) $result = dbquery("ALTER TABLE ".$tableprefix."fanfiction_stories CHANGE `counter` `count` INT( 11 ) NOT NULL DEFAULT '0' AFTER `reviews`;");
|
|
| 462 |
- if($result) $result = dbquery("ALTER TABLE ".$tableprefix."fanfiction_stories ADD `storynotes` TEXT NULL AFTER `summary`;");
|
|
| 463 |
- if($result) $output .= write_message(_ACTIONSUCCESSFUL."<br /> <a href='upgrade11.php?step=11'>"._CONTINUE."</a>"); |
|
| 464 |
- } |
|
| 465 |
- else if($_GET['install'] == "manual") {
|
|
| 466 |
- $output .= write_message(_UPDATESTORIESTABLEMANUAL11."<br /> <a href='upgrade11.php?step=11'>"._CONTINUE."</a>"); |
|
| 467 |
- } |
|
| 468 |
- } |
|
| 469 |
- else {
|
|
| 470 |
- include("../config.php");
|
|
| 471 |
- $output .= write_message(_UPDATESTORIESTABLEINFO11." <a href='upgrade11.php?step=10&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?step=10&install=manual'>"._MANUAL2."</a>"); |
|
| 472 |
- } |
|
| 473 |
- break; case "9": |
|
| 474 |
- $output .= "<div id='pagetitle'>"._MOVECLASSES."</div>"; |
|
| 475 |
- if(isset($_GET['install'])) {
|
|
| 476 |
- include("../config.php");
|
|
| 477 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 478 |
- list($tableprefix) = dbrow($settings); |
|
| 479 |
- $newclass = dbquery("INSERT INTO ".$tableprefix."fanfiction_classtypes (`classtype_name`, `classtype_title`) VALUES('genres', 'Genres');");
|
|
| 480 |
- $genres = dbquery("SELECT * FROM ".$tableprefix."fanfiction_genres");
|
|
| 481 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Genres</th><th>Result</th></tr>"; |
|
| 482 |
- while($g = dbassoc($genres)) {
|
|
| 483 |
- $result = dbquery("INSERT INTO ".$tableprefix."fanfiction_classes (`class_type`, `class_name`) VALUES('1', '".$g['genre']."')");
|
|
| 484 |
- $output .= "<tr><td>".$g['genre']."</td><td align='center'>" . ($result ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 485 |
- } |
|
| 486 |
- $output .= "</table>"; |
|
| 487 |
- // Ditto with the warnings |
|
| 488 |
- $newclass = dbquery("INSERT INTO ".$tableprefix."fanfiction_classtypes (`classtype_name`, `classtype_title`) VALUES('warnings', 'Warnings');");
|
|
| 489 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Warnings</th><th>Result</th></tr>"; |
|
| 490 |
- $warnings = dbquery("SELECT * FROM ".$tableprefix."fanfiction_warnings");
|
|
| 491 |
- while($w = dbassoc($warnings)) {
|
|
| 492 |
- $result = dbquery("INSERT INTO ".$tableprefix."fanfiction_classes (`class_type`, `class_name`) VALUES('2', '$w[warning]')");
|
|
| 493 |
- $output .= "<tr><td>".$w['warning']."</td><td align='center'>" . ($result ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 494 |
- } |
|
| 495 |
- $output .= "</table>"; |
|
| 496 |
- $drop1 = dbquery("DROP TABLE `".$tableprefix."fanfiction_genres`");
|
|
| 497 |
- $output .= write_message(_DROPGENRES.($drop1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 498 |
- $drop2 = dbquery("DROP TABLE `".$tableprefix."fanfiction_warnings`");
|
|
| 499 |
- $output .= write_message(_DROPWARNINGS.($drop2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 500 |
- |
|
| 501 |
- $output .= write_message(_MOVECLASSFAIL."<br /><a href='upgrade11.php?step=10'>continue</a>"); |
|
| 502 |
- } |
|
| 503 |
- else $output .= write_message(_MOVECLASSESINFO."<br /><a href='upgrade11.php?step=9&install=automatic'>"._CONTINUE."</a>"); |
|
| 504 |
- break; |
|
| 505 |
- case "8": |
|
| 506 |
- $output .= "<div id='pagetitle'>"._MESSAGEDATA."</div>"; |
|
| 507 |
- if(isset($_GET['install'])) {
|
|
| 508 |
- if($_GET['install'] == "automatic") {
|
|
| 509 |
- include("../config.php");
|
|
| 510 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 511 |
- list($tableprefix) = dbrow($settings); |
|
| 512 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Message</th><th>Result</th></tr>"; |
|
| 513 |
- $settings = dbquery("SELECT * FROM ".$tableprefix."fanfiction_settings_old");
|
|
| 514 |
- if(!$settings) $settings = dbquery("SELECT * FROM ".$tableprefix."fanfiction_settings");
|
|
| 515 |
- $messages = dbassoc($settings); |
|
| 516 |
- foreach($messages as $name => $text) {
|
|
| 517 |
- |
|
| 518 |
- $msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages` (`message_name`, `message_title`, `message_text`) VALUES ('$name', '".$defaulttitles[$name]."', '".addslashes($text)."');");
|
|
| 519 |
- $output .= "<tr><td>".$defaulttitles[$name]."</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 520 |
- } |
|
| 521 |
- $msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages`(`message_name`, `message_title`, `message_text`) VALUES ('printercopyright', '', '<u>Disclaimer:</u> All publicly recognizable characters and settings are the property of their respective owners. The original characters and plot are the property of the author. No money is being made from this work. No copyright infringement is intended.');");
|
|
| 522 |
- $output .= "<tr><td>Printable Copyright</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 523 |
- $msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages`(`message_name`, `message_title`, `message_text`) VALUES ('rules', 'Submission Rules', '<p align=\"center\"><strong>Submission Rules</strong></p>\r\n<ol>\r\n <li>All submissions must be accompanied by a complete disclaimer. If a \r\n suitable disclaimer is not included, the site administrators reserve the right \r\n to add a disclaimer. Repeat offenders may be subject to further action \r\n up to and including removal of stories and account.\r\n<div class=\"tblborder\" style=\"width: 400px; margin: 1em auto;\">\r\n<div style=\"background: #000; color: #FFF; padding: 5px; text-align: center; font-weight: bold;\">Sample Disclaimer</div>\r\n<div class=\"tblborder\" style=\"padding: 5px;\"><span style=\"text-decoration: underline;\">Disclaimer:</span> All publicly recognizable characters, settings, etc. are the property of their respective owners. The original characters and plot are the property of the author. \r\n The author is in no way associated with the owners, creators, or producers of any media franchise. No copyright infringement is intended.</div>\r\n </div>\r\n </li>\r\n <li>Stories must be submitted to the proper category. If there is an appropriate sub-category, <strong>DO NOT</strong> add your story to the main category. The submission \r\n form allows you to choose multiple categories for your story, and we worked very hard to add that functionality for you. <u><strong>So please \r\n do NOT add your story multiple times!</strong></u></li>\r\n <li>Titles and summaries must be kid friendly. No exceptions. </li>\r\n <li>"Please read", "Untitled", etc. are not acceptable titles or summaries.</li>\r\n <li>A number of authors have requested that fans refrain from writing fan \r\n fiction based on their work. Therefore submissions will not be \r\n accepted based on the works of P.N. Elrod, Raymond Feist, Terry Goodkind, \r\n Laurell K. Hamilton, Anne McCaffrey, Robin McKinley, Irene Radford, Anne Rice, \r\n and Nora Roberts/J.D. Robb. </li>\r\n <li>Actor/actress stories are not permitted...not even if they\'re visiting an \r\n alternate reality.</li>\r\n <li>Correct grammar and spelling are expected of all stories submitted to this \r\n site. The site administrators are not grammar Nazis. However, the \r\n site administrators reserve the right to request corrections in submissions \r\n with a multitude of grammar and/or spelling errors. If such a request is \r\n ignored, the story will be deleted.</li>\r\n <li>All stories must be rated correctly and have the appropriate warnings. \r\n All adult rated stories are expected to have warnings. After all, they \r\n wouldn\'t have that rating if there wasn\'t something to be warned about! The site administrators recognize \r\n that there is an audience for these stories, but please respect those who do \r\n not wish to read them by labeling them appropriately. \r\n <u><strong>Please note: Stories containing adults having sex with minors are strictly forbidden.</strong></u> </li>\r\n <li>Stories with multiple chapters should be archived as such and <span style=\"font-weight: bold; text-decoration: underline;\">NEVER</span> as \r\n separate stories. Upload the first chapter of your story, then go to <a href=\"stories.php?action=viewstories\">Manage Stories</a> in \r\nyour account to add additional chapters. If you have trouble with this, please contact the site administrator or ask a \r\n friend to help you.</li>\r\n <li>As much as possible, spoiler warnings are expected on all stories. For categories with serialized content, such as series of books or television series, \r\n spoilers are <strong>mandatory</strong> for the current season and/or most recent part. An appropriate spoiler warning to place in your summary would be: Spoilers for <u>Star Trek II: The Wrath of Khan.</u> \r\n <strong>DO NOT</strong> do anything like this: <u>Spoilers for the one where Spock dies.</u></li>\r\n</ol>\r\n <p>Submissions found to be in violation of these rules may be removed and the \r\n author\'s account suspended at the discretion of the site administrators and/or \r\n moderators. The site administrators reserve the right to modify these \r\n rules as needed.</p>');");
|
|
| 524 |
- $output .= "<tr><td>Submission Rules</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 525 |
- $msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages`(`message_name`, `message_title`, `message_text`) VALUES ('tos', 'Terms of Service', 'This is the Terms of Service for your site. It will be displayed when a new member registers to the site.');");
|
|
| 526 |
- $output .= "<tr><td>Terms of Service</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 527 |
- $msg = dbquery("INSERT INTO `".$tableprefix."fanfiction_messages`(`message_name`, `message_title`, `message_text`) VALUES('maintenance', 'Site Maintenance', '<p style=\"text-align: center;\">This site is currently undergoing maintenance. Please check back soon. Thank you.</p>');");
|
|
| 528 |
- $output .= "<tr><td>Site Maintenance</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 529 |
- $output .= "</table>"; |
|
| 530 |
- $output .= write_message(_MESSAGEAUTOFAILUPGRADE."<br /><a href='upgrade11.php?step=9'>continue</a>"); |
|
| 531 |
- } |
|
| 532 |
- } |
|
| 533 |
- else $output .= write_message(_MESSAGEDATAUPGRADE."<br /><a href='upgrade11.php?step=8&install=automatic'>"._CONTINUE."</a>"); |
|
| 534 |
- |
|
| 535 |
- break; |
|
| 536 |
- case "7": |
|
| 537 |
- $output .= "<div id='pagetitle'>"._BLOCKDATA."</div>"; |
|
| 538 |
- if(isset($_GET['install'])) {
|
|
| 539 |
- if($_GET['install'] == "automatic") {
|
|
| 540 |
- include("../config.php");
|
|
| 541 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 542 |
- list($tableprefix) = dbrow($settings); |
|
| 543 |
- $blocklist = array( |
|
| 544 |
- array("categories","Categories","categories/categories.php","1",""),
|
|
| 545 |
- array("featured","Featured Stories","featured/featured.php","1",""),
|
|
| 546 |
- array("info","Site Info","info/info.php","2",""),
|
|
| 547 |
- array("login","Log In","login/login.php","1",""),
|
|
| 548 |
- array("menu","Main Menu","menu/menu.php","1",""),
|
|
| 549 |
- array("random","Random Story","random/random.php","2",""),
|
|
| 550 |
- array("recent","Most Recent","recent/recent.php","2","a:1:{s:3:\"num\";s:1:\"1\";}"),
|
|
| 551 |
- array("skinchange","Skin Change","skinchange/skinchange.php","1",""),
|
|
| 552 |
- array("news","Site News","news/news.php","1","a:1:{s:3:\"num\";s:1:\"1\";}")
|
|
| 553 |
- ); |
|
| 554 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._BLOCK."</th><th>"._RESULT."</th></tr>"; |
|
| 555 |
- foreach($blocklist as $block) {
|
|
| 556 |
- $b = dbquery("INSERT INTO `".$tableprefix."fanfiction_blocks` (`block_name`, `block_title`, `block_file`, `block_status`, `block_variables`) VALUES('".$block[0]."', '".$block[1]."', '".$block[2]."', '".$block[3]."', '".escapestring($block[4])."');");
|
|
| 557 |
- $output .= "<tr><td>".$block[1]."</td><td align='center'>" . ($b ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 558 |
- } |
|
| 559 |
- $output .= "</table>"; |
|
| 560 |
- $output .= write_message(_BLOCKDATAFAILUPGRADE."<br /><br /><a href='upgrade11.php?step=8'>"._CONTINUE."</a>"); |
|
| 561 |
- } |
|
| 562 |
- else {
|
|
| 563 |
- $output .= write_message(_BLOCKDATAMANUAL."<br /><br /><a href='upgrade11.php?step=7'>"._CONTINUE."</a>"); |
|
| 564 |
- } |
|
| 565 |
- } |
|
| 566 |
- else $output .= write_message(_BLOCKDATANEW."<br /><br /><a href='upgrade11.php?step=7&install=automatic'>"._AUTO."</a> "._OR." <a href='iupgrade11.php?step=7&install=manual'>"._MANUAL2."</a>"); |
|
| 567 |
- break; |
|
| 568 |
- case "6": |
|
| 569 |
- $output .= "<div id='pagetitle'>"._LINKDATA."</div>"; |
|
| 570 |
- if(isset($_GET['install'])) {
|
|
| 571 |
- if($_GET['install'] == "automatic") {
|
|
| 572 |
- include("../config.php");
|
|
| 573 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 574 |
- list($tableprefix) = dbrow($settings); |
|
| 575 |
- $pagelist = array( |
|
| 576 |
- array("home","Home","index.php","0","0"),
|
|
| 577 |
- array("recent","Most Recent","browse.php?type=recent","0","0"),
|
|
| 578 |
- array("login","Login","user.php?action=login","0","0"),
|
|
| 579 |
- array("adminarea","Admin","admin.php","0","2"),
|
|
| 580 |
- array("logout","Logout","user.php?action=logout","0","1"),
|
|
| 581 |
- array("featured","Featured Stories","browse.php?type=featured","0","0"),
|
|
| 582 |
- array("catslink","Categories","browse.php?type=categories","0","0"),
|
|
| 583 |
- array("members","Members","authors.php?action=list","0","0"),
|
|
| 584 |
- array("authors","Authors","authors.php?list=authors","0","0"),
|
|
| 585 |
- array("help","Help","viewpage.php?page=help","0","0"),
|
|
| 586 |
- array("search","Search","search.php","0","0"),
|
|
| 587 |
- array("series","Series","browse.php?type=series","0","0"),
|
|
| 588 |
- array("tens","Top Tens","toplists.php","0","0"),
|
|
| 589 |
- array("challenges","Challenges","modules/challenges/challenges.php","0","0"),
|
|
| 590 |
- array("contactus","Contact Us","contact.php","0","0"),
|
|
| 591 |
- array("rules","Rules","viewpage.php?page=rules","0","0"),
|
|
| 592 |
- array("tos","Terms of Service","viewpage.php?page=tos","0","0"),
|
|
| 593 |
- array("rss","<img src=\'images/xml.gif\' alt=\'RSS\' border=\'0\'>","rss.php","0","0"),
|
|
| 594 |
- array("login","Account Info","user.php","0","1"),
|
|
| 595 |
- array("titles","Titles","browse.php?type=titles","0","0"),
|
|
| 596 |
- array("register","Register","user.php?action=register","0","0"),
|
|
| 597 |
- array("lostpassword","Lost Password","user.php?action=lostpassword","0","0"),
|
|
| 598 |
- array("newsarchive","News Archive","news.php","0","0"),
|
|
| 599 |
- array("browse","Browse","browse.php","0","0"),
|
|
| 600 |
- array("charslink", "Characters", "browse.php?type=characters","0","0"),
|
|
| 601 |
- array("ratings", "Ratings", "browse.php?type=ratings", "0", "0"),
|
|
| 602 |
- array("genres_link", "Genres", "browse.php?type=class&type_id=1", "0", "0"),
|
|
| 603 |
- array("warnings_link", "Warnings", "browse.php?type=class&type_id=2", "0", "0")
|
|
| 604 |
- ); |
|
| 605 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Pages</th><th>Result</th></tr>"; |
|
| 606 |
- foreach($pagelist as $page) {
|
|
| 607 |
- $pages = dbquery("INSERT INTO `".$tableprefix."fanfiction_pagelinks` (`link_name`, `link_text`, `link_url`, `link_target`, `link_access`) VALUES ('".$page[0]."', '".$page[1]."', '".$page[2]."', '".$page[3]."', '".$page[4]."');");
|
|
| 608 |
- $output .= "<tr><td>".stripslashes($page[1])."</td><td align='center'>" . ($pages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 609 |
- } |
|
| 610 |
- |
|
| 611 |
- $output .= "</table>"; |
|
| 612 |
- $output .= write_message(_LINKAUTOFAIL."<br /><a href='upgrade11.php?step=7'>"._CONTINUE."</a>"); |
|
| 613 |
- } |
|
| 614 |
- else {
|
|
| 615 |
- $output .= write_message(_LINKMANUAL."<br /><a href='upgrade11.php?step=7'>"._CONTINUE."</a>"); |
|
| 616 |
- } |
|
| 617 |
- } |
|
| 618 |
- else $output .= write_message(_LINKDATAINFO." "._LINKSETUP." <a href='upgrade11.php?step=6&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?step=6&install=manual'>"._MANUAL2."</a>"); |
|
| 619 |
- break; |
|
| 620 |
- case "5": |
|
| 621 |
- $output .= "<div id='pagetitle'>"._PANELDATA."</div>"; |
|
| 622 |
- if(isset($_GET['install'])){
|
|
| 623 |
- if($_GET['install'] == "automatic") {
|
|
| 624 |
- include("../config.php");
|
|
| 625 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 626 |
- list($tableprefix) = dbrow($settings); |
|
| 627 |
- $panellist = array( |
|
| 628 |
- array("submitted","Submissions", "","3","5","0","A"),
|
|
| 629 |
- array("versioncheck", "Version Check", "", "3", "7", "0", "A"),
|
|
| 630 |
- array("newstory","Add New Story","stories.php?action=newstory&admin=1","3","3","0","A"),
|
|
| 631 |
- array("addseries","Add New Series","series.php?action=add","3","3","0","A"),
|
|
| 632 |
- array("news","News","","3","5","0","A"),
|
|
| 633 |
- array("featured","Featured Stories","","3","5","0","A"),
|
|
| 634 |
- array("characters","Characters","","2","2","0","A"),
|
|
| 635 |
- array("ratings","Ratings","","2","3","0","A"),
|
|
| 636 |
- array("members","Members","","2","5","0","A"),
|
|
| 637 |
- array("mailusers","Mail Users","","2","6","0","A"),
|
|
| 638 |
- array("settings","Settings","","1","2","0","A"),
|
|
| 639 |
- array("blocks","Blocks","","1","3","0","A"),
|
|
| 640 |
- array("censor","Censor","","1","0","1","A"),
|
|
| 641 |
- array("admins","Admins","","1","6","0","A"),
|
|
| 642 |
- array("classifications","Classifications","","2","4","0","A"),
|
|
| 643 |
- array("categories","Categories","","2","1","0","A"),
|
|
| 644 |
- array("custpages","Custom Pages","","1","4","0","A"),
|
|
| 645 |
- array("validate","Validate Submission","","3","0","1","A"),
|
|
| 646 |
- array("yesletter","Validation Letter","","3","0","1","A"),
|
|
| 647 |
- array("noletter","Rejection Letter","","3","0","1","A"),
|
|
| 648 |
- array("links","Page Links","","1","5","0","A"),
|
|
| 649 |
- array("messages","Message Settings","","2","0","1","A"),
|
|
| 650 |
- array("login","Login","","0","0","1","U"),
|
|
| 651 |
- array("logout","Logout","","1","5","0","U"),
|
|
| 652 |
- array("revreceived","Reviews Received","","1","0","1","U"),
|
|
| 653 |
- array("editprefs","Edit Preferences","","1","2","0","U"),
|
|
| 654 |
- array("lostpassword","Lost Password","","0","0","1","U"),
|
|
| 655 |
- array("editbio","Edit Bio","","1","1","0","U"),
|
|
| 656 |
- array("register","Register","","0","0","1","U"),
|
|
| 657 |
- array("manageimages","Manage Images","","1","5","0","S"),
|
|
| 658 |
- array("manfavs","Manage Favorites","","1","2","0","F"),
|
|
| 659 |
- array("revres","Review Response","","1","0","1","U"),
|
|
| 660 |
- array("stats","View Your Statistics","","1","3","0","U"),
|
|
| 661 |
- array("newstory","Add New Story","stories.php?action=newstory","1","1","0","S"),
|
|
| 662 |
- array("newseries","Add New Series","series.php?action=add","1","3","0","S"),
|
|
| 663 |
- array("managestories","Manage Stories","stories.php?action=viewstories","1","2","0","S"),
|
|
| 664 |
- array("manageseries","Manage Series","series.php?action=manage","1","4","0","S"),
|
|
| 665 |
- array("reviewsby","Your Reviews","","1","0","1","U"),
|
|
| 666 |
- array("storiesby","Stories by {author}","","0","1","0","P"),
|
|
| 667 |
- array("seriesby","Series by {author}","","0","2","0","P"),
|
|
| 668 |
- array("reviewsby","Reviews by {author}","","0","3","0","P"),
|
|
| 669 |
- array("categories","Categories","","0","1","0","B"),
|
|
| 670 |
- array("characters","Characters","","0","2","0","B"),
|
|
| 671 |
- array("ratings","Ratings","","0","3","0","B"),
|
|
| 672 |
- array("titles","Titles","","0","5","0","B"),
|
|
| 673 |
- array("class","Classes","","0","0","1","B"),
|
|
| 674 |
- array("recent","Most Recent","","0","0","1","B"),
|
|
| 675 |
- array("featured","Featured Stories","","0","0","1","B"),
|
|
| 676 |
- array("panels","Panels","","1","1","0","A"),
|
|
| 677 |
- array("phpinfo","PHP Info","","1","7","0","A"),
|
|
| 678 |
- array("contact","Contact","","0","0","1","P"),
|
|
| 679 |
- array("series", "Series", "", "0", "4", "0", "B"),
|
|
| 680 |
- array("viewlog", "Action Log", "", "1", "8", "0", "A"),
|
|
| 681 |
- array("shortstories","10 Shortest Stories","toplists/default.php","0","6","0","L"),
|
|
| 682 |
- array("longstories","10 Longest Stories","toplists/default.php","0","5","0","L"),
|
|
| 683 |
- array("largeseries","10 Largest Series","toplists/default.php","0","1","0","L"),
|
|
| 684 |
- array("smallseries","10 Smallest Series","toplists/default.php","0","2","0","L"),
|
|
| 685 |
- array("reviewedseries","10 Most Reviewed Series","toplists/default.php","0","4","0","L"),
|
|
| 686 |
- array("prolificauthors","10 Most Prolific Authors","toplists/default.php","0","10","0","L"),
|
|
| 687 |
- array("prolificreviewers","10 Most Prolific Reviewers","toplists/default.php","0","12","0","L"),
|
|
| 688 |
- array("reviewedstories","10 Most Reviewed Stories","toplists/default.php","0","8","0","L"),
|
|
| 689 |
- array("readstories","10 Most Read Stories","toplists/default.php","0","9","0","L"),
|
|
| 690 |
- array("favstories","10 Most Favorite Stories","toplists/default.php","0","7","0","L"),
|
|
| 691 |
- array("favauthors","10 Most Favorite Authors","toplists/default.php","0","11","0","L"),
|
|
| 692 |
- array("favseries","10 Most Favorite Series","toplists/default.php","0","3","0","L"),
|
|
| 693 |
- array("favst","Favorite Stories","","0","0","1","F"),
|
|
| 694 |
- array("favse","Favorite Series","","0","0","1","F"),
|
|
| 695 |
- array("favau","Favorite Authors","","0","0","1","F"),
|
|
| 696 |
- array("favst","Favorite Stories","","0","0","1","U"),
|
|
| 697 |
- array("favse","Favorite Series","","0","0","1","U"),
|
|
| 698 |
- array("favau","Favorite Authors","","0","0","1","U"),
|
|
| 699 |
- array("favlist","{author}\'s Favorites","viewuser.php?action=manfavs","0","5","0","F"),
|
|
| 700 |
- array("skins", "Skins", "", "3", "6", "0", "A"),
|
|
| 701 |
- array("authorfields", "Profile Information", "", "1", "9", "0", "A"),
|
|
| 702 |
- array("maintenance", "Archive Maintenance", "", "1", "10", "0", "A"),
|
|
| 703 |
- array("manual", "Admin Manual", "", "3", "6", "0", "A"),
|
|
| 704 |
- array('modules', 'Modules', '', 1, "11", 0, 'A')
|
|
| 705 |
- |
|
| 706 |
- ); |
|
| 707 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Panel</th><th>Result</th></tr>"; |
|
| 708 |
- foreach($panellist as $panel) {
|
|
| 709 |
- unset($panels); |
|
| 710 |
- $panels = dbquery("INSERT INTO `".$tableprefix."fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('".$panel[0]."', '".$panel[1]."', '".$panel[2]."', '".$panel[3]."', '".$panel[4]."', '".$panel[5]."', '".$panel[6]."');");
|
|
| 711 |
- $output .= "<tr><td>".stripslashes($panel[1])."</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 712 |
- } |
|
| 713 |
- $output .= "</table>"; |
|
| 714 |
- $output .= write_message(_PANELAUTOFAIL."<br /> <a href='upgrade11.php?step=6'>"._CONTINUE."</a>"); |
|
| 715 |
- } |
|
| 716 |
- else {
|
|
| 717 |
- $output .= write_message(_PANELMANUAL."<br /> <a href='upgrade11.php?step=6'>"._CONTINUE."</a>"); |
|
| 718 |
- } |
|
| 719 |
- } |
|
| 720 |
- else $output .= write_message(_PANELDATAINFO." "._PANELSETUP." <a href='upgrade11.php?step=5&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?step=5&install=manual'>"._MANUAL2."</a>"); |
|
| 721 |
- break; |
|
| 722 |
- case "4": |
|
| 723 |
- $output .= "<div id='pagetitle'>"._INSTALLTABLES."</div>"; |
|
| 724 |
- if(isset($_GET['install'])) {
|
|
| 725 |
- if($_GET['install'] == "automatic") {
|
|
| 726 |
- include("../config.php");
|
|
| 727 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 728 |
- list($tableprefix) = dbrow($settings); |
|
| 729 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Table</th><th>Result</th></tr>"; |
|
| 730 |
- $authorfields = dbquery("CREATE TABLE `".$tableprefix."fanfiction_authorfields` (
|
|
| 731 |
- `field_id` int(11) NOT NULL AUTO_INCREMENT, |
|
| 732 |
- `field_type` tinyint(4) NOT NULL default '0', |
|
| 733 |
- `field_name` varchar(30) NOT NULL default ' ', |
|
| 734 |
- `field_title` varchar(255) NOT NULL default ' ', |
|
| 735 |
- `field_options` text, |
|
| 736 |
- `field_code_in` text, |
|
| 737 |
- `field_code_out` text, |
|
| 738 |
- `field_on` tinyint(1) NOT NULL default '0', |
|
| 739 |
- PRIMARY KEY (`field_id`) |
|
| 740 |
-) ENGINE=MyISAM;"); |
|
| 741 |
-$output .= "<tr><td>".$tableprefix."fanfiction_authorfields</td><td align='center'>" . ($authorfields ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 742 |
- $authorinfo = dbquery("CREATE TABLE `".$tableprefix."fanfiction_authorinfo` (
|
|
| 743 |
- `uid` int(11) NOT NULL default '0', |
|
| 744 |
- `field` int(11) NOT NULL default '0', |
|
| 745 |
- `info` varchar(255) NOT NULL default ' ', |
|
| 746 |
- KEY `uid` (`uid`) |
|
| 747 |
-) ENGINE=MyISAM;"); |
|
| 748 |
-$output .= "<tr><td>".$tableprefix."fanfiction_authorinfo</td><td align='center'>" . ($authorinfo ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 749 |
- $authorprefs = dbquery("
|
|
| 750 |
-CREATE TABLE `".$tableprefix."fanfiction_authorprefs` ( |
|
| 751 |
- `uid` int(11) NOT NULL default '0', |
|
| 752 |
- `newreviews` tinyint(1) NOT NULL default '0', |
|
| 753 |
- `newrespond` tinyint(1) NOT NULL default '0', |
|
| 754 |
- `ageconsent` tinyint(1) NOT NULL default '0', |
|
| 755 |
- `alertson` tinyint(1) NOT NULL default '0', |
|
| 756 |
- `tinyMCE` tinyint(1) NOT NULL default '0', |
|
| 757 |
- `sortby` tinyint(1) NOT NULL default '0', |
|
| 758 |
- `storyindex` tinyint(1) NOT NULL default '0', |
|
| 759 |
- `validated` tinyint(1) NOT NULL default '0', |
|
| 760 |
- `userskin` varchar(60) NOT NULL default 'default', |
|
| 761 |
- `level` tinyint(1) NOT NULL default '0', |
|
| 762 |
- `categories` varchar(200) NOT NULL default '0', |
|
| 763 |
- `contact` tinyint(1) NOT NULL default '0', |
|
| 764 |
- `stories` int(11) NOT NULL default '0', |
|
| 765 |
- PRIMARY KEY (`uid`) |
|
| 766 |
-) ENGINE=MyISAM;"); |
|
| 767 |
-$output .= "<tr><td>".$tableprefix."fanfiction_authorprefs</td><td align='center'>" . ($authorprefs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 768 |
- $blocks = dbquery("CREATE TABLE `".$tableprefix."fanfiction_blocks` (
|
|
| 769 |
- `block_id` int(11) NOT NULL auto_increment, |
|
| 770 |
- `block_name` varchar(30) NOT NULL default '', |
|
| 771 |
- `block_title` varchar(150) NOT NULL default '', |
|
| 772 |
- `block_file` varchar(200) NOT NULL default '', |
|
| 773 |
- `block_status` tinyint(1) NOT NULL default '0', |
|
| 774 |
- `block_variables` text NOT NULL, |
|
| 775 |
- PRIMARY KEY (`block_id`), |
|
| 776 |
- KEY `block_name` (`block_name`) |
|
| 777 |
-) ENGINE=MyISAM;"); |
|
| 778 |
-$output .= "<tr><td>".$tableprefix."fanfiction_blocks</td><td align='center'>" . ($blocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 779 |
- $chapters = dbquery("CREATE TABLE `".$tableprefix."fanfiction_chapters` (
|
|
| 780 |
- `chapid` int(11) NOT NULL auto_increment, |
|
| 781 |
- `title` varchar(250) NOT NULL default '', |
|
| 782 |
- `inorder` int(11) NOT NULL default '0', |
|
| 783 |
- `notes` text NULL, |
|
| 784 |
- `storytext` text NULL, |
|
| 785 |
- `endnotes` text NULL, |
|
| 786 |
- `validated` char(1) NOT NULL default '0', |
|
| 787 |
- `wordcount` int(11) NOT NULL default '0', |
|
| 788 |
- `rating` tinyint(4) NOT NULL default '0', |
|
| 789 |
- `reviews` smallint(6) NOT NULL default '0', |
|
| 790 |
- `sid` int(11) NOT NULL default '0', |
|
| 791 |
- `uid` int(11) NOT NULL default '0', |
|
| 792 |
- `count` int(11) NOT NULL default '0', |
|
| 793 |
- PRIMARY KEY (`chapid`), |
|
| 794 |
- KEY `sid` (`sid`), |
|
| 795 |
- KEY `uid` (`uid`), |
|
| 796 |
- KEY `inorder` (`inorder`), |
|
| 797 |
- KEY `title` (`title`), |
|
| 798 |
- KEY `validated` (`validated`) |
|
| 799 |
-) ENGINE=MyISAM;"); |
|
| 800 |
-$output .= "<tr><td>".$tableprefix."fanfiction_chapters</td><td align='center'>" . ($chapters ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 801 |
- $classes = dbquery("CREATE TABLE `".$tableprefix."fanfiction_classes` (
|
|
| 802 |
- `class_id` int(11) NOT NULL auto_increment, |
|
| 803 |
- `class_type` int(11) NOT NULL default '0', |
|
| 804 |
- `class_name` varchar(100) NOT NULL default '', |
|
| 805 |
- PRIMARY KEY (`class_id`) |
|
| 806 |
-) ENGINE=MyISAM;"); |
|
| 807 |
- |
|
| 808 |
-$output .= "<tr><td>".$tableprefix."fanfiction_classes</td><td align='center'>" . ($classes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 809 |
- $classtypes = dbquery("CREATE TABLE `".$tableprefix."fanfiction_classtypes` (
|
|
| 810 |
- `classtype_id` int(11) NOT NULL auto_increment, |
|
| 811 |
- `classtype_name` varchar(50) NOT NULL default '', |
|
| 812 |
- `classtype_title` varchar(50) NOT NULL default '', |
|
| 813 |
- PRIMARY KEY (`classtype_id`), |
|
| 814 |
- KEY `classtype_title` (`classtype_title`) |
|
| 815 |
-) ENGINE=MyISAM;"); |
|
| 816 |
-$output .= "<tr><td>".$tableprefix."fanfiction_classtypes</td><td align='center'>" . ($classtypes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 817 |
-$coauthors = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_coauthors` (
|
|
| 818 |
- `sid` int(11) NOT NULL default '0', |
|
| 819 |
- `uid` int(11) NOT NULL default '0', |
|
| 820 |
- PRIMARY KEY (`sid`,`uid`) |
|
| 821 |
-) ENGINE=MyISAM;"); |
|
| 822 |
-$output .= "<tr><td>".$tableprefix."fanfiction_coauthors</td><td align='center'>" . ($coauthors ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 823 |
- $codeblocks = dbquery("CREATE TABLE `".$tableprefix."fanfiction_codeblocks` (
|
|
| 824 |
- `code_id` int(11) NOT NULL auto_increment, |
|
| 825 |
- `code_text` text NOT NULL, |
|
| 826 |
- `code_type` varchar(20) default NULL, |
|
| 827 |
- `code_module` varchar(60) default NULL, |
|
| 828 |
- PRIMARY KEY (`code_id`) |
|
| 829 |
-) ENGINE=MyISAM;"); |
|
| 830 |
-$output .= "<tr><td>".$tableprefix."fanfiction_codeblocks</td><td align='center'>" . ($codeblocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 831 |
- $favorites = dbquery("CREATE TABLE `".$tableprefix."fanfiction_favorites` (
|
|
| 832 |
- `uid` int(11) NOT NULL default '0', |
|
| 833 |
- `item` int(11) NOT NULL default '0', |
|
| 834 |
- `type` char(2) NOT NULL default '', |
|
| 835 |
- `comments` text NULL, |
|
| 836 |
- KEY `uid` (`uid`) |
|
| 837 |
-) ENGINE=MyISAM;"); |
|
| 838 |
-$output .= "<tr><td>".$tableprefix."fanfiction_favorites</td><td align='center'>" . ($favorites ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 839 |
- $inseries = dbquery("CREATE TABLE `".$tableprefix."fanfiction_inseries` (
|
|
| 840 |
- `seriesid` int(11) NOT NULL default '0', |
|
| 841 |
- `sid` int(11) NOT NULL default '0', |
|
| 842 |
- `subseriesid` int(11) NOT NULL default '0', |
|
| 843 |
- `confirmed` int(11) NOT NULL default '0', |
|
| 844 |
- `inorder` int(11) NOT NULL default '0', |
|
| 845 |
- PRIMARY KEY (`sid`,`seriesid`, `subseriesid`), |
|
| 846 |
- KEY `seriesid` (`seriesid`,`inorder`) |
|
| 847 |
-) ENGINE=MyISAM;"); |
|
| 848 |
-$output .= "<tr><td>".$tableprefix."fanfiction_inseries</td><td align='center'>" . ($inseries ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 849 |
- $logs = dbquery("CREATE TABLE `".$tableprefix."fanfiction_log` (
|
|
| 850 |
- `log_id` int(11) NOT NULL auto_increment, |
|
| 851 |
- `log_action` varchar(255) default NULL, |
|
| 852 |
- `log_uid` int(11) NOT NULL, |
|
| 853 |
- `log_ip` int(11) UNSIGNED default NULL, |
|
| 854 |
- `log_timestamp` timestamp NOT NULL, |
|
| 855 |
- `log_type` varchar(2) NOT NULL, |
|
| 856 |
- PRIMARY KEY (`log_id`) |
|
| 857 |
-) ENGINE=MyISAM"); |
|
| 858 |
-$output .= "<tr><td>".$tableprefix."fanfiction_log</td><td align='center'>" . ($logs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 859 |
- $messages = dbquery("CREATE TABLE `".$tableprefix."fanfiction_messages` (
|
|
| 860 |
- `message_id` int(11) NOT NULL auto_increment, |
|
| 861 |
- `message_name` varchar(50) NOT NULL default '', |
|
| 862 |
- `message_title` varchar(200) NOT NULL default '', |
|
| 863 |
- `message_text` text NULL, |
|
| 864 |
- PRIMARY KEY (`message_id`) |
|
| 865 |
-) ENGINE=MyISAM;"); |
|
| 866 |
-$output .= "<tr><td>".$tableprefix."fanfiction_messages</td><td align='center'>" . ($messages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 867 |
- $modules = dbquery("
|
|
| 868 |
-CREATE TABLE `".$tableprefix."fanfiction_modules` ( |
|
| 869 |
- `id` int(11) NOT NULL auto_increment, |
|
| 870 |
- `name` varchar(100) NOT NULL default 'Test Module', |
|
| 871 |
- `version` varchar(10) NOT NULL default '1.0', |
|
| 872 |
- PRIMARY KEY (`id`), |
|
| 873 |
- KEY `name_version` (`name`,`version`) |
|
| 874 |
-)"); |
|
| 875 |
-$output .= "<tr><td>".$tableprefix."fanfiction_modules</td><td align='center'>" . ($modules ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 876 |
- $pagelinks = dbquery("CREATE TABLE `".$tableprefix."fanfiction_pagelinks` (
|
|
| 877 |
- `link_id` int(11) NOT NULL auto_increment, |
|
| 878 |
- `link_name` varchar(50) NOT NULL default '', |
|
| 879 |
- `link_text` varchar(100) NOT NULL default '', |
|
| 880 |
- `link_key` CHAR( 1 ) NULL, |
|
| 881 |
- `link_url` varchar(250) NOT NULL default '', |
|
| 882 |
- `link_target` char(1) NOT NULL default '0', |
|
| 883 |
- `link_access` tinyint(4) NOT NULL default '0', |
|
| 884 |
- PRIMARY KEY (`link_id`), |
|
| 885 |
- KEY `link_text` (`link_text`), |
|
| 886 |
- KEY `link_name` (`link_name`) |
|
| 887 |
-) ENGINE=MyISAM;"); |
|
| 888 |
-$output .= "<tr><td>".$tableprefix."fanfiction_pagelinks</td><td align='center'>" . ($pagelinks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 889 |
- $panels = dbquery("CREATE TABLE `".$tableprefix."fanfiction_panels` (
|
|
| 890 |
- `panel_id` int(11) NOT NULL auto_increment, |
|
| 891 |
- `panel_name` varchar(50) NOT NULL default 'unknown', |
|
| 892 |
- `panel_title` varchar(100) NOT NULL default 'Unnamed Panel', |
|
| 893 |
- `panel_url` varchar(100) default NULL, |
|
| 894 |
- `panel_level` tinyint(4) NOT NULL default '3', |
|
| 895 |
- `panel_order` tinyint(4) NOT NULL default '0', |
|
| 896 |
- `panel_hidden` tinyint(1) NOT NULL default '0', |
|
| 897 |
- `panel_type` varchar(20) NOT NULL default 'A', |
|
| 898 |
- PRIMARY KEY (`panel_id`), |
|
| 899 |
- KEY `panel_hidden` (`panel_hidden`), |
|
| 900 |
- KEY `panel_type` (`panel_type`) |
|
| 901 |
-) ENGINE=MyISAM;"); |
|
| 902 |
-$output .= "<tr><td>".$tableprefix."fanfiction_panels</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 903 |
- $series = dbquery("CREATE TABLE `".$tableprefix."fanfiction_series` (
|
|
| 904 |
- `seriesid` int(11) NOT NULL auto_increment, |
|
| 905 |
- `title` varchar(200) NOT NULL default '', |
|
| 906 |
- `summary` text NOT NULL, |
|
| 907 |
- `uid` int(11) NOT NULL default '0', |
|
| 908 |
- `isopen` tinyint(4) NOT NULL default '0', |
|
| 909 |
- `catid` varchar(200) NOT NULL default '0', |
|
| 910 |
- `rating` tinyint(4) NOT NULL default '0', |
|
| 911 |
- `classes` varchar(200) NOT NULL default '', |
|
| 912 |
- `characters` varchar(250) NOT NULL default '', |
|
| 913 |
- `reviews` smallint(6) NOT NULL default '0', |
|
| 914 |
- `numstories` INT NOT NULL DEFAULT '0', |
|
| 915 |
- PRIMARY KEY (`seriesid`), |
|
| 916 |
- KEY `catid` (`catid`), |
|
| 917 |
- KEY `characters` (`characters`), |
|
| 918 |
- KEY `classes` (`classes`), |
|
| 919 |
- KEY `owner` (`uid`,`title`) |
|
| 920 |
-) ENGINE=MyISAM;"); |
|
| 921 |
-$output .= "<tr><td>".$tableprefix."fanfiction_series</td><td align='center'>" . ($series ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 922 |
- $stats = dbquery("CREATE TABLE `".$tableprefix."fanfiction_stats` (
|
|
| 923 |
- `sitekey` varchar(50) NOT NULL default '0', |
|
| 924 |
- `stories` int(11) NOT NULL default '0', |
|
| 925 |
- `chapters` int(11) NOT NULL default '0', |
|
| 926 |
- `series` int(11) NOT NULL default '0', |
|
| 927 |
- `reviews` int(11) NOT NULL default '0', |
|
| 928 |
- `wordcount` int(11) NOT NULL default '0', |
|
| 929 |
- `authors` int(11) NOT NULL default '0', |
|
| 930 |
- `members` int(11) NOT NULL default '0', |
|
| 931 |
- `reviewers` int(11) NOT NULL default '0', |
|
| 932 |
- `newestmember` int(11) NOT NULL default '0' |
|
| 933 |
-) ENGINE=MyISAM"); |
|
| 934 |
- dbquery("INSERT INTO ".$tableprefix."fanfiction_stats(`sitekey`) VALUES('".$sitekey."')");
|
|
| 935 |
-$output .= "<tr><td>".$tableprefix."fanfiction_stats</td><td align='center'>" . ($stats ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 936 |
-$output .= "</table>"; |
|
| 937 |
-$output .= write_message(_NEWTABLEAUTOFAIL11."<br /> <a href='upgrade11.php?step=5'>"._CONTINUE."</a>"); |
|
| 938 |
- } |
|
| 939 |
- else if($_GET['install'] == "manual") {
|
|
| 940 |
- $output .= write_message(_NEWTABLESSETUP."<br /> <a href='upgrade11.php?step=5'>"._CONTINUE."</a>"); |
|
| 941 |
- } |
|
| 942 |
- } |
|
| 943 |
- else {
|
|
| 944 |
- include("../config.php");
|
|
| 945 |
- $output .= write_message(_NEWTABLESSETUP." <a href='upgrade11.php?step=4&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?step=4&install=manual'>"._MANUAL2."</a>"); |
|
| 946 |
- } |
|
| 947 |
- break; |
|
| 948 |
- case "3": |
|
| 949 |
- define ("_BASEDIR", "../");
|
|
| 950 |
- include("../config.php");
|
|
| 951 |
- define("SITEKEY", $sitekey);
|
|
| 952 |
- if(!$_GET['sect']) $sect = "main"; |
|
| 953 |
- else $sect = $_GET['sect']; |
|
| 954 |
- $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 955 |
- if(dbnumrows($settingsresults) == 0) {
|
|
| 956 |
- dbquery("INSERT INTO ".$settingsprefix."fanfiction_settings (`sitekey`) VALUES('".$sitekey."');");
|
|
| 957 |
- $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 958 |
- } |
|
| 959 |
- $settings = dbassoc($settingsresults); |
|
| 960 |
- foreach($settings as $var => $val) {
|
|
| 961 |
- $$var = stripslashes($val); |
|
| 962 |
- } |
|
| 963 |
- define("TABLEPREFIX", $tableprefix);
|
|
| 964 |
- if((empty($sect) || $sect == "main") && !isset($_POST['submit'])) $output .= write_message(_SKINWARNING); |
|
| 965 |
- if($sect == "submissions") {
|
|
| 966 |
- if($_POST['submit']) {
|
|
| 967 |
- $storiespath = descript($_POST['newstoriespath']); |
|
| 968 |
- if(!file_exists($storiespath) && !file_exists("../".$storiespath)) {
|
|
| 969 |
- if(!strrchr($storiespath, "/") && !strrchr($storiespath, "\\")) $storiespath = "../$storiespath"; |
|
| 970 |
- mkdir("$storiespath", 0755);
|
|
| 971 |
- chmod("$storiespath", 0777);
|
|
| 972 |
- } |
|
| 973 |
- } |
|
| 974 |
- } |
|
| 975 |
- if($sect == "email" && $_POST['submit']) {
|
|
| 976 |
- $output .= "<div id=\"pagetitle\">"._SETTINGS."</div>"; |
|
| 977 |
- $smtp_host = $_POST['newsmtp_host']; |
|
| 978 |
- $smtp_username = $_POST['newsmtp_username']; |
|
| 979 |
- $smtp_password = $_POST['newsmtp_password']; |
|
| 980 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey = '".$sitekey."'");
|
|
| 981 |
- if($result) {
|
|
| 982 |
- $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 983 |
- $output .= write_message("<a href='upgrade11.php?step=4'>"._CONTINUE."</a>");
|
|
| 984 |
- } |
|
| 985 |
- else include("../admin/settings.php");
|
|
| 986 |
- } |
|
| 987 |
- else include("../admin/settings.php");
|
|
| 988 |
- break; |
|
| 989 |
- case "2": |
|
| 990 |
- $output .= "<div id='pagetitle'>"._CONFIGDATA."</div>"; |
|
| 991 |
- define ("_BASEDIR", "../");
|
|
| 992 |
- include("../config.php");
|
|
| 993 |
- if(isset($_POST['sitekey'])) {
|
|
| 994 |
- // relative path |
|
| 995 |
- if(file_exists("../".$databasepath."/dbconfig.php")) include("../".$databasepath."/dbconfig.php");
|
|
| 996 |
- // absolute path |
|
| 997 |
- else if(file_exists($databasepath."/dbconfig.php")) include($databasepath."/dbconfig.php"); |
|
| 998 |
- include_once("../includes/dbfunctions.php");
|
|
| 999 |
- $dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname ); |
|
| 1000 |
- $sitekey = !empty($_POST['sitekey']) ? descript($_POST['sitekey']) : random_string($randomcharset, 10); |
|
| 1001 |
- $settingsprefix = descript($_POST['settingsprefix']); |
|
| 1002 |
- $sitesettings = dbquery("INSERT INTO ".$settingsprefix."fanfiction_settings(
|
|
| 1003 |
- `sitename`, `slogan`, `url`, `siteemail`, `store`, `autovalidate`, `multiplecats`, `reviewsallowed`, `ratings`, `roundrobins`, |
|
| 1004 |
- `submissionsoff`, `anonreviews`, `itemsperpage`, `imageupload`, `imageheight`, `imagewidth`, `skin`) |
|
| 1005 |
- VALUES('$sitename', '$slogan', '$url', '$siteemail', '$store', '$autovalidate', '$numcats', '$reviewsallowed', '$ratings', '$roundrobins',
|
|
| 1006 |
- '$submissionsoff', '$anonreviews', '$itemsperpage', '$imageupload', '$imageheight', '$imagewidth', '$skin')"); |
|
| 1007 |
- if($sitesettings) $output .= write_message("<img src=\"../images/check.gif\">"._SITESETTINGSMOVED);
|
|
| 1008 |
- $handle = fopen("../config.php", 'w');
|
|
| 1009 |
- if(!$handle) {
|
|
| 1010 |
- chmod("../config.php", 0666);
|
|
| 1011 |
- $handle = fopen("../config.php", 'w');
|
|
| 1012 |
- } |
|
| 1013 |
- if ($handle) {
|
|
| 1014 |
- $text = "<?php |
|
| 1015 |
-\$dbhost = \"$dbhost\"; |
|
| 1016 |
-\$dbname = \"$dbname\"; |
|
| 1017 |
-\$dbuser= \"$dbuser\"; |
|
| 1018 |
-\$dbpass = \"$dbpass\"; |
|
| 1019 |
-\$sitekey = \"$sitekey\"; |
|
| 1020 |
-\$settingsprefix = \"$settingsprefix\"; |
|
| 1021 |
- |
|
| 1022 |
-include_once(\"includes/dbfunctions.php\"); |
|
| 1023 |
-if(!empty(\$sitekey)) \$dbconnect = dbconnect(\$dbhost, \$dbuser,\$dbpass, \$dbname); |
|
| 1024 |
- |
|
| 1025 |
-?>"; |
|
| 1026 |
- fwrite($handle, $text); |
|
| 1027 |
- fclose($handle); |
|
| 1028 |
- @chmod("../config.php", 0644);
|
|
| 1029 |
- $output .= write_message("<img src=\"../images/check.gif\">"._CONFIG_WRITTEN."<br /><a href='upgrade11.php?step=3'>"._CONTINUE."</a>");
|
|
| 1030 |
- } |
|
| 1031 |
- else $output .= write_message(_ERROR_CONFIGWRITE); |
|
| 1032 |
- } |
|
| 1033 |
- else {
|
|
| 1034 |
- $output .= |
|
| 1035 |
- "<form method='POST' enctype='multipart/form-data' action='upgrade11.php?step=2' class='tblborder' style='width: 325px; margin: 1em auto;'> |
|
| 1036 |
- <label for='sitekey'>"._SITEKEY."</label><input type='text' name='sitekey' value='".random_string($randomcharset, 10)."' id='sitekey'><br /> |
|
| 1037 |
- <input type='hidden' name='settingsprefix' value='".$_GET['settingsprefix']."'> |
|
| 1038 |
- <div style='text-align: center; margin: 1em;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div> |
|
| 1039 |
- </form>"; |
|
| 1040 |
- $output .= write_message(_HELP_SITEKEY." "._SITEKEYNOTE); |
|
| 1041 |
- } |
|
| 1042 |
- break; |
|
| 1043 |
- default: |
|
| 1044 |
- $output .= "<div id='pagetitle'>Create Settings Table</div>"; |
|
| 1045 |
- include("../config.php");
|
|
| 1046 |
- if(isset($_POST['submit'])) {
|
|
| 1047 |
- // relative path |
|
| 1048 |
- if(file_exists("../".$databasepath."/dbconfig.php")) include("../".$databasepath."/dbconfig.php");
|
|
| 1049 |
- // absolute path |
|
| 1050 |
- else if(file_exists($databasepath."/dbconfig.php")) include($databasepath."/dbconfig.php"); |
|
| 1051 |
- include("../includes/dbfunctions.php");
|
|
| 1052 |
- $dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname ); |
|
| 1053 |
- $settings = dbquery("SHOW TABLES LIKE '".$tableprefix."fanfiction_settings'");
|
|
| 1054 |
- if($settings) dbquery("RENAME TABLE ".$tableprefix."fanfiction_settings TO ".$tableprefix."fanfiction_settings_old");
|
|
| 1055 |
- $settings = dbquery("CREATE TABLE IF NOT EXISTS`".$_POST['settingsprefix']."fanfiction_settings` (
|
|
| 1056 |
- `sitekey` varchar(50) NOT NULL default '1', |
|
| 1057 |
- `sitename` varchar(200) NOT NULL default 'Your Site', |
|
| 1058 |
- `slogan` varchar(200) NOT NULL default 'It''s a cool site!', |
|
| 1059 |
- `url` varchar(200) NOT NULL default 'http://www.yoursite.com', |
|
| 1060 |
- `siteemail` varchar(200) NOT NULL default 'you@yoursite.com', |
|
| 1061 |
- `tableprefix` varchar(50) NOT NULL default '', |
|
| 1062 |
- `skin` varchar(50) NOT NULL default 'default', |
|
| 1063 |
- `hiddenskins` varchar(255) default '', |
|
| 1064 |
- `language` varchar(10) NOT NULL default 'en', |
|
| 1065 |
- `submissionsoff` tinyint(1) NOT NULL default '0', |
|
| 1066 |
- `storiespath` varchar(20) NOT NULL default 'stories', |
|
| 1067 |
- `store` varchar(5) NOT NULL default 'files', |
|
| 1068 |
- `autovalidate` tinyint(1) NOT NULL default '0', |
|
| 1069 |
- `coauthallowed` int(1) NOT NULL default '0', |
|
| 1070 |
- `maxwords` int(11) NOT NULL default '0', |
|
| 1071 |
- `minwords` int(11) NOT NULL default '0', |
|
| 1072 |
- `imageupload` tinyint(1) NOT NULL default '0', |
|
| 1073 |
- `imageheight` int(11) NOT NULL default '200', |
|
| 1074 |
- `imagewidth` int(11) NOT NULL default '200', |
|
| 1075 |
- `roundrobins` tinyint(1) NOT NULL default '0', |
|
| 1076 |
- `allowseries` tinyint(4) NOT NULL default '2', |
|
| 1077 |
- `tinyMCE` tinyint(1) NOT NULL default '0', |
|
| 1078 |
- `allowed_tags` varchar(200) NOT NULL default '<b><i><u><center><hr><p><br /><br><blockquote><ol><ul><li><img><strong><em>', |
|
| 1079 |
- `favorites` tinyint(1) NOT NULL default '0', |
|
| 1080 |
- `multiplecats` tinyint(1) NOT NULL default '0', |
|
| 1081 |
- `newscomments` tinyint(1) NOT NULL default '0', |
|
| 1082 |
- `logging` tinyint(1) NOT NULL default '0', |
|
| 1083 |
- `maintenance` tinyint(1) NOT NULL default '0', |
|
| 1084 |
- `debug` tinyint(1) NOT NULL default '0', |
|
| 1085 |
- `captcha` tinyint(1) NOT NULL default '0', |
|
| 1086 |
- `dateformat` varchar(20) NOT NULL default 'd/m/y', |
|
| 1087 |
- `timeformat` varchar(20) NOT NULL default '- h:i a', |
|
| 1088 |
- `recentdays` tinyint(2) NOT NULL default '7', |
|
| 1089 |
- `displaycolumns` tinyint(1) NOT NULL default '1', |
|
| 1090 |
- `itemsperpage` tinyint(2) NOT NULL default '25', |
|
| 1091 |
- `extendcats` tinyint(1) NOT NULL default '0', |
|
| 1092 |
- `displayindex` tinyint(1) NOT NULL default '0', |
|
| 1093 |
- `defaultsort` tinyint(1) NOT NULL default '0', |
|
| 1094 |
- `displayprofile` tinyint(1) NOT NULL default '0', |
|
| 1095 |
- `linkstyle` tinyint(1) NOT NULL default '0', |
|
| 1096 |
- `linkrange` tinyint(2) NOT NULL default '5', |
|
| 1097 |
- `reviewsallowed` tinyint(1) NOT NULL default '0', |
|
| 1098 |
- `ratings` tinyint(1) NOT NULL default '0', |
|
| 1099 |
- `anonreviews` tinyint(1) NOT NULL default '0', |
|
| 1100 |
- `revdelete` tinyint(1) NOT NULL default '0', |
|
| 1101 |
- `rateonly` tinyint(1) NOT NULL default '0', |
|
| 1102 |
- `pwdsetting` tinyint(1) NOT NULL default '0', |
|
| 1103 |
- `alertson` tinyint(1) NOT NULL default '0', |
|
| 1104 |
- `disablepopups` tinyint(1) NOT NULL default '0', |
|
| 1105 |
- `agestatement` tinyint(1) NOT NULL default '0', |
|
| 1106 |
- `words` text, |
|
| 1107 |
- `version` varchar(10) NOT NULL default '".$version."', |
|
| 1108 |
- `smtp_host` varchar(200) default NULL, |
|
| 1109 |
- `smtp_username` varchar(50) default NULL, |
|
| 1110 |
- `smtp_password` varchar(50) default NULL, |
|
| 1111 |
- PRIMARY KEY (`sitekey`) |
|
| 1112 |
-) ENGINE=MyISAM;"); |
|
| 1113 |
-if($settings) $output .= write_message("<img src=\"../images/check.gif\"> "._SETTINGSTABLESUCCESS." <br /><a href='upgrade11.php?step=2&settingsprefix=".$_POST['settingsprefix']."'>"._CONTINUE."</a>");
|
|
| 1114 |
-else $output .= write_message(_SETTINGSTABLEAUTOFAIL." <br /><a href='upgrade11.php?step=2&settingsprefix=".$_POST['settingsprefix']."'>"._CONTINUE."</a> "); |
|
| 1115 |
- } |
|
| 1116 |
- else {
|
|
| 1117 |
- $install = isset($_GET['install']) ? $_GET['install'] : false; |
|
| 1118 |
- if($install == "manual") {
|
|
| 1119 |
- $output .= write_message(_SETTINGSTABLEMANUAL."<br /><a href='upgrade11.php?step=2'>"._CONTINUE."</a>"); |
|
| 1120 |
- } |
|
| 1121 |
- else if($install == "automatic") {
|
|
| 1122 |
- $output .= |
|
| 1123 |
- "<form method='POST' enctype='multipart/form-data' action='upgrade11.php?step=1' class='tblborder' style='width: 325px; margin: 1em auto;'> |
|
| 1124 |
- <label for='settingsprefix'>"._SETTINGSPREFIX."</label><input type='text' name='settingsprefix' id='settingsprefix' value='".$tableprefix."'><br /> |
|
| 1125 |
- <div style='text-align: center; margin: 1em;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div> |
|
| 1126 |
- </form>"; |
|
| 1127 |
- $output .= write_message(_SETTINGSTABLENOTE); |
|
| 1128 |
- } |
|
| 1129 |
- else {
|
|
| 1130 |
- $output .= write_message(_SETTINGSTABLESETUP." <a href='upgrade11.php?install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade11.php?install=manual'>"._MANUAL2."</a>"); |
|
| 1131 |
- } |
|
| 1132 |
- } |
|
| 1133 |
-} |
|
| 1134 |
-$tpl->assign("output", $output);
|
|
| 1135 |
- |
|
| 1136 |
-$tpl->printToScreen(); |
|
| 1137 |
-if($step > 1) dbclose( ); |
|
| 1138 |
-?> |
|
| 1139 | 0 |
\ No newline at end of file |
| 1140 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,1186 +0,0 @@ |
| 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 |
-function isNumber($num) {
|
|
| 24 |
- return preg_match("/^[0-9]+$/", $num);
|
|
| 25 |
-} |
|
| 26 |
- |
|
| 27 |
-function random_char($string) |
|
| 28 |
-{
|
|
| 29 |
- $length = strlen($string); |
|
| 30 |
- $position = mt_rand(0, $length - 1); |
|
| 31 |
- return $string[$position]; |
|
| 32 |
-} |
|
| 33 |
- |
|
| 34 |
-function random_string ($charset_string, $length) |
|
| 35 |
-{
|
|
| 36 |
- $return_string = random_char($charset_string); |
|
| 37 |
- for ($x = 1; $x < $length; $x++) |
|
| 38 |
- $return_string .= random_char($charset_string); |
|
| 39 |
- return $return_string; |
|
| 40 |
-} |
|
| 41 |
- |
|
| 42 |
-$randomcharset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ'; |
|
| 43 |
- |
|
| 44 |
-function descript($text, $addbreaks = 0) {
|
|
| 45 |
- // Convert problematic ascii characters to their true values |
|
| 46 |
- $search = array("40","41","58","65","66","67","68","69","70",
|
|
| 47 |
- "71","72","73","74","75","76","77","78","79","80","81", |
|
| 48 |
- "82","83","84","85","86","87","88","89","90","97","98", |
|
| 49 |
- "99","100","101","102","103","104","105","106","107", |
|
| 50 |
- "108","109","110","111","112","113","114","115","116", |
|
| 51 |
- "117","118","119","120","121","122" |
|
| 52 |
- ); |
|
| 53 |
- $replace = array("(",")",":","a","b","c","d","e","f","g","h",
|
|
| 54 |
- "i","j","k","l","m","n","o","p","q","r","s","t","u", |
|
| 55 |
- "v","w","x","y","z","a","b","c","d","e","f","g","h", |
|
| 56 |
- "i","j","k","l","m","n","o","p","q","r","s","t","u", |
|
| 57 |
- "v","w","x","y","z" |
|
| 58 |
- ); |
|
| 59 |
- $entities = count($search); |
|
| 60 |
- for ($i=0;$i < $entities;$i++) $text = preg_replace("#(&\#)(0*".$search[$i]."+);*#si", $replace[$i], $text);
|
|
| 61 |
- // the following is based on code from bitflux (http://blog.bitflux.ch/wiki/) |
|
| 62 |
- // Kill hexadecimal characters completely |
|
| 63 |
- $text = preg_replace('#(&\#x)([0-9A-F]+);*#si', "", $text);
|
|
| 64 |
- // remove any attribute starting with "on" or xmlns |
|
| 65 |
- $text = preg_replace('#(<[^>]+[\\"\'\s])(onmouseover|onmousedown|onmouseup|onmouseout|onmousemove|onclick|ondblclick|onload|xmlns)[^>]*>#iUu',">",$text);
|
|
| 66 |
- // remove javascript: and vbscript: protocol |
|
| 67 |
- $text = preg_replace('#([a-z]*)=([\`\'\"]*)script:#iUu','$1=$2nojscript...',$text);
|
|
| 68 |
- $text = preg_replace('#([a-z]*)=([\`\'\"]*)javascript:#iUu','$1=$2nojavascript...',$text);
|
|
| 69 |
- $text = preg_replace('#([a-z]*)=([\'\"]*)vbscript:#iUu','$1=$2novbscript...',$text);
|
|
| 70 |
- //<span style="width: expression(alert('Ping!'));"></span> (only affects ie...)
|
|
| 71 |
- $text = preg_replace('#(<[^>]+)style=([\`\'\"]*).*expression\([^>]*>#iU',"$1>",$text);
|
|
| 72 |
- $text = preg_replace('#(<[^>]+)style=([\`\'\"]*).*behaviour\([^>]*>#iU',"$1>",$text);
|
|
| 73 |
- do {
|
|
| 74 |
- $thistext = $text; |
|
| 75 |
- $text = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$text);
|
|
| 76 |
- } while ($thistext != $text); |
|
| 77 |
- if($addbreaks && strpos($text, "<br>") === false && strpos($text, "<p>") === false && strpos($text, "<br />") === false) $text = nl2br($text); |
|
| 78 |
- return $text; |
|
| 79 |
-} |
|
| 80 |
- |
|
| 81 |
-function write_message($text) {
|
|
| 82 |
- return "<div style='text-align: center; margin: 1em;'>$text</div>"; |
|
| 83 |
-} |
|
| 84 |
-// Strip out slashes if magic quotes isn't on. |
|
| 85 |
-if(ini_get("magic_quotes_gpc")) {
|
|
| 86 |
- foreach($_POST as $var => $val) {
|
|
| 87 |
- $val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val ); |
|
| 88 |
- } |
|
| 89 |
- foreach($_GET as $var => $val) {
|
|
| 90 |
- $val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val ); |
|
| 91 |
- } |
|
| 92 |
- foreach($_COOKIE as $var => $val) {
|
|
| 93 |
- $val = is_array( $val ) ? array_map( 'stripslashes', $val ) : stripslashes( $val ); |
|
| 94 |
- } |
|
| 95 |
-} |
|
| 96 |
- |
|
| 97 |
-function storiesInSeries($thisseries) {
|
|
| 98 |
- |
|
| 99 |
- $storylist = array( ); |
|
| 100 |
- $serieslist = array( ); |
|
| 101 |
- $stinseries = dbquery("SELECT sid, subseriesid FROM ".TABLEPREFIX."fanfiction_inseries WHERE seriesid = '$thisseries'");
|
|
| 102 |
- while($st = dbassoc($stinseries)) {
|
|
| 103 |
- if(!empty($st['sid'])) $storylist[] = $st['sid']; |
|
| 104 |
- else if(!empty($st['subseriesid'])) $serieslist[] = $st['subseriesid']; |
|
| 105 |
- } |
|
| 106 |
- if($serieslist) {
|
|
| 107 |
- foreach($serieslist as $s) {
|
|
| 108 |
- $storylist = array_merge($storylist, storiesInSeries($s)); |
|
| 109 |
- } |
|
| 110 |
- } |
|
| 111 |
- return $storylist; |
|
| 112 |
-} |
|
| 113 |
- |
|
| 114 |
-Header('Cache-Control: private, no-cache, must-revalidate, max_age=0, post-check=0, pre-check=0');
|
|
| 115 |
-header ("Pragma: no-cache");
|
|
| 116 |
-header ("Expires: 0");
|
|
| 117 |
- |
|
| 118 |
-//make a new TemplatePower object |
|
| 119 |
-echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> |
|
| 120 |
-<html><head><title>eFiction $version Install</title> |
|
| 121 |
-<style> |
|
| 122 |
-#settingsform { margin: 0; padding: 0; border: none; }
|
|
| 123 |
-#settingsform FORM { width: 100%; margin: 0 10%; }
|
|
| 124 |
-#settingsform LABEL { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left; padding-top: 1px;}
|
|
| 125 |
-#settingsform .textbox { margin: 1px 0; }
|
|
| 126 |
-#settingsform .fieldset SPAN { float: left; display: block; width: 30%; text-align: right; padding-right: 10px; clear: left;}
|
|
| 127 |
-#settingsform .fieldset LABEL { float: none; width: auto; display: inline; text-align: left; clear: none; }
|
|
| 128 |
-#settingsform { float: left; margin: 1ex 10%; }
|
|
| 129 |
-#settingsform .tinytoggle { text-align: center; }
|
|
| 130 |
-#settingsform .tinytoggle LABEL { float: none; display: inline; width: auto; text-align: center; padding: 0; clear: none; }
|
|
| 131 |
-#settingsform #submitdiv { text-align: center; width: 100%;clear: both; height: 3em; }
|
|
| 132 |
-#settingsform #submitdiv #submit { position: absolute; z-index: 10001; margin: 1em; }
|
|
| 133 |
-LABEL { float: left; display: block; width: 50%; text-align: right; padding-right: 10px; clear: left;}
|
|
| 134 |
-.row { float: left; width: 99%; }
|
|
| 135 |
-a.pophelp{
|
|
| 136 |
- position: relative; /*this is the key*/ |
|
| 137 |
- z-index:24; |
|
| 138 |
- vertical-align: super; |
|
| 139 |
-} |
|
| 140 |
- |
|
| 141 |
-a.pophelp:hover{z-index:100; border: none;}
|
|
| 142 |
- |
|
| 143 |
-a.pophelp span{display: none; position: absolute;}
|
|
| 144 |
- |
|
| 145 |
-a.pophelp:hover span{ /*the span will display just on :hover state*/
|
|
| 146 |
- display:block; |
|
| 147 |
- position:absolute; |
|
| 148 |
- top:2em; left:4em; width: 225px; |
|
| 149 |
- border:1px solid #000; |
|
| 150 |
- background-color:#CCC; color:#000; |
|
| 151 |
- text-decoration: none; |
|
| 152 |
- text-align: left; |
|
| 153 |
- padding: 5px; |
|
| 154 |
- font-weight: normal; |
|
| 155 |
-} |
|
| 156 |
-</style> |
|
| 157 |
-<link rel=\"stylesheet\" type=\"text/css\" href='../default_tpls/style.css'></head>"; |
|
| 158 |
- |
|
| 159 |
-$output = ""; |
|
| 160 |
-define("_BASEDIR", "../");
|
|
| 161 |
- |
|
| 162 |
-include ("../includes/class.TemplatePower.inc.php");
|
|
| 163 |
-include("../config.php");
|
|
| 164 |
-if(isset($_GET['step']) && $_GET['step'] > 2) {
|
|
| 165 |
- $settings = dbquery("SELECT tableprefix, language FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 166 |
- list($tableprefix, $language) = dbrow($settings); |
|
| 167 |
- define("TABLEPREFIX", $tableprefix);
|
|
| 168 |
- define("SITEKEY", $sitekey);
|
|
| 169 |
-} |
|
| 170 |
-if(isset($language)) {
|
|
| 171 |
-if(file_exists("../languages/{$language}.php")) include ("../languages/{$language}.php");
|
|
| 172 |
-else include ("../languages/en.php");
|
|
| 173 |
-if(file_exists("../languages/{$language}_admin.php")) include ("../languages/{$language}_admin.php");
|
|
| 174 |
-else include ("../languages/en_admin.php");
|
|
| 175 |
-if(file_exists("languages/$language.php")) include ("languages/{$language}.php");
|
|
| 176 |
-else include("languages/en.php");
|
|
| 177 |
-} |
|
| 178 |
-else {
|
|
| 179 |
-include ("../languages/en.php");
|
|
| 180 |
-include ("../languages/en_admin.php");
|
|
| 181 |
-include("languages/en.php");
|
|
| 182 |
-} |
|
| 183 |
-// So I don't have to keep updating the version number in 3 different files. |
|
| 184 |
-include("../version.php");
|
|
| 185 |
- |
|
| 186 |
-$tpl = new TemplatePower( "../default_tpls/default.tpl" ); |
|
| 187 |
-$tpl->assignInclude( "header", "./../default_tpls/header.tpl" ); |
|
| 188 |
-$tpl->assignInclude( "footer", "./../default_tpls/footer.tpl" ); |
|
| 189 |
-$tpl->prepare( ); |
|
| 190 |
-$tpl->newBlock("header");
|
|
| 191 |
-$tpl->assign("sitename", "Upgrade eFiction 2.0.X to eFiction $version");
|
|
| 192 |
-$tpl->gotoBlock( "_ROOT" ); |
|
| 193 |
-$tpl->newBlock("footer");
|
|
| 194 |
-$tpl->assign( "footer", "eFiction $version © 2006. <a href='http://efiction.org/'>http://efiction.org/</a>"); |
|
| 195 |
-$tpl->gotoBlock( "_ROOT" ); |
|
| 196 |
- |
|
| 197 |
-switch($_GET['step']) {
|
|
| 198 |
- case "19": |
|
| 199 |
- $output .= "<div id='pagetitle'>"._OPTIMIZEDB."</div>"; |
|
| 200 |
- |
|
| 201 |
- if(isset($_GET['install'])) {
|
|
| 202 |
- if($_GET['install'] == "automatic") {
|
|
| 203 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_categories drop index category;");
|
|
| 204 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_categories drop index parentcatid;");
|
|
| 205 |
- dbquery("create index byparent on ".TABLEPREFIX."fanfiction_categories (parentcatid,displayorder);");
|
|
| 206 |
- dbquery("create index forstoryblock on ".TABLEPREFIX."fanfiction_chapters (sid,validated);");
|
|
| 207 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_comments drop index nid;");
|
|
| 208 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_comments add index commentlist (nid,time);");
|
|
| 209 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_inseries drop index seriesid;");
|
|
| 210 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_inseries drop index inorder;");
|
|
| 211 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_inseries add index (seriesid,inorder);");
|
|
| 212 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_inseries drop index sid;");
|
|
| 213 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_inseries add primary key (sid,seriesid,subseriesid);");
|
|
| 214 |
- dbquery("create index avgrating on ".TABLEPREFIX."fanfiction_reviews(type,item,rating);");
|
|
| 215 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_reviews drop index sid;");
|
|
| 216 |
- dbquery("create index bychapter on ".TABLEPREFIX."fanfiction_reviews (chapid,rating);");
|
|
| 217 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_reviews add index byuid (uid,item,type);");
|
|
| 218 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_series drop index owner;");
|
|
| 219 |
- dbquery("create index owner on ".TABLEPREFIX."fanfiction_series (uid,title);");
|
|
| 220 |
- dbquery("alter table ".TABLEPREFIX."fanfiction_stories drop index validated;");
|
|
| 221 |
- dbquery("create index validateduid on ".TABLEPREFIX."fanfiction_stories (validated,uid);");
|
|
| 222 |
- dbquery("create index recent on ".TABLEPREFIX."fanfiction_stories (updated,validated);");
|
|
| 223 |
- dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_inseries` DROP `updated`");
|
|
| 224 |
- dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_news` ADD `comments` INT NOT NULL DEFAULT '0'");
|
|
| 225 |
- dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_series` ADD `numstories` INT NOT NULL DEFAULT '0'");
|
|
| 226 |
- $serieslist = dbquery("SELECT seriesid FROM ".TABLEPREFIX."fanfiction_series");
|
|
| 227 |
- $totalseries = dbnumrows($serieslist); |
|
| 228 |
- while($s = dbassoc($serieslist)) {
|
|
| 229 |
- $numstories = count(storiesInSeries($s['seriesid'])); |
|
| 230 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_series SET numstories = '$numstories' WHERE seriesid = ".$s['seriesid']." LIMIT 1");
|
|
| 231 |
- } |
|
| 232 |
- |
|
| 233 |
- $newslist = dbquery("SELECT count(cid) as count, nid FROM ".TABLEPREFIX."fanfiction_comments GROUP BY nid");
|
|
| 234 |
- while($n = dbassoc($newslist)) {
|
|
| 235 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_news SET comments = '".$n['count']."' WHERE nid = ".$n['nid']);
|
|
| 236 |
- } |
|
| 237 |
- |
|
| 238 |
- $storiesquery =dbquery("SELECT COUNT(sid) as totals, COUNT(DISTINCT uid) as totala, SUM(wordcount) as totalwords FROM ".TABLEPREFIX."fanfiction_stories WHERE validated > 0 ");
|
|
| 239 |
- list($stories, $authors, $words) = dbrow($storiesquery); |
|
| 240 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET stories = '$stories', authors = '$authors', wordcount = '$words' WHERE sitekey = '".SITEKEY."'");
|
|
| 241 |
- |
|
| 242 |
- $chapterquery = dbquery("SELECT COUNT(chapid) as chapters FROM ".TABLEPREFIX."fanfiction_chapters where validated > 0");
|
|
| 243 |
- list($chapters) = dbrow($chapterquery); |
|
| 244 |
- |
|
| 245 |
- $authorquery = dbquery("SELECT COUNT(uid) as totalm FROM ".TABLEPREFIX."fanfiction_authors");
|
|
| 246 |
- list($members) = dbrow($authorquery); |
|
| 247 |
- |
|
| 248 |
- list($newest) = dbrow(dbquery("SELECT uid as uid FROM ".TABLEPREFIX."fanfiction_authors ORDER BY uid DESC LIMIT 1"));
|
|
| 249 |
- $reviewquery = dbquery("SELECT COUNT(reviewid) as totalr FROM ".TABLEPREFIX."fanfiction_reviews WHERE review != 'No Review'");
|
|
| 250 |
- list($reviews) = dbrow($reviewquery); |
|
| 251 |
- $reviewquery = dbquery("SELECT COUNT(uid) FROM ".TABLEPREFIX."fanfiction_reviews WHERE review != 'No Review' AND uid != 0");
|
|
| 252 |
- list($reviewers) = dbrow($reviewquery); |
|
| 253 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET series = '$totalseries', chapters = '$chapters', members = '$members', newestmember = '$newest', reviews = '$reviews', reviewers = '$reviewers' WHERE sitekey = '".SITEKEY."'");
|
|
| 254 |
- $alltables = dbquery("SHOW TABLES");
|
|
| 255 |
- while ($table = dbassoc($alltables)) {
|
|
| 256 |
- foreach ($table as $db => $tablename) {
|
|
| 257 |
- dbquery("OPTIMIZE TABLE `".$tablename."`");
|
|
| 258 |
- } |
|
| 259 |
- } |
|
| 260 |
- $output .= write_message(_DONE."<br />"._UPGRADEEND); |
|
| 261 |
- } |
|
| 262 |
- else {
|
|
| 263 |
- $output .= write_message(_OPTIMIZEMANUAL." "._UPGRADEEND); |
|
| 264 |
- } |
|
| 265 |
- } |
|
| 266 |
- else $output .= write_message(_OPTIMIZEINFO."<br /><br /><a href='upgrade20.php?step=19&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade20.php?step=19&install=manual'>"._MANUAL2."</a>"); |
|
| 267 |
- break; |
|
| 268 |
- case "18": |
|
| 269 |
- $output .= "<div id='pagetitle'>"._SERIESREVIEWS."</div>"; |
|
| 270 |
- if(isset($_GET['install'])) {
|
|
| 271 |
- |
|
| 272 |
- |
|
| 273 |
- |
|
| 274 |
- $series = dbquery("SELECT seriesid FROM ".TABLEPREFIX."fanfiction_series");
|
|
| 275 |
- if(dbnumrows($series)) {
|
|
| 276 |
- while($s = dbassoc($series)) {
|
|
| 277 |
- $thisseries = $s['seriesid']; |
|
| 278 |
- include("../includes/seriesreviews.php");
|
|
| 279 |
- } |
|
| 280 |
- } |
|
| 281 |
- $output .= write_message("<a href='upgrade20.php?step=19'>"._CONTINUE."</a>");
|
|
| 282 |
- } |
|
| 283 |
- else $output .= write_message(_SERIESREVIEWSINFO."<br /><a href='upgrade20.php?step=18&install=automatic'>"._CONTINUE."</a>"); |
|
| 284 |
- break; |
|
| 285 |
- case "17": |
|
| 286 |
- $output .= "<div id='pagetitle'>"._NEWSUPDATE."</div>"; |
|
| 287 |
- if(isset($_GET['install'])) {
|
|
| 288 |
- |
|
| 289 |
- |
|
| 290 |
- |
|
| 291 |
- |
|
| 292 |
- $comments = dbquery("SELECT uname FROM ".TABLEPREFIX."fanfiction_comments GROUP BY uname");
|
|
| 293 |
- while($uname = dbassoc($comments)) {
|
|
| 294 |
- unset($uid); |
|
| 295 |
- $nameinfo = dbquery("SELECT uid FROM ".TABLEPREFIX."fanfiction_authors WHERE penname = '".$uname['uname']."'");
|
|
| 296 |
- list($uid) = dbrow($nameinfo); |
|
| 297 |
- if(empty($uid)) $uid = 0; |
|
| 298 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_comments SET uname = '$uid' WHERE uname = '".$uname['uname']."'");
|
|
| 299 |
- } |
|
| 300 |
- $result2 = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_comments` CHANGE `uname` `uid` INT NOT NULL DEFAULT '0';");
|
|
| 301 |
- $output .= write_message(_NEWSUPDATERESULT.($result2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 302 |
- $output .= write_message("<a href='upgrade20.php?step=18'>"._CONTINUE."</a>");
|
|
| 303 |
- |
|
| 304 |
- } |
|
| 305 |
- else $output .= write_message(_NEWSUPDATEINFO."<br /><a href='upgrade20.php?step=17&install=automatic'>"._CONTINUE."</a>"); |
|
| 306 |
- |
|
| 307 |
- break; |
|
| 308 |
- case "16": |
|
| 309 |
- $output .= "<div id='pagetitle'>"._AUTHORUPDATE."</div>"; |
|
| 310 |
- if(isset($_GET['install'])) {
|
|
| 311 |
- |
|
| 312 |
- |
|
| 313 |
- $settings = dbquery("SELECT tableprefix, defaultsort, displayindex, tinyMCE FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
|
|
| 314 |
- list($defaultsort, $displayindex, $tinyMCE) = dbrow($settings); |
|
| 315 |
- $fix = dbquery("UPDATE ".TABLEPREFIX."fanfiction_authors SET ageconsent = 0 WHERE ageconsent != 1");
|
|
| 316 |
- $result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(`uid`, `newreviews`, `ageconsent`, `alertson`, `validated`, `userskin`, `level`, `categories`, `contact`) SELECT uid, newreviews, ageconsent, alertson, validated, userskin, level, categories, contact FROM ".TABLEPREFIX."fanfiction_authors");
|
|
| 317 |
- $result2 = dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorprefs set sortby = '$defaultsort', storyindex = '$displayindex', tinyMCE = '$tinyMCE'");
|
|
| 318 |
- $output .= write_message(_AUTHORRESULT.($result ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 319 |
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = 1");
|
|
| 320 |
- while($f = dbassoc($fields)) {
|
|
| 321 |
- $result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorinfo(`uid`, `info`) SELECT uid, ".$f['field_name']." FROM ".TABLEPREFIX."fanfiction_authors WHERE ".$f['field_name']." IS NOT NULL AND ".$f['field_name']." != ''");
|
|
| 322 |
- $result2 = dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET field = ".$f['field_id']." WHERE field = 0");
|
|
| 323 |
- } |
|
| 324 |
- $result2 = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_authors` DROP `newreviews`, DROP `validated`, DROP `userskin`, DROP `level`, DROP `contact`, DROP `categories`, DROP `ageconsent`, DROP `betareader`, DROP `alertson`, DROP `AOL`, DROP `Yahoo`, DROP `ICQ`, DROP `MSN`;");
|
|
| 325 |
- $output .= write_message(_AUTHORDROPRESULT.($result2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 326 |
- $output .= write_message("<a href='upgrade20.php?step=17'>"._CONTINUE."</a>");
|
|
| 327 |
- |
|
| 328 |
- } |
|
| 329 |
- else $output .= write_message(_AUTHORUPDATEINFO."<br /><a href='upgrade20.php?step=16&install=automatic'>"._CONTINUE."</a>"); |
|
| 330 |
- break; |
|
| 331 |
- case "15": |
|
| 332 |
- $output .= "<div id='pagetitle'>"._AUTHORFIELDS."</div>"; |
|
| 333 |
- include("../config.php");
|
|
| 334 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
|
|
| 335 |
- |
|
| 336 |
- if(isset($_GET['install'])) {
|
|
| 337 |
- if($_GET['install'] == "automatic") {
|
|
| 338 |
- $fields[] = array('4','lj','Live Journal','http://{info}.livejournal.com','','','0');
|
|
| 339 |
- $fields[] = array('1','website','Web Site','','','','1');
|
|
| 340 |
- $fields[] = array('5','AOL','AIM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"http://big.oscar.aol.com/".$field[\'info\']."?on_url=$url/images/aim.gif&off_url=$url/images/aim.gif\"> <a href=\"aim:goim?{aol}ScreenName=".$field[\'info\']."\">".format_email($field[\'info\'])."</a>";','1');
|
|
| 341 |
- $fields[] = array('5','ICQ','ICQ','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"http://status.icq.com/online.gif?icq=".$field[\'info\']."&img=5\"> ".$field[\'info\'];','1');
|
|
| 342 |
- $fields[] = array('5','MSN','MSN IM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".format_email($field[\'info\']);','1');
|
|
| 343 |
- $fields[] = array('5','Yahoo','Yahoo IM','','$output .= "<div><label for=\'AOL\'>".$field[\'field_title\'].":</label><INPUT type=\'text\' class=\'textbox\' name=\'af_".$field[\'field_name\']."\' maxlength=\'40\' value=\'".(!empty($user[\'af_\'.$field[\'field_id\']]) ? $user[\'af_\'.$field[\'field_id\']] : "")."\' size=\'20\'></div>";','$thisfield = "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=".$field[\'info\']."&.src=pg\"><img border=\'0\' src=\"http://opi.yahoo.com/online?u=".$field[\'info\']."&m=g&t=1\"> ".format_email($field[\'info\'])."</a>";','1');
|
|
| 344 |
- $fields[] = array('4','da','Deviant Art','http://{info}.deviantart.com','','','0');
|
|
| 345 |
- $fields[] = array('3','betareader','Beta-reader','','','','1');
|
|
| 346 |
- $fields[] = array('4','dj','DeadJournal','http://{info}.deadjournal.com/','','','0');
|
|
| 347 |
- $fields[] = array('4','xanga','Xanga','http://www.xanga.com/{info}','','','0');
|
|
| 348 |
- $fields[] = array('2', 'gender', 'Gender', 'male|#|female|#|undisclosed', '', '', '0');
|
|
| 349 |
- $fields[] = array('4','myspace','MySpace','http://www.myspace.com/{info}','','','0');
|
|
| 350 |
- |
|
| 351 |
- |
|
| 352 |
- |
|
| 353 |
- |
|
| 354 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>"._FIELD."</th><th>"._RESULT."</th></tr>"; |
|
| 355 |
- foreach($fields as $field) {
|
|
| 356 |
- $f = dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_authorfields` (`field_type`, `field_name`, `field_title`, `field_options`, `field_code_in`, `field_code_out`, `field_on`) VALUES('".$field[0]."', '".$field[1]."','".$field[2]."','".escapestring($field[3])."','".escapestring($field[4])."','".escapestring($field[5])."','".$field[6]."');");
|
|
| 357 |
- $output .= "<tr><td>".$field[2]."</td><td align='center'>" . ($f ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 358 |
- } |
|
| 359 |
- $output .= "</table>"; |
|
| 360 |
- $output .= write_message(_FIELDAUTOFAIL." "._FIELDUPDATE."<br /><br /> <a href='upgrade20.php?step=16'>"._CONTINUE."</a>"); |
|
| 361 |
- } |
|
| 362 |
- else {
|
|
| 363 |
- $output .= write_message(_FIELDMANUAL," "._FIELDUPDATE."<br /><br /><a href='upgrade20.php?step=16'>"._CONTINUE."</a>"); |
|
| 364 |
- } |
|
| 365 |
- } |
|
| 366 |
- else $output .= write_message(_FIELDDATAINFO."<br /><br /><a href='upgrade20.php?step=15&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade20.php?step=15&install=manual'>"._MANUAL2."</a>"); |
|
| 367 |
- break; |
|
| 368 |
- case "14": |
|
| 369 |
- $output .= "<div id='pagetitle'>"._CHALLENGEUPDATE."</div>"; |
|
| 370 |
- include("../config.php");
|
|
| 371 |
- $settings = dbquery("SELECT tableprefix FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
|
|
| 372 |
- |
|
| 373 |
- $challenges = dbquery("SELECT chalid, characters FROM ".TABLEPREFIX."fanfiction_challenges");
|
|
| 374 |
- if(dbnumrows($challenges)) {
|
|
| 375 |
- if(isset($_GET['install'])) {
|
|
| 376 |
- $altersettings = dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `anonchallenges` TINYINT( 1 ) NOT NULL DEFAULT 0");
|
|
| 377 |
- $output .= write_message(_CHALLENGESETTING.($altersettings ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 378 |
- $alter = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_challenges` ADD `responses` int(11) NOT NULL DEFAULT 0");
|
|
| 379 |
- $output .= write_message(_CHALLENGESALTER.($alter ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 380 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/challenges/authorof.php\");', 'AO', 'challenges');");
|
|
| 381 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR.\"modules/challenges/storyblock.php\");', 'storyblock', 'challenges');");
|
|
| 382 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR.\"modules/challenges/seriesblock.php\");', 'seriesblock', 'challenges');");
|
|
| 383 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR.\"modules/challenges/seriestitle.php\");', 'seriestitle', 'challenges');");
|
|
| 384 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR.\"modules/challenges/adminfunctions.php\");', 'delchar', 'challenges');");
|
|
| 385 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR.\"modules/challenges/adminfunctions.php\");', 'delcategory', 'challenges');");
|
|
| 386 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR.\"modules/challenges/otherresults.php\");', 'otherresults', 'challenges');");
|
|
| 387 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES('include(_BASEDIR.\"modules/challenges/stats.php\");', 'sitestats', 'challenges');");
|
|
| 388 |
- $proquery = dbquery("SELECT count(panel_id) FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'P' AND panel_hidden = '0'");
|
|
| 389 |
- list($profiles) = dbrow($proquery); |
|
| 390 |
- $profiles++; |
|
| 391 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('challengesby', 'Challenges by {author}', 'modules/challenges/challengesby.php', 0, $profiles, 0, 'P');");
|
|
| 392 |
- $userquery = dbquery("SELECT count(panel_id) FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'U' AND panel_hidden = '0'");
|
|
| 393 |
- list($userpanels) = dbrow($userquery); |
|
| 394 |
- $userpanels++; |
|
| 395 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('challengesby', 'Your Challenges', 'modules/challenges/challengesby.php', 0, $userpanels, 0, 'U');");
|
|
| 396 |
- $adminquery = dbquery("SELECT count(panel_id) FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'A' AND panel_hidden = '0'");
|
|
| 397 |
- list($adminpanels) = dbrow($adminquery); |
|
| 398 |
- $adminpanels++; |
|
| 399 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name` , `panel_title` , `panel_url` , `panel_level` , `panel_order` , `panel_hidden` , `panel_type` ) VALUES ('challenges', 'Challenges', 'modules/challenges/admin.php', '1', $adminpanels, 0, 'A');");
|
|
| 400 |
- $topquery = dbquery("SELECT count(panel_id) FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'L' AND panel_hidden = '0'");
|
|
| 401 |
- list($listpanels) = dbrow($topquery); |
|
| 402 |
- $listpanels++; |
|
| 403 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name` , `panel_title` , `panel_url` , `panel_level` , `panel_order` , `panel_hidden` , `panel_type` ) VALUES ('challenges', 'Top 10 Challenges', 'modules/challenges/topchallenges.php', '0', $listpanels, 0, 'L');");
|
|
| 404 |
- $browsequery = dbquery("SELECT count(panel_id) FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'B' AND panel_hidden = '0'");
|
|
| 405 |
- list($browse) = dbrow($browsequery); |
|
| 406 |
- $browse++; |
|
| 407 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name` , `panel_title` , `panel_url` , `panel_level` , `panel_order` , `panel_hidden` , `panel_type` ) VALUES ('challenges', 'Challenges', 'browse.php?type=challenges', '0', $browse, 0, 'B');");
|
|
| 408 |
- dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_pagelinks` (`link_name`, `link_text`, `link_url`, `link_target`, `link_access`) VALUES ('challenges', 'Challenges', 'browse.php?type=challenges', '0', 0);");
|
|
| 409 |
- $characters = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_characters");
|
|
| 410 |
- while($char = dbassoc($characters)) {
|
|
| 411 |
- $charlist[stripslashes($char['charname'])] = $char['charid']; |
|
| 412 |
- } |
|
| 413 |
- while($c = dbassoc($challenges)) {
|
|
| 414 |
- unset($newchars, $count, $count1, $count2); |
|
| 415 |
- if($c['characters']) {
|
|
| 416 |
- $chars = explode(",", $c['characters']);
|
|
| 417 |
- foreach($chars as $char) {
|
|
| 418 |
- if(isset($charlist[$char])) $newchars[] = $charlist[$char]; |
|
| 419 |
- } |
|
| 420 |
- } |
|
| 421 |
- $stories = dbquery("SELECT COUNT(sid) AS count FROM ".TABLEPREFIX."fanfiction_stories WHERE FIND_IN_SET('".$c['chalid']."', challenges) > 0");
|
|
| 422 |
- list($count1) = dbrow($stories); |
|
| 423 |
- $series = dbquery("SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series WHERE FIND_IN_SET('".$c['chalid']."', challenges) > 0");
|
|
| 424 |
- list($count2) = dbrow($series); |
|
| 425 |
- $count = $count1 + $count2; |
|
| 426 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_challenges SET responses = '$count', characters = '".(isset($newchars) ? implode(",", $newchars) : "")."' WHERE chalid = $c[chalid]");
|
|
| 427 |
- } |
|
| 428 |
- $output .= write_message("<a href='upgrade20.php?step=15'>"._CONTINUE."</a>");
|
|
| 429 |
- } |
|
| 430 |
- else $output .= write_message(_CHALLENGEUPDATEINFO."<br /><a href='upgrade20.php?step=14&install=automatic'>"._CONTINUE."</a>"); |
|
| 431 |
- } |
|
| 432 |
- else $output .= write_message(_CHALLENGESEMPTY."<a href='upgrade20.php?step=15'>"._CONTINUE."</a>"); |
|
| 433 |
- break; |
|
| 434 |
- case "13": |
|
| 435 |
- $output .= "<div id='pagetitle'>"._FAVUPDATE."</div>"; |
|
| 436 |
- if(isset($_GET['install'])) {
|
|
| 437 |
- |
|
| 438 |
- |
|
| 439 |
- |
|
| 440 |
- $favst = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_favorites(uid, item, type) SELECT uid, sid, 'ST' FROM ".TABLEPREFIX."fanfiction_favstor");
|
|
| 441 |
- $output .= write_message(_FAV1.($favst ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 442 |
- $favse = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_favorites(uid, item, type) SELECT uid, seriesid, 'SE' FROM ".TABLEPREFIX."fanfiction_favseries");
|
|
| 443 |
- $output .= write_message(_FAV2.($favse ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 444 |
- $favau = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_favorites(uid, item, type) SELECT uid, favuid, 'AU' FROM ".TABLEPREFIX."fanfiction_favauth");
|
|
| 445 |
- $output .= write_message(_FAV3.($favau ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 446 |
- $drop1 = dbquery("DROP TABLE `".TABLEPREFIX."fanfiction_favstor`");
|
|
| 447 |
- $output .= write_message(_FAV4.($drop1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 448 |
- $drop2 = dbquery("DROP TABLE `".TABLEPREFIX."fanfiction_favseries`");
|
|
| 449 |
- $output .= write_message(_FAV5.($drop2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 450 |
- $drop3 = dbquery("DROP TABLE `".TABLEPREFIX."fanfiction_favauth`");
|
|
| 451 |
- $output .= write_message(_FAV6.($drop3 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 452 |
- $output .= write_message("<a href='upgrade20.php?step=14'>"._CONTINUE."</a>");
|
|
| 453 |
- } |
|
| 454 |
- else $output .= write_message(_FAVUPDATEINFO."<br /><a href='upgrade20.php?step=13&install=automatic'>"._CONTINUE."</a>"); |
|
| 455 |
- break; |
|
| 456 |
- case "12": |
|
| 457 |
- $output .= "<div id='pagetitle'>"._REVIEWUPDATE."</div>"; |
|
| 458 |
- if(isset($_GET['install'])) {
|
|
| 459 |
- |
|
| 460 |
- |
|
| 461 |
- |
|
| 462 |
- $alter = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_reviews` CHANGE `sid` `item` INT( 11 ) NOT NULL DEFAULT '0'");
|
|
| 463 |
- $output .= write_message(_REVIEWALTER1.($alter ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 464 |
- $alter2 = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_reviews` ADD `type` VARCHAR( 2 ) NOT NULL DEFAULT 'ST'");
|
|
| 465 |
- $output .= write_message(_REVIEWALTER2.($alter2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 466 |
- $alter3 = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_reviews` CHANGE `member` `uid` INT( 11 ) NOT NULL DEFAULT '0'");
|
|
| 467 |
- $output .= write_message(_REVIEWALTER3.($alter3 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 468 |
- $update1 = dbquery("UPDATE ".TABLEPREFIX."fanfiction_reviews SET type = 'ST' WHERE item > 0");
|
|
| 469 |
- $output .= write_message(_REVIEWUPDATE1.($update1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 470 |
- $update2 = dbquery("UPDATE ".TABLEPREFIX."fanfiction_reviews SET type = 'SE', item = seriesid WHERE seriesid > 0");
|
|
| 471 |
- $output .= write_message(_REVIEWUPDATE2.($update2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 472 |
- $alter4 = dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_reviews` DROP `seriesid`");
|
|
| 473 |
- $output .= write_message(_REVIEWALTER4.($alter4 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 474 |
- $output .= write_message("<a href='upgrade20.php?step=13'>"._CONTINUE."</a>");
|
|
| 475 |
- } |
|
| 476 |
- else $output .= write_message(_REVIEWUPDATEINFO."<br /><a href='upgrade20.php?step=12&install=automatic'>"._CONTINUE."</a>"); |
|
| 477 |
- |
|
| 478 |
- break; |
|
| 479 |
- case "11": |
|
| 480 |
- $output .= "<div id='pagetitle'>"._UPDATESTORIES."</div>"; |
|
| 481 |
- if(isset($_GET['install'])) {
|
|
| 482 |
- |
|
| 483 |
- |
|
| 484 |
- |
|
| 485 |
- $characters = dbquery("SELECT charid, charname FROM ".TABLEPREFIX."fanfiction_characters");
|
|
| 486 |
- while($char = dbassoc($characters)) {
|
|
| 487 |
- $character[stripslashes($char[charname])] = $char[charid]; |
|
| 488 |
- } |
|
| 489 |
- $ratlist = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_ratings");
|
|
| 490 |
- while($rate = dbassoc($ratlist)) {
|
|
| 491 |
- $ratingslist[$rate['rating']] = $rate['rid']; |
|
| 492 |
- } |
|
| 493 |
- $classresults = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_classes");
|
|
| 494 |
- while($class = dbassoc($classresults)) {
|
|
| 495 |
- $classlist[$class['class_name']] = array("id" => $class['class_id'], "type" => $class['class_type'], "name" => $class['class_name']);
|
|
| 496 |
- } |
|
| 497 |
- $offset = isset($_GET['offset']) ? $_GET['offset'] : 0; |
|
| 498 |
- $stories = dbquery("SELECT sid, gid, wid, charid, rid FROM ".TABLEPREFIX."fanfiction_stories LIMIT $offset, 200");
|
|
| 499 |
- while($story = dbassoc($stories)) {
|
|
| 500 |
- unset($genres, $warnings, $g, $w, $classes, $characters, $c, $clist, $rid); |
|
| 501 |
- $characters = explode(",", $story['charid']);
|
|
| 502 |
- foreach($characters as $c) {
|
|
| 503 |
- $clist[] = $character[$c]; |
|
| 504 |
- } |
|
| 505 |
- $genres = explode(",", $story['gid']);
|
|
| 506 |
- foreach($genres as $g) {
|
|
| 507 |
- if($g && $g != " " && $classlist[$g]['type'] == 1) $classes[] = $classlist[$g]['id']; |
|
| 508 |
- } |
|
| 509 |
- $warnings = explode(",", $story['wid']);
|
|
| 510 |
- foreach($warnings as $w) {
|
|
| 511 |
- if($w && $w != " " && $classlist[$w]['type'] == 2) $classes[] = $classlist[$w]['id']; |
|
| 512 |
- } |
|
| 513 |
- $rid = $ratingslist[$story['rid']]; |
|
| 514 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stories SET rid = '$rid', classes = '".($classes ? implode(",", $classes) : "")."', charid = '".($clist ? implode(",", $clist) : "")."' WHERE sid = '$story[sid]'");
|
|
| 515 |
- } |
|
| 516 |
- if(dbnumrows($stories)) $output .= write_message(_STORIES." ".($offset + 1)."-".($offset + dbnumrows($stories)).".<br /><a href='upgrade20.php?step=11&install=automatic&offset=".($offset+200)."'>"._CONTINUE."</a>"); |
|
| 517 |
- else {
|
|
| 518 |
- $seriesquery = dbquery("SELECT seriesid, genres, warnings FROM ".TABLEPREFIX."fanfiction_series");
|
|
| 519 |
- while($series = dbassoc($seriesquery)) {
|
|
| 520 |
- unset($genres, $warnings, $g, $w, $classes); |
|
| 521 |
- $genres = explode(",", $series[genres]);
|
|
| 522 |
- foreach($genres as $g) {
|
|
| 523 |
- if($g && $g != " " && $classlist[$g]['type'] == 1) $classes[] = $classlist[$g]['id']; |
|
| 524 |
- } |
|
| 525 |
- $warnings = explode(",", $series[warnings]);
|
|
| 526 |
- foreach($warnings as $w) {
|
|
| 527 |
- if($w && $w != " " && $classlist[$w]['type'] == 2) $classes[] = $classlist[$w]['id']; |
|
| 528 |
- } |
|
| 529 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_series SET classes = '".($classes ? implode(",", $classes) : "")."' WHERE seriesid = '$series[seriesid]'");
|
|
| 530 |
- } |
|
| 531 |
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_inseries SET confirmed = 1");
|
|
| 532 |
- $drop1 = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_stories drop `gid`, drop `wid`;");
|
|
| 533 |
- $output .= write_message(_DROPGWSTORIES.($drop1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 534 |
- $output .= write_message((dbnumrows($seriesquery) ? _SERIES." 1-".dbnumrows($seriesquery)."<br />" : "")."<a href='upgrade20.php?step=12'>"._CONTINUE."</a>"); |
|
| 535 |
- } |
|
| 536 |
- } |
|
| 537 |
- else $output .= write_message(_UPDATESTORIESINFO."<br /><a href='upgrade20.php?step=11&install=automatic'>"._CONTINUE."</a>"); |
|
| 538 |
- break; |
|
| 539 |
- case "10": |
|
| 540 |
- $output .= "<div id='pagetitle'>"._UPDATESTORIESTABLE."</div>"; |
|
| 541 |
- if(isset($_GET['install'])) {
|
|
| 542 |
- if($_GET['install'] == "automatic") {
|
|
| 543 |
- |
|
| 544 |
- |
|
| 545 |
- |
|
| 546 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_stories ADD `classes` VARCHAR( 200 ) NULL AFTER `catid`;");
|
|
| 547 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_series ADD `classes` VARCHAR( 200 ) NULL AFTER `catid`;");
|
|
| 548 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_series CHANGE `owner` `uid` INT( 11 ) NOT NULL DEFAULT '0'");
|
|
| 549 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_stories CHANGE `summary` `summary` TEXT NULL");
|
|
| 550 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_series CHANGE `summary` `summary` TEXT NULL");
|
|
| 551 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_stories ADD `coauthors` tinyint(1) NOT NULL default '0' AFTER `uid`");
|
|
| 552 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_stories ADD `count` INT( 11 ) NOT NULL DEFAULT '0' AFTER `reviews`;");
|
|
| 553 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_stories ADD `storynotes` TEXT NULL AFTER `summary`;");
|
|
| 554 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_chapters ADD `endnotes` TEXT NULL AFTER `storytext`;");
|
|
| 555 |
- $result = dbquery("ALTER TABLE ".TABLEPREFIX."fanfiction_chapters ADD `count` INT( 11 ) NOT NULL DEFAULT '0' AFTER `uid`;");
|
|
| 556 |
- |
|
| 557 |
- if($result) $output .= write_message(_ACTIONSUCCESSFUL."<br /> <a href='upgrade20.php?step=11'>"._CONTINUE."</a>"); |
|
| 558 |
- } |
|
| 559 |
- else if($_GET['install'] == "manual") {
|
|
| 560 |
- $output .= write_message(_UPDATESTORIESTABLEMANUAL."<br /> <a href='upgrade20.php?step=11'>"._CONTINUE."</a>"); |
|
| 561 |
- } |
|
| 562 |
- } |
|
| 563 |
- else {
|
|
| 564 |
- |
|
| 565 |
- $output .= write_message(_UPDATESTORIESTABLEINFO." <a href='upgrade20.php?step=10&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade20.php?step=10&install=manual'>"._MANUAL2."</a>"); |
|
| 566 |
- } |
|
| 567 |
- break; |
|
| 568 |
- case "9": |
|
| 569 |
- $output .= "<div id='pagetitle'>"._MOVECLASSES."</div>"; |
|
| 570 |
- if(isset($_GET['install'])) {
|
|
| 571 |
- |
|
| 572 |
- |
|
| 573 |
- |
|
| 574 |
- $newclass = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_classtypes (`classtype_name`, `classtype_title`) VALUES('genres', 'Genres');");
|
|
| 575 |
- $genres = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_genres");
|
|
| 576 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Genres</th><th>Result</th></tr>"; |
|
| 577 |
- while($g = dbassoc($genres)) {
|
|
| 578 |
- $result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_classes (`class_type`, `class_name`) VALUES('1', '".$g['genre']."')");
|
|
| 579 |
- $output .= "<tr><td>".$g['genre']."</td><td align='center'>" . ($result ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 580 |
- } |
|
| 581 |
- $output .= "</table>"; |
|
| 582 |
- // Ditto with the warnings |
|
| 583 |
- $newclass = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_classtypes (`classtype_name`, `classtype_title`) VALUES('warnings', 'Warnings');");
|
|
| 584 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Warnings</th><th>Result</th></tr>"; |
|
| 585 |
- $warnings = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_warnings");
|
|
| 586 |
- while($w = dbassoc($warnings)) {
|
|
| 587 |
- $result = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_classes (`class_type`, `class_name`) VALUES('2', '$w[warning]')");
|
|
| 588 |
- $output .= "<tr><td>".$w['warning']."</td><td align='center'>" . ($result ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 589 |
- } |
|
| 590 |
- $output .= "</table>"; |
|
| 591 |
- $drop1 = dbquery("DROP TABLE `".TABLEPREFIX."fanfiction_genres`");
|
|
| 592 |
- $output .= write_message(_DROPGENRES.($drop1 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 593 |
- $drop2 = dbquery("DROP TABLE `".TABLEPREFIX."fanfiction_warnings`");
|
|
| 594 |
- $output .= write_message(_DROPWARNINGS.($drop2 ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">")); |
|
| 595 |
- |
|
| 596 |
- $output .= write_message(_MOVECLASSFAIL."<br /><a href='upgrade20.php?step=10'>continue</a>"); |
|
| 597 |
- } |
|
| 598 |
- else $output .= write_message(_MOVECLASSESINFO."<br /><a href='upgrade20.php?step=9&install=automatic'>"._CONTINUE."</a>"); |
|
| 599 |
- break; |
|
| 600 |
- case "8": |
|
| 601 |
- $output .= "<div id='pagetitle'>"._MESSAGEDATA."</div>"; |
|
| 602 |
- if(isset($_GET['install'])) {
|
|
| 603 |
- if($_GET['install'] == "automatic") {
|
|
| 604 |
- |
|
| 605 |
- |
|
| 606 |
- |
|
| 607 |
- $directory = opendir("../messages");
|
|
| 608 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Message</th><th>Result</th></tr>"; |
|
| 609 |
- while($filename = readdir($directory)) {
|
|
| 610 |
- if($filename=="." || $filename=="..") continue; |
|
| 611 |
- $text = ""; |
|
| 612 |
- $out = fopen ("../messages/".$filename, "r");
|
|
| 613 |
- while (!feof($out)) { $text .= fgets($out, 10000); }
|
|
| 614 |
- $msgname = substr($filename, 0, strrpos($filename, ".")); |
|
| 615 |
- $msg = dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_messages` (`message_name`, `message_title`, `message_text`) VALUES ('$msgname', '".$defaulttitles[$msgname]."', '".addslashes($text)."');");
|
|
| 616 |
- $output .= "<tr><td>".$defaulttitles[$msgname]."</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 617 |
- } |
|
| 618 |
- $msg = dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_messages` (`message_name`, `message_title`, `message_text`) VALUES('maintenance', 'Site Maintenance', '<p style=\"text-align: center;\">This site is currently undergoing maintenance. Please check back soon. Thank you.</p>');");
|
|
| 619 |
- $msg = dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_messages` (`message_name`, `message_title`, `message_text`) VALUES ('tos', 'Terms of Service', 'This is the Terms of Service for your site. It will be displayed when a new member registers to the site.');");
|
|
| 620 |
- $output .= "<tr><td>Terms of Service</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 621 |
- $output .= "<tr><td>Site Maintenance</td><td align='center'>" . ($msg ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 622 |
- $output .= "</table>"; |
|
| 623 |
- $output .= write_message(_MESSAGEAUTOFAILUPGRADE."<br /><a href='upgrade20.php?step=9'>continue</a>"); |
|
| 624 |
- } |
|
| 625 |
- } |
|
| 626 |
- else $output .= write_message(_MESSAGEDATAUPGRADE."<br /><a href='upgrade20.php?step=8&install=automatic'>"._CONTINUE."</a>"); |
|
| 627 |
- |
|
| 628 |
- break; |
|
| 629 |
- case "7": |
|
| 630 |
- $output .= "<div id='pagetitle'>"._BLOCKDATA."</div>"; |
|
| 631 |
- if(isset($_GET['install'])) {
|
|
| 632 |
- if($_GET['install'] == "automatic") {
|
|
| 633 |
- |
|
| 634 |
- include("../blocks_config.php");
|
|
| 635 |
- $blocks['news']['num'] = 1; |
|
| 636 |
- $blocks['recent']['num'] = 1; |
|
| 637 |
- define("_BASEDIR", "../");
|
|
| 638 |
- |
|
| 639 |
- |
|
| 640 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Block</th><th>Result</th></tr>"; |
|
| 641 |
- foreach($blocks as $block =>$value) {
|
|
| 642 |
- unset($blockvars); |
|
| 643 |
- foreach($value as $var=>$val) {
|
|
| 644 |
- if($var != "name" && $var != "title" && $var != "file" && $var != "status") $blockvars[$var] = $val; |
|
| 645 |
- } |
|
| 646 |
- $b = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks (`block_name`, `block_title`, `block_file`, `block_status`, `block_variables`) VALUES('$block', '".escapestring($value['title'])."', '".$value['file']."', '".$value['status']."', '".($blockvars ? addslashes(serialize($blockvars)) : "")."');");
|
|
| 647 |
- $output .= "<tr><td>".$value['title']."</td><td align='center'>" . ($b ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 648 |
- } |
|
| 649 |
- $output .= "</table>"; |
|
| 650 |
- $output .= write_message(_BLOCKDATAFAILUPGRADE."<br /><a href='upgrade20.php?step=8'>"._CONTINUE."</a>"); |
|
| 651 |
- } |
|
| 652 |
- } |
|
| 653 |
- else $output .= write_message(_BLOCKDATAUPGRADE." <br /><a href='upgrade20.php?step=7&install=automatic'>"._CONTINUE."</a>"); |
|
| 654 |
- break; |
|
| 655 |
- case "6": |
|
| 656 |
- $output .= "<div id='pagetitle'>"._LINKDATA."</div>"; |
|
| 657 |
- if(isset($_GET['install'])) {
|
|
| 658 |
- if($_GET['install'] == "automatic") {
|
|
| 659 |
- |
|
| 660 |
- |
|
| 661 |
- |
|
| 662 |
- $pagelist = array( |
|
| 663 |
- array("home","Home","index.php","0","0"),
|
|
| 664 |
- array("recent","Most Recent","browse.php?type=recent","0","0"),
|
|
| 665 |
- array("login","Login","user.php?action=login","0","0"),
|
|
| 666 |
- array("adminarea","Admin","admin.php","0","2"),
|
|
| 667 |
- array("logout","Logout","user.php?action=logout","0","1"),
|
|
| 668 |
- array("featured","Featured Stories","browse.php?type=featured","0","0"),
|
|
| 669 |
- array("catslink","Categories","browse.php?type=categories","0","0"),
|
|
| 670 |
- array("members","Members","authors.php?action=list","0","0"),
|
|
| 671 |
- array("authors","Authors","authors.php?list=authors","0","0"),
|
|
| 672 |
- array("help","Help","viewpage.php?page=help","0","0"),
|
|
| 673 |
- array("search","Search","search.php","0","0"),
|
|
| 674 |
- array("series","Series","browse.php?type=series","0","0"),
|
|
| 675 |
- array("tens","Top Tens","toplists.php","0","0"),
|
|
| 676 |
- array("challenges","Challenges","modules/challenges/challenges.php","0","0"),
|
|
| 677 |
- array("contactus","Contact Us","contact.php","0","0"),
|
|
| 678 |
- array("rules","Rules","viewpage.php?page=rules","0","0"),
|
|
| 679 |
- array("tos","Terms of Service","viewpage.php?page=tos","0","0"),
|
|
| 680 |
- array("rss","<img src=\'images/xml.gif\' alt=\'RSS\' border=\'0\'>","rss.php","0","0"),
|
|
| 681 |
- array("login","Account Info","user.php","0","1"),
|
|
| 682 |
- array("titles","Titles","browse.php?type=titles","0","0"),
|
|
| 683 |
- array("register","Register","user.php?action=register","0","0"),
|
|
| 684 |
- array("lostpassword","Lost Password","user.php?action=lostpassword","0","0"),
|
|
| 685 |
- array("newsarchive","News Archive","news.php","0","0"),
|
|
| 686 |
- array("browse","Browse","browse.php","0","0"),
|
|
| 687 |
- array("charslink", "Characters", "browse.php?type=characters","0","0"),
|
|
| 688 |
- array("ratings", "Ratings", "browse.php?type=ratings", "0", "0"),
|
|
| 689 |
- array("genres_link", "Genres", "browse.php?type=class&type_id=1", "0", "0"),
|
|
| 690 |
- array("warnings_link", "Warnings", "browse.php?type=class&type_id=2", "0", "0")
|
|
| 691 |
- ); |
|
| 692 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Pages</th><th>Result</th></tr>"; |
|
| 693 |
- foreach($pagelist as $page) {
|
|
| 694 |
- $pages = dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_pagelinks` (`link_name`, `link_text`, `link_url`, `link_target`, `link_access`) VALUES ('".$page[0]."', '".$page[1]."', '".$page[2]."', '".$page[3]."', '".$page[4]."');");
|
|
| 695 |
- $output .= "<tr><td>".stripslashes($page[1])."</td><td align='center'>" . ($pages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 696 |
- } |
|
| 697 |
- |
|
| 698 |
- $output .= "</table>"; |
|
| 699 |
- $output .= write_message(_LINKAUTOFAIL."<br /><a href='upgrade20.php?step=7'>"._CONTINUE."</a>"); |
|
| 700 |
- } |
|
| 701 |
- else {
|
|
| 702 |
- $output .= write_message(_LINKMANUAL."<br /><a href='upgrade20.php?step=7'>"._CONTINUE."</a>"); |
|
| 703 |
- } |
|
| 704 |
- } |
|
| 705 |
- else $output .= write_message(_LINKDATAINFO." "._LINKSETUP." <a href='upgrade20.php?step=6&install=automatic'>automatic</a> "._OR." <a href='upgrade20.php?step=6&install=manual'>manual</a>"); |
|
| 706 |
- break; |
|
| 707 |
- case "5": |
|
| 708 |
- $output .= "<div id='pagetitle'>"._PANELDATA."</div>"; |
|
| 709 |
- if(isset($_GET['install'])){
|
|
| 710 |
- if($_GET['install'] == "automatic") {
|
|
| 711 |
- |
|
| 712 |
- |
|
| 713 |
- |
|
| 714 |
- $panellist = array( |
|
| 715 |
- array("submitted","Submissions", "","3","5","0","A"),
|
|
| 716 |
- array("versioncheck", "Version Check", "", "3", "7", "0", "A"),
|
|
| 717 |
- array("newstory","Add New Story","stories.php?action=newstory&admin=1","3","3","0","A"),
|
|
| 718 |
- array("addseries","Add New Series","series.php?action=add","3","3","0","A"),
|
|
| 719 |
- array("news","News","","3","5","0","A"),
|
|
| 720 |
- array("featured","Featured Stories","","3","5","0","A"),
|
|
| 721 |
- array("characters","Characters","","2","2","0","A"),
|
|
| 722 |
- array("ratings","Ratings","","2","3","0","A"),
|
|
| 723 |
- array("members","Members","","2","5","0","A"),
|
|
| 724 |
- array("mailusers","Mail Users","","2","6","0","A"),
|
|
| 725 |
- array("settings","Settings","","1","2","0","A"),
|
|
| 726 |
- array("blocks","Blocks","","1","3","0","A"),
|
|
| 727 |
- array("censor","Censor","","1","0","1","A"),
|
|
| 728 |
- array("admins","Admins","","1","6","0","A"),
|
|
| 729 |
- array("classifications","Classifications","","2","4","0","A"),
|
|
| 730 |
- array("categories","Categories","","2","1","0","A"),
|
|
| 731 |
- array("custpages","Custom Pages","","1","4","0","A"),
|
|
| 732 |
- array("validate","Validate Submission","","3","0","1","A"),
|
|
| 733 |
- array("yesletter","Validation Letter","","3","0","1","A"),
|
|
| 734 |
- array("noletter","Rejection Letter","","3","0","1","A"),
|
|
| 735 |
- array("links","Page Links","","1","5","0","A"),
|
|
| 736 |
- array("messages","Message Settings","","2","0","1","A"),
|
|
| 737 |
- array("login","Login","","0","0","1","U"),
|
|
| 738 |
- array("logout","Logout","","1","5","0","U"),
|
|
| 739 |
- array("revreceived","Reviews Received","","1","0","1","U"),
|
|
| 740 |
- array("editprefs","Edit Preferences","","1","2","0","U"),
|
|
| 741 |
- array("lostpassword","Lost Password","","0","0","1","U"),
|
|
| 742 |
- array("editbio","Edit Bio","","1","1","0","U"),
|
|
| 743 |
- array("register","Register","","0","0","1","U"),
|
|
| 744 |
- array("manageimages","Manage Images","","1","5","0","S"),
|
|
| 745 |
- array("manfavs","Manage Favorites","","1","4","0","U"),
|
|
| 746 |
- array("revres","Review Response","","1","0","1","U"),
|
|
| 747 |
- array("stats","View Your Statistics","","1","3","0","U"),
|
|
| 748 |
- array("newstory","Add New Story","stories.php?action=newstory","1","1","0","S"),
|
|
| 749 |
- array("newseries","Add New Series","series.php?action=add","1","3","0","S"),
|
|
| 750 |
- array("managestories","Manage Stories","stories.php?action=viewstories","1","2","0","S"),
|
|
| 751 |
- array("manageseries","Manage Series","series.php?action=manage","1","4","0","S"),
|
|
| 752 |
- array("reviewsby","Your Reviews","","1","0","1","U"),
|
|
| 753 |
- array("storiesby","Stories by {author}","","0","1","0","P"),
|
|
| 754 |
- array("seriesby","Series by {author}","","0","2","0","P"),
|
|
| 755 |
- array("reviewsby","Reviews by {author}","","0","3","0","P"),
|
|
| 756 |
- array("categories","Categories","","0","1","0","B"),
|
|
| 757 |
- array("characters","Characters","","0","2","0","B"),
|
|
| 758 |
- array("ratings","Ratings","","0","3","0","B"),
|
|
| 759 |
- array("titles","Titles","","0","5","0","B"),
|
|
| 760 |
- array("class","Classes","","0","0","1","B"),
|
|
| 761 |
- array("recent","Most Recent","","0","0","1","B"),
|
|
| 762 |
- array("featured","Featured Stories","","0","0","1","B"),
|
|
| 763 |
- array("panels","Panels","","1","1","0","A"),
|
|
| 764 |
- array("phpinfo","PHP Info","","1","7","0","A"),
|
|
| 765 |
- array("contact","Contact","","0","0","1","P"),
|
|
| 766 |
- array("series", "Series", "", "0", "4", "0", "B"),
|
|
| 767 |
- array("viewlog", "Action Log", "", "1", "8", "0", "A"),
|
|
| 768 |
- array("shortstories","10 Shortest Stories","toplists/default.php","0","6","0","L"),
|
|
| 769 |
- array("longstories","10 Longest Stories","toplists/default.php","0","5","0","L"),
|
|
| 770 |
- array("largeseries","10 Largest Series","toplists/default.php","0","1","0","L"),
|
|
| 771 |
- array("smallseries","10 Smallest Series","toplists/default.php","0","2","0","L"),
|
|
| 772 |
- array("reviewedseries","10 Most Reviewed Series","toplists/default.php","0","4","0","L"),
|
|
| 773 |
- array("prolificauthors","10 Most Prolific Authors","toplists/default.php","0","10","0","L"),
|
|
| 774 |
- array("prolificreviewers","10 Most Prolific Reviewers","toplists/default.php","0","12","0","L"),
|
|
| 775 |
- array("reviewedstories","10 Most Reviewed Stories","toplists/default.php","0","8","0","L"),
|
|
| 776 |
- array("readstories","10 Most Read Stories","toplists/default.php","0","9","0","L"),
|
|
| 777 |
- array("favstories","10 Most Favorite Stories","toplists/default.php","0","7","0","L"),
|
|
| 778 |
- array("favauthors","10 Most Favorite Authors","toplists/default.php","0","11","0","L"),
|
|
| 779 |
- array("favseries","10 Most Favorite Series","toplists/default.php","0","3","0","L"),
|
|
| 780 |
- array("favst","Favorite Stories","","0","0","1","F"),
|
|
| 781 |
- array("favse","Favorite Series","","0","0","1","F"),
|
|
| 782 |
- array("favau","Favorite Authors","","0","0","1","F"),
|
|
| 783 |
- array("favst","Favorite Stories","","0","0","1","U"),
|
|
| 784 |
- array("favse","Favorite Series","","0","0","1","U"),
|
|
| 785 |
- array("favau","Favorite Authors","","0","0","1","U"),
|
|
| 786 |
- array("favlist","{author}\'s Favorites","viewuser.php?action=manfavs","0","5","0","F"),
|
|
| 787 |
- array("skins", "Skins", "", "3", "6", "0", "A"),
|
|
| 788 |
- array("authorfields", "Profile Information", "", "1", "9", "0", "A"),
|
|
| 789 |
- array("maintenance", "Archive Maintenance", "", "1", "10", "0", "A"),
|
|
| 790 |
- array("manual", "Admin Manual", "", "3", "6", "0", "A"),
|
|
| 791 |
- array('modules', 'Modules', '', 1, "11", 0, 'A')
|
|
| 792 |
- ); |
|
| 793 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Panel</th><th>Result</th></tr>"; |
|
| 794 |
- foreach($panellist as $panel) {
|
|
| 795 |
- unset($panels); |
|
| 796 |
- $panels = dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type`) VALUES ('".$panel[0]."', '".$panel[1]."', '".$panel[2]."', '".$panel[3]."', '".$panel[4]."', '".$panel[5]."', '".$panel[6]."');");
|
|
| 797 |
- $output .= "<tr><td>".stripslashes($panel[1])."</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 798 |
- } |
|
| 799 |
- $output .= "</table>"; |
|
| 800 |
- $output .= write_message(_PANELAUTOFAIL."<br /> <a href='upgrade20.php?step=6'>"._CONTINUE."</a>"); |
|
| 801 |
- } |
|
| 802 |
- else {
|
|
| 803 |
- $output .= write_message(_PANELMANUAL."<br /> <a href='upgrade20.php?step=6'>"._CONTINUE."</a>"); |
|
| 804 |
- } |
|
| 805 |
- } |
|
| 806 |
- else $output .= write_message(_PANELDATAINFO." "._PANELSETUP." <a href='upgrade20.php?step=5&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade20.php?step=5&install=manual'>"._MANUAL2."</a>"); |
|
| 807 |
- break; |
|
| 808 |
- case "4": |
|
| 809 |
- $output .= "<div id='pagetitle'>"._INSTALLTABLES."</div>"; |
|
| 810 |
- if(isset($_GET['install'])) {
|
|
| 811 |
- if($_GET['install'] == "automatic") {
|
|
| 812 |
- |
|
| 813 |
- |
|
| 814 |
- |
|
| 815 |
- $output .= "<table class='tblborder' style='margin: 1em auto; padding: 1em;' cellpadding='5'><tr><th>Table</th><th>Result</th></tr>"; |
|
| 816 |
- $authorfields = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_authorfields` (
|
|
| 817 |
- `field_id` int(11) NOT NULL AUTO_INCREMENT, |
|
| 818 |
- `field_type` tinyint(4) NOT NULL default '0', |
|
| 819 |
- `field_name` varchar(30) NOT NULL default ' ', |
|
| 820 |
- `field_title` varchar(255) NOT NULL default ' ', |
|
| 821 |
- `field_options` text, |
|
| 822 |
- `field_code_in` text, |
|
| 823 |
- `field_code_out` text, |
|
| 824 |
- `field_on` tinyint(1) NOT NULL default '0', |
|
| 825 |
- PRIMARY KEY (`field_id`) |
|
| 826 |
-) ENGINE=MyISAM;"); |
|
| 827 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_authorfields</td><td align='center'>" . ($authorfields ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 828 |
- $authorinfo = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_authorinfo` (
|
|
| 829 |
- `uid` int(11) NOT NULL default '0', |
|
| 830 |
- `field` int(11) NOT NULL default '0', |
|
| 831 |
- `info` varchar(255) NOT NULL default ' ', |
|
| 832 |
- PRIMARY KEY (`uid`,`field`), |
|
| 833 |
- KEY `uid` (`uid`)) ENGINE=MyISAM;"); |
|
| 834 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_authorinfo</td><td align='center'>" . ($authorinfo ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 835 |
- $authorprefs = dbquery("
|
|
| 836 |
-CREATE TABLE `".TABLEPREFIX."fanfiction_authorprefs` ( |
|
| 837 |
- `uid` int(11) NOT NULL default '0', |
|
| 838 |
- `newreviews` tinyint(1) NOT NULL default '0', |
|
| 839 |
- `newrespond` tinyint(1) NOT NULL default '0', |
|
| 840 |
- `ageconsent` tinyint(1) NOT NULL default '0', |
|
| 841 |
- `alertson` tinyint(1) NOT NULL default '0', |
|
| 842 |
- `tinyMCE` tinyint(1) NOT NULL default '0', |
|
| 843 |
- `sortby` tinyint(1) NOT NULL default '0', |
|
| 844 |
- `storyindex` tinyint(1) NOT NULL default '0', |
|
| 845 |
- `validated` tinyint(1) NOT NULL default '0', |
|
| 846 |
- `userskin` varchar(60) NOT NULL default 'default', |
|
| 847 |
- `level` tinyint(1) NOT NULL default '0', |
|
| 848 |
- `categories` varchar(200) NOT NULL default '0', |
|
| 849 |
- `contact` tinyint(1) NOT NULL default '0', |
|
| 850 |
- `stories` int(11) NOT NULL default '0', |
|
| 851 |
- PRIMARY KEY (`uid`) |
|
| 852 |
-) ENGINE=MyISAM;"); |
|
| 853 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_authorprefs</td><td align='center'>" . ($authorprefs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 854 |
- $blocks = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_blocks` (
|
|
| 855 |
- `block_id` int(11) NOT NULL auto_increment, |
|
| 856 |
- `block_name` varchar(30) NOT NULL default '', |
|
| 857 |
- `block_title` varchar(150) NOT NULL default '', |
|
| 858 |
- `block_file` varchar(200) NOT NULL default '', |
|
| 859 |
- `block_status` tinyint(1) NOT NULL default '0', |
|
| 860 |
- `block_variables` text NOT NULL, |
|
| 861 |
- PRIMARY KEY (`block_id`), |
|
| 862 |
- KEY `block_name` (`block_name`) |
|
| 863 |
-) ENGINE=MyISAM;"); |
|
| 864 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_blocks</td><td align='center'>" . ($blocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 865 |
- $classes = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_classes` (
|
|
| 866 |
- `class_id` int(11) NOT NULL auto_increment, |
|
| 867 |
- `class_type` int(11) NOT NULL default '0', |
|
| 868 |
- `class_name` varchar(100) NOT NULL default '', |
|
| 869 |
- PRIMARY KEY (`class_id`), |
|
| 870 |
- KEY `byname` (`class_type`,`class_name`,`class_id`) |
|
| 871 |
-) ENGINE=MyISAM;"); |
|
| 872 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_classes</td><td align='center'>" . ($classes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 873 |
- $classtypes = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_classtypes` (
|
|
| 874 |
- `classtype_id` int(11) NOT NULL auto_increment, |
|
| 875 |
- `classtype_name` varchar(50) NOT NULL default '', |
|
| 876 |
- `classtype_title` varchar(50) NOT NULL default '', |
|
| 877 |
- PRIMARY KEY (`classtype_id`), |
|
| 878 |
- UNIQUE KEY `classtype_name` (`classtype_name`) |
|
| 879 |
-) ENGINE=MyISAM;"); |
|
| 880 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_classtypes</td><td align='center'>" . ($classtypes ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 881 |
-$coauthors = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_coauthors` (
|
|
| 882 |
- `sid` int(11) NOT NULL default '0', |
|
| 883 |
- `uid` int(11) NOT NULL default '0', |
|
| 884 |
- PRIMARY KEY (`sid`,`uid`) |
|
| 885 |
-) ENGINE=MyISAM;"); |
|
| 886 |
-$output .= "<tr><td>".$tableprefix."fanfiction_coauthors</td><td align='center'>" . ($coauthors ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 887 |
- $codeblocks = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_codeblocks` (
|
|
| 888 |
- `code_id` int(11) NOT NULL auto_increment, |
|
| 889 |
- `code_text` text NOT NULL, |
|
| 890 |
- `code_type` varchar(20) default NULL, |
|
| 891 |
- `code_module` varchar(60) default NULL, |
|
| 892 |
- PRIMARY KEY (`code_id`), |
|
| 893 |
- KEY `code_type` (`code_type`) |
|
| 894 |
-) ENGINE=MyISAM;"); |
|
| 895 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_codeblocks</td><td align='center'>" . ($codeblocks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 896 |
- $favorites = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_favorites` (
|
|
| 897 |
- `uid` int(11) NOT NULL default '0', |
|
| 898 |
- `item` int(11) NOT NULL default '0', |
|
| 899 |
- `type` char(2) NOT NULL default '', |
|
| 900 |
- `comments` text NOT NULL, |
|
| 901 |
- UNIQUE KEY `byitem` (`item`,`type`,`uid`), |
|
| 902 |
- UNIQUE KEY `byuid` (`uid`,`type`,`item`) |
|
| 903 |
-) ENGINE=MyISAM;"); |
|
| 904 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_favorites</td><td align='center'>" . ($favorites ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 905 |
- $logs = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_log` (
|
|
| 906 |
- `log_id` int(11) NOT NULL auto_increment, |
|
| 907 |
- `log_action` varchar(255) default NULL, |
|
| 908 |
- `log_uid` int(11) NOT NULL, |
|
| 909 |
- `log_ip` int(11) UNSIGNED default NULL, |
|
| 910 |
- `log_timestamp` timestamp NOT NULL, |
|
| 911 |
- `log_type` varchar(2) NOT NULL, |
|
| 912 |
- PRIMARY KEY (`log_id`) |
|
| 913 |
-) ENGINE=MyISAM"); |
|
| 914 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_log</td><td align='center'>" . ($logs ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 915 |
- $messages = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_messages` (
|
|
| 916 |
- `message_id` int(11) NOT NULL auto_increment, |
|
| 917 |
- `message_name` varchar(50) NOT NULL default '', |
|
| 918 |
- `message_title` varchar(200) NOT NULL default '', |
|
| 919 |
- `message_text` text NOT NULL, |
|
| 920 |
- PRIMARY KEY (`message_id`), |
|
| 921 |
- KEY `message_name` (`message_name`) |
|
| 922 |
-) ENGINE=MyISAM;"); |
|
| 923 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_messages</td><td align='center'>" . ($messages ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 924 |
- $modules = dbquery("
|
|
| 925 |
-CREATE TABLE `".TABLEPREFIX."fanfiction_modules` ( |
|
| 926 |
- `id` int(11) NOT NULL auto_increment, |
|
| 927 |
- `name` varchar(100) NOT NULL default 'Test Module', |
|
| 928 |
- `version` varchar(10) NOT NULL default '1.0', |
|
| 929 |
- PRIMARY KEY (`id`), |
|
| 930 |
- KEY `name_version` (`name`,`version`) |
|
| 931 |
-)"); |
|
| 932 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_modules</td><td align='center'>" . ($modules ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 933 |
- $pagelinks = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_pagelinks` (
|
|
| 934 |
- `link_id` int(11) NOT NULL auto_increment, |
|
| 935 |
- `link_name` varchar(50) NOT NULL default '', |
|
| 936 |
- `link_text` varchar(100) NOT NULL default '', |
|
| 937 |
- `link_key` CHAR( 1 ) NULL, |
|
| 938 |
- `link_url` varchar(250) NOT NULL default '', |
|
| 939 |
- `link_target` char(1) NOT NULL default '0', |
|
| 940 |
- `link_access` tinyint(4) NOT NULL default '0', |
|
| 941 |
- PRIMARY KEY (`link_id`), |
|
| 942 |
- KEY `link_name` (`link_name`) |
|
| 943 |
-) ENGINE=MyISAM;"); |
|
| 944 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_pagelinks</td><td align='center'>" . ($pagelinks ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 945 |
- $panels = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_panels` (
|
|
| 946 |
- `panel_id` int(11) NOT NULL auto_increment, |
|
| 947 |
- `panel_name` varchar(50) NOT NULL default 'unknown', |
|
| 948 |
- `panel_title` varchar(100) NOT NULL default 'Unnamed Panel', |
|
| 949 |
- `panel_url` varchar(100) default NULL, |
|
| 950 |
- `panel_level` tinyint(4) NOT NULL default '3', |
|
| 951 |
- `panel_order` tinyint(4) NOT NULL default '0', |
|
| 952 |
- `panel_hidden` tinyint(1) NOT NULL default '0', |
|
| 953 |
- `panel_type` varchar(20) NOT NULL default 'A', |
|
| 954 |
- PRIMARY KEY (`panel_id`), |
|
| 955 |
- KEY `panel_type` (`panel_type`,`panel_name`) |
|
| 956 |
-) ENGINE=MyISAM;"); |
|
| 957 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_panels</td><td align='center'>" . ($panels ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 958 |
- $stats = dbquery("CREATE TABLE `".TABLEPREFIX."fanfiction_stats` (
|
|
| 959 |
- `sitekey` varchar(50) NOT NULL default '0', |
|
| 960 |
- `stories` int(11) NOT NULL default '0', |
|
| 961 |
- `chapters` int(11) NOT NULL default '0', |
|
| 962 |
- `series` int(11) NOT NULL default '0', |
|
| 963 |
- `reviews` int(11) NOT NULL default '0', |
|
| 964 |
- `wordcount` int(11) NOT NULL default '0', |
|
| 965 |
- `authors` int(11) NOT NULL default '0', |
|
| 966 |
- `members` int(11) NOT NULL default '0', |
|
| 967 |
- `reviewers` int(11) NOT NULL default '0', |
|
| 968 |
- `newestmember` int(11) NOT NULL default '0' |
|
| 969 |
-) ENGINE=MyISAM"); |
|
| 970 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_stats(`sitekey`, `newestmember`) VALUES('".SITEKEY."', '1')");
|
|
| 971 |
-$output .= "<tr><td>".TABLEPREFIX."fanfiction_stats</td><td align='center'>" . ($stats ? "<img src=\"../images/check.gif\">" : "<img src=\"../images/X.gif\">") ."</td></tr>"; |
|
| 972 |
-$output .= "</table>"; |
|
| 973 |
-$output .= write_message(_NEWTABLEAUTOFAIL."<br /> <a href='upgrade20.php?step=5'>"._CONTINUE."</a>"); |
|
| 974 |
- } |
|
| 975 |
- else if($_GET['install'] == "manual") {
|
|
| 976 |
- $output .= write_message(_NEWTABLESSETUP."<br /> <a href='upgrade20.php?step=5'>"._CONTINUE."</a>"); |
|
| 977 |
- } |
|
| 978 |
- } |
|
| 979 |
- else {
|
|
| 980 |
- |
|
| 981 |
- $output .= write_message(_NEWTABLESSETUP." <a href='upgrade20.php?step=4&install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade20.php?step=4&install=manual'>"._MANUAL2."</a>"); |
|
| 982 |
- } |
|
| 983 |
- break; |
|
| 984 |
- case "3": |
|
| 985 |
- if(!$_GET['sect']) $sect = "main"; |
|
| 986 |
- else $sect = $_GET['sect']; |
|
| 987 |
- $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
|
|
| 988 |
- if(dbnumrows($settingsresults) == 0) {
|
|
| 989 |
- dbquery("INSERT INTO ".$settingsprefix."fanfiction_settings (`sitekey`) VALUES('".$sitekey."');");
|
|
| 990 |
- $settingsresults = dbquery("SELECT * FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
|
|
| 991 |
- } |
|
| 992 |
- $settings = dbassoc($settingsresults); |
|
| 993 |
- foreach($settings as $var => $val) {
|
|
| 994 |
- $$var = stripslashes($val); |
|
| 995 |
- } |
|
| 996 |
- define("SITEKEY", $sitekey);
|
|
| 997 |
- define("TABLEPREFIX", $tableprefix);
|
|
| 998 |
- define("STORIESPATH", $settings['storiespath']);
|
|
| 999 |
- if($sect == "submissions") {
|
|
| 1000 |
- if($_POST['submit']) {
|
|
| 1001 |
- $storiespath = descript($_POST['newstoriespath']); |
|
| 1002 |
- if(!file_exists($storiespath) && !file_exists("../".$storiespath)) {
|
|
| 1003 |
- if(!strrchr($storiespath, "/") && !strrchr($storiespath, "\\")) $storiespath = "../$storiespath"; |
|
| 1004 |
- @mkdir("$storiespath", 0755);
|
|
| 1005 |
- @chmod("$storiespath", 0777);
|
|
| 1006 |
- } |
|
| 1007 |
- } |
|
| 1008 |
- } |
|
| 1009 |
- if($sect == "main" && !isset($_POST['submit'])) $output .= write_message(_SKINWARNING); |
|
| 1010 |
- if($sect == "email" && $_POST['submit']) {
|
|
| 1011 |
- $output .= "<div id=\"pagetitle\">"._SETTINGS."</div>"; |
|
| 1012 |
- $smtp_host = $_POST['newsmtp_host']; |
|
| 1013 |
- $smtp_username = $_POST['newsmtp_username']; |
|
| 1014 |
- $smtp_password = $_POST['newsmtp_password']; |
|
| 1015 |
- $result = dbquery("UPDATE ".$settingsprefix."fanfiction_settings SET smtp_host = '$smtp_host', smtp_username = '$smtp_username', smtp_password = '$smtp_password' WHERE sitekey = '".SITEKEY."'");
|
|
| 1016 |
- if($result) {
|
|
| 1017 |
- $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 1018 |
- $output .= write_message("<a href='upgrade20.php?step=4'>"._CONTINUE."</a>");
|
|
| 1019 |
- } |
|
| 1020 |
- else include("../admin/settings.php");
|
|
| 1021 |
- } |
|
| 1022 |
- else include("../admin/settings.php");
|
|
| 1023 |
- break; |
|
| 1024 |
- case "2": |
|
| 1025 |
- $output .= "<div id='pagetitle'>"._CONFIGDATA."</div>"; |
|
| 1026 |
- |
|
| 1027 |
- if(isset($_POST['sitekey'])) {
|
|
| 1028 |
- include("../naughtywords.php");
|
|
| 1029 |
- // relative path |
|
| 1030 |
- if(file_exists("../".$databasepath."/dbconfig.php")) include("../".$databasepath."/dbconfig.php");
|
|
| 1031 |
- // absolute path |
|
| 1032 |
- else if(file_exists($databasepath."/dbconfig.php")) include($databasepath."/dbconfig.php"); |
|
| 1033 |
- include_once("../includes/dbfunctions.php");
|
|
| 1034 |
- $dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname ); |
|
| 1035 |
- $sitekey = !empty($_POST['sitekey']) ? descript($_POST['sitekey']) : random_string($randomcharset, 10); |
|
| 1036 |
- $settingsprefix = descript($_POST['settingsprefix']); |
|
| 1037 |
- $sitesettings = dbquery("INSERT INTO ".$settingsprefix."fanfiction_settings(
|
|
| 1038 |
- `sitekey`, `sitename`, `slogan`, `url`, `siteemail`, `tableprefix`, `skin`, `language`, |
|
| 1039 |
- `submissionsoff`, `storiespath`, `store`, `autovalidate`, `maxwords`, `minwords`, |
|
| 1040 |
- `imageupload`, `imageheight`, `imagewidth`, `roundrobins`, `tinyMCE`, `allowed_tags`, |
|
| 1041 |
- `favorites`, `multiplecats`, `newscomments`, `recentdays`, `displaycolumns`, |
|
| 1042 |
- `itemsperpage`, `displayindex`, `defaultsort`, `reviewsallowed`, `ratings`, |
|
| 1043 |
- `anonreviews`, `revdelete`, `rateonly`, `pwdsetting`, `alertson`, `disablepopups`, |
|
| 1044 |
- `agestatement`, `words`, `smtp_host`, `smtp_username`, `smtp_password`) VALUES( |
|
| 1045 |
- '".$sitekey."', '".addslashes(stripslashes($sitename))."', '".addslashes(stripslashes($slogan))."', '".addslashes($url)."', '".addslashes($siteemail)."', |
|
| 1046 |
- '$tableprefix', '$skin', '$language', $submissionsoff, '".addslashes($storiespath)."', '$store', $autovalidate, |
|
| 1047 |
- ".($maxwords ? $maxwords : 0).", ".($minwords ? $minwords : 0).", $imageupload, ".($imageheight ? $imageheight : 0).", |
|
| 1048 |
- ".($imagewidth ? $imagewidth : 0).", $roundrobins, $tinyMCE, '".addslashes($allowed_tags)."', |
|
| 1049 |
- $favorites, ".($numcats == 1 ? 0 : 1).", $newscomments, ".($recentdays ? $recentdays : 0).", ".($columns ? $columns : 1).", |
|
| 1050 |
- ".($itemsperpage > 0 ? $itemsperpage : 10).", ".($displayindex ? 1 : 0)." , ".($defaultsort ? 1 : 0).", |
|
| 1051 |
- ".($reviewsallowed ? 1 : 0).", ".($ratings ? $ratings : 0).", |
|
| 1052 |
- ".($anonreviews ? 1 : 0).", ".($revdelete ? 1 : 0).", ".($rateonly ? 1 : 0).", |
|
| 1053 |
- ".($pwdsetting ? 1 : 0).", ".($alertson ? 1 : 0).", ".($disablePopups ? 1 : 0).", |
|
| 1054 |
- ".($agestatement ? 1 : 0).", '".implode(",", $words)."', '".addslashes($smtp_host)."',
|
|
| 1055 |
- '".addslashes($smtp_username)."', '".addslashes($smtp_password)."');"); |
|
| 1056 |
- if($sitesettings) $output .= write_message("<img src=\"../images/check.gif\">"._SITESETTINGSMOVED);
|
|
| 1057 |
- $handle = fopen("../config.php", 'w');
|
|
| 1058 |
- if(!$handle) {
|
|
| 1059 |
- @chmod("../config.php", 0666);
|
|
| 1060 |
- $handle = fopen("../config.php", 'w');
|
|
| 1061 |
- } |
|
| 1062 |
- if ($handle) {
|
|
| 1063 |
- $text = "<?php |
|
| 1064 |
-\$dbhost = \"$dbhost\"; |
|
| 1065 |
-\$dbname = \"$dbname\"; |
|
| 1066 |
-\$dbuser= \"$dbuser\"; |
|
| 1067 |
-\$dbpass = \"$dbpass\"; |
|
| 1068 |
-\$sitekey = \"$sitekey\"; |
|
| 1069 |
-\$settingsprefix = \"$settingsprefix\"; |
|
| 1070 |
- |
|
| 1071 |
-include_once(\"includes/dbfunctions.php\"); |
|
| 1072 |
-if(!empty(\$sitekey)) \$dbconnect = dbconnect(\$dbhost, \$dbuser,\$dbpass, \$dbname); |
|
| 1073 |
- |
|
| 1074 |
-?>"; |
|
| 1075 |
- fwrite($handle, $text); |
|
| 1076 |
- fclose($handle); |
|
| 1077 |
- @chmod("../config.php", 0644);
|
|
| 1078 |
- $output .= write_message("<img src=\"../images/check.gif\">"._CONFIG_WRITTEN."<br /><a href='upgrade20.php?step=3'>"._CONTINUE."</a>");
|
|
| 1079 |
- } |
|
| 1080 |
- else $output .= write_message(_ERROR_CONFIGWRITE); |
|
| 1081 |
- } |
|
| 1082 |
- else {
|
|
| 1083 |
- $output .= |
|
| 1084 |
- "<form method='POST' enctype='multipart/form-data' action='upgrade20.php?step=2' class='tblborder' style='width: 325px; margin: 1em auto;'> |
|
| 1085 |
- <label for='sitekey'>"._SITEKEY."</label><input type='text' name='sitekey' value='".random_string($randomcharset, 10)."' id='sitekey'><br /> |
|
| 1086 |
- <input type='hidden' name='settingsprefix' value='".$_GET['settingsprefix']."'> |
|
| 1087 |
- <div style='text-align: center; margin: 1em;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div> |
|
| 1088 |
- </form>"; |
|
| 1089 |
- $output .= write_message(_HELP_SITEKEY." "._SITEKEYNOTE); |
|
| 1090 |
- } |
|
| 1091 |
- break; |
|
| 1092 |
- default: |
|
| 1093 |
- $output .= "<div id='pagetitle'>"._SETTINGSTABLE."</div>"; |
|
| 1094 |
- |
|
| 1095 |
- if(isset($_POST['submit'])) {
|
|
| 1096 |
- // relative path |
|
| 1097 |
- if(file_exists("../".$databasepath."/dbconfig.php")) include("../".$databasepath."/dbconfig.php");
|
|
| 1098 |
- // absolute path |
|
| 1099 |
- else if(file_exists($databasepath."/dbconfig.php")) include($databasepath."/dbconfig.php"); |
|
| 1100 |
- include("../includes/dbfunctions.php");
|
|
| 1101 |
- $dbconnect = dbconnect($dbhost, $dbuser, $dbpass, $dbname ); |
|
| 1102 |
- $set1 = dbquery("DROP TABLE IF EXISTS ".$_POST['settingsprefix']."fanfiction_settings");
|
|
| 1103 |
- $settings = dbquery("CREATE TABLE `".$_POST['settingsprefix']."fanfiction_settings` (
|
|
| 1104 |
- `sitekey` varchar(50) NOT NULL default '1', |
|
| 1105 |
- `sitename` varchar(200) NOT NULL default 'Your Site', |
|
| 1106 |
- `slogan` varchar(200) NOT NULL default 'It\'s a cool site!', |
|
| 1107 |
- `url` varchar(200) NOT NULL default 'http://www.yoursite.com', |
|
| 1108 |
- `siteemail` varchar(200) NOT NULL default 'you@yoursite.com', |
|
| 1109 |
- `tableprefix` varchar(50) NOT NULL default '', |
|
| 1110 |
- `skin` varchar(50) NOT NULL default 'default', |
|
| 1111 |
- `hiddenskins` varchar(255) NULL default '', |
|
| 1112 |
- `language` varchar(10) NOT NULL default 'en', |
|
| 1113 |
- `submissionsoff` tinyint(1) NOT NULL default '0', |
|
| 1114 |
- `storiespath` varchar(20) NOT NULL default 'stories', |
|
| 1115 |
- `store` varchar(5) NOT NULL default 'files', |
|
| 1116 |
- `autovalidate` tinyint(1) NOT NULL default '0', |
|
| 1117 |
- `coauthallowed` int(1) NOT NULL default '0', |
|
| 1118 |
- `maxwords` int(11) NOT NULL default '0', |
|
| 1119 |
- `minwords` int(11) NOT NULL default '0', |
|
| 1120 |
- `imageupload` tinyint(1) NOT NULL default '0', |
|
| 1121 |
- `imageheight` int(11) NOT NULL default '200', |
|
| 1122 |
- `imagewidth` int(11) NOT NULL default '200', |
|
| 1123 |
- `roundrobins` tinyint(1) NOT NULL default '0', |
|
| 1124 |
- `allowseries` TINYINT NOT NULL DEFAULT '2', |
|
| 1125 |
- `tinyMCE` tinyint(1) NOT NULL default '0', |
|
| 1126 |
- `allowed_tags` varchar(200) NOT NULL default '<b><i><u><center><hr><p><br /><br><blockquote><ol><ul><li><img><strong><em>', |
|
| 1127 |
- `favorites` tinyint(1) NOT NULL default '0', |
|
| 1128 |
- `multiplecats` tinyint(1) NOT NULL default '0', |
|
| 1129 |
- `newscomments` tinyint(1) NOT NULL default '0', |
|
| 1130 |
- `logging` tinyint(1) NOT NULL default '0', |
|
| 1131 |
- `maintenance` tinyint(1) NOT NULL default '0', |
|
| 1132 |
- `debug` tinyint(1) NOT NULL default '0', |
|
| 1133 |
- `captcha` tinyint(1) NOT NULL default '0', |
|
| 1134 |
- `dateformat` varchar(20) NOT NULL default 'd/m/y', |
|
| 1135 |
- `timeformat` varchar(20) NOT NULL default '- h:i a', |
|
| 1136 |
- `recentdays` tinyint(2) NOT NULL default '7', |
|
| 1137 |
- `displaycolumns` tinyint(1) NOT NULL default '1', |
|
| 1138 |
- `itemsperpage` tinyint(2) NOT NULL default '25', |
|
| 1139 |
- `extendcats` tinyint(1) NOT NULL default '0', |
|
| 1140 |
- `displayindex` tinyint(1) NOT NULL default '0', |
|
| 1141 |
- `defaultsort` tinyint(1) NOT NULL default '0', |
|
| 1142 |
- `displayprofile` tinyint(1) NOT NULL default '0', |
|
| 1143 |
- `linkstyle` tinyint(1) NOT NULL default '0', |
|
| 1144 |
- `linkrange` tinyint(2) NOT NULL default '5', |
|
| 1145 |
- `reviewsallowed` tinyint(1) NOT NULL default '0', |
|
| 1146 |
- `ratings` tinyint(1) NOT NULL default '0', |
|
| 1147 |
- `anonreviews` tinyint(1) NOT NULL default '0', |
|
| 1148 |
- `revdelete` tinyint(1) NOT NULL default '0', |
|
| 1149 |
- `rateonly` tinyint(1) NOT NULL default '0', |
|
| 1150 |
- `pwdsetting` tinyint(1) NOT NULL default '0', |
|
| 1151 |
- `alertson` tinyint(1) NOT NULL default '0', |
|
| 1152 |
- `disablepopups` tinyint(1) NOT NULL default '0', |
|
| 1153 |
- `agestatement` tinyint(1) NOT NULL default '0', |
|
| 1154 |
- `words` text, |
|
| 1155 |
- `version` varchar(10) NOT NULL default '$version', |
|
| 1156 |
- `smtp_host` varchar(200) default NULL, |
|
| 1157 |
- `smtp_username` varchar(50) default NULL, |
|
| 1158 |
- `smtp_password` varchar(50) default NULL, |
|
| 1159 |
- PRIMARY KEY (`sitekey`) |
|
| 1160 |
-) ENGINE=MyISAM;"); |
|
| 1161 |
-if($settings) $output .= write_message("<img src=\"../images/check.gif\"> "._SETTINGSTABLESUCCESS." <br /><a href='upgrade20.php?step=2&settingsprefix=".$_POST['settingsprefix']."'>"._CONTINUE."</a>");
|
|
| 1162 |
-else $output .= write_message(_SETTINGSTABLEAUTOFAIL." <br /><a href='upgrade20.php?step=2&settingsprefix=".$_POST['settingsprefix']."'>"._CONTINUE."</a> "); |
|
| 1163 |
- } |
|
| 1164 |
- else {
|
|
| 1165 |
- $install = isset($_GET['install']) ? $_GET['install'] : false; |
|
| 1166 |
- if($install == "manual") {
|
|
| 1167 |
- $output .= write_message(_SETTINGSTABLEMANUALUP."<br /><a href='upgrade20.php?step=2'>"._CONTINUE."</a>"); |
|
| 1168 |
- } |
|
| 1169 |
- else if($install == "automatic") {
|
|
| 1170 |
- $output .= |
|
| 1171 |
- "<form method='POST' enctype='multipart/form-data' action='upgrade20.php?step=1' class='tblborder' style='width: 325px; margin: 1em auto;'> |
|
| 1172 |
- <label for='settingsprefix'>"._SETTINGSPREFIX."</label><input type='text' name='settingsprefix' id='settingsprefix' value='".$tableprefix."'><br /> |
|
| 1173 |
- <div style='text-align: center; margin: 1em;'><INPUT type=\"submit\"class=\"button\" name=\"submit\" value=\"submit\"></div> |
|
| 1174 |
- </form>"; |
|
| 1175 |
- $output .= write_message(_SETTINGSTABLENOTE); |
|
| 1176 |
- } |
|
| 1177 |
- else {
|
|
| 1178 |
- $output .= write_message(_SETTINGSTABLESETUP." <a href='upgrade20.php?install=automatic'>"._AUTO."</a> "._OR." <a href='upgrade20.php?install=manual'>"._MANUAL2."</a>"); |
|
| 1179 |
- } |
|
| 1180 |
- } |
|
| 1181 |
-} |
|
| 1182 |
-$tpl->assign("output", $output);
|
|
| 1183 |
- |
|
| 1184 |
-$tpl->printToScreen(); |
|
| 1185 |
-dbclose( ); |
|
| 1186 |
-?> |
|
| 1187 | 0 |
\ No newline at end of file |