1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Cleanup old files (mostly 0.6 compatibility in 0.7), move restcore to utilities directory

This commit is contained in:
e107steved
2008-10-14 20:24:34 +00:00
parent 17d0f353a0
commit 551307df92
29 changed files with 4 additions and 1569 deletions

View File

@@ -1,41 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/article.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:01 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
// This file is now deprecated and remains in core for backward compatibility reasons.
$tmp = explode(".", $_SERVER['QUERY_STRING']);
$action = $tmp[0];
$sub_action = $tmp[1];
$id = $tmp[2];
if ($sub_action == 255) {
// content page
header("Location: content.php?content.{$action}");
exit;
}
if ($action == 0) {
// content page
header("Location: content.php?article");
exit;
} else {
header("Location: content.php?review");
exit;
}
?>

View File

@@ -1,105 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/backend.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:01 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("class2.php");
$pubdate = strftime("%a, %d %b %Y %I:%M:00 GMT", time());
$rss = "<?xml version=\"1.0\"?>
<rss version=\"2.0\">
<channel>
<title>".SITENAME."</title>
<link>".SITEURL."</link>
<description>".SITEDESCRIPTION."</description>
<language>en-gb</language>
<copyright>".SITEDISCLAIMER."</copyright>
<managingEditor>".SITEADMIN."</managingEditor>
<webMaster>".SITEADMINEMAIL."</webMaster>
<pubDate>{$pubdate}</pubDate>
<lastBuildDate>{$pubdate}</lastBuildDate>
<docs>http://backend.userland.com/rss</docs>
<skipDays><day></day></skipDays>
<skipHours><hour></hour></skipHours>
<generator>e107 website system (http://e107.org)</generator>
<ttl>60<ttl>
<image>
<title>".SITENAME."</title>
<url>".SITEBUTTON."</url>
<link>".SITEURL."</link>
<width>88</width>
<height>31</height>
<description>".SITETAG."</description>
</image>
<textInput>
<title>Search</title>
<description>Search ".SITENAME."</description>
<name>query</name>
<link>".SITEURL."search.php</link>
</textInput>
";
$sql2 = new db;
$sql->db_Select("news", "*", "news_class=0 AND (news_start=0 || news_start < ".time().") AND (news_end=0 || news_end>".time().") ORDER BY news_datestamp DESC LIMIT 0, 10");
while ($row = $sql->db_Fetch()) {
extract($row);
$sql2->db_Select("news_category", "*", "category_id='{$news_category}'");
$row = $sql->db_Fetch();
extract($row);
$sql2->db_Select("user", "user_name", "user_id='{$news_author}' ");
$row = $sql->db_Fetch();
extract($row);
$tmp = explode(" ", $news_body);
unset($nb);
for($a = 0; $a <= 100; $a++) {
$nb .= $tmp[$a]." ";
}
$nb = htmlspecialchars($nb);
$wlog .= $news_title."\n".SITEURL."/comment.php?comment.news.".$news_id."\n\n";
$itemdate = strftime("%a, %d %b %Y %I:%M:00 GMT", $news_datestamp);
$rss .= "<item>
<title>$news_title</title>
<link>http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$news_id."</link>
<description>$nb</description>
<category domain=\"".SITEURL."\">$category_name</category>
<comments>http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$news_id."</comments>
<author>$user_name</author>
<pubDate>$itemdate</pubDate>
<guid isPermaLink=\"true\">http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$news_id."</guid>
</item>
";
}
$rss .= "</channel>
</rss>";
echo $rss;
?>

View File

@@ -1,81 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/content.php,v $
| $Revision: 1.2 $
| $Date: 2007-12-28 01:17:00 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("class2.php");
//##### REDIRECTION MANAGEMENT -----------------------------------------------------------------------------
if($content_install = $sql -> db_Select("plugin", "*", "plugin_path = 'content' AND plugin_installflag = '1' ")){
//require_once($plugindir."handlers/content_class.php");
//$aa = new content;
$tmp = explode(".", e_QUERY);
if($tmp[0]){
//get type_id from the row with heading content, article or review
//this will only work if the three main parents are not renamed !
if(!$sql -> db_Select("pcontent", "content_id", "content_heading='".$tp -> toDB($tmp[0])."'")){
header("location:".e_PLUGIN."content/content.php");
exit;
}else{
$row = $sql -> db_Fetch();
}
}
if ($tmp[0] == "content") {
if (is_numeric($tmp[1])) { //content view
$tmp[1] = intval($tmp[1]);
header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]);
exit;
}else{ //content recent page
header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']);
exit;
}
}elseif ($tmp[0] == "article" || $tmp[0] == "review") {
if (is_numeric($tmp[1])) { //item view
$tmp[1] = intval($tmp[1]);
header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]);
exit;
}elseif($tmp[1] == "cat" ) { //category page
if(!$tmp[2] || $tmp[2] == "0") { //all categories
//$mainparent = $aa -> getMainParent($tmp[2]);
//header("location:".e_PLUGIN."content/content.php?cat.list.".$mainparent."");
header("location:".e_PLUGIN."content/content.php");
exit;
}else{ //view category
header("location:".e_PLUGIN."content/content.php?cat.".$tmp[2]);
exit;
}
} else { //recent page
header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']);
exit;
}
}else{ //redirect to new content main page
header("location:".e_PLUGIN."content/content.php");
exit;
}
}
//##### END REDIRECTION MANAGEMENT -------------------------------------------------------------------------
header("location:".e_BASE."index.php");
exit;
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/admin_classis.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:11 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/admin_combo.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:11 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/admin_etalkers.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:11 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/adminb.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:11 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,23 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/article.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:11 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
header('Location: admin.php');
exit;
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/cascade.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:12 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/categories.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:12 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/classis.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:12 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/combo.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:12 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,27 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/compact.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:12 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("../class2.php");
if (ADMIN) {
header('Location:'.SITEURL.$ADMIN_DIRECTORY.'admin.php');
exit;
} else {
header('Location:'.SITEURL.'index.php');
exit;
}
?>

View File

@@ -1,23 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/content.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:12 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
header('Location: admin.php');
exit;
?>

View File

@@ -1,23 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/review.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:28 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
header('Location: admin.php');
exit;
?>

View File

@@ -1,300 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_pg.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:33 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
header("location:../index.php");
exit;
?>
CREATE SEQUENCE banner_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE chatbox_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE comments_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE content_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE download_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE download_category_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE forum_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE forum_t_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE headlines_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE links_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE menus_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE news_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE news_category_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE plugin_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE poll_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE SEQUENCE rate_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
CREATE TABLE banlist (
banlist_ip varchar(100) NOT NULL,
banlist_admin int4 DEFAULT '0' NOT NULL,
banlist_reason text NOT NULL,
CONSTRAINT banlist_pkey PRIMARY KEY (banlist_ip)
);
CREATE TABLE banner (
banner_id int4 NOT NULL,
banner_clientname varchar(100) DEFAULT '' NOT NULL,
banner_clientlogin varchar(20) DEFAULT '' NOT NULL,
banner_clientpassword varchar(50) DEFAULT '' NOT NULL,
banner_image varchar(150) DEFAULT '' NOT NULL,
banner_clickurl varchar(150) DEFAULT '' NOT NULL,
banner_impurchased int4 DEFAULT '0' NOT NULL,
banner_startdate int4 DEFAULT '0' NOT NULL,
banner_enddate int4 DEFAULT '0' NOT NULL,
banner_active int2 DEFAULT '0' NOT NULL,
banner_clicks int4 DEFAULT '0' NOT NULL,
banner_impressions int4 DEFAULT '0' NOT NULL,
banner_ip text NOT NULL,
banner_campaign varchar(150) DEFAULT '' NOT NULL,
CONSTRAINT banner_pkey PRIMARY KEY (banner_id)
);
CREATE TABLE chatbox (
cb_id int4 NOT NULL,
cb_nick varchar(30) DEFAULT '' NOT NULL,
cb_message text NOT NULL,
cb_datestamp int4 DEFAULT '0' NOT NULL,
cb_blocked int2 DEFAULT '0' NOT NULL,
cb_ip varchar(15) DEFAULT '' NOT NULL,
CONSTRAINT chatbox_pkey PRIMARY KEY (cb_id)
);
CREATE TABLE comments (
comment_id int4 DEFAULT '0' NOT NULL,
comment_pid int4 DEFAULT '0' NOT NULL,
comment_item_id int4 DEFAULT '0' NOT NULL,
comment_subject varchar(100) DEFAULT '' NOT NULL,
comment_author varchar(100) DEFAULT '' NOT NULL,
comment_author_email varchar(200) DEFAULT '' NOT NULL,
comment_datestamp int4 DEFAULT '0' NOT NULL,
comment_comment text NOT NULL,
comment_blocked int2 DEFAULT '0' NOT NULL,
comment_ip varchar(20) DEFAULT '' NOT NULL,
comment_type varchar(10) DEFAULT '' NOT NULL,
CONSTRAINT comments_pkey PRIMARY KEY (comment_id)
);
CREATE TABLE content (
content_id int4 DEFAULT '0' NOT NULL,
content_heading text NOT NULL,
content_subheading text NOT NULL,
content_content text NOT NULL,
content_parent int4 DEFAULT '0' NOT NULL,
content_datestamp int4 DEFAULT '0' NOT NULL,
content_author varchar(200) DEFAULT '' NOT NULL,
content_comment int2 DEFAULT '0' NOT NULL,
content_summary text NOT NULL,
content_type int2 DEFAULT '0' NOT NULL,
content_review_score int2 DEFAULT '0' NOT NULL,
content_pe_icon int2 DEFAULT '0' NOT NULL,
content_class int2 DEFAULT '0' NOT NULL,
CONSTRAINT content_pkey PRIMARY KEY (content_id)
);
CREATE TABLE core (
e107_name varchar(20) DEFAULT '' NOT NULL,
e107_value text NOT NULL,
CONSTRAINT core_pkey PRIMARY KEY (e107_name)
);
CREATE TABLE download (
download_id int4 DEFAULT '0' NOT NULL,
download_name varchar(100) DEFAULT '' UNIQUE NOT NULL,
download_url varchar(150) DEFAULT '' NOT NULL,
download_author varchar(100) DEFAULT '' NOT NULL,
download_author_email varchar(200) DEFAULT '' NOT NULL,
download_author_website varchar(200) DEFAULT '' NOT NULL,
download_description text NOT NULL,
download_filesize varchar(20) DEFAULT '' NOT NULL,
download_requested int4 DEFAULT '0' NOT NULL,
download_category int4 DEFAULT '0' NOT NULL,
download_active int2 DEFAULT '0' NOT NULL,
download_datestamp int4 DEFAULT '0' NOT NULL,
download_thumb varchar(150) DEFAULT '' NOT NULL,
download_image varchar(150) DEFAULT '' NOT NULL,
download_comment int2 DEFAULT '0' NOT NULL,
CONSTRAINT download_pkey PRIMARY KEY (download_id)
);
CREATE TABLE download_category (
download_category_id int4 DEFAULT '0' NOT NULL,
download_category_name varchar(100) DEFAULT '' NOT NULL,
download_category_description text NOT NULL,
download_category_icon varchar(100) DEFAULT '' NOT NULL,
download_category_parent int4 DEFAULT '0' NOT NULL,
download_category_class varchar(100) DEFAULT '' NOT NULL,
CONSTRAINT download_category_pkey PRIMARY KEY (download_category_id)
);
CREATE TABLE flood (
flood_url text NOT NULL,
flood_time int4 DEFAULT '0' NOT NULL,
);
CREATE TABLE forum (
forum_id int4 DEFAULT '0' NOT NULL,
forum_name varchar(250) DEFAULT '' NOT NULL,
forum_description text NOT NULL,
forum_parent int4 DEFAULT '0' NOT NULL,
forum_datestamp int4 DEFAULT '0' NOT NULL,
forum_moderators text NOT NULL,
forum_threads int4 DEFAULT '0' NOT NULL,
forum_replies int4 DEFAULT '0' NOT NULL,
forum_lastpost varchar(200) DEFAULT '' NOT NULL,
forum_class varchar(100) DEFAULT '' NOT NULL,
forum_order int4 DEFAULT '0' NOT NULL,
CONSTRAINT forum_pkey PRIMARY KEY (forum_id)
);
CREATE TABLE forum_t (
thread_id int4 DEFAULT '0' NOT NULL,
thread_name varchar(250) DEFAULT '' NOT NULL,
thread_thread text NOT NULL,
thread_forum_id int4 DEFAULT '0' NOT NULL,
thread_datestamp int4 DEFAULT '0' NOT NULL,
thread_parent int4 DEFAULT '0' NOT NULL,
thread_user varchar(250) DEFAULT '' NOT NULL,
thread_views int4 DEFAULT '0' NOT NULL,
thread_active int2 DEFAULT '0' NOT NULL,
thread_lastpost int4 DEFAULT '0' NOT NULL,
thread_s int2 DEFAULT '0' NOT NULL,
CONSTRAINT forum_t_pkey PRIMARY KEY (thread_id)
);
CREATE TABLE headlines (
headline_id int4 DEFAULT '0' NOT NULL,
headline_url varchar(150) DEFAULT '' NOT NULL,
headline_data text NOT NULL,
headline_timestamp int4 DEFAULT '0' NOT NULL,
headline_description text NOT NULL,
headline_image varchar(100) DEFAULT '' NOT NULL,
headline_active int2 DEFAULT '0' NOT NULL,
CONSTRAINT headlines_pkey PRIMARY KEY (headline_id)
);
CREATE TABLE links (
link_id int4 DEFAULT '0' NOT NULL,
link_name varchar(100) DEFAULT '' NOT NULL,
link_url varchar(200) DEFAULT '' NOT NULL,
link_description text NOT NULL,
link_button varchar(100) DEFAULT '' NOT NULL,
link_category int2 DEFAULT '0' NOT NULL,
link_order int4 DEFAULT '0' NOT NULL,
link_refer int4 DEFAULT '0' NOT NULL,
link_open int2 DEFAULT '0' NOT NULL,
link_class int2 DEFAULT '0' NOT NULL,
CONSTRAINT links_pkey PRIMARY KEY (link_id)
);
CREATE TABLE menus (
menu_id int4 DEFAULT '0' NOT NULL,
menu_name varchar(100) DEFAULT '' NOT NULL,
menu_location int2 DEFAULT '0' NOT NULL,
menu_order int2 DEFAULT '0' NOT NULL,
menu_class int2 DEFAULT '0' NOT NULL,
menu_pages text NOT NULL,
CONSTRAINT menus_pkey PRIMARY KEY (menu_id)
);
CREATE TABLE news (
news_id int4 DEFAULT '0' NOT NULL,
news_title varchar(200) DEFAULT '' NOT NULL,
news_body text NOT NULL,
news_extended text NOT NULL,
news_datestamp int4 DEFAULT '0' NOT NULL,
news_author int4 DEFAULT '0' NOT NULL,
news_category int2 DEFAULT '0' NOT NULL,
news_allow_comments int2 DEFAULT '0' NOT NULL,
news_start int4 DEFAULT '0' NOT NULL,
news_end int4 DEFAULT '0' NOT NULL,
news_class int2 DEFAULT '0' NOT NULL,
news_render_type int2 DEFAULT '0' NOT NULL,
news_comment_total int4 DEFAULT '0' NOT NULL,
CONSTRAINT news_pkey PRIMARY KEY (news_id)
);
CREATE TABLE news_category (
category_id int4 DEFAULT '0' NOT NULL,
category_name varchar(200) DEFAULT '' NOT NULL,
category_icon varchar(250) DEFAULT '' NOT NULL,
CONSTRAINT news_category_pkey PRIMARY KEY (category_id)
);
CREATE TABLE online (
online_timestamp int4 DEFAULT '0' NOT NULL,
online_flag int2 DEFAULT '0' NOT NULL,
online_user_id varchar(100) DEFAULT '' NOT NULL,
online_ip varchar(15) DEFAULT '' NOT NULL,
online_location varchar(100) DEFAULT '' NOT NULL,
online_pagecount tinyint(3) int2 DEFAULT '0' NOT NULL,
online_active int4 DEFAULT '0' NOT NULL,
);
CREATE TABLE plugin (
plugin_id int4 DEFAULT '0' NOT NULL,
plugin_name varchar(100) DEFAULT '' NOT NULL,
plugin_version varchar(10) DEFAULT '' NOT NULL,
plugin_path varchar(100) DEFAULT '' NOT NULL,
plugin_installflag int2 DEFAULT '0' NOT NULL,
CONSTRAINT plugin_pkey PRIMARY KEY (plugin_id)
);
CREATE TABLE poll (
poll_id int4 DEFAULT '0' NOT NULL,
poll_datestamp int4 DEFAULT '0' NOT NULL,
poll_end_datestamp int4 DEFAULT '0' NOT NULL,
poll_admin_id int4 DEFAULT '0' NOT NULL,
poll_title varchar(250) DEFAULT '' NOT NULL,
poll_option_1 varchar(250) DEFAULT '' NOT NULL,
poll_option_2 varchar(250) DEFAULT '' NOT NULL,
poll_option_3 varchar(250) DEFAULT '' NOT NULL,
poll_option_4 varchar(250) DEFAULT '' NOT NULL,
poll_option_5 varchar(250) DEFAULT '' NOT NULL,
poll_option_6 varchar(250) DEFAULT '' NOT NULL,
poll_option_7 varchar(250) DEFAULT '' NOT NULL,
poll_option_8 varchar(250) DEFAULT '' NOT NULL,
poll_option_9 varchar(250) DEFAULT '' NOT NULL,
poll_option_10 varchar(250) DEFAULT '' NOT NULL,
poll_votes_1 int4 DEFAULT '0' NOT NULL,
poll_votes_2 int4 DEFAULT '0' NOT NULL,
poll_votes_3 int4 DEFAULT '0' NOT NULL,
poll_votes_4 int4 DEFAULT '0' NOT NULL,
poll_votes_5 int4 DEFAULT '0' NOT NULL,
poll_votes_6 int4 DEFAULT '0' NOT NULL,
poll_votes_7 int4 DEFAULT '0' NOT NULL,
poll_votes_8 int4 DEFAULT '0' NOT NULL,
poll_votes_9 int4 DEFAULT '0' NOT NULL,
poll_votes_10 int4 DEFAULT '0' NOT NULL,
poll_ip text NOT NULL,
poll_active int2 DEFAULT '0' NOT NULL,
poll_comment int2 DEFAULT '1' NOT NULL,
CONSTRAINT poll_pkey PRIMARY KEY (poll_id)
);
CREATE TABLE rate (
rate_id int4 DEFAULT '0' NOT NULL,
rate_table varchar(100) DEFAULT '' NOT NULL,
rate_itemid int4 DEFAULT '0' NOT NULL,
rate_rating int4 DEFAULT '0' NOT NULL,
rate_votes int4 DEFAULT '0' NOT NULL,
rate_voters text NOT NULL,
CONSTRAINT rate_pkey PRIMARY KEY (rate_id)
);

View File

@@ -10,10 +10,10 @@
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_files/resetcore/resetcore.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:38 $
| $Author: mcfly_e107 $
| $Source: /cvs_backup/e107_0.8/e107_files/utilities/resetcore.php,v $
| $Revision: 1.1 $
| $Date: 2008-10-14 20:24:29 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/

View File

@@ -1,28 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/parser_functions.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:47 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@include_once(e_LANGUAGEDIR.e_LAN."/lan_parser_functions.php");
@include_once(e_LANGUAGEDIR."English/lan_parser_functions.php");
function e107core_parse($match, $referrer) {
global $pref;
}
?>

View File

@@ -1,69 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/parser_handler.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:47 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
function register_parser($plugin_name, $regexp) {
if ($plugin_name != '' OR $regexp != '') {
if (file_exists(e_PLUGIN."{$plugin_name}/parser.php")) {
require_once(e_PLUGIN."{$plugin_name}/parser.php");
if (function_exists($plugin_name.'_parse')) {
if (IsRegExp($regexp)) {
$oursql = new db;
$oursql->db_Select("parser", "*", "parser_pluginname = '{$plugin_name}' AND parser_regexp = '{$regexp}'");
if ($row = $oursql->db_Fetch()) {
// Already exists, handle error if needed.
} else {
$regexp = str_replace("\\" , "\\\\", $regexp);
$oursql->db_Insert("parser", "0, '{$plugin_name}', '{$regexp}'");
return 1;
}
} else {
// handle error if wanted to - not a valid regexp
}
} else {
// handle error if wanted to - function does not exist
}
} else {
// handle error if wanted to - Unable to include file
}
} else {
// handle error if wanted to - plugin name or regexp value empty
}
}
function IsRegExp($sREGEXP) {
$sPREVIOUSHANDLER = Set_Error_Handler("TrapError");
Preg_Match ($sREGEXP, "");
Restore_Error_Handler ($sPREVIOUSHANDLER);
Return !TrapError ();
}
function TrapError () {
Static $iERRORES;
if (!Func_Num_Args()) {
$iRETORNO = $iERRORES;
$iERRORES = 0;
return $iRETORNO;
} else {
$iERRORES++;
}
}
?>

View File

@@ -1,118 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/session_handler.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:57 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
function sess_open($save_path, $session_name) {
global $mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb, $mySQLprefix, $session_connection;
if(defined("USE_PERSISTANT_DB") && USE_PERSISTANT_DB == true){
$session_connection = mysql_pconnect($mySQLserver, $mySQLuser, $mySQLpassword);
} else {
$session_connection = mysql_connect($mySQLserver, $mySQLuser, $mySQLpassword);
}
mysql_select_db($mySQLdefaultdb, $session_connection);
return true;
}
function sess_close() {
return true;
}
function sess_read($session_id) {
global $session_connection, $session_lifetime, $mySQLprefix, $session_read;
if ($result = mysql_query("SELECT * FROM ".$mySQLprefix."session WHERE session_id = '$session_id' AND session_expire > " . time(), $session_connection)) {
$session_read = mysql_fetch_assoc($result);
return $session_read['session_data'];
} else {
return FALSE;
}
}
function sess_write($session_id, $session_data) {
if (!$session_data) {
return FALSE;
}
global $session_connection, $session_lifetime, $mySQLprefix, $session_read;
$expiry = time() + $session_lifetime;
if ($session_read && $session_read['session_ip'] != get_full_ip()) {
session_destroy();
die("Invalid session ID");
}
$_session_data = mysql_real_escape_string($session_data);
if ($session_read) {
$query = "UPDATE ".$mySQLprefix."session SET session_expire = $expiry, session_data = '$_session_data' WHERE session_id = '$session_id' AND session_expire > " . time();
$result = mysql_query($query, $session_connection);
} else {
$query = "INSERT INTO ".$mySQLprefix."session VALUES ('$session_id', $expiry, ".time().", '".get_full_ip()."', '$_session_data')";
$result = mysql_query($query, $session_connection);
}
return TRUE;
}
function sess_destroy($session_id) {
global $session_connection, $mySQLprefix;
$query = "DELETE FROM ".$mySQLprefix."session WHERE session_id = '$session_id'";
$result = mysql_query($query, $session_connection);
return TRUE;
}
function sess_gc($session_lifetime) {
global $session_connection, $mySQLprefix;
$query = "DELETE FROM ".$mySQLprefix."session WHERE session_expire < " . time();
$result = mysql_query($query, $session_connection);
return mysql_affected_rows($session_connection);
}
function get_full_ip() {
global $e107;
$ip_addr = $e107->getip();
$tmp = $_SERVER['REMOTE_ADDR'];
$ip_resolved = $e107->get_host_name($tmp);
$tmp2 = ($tmp != $ip_resolved && $ip_resolved ? $tmp." - ". $ip_resolved : $tmp2 = $tmp);
$full_ip = ($ip_addr != $tmp ? "$ip_addr | $tmp2" : $tmp2);
return $full_ip;
}
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
e107_ini_set ("session.save_handler", "user" );
$session_cookie_lifetime = 0;
$session_cookie_path = '/';
$session_cookie_domain = '';
$session_cache_expire = 60 * 24 * 30;
//$session_lifetime = ini_get("session.gc_maxlifetime");
$session_lifetime = 60 * 24 * 30;
session_name("PHPSESSID");
if ($_SERVER["HTTPS"] == "on") {
$session_cookie_secure = true;
}
session_set_cookie_params($session_cookie_lifetime, $session_cookie_path, $session_cookie_domain, $session_cookie_secure);
if (version_compare(phpversion(), "4.3.0", ">=")) e107_ini_set ("session.use_only_cookies", $session_use_only_cookies );
if (version_compare(phpversion(), "4.2.0", ">=")) session_cache_expire ($session_cache_expire);
e107_ini_set ("session.url_rewriter.tags", 'a=href,area=href,frame=src,input=src,form=fakeentry');
if ($sql->db_Select("session", "session_id", "session_ip='".get_full_ip()."' ")) {
$row = $sql->db_Fetch();
session_id($row['session_id']);
}
session_start();
?>

View File

@@ -1,210 +0,0 @@
<?php
if (!defined('e107_INIT')) { exit; }
/***************************************************************************
* smtp.php
* -------------------
* begin : Wed May 09 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: smtp.php,v 1.1.1.1 2006-12-02 04:33:58 mcfly_e107 Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
/***************************************************************************
*
* modified for use with e107 website system
* http://e107.org
*
***************************************************************************/
//
// This function has been modified as provided
// by SirSir to allow multiline responses when
// using SMTP Extensions
//
function server_parse($socket, $response) {
while (substr($server_response, 3, 1) != ' ' ) {
if (!($server_response = fgets($socket, 256) ) ) {
print("Couldn't get mail server response codes". __LINE__."&nbsp;".__FILE__);
return FALSE;
}
}
if (!(substr($server_response, 0, 3) == $response ) ) {
// echo ("Ran into problems sending Mail. Response: $server_response ");
return FALSE;
}
}
/****************************************************************************
* Function: smtpmail
* Description: This is a functional replacement for php's builtin mail
* function, that uses smtp.
* Usage: The usage for this function is identical to that of php's
* built in mail function.
****************************************************************************/
function smtpmail($mail_to, $subject, $message, $headers = "") {
// For now I'm using an array based $smtp_vars to hold the smtp server
// info, but it should probably change to $board_config...
// then the relevant info would be $board_config['smtp_host'] and
// $board_config['smtp_port'].
global $pref, $e107;
//
// Fix any bare linefeeds in the message to make it RFC821 Compliant.
//
$message = preg_replace("/(?<!\r)\n/si", "\r\n", $message);
if ($headers != "") {
if (is_array($headers)) {
if (sizeof($headers) > 1) {
$headers = join("\r\n", $headers);
} else {
$headers = $headers[0];
}
}
$headers = chop($headers);
//
// Make sure there are no bare linefeeds in the headers
//
$headers = preg_replace("/(?<!\r)\n/si", "\r\n", $headers);
//
// Ok this is rather confusing all things considered,
// but we have to grab bcc and cc headers and treat them differently
// Something we really didn't take into consideration originally
//
$header_array = explode("\r\n", $headers);
@reset($header_array);
$headers = "";
while (list(, $header) = each($header_array) ) {
if (preg_match("/^cc:/si", $header) ) {
$cc = preg_replace("/^cc:(.*)/si", "\\1", $header);
}
else if(preg_match("/^bcc:/si", $header )) {
$bcc = preg_replace("/^bcc:(.*)/si", "\\1", $header);
$header = "";
}
$headers .= $header . "\r\n";
}
$headers = chop($headers);
$cc = explode(",", $cc);
$bcc = explode(",", $bcc);
}
$mail_to_array = explode(",", $mail_to);
//
// Ok we have error checked as much as we can to this point let's get on
// it already.
//
if (!$socket = fsockopen($pref['smtp_server'], 25, $errno, $errstr, 20) ) {
print ("Could not connect to smtp host. <br />$errno: $errstr");
return FALSE;
}
server_parse($socket, "220");
$myIP = gethostbyname ($_SERVER['SERVER_NAME']);
$myServer = $e107->get_host_name($myIP);
if (!empty($pref['smtp_username']) && !empty($pref['smtp_password']) ) {
// Send the RFC2554 specified EHLO.
// This improved as provided by SirSir to accomodate
// both SMTP AND ESMTP capable servers
fputs($socket, "EHLO " . $myServer . "\r\n");
server_parse($socket, "250");
fputs($socket, "AUTH LOGIN\r\n");
server_parse($socket, "334");
fputs($socket, base64_encode($pref['smtp_username']) . "\r\n");
server_parse($socket, "334");
fputs($socket, base64_encode($pref['smtp_password']) . "\r\n");
server_parse($socket, "235");
} else {
// Send the RFC821 specified HELO.
fputs($socket, "HELO " . $myServer . "\r\n");
server_parse($socket, "250");
}
// From this point onward most server response codes should be 250
// Specify who the mail is from....
fputs($socket, "MAIL FROM: <" . $pref['siteadminemail'] . ">\r\n");
server_parse($socket, "250");
// Specify each user to send to and build to header.
$to_header = "To: ";
@reset($mail_to_array );
while (list(, $mail_to_address ) = each($mail_to_array )) {
//
// Add an additional bit of error checking to the To field.
//
$mail_to_address = trim($mail_to_address);
if (preg_match('/[^ ]+\@[^ ]+/', $mail_to_address) ) {
fputs($socket, "RCPT TO: <$mail_to_address>\r\n" );
server_parse($socket, "250" );
}
$to_header .= "<$mail_to_address>";
}
// Ok now do the CC and BCC fields...
@reset($bcc );
while (list(, $bcc_address ) = each($bcc )) {
//
// Add an additional bit of error checking to bcc header...
//
$bcc_address = trim($bcc_address );
if (preg_match('/[^ ]+\@[^ ]+/', $bcc_address) ) {
fputs($socket, "RCPT TO: <$bcc_address>\r\n" );
server_parse($socket, "250" );
}
}
@reset($cc );
while (list(, $cc_address ) = each($cc )) {
//
// Add an additional bit of error checking to cc header
//
$cc_address = trim($cc_address );
if (preg_match('/[^ ]+\@[^ ]+/', $cc_address) ) {
fputs($socket, "RCPT TO: <$cc_address>\r\n");
server_parse($socket, "250");
}
}
// Ok now we tell the server we are ready to start sending data
fputs($socket, "DATA\r\n");
// This is the last response code we look for until the end of the message.
server_parse($socket, "354");
// Send the Subject Line...
fputs($socket, "Subject: $subject\r\n");
// Now the To Header.
fputs($socket, "$to_header\r\n");
// Now any custom headers....
fputs($socket, "$headers\r\n\r\n");
// Ok now we are ready for the message...
fputs($socket, "$message\r\n");
// Ok the all the ingredients are mixed in let's cook this puppy...
fputs($socket, ".\r\n");
server_parse($socket, "250");
// Now tell the server we are done and close the socket...
fputs($socket, "QUIT\r\n");
fclose($socket);
return TRUE;
}
?>

View File

@@ -1,243 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/usersession_class.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:59 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
class eUserSession {
var $_UserTrackingType;
var $_CookieName;
var $_SessionID;
var $_SessionName;
var $_LoginResult;
var $UserDetails = array();
var $UserTimes = array();
var $UserPrefs = array();
var $UserIsAdmin = false;
var $_RawPermissions;
var $_Permissions = array();
var $SuperAdmin = false;
var $SessionData = array();
var $IsUser = false;
var $UserIP;
function eUserSession() {
global $pref;
// Login types operators
define('USERLOGIN_TYPE_COOKIE', 0);
define('USERLOGIN_TYPE_SESSION', 1);
define('USERLOGIN_TYPE_POST', 2);
// badlogin operators
define('LOGINRESULT_OK', 0);
define('LOGINRESULT_INVALIDCOOKIE', 1);
define('LOGINRESULT_INVALIDSESSION', 2);
define('LOGINRESULT_INVALIDSESSIONCOOKIE', 3);
define('LOGINRESULT_BADUSERPASS', 4);
define('LOGINRESULT_NOTLOGGEDIN', 5);
// Session handler options - adjust to taste
e107_ini_set('session.auto_start', 0);
e107_ini_set('session.serialize_handler', 'php');
e107_ini_set('session.cookie_lifetime', 0);
e107_ini_set('session.use_cookies', 1);
e107_ini_set('session.use_only_cookies', 1);
e107_ini_set('url_rewriter.tags', '');
e107_ini_set('session.use_trans_sid', 0);
$this->_SessionName = session_name();
$this->_UserTrackingType = $pref['user_tracking'];
$this->_CookieName = $pref['cookie_name'];
global $e107;
$e107->getip;
}
function UserSessionStart() {
print_r($_POST);
if ($_POST['username'] && $_POST['userpass']) {
if (ini_get('magic_quotes_gpc' != 1)) {
$_POST['username'] = addslashes($_POST['username']);
$_POST['userpass'] = addslashes($_POST['userpass']);
}
$_POST['autologin'] = intval($_POST['autologin']);
$this->LoginUser(USERLOGIN_TYPE_POST, $_POST['username'], $_POST['userpass'], false, $_POST['autologin']);
} elseif ($this->_UserTrackingType == 'session' && $_COOKIE[$this->$_SessionName]) {
} elseif ($this->_UserTrackingType == 'cookie' && isset($_COOKIE[$this->_CookieName])) {
$Cookie = explode('.', $_COOKIE[$this->_CookieName]);
if (count($Cookie) != 2) {
$this->_LoginResult = LOGINRESULT_INVALIDCOOKIE;
} elseif(preg_match('/^[A-Fa-f0-9]{32}$/', $Cookie[1]) && intval($Cookie[0]) > 0) {
$this->LoginUser(USERLOGIN_TYPE_COOKIE, false, $Cookie[1], $Cookie[0]);
} else {
$this->_LoginResult = LOGINRESULT_INVALIDCOOKIE;
}
} else {
$this->AnonUser();
$this->_LoginResult = LOGINRESULT_NOTLOGGEDIN;
}
if ($this->_LoginResult != LOGINRESULT_OK) {
$this->AnonUser();
}
$this->CompatabiltyMode();
}
function LoginUser($LoginType = false, $UserName = false, $UserPassword = false, $UserID = false, $AutoLogin = false) {
global $sql, $tp;
switch ($LoginType) {
case USERLOGIN_TYPE_COOKIE:
if (!$sql->db_Select('user', '*', "user_id = '".intval($UserID)."' AND md5(`user_password`) = '".$tp -> toDB($UserPassword)."'")){
$this->_LoginResult = LOGINRESULT_INVALIDCOOKIE;
} else {
$row = $sql->db_Fetch();
$this->ExtractDetails($row);
$this->IsUser = true;
$this->_LoginResult = LOGINRESULT_OK;
}
break;
case USERLOGIN_TYPE_SESSION:
echo "Session Handling Not Fully Implemented Yet!";
break;
case USERLOGIN_TYPE_POST:
$UserPassword = md5($UserPassword);
if (!$sql->db_Select('user', '*', "user_name = '".$tp -> toDB($UserName)."' AND user_password = '".$tp -> toDB($UserPassword)."'", 'default', true)) {
$this->_LoginResult = LOGINRESULT_BADUSERPASS;
} else {
$row = $sql->db_Fetch();
$this->IsUser = true;
$this->_LoginResult = LOGINRESULT_OK;
$this->ExtractDetails($row);
if ($AutoLogin == true) {
header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
setcookie($this->_CookieName, $row['user_id'].'.'.md5($UserPassword), (time() + 3600 * 24 * 30));
$_COOKIE[$this->_CookieName] = $row['user_id'].'.'.md5($UserPassword);
} else {
header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
setcookie($this->_CookieName, $row['user_id'].'.'.$UserPassword);
$_COOKIE[$this->_CookieName] = $row['user_id'].'.'.md5($UserPassword);
}
if ($this->_UserTrackingType == 'session') {
session_start();
}
}
break;
if ($this->_LoginResult == LOGINRESULT_INVALIDCOOKIE) {
header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"');
setcookie($pref['cookie_name'], '', (time()-2592000));
unset($_COOKIE[$this->_CookieName]);
}
}
}
function ExtractDetails($MySQL_Row) {
global $user_pref, $pref;
if ($MySQL_Row['user_ban'] == 1) {
exit();
}
$this->UserDetails['Name'] = $MySQL_Row['user_name'];
$this->UserDetails['ID'] = $MySQL_Row['user_id'];
$this->UserDetails['Email'] = $MySQL_Row['user_email'];
$this->UserDetails['Class'] = $MySQL_Row['user_class'];
$this->UserDetails['Viewed'] = $MySQL_Row['user_viewed'];
$this->UserDetails['Image'] = $MySQL_Row['user_image'];
$this->UserTimes['PasswordChange'] = $MySQL_Row['user_pwchange'];
$this->UserTimes['LastVisit'] = $MySQL_Row['user_lastvisit'];
$this->UserTimes['CurrentVisit'] = $MySQL_Row['user_currentvisit'];
$this->UserTimes['Join'] = $MySQL_Row['user_join'];
$this->UserTimes['Lastpost'] = $MySQL_Row['user_lastpost'];
$this->UserPrefs = unserialize($MySQL_Row['user_prefs']);
$this->_UserSession = $MySQL_Row['user_sess'];
if ($MySQL_Row['user_admin'] == 1) {
$this->UserIsAdmin = true;
$this->_RawPermissions = $MySQL_Row['user_perms'];
$Perms = explode('.', $MySQL_Row['user_perms']);
$pTotal = count($Perms) - 1;
if ($Perms[$pTotal] == '') {
unset($Perms[$pTotal]);
}
if ($Perms[0] == '0') {
$this->SuperAdmin = true;
} else {
$this->_Permissions = $Perms;
}
}
if ($this->UserTimes['CurrentVisit'] + 3600 < time()) {
$this->UserTimes['LastVisit'] = $this->UserTimes['CurrentVisit'];
$this->UserTimes['CurrentVisit'] = time();
$sql->db_Update('user', "user_visits = user_visits + 1, user_lastvisit = '{$this->UserTimes['LastVisit']}', user_currentvisit='{$this->UserTimes['CurrentVisit']}', user_viewed='' WHERE user_id='{$this->UserDetails['ID']}'");
}
if (isset($_POST['settheme'])) {
$this->UserPrefs['sitetheme'] = ($pref['sitetheme'] == $_POST['sitetheme'] ? '' : $_POST['sitetheme']);
$user_pref = $this->UserPrefs;
save_prefs('user', $this->UserDetails['ID']);
}
$user_pref = $this->UserPrefs;
}
function AnonUser() {
$this->UserDetails['Name'] = 'Anonymous';
$this->UserDetails['ID'] = 0;
$this->UserDetails['Email'] = '';
$this->UserTimes['LastVisit'] = time();
$this->UserTimes['CurrentVisit'] = time();
$this->UserTimes['Join'] = time();
$this->UserTimes['Lastpost'] = time();
$this->UserPrefs = array();
$this->UserIsAdmin = false;
$this->SuperAdmin = false;
$this->_Permissions = array();
}
function CompatabiltyMode() {
if ($this->IsUser == true) {
define("USERID", $this->UserDetails['ID']);
define("USERNAME", $this->UserDetails['Name']);
define("USER", TRUE);
define("USERCLASS", $this->UserDetails['Class']);
define("USERVIEWED", $this->UserDetails['Viewed']);
define("USERIMAGE", $this->UserDetails['Image']);
define("USERSESS", $this->_UserSession);
define("USERTHEME", ($this->UserPrefs['sitetheme'] && file_exists(e_THEME.$this->UserPrefs['sitetheme'].'/theme.php') ? $this->UserPrefs['sitetheme'] : false));
if ($this->UserIsAdmin == true) {
define("ADMIN", TRUE);
define("ADMINID", $this->UserDetails['ID']);
define("ADMINNAME", $this->UserDetails['Name']);
define("ADMINPERMS", $this->_RawPermissions);
define("ADMINEMAIL", $this->UserDetails['Email']);
define("ADMINPWCHANGE", $this->UserTimes['PasswordChange']);
} else {
define("ADMIN", FALSE);
}
} else {
define("USER", FALSE);
define("USERTHEME", FALSE);
define("ADMIN", FALSE);
define("GUEST", TRUE);
}
}
}
?>

View File

@@ -1,5 +0,0 @@
<?php
require_once("class2.php");
header("Location:".SITEURL.$PLUGINS_DIRECTORY."forum/forum.php");
exit;
?>

View File

@@ -1,12 +0,0 @@
<?php
require_once("class2.php");
$tmp = explode(".", e_QUERY);
$forum_id = intval($tmp[0]);
if($forum_id)
{
header("Location:".SITEURL.$PLUGINS_DIRECTORY."forum/forum_viewforum.php?{$forum_id}");
exit;
}
header("Location:".SITEURL."index.php");
exit;
?>

View File

@@ -1,12 +0,0 @@
<?php
require_once("class2.php");
$tmp = explode(".", e_QUERY);
$thread_id = intval($tmp[1]);
if($thread_id)
{
header("Location:".SITEURL.$PLUGINS_DIRECTORY."forum/forum_viewtopic.php?{$thread_id}");
exit;
}
header("Location:".SITEURL."index.php");
exit;
?>

View File

@@ -1,29 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/subcontent.php,v $
| $Revision: 1.2 $
| $Date: 2007-12-28 01:17:00 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("class2.php");
//redirection to new content management plugin if it is installed
if ($sql -> db_Select("plugin", "*", "plugin_path = 'content' AND plugin_installflag = '1' ")){
header("location:".e_PLUGIN."content/content_submit.php");
exit;
} else {
header("location:".e_BASE."index.php");
exit;
}
?>