Skip to content

Commit

Permalink
new module creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfly committed Dec 2, 2006
0 parents commit e149b35
Show file tree
Hide file tree
Showing 2,196 changed files with 182,987 additions and 0 deletions.
41 changes: 41 additions & 0 deletions article.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©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;
}

?>
105 changes: 105 additions & 0 deletions backend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©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;

?>
125 changes: 125 additions & 0 deletions banner.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©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/banner.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:33:01 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
require_once("class2.php");
require_once(e_HANDLER."form_handler.php");
$rs = new form;

if (e_QUERY) {
$query_string = intval(e_QUERY);
$sql->db_Select("banner", "*", "banner_id = '{$query_string}' ");
$row = $sql->db_Fetch();
$ip = $e107->getip();
$newip = (strpos($row['banner_ip'], "{$ip}^") !== FALSE) ? $row['banner_ip'] : "{$row['banner_ip']}{$ip}^";
$sql->db_Update("banner", "banner_clicks = banner_clicks + 1, `banner_ip` = '{$newip}' WHERE `banner_id` = '{$query_string}'");
header("Location: {$row['banner_clickurl']}");
exit;
}

require_once(HEADERF);

if (isset($_POST['clientsubmit'])) {

$clean_login = $tp -> toDB($_POST['clientlogin']);
$clean_password = $tp -> toDB($_POST['clientpassword']);

if (!$sql->db_Select("banner", "*", "`banner_clientlogin` = '{$clean_login}' AND `banner_clientpassword` = '{$clean_password}'")) {
$ns->tablerender(BANNERLAN_38, "<br /><div style='text-align:center'>".BANNERLAN_20."</div><br />");
require_once(FOOTERF);
exit;
}

$row = $sql->db_Fetch();
$banner_total = $sql->db_Select("banner", "*", "`banner_clientname` = '{$row['banner_clientname']}'");

if (!$banner_total) {
$ns->tablerender(BANNERLAN_38, "<br /><div style='text-align:center'>".BANNERLAN_29."</div><br />");
require_once(FOOTERF);
exit;
} else {
while ($row = $sql->db_Fetch()) {

$start_date = ($row['banner_startdate'] ? strftime("%d %B %Y", $row['banner_startdate']) : BANNERLAN_31);
$end_date = ($row['banner_enddate'] ? strftime("%d %B %Y", $row['banner_enddate']) : BANNERLAN_31);

$BANNER_TABLE_CLICKPERCENTAGE = ($row['banner_clicks'] && $row['banner_impressions'] ? round(($row['banner_clicks'] / $row['banner_impressions']) * 100)."%" : "-");
$BANNER_TABLE_IMPRESSIONS_LEFT = ($row['banner_impurchased'] ? $row['banner_impurchased'] - $row['banner_impressions'] : BANNERLAN_30);
$BANNER_TABLE_IMPRESSIONS_PURCHASED = ($row['banner_impurchased'] ? $row['banner_impurchased'] : BANNERLAN_30);
$BANNER_TABLE_CLIENTNAME = $row['banner_clientname'];
$BANNER_TABLE_BANNER_ID = $row['banner_id'];
$BANNER_TABLE_BANNER_CLICKS = $row['banner_clicks'];
$BANNER_TABLE_BANNER_IMPRESSIONS = $row['banner_impressions'];
$BANNER_TABLE_ACTIVE = BANNERLAN_36.($row['banner_active'] != "255" ? BANNERLAN_32 : "<b>".BANNERLAN_33."</b>");
$BANNER_TABLE_STARTDATE = BANNERLAN_37." ".$start_date;
$BANNER_TABLE_ENDDATE = BANNERLAN_34." ".$end_date;

if ($row['banner_ip']) {
$tmp = explode("^", $row['banner_ip']);
$BANNER_TABLE_IP_LAN = BANNERLAN_35.": ".(count($tmp)-1);
for($a = 0; $a <= (count($tmp)-2); $a++) {
$BANNER_TABLE_IP .= $tmp[$a]."<br />";
}
}

if (!$BANNER_TABLE) {
if (file_exists(THEME."banner_template.php")) {
require_once(THEME."banner_template.php");
} else {
require_once(e_BASE.$THEMES_DIRECTORY."templates/banner_template.php");
}
}
$textstring .= preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_TABLE);
}
}

if (!$BANNER_TABLE) {
if (file_exists(THEME."banner_template.php")) {
require_once(THEME."banner_template.php");
} else {
require_once(e_BASE.$THEMES_DIRECTORY."templates/banner_template.php");
}
}
$textstart = preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_TABLE_START);
$textend = preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_TABLE_END);
$text = $textstart.$textstring.$textend;

echo $text;

require_once(FOOTERF);
exit;
}


$BANNER_LOGIN_TABLE_LOGIN = $rs->form_text("clientlogin", 30, $id, 20, "tbox");
$BANNER_LOGIN_TABLE_PASSW = $rs->form_password("clientpassword", 30, "", 20, "tbox");
$BANNER_LOGIN_TABLE_SUBMIT = $rs->form_button("submit", "clientsubmit", BANNERLAN_18);

if (!$BANNER_LOGIN_TABLE) {
if (file_exists(THEME."banner_template.php")) {
require_once(THEME."banner_template.php");
} else {
require_once(e_BASE.$THEMES_DIRECTORY."templates/banner_template.php");
}
}
$text = preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_LOGIN_TABLE);
$ns->tablerender(BANNERLAN_19, $text);


require_once(FOOTERF);

?>
Loading

0 comments on commit e149b35

Please sign in to comment.