bridges removed
--- a/README.md
+++ b/README.md
@@ -27,11 +27,20 @@
news.php
user.php
search.php
+contact.php
### user.php
rename to member.php for efiction
Note: e107 clears sessions, so class2.php has to be loaded after get_session_vars.php
+
+### search.php
+
+### news.php
+
+### index.php
+
+### contact.php
--- a/bridges/SMF/README.txt
+++ /dev/null
@@ -1,38 +1,1 @@
-This folder contains the files to replace in your eFiction install to bridge it with
-an installation of SMF. These files will let you use your SMF members
-table as the authors table for eFiction. This bridge assumes your SMF intall
-and your eFiction install share the same database.
-Move the following files to the user/ folder in your eFiction install:
-
-editbio.php
-login.php
-profile.php
-register.php
-logout.php
-
-Move the following files to the includes/ folder in your eFiction install:
-
-get_session_vars.php
-queries.php
-
-Move the en_SMF.php file to the languages/ folder in your eFiction install.
-
-Edit queries.php to point to your SMF tables and directory.
-
-Goto Admin->Page Links and edit your Register and Lost Password links to point to your
-SMF pages.
-
-Register -> PATHTOSMF/index.php?action=register
-Lost Password -> PATHTOSMF/index.php?action=reminder
-
-If eFiction is a sub-folder under SMF PATHTOSMF will be ../
-If they are siblings the path will be ../SMFFOLDER/ where SMFFOLDER is tha name of SMF's folder.
-If SMF is a subfolder if eFiction PATHTOSMF will be SMFFOLDER/ where SMFFOLDER is tha name of SMF's folder.
-
-Move QueryString.php to the Sources folder of your SMF installation. Note this is the QueryString.php
-from version 1.1.2 of SMF.
-
-
-
-
--- a/bridges/SMF/blocks/info/admin.php
+++ /dev/null
@@ -1,35 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-global $language;
-$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'info'");
-while($block = dbassoc($blockquery)) {
- $blocks[$block['block_name']] = unserialize($block['block_variables']);
- $blocks[$block['block_name']]['title'] = $block['block_title'];
- $blocks[$block['block_name']]['file'] = $block['block_file'];
- $blocks[$block['block_name']]['status'] = $block['block_status'];
-}
-include("blocks/info/info.php");
-if(file_exists("blocks/info/{$language}.php")) include_once("blocks/info/{$language}.php");
-else include_once("blocks/info/en.php");
- if(isset($_POST['submit'])) {
- $blocks['info']['style'] = !empty($_POST['style']) && isNumber($_POST['style']) ? $_POST['style'] : 0;
- if($_POST['template'] != _NARTEXT) $blocks['info']['template'] = $_POST['template'];
- $output .= "<center>"._ACTIONSUCCESSFUL."</center>";
- save_blocks( $blocks );
- }
- else {
- $style = isset($blocks['info']['style']) ? $blocks['info']['style'] : 0;
- if(empty($blocks['info']['template']) && $style == 1) $template = _NARTEXT;
- else if($style == 1) $template = $blocks['info']['template'];
- else $template = "";
- $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 />";
- $output .= "<form method='POST' enctype='multipart/form-data' name='blockadmin' action='admin.php?action=blocks&admin=info'>
- <label for='template'>"._TEMPLATE.":</label><br /><textarea name='template' rows='5' cols='50' style='width: 100%;'>$template</textarea>";
- 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>";
- $output .= "<label for='style'>"._DISPLAY.": </label><select name='style'class='textbox' ><option value='0'".(!$style ? " selected" : "").">"._CHART."</option>
- <option value='1'".($style == 1 ? " selected" : "").">"._NARRATIVE."</option>
- <option value='2'".($style == 2 ? " selected" : "").">"._VARIABLES."</option></select><br />
- <INPUT type='submit' class='button' name='submit' value='"._SUBMIT."'></form></div>";
- }
-?>
--- a/bridges/SMF/blocks/info/en.php
+++ /dev/null
@@ -1,41 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-define("_CHART", "Chart");
-define("_NARRATIVE", "Narrative");
-define("_LOGGEDINAS", "You are currently logged in as");
-define("_VARIABLES", "Variables");
-define("_DISPLAY", "Style of Display");
-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}");
-define("_NEWESTMEMBER", "Newest Member");
-define("_REVIEWERS", "Reviewers");
-define("_POSTS", "Forum Posts");
-define("_BOARDS", "Forum Boards");
-define("_TOPICS", "Forum Topics");
-define("_FORUMCATS", "Forum Categories");
-?>
--- a/bridges/SMF/blocks/info/index.php
+++ /dev/null
--- a/bridges/SMF/blocks/info/info.php
+++ /dev/null
@@ -1,75 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-if(file_exists(_BASEDIR."blocks/info/{$language}.php")) include_once(_BASEDIR."blocks/info/{$language}.php");
-else include_once(_BASEDIR."blocks/info/en.php");
- global $noskin, $tpl;
-
- if(_AUTHORTABLE != TABLEPREFIX."fanfiction_authors") {
- list($members) = dbrow(dbquery("SELECT COUNT("._UIDFIELD.") as members FROM "._AUTHORTABLE));
- list($newest) = dbrow(dbquery("SELECT "._UIDFIELD." as uid FROM "._AUTHORTABLE." ORDER BY "._UIDFIELD." DESC LIMIT 1"));
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET members = $members, newestmember = '$newest' WHERE sitekey = '".SITEKEY."' LIMIT 1");
- }
- $stats = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_stats WHERE sitekey = '".SITEKEY."' LIMIT 1"));
- list($newmember) = dbrow(dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '".$stats['newestmember']."' LIMIT 1"));
- $adminnotices = "";
- if(isADMIN) {
- if(file_exists(_BASEDIR."languages/".$language."_admin.php")) include_once(_BASEDIR."languages/".$language."_admin.php");
- else include_once(_BASEDIR."languages/en_admin.php");
- $countquery = dbquery("SELECT COUNT(DISTINCT chapid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE validated = '0'");
- list($count) = dbrow($countquery);
- if($count) $adminnotices = sprintf(_QUEUECOUNT, $count);
- $codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'adminnotices'");
- while($code = dbassoc($codequery)) {
- eval($code['code_text']);
- }
- }
- $forums = ssi_boardStats("array");
- if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) {
- $tpl->assignGlobal("totalstories", $stats['stories']);
- $tpl->assignGlobal("totalauthors", $stats['authors']);
- $tpl->assignGlobal("totalmembers", $stats['members']);
- $tpl->assignGlobal("totalreviews", $stats['reviews']);
- $tpl->assignGlobal("totalreviewers", $stats['reviewers']);
- $tpl->assignGlobal("totalwords", $stats['wordcount']);
- $tpl->assignGlobal("totalchapters", $stats['chapters']);
- $tpl->assignGlobal("totalseries", $stats['series']);
- $tpl->assignGlobal("totalposts", $forums['posts']);
- $tpl->assignGlobal("totaltopics", $forums['topics']);
- $tpl->assignGlobal("totalboards", $forums['boards']);
- $tpl->assignGlobal("totalforumcategories", $forums['categories']);
- $tpl->assignGlobal("newestmember", "<a href=\"viewuser.php?uid=".$stats['newestmember']."\">$newmember</a>");
- if(isMEMBER) $tpl->assignGlobal("loggedinas", _LOGGEDINAS." ".USERPENNAME.". ".($noskin ? " "._NOSKIN : ""));
- $tpl->assignGlobal("submissions", $adminnotices);
- }
- else {
- if(isMEMBER) $loggedinas = _LOGGEDINAS." ".USERPENNAME.". ".($noskin ? " "._NOSKIN : "");
- else $loggedinas = "";
- if(empty($blocks['info']['style'])) {
- $content = "<div id='infoblock'>
-<div><span class='label'>"._MEMBERS.": </span>".$stats['members']."</div>
-<div><span class='label'>"._SERIES.": </span>".$stats['series']."</div>
-<div><span class='label'>"._STORIES.": </span>".$stats['stories']."</div>
-<div><span class='label'>"._CHAPTERS.": </span>".$stats['chapters']."</div>
-<div><span class='label'>"._WORDCOUNT.": </span>".$stats['wordcount']."</div>
-<div><span class='label'>"._AUTHORS.": </span>".$stats['authors']."</div>
-<div><span class='label'>"._REVIEWS.": </span>".$stats['reviews']."</div>
-<div><span class='label'>"._REVIEWERS.": </span>".$stats['reviewers']."</div>
-<div><span class='label'>"._POSTS.": </span>".$forums['posts']."</div>
-<div><span class='label'>"._TOPICS.": </span>".$forums['topics']."</div>
-<div><span class='label'>"._BOARDS.": </span>".$forums['boards']."</div>
-<div><span class='label'>"._FORUMCATS.": </span>".$forums['categories']."</div>
-<div><span class='label'>"._NEWESTMEMBER.": </span><a href=\"viewuser.php?uid=".$stats['newestmember']."\">$newmember</a></div>";
- }
- else if($blocks["info"]["style"] == 1) {
- $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']);
- $search = array("@\{authors\}@", "@\{members\}@", "@\{reviews\}@", "@{reviewers\}@", "@\{totalwords\}@","@\{chapters\}@", "@\{stories\}@", "@\{series\}@", "@\{newest\}@", "@\{loggedinas\}@", "@\{submissions\}@", "@\{posts\}@", "@\{topics\}@", "@\{boards\}@", "@\{forumcats\}@");
- $content = preg_replace($search, $replace, (!empty($blocks['info']['template']) ? stripslashes($blocks['info']['template']) : _NARTEXT));
- }
- }
- $codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'sitestats'");
- while($code = dbassoc($codequery)) {
- eval($code['code_text']);
- }
- if(empty($blocks['info']['style'])) $content .= "<div class='cleaner'> </div></div>";
-?>
--- a/bridges/SMF/blocks/info/init.php
+++ /dev/null
@@ -1,30 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks(`block_name`, `block_title`, `block_status`, `block_file`, `block_variables`) VALUES('info', 'Site Information', '0', 'info/info.php', '');");
-?>
--- a/bridges/SMF/blocks/login/README.txt
+++ /dev/null
@@ -1,20 +1,1 @@
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-Copyright 2007 by Tammy Keefer.
-
-This block for eFiction 3.0 bridged to SMF displays a login block on your
-eFiction site that will log you in via your SMF site.
--- a/bridges/SMF/blocks/login/admin.php
+++ /dev/null
@@ -1,45 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-$blockquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_blocks WHERE block_name = 'login'");
-while($block = dbassoc($blockquery)) {
- $blocks[$block['block_name']] = unserialize($block['block_variables']);
- $blocks[$block['block_name']]['title'] = $block['block_title'];
- $blocks[$block['block_name']]['file'] = $block['block_file'];
- $blocks[$block['block_name']]['status'] = $block['block_status'];
-}
-global $language;
-// Set $loggedin to 0 to see the block
-$loggedin = 0;
-include("blocks/login/login.php");
-// Then set it back to 1.
-$loggedin = 1;
-if(file_exists("blocks/login/$language.php")) include("blocks/login/$language.php");
-else include("blocks/login/en.php");
- if(isset($_POST['submit'])) {
- $blocks['login']['acctlink'] = $_POST['acctlink'];
- if(empty($_POST['form'])) unset($blocks['login']['form']);
- else $blocks['login']['form'] = $_POST['form'];
- $blocks['login']['template'] = addslashes(descript($_POST['template']));
- save_blocks( $blocks );
- unset($_GET['admin']);
- $output .= write_message(_ACTIONSUCCESSFUL);
- }
- else {
- if(empty($blocks['login']['template'])) $template = "";
- else $template = $blocks['login']['template'];
- $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 />";
- $output .= _LOGINNOTE."<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" action=\"admin.php?action=blocks&admin=login\">
- <div><label for=\"template\">"._TEMPLATE.":</label><span style='clear: left;'> </span></div>
- <div class=\"shorttextarea\"><textarea name=\"template\" rows=\"5\" style=\"width: 100%;\" cols=\"40\">".stripslashes($template)."</textarea>";
- if($tinyMCE)
- $output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick=\"toogleEditorMode('template');\" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
- $output .= "</div>
- <label for=\"form\">"._DEFAULTOPTS.":</label> <select name=\"form\" id=\"form\" class=\"textbox\" ><option value=\"0\"".(empty($blocks['login']['form']) ? " selected" : "").">"._SHORT."</option>
- <option value=\"1\"".(!empty($blocks['login']['form']) ? " selected" : "").">"._LONG."</option>
- </select><br />
- <label for=\"acctlink\">"._ACCTLINK."</label> <select name=\"acctlink\" id=\"acctlink\" class=\"textbox\" ><option value=\"0\"".(empty($blocks['login']['acctlink']) ? " selected" : "").">"._NO."</option>
- <option value=\"1\"".(!empty($blocks['login']['acctlink']) ? " selected" : "").">"._YES."</option>
- </select><br />
- <INPUT type=\"submit\" class=\"button\" id=\"submit\" name=\"submit\" value=\""._SUBMIT."\"></form></div>";
- }
-?>
+
--- a/bridges/SMF/blocks/login/en.php
+++ /dev/null
@@ -1,34 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-define ("_SHORT", "Short Form");
-define ("_LONG", "Long Form");
-define ("_ACCTLINK", "Display '".$pagelinks['login']['text']."' link:");
-define ("_DEFAULTOPTS", "Default Display Options");
-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.");
-?>
--- a/bridges/SMF/blocks/login/index.php
+++ /dev/null
--- a/bridges/SMF/blocks/login/init.php
+++ /dev/null
@@ -1,30 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_blocks(`block_name`, `block_title`, `block_status`, `block_file`, `block_variables`) VALUES('login', 'Login', '0', 'login/login.php', '');");
-?>
--- a/bridges/SMF/blocks/login/login.php
+++ /dev/null
@@ -1,22 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-if(!isMEMBER) {
-if(!isset($_SESSION)) session_start();
-if(isset($_GET['sid']) && isNumber($_GET['sid'])) $_SESSION['login_url'] = $url."/viewstory.php?sid=".$_GET['sid'];
-else $_SESSION['login_url'] = $url."/user.php";
- $longform = "{penname} {password} {rememberme} {go} <div id='loginlinks'>{register} | {lostpwd}</div>";
- $shortform = "{penname} {password} {rememberme} {go}";
- $content = "<form method=\"POST\"enctype=\"multipart/form-data\" id=\"loginblock\" action=\"".PATHTOSMF."index.php?action=login2\"><input type=\"hidden\" name=\"cookielength\" value=\"-1\" />";
- $replace = array("<label for=\"penname\">"._PENNAME.":</label><INPUT type=\"text\" class=\"textbox\" name=\"user\" id=\"user\">",
- "<label for=\"pswd\">"._PASSWORD.":</label><INPUT type=\"password\" class=\"textbox\" id=\"passwrd\" name=\"passwrd\">",
- "<span id='rememberme'><INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookieneverexp\" id=\"cookieneverexp\" value=\"1\"><label for=\"cookieneverexp\">"._REMEMBERME."</label></span>",
- (!empty($pagelinks['register']['link']) ? $pagelinks['register']['link'] : ""), $pagelinks['lostpassword']['link'],
- "<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._GO."\">");
- $search = array("@\{penname\}@", "@\{password\}@", "@\{rememberme\}@", "@\{register\}@", "@\{lostpwd\}@", "@\{go\}@");
- if(!empty($blocks['login']['template'])) $content .= preg_replace($search, $replace, stripslashes($blocks['login']['template']));
- else $content .= preg_replace( $search, $replace , (!empty($blocks['login']['form']) ? $longform : $shortform));
- $content .= "</form>";
-}
-else if(!empty($blocks['login']['acctlink'])) $content = $pagelinks['login']['link'];
-else $content = "";
-?>
+
--- a/bridges/SMF/blocks/online/README.txt
+++ /dev/null
@@ -1,34 +1,1 @@
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-Copyright 2006 by Tammy Keefer.
-
-This block for eFiction 3.0 displays which of your members is currently online
-and how many guests are visiting the site as well. In addition to the standard
-{blockname_title} and {blockname_content}, this block also adds {guests} as
-the number of guests and {onlinemembers} as the hyperlinked list of members online.
-
-VERY IMPORTANT NOTE: For this block to work correctly it must be set to Active
-even if it is only displayed on the index page because the block not only displays
-who is online it also tracks that information. If it is set to "Index Only" you
-will only get the information for people on your index page. And it must be set
-this way on EVERY skin. Again, even if it doesn't display, it must still be
-set to Active for the visitor information to be recorded.
-
-There is no admin panel for this block. As is, it displays the people who have
-been on the site(loaded a page) in the last minute. If you want to increase
-that time, open online.php and go to line 13 and replace 60 with the number of
-seconds you wish.
--- a/bridges/SMF/blocks/online/en.php
+++ /dev/null
@@ -1,30 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-define("_GUESTS", "Guests");
-?>
--- a/bridges/SMF/blocks/online/index.php
+++ /dev/null
--- a/bridges/SMF/blocks/online/init.php
+++ /dev/null
@@ -1,35 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-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', '');");
-dbquery("CREATE TABLE IF NOT EXISTS `".TABLEPREFIX."fanfiction_online` (
- `online_uid` int(11) NOT NULL default '0',
- `online_ip` int(11) NOT NULL default '0',
- `online_timestamp` int(11) NOT NULL default '0'
-) ENGINE=MyISAM;");
-?>
--- a/bridges/SMF/blocks/online/online.php
+++ /dev/null
@@ -1,19 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
- global $dateformat, $tpl;
-
- if(file_exists(_BASEDIR."blocks/online/{$language}.php")) include(_BASEDIR."blocks/online/{$language}.php");
- else include(_BASEDIR."blocks/online/en.php");
-
- $onlineInfo = ssi_whosOnline("array");
- $tpl->assignGlobal("guests", empty($guests) ? 0 : $onlineInfo['guests']);
- $omlist = array( );
- foreach($onlineInfo['users'] as $k => $v) {
- $omlist[] = "<a href='viewuser.php?uid=".$v['id']."'>".$v['username']."</a>";
- }
- $tpl->assignGlobal("onlinemembers", count($omlist) ? implode(", ", $omlist) : "");
- $content = "<div id='who_online'><span class='label'>"._GUESTS.":</span> ".($onlineInfo['guests'] ? $onlineInfo['guests'] : 0)."<br />\n
- <span class='label'>"._MEMBERS.":</span> ".($omlist ? implode(", ", $omlist) : "")."</div>";
-
-?>
--- a/bridges/SMF/editbio.php
+++ /dev/null
@@ -1,30 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.0
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-
-$output .= "<script language=\"javascript\" type=\"text/javascript\">
-location = \"".PATHTOSMF."index.php?action=profile\";
-</script>";
-?>
--- a/bridges/SMF/en_SMF.php
+++ /dev/null
@@ -1,5 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-define("_PRIVATEMESSAGE", "Private Message");
-?>
--- a/bridges/SMF/get_session_vars.php
+++ /dev/null
@@ -1,52 +1,1 @@
-<?php
-// Get session variables from cookie data if not logged in.
-// 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.
-if(!defined("_CHARSET")) exit( );
-if (!empty($_COOKIE[$sitekey."_useruid"]) && !isset($_SESSION[$sitekey."_useruid"])) {
- $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"]."'"));
- if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_pwd'] == md5($userdata['email'] . $userdata['password'])) {
- define("USERUID", $userdata['uid']);
- define("USERPENNAME", $userdata['penname']);
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"];
- else $siteskin = $defaultskin;
- define("uLEVEL", $userdata['level']);
- define("isADMIN", uLEVEL > 0 ? true : false);
- define("isMEMBER", true);
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent'];
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
- }
-}
-$user_info = array( );
-$eFicLang = $language;
-require_once(_BASEDIR.PATHTOSMF."SSI.php");
-$language = $eFicLang;
-$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
- // SMF has already loaded it's sessions in queries.php. So we'll pull the data from the $user_info array from there.
- if($ID_MEMBER) {
- $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'");
- if(dbnumrows($eficdata)) {
- $userdata = dbassoc($eficdata);
- if($userdata['level'] != "-1") {
- define("USERUID", $userdata['uid']);
- define("USERPENNAME", $userdata['penname']);
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"];
- else $siteskin = $defaultskin;
- define("uLEVEL", $userdata['level']);
- define("isADMIN", uLEVEL > 0 ? true : false);
- define("isMEMBER", true);
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent'];
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
- }
- }
- }
-if(!defined("USERUID")) define("USERUID", false);
-if(!defined("USERPENNAME")) define("USERPENNAME", false);
-if(!defined("uLEVEL")) define("uLEVEL", 0);
-if(!defined("isMEMBER")) define("isMEMBER", false);
-if(!defined("isADMIN")) define("isADMIN", false);
-if(empty($siteskin)) $siteskin = $defaultskin;
-echo "<!-- USERUID ".USERUID." ".$ID_MEMBER." -->";
-?>
--- a/bridges/SMF/index.php
+++ /dev/null
--- a/bridges/SMF/login.php
+++ /dev/null
@@ -1,25 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-if(!isMEMBER) {
- $output .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>";
-if(!isset($_SESSION)) session_start();
-if(isset($_GET['sid']) && isNumber($_GET['sid'])) $_SESSION['login_url'] = $url."/viewstory.php?sid=".$_GET['sid'];
-else $_SESSION['login_url'] = $url."/user.php";
- $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;\">
- <input type=\"hidden\" name=\"cookielength\" value=\"-1\" /><input type=\"hidden\" name=\"login_url\" value=\"".$_SESSION['login_url']."\" />
- <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 />
- <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 />
- <INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookieneverexp\" id=\"cookieneverexp\" value=\"1\"><label for=\"cookieneverexp\">"._REMEMBERME."</label><br />
- <INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\">
- </div></form></div>";
- $linkquery = dbquery("SELECT * from ".TABLEPREFIX."fanfiction_pagelinks WHERE link_name = 'login' OR link_name = 'lostpassword'");
- while($link = dbassoc($linkquery)) {
- if($link['link_access'] && !isMEMBER) continue;
- if($link['link_access'] == 2 && !isADMIN) continue;
- $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>");
- }
- $output .= "<div style='text-align: center;'>".$pagelinks['register']['link']." | ".$pagelinks['lostpassword']['link']."</div>";
-}
-else accessDenied( );
-?>
--- a/bridges/SMF/logout.php
+++ /dev/null
@@ -1,37 +1,1 @@
-<?php
-// 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.
-if(!defined("_LOGOUTCHECK")) exit( );
- define("_BASEDIR", "");
- include("config.php");
- include_once("includes/queries.php");
- session_start( );
- require_once(PATHTOSMF."SSI.php");
- $_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
- loadUserSettings( );
- include_once(PATHTOSMF."Sources/Subs-Auth.php");
- // If you log out, you aren't online anymore :P.
- dbquery("DELETE FROM {$db_prefix}log_online WHERE ID_MEMBER = $ID_MEMBER LIMIT 1");
- $_SESSION['log_time'] = 0;
- // Empty the cookie! (set it in the past, and for ID_MEMBER = 0)
- setLoginCookie(-3600, 0);
- foreach ($_SESSION as $VarName => $Value) {
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
- if(strpos($VarName, "skin")) continue;
- unset($$VarName);
- $_SESSION[$VarName] = "";
- setcookie($VarName, '0');
- }
- }
-require_once("header.php");
-//make a new TemplatePower object
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
-else $tpl = new TemplatePower("default_tpls/default.tpl");
-if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
-else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" );
-include("includes/pagesetup.php");
-
-$output .= write_message(_ACTIONSUCCESSFUL);
-$tpl->assign("output", $output);
-$tpl->printToScreen( );
-?>
--- a/bridges/SMF/lostpassword.php
+++ /dev/null
@@ -1,29 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.0
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-$output .= "<script language=\"javascript\" type=\"text/javascript\">
-location = \"".PATHTOSMF."index.php?action=reminder\";
-</script>";
-?>
--- a/bridges/SMF/online/README.txt
+++ /dev/null
@@ -1,34 +1,1 @@
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-Copyright 2006 by Tammy Keefer.
-
-This block for eFiction 3.0 displays which of your members is currently online
-and how many guests are visiting the site as well. In addition to the standard
-{blockname_title} and {blockname_content}, this block also adds {guests} as
-the number of guests and {onlinemembers} as the hyperlinked list of members online.
-
-VERY IMPORTANT NOTE: For this block to work correctly it must be set to Active
-even if it is only displayed on the index page because the block not only displays
-who is online it also tracks that information. If it is set to "Index Only" you
-will only get the information for people on your index page. And it must be set
-this way on EVERY skin. Again, even if it doesn't display, it must still be
-set to Active for the visitor information to be recorded.
-
-There is no admin panel for this block. As is, it displays the people who have
-been on the site(loaded a page) in the last minute. If you want to increase
-that time, open online.php and go to line 13 and replace 60 with the number of
-seconds you wish.
--- a/bridges/SMF/online/en.php
+++ /dev/null
@@ -1,30 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-define("_GUESTS", "Guests");
-?>
--- a/bridges/SMF/online/index.php
+++ /dev/null
--- a/bridges/SMF/online/init.php
+++ /dev/null
@@ -1,35 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-
-if(!defined("_CHARSET")) exit( );
-
-
-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', '');");
-dbquery("CREATE TABLE IF NOT EXISTS `".TABLEPREFIX."fanfiction_online` (
- `online_uid` int(11) NOT NULL default '0',
- `online_ip` int(11) NOT NULL default '0',
- `online_timestamp` int(11) NOT NULL default '0'
-) ENGINE=MyISAM;");
-?>
--- a/bridges/SMF/online/online.php
+++ /dev/null
@@ -1,19 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
- global $dateformat, $tpl;
-
- if(file_exists(_BASEDIR."blocks/online/{$language}.php")) include(_BASEDIR."blocks/online/{$language}.php");
- else include(_BASEDIR."blocks/online/en.php");
-
- $onlineInfo = ssi_whosOnline("array");
- $tpl->assignGlobal("guests", empty($guests) ? 0 : $onlineInfo['guests']);
- $omlist = array( );
- foreach($onlineInfo['users'] as $k => $v) {
- $omlist[] = "<a href='viewuser.php?uid=".$v['id']."'>".$v['username']."</a>";
- }
- $tpl->assignGlobal("onlinemembers", count($omlist) ? implode(", ", $omlist) : "");
- $content = "<div id='who_online'><span class='label'>"._GUESTS.":</span> ".($onlineInfo['guests'] ? $onlineInfo['guests'] : 0)."<br />\n
- <span class='label'>"._MEMBERS.":</span> ".($omlist ? implode(", ", $omlist) : "")."</div>";
-
-?>
--- a/bridges/SMF/profile.php
+++ /dev/null
@@ -1,76 +1,1 @@
-<?php
-// Build the user's profile information
-if(!defined("_CHARSET")) exit( );
-if(file_exists("languages/{$language}_SMF.php")) include("languages/{$language}_SMF.php");
-else include("languages/en_SMF.php");
-$tpl->newBlock("profile");
-$result2 = dbquery("SELECT *, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
-$userinfo = dbassoc($result2);
-$nameinfo = "";
-if($userinfo['emailAddress']) {
- list($allowGuestsContact) = dbrow(dbquery("SELECT panel_level FROM ".TABLEPREFIX."fanfiction_panels WHERE panel_type = 'P' AND panel_name = 'contact' LIMIT 1"));
- if($allowGuestsContact == "0") $nameinfo .= " [<a href=\"viewuser.php?action=contact&uid=".$userinfo['uid']."\">"._CONTACT."</a>]";
-}
-if(isMEMBER) {
- $nameinfo .= "[<a href='".PATHTOSMF."index.php?action=pm;sa=send;u=".$userinfo['uid']."'>"._PRIVATEMESSAGE."</a>]";
-}
-if(!empty($favorites) && isMEMBER && $userinfo['uid'] != USERUID) {
- $fav = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_favorites WHERE uid = '".USERUID."' AND type = 'AU' AND item = '".$userinfo['uid']."'");
- if(dbnumrows($fav) == 0) $nameinfo .= " [<a href=\"user.php?uid=USERUID&action=favau&author=".$userinfo['uid']."\">"._ADDAUTHOR2FAVES."</a>]";
-}
-$tpl->assign("userpenname", $userinfo['memberName']." ".$nameinfo);
-$tpl->assign("membersince", date("$dateformat", $userinfo['dateRegistered']));
-if($userinfo['realName'])
- $tpl->assign("realname", $userinfo['realName']);
-if(!empty($userinfo['avatar']))
- $tpl->assign("image", "<img src=\"".$path_to_smf."avatars/".$userinfo['avatar']."\">");
-$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
-/* Dynamic authorinfo fields */
-$result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
-if(!empty($userinfo['websiteUrl']))
- $tpl->assign("website", "<a href='".$userinfo['websiteUrl']."'>".(!empty($userinfo['websiteTitle']) ? $userinfo['websiteTitle'] : $userinfo['websiteUrl'])."</a>");
- $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);
- $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);
- $tpl->assign("msn", "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".($userinfo['MSN'] ? $userinfo['MSN'] : _NONE));
- $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);
-
-$dynamicfields = "";
-while($field = dbassoc($result2)) {
- if($field['info'] == "") continue;
- $fieldinfo = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_id = '".$field['field']."' LIMIT 1"));
- if($fieldinfo) {
- $thisfield = "";
- if($fieldinfo['field_on'] == 0) continue;
- if($fieldinfo['field_type'] == 1) {
- $thisfield = preg_replace('/(\w+:\/\/)(\S+)/', '<a href="\\1\\2" target="_blank">\\1\\2</a>', $field['info']);
- if(strpos($thisfield, "http://") == false) $thisfield = preg_replace('/(\S+\.)(\S+)/', '<a href="http://\\1\\2" target="_blank">\\1\\2</a>', $thisfield);
- }
- if($fieldinfo['field_type'] == 4) {
- $thisfield = preg_replace("@\{info\}@", $field['info'], $fieldinfo['field_options']);
- $thisfield = preg_replace('/(\w+:\/\/)(\S+)/', '<a href="\\1\\2" target="_blank">'.$field['info'].'</a>', $thisfield);
- if(strpos($thisfield, "http://") == false) $thisfield = preg_replace('/(\S+\.)(\S+)/', '<a href="http://\\1\\2" target="_blank">\\1\\2</a>', $thisfield);
- }
- if($fieldinfo['field_type'] == 2 || $fieldinfo['field_type'] == 6) {
- $thisfield = stripslashes($field['info']);
- }
- if($fieldinfo['field_type'] == 3) {
- $thisfield = !empty($field['info']) ? _YES : _NO;
- }
- else eval($fieldinfo['field_code_out']);
- $tpl->assign($fieldinfo['field_name'], $thisfield);
- $dynamicfields .= "<div class='authorfields'><span class='label'>".$fieldinfo['field_title'].":</span> ".$thisfield."</div>";
- }
-}
-if(!empty($dynamicfields)) $tpl->assign("authorfields", $dynamicfields);
-$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&url=viewuser.php?uid=".$uid."\">"._REPORTTHIS."</a>]");
-/* End dynamic fields */
-$adminopts = "";
-if(isADMIN && uLEVEL < 3) {
- $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>]";
- $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>]";
- $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>";
- $tpl->assign("adminoptions", $adminopts);
-}
-$tpl->gotoBlock("_ROOT");
-?>
--- a/bridges/SMF/queries.php
+++ /dev/null
@@ -1,26 +1,1 @@
-<?php
-// The table prefix for SMF
-$db_prefix = "smf_";
-
-// The RELATIVE path to your SMF install from your eFiction install.
-// The example given is an SMF and eFiction install as sibling folders.
-define("PATHTOSMF", "../smf/");
-
-$db_connection = $dbconnect;
-
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases.
-
-define ("_UIDFIELD", "author.ID_MEMBER"); // Do not change the aliasing (the "author." part)!
-define ("_PENNAMEFIELD", "author.realName"); // Do not change the aliasing (the "author." part)!
-define ("_EMAILFIELD", "author.emailAddress"); // Do not change the aliasing (the "author." part)!
-define ("_PASSWORDFIELD", "author.passwd"); // Do not change the aliasing (the "author." part)!
-define ("_AUTHORTABLE", $db_prefix."members as author"); // Do not change the aliasing (the "as author" part)!
-
-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 ");
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
-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.") ");
-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");
-?>
--- a/bridges/SMF/register.php
+++ /dev/null
@@ -1,7 +1,1 @@
-<?php
-if(!defined("_CHARSET")) exit( );
-$output .= "<script language=\"javascript\" type=\"text/javascript\">
-location = \"".PATHTOSMF."index.php?action=register\";
-</script>";
-?>
--- a/bridges/default/README.txt
+++ /dev/null
@@ -1,3 +1,1 @@
-This folder contains the default files for connecting to the default author
-table for eFiction. They are included here as a backup in case you need
-to restore from a failed bridge.
+
--- a/bridges/default/editbio.php
+++ /dev/null
@@ -1,224 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-if(!function_exists("random_char")) {
-
-function random_char($string)
-{
- $length = strlen($string);
- $position = mt_rand(0, $length - 1);
- $output = ($string[$position]);
- return $output;
-}
-
-function random_string ($charset_string, $length)
-{
- $return_string = random_char($charset_string);
- for ($x = 1; $x < $length; $x++)
- $return_string .= random_char($charset_string);
- return $return_string;
-}
-
-}
- $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : false;
- if(!$uid) $uid = USERUID;
-
- if((!isADMIN || uLEVEL > 2) && $uid != USERUID && $action == "editbio") $output .= write_error(_NOTAUTHORIZED);
- if(isMEMBER) $output .= "<div id=\"pagetitle\">"._EDITPERSONAL."</div>";
- else $output .= "<div id=\"pagetitle\">"._NEWACCOUNT."</div>";
- if(!empty($_POST['submit'])) {
- $penname = isset($_POST['newpenname']) ? escapestring($_POST['newpenname']) : false;
- $email = escapestring($_POST[email]);
- if(!isset($email) && !isADMIN) $output .= "<div style='text-align: center;'>"._EMAILREQUIRED."</div>";
- else if($penname && !preg_match("!^[a-z0-9_ ]{3,30}$!i", $penname)) $output .= "<div style='text-align: center;'>"._BADUSERNAME."</div>";
- 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>";
- else if($action == "register") {
- if(!$penname || empty($email) || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) || !preg_match("/^[-0-9A-Z_-\s]+$/i", $penname)) $output .= write_error(_PENEMAILREQUIRED);
- else if($pwdsetting && empty($_POST['password'])) $output .= write_error(_PWDREQUIRED." "._TRYAGAIN);
- else {
- $result = dbquery("SELECT "._PENNAMEFIELD." FROM "._AUTHORTABLE." WHERE "._PENNAMEFIELD." = '".escapestring($penname)."'");
- $result2 = dbquery("SELECT "._EMAILFIELD." as email FROM "._AUTHORTABLE." WHERE "._EMAILFIELD." = ''");
- if($captcha && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL);
- else if(dbnumrows($result) > 0) $output .= write_error(_PENNAMEINUSE." "._TRYAGAIN);
- else if(dbnumrows($result2) > 0) $output .= write_error(_EMAILINUSE." "._TRYAGAIN);
- else if(preg_match("!^[a-z0-9_ ]{3,30}$!i", $penname)) {
- if(!$pwdsetting) {
- $charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ';
- $pass = random_string($charset, 10);
- $encryppass = md5($pass);
- }
- else {
- if($_POST['password'] != $_POST['password2']) {
- $output .= write_error(_PASSWORDTWICE);
- $tpl->assign("output", $output);
- $tpl->printToScreen( );
- dbclose( );
- exit( );
- }
- $pass = $_POST['password2'];
- $encryppass = md5($pass);
- }
- 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')");
- $useruid = dbinsertid( );
- 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')");
- if(empty($siteskin)) {
- $skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
- list($skin) = dbrow($skinquery);
- }
- else $skin = $siteskin;
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(uid, userskin, storyindex, sortby, tinyMCE) VALUES('".USERUID."', '$skin', '$displayindex', '$defaultsort', '$tinyMCE')");
-/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
- while($field = dbassoc($fields)) {
- $uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false;
- if(!$uid) continue;
- $oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
- if(dbnumrows($oldfield) > 0) {
- $newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring($_POST["af_".$field['field_name']]) : false;
- if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='$newinfo' WHERE uid = '$uid' AND field = '".$field['field_id']."'");
- else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
- }
- 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']."');");
- }
-/* End dynamic fields */
- $subject = _SIGNUPSUBJECT;
- $mailtext = _SIGNUPMESSAGE._LOGIN.": $penname\n"._PASSWORD.": $pass \n\n";
- if(!$pwdsetting) $mailtext .= _SIGNUPWARNING;
- include("includes/emailer.php");
- sendemail($penname, $email, $sitename, $siteemail, $subject, $mailtext, "html");
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET newestmember = '$penname', members = members + 1");
- unset($_POST['submit']);
- $output = write_message(_ACTIONSUCCESSFUL);
- include("user/login.php");
- }
- else $output .= _BADUSERNAME;
- }
- }
- else{
- $oldinfo = dbassoc(dbquery("SELECT * FROM "._AUTHORTABLE." WHERE uid = '".USERUID."' LIMIT 1"));
- // Update the password
- if(($_POST['password']) || ($_POST['password2'])) {
- if($_POST['password'] == $_POST['password2']) {
- $encryppassword = md5($_POST['password']);
- dbquery("UPDATE "._AUTHORTABLE." SET password='$encryppassword' WHERE uid = '$uid'");
- }
- else $output .= write_error(_PASSWORDTWICE);
- }
- // Update the penname.
- if(isset($_POST['oldpenname']) && $penname != $_POST['oldpenname']) {
- $checkresult = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE penname = '".escapestring($penname)."'");
- if(dbnumrows($checkresult)) {
- $output .= write_message(_PENNAMEINUSE." "._TRYAGAIN);
- }
- else {
- dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
- 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')");
- }
- }
-/* This section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
- while($field = dbassoc($fields)) {
- $uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false;
- if(!$uid) continue;
- $oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
- if(dbnumrows($oldfield) > 0) {
- $newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring(descript($_POST["af_".$field['field_name']])) : false;
- if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='".$newinfo."' WHERE uid = '$uid' AND field = '".descript($field['field_id'])."'");
- else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
- }
- 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']."');");
- }
-/* End dynamic fields */
- // Now we'll update the rest.
- $result = 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'");
- if($result) { // only if the info actually got updated.
- if($oldinfo['email'] != $email) { // Need to reset the session and cookies in this case.
- $_SESSION[SITEKEY."_salt"] = md5($email . $encryptedpassword);
- if(isset($_COOKIE[SITEKEY."_salt"])) setcookie(SITEKEY."_salt", md5($email . $encryptedpassword), time()+60*60*24*30, "/");
- }
- }
- $output .= write_message(_ACTIONSUCCESSFUL." ".(isset($_GET['uid']) ? _BACK2ADMIN : _BACK2ACCT));
- }
- }
- else {
- if($action != "register") {
- $result = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
- $user = dbassoc($result);
- $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
- while($field = dbassoc($result2)) {
- $user["af_".$field['field']] = $field['info'];
- }
- }
- if($action == "register") {
- $query = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tos'");
- list($tos) = dbrow($query);
- $output .= "<div class='tblborder' style='width: 90%; margin: 1em auto;'>$tos</div>";
- }
- $output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" style='margin: 0 auto;' action=\"user.php?action=$action".($uid != USERUID ? "&uid=".$uid : "")."\">
- <div><label for='newpenname'>"._PENNAME.":</label>";
- if((isADMIN && uLEVEL == 1) || $action == "register")
- $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> ";
- else if(isset($user)) $output .= " ".$user['penname'];
- $output .= "</div>
- <div><label for='realname'>"._REALNAME.": </label><INPUT type=\"text\" class=\"textbox=\" name=\"realname\" maxlength=\"200\" value=\"".(isset($user) ? $user['realname'] : "")."\"></div>
- <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>
- <div><label for='bio'>"._BIO.":</label></div>
- <div style='width: 450px; margin: 0 auto;'><textarea class=\"textbox\" name=\"bio\" cols=\"50\" rows=\"6\">".(isset($user) ? stripslashes($user['bio']) : "")."</TEXTAREA></div>";
-/* The section adds fields to the form from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
- $authorfields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
- while($field = dbassoc($authorfields)) {
- if($field['field_type'] == 1 || $field['field_type'] == 4 || $field['field_type'] == 6)
- $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";
- if($field['field_type'] == 2) {
- $output .= "<div><label for='".$field['field_name']."'>".$field['field_title'].":</label>\n
- <select class='textbox' name='af_".$field['field_name']."'>\n";
- $opts = explode("|#|", $field['field_options']);
- foreach($opts as $opt) {
- $output .= "<option".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == $opt ? " selected" : "").">$opt</option>\n";
- }
- $output .= "</select>\n</div>\n";
- }
- if($field['field_type'] == 5) eval(stripslashes($field['field_code_in']));
- if($field['field_type'] == 3) {
- $output .= "<div class='fieldset'><span class='label'>".$field['field_title'].":</span>\n";
- $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
- <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";
- }
- }
-/* End dynamic fields */
- if($imageupload == "1")
- $output .= "<div><label for='image'>"._IMAGE.":</label> <INPUT type=\"text\" class=\"textbox=\" name=\"image\" maxlength=\"200\" value=\"".(!empty($user['image']) ? $user['image'] : "")."\"></div>";
- if($action != "register" || $pwdsetting)
- $output .= "<div><label for='password'>"._PASSWORD.":</label> <INPUT name=\"password\" class=\"textbox\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>
- <div><label for='password2'>"._PASSWORD2.":</label> <INPUT name=\"password2\" class=\"textbox=\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>";
- 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=40 src=\""._BASEDIR."includes/button.php\" style=\"border: 1px solid #111;\"></div></div>";
- $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."\">";
- if(!isADMIN)
- {
- $output .= " [<a href=\"admin.php?action=deleteuser&uid=$uid\">"._DELETE."</a>]";
- }
- $output .= "</div></form></div>".write_message("<font color=\"red\">*</font> "._REQUIREDFIELDS);
- }
-?>
--- a/bridges/default/get_session_vars.php
+++ /dev/null
@@ -1,65 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-// Get session variables from cookie data if not logged in.
-// 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.
-if (!empty($_COOKIE[$sitekey."_useruid"])) {
- $userdata = dbassoc(dbquery("SELECT ap.*, "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_COOKIE[$sitekey."_useruid"]."'"));
- if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_salt'] == md5($userdata['email'] . $userdata['password'])) {
- define("USERUID", $userdata['uid']);
- define("USERPENNAME", $userdata['penname']);
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"];
- else $siteskin = $defaultskin;
- define("uLEVEL", $userdata['level']);
- define("isADMIN", uLEVEL > 0 ? true : false);
- define("isMEMBER", true);
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent'];
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
- }
-}
-if(!empty($_SESSION[$sitekey."_useruid"]) && !defined("USERUID")) {
- $userdata = dbassoc(dbquery("SELECT ap.*, "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_SESSION[$sitekey."_useruid"]."'"));
- if($userdata && $userdata['level'] != -1 && $_SESSION[$sitekey.'_salt'] == md5($userdata['email'] . $userdata['password'])) {
- define("USERUID", $userdata['uid']);
- define("USERPENNAME", $userdata['penname']);
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"];
- else $siteskin = $defaultskin;
- define("uLEVEL", $userdata['level']);
- define("isADMIN", uLEVEL > 0 ? true : false);
- define("isMEMBER", true);
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent'];
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
- }
-}
-if(!defined("USERUID")) define("USERUID", false);
-if(!defined("USERPENNAME")) define("USERPENNAME", false);
-if(!defined("uLEVEL")) define("uLEVEL", 0);
-if(!defined("isMEMBER")) define("isMEMBER", false);
-if(!defined("isADMIN")) define("isADMIN", false);
-if(empty($siteskin)) $siteskin = $defaultskin;
-
-?>
--- a/bridges/default/index.php
+++ /dev/null
--- a/bridges/default/login.php
+++ /dev/null
@@ -1,87 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_LOGINCHECK")) exit( );
- if(isset($_POST['submit']) && preg_match("!^[a-z0-9_ ]{3,30}$!i", $_POST['penname'])) {
- define("_BASEDIR", "");
- include_once("config.php");
- $settings = dbquery("SELECT tableprefix, maintenance, sitekey, debug FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
- list($tableprefix, $maintenance, $sitekey, $debug) = dbrow($settings);
- include_once("includes/queries.php");
- $result = dbquery("SELECT *, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs AS ap ON ap.uid = "._UIDFIELD." WHERE "._PENNAMEFIELD." = '".$_POST['penname']."'");
- $passwd = dbassoc($result);
- if($maintenance && $passwd['level'] < 0) {
- header("Location: maintenance.php");
- exit( );
- }
- $encryptedpassword = md5($_POST['password']);
- if($passwd['level'] == -1) {
- require_once("header.php");
- //make a new TemplatePower object
- if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
- else $tpl = new TemplatePower("default_tpls/default.tpl");
- include_once("includes/corefunctions.php");
- accessDenied( );
- }
- if(isset($_POST['cookiecheck'])) {
- setcookie($sitekey."_useruid",$passwd['uid'], time()+60*60*24*30, "/");
- setcookie($sitekey."_salt", md5($passwd['email'] . $encryptedpassword), time()+60*60*24*30, "/");
- }
- if($passwd['password'] == $encryptedpassword) {
- if(!isset($_SESSION)) session_start( );
- $_SESSION[$sitekey."_useruid"] = $passwd['uid'];
- $_SESSION[$sitekey."_salt"] = md5($passwd['email'] . $encryptedpassword);
- }
-
- else {
- require_once("header.php");
- //make a new TemplatePower object
- if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
- else $tpl = new TemplatePower("default_tpls/default.tpl");
- include_once("includes/pagesetup.php");
- $output .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>";
- $output .= "<div style='text-align: center;'>"._WRONGPASSWORD."</div>";
- $tpl->assign("output", $output);
- $tpl->printToScreen( );
- dbclose( );
- exit( );
- }
- }
- else if(!isMEMBER) {
- $output .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>";
- $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'] : "")."\">
- <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 />
- <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 />
- <INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookiecheck\" id=\"cookiecheck\" value=\"1\"><label for=\"cookiecheck\">"._REMEMBERME."</label><br />
- <INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\">
- </form></div>";
- $linkquery = dbquery("SELECT * from ".TABLEPREFIX."fanfiction_pagelinks WHERE link_name = 'login' OR link_name = 'lostpassword'");
- while($link = dbassoc($linkquery)) {
- if($link['link_access'] && !isMEMBER) continue;
- if($link['link_access'] == 2 && !isADMIN) continue;
- $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>");
- }
- $output .= "<div style='text-align: center;'>".$pagelinks['register']['link']." | ".$pagelinks['lostpassword']['link']."</div>";
- }
-?>
--- a/bridges/default/logout.php
+++ /dev/null
@@ -1,33 +1,1 @@
-<?php
-if(!defined("_LOGOUTCHECK")) exit( );
- define("_BASEDIR", "");
- include("config.php");
- include("includes/queries.php");
- session_start( );
- foreach ($_SESSION as $VarName => $Value) {
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
- if(strpos($VarName, "skin")) continue;
- $_SESSION[$VarName] = "";
- unset($_SESSION[$VarName]);
- unset($_COOKIE[$VarName]);
- setcookie($VarName, '', time() - 1000, '/', '', '' );
- }
- }
- foreach ($_COOKIE as $VarName => $Value) {
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
- unset($_COOKIE[$VarName]);
- setcookie($VarName, "", time() - 1000, '/', '', '' );
- }
- }
-require_once("header.php");
-//make a new TemplatePower object
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
-else $tpl = new TemplatePower("default_tpls/default.tpl");
-if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
-else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" );
-include("includes/pagesetup.php");
-$output .= write_message(_ACTIONSUCCESSFUL);
-$tpl->assign("output", $output);
-$tpl->printToScreen( );
-?>
--- a/bridges/default/lostpassword.php
+++ /dev/null
@@ -1,80 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-if(!function_exists("random_char")) {
-
-function random_char($string)
-{
- $length = strlen($string);
- $position = mt_rand(0, $length - 1);
- return ($string[$position]);
-}
-
-function random_string ($charset_string, $length)
-{
- $return_string = random_char($charset_string);
- for ($x = 1; $x < $length; $x++)
- $return_string .= random_char($charset_string);
- return $return_string;
-}
-
-}
-if($loggedin) accessDenied( );
- $output = "<div id=\"pagetitle\">"._LOSTPASSWORD."</div>";
-
- if(isset($_POST['submit'])) {
- $result = dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE email = '$_POST[email]'");
- list($uid, $penname) = dbrow($result);
- if(dbnumrows($result) == 0) $output .= write_message(_BADEMAIL);
- else {
- include("includes/emailer.php");
- mt_srand((double)microtime() * 1000000);
- $charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ';
- $pass = random_string($charset, 10);
- $encryppass = md5($pass);
- $subject = _NEWPWDSUB;
- $mailtext = sprintf(_NEWPWDMSG, $pass);
-
-
- $result = sendemail($penname, $_POST['email'], $sitename, $siteemail, $subject, $mailtext, "html");
- if($result) {
- $output .= write_message(_PASSWORDSENT);
- dbquery("UPDATE "._AUTHORTABLE." SET password='$encryppass' WHERE uid = '".$uid."'");
- }
- else $output .= write_message(_EMAILFAILED);
- if($logging)
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_LOST_PASSWORD, $penname, $uid, ($result ? _YES : _NO)))."', '$uid', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'LP')");
-
- }
- }
- else {
- $output .= "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"user.php?action=lostpassword\">
- <table align=\"center\" width=\"300\">
- <tr><td>"._ENTEREMAIL."</td></tr>
- <tr><td><INPUT type=\"text\" class=\"textbox=\" name=\"email\"> <INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\"></form>
- </td></tr></table>";
- }
-
-?>
--- a/bridges/default/profile.php
+++ /dev/null
@@ -1,86 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-
-// Build the user's profile information
-$tpl->newBlock("profile");
-$result2 = dbquery("SELECT *, UNIX_TIMESTAMP(date) as date FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
-$userinfo = dbassoc($result2);
-$nameinfo = "";
-if($userinfo['email'])
- $nameinfo .= " [<a href=\"viewuser.php?action=contact&uid=".$userinfo['uid']."\">"._CONTACT."</a>]";
-if(!empty($favorites) && $loggedin && $userinfo['uid'] != USERUID) {
- $fav = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_favorites WHERE uid = '".USERUID."' AND type = 'AU' AND item = '".$userinfo['uid']."'");
- if(dbnumrows($fav) == 0) $nameinfo .= " [<a href=\"user.php?uid=USERUID&action=favau&author=".$userinfo['uid']."\">"._ADDAUTHOR2FAVES."</a>]";
-}
-$tpl->assign("userpenname", $userinfo['penname']." ".$nameinfo);
-$tpl->assign("membersince", date("$dateformat", $userinfo['date']));
-if($userinfo['realname'])
- $tpl->assign("realname", $userinfo['realname']);
-if($userinfo['bio']) {
- $bio = nl2br($userinfo['bio']);
- $tpl->assign("bio", stripslashes($bio));
-}
-if($userinfo['image'])
- $tpl->assign("image", "<img src=\"".$userinfo['image']."\">");
-$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
-/* Dynamic authorinfo fields */
-$result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
-$dynamicfields = "";
-while($field = dbassoc($result2)) {
- if($field['info'] == "") continue;
- $fieldinfo = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_id = '".$field['field']."' LIMIT 1"));
- if($fieldinfo) {
- $thisfield = "";
- if($fieldinfo['field_on'] == 0) continue;
- if($fieldinfo['field_type'] == 1) { $thisfield = format_link($field['info']);
- }
- if($fieldinfo['field_type'] == 4) {
- $thisfield = preg_replace("@\{info\}@", $field['info'], $fieldinfo['field_options']);
- $thisfield = format_link($thisfield);
- }
- if($fieldinfo['field_type'] == 2 || $fieldinfo['field_type'] == 6) {
- $thisfield = stripslashes($field['info']);
- }
- if($fieldinfo['field_type'] == 3) {
- $thisfield = $field['info'];
- }
- else eval($fieldinfo['field_code_out']);
- $tpl->assign($fieldinfo['field_name'], $thisfield);
- $dynamicfields .= "<div class='authorfields'><span class='label'>".$fieldinfo['field_title'].":</span> ".$thisfield."</div>";
- }
-}
-if(!empty($dynamicfields)) $tpl->assign("authorfields", $dynamicfields);
-$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&url=viewuser.php?uid=".$uid."\">"._REPORTTHIS."</a>]");
-/* End dynamic fields */
-$adminopts = "";
-if(isADMIN && uLEVEL < 3) {
- $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>]";
- $adminopts .= " [<a href=\"admin.php?action=members&".($userinfo['level'] < 0 ? "unlock=".$userinfo['uid']."\" class=\"vuadmin\">"._UNLOCKMEM : "lock=".$userinfo['uid']."\" class=\"vuadmin\">"._LOCKMEM)."</a>]";
- $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>";
- $tpl->assign("adminoptions", $adminopts);
-}
-$tpl->gotoBlock("_ROOT");
-?>
--- a/bridges/default/queries.php
+++ /dev/null
@@ -1,17 +1,1 @@
-<?php
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases.
-
-define ("_UIDFIELD", "author.uid"); // Do not change the aliasing (the "author." part)!
-define ("_PENNAMEFIELD", "author.penname"); // Do not change the aliasing (the "author." part)!
-define ("_EMAILFIELD", "author.email"); // Do not change the aliasing (the "author." part)!
-define ("_PASSWORDFIELD", "author.password"); // Do not change the aliasing (the "author." part)!
-define ("_AUTHORTABLE", $tableprefix."fanfiction_authors as author"); // Do not change the aliasing (the "as author" part)!
-
-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 ");
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".$tableprefix."fanfiction_stories as stories WHERE validated > 0");
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".$tableprefix."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".$tableprefix."fanfiction_series as series ");
-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.") ");
-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");
-?>
--- a/bridges/default/register.php
+++ /dev/null
@@ -1,28 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-
-include("user/editbio.php");
-?>
--- a/bridges/eFic2eFic/README.txt
+++ /dev/null
@@ -1,3 +1,1 @@
-This folder contains the default files for connecting to the default author
-table for eFiction. They are included here as a backup in case you need
-to restore from a failed bridge.
+
--- a/bridges/eFic2eFic/editbio.php
+++ /dev/null
@@ -1,216 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-if(!function_exists("random_char")) {
-
-function random_char($string)
-{
- $length = strlen($string);
- $position = mt_rand(0, $length - 1);
- $output = ($string[$position]);
- return $output;
-}
-
-function random_string ($charset_string, $length)
-{
- $return_string = random_char($charset_string);
- for ($x = 1; $x < $length; $x++)
- $return_string .= random_char($charset_string);
- return $return_string;
-}
-
-}
- $uid = isset($_REQUEST['uid']) ? $_REQUEST['uid'] : false;
- if(!$uid) $uid = USERUID;
-
- if((!isADMIN || uLEVEL > 2) && $uid != USERUID && $action == "editbio") $output .= write_error(_NOTAUTHORIZED);
- if(isMEMBER) $output .= "<div id=\"pagetitle\">"._EDITPERSONAL."</div>";
- else $output .= "<div id=\"pagetitle\">"._NEWACCOUNT."</div>";
- if(!empty($_POST['submit'])) {
- $penname = isset($_POST['newpenname']) ? escapestring($_POST['newpenname']) : false;
- $email = escapestring($_POST['email']);
- if(!isset($email) && !isADMIN) $output .= "<div style='text-align: center;'>"._EMAILREQUIRED."</div>";
- else if($penname && !preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) $output .= "<div style='text-align: center;'>"._BADUSERNAME."</div>";
- 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>";
- else if($action == "register") {
- 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);
- else if($pwdsetting && empty($_POST['password'])) $output .= write_error(_PWDREQUIRED." "._TRYAGAIN);
- else {
- $result = dbquery("SELECT "._PENNAMEFIELD." FROM "._AUTHORTABLE." WHERE "._PENNAMEFIELD." = '".escapestring($penname)."'");
- $result2 = dbquery("SELECT "._EMAILFIELD." as email FROM "._AUTHORTABLE." WHERE "._EMAILFIELD." = '$email'");
- if($captcha && !captcha_confirm()) $output .= write_error(_CAPTCHAFAIL);
- else if(dbnumrows($result) > 0) $output .= write_error(_PENNAMEINUSE." "._TRYAGAIN);
- else if(dbnumrows($result2) > 0) $output .= write_error(_EMAILINUSE." "._TRYAGAIN);
- else if(preg_match("!^[a-z0-9-_ ]{3,30}$!i", $penname)) {
- if(!$pwdsetting) {
- $charset = '23456789' . 'abcdefghijkmnpqrstuvwxyz' . 'ABCDEFGHJKLMNPQRSTUVWXYZ';
- $pass = random_string($charset, 10);
- $encryppass = md5($pass);
- }
- else {
- if($_POST['password'] != $_POST['password2']) {
- $output .= write_error(_PASSWORDTWICE);
- $tpl->assign("output", $output);
- $tpl->printToScreen( );
- dbclose( );
- exit( );
- }
- $pass = $_POST['password2'];
- $encryppass = md5($pass);
- }
- 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')");
- $useruid = dbinsertid();
- 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')");
- if(empty($siteskin)) {
- $skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
- list($skin) = dbrow($skinquery);
- }
- else $skin = $siteskin;
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(uid, userskin, storyindex, sortby, tinyMCE) VALUES('".$useruid."', '$skin', '$displayindex', '$defaultsort', '$tinyMCE')");
-/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
- while($field = dbassoc($fields)) {
- $uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false;
- if(!$uid) continue;
- $oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
- if(dbnumrows($oldfield) > 0) {
- $newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring($_POST["af_".$field['field_name']]) : false;
- if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='$newinfo' WHERE uid = '$uid' AND field = '".$field['field_id']."'");
- else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
- }
- 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']."');");
- }
-/* End dynamic fields */
- $subject = _SIGNUPSUBJECT;
- $mailtext = _SIGNUPMESSAGE._LOGIN.": $penname\n"._PASSWORD.": $pass \n\n";
- if(!$pwdsetting) $mailtext .= _SIGNUPWARNING;
- include("includes/emailer.php");
- sendemail($penname, $email, $sitename, $siteemail, $subject, $mailtext, "html");
- dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
- if(defined("AUTHORPREFIX")) dbquery("UPDATE ".AUTHORPREFIX."fanfiction_stats SET newestmember = '".$useruid."', members = members + 1");
- unset($_POST['submit']);
- $output = write_message(_ACTIONSUCCESSFUL);
- define("_LOGINCHECK", true);
- include("user/login.php");
- }
- else $output .= _BADUSERNAME;
- }
- }
- else{
- if(($_POST['password']) && ($_POST['password2'])) {
- if($_POST['password'] == $_POST['password2']) {
- $encryppassword = md5($_POST['password']);
- dbquery("UPDATE "._AUTHORTABLE." SET password='$encryppassword' WHERE uid = '$uid'");
- }
- else $output .= write_error(_PASSWORDTWICE);
- }
- if(isset($_POST['oldpenname']) && $penname != $_POST['oldpenname']) {
- $checkresult = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE penname = '".escapestring($penname)."'");
- if(dbnumrows($checkresult)) {
- $output .= write_message(_PENNAMEINUSE." "._TRYAGAIN);
- }
- else {
- dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
- 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')");
- }
- }
-/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
- $fields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
- while($field = dbassoc($fields)) {
- $uid = isset($_POST['uid']) && isNumber($_POST['uid']) ? $_POST['uid'] : false;
- if(!$uid) continue;
- $oldfield = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field='".$field['field_id']."' AND uid = '".$uid."'");
- if(dbnumrows($oldfield) > 0) {
- $newinfo = isset($_POST["af_".$field['field_name']]) ? escapestring(descript($_POST["af_".$field['field_name']])) : false;
- if(!empty($newinfo)) dbquery("UPDATE ".TABLEPREFIX."fanfiction_authorinfo SET info='".$newinfo."' WHERE uid = '$uid' AND field = '".descript($field['field_id'])."'");
- else dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid' AND field = '".$field['field_id']."'");
- }
- 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']."');");
- }
-/* End dynamic fields */
- 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'");
- $output .= write_message(_ACTIONSUCCESSFUL." ".(isset($_GET['uid']) ? _BACK2ADMIN : _BACK2ACCT));
- }
- }
- else {
- if($action != "register") {
- $result = dbquery("SELECT * FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
- $user = dbassoc($result);
- $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
- while($field = dbassoc($result2)) {
- $user["af_".$field['field']] = $field['info'];
- }
- }
- if($action == "register") {
- $query = dbquery("SELECT message_text FROM ".TABLEPREFIX."fanfiction_messages WHERE message_name = 'tos'");
- list($tos) = dbrow($query);
- $output .= "<div class='tblborder' style='width: 90%; margin: 1em auto;'>$tos</div>";
- }
- $output .= "<div id='settingsform'><form method=\"POST\" enctype=\"multipart/form-data\" style='margin: 0 auto;' action=\"user.php?action=$action".($uid != USERUID ? "&uid=".$uid : "")."\">
- <div><label for='newpenname'>"._PENNAME.":</label>";
- if((isADMIN && uLEVEL == 1) || $action == "register")
- $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> ";
- else if(isset($user)) $output .= " ".$user['penname'];
- $output .= "</div>
- <div><label for='realname'>"._REALNAME.": </label><INPUT type=\"text\" class=\"textbox=\" name=\"realname\" maxlength=\"200\" value=\"".(isset($user) ? $user['realname'] : "")."\"></div>
- <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>
- <div><label for='bio'>"._BIO.":</label></div>
- <div style='width: 450px; margin: 0 auto;'><textarea class=\"textbox\" name=\"bio\" cols=\"50\" rows=\"6\">".(isset($user) ? stripslashes($user['bio']) : "")."</TEXTAREA></div>";
-/* The section adds fields to the form from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */
- $authorfields = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_on = '1'");
- while($field = dbassoc($authorfields)) {
- if($field['field_type'] == 1 || $field['field_type'] == 4 || $field['field_type'] == 6)
- $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";
- if($field['field_type'] == 2) {
- $output .= "<div><label for='".$field['field_name']."'>".$field['field_title'].":</label>\n
- <select class='textbox' name='af_".$field['field_name']."'>\n";
- $opts = explode("|#|", $field['field_options']);
- foreach($opts as $opt) {
- $output .= "<option".(!empty($user["af_".$field['field_id']]) && $user["af_".$field['field_id']] == $opt ? " selected" : "").">$opt</option>\n";
- }
- $output .= "</select>\n</div>\n";
- }
- if($field['field_type'] == 5) eval(stripslashes($field['field_code_in']));
- if($field['field_type'] == 3) {
- $output .= "<div class='fieldset'><span class='label'>".$field['field_title'].":</span>\n";
- $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
- <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";
- }
- }
-/* End dynamic fields */
- if($imageupload == "1")
- $output .= "<div><label for='image'>"._IMAGE.":</label> <INPUT type=\"text\" class=\"textbox=\" name=\"image\" maxlength=\"200\" value=\"".(!empty($user['image']) ? $user['image'] : "")."\"></div>";
- if($action != "register" || $pwdsetting)
- $output .= "<div><label for='password'>"._PASSWORD.":</label> <INPUT name=\"password\" class=\"textbox\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>
- <div><label for='password2'>"._PASSWORD2.":</label> <INPUT name=\"password2\" class=\"textbox=\" value=\"\" type=\"password\">".($action == "register" ? "<font color=\"red\">*</font>" : "")."</div>";
- 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>";
- $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."\">";
- if(!isADMIN)
- {
- $output .= " [<a href=\"admin.php?action=members&delete=$uid\">"._DELETE."</a>]";
- }
- $output .= "</div></form></div>".write_message("<font color=\"red\">*</font> "._REQUIREDFIELDS);
- }
-?>
--- a/bridges/eFic2eFic/queries.php
+++ /dev/null
@@ -1,19 +1,1 @@
-<?php
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases.
-
-define ("_AUTHORPREFIX", "");
-
-define ("_UIDFIELD", "author.uid"); // Do not change the aliasing (the "author." part)!
-define ("_PENNAMEFIELD", "author.penname"); // Do not change the aliasing (the "author." part)!
-define ("_EMAILFIELD", "author.email"); // Do not change the aliasing (the "author." part)!
-define ("_PASSWORDFIELD", "author.password"); // Do not change the aliasing (the "author." part)!
-define ("_AUTHORTABLE", _AUTHORPREFIX."fanfiction_authors as author"); // Do not change the aliasing (the "as author" part)!
-
-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 ");
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
-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.") ");
-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");
-?>
--- a/bridges/index.php
+++ /dev/null
--- a/bridges/php-fusion/README.txt
+++ /dev/null
@@ -1,31 +1,1 @@
-This folder contains the files to replace in your eFiction install to bridge it with
-an installation of PHP-Fusion. These files will let you use your PHP-Fusion users
-table as the authors table for eFiction. This bridge assumes your PHP-Fusion intall
-and your eFiction install share the same database.
-Move the following files to the users/ folder in your eFiction install:
-
-editbio.php
-login.php
-profile.php
-register.php
-lostpassword.php
-
-Move the following files to the includes/ folder in your eFiction install:
-
-get_session_vars.php
-queries.php
-
-Edit queries.php to point to your PHP-Fusion tables.
-
-Goto Admin->Page Links and edit your Register and Lost Password links to point to your
-PHP-Fusion pages.
-
-Register -> PATHTOPHPFUSION/register.php
-Lost Password -> PATHTOPHPFUSION/lostpassword.php
-
-If eFiction is a sub-folder under PHP-Fusion PATHTOPHPFUSION will be ../
-
-
-
-
--- a/bridges/php-fusion/editbio.php
+++ /dev/null
@@ -1,30 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.0
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-
-$output .= "<script language=\"javascript\" type=\"text/javascript\">
-location = \""._PATHTOFUSION."edit_profile.php".(isset($_GET['uid']) ? ";u=".$_GET['uid'] : "")."\";
-</script>";
-?>
--- a/bridges/php-fusion/get_session_vars.php
+++ /dev/null
@@ -1,54 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.2
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-// Get session variables from cookie data if not logged in.
-if (isset($_COOKIE['fusion_user']) && !defined("isMEMBER")) {
- $cookie_vars = explode(".", $_COOKIE['fusion_user']);
- $cookie_1 = preg_match("/^[0-9]+$/", $cookie_vars['0']) ? $cookie_vars['0'] : "0";
- $cookie_2 = (preg_match("/^[0-9a-z]{32}$/", $cookie_vars['1']) ? $cookie_vars['1'] : "");
- $userdata = dbassoc(dbquery("SELECT * FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_authorprefs as ap) WHERE "._UIDFIELD." = '$cookie_1' AND "._PASSWORDFIELD." ='$cookie_2' AND "._UIDFIELD." = ap.uid"));
- if($userdata) {
- if($userdata['uid'] == 0) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_authorprefs(uid, userskin, storyindex, sortby, tinyMCE) VALUES('".$userdata['user_id']."', '$defaultskin', '$displayindex', '$defaultsort', '$tinyMCE')");
- define("USERUID", $userdata['user_id']);
- define("USERPENNAME", $userdata['user_name']);
- if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];
- else if(isset($_SESSION[$sitekey."_skin"])) $siteskin = $_SESSION[$sitekey."_skin"];
- else $siteskin = $defaultskin;
- define("uLEVEL", $userdata['level']);
- define("isADMIN", uLEVEL > 0 ? true : false);
- define("isMEMBER", true);
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $userdata['ageconsent'];
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
- if (empty($_COOKIE['fusion_lastvisit']))
- setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600, "/", "", "0");
- }
-}
-if(!defined("USERUID")) define("USERUID", false);
-if(!defined("USERPENNAME")) define("USERPENNAME", false);
-if(!defined("uLEVEL")) define("uLEVEL", 0);
-if(!defined("isMEMBER")) define("isMEMBER", false);
-if(!defined("isADMIN")) define("isADMIN", false);
-
-?>
--- a/bridges/php-fusion/index.php
+++ /dev/null
--- a/bridges/php-fusion/login.php
+++ /dev/null
@@ -1,71 +1,1 @@
-<?php
- if(isset($_POST['submit']) && preg_match("!^[a-z0-9_ ]{3,30}$!i", $_POST['penname'])) {
-if(!defined("_LOGINCHECK")) exit( );
- define("_BASEDIR", "");
- include("config.php");
- $settings = dbquery("SELECT tableprefix, maintenance FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".$sitekey."'");
- list($tableprefix, $maintenance) = dbrow($settings);
- include("includes/queries.php");
- $result = dbquery("SELECT * FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs AS ap ON ap.uid = "._UIDFIELD." WHERE "._PENNAMEFIELD." = '".$_POST['penname']."'");
- $passwd = dbassoc($result);
- if($maintenance && $passwd['level'] == 0) {
- header("Location: maintenance.php");
- exit( );
- }
- $encryptedpassword = md5($_POST['password']);
- if($passwd['user_password'] == $encryptedpassword) {
- if(!isset($_SESSION)) session_start( );
- $_SESSION[$sitekey."_useruid"] = $passwd['user_id'];
- $_SESSION[$sitekey."_salt"] = md5($passwd['user_email'] . $encryptedpassword);
- if(isset($_POST['cookiecheck'])) {
- $cookie_exp = time() + 3600*24*30; } else { $cookie_exp = time() + 3600*3;
- }
- $cookie_value = $passwd['user_id'].".".$passwd['user_password'];
- setcookie("fusion_user", $cookie_value, $cookie_exp);
- setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600);
- define("USERUID", $passwd['uid']);
- define("USERPENNAME", $passwd['penname']);
- if(!isset($_SESSION[$sitekey."_skin"])) $siteskin = $passwd['userskin'];
- else $siteskin = $_SESSION[$sitekey."_skin"];
- define("uLEVEL", $passwd['level']);
- define("isADMIN", uLEVEL > 0 ? true : false);
- define("isMEMBER", true);
- if(!isset($_SESSION[$sitekey."_agecontsent"])) $ageconsent = $passwd['ageconsent'];
- else $ageconsent = $_SESSION[$sitekey."_agecontsent"];
- $cookie_value = $passwd['user_id'].".".$passwd['user_password'];
- setcookie("fusion_user", $cookie_value, time() + 3600, "/", "", "0");
- if (empty($_COOKIE['fusion_lastvisit']))
- setcookie("fusion_lastvisit", $userdata['user_lastvisit'], time() + 3600, "/", "", "0");
- }
- else {
- require_once("header.php");
- //make a new TemplatePower object
- if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
- else $tpl = new TemplatePower("default_tpls/default.tpl");
- include_once("includes/pagesetup.php");
- $output2 .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>";
- $output2 .= "<div style='text-align: center;'>"._WRONGPASSWORD."</div>";
- $tpl->assign("output", $output);
- $tpl->printToScreen( );
- dbclose( );
- exit( );
- }
- }
- else {
-if(!defined("_CHARSET")) exit( );
- $output .= "<div id=\"pagetitle\">"._MEMBERLOGIN."</div>";
- $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'] : "")."\">
- <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 />
- <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 />
- <INPUT type=\"checkbox\" class=\"checkbox\" name=\"cookiecheck\" id=\"cookiecheck\" value=\"1\"><label for=\"cookiecheck\">"._REMEMBERME."</label><br />
- <INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\">
- </form></div>";
- $linkquery = dbquery("SELECT * from ".TABLEPREFIX."fanfiction_pagelinks WHERE link_name = 'login' OR link_name = 'lostpassword'");
- while($link = dbassoc($linkquery)) {
- if($link['link_access'] && !isMEMBER) continue;
- if($link['link_access'] == 2 && !isADMIN) continue;
- $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>");
- }
- $output .= "<div style='text-align: center;'>".$pagelinks['register']['link']." | ".$pagelinks['lostpassword']['link']."</div>";
- }
-?>
+
--- a/bridges/php-fusion/logout.php
+++ /dev/null
@@ -1,44 +1,1 @@
-<?php
-if(!defined("_LOGOUTCHECK")) exit( );
- define("_BASEDIR", "");
- include("config.php");
- include("includes/queries.php");
- session_start( );
- foreach ($_SESSION as $VarName => $Value) {
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
- if(strpos($VarName, "skin")) continue;
- $_SESSION[$VarName] = "";
- unset($_SESSION[$VarName]);
- unset($_COOKIE[$VarName]);
- setcookie($VarName, '', time() - 1000, '/', '', '' );
- }
- }
- foreach ($_COOKIE as $VarName => $Value) {
- if(substr($VarName, 0, strlen($sitekey)) == $sitekey) {
- unset($_COOKIE[$VarName]);
- setcookie($VarName, "", time() - 1000, '/', '', '' );
- }
- }
- $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".$_SERVER['REMOTE_ADDR']."'");
- unset($_COOKIE["fusion_user"], $_COOKIE["fusion_lastvisited"], $_COOKIE['fusion_visited']);
- setcookie("fusion_user", "", time() - 1000);
- setcookie("fusion_lastvisit", "", time() - 1000);
- setcookie("fusion_visited", "", time() - 1000);
-require_once("header.php");
-//make a new TemplatePower object
-if(file_exists("$skindir/default.tpl")) $tpl = new TemplatePower( "$skindir/default.tpl" );
-else $tpl = new TemplatePower("default_tpls/default.tpl");
-if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
-else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" );
-include("includes/pagesetup.php");
-
-$output .= write_message(_ACTIONSUCCESSFUL);
-$tpl->assign("output", $output);
-$tpl->printToScreen( );
-dbclose( );
-exit();
-
-// header("Location: index.php");
-// exit( );
-?>
--- a/bridges/php-fusion/lostpassword.php
+++ /dev/null
@@ -1,29 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.0
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-$output .= "<script language=\"javascript\" type=\"text/javascript\">
-location = \""._PATHTOFUSION."lostpassword.php\";
-</script>";
-?>
--- a/bridges/php-fusion/profile.php
+++ /dev/null
@@ -1,52 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.0
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-// Build the user's profile information
-$tpl->newBlock("profile");
-$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");
-$userinfo = dbassoc($result2);
-$nameinfo = "";
-if($userinfo['email'])
- $nameinfo .= " [<a href=\"viewuser.php?action=contact&uid=".$userinfo['uid']."\">"._CONTACT."</a>]";
-if($favorites == "1" && isMEMBER)
- $nameinfo .= " [<a href=\"viewuser.php?uid=USERUID&action=addfav&author=".$userinfo['uid']."\">"._ADDAUTHOR2FAVES."</a>]";
-$tpl->assign("userpenname", $userinfo['penname']." ".$nameinfo);
-$tpl->assign("membersince", date("$dateformat", $userinfo['user_joined']));
-if($userinfo['image'])
- $tpl->assign("image", "<img src=\"../images/avatars/".$userinfo['image']."\">");
-$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
-$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);
-$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);
-$tpl->assign("msn", "<img src=\"images/msntalk.gif\" alt=\""._MSN."\"> ".($userinfo['user_msn'] ? $userinfo['user_msn'] : _NONE));
-$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);
-$adminopts = "";
-if(isADMIN && uLEVEL < 3) {
- $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>]";
- $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>]";
- $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>";
- $tpl->assign("adminoptions", $adminopts);
-}
-$tpl->gotoBlock("_ROOT");
-?>
--- a/bridges/php-fusion/queries.php
+++ /dev/null
@@ -1,23 +1,1 @@
-<?php
-// Default query strings used throughout the script. You may need to alter these to bridge to other scripts or databases.
-
-// Your php-fusion database prefix found in the config.php of your php-fusion directory.
-$db_prefix = "fusion_";
-
-// This should be the relative path to your PHP-Fusion installation. It will be used for your register, edit bio, etc. pages.
-define("_PATHTOFUSION", "../fusion");
-
-define("_UIDFIELD", "author.user_id"); // Do not change the aliasing (the "author." part)!
-define("_PENNAMEFIELD", "author.user_name"); // Do not change the aliasing (the "author." part)!
-define("_EMAILFIELD", "author.user_email"); // Do not change the aliasing (the "author." part)!
-define("_PASSWORDFIELD", "author.user_password"); // Do not change the aliasing (the "author." part)!
-define("_AUTHORTABLE", $db_prefix."users as author"); // Do not change the aliasing (the "as author" part)!
-
-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 ");
-define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
-define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
-define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
-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.") ");
-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");
-?>
--- a/bridges/php-fusion/register.php
+++ /dev/null
@@ -1,29 +1,1 @@
-<?php
-// ----------------------------------------------------------------------
-// eFiction 3.0
-// Copyright (c) 2007 by Tammy Keefer
-// Valid HTML 4.01 Transitional
-// Based on eFiction 1.1
-// Copyright (C) 2003 by Rebecca Smallwood.
-// http://efiction.sourceforge.net/
-// ----------------------------------------------------------------------
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License (GPL)
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// To read the license please visit http://www.gnu.org/copyleft/gpl.html
-// ----------------------------------------------------------------------
-if(!defined("_CHARSET")) exit( );
-$output .= "<script language=\"javascript\" type=\"text/javascript\">
-location = \""._PATHTOFUSION."register.php\";
-</script>";
-?>