first commit
This commit is contained in:
commit
853b7a1c3d
|
@ -0,0 +1,5 @@
|
|||
</center>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,277 @@
|
|||
<?PHP
|
||||
#####################################################################
|
||||
## ##
|
||||
## Easy Banner Free ##
|
||||
## http://www.phpwebscripts.com/ ##
|
||||
## e-mail: info@phpwebscripts.com ##
|
||||
## ##
|
||||
## copyright (c) 2005 ##
|
||||
## ##
|
||||
## This script is freeware ##
|
||||
## ##
|
||||
## You may distribute it by any way ##
|
||||
## BUT! You may not modify it! ##
|
||||
## Removing the link to PHPWebScripts.com is a copyright violation.##
|
||||
## Altering or removing any of the code that is responsible, in ##
|
||||
## any way, for generating that link is strictly forbidden. ##
|
||||
## Anyone violating the above policy will have their license ##
|
||||
## terminated on the spot. Do not remove that link - ever. ##
|
||||
## ##
|
||||
#####################################################################
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
include('../data/data.php');
|
||||
if (ini_get("magic_quotes_sybase"))
|
||||
ini_set("magic_quotes_sybase", 0);
|
||||
ini_set("magic_quotes_gpc", 0);
|
||||
ini_set("magic_quotes_runtime", 1);
|
||||
if ($s[kun] = 'UG93ZXJlZCBieSBFYXN5IEJhbm5lcg==')
|
||||
$x = 1;
|
||||
else
|
||||
$x = 0;
|
||||
if (ini_get("register_globals"))
|
||||
ini_set("register_globals", "Off");
|
||||
$r = $s[phprath] . $s[phpruth] . $s[kun];
|
||||
if (strlen($r) != 92)
|
||||
exit;
|
||||
$linkid = db_connect();
|
||||
//include('./data/messages.php'); $m = strip_replace_array($m); $linkid = db_connect(); $s[header] = implode("\n",file("$s[phppath]/data/templates/_header.txt")); $s[footer] = implode("\n",file("$s[phppath]/data/templates/_footer.txt")); // public only
|
||||
session_start();
|
||||
if ($_GET[action] == 'admin_log_off')
|
||||
admin_log_off();
|
||||
if ($_POST[action] == 'admin_logged_in')
|
||||
admin_logged_in($_POST);
|
||||
if (!$_SESSION['admin_username'])
|
||||
admin_login_form();
|
||||
admin_check_session($_SESSION); // admin only
|
||||
#########################################################################
|
||||
function check_email($email) {
|
||||
if (eregi("^[a-z0-9_.-]+@[a-z0-9_-]+\.[a-z0-9.]+$", $email))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
function db_connect() {
|
||||
global $s;
|
||||
unset($s[db_error], $s[dben]);
|
||||
if ($s[nodbpass])
|
||||
$link_id = mysql_connect($s[dbhost], $s[dbusername]);
|
||||
else
|
||||
$link_id = mysql_connect($s[dbhost], $s[dbusername], $s[dbpassword]);
|
||||
if (!$link_id) {
|
||||
$s[db_error] = "Unable to connect to the host $s[dbhost]. Check database host, username, password.";
|
||||
$s[dben] = mysql_errno();
|
||||
return 0;
|
||||
}
|
||||
if ((!$s[dbname]) && (!mysql_select_db($s[dbname]))) {
|
||||
$s[db_error] = mysql_errno() . ' ' . mysql_error();
|
||||
$s[dben] = mysql_errno();
|
||||
return 0;
|
||||
}
|
||||
if (($s[dbname]) && (!mysql_select_db($s[dbname]))) {
|
||||
$s[db_error] = mysql_errno() . ' ' . mysql_error();
|
||||
$s[dben] = mysql_errno();
|
||||
return 0;
|
||||
}
|
||||
return $link_id;
|
||||
}
|
||||
function strip_replace_array($a) {
|
||||
if (!$a)
|
||||
return $a;
|
||||
reset($a);
|
||||
while (list($k, $v) = each($a)) {
|
||||
if (is_array($v))
|
||||
continue;
|
||||
$a[$k] = ereg_replace("''", "'", strip_tags($v));
|
||||
$a[$k] = htmlspecialchars(str_replace(chr(92), '', $a[$k]));
|
||||
$a[$k] = eregi_replace('&', '&', $a[$k]);
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
function strip_replace_once($x) {
|
||||
if (!$x)
|
||||
return $x;
|
||||
$x = ereg_replace("''", "'", $x);
|
||||
$x = stripslashes($x);
|
||||
$x = eregi_replace('&', '&', $x);
|
||||
return $x;
|
||||
}
|
||||
function add_slashes_array($a) {
|
||||
if (!$a)
|
||||
return $a;
|
||||
reset($a);
|
||||
while (list($k, $v) = each($a)) {
|
||||
if (is_array($v))
|
||||
continue;
|
||||
$a[$k] = addslashes(ereg_replace("''", "'", $v));
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
function page_from_template($template, $value) {
|
||||
global $s;
|
||||
$template = "$s[phppath]/data/templates/$template";
|
||||
if (!is_array($value))
|
||||
$value = array();
|
||||
$value[adminemail] = $s[mail];
|
||||
$f = fopen($template, 'r') or public_problem("Unable to read template $template");
|
||||
while (!feof($f))
|
||||
$line .= fgets($f, 4096);
|
||||
fclose($f);
|
||||
$line1 = base64_decode($s[phprath]) . base64_decode($s[phpruth]) . base64_decode($s[kun]) . base64_decode('PC9hPjxicj4=');
|
||||
while (list($k, $v) = each($value))
|
||||
$line = str_replace("#%$k%#", $v, $line);
|
||||
reset($value);
|
||||
$line = eregi_replace("#%[a-z0-9_]*%#", '', strip_replace_once($line));
|
||||
echo stripslashes($s[header]) . $line;
|
||||
include("$s[phppath]/data/templates/_footer.txt");
|
||||
echo $line1;
|
||||
exit;
|
||||
}
|
||||
function mail_from_template($template, $value) {
|
||||
global $s;
|
||||
$template = "$s[phppath]/data/templates/$template";
|
||||
$fd = fopen($template, 'r') or public_problem("Unable to read template $template");
|
||||
while ($line = fgets($fd, 4096))
|
||||
$emailtext .= $line;
|
||||
fclose($fd);
|
||||
eregi("Subject: +([^\n\r]+)", $emailtext, $regs);
|
||||
$sub = $regs[1];
|
||||
$emailtext = eregi_replace("Subject: +([^\n\r]+)[\r\n]+", '', $emailtext);
|
||||
reset($value);
|
||||
while (list($key, $val) = each($value))
|
||||
$emailtext = str_replace("#%$key%#", $val, $emailtext);
|
||||
$emailtext = eregi_replace("#%[a-z0-9_]*%#", '', $emailtext);
|
||||
$emailtext = strip_replace_once($emailtext);
|
||||
//echo "To: $value[to]<br>From: $s[email]<br>Sub: $sub<br>$emailtext<br><br><br>"; $ok = 1;
|
||||
$ok = mail($value[to], $sub, $emailtext, "From: $s[email]");
|
||||
return $ok;
|
||||
}
|
||||
function parse_part($template, $value) {
|
||||
global $s;
|
||||
$template = "$s[phppath]/data/templates/$template";
|
||||
if (!is_array($value))
|
||||
$value = array();
|
||||
$value[adminemail] = $s[mail];
|
||||
$fh = fopen($template, 'r') or public_problem("Unable to read template $template");
|
||||
while (!feof($fh))
|
||||
$line .= fgets($fh, 4096);
|
||||
fclose($fh);
|
||||
foreach ($value as $k => $v)
|
||||
$line = str_replace("#%$k%#", $v, $line);
|
||||
$line = eregi_replace("#%[a-z0-9]*%#", '', strip_replace_once($line));
|
||||
return $line;
|
||||
}
|
||||
function dq($query, $check) {
|
||||
global $s;
|
||||
$q = mysql_query($query);
|
||||
if (($check) AND (!$q))
|
||||
public_problem(mysql_error());
|
||||
return $q;
|
||||
}
|
||||
function datum($cas, $plustime) {
|
||||
if (!$cas)
|
||||
$cas = time();
|
||||
if ($s[ustime]) {
|
||||
if ($plustime)
|
||||
$x = date("Y-m-d, g:i a", $cas);
|
||||
else
|
||||
$x = date("Y-m-d", $cas);
|
||||
} else {
|
||||
if ($plustime)
|
||||
$x = date("j/n/Y, G:i", $cas);
|
||||
else
|
||||
$x = date("j/n/Y", $cas);
|
||||
}
|
||||
return $x;
|
||||
}
|
||||
function iot($info) {
|
||||
return '<span class="text13b_bold"><b>' . $info . '</b></span><br><br>';
|
||||
}
|
||||
function eot($info, $errors) {
|
||||
return '<span class="text13b_bold"><b>' . $info . '</b></span><br><span class="text13">' . $errors . '</span><br><br>';
|
||||
}
|
||||
function public_problem($error) {
|
||||
global $s;
|
||||
$s[info] = $error;
|
||||
page_from_template('error.html', $s);
|
||||
}
|
||||
function admin_right_frame_home() {
|
||||
admin_ih();
|
||||
echo '<br><br><br><br><br><span class="text13b_bold">Welcome to the Admin Area</span><br><br><span class="text13">Please select a function from the menu on the left</span>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_log_off() {
|
||||
global $s;
|
||||
session_destroy();
|
||||
$s[info] = iot('You have been logged off');
|
||||
admin_login_form(0);
|
||||
}
|
||||
function admin_problem($error) {
|
||||
admin_ih();
|
||||
echo '<br><br><span class="text13b_bold">ERROR<br><br>' . $error . '</span><br><br>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_ift() {
|
||||
include('./footer.txt');
|
||||
exit;
|
||||
}
|
||||
function admin_ih() {
|
||||
include('./head.txt');
|
||||
}
|
||||
function admin_check_session($data) {
|
||||
global $s;
|
||||
$a = file("$s[phppath]/data/.htpasswd");
|
||||
$b = split(':', trim($a[0]));
|
||||
if ($data[admin_username] != $b[0]) {
|
||||
session_destroy();
|
||||
$in[info] = iot('An error has occurred. Please login again.');
|
||||
admin_login_form($in);
|
||||
}
|
||||
}
|
||||
function admin_login_data_edit($a) {
|
||||
global $s;
|
||||
admin_ih();
|
||||
echo $s[info] . iot('Modify Admin\'s Username/Password') . '<table border="0" width="200" cellspacing="0" cellpadding="5" class="table1"><form action="index.php" method="post"><input type="hidden" name="action" value="admin_login_data_edited"><tr><td align="center"><tr><td align="right" nowrap><span class="text13">New username </span></td><td align="left"><input class="field11" size="15" name="new_username" value=' . $a[new_username] . '></td></tr> <tr><td align="right" nowrap><span class="text13">New password </span></td><td align="left"><input class="field11" size="15" name="new_password" value=' . $a[new_password] . '></td></tr> <tr><td align="center" colspan=2><input type="submit" name="A1" value="Submit" class="button10"></td></tr></form></table>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_login_data_edited($a) {
|
||||
global $s;
|
||||
if (($a[new_username]) AND ($a[new_password])) {
|
||||
$sb = fopen("$s[phppath]/data/.htpasswd", 'w');
|
||||
$zapis = fwrite($sb, "$a[new_username]:" . MD5($a[new_password]));
|
||||
fclose($sb);
|
||||
chmod("$s[phppath]/data/.htpasswd", 0666);
|
||||
if (!$zapis)
|
||||
$s[info] = iot('Unable to write to your "data/.htpasswd" file. Make sure that the data directory has 777 permission and the .htaccess file has 666 permission.');
|
||||
$s[info] = iot('Admin username and password have been updated.<br>If you have modified your username, you now have to log in again.');
|
||||
} elseif (($a[new_username]) OR ($a[new_password]))
|
||||
$s[info] = iot('Both fields are required');
|
||||
admin_login_data_edit($a);
|
||||
}
|
||||
function admin_login_form($in) {
|
||||
global $s;
|
||||
echo '<script>
|
||||
<!--
|
||||
if (window!= top)
|
||||
top.location.href=location.href
|
||||
// -->
|
||||
</script>';
|
||||
admin_ih();
|
||||
echo $s[info];
|
||||
echo '<table border="0" width="200" cellspacing="2" cellpadding="4" class="table1"><form method="POST" action="index.php"><input type="hidden" name="action" value="admin_logged_in"><tr><td align="left"><span class="text13">Username</span></td><td align="left"><input class="field11" name="username" size=15 maxlength=15 value="' . $in[username] . '"></td></tr><tr><td align="left"><span class="text13">Password</span></td><td align="left"><input class="field11" type="password" name="password" size=15 maxlength=15 value="' . $in[password] . '"></td></tr><tr><td colspan=2 align="center"><input type="submit" value="Submit" name="B1" class="button10"></td></tr> </form></table>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_logged_in($in) {
|
||||
global $s;
|
||||
if ((!$in[username]) OR (!$in[password]))
|
||||
admin_login_form($in);
|
||||
$password = md5($in[password]);
|
||||
$a = file('../data/.htpasswd');
|
||||
$b = split(':', trim($a[0]));
|
||||
if (($in[username] != $b[0]) OR ($password != $b[1])) {
|
||||
$s[info] = iot('Wrong username or password. Please try again.');
|
||||
admin_login_form($in);
|
||||
}
|
||||
$s[admin_username] = $_SESSION[admin_username] = $in['username'];
|
||||
unset($_POST);
|
||||
home_page();
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Easy Banner</title>
|
||||
<LINK href="../styles.css" rel=StyleSheet>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div align="center">
|
||||
<center>
|
||||
<br>
|
|
@ -0,0 +1,278 @@
|
|||
<?PHP
|
||||
#####################################################################
|
||||
## ##
|
||||
## Easy Banner Free ##
|
||||
## http://www.phpwebscripts.com/ ##
|
||||
## e-mail: info@phpwebscripts.com ##
|
||||
## ##
|
||||
## copyright (c) 2005 ##
|
||||
## ##
|
||||
## This script is freeware ##
|
||||
## ##
|
||||
## You may distribute it by any way ##
|
||||
## BUT! You may not modify it! ##
|
||||
## Removing the link to PHPWebScripts.com is a copyright violation.##
|
||||
## Altering or removing any of the code that is responsible, in ##
|
||||
## any way, for generating that link is strictly forbidden. ##
|
||||
## Anyone violating the above policy will have their license ##
|
||||
## terminated on the spot. Do not remove that link - ever. ##
|
||||
## ##
|
||||
#####################################################################
|
||||
include('./functions.php');
|
||||
switch ($_GET[action]) {
|
||||
case 'left_frame':
|
||||
left_frame();
|
||||
case 'admin_right_frame_home':
|
||||
admin_right_frame_home();
|
||||
case 'show_users':
|
||||
show_users($_GET[what]);
|
||||
case 'user_details':
|
||||
user_details($_GET[user]);
|
||||
case 'statistic_reset':
|
||||
statistic_reset();
|
||||
case 'admin_login_data_edit':
|
||||
admin_login_data_edit('');
|
||||
case 'configuration_edit':
|
||||
configuration_edit();
|
||||
}
|
||||
switch ($_POST[action]) {
|
||||
case 'user_edited':
|
||||
user_edited($_POST);
|
||||
case 'user_approved':
|
||||
user_approved($_POST[user]);
|
||||
case 'user_deleted':
|
||||
user_deleted($_POST[user]);
|
||||
case 'statistic_reseted':
|
||||
statistic_reseted();
|
||||
case 'admin_login_data_edited':
|
||||
admin_login_data_edited($_POST);
|
||||
case 'configuration_edited':
|
||||
configuration_edited($_POST);
|
||||
}
|
||||
#########################################################################
|
||||
function home_page() {
|
||||
global $s;
|
||||
echo '<html>
|
||||
<head>
|
||||
<title>Easy Banner - Administration</title>
|
||||
<base target="_self"></head>
|
||||
<frameset rows="1*" cols="140, 1*" border="0">
|
||||
<frame name="left" scrolling="auto" marginwidth="0" marginheight="0" src="index.php?action=left_frame" frameBorder=no Resize>
|
||||
<frame name="right" scrolling="auto" src="index.php?action=admin_right_frame_home" Resize frameBorder=NO>
|
||||
</frameset>
|
||||
</html>';
|
||||
}
|
||||
#########################################################################
|
||||
function left_frame() {
|
||||
global $s;
|
||||
admin_ih();
|
||||
?><table border=0 cellpadding=0 cellspacing=0 width="100%"><tr><td align="center" valign="top"><br><table border=0 width=95% cellspacing=2 cellpadding=0>
|
||||
<TR><TD align="left" nowrap><span class="text13"><b>Menu</b><br>
|
||||
<a target="right" href="index.php?action=show_users&what=all">All users</a><br>
|
||||
<a target="right" href="index.php?action=show_users&what=approved">Approved users</a><br>
|
||||
<a target="right" href="index.php?action=show_users&what=noapr">Unapproved users</a><br>
|
||||
<a target="right" href="index.php?action=statistic_reset">Reset stats</a><br>
|
||||
<a target="right" href="index.php?action=configuration_edit">Configuration</a><br>
|
||||
<a target="right" href="index.php?action=admin_login_data_edit">Username/pass</a><br><br>
|
||||
<a target="_top" href="index.php?action=admin_log_off">Log off</a><br>
|
||||
</td></tr></table></center><?PHP
|
||||
admin_ift();
|
||||
}
|
||||
#########################################################################
|
||||
function show_users($what) {
|
||||
global $s;
|
||||
if ($what == 'all') {
|
||||
$q = dq("select * from $s[tblname] order by number", 1);
|
||||
$info = 'All';
|
||||
} elseif ($what == 'approved') {
|
||||
$q = dq("select * from $s[tblname] where approved = 1 order by number", 1);
|
||||
$info = 'Approved';
|
||||
} elseif ($what == 'noapr') {
|
||||
$q = dq("select * from $s[tblname] where approved = 0 order by number", 1);
|
||||
$info = 'Unapproved';
|
||||
}
|
||||
admin_ih();
|
||||
echo eot($info . ' Users', 'Sorted by join date');
|
||||
echo '<table border="0" width="650" cellspacing="0" cellpadding="2" class="table1">
|
||||
<tr>
|
||||
<TD align="left" valign="top"><span class="text10"><b>Username</b></span></TD>
|
||||
<TD align="center" valign="top" nowrap><span class="text10">URL</span></TD>
|
||||
<TD align="center" valign="top" nowrap><span class="text10">Impressions sent<br>by this user</span></TD>
|
||||
<TD align="center" valign="top" nowrap><span class="text10">Impressions received<br>by this user</span></TD>
|
||||
<TD align="center" valign="top" nowrap><span class="text10">Impressions<br>unused</span></TD>
|
||||
<TD align="center" valign="top" nowrap><span class="text10">Joined</span></TD>
|
||||
</TR>';
|
||||
while ($data = mysql_fetch_assoc($q)) {
|
||||
echo '<TR>
|
||||
<TD align="left"><a title="Click to view/edit details" href="index.php?action=user_details&user=' . $data[username] . '" class="link10"><b>' . $data[username] . '</b></a></TD>
|
||||
<TD align="center"><a title="Click to go to users site (' . $data[siteurl] . ')" target="_blank" href="' . $data[siteurl] . '" class="link10">URL</a></TD>
|
||||
<TD align="center"><span class="text10">' . $data[i_m] . '</span></TD><TD align="center"><span class="text10">' . $data[i_w] . '</span></TD>
|
||||
<TD align="center"><span class="text10">' . $data[i_nu] . '</span></TD>
|
||||
<TD align="center" nowrap><span class="text10">' . $data[date] . '</span></TD>
|
||||
</TR>';
|
||||
$xzobr = $xzobr + $data[i_m];
|
||||
$xmy = $xmy + $data[i_w];
|
||||
$xnep = $xnep + $data[i_nu];
|
||||
}
|
||||
echo '<tr>
|
||||
<TD colspan=2 align="left"><span class="text10"><b>TOTAL</b></span></TD>
|
||||
<TD align="center"><span class="text10"><b>' . $xzobr . '</b></span></TD>
|
||||
<TD align="center"><span class="text10"><b>' . $xmy . '</b></span></TD>
|
||||
<TD align="center"><span class="text10"><b>' . $xnep . '</b></span></TD>
|
||||
<TD> </TD></TR></table>';
|
||||
admin_ift();
|
||||
}
|
||||
#########################################################################
|
||||
function user_approved($user) {
|
||||
global $s;
|
||||
dq("update $s[tblname] set approved = 1 where username = '$user'", 0);
|
||||
$s[info] = iot('Selected user has been approved');
|
||||
user_details($user);
|
||||
}
|
||||
function user_edited($data) {
|
||||
global $s;
|
||||
$q = dq("update $s[tblname] set siteurl = '$data[siteurl]',urlbanner = '$data[urlbanner]',email = '$data[email]',password = '$data[password]' where username = '$data[user]'", 0);
|
||||
$s[info] = iot('Selected user has been edited');
|
||||
user_details($data[user]);
|
||||
}
|
||||
function user_deleted($user) {
|
||||
global $s;
|
||||
dq("delete from $s[tblname] where username = '$user'", 0);
|
||||
admin_ih();
|
||||
echo iot('Selected user has been deleted');
|
||||
admin_ift();
|
||||
}
|
||||
#########################################################################
|
||||
function user_details($user) {
|
||||
global $s;
|
||||
$q = dq("select * from $s[tblname] where username = '$user'", 1);
|
||||
$data = mysql_fetch_assoc($q);
|
||||
if ($data[approved] == 1)
|
||||
$jeschvaleny = 'approved';
|
||||
else {
|
||||
$jeschvaleny = 'not approved';
|
||||
$schvalbutton = '<form METHOD="post" action="index.php"><input type="hidden" name="action" value="user_approved"><input type="hidden" name="user" value="' . $user . '"><input type="submit" name="co" value="Approve this user" class="button10" style="width=120"></form>';
|
||||
}
|
||||
if (!$data[username])
|
||||
admin_problem('Selected user does not exist');
|
||||
$cas = date("Y-m-j, H:i:s");
|
||||
admin_ih();
|
||||
echo $s[info] . '<span class="text13b_bold"><b>User ' . $data[username] . '</span></b><br><span class="text13">This user is ' . $jeschvaleny . '</span><br>' . $schvalbutton . '<form method="POST" action="index.php"><input type="hidden" name="action" value="user_deleted"><input type="hidden" name="user" value="' . $user . '"><INPUT type=submit value="Delete this user" name="co" class="button10" style="width=120"></form>';
|
||||
?><table border="0" width="500" cellspacing="2" cellpadding="4" class="table1"><tr><td colspan=2 align="center"><span class="text13b_bold"><b>User Details</b></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">URL</span></td><td align="left" nowrap><span class="text13"><a target="_blank" href="<?PHP
|
||||
echo "$data[siteurl]\">$data[siteurl]";
|
||||
?></a></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Email</span></td><td align="left" nowrap><span class="text13"><a href="mailto:<?PHP
|
||||
echo "$data[email]\">$data[email]";
|
||||
?></a></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Password</span></td><td align="left" nowrap><span class="text13"><?PHP
|
||||
echo $data[password];
|
||||
?></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Date joined</span></td><td align="left" nowrap><span class="text13"><?PHP
|
||||
echo $data[date];
|
||||
?></span></td></tr>
|
||||
<tr><td colspan="2" nowrap align="center"><span class="text13">Banner</span><br><?PHP
|
||||
echo "<img width=\"$s[width]\" height=\"$s[height]\" src=\"$data[urlbanner]\">";
|
||||
?></td></tr></table>
|
||||
<br><table border="0" width="500" cellspacing="2" cellpadding="4" class="table1"><tr><td colspan=2 align="center"><span class="text13b_bold"><b>Statistic</b></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Banners displayed by this user </span></td><td align="left" nowrap><span class="text13"><?PHP
|
||||
echo $data[i_m];
|
||||
?></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Credits earned </span></td><td align="left" nowrap><span class="text13"><?PHP
|
||||
echo $data[i_earned];
|
||||
?></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Banners displayed for this user </span></td><td align="left" nowrap><span class="text13"><?PHP
|
||||
echo $data[i_w];
|
||||
?></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Unused credits </span></td><td align="left" nowrap><span class="text13"><?PHP
|
||||
echo $data[i_nu];
|
||||
?></span></td></tr></table><br>
|
||||
<form method="POST" action="index.php"><input type="hidden" name="action" value="user_edited"><input type="hidden" name="user" value="<?PHP
|
||||
echo $data[username];
|
||||
?>">
|
||||
<table border="0" width="500" cellspacing="2" cellpadding="4" class="table1"><tr><td nowrap colspan=2 align="center"><span class="text13b_bold">Edit user details</b></span></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">URL</span></td><td align="left" nowrap><INPUT maxLength=255 size=60 name="siteurl" value="<?PHP
|
||||
echo $data[siteurl];
|
||||
?>" class="field11"></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Banner URL</span></td><td align="left" nowrap><INPUT maxLength=255 size=60 name="urlbanner" value="<?PHP
|
||||
echo $data[urlbanner];
|
||||
?>" class="field11"></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Email</span></td><td align="left" nowrap><INPUT maxLength=255 size=60 name="email" value="<?PHP
|
||||
echo $data[email];
|
||||
?>" class="field11"></td></tr>
|
||||
<tr><td align="left" nowrap><span class="text13">Password</span></td><td align="left" nowrap><INPUT maxLength=15 size=15 name="password" value="<?PHP
|
||||
echo $data[password];
|
||||
?>" class="field11"></td></tr><tr>
|
||||
<td align="middle" width="100%" colSpan=2><INPUT type="submit" value="Save" class="button10"></span></TD></TR></TBODY></TABLE></FORM><?PHP
|
||||
admin_ift();
|
||||
}
|
||||
#########################################################################
|
||||
function configuration_edit() {
|
||||
global $info;
|
||||
include("../data/data.php");
|
||||
admin_ih();
|
||||
reset($s);
|
||||
while (list($key, $val) = each($s)) {
|
||||
$s[$key] = str_replace(chr(92), '', $val);
|
||||
$s[$key] = htmlspecialchars($s[$key]);
|
||||
if (!$s[$key])
|
||||
$s[$key] = '';
|
||||
}
|
||||
$ratio = $s[ratio] * 100;
|
||||
echo $info;
|
||||
echo '<span class="text13b_bold"><b>Configuration</b></span><br><span class="text10">Do not use these characters: <b> \ $</b> in any of your values</span><br><br>
|
||||
<form method="POST" action="index.php"><input type="hidden" name="action" value="configuration_edited">
|
||||
<table border="0" width="620" cellspacing="0" cellpadding="5" class="table1"><tr><td align="center">
|
||||
<table border="0" width="600" cellspacing="0" cellpadding="2">
|
||||
<form method="POST" action="index.php"><input type="hidden" name="action" value="configuration_edited">
|
||||
<tr><td align="left"><span class="text13">Mysql database host</span></td><td align="left"><INPUT size=30 name="dbhost" value="' . $s[dbhost] . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Mysql database username</span></td><td align="left"><INPUT size=30 name="dbusername" value="' . $s[dbusername] . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Mysql database password</span></td><td align="left"><INPUT size=30 name="dbpassword" value="' . $s[dbpassword] . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Name of your mysql database</span></td><td align="left"><INPUT size=30 name="dbname" value="' . $s[dbname] . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Name of the table to use</span></td><td align="left"><INPUT size=30 name="tblname" value="' . $s[tblname] . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Full path to the folder where this script is installed. No trailing slash.</span></td><td align="left"><INPUT maxLength=100 size=50 name="phppath" value="' . $s[phppath] . '" class="field11"><br><span class="text10">Example: /htdocs/sites/user/html/folder_name</span></td></tr>
|
||||
<tr><td align="left"><span class="text13">URL of the directory where your php scripts are installed. No trailing slash.</span></td><td align="left"><INPUT size=50 name="phpdirectory" value="' . $s[phpdirectory] . '" class="field11"><br><span class="text10">Example: http://www.yourdomain.com/folder_name</span></td></tr>
|
||||
<tr><td align="left"><span class="text13">URL of your default banner. It is displayed only if no one account has credits.</td><td align="left"><INPUT size=50 name="defaultbanner" value="' . $s[defaultbanner] . '" class="field11"><br><span class="text10">Example: http://www.yourdomain.com/folder_name/banner.gif</span></span></td></tr>
|
||||
<tr><td align="left"><span class="text13">Default URL. It gets surfer after clicking on your default banner.</span></td><td align="left"><INPUT size=50 name="defaulturl" value="' . $s[defaulturl] . '" class="field11"><input type="hidden" name="phprath" value="PGNlbnRlcj4="></td></tr>
|
||||
<tr><td align="left"><span class="text13">Width of all banners</span></td><td align="left"><INPUT maxLength=4 size=5 name="width" value="' . $s[width] . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Height of all banners</span></td><td align="left"><INPUT maxLength=4 size=5 name="height" value="' . $s[height] . '" class="field11"><input type="hidden" name="phpruth" value="PGEgaHJlZj0iaHR0cDovL3BocHdlYnNjcmlwdHMuY29tLyI+"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Exchange ratio. How many impressions get every user for showing 100 banners.</span></td><td align="left"><INPUT maxLength=5 size=5 name="ratio" value="' . $ratio . '" class="field11"></td></tr>
|
||||
<tr><td align="left"><span class="text13">Your email address.</span></td><td align="left"><INPUT size=50 name="email" value="' . $s[email] . '" class="field11"></td></tr>
|
||||
<tr><td align="middle" width="100%" colSpan=2><INPUT type=submit value="Save" name="D1" class="button10"></span></TD></TR></TBODY></FORM></TABLE></td></tr></table>';
|
||||
admin_ift();
|
||||
}
|
||||
function configuration_edited($in) {
|
||||
global $info;
|
||||
$in[ratio] = round($in[ratio] / 100, 2);
|
||||
unset($in[submit], $in[action], $in[D1]);
|
||||
foreach ($in as $k => $v) {
|
||||
$v = ereg_replace('"', '\"', strip_replace_once($v));
|
||||
$data .= "\$s[$k] = \"$v\";";
|
||||
}
|
||||
$data = "<?PHP $data ?>";
|
||||
if (!$sb = fopen("$in[phppath]/data/data.php", "w"))
|
||||
admin_problem('Unable to write to file "data/data.php". Make sure that your "data" directory exists and has 777 permission and the file "data.php" inside has permission 666. Cannot continue.');
|
||||
fwrite($sb, $data);
|
||||
fclose($sb);
|
||||
$info = iot('Your configuration has been successfully updated');
|
||||
configuration_edit();
|
||||
}
|
||||
#########################################################################
|
||||
function statistic_reseted() {
|
||||
global $s;
|
||||
dq("update $s[tblname] set i_w = 0, i_nu = 0, i_m = 0, i_earned = 0");
|
||||
$a = fopen("$s[phppath]/data/resettime", 'w');
|
||||
fwrite($a, time());
|
||||
fclose($a);
|
||||
admin_ih();
|
||||
echo iot('<br><br>Statistic been reseted to zero');
|
||||
admin_ift();
|
||||
}
|
||||
function statistic_reset() {
|
||||
global $s;
|
||||
admin_ih();
|
||||
echo iot('<br><br>This function resets all statistics to zero. Are you sure?') . '<form action="index.php" method="POST"><input type="hidden" name="action" value="statistic_reseted"><input type="submit" value="Yes, reset it" class="button10"></form>';
|
||||
admin_ift();
|
||||
}
|
||||
#########################################################################
|
||||
?>
|
|
@ -0,0 +1,7 @@
|
|||
AuthName "BANNED"
|
||||
AuthType Basic
|
||||
AuthUserFile /dev/null
|
||||
AuthGroupFile /dev/null
|
||||
|
||||
require valid-user
|
||||
|
|
@ -0,0 +1 @@
|
|||
mbuchholz:46200e1dda93e87f871dd635b317aac6
|
|
@ -0,0 +1,17 @@
|
|||
<?PHP
|
||||
$s[dbhost] = "localhost";
|
||||
$s[dbusername] = "bannertildeverse_nxeyrdeg_banner";
|
||||
$s[dbpassword] = "X(1wr#39{j,e";
|
||||
$s[dbname] = "bannertildeverse_nxeyrdeg_banner";
|
||||
$s[tblname] = "easybanner";
|
||||
$s[phppath] = "/home/bannertildeverse/web/banner.tildeverse.org/public_html";
|
||||
$s[phpdirectory] = "https://banner.tildeverse.org";
|
||||
$s[defaultbanner] = "https://tilde.club/~harper/webring.png";
|
||||
$s[defaulturl] = "https://tilde.club";
|
||||
$s[phprath] = "PGNlbnRlcj4=";
|
||||
$s[width] = "468";
|
||||
$s[height] = "60";
|
||||
$s[phpruth] = "PGEgaHJlZj0iaHR0cDovL3BocHdlYnNjcmlwdHMuY29tLyI+";
|
||||
$s[ratio] = "2";
|
||||
$s[email] = "deepend@tilde.club";
|
||||
?>
|
|
@ -0,0 +1 @@
|
|||
1552759006
|
|
@ -0,0 +1,8 @@
|
|||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<TITLE>tildeverse banner exchange</TITLE>
|
||||
<link href="https://tilde.team/css/hacker.css" rel="stylesheet">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<div align="center">
|
||||
<center>
|
||||
<br>
|
|
@ -0,0 +1,9 @@
|
|||
Subject: Banner Exchange New Member
|
||||
|
||||
An account has been added to your banner exchange. If you want review this account, you have to go to #%adminfile%#
|
||||
Account name: #%username%#
|
||||
Password: as user specified
|
||||
URL: #%siteurl%#
|
||||
Banner URL: #%urlbanner%#
|
||||
Email: #%memberemail%#
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Subject: Banner Exchange Account Edited
|
||||
|
||||
An account has been edited. If you want review this account, you have to go to #%adminfile%#
|
||||
Account name: #%username%#
|
||||
Password: as you specified
|
||||
URL: #%siteurl%#
|
||||
Banner URL: #%urlbanner%#
|
||||
Email: #%memberemail%#
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Subject: Tildeverse Banner Account Added
|
||||
|
||||
Your account has been added. If you need make any changes or see your stats, please go to #%memberfile%#
|
||||
Account name: #%username%#
|
||||
Password: #%password%#
|
||||
URL: #%siteurl%#
|
||||
Banner URL: #%urlbanner%#
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
|
||||
<span class="form-group"><b>Error!</b>
|
||||
<br><br>
|
||||
<span class="form-group"><b>#%info%#</b></span>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span class="form-group">Please <a href="mailto:#%mail%#">email admin</a> if you have questions.</span>
|
||||
<br>
|
||||
<br>
|
||||
<form action="member.php" method="GET">
|
||||
<input type="submit" name="B1" value="Back to home" class="btn btn-primary">
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<!-- Tildeverse Banner code begin -->
|
||||
<div style="text-align: center;">
|
||||
<object data="#%workfile%#" type="text/html" width="500" height="80" style="overflow:hidden; width: 500px; height: 80px"></object>
|
||||
</div>
|
||||
<!-- Tildeverse Banner code end -->
|
|
@ -0,0 +1,65 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
<h3>Sign Up Now!</h3>
|
||||
<table border="0" cellspacing="0" cellpadding="3" width="600" class="jumbotron">
|
||||
<FORM action="index.php" method="post">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD align="middle" width="100%">
|
||||
<TABLE cellSpacing=5 cellPadding=0 width=600 border=0>
|
||||
<TR>
|
||||
<TD align="left" valign="top"><span class="form-group">Username </span></TD>
|
||||
<TD>
|
||||
<INPUT size="15" maxLength="15" name="username" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top"><span class="form-group">Password </span></TD>
|
||||
<TD>
|
||||
<INPUT type="password" size="15" maxLength="15" name="password" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top"><span class="form-group">Email </span></TD>
|
||||
<TD>
|
||||
<INPUT size="60" maxLength="255" name="email" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top" nowrap><span class="form-group">Site URL </span></TD>
|
||||
<TD>
|
||||
<INPUT size="60" maxLength="255" name="siteurl" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" nowrap><span class="form-group">Banner URL </span></TD>
|
||||
<TD>
|
||||
<INPUT size="60" maxLength="255" name="urlbanner" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="middle" colSpan="2"><span class="form-group">The banner must measure #%width%# x #%height%# pixels.</span> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="center" colspan="2">
|
||||
<INPUT type="submit" value="Submit" name="B1" class="btn btn-primary">
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</FORM>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
<form action="member.php" method="GET">
|
||||
<input type="submit" name="B1" value="Member login" class="btn btn-primary">
|
||||
</form>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<!-- EasyBanner code begin -->
|
||||
<CENTER>
|
||||
<IFRAME SRC="https://banner.tildeverse.org/work.php?ID=banner" width=468 height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling="no"></IFRAME>
|
||||
</CENTER>
|
||||
<!-- EasyBanner code end -->
|
|
@ -0,0 +1,47 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
|
||||
<span class="form-group">Your account has been created. Thank you!</b></span>
|
||||
<br>
|
||||
<span class="form-group">You may give our code to your site and earn credits immediately.<br>To see statistic, update your information or get HTML code for your site, please go to our <a href="#%memberfile%#">members area.</a></span>
|
||||
<br>
|
||||
<br>
|
||||
<table border="0" cellspacing="1" cellpadding="10" width="600" class="jumbotron">
|
||||
<tr>
|
||||
<td align="center" width="100%">
|
||||
|
||||
<table border="0" width="600" cellspacing="0" cellpadding="3">
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Username: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-control">#%username%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Password: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-control">#%password%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Email: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-control">#%email%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">URL: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-control">#%siteurl%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD colspan="2" align="left"><span class="form-group">Your banner:</TD></tr>
|
||||
<TR><TD colspan="2">#%banner%#</TD></TR>
|
||||
</table>
|
||||
|
||||
</td></tr></table>
|
||||
<br><br>
|
||||
<table border="0" width="500" cellspacing="10" cellpadding="0">
|
||||
<form><tr><td align="center" width="100%">
|
||||
<span class="form-group">This is the banner exchange code for your page(s):</span>
|
||||
<br>
|
||||
<textarea rows="10" name="text" cols="90" class="form-control">
|
||||
#%html%#
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
|
@ -0,0 +1,51 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="10" width="600" class="jumbotron">
|
||||
<form method="POST" action="member.php">
|
||||
<input type="hidden" name="username" value="#%username%#">
|
||||
<input type="hidden" name="password" value="#%password%#">
|
||||
<TR>
|
||||
<td align="center">
|
||||
|
||||
<table border="0" width="500" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="2" align="center" nowrap><span class="form-horizontal">Please select function</span>
|
||||
<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="10" align="left">
|
||||
<input type="radio" value="edit" checked name="action">
|
||||
</td>
|
||||
<td align="left" nowrap>
|
||||
<br><span class="col-lg-10">Edit account</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="10" align="left">
|
||||
<input type="radio" value="stats" name="action">
|
||||
</td>
|
||||
<td align="left" nowrap>
|
||||
<br><span class="col-lg-10">Statistic</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="10" align="left">
|
||||
<input type="radio" value="html" name="action">
|
||||
</td>
|
||||
<td align="left" nowrap>
|
||||
<br><span class="col-lg-10">Display HTML code</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<TD align=center colSpan=2>
|
||||
<br>
|
||||
<br>
|
||||
<INPUT type="submit" value="Submit" name="B1" class="btn btn-primary">
|
||||
</TD>
|
||||
</TR>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</TBODY>
|
||||
</FORM>
|
||||
</TABLE>
|
|
@ -0,0 +1,54 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br> #%info%#
|
||||
<table border="0" cellspacing="1" cellpadding="5" width="500" class="jumbotron">
|
||||
<tr>
|
||||
<td align="center" width="100%">
|
||||
<form action="member.php" method="POST">
|
||||
<table border="0" width="500" cellspacing="3" cellpadding="0">
|
||||
<TR>
|
||||
<INPUT type="hidden" value="edited" name="action">
|
||||
<INPUT type="hidden" value="#%username%#" name="username">
|
||||
<INPUT type="hidden" value="#%password%#" name="password">
|
||||
<TD align="left" nowrap><span class="form-group">Username </span></TD>
|
||||
<TD><span class="form-control">#%username%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top" nowrap><span class="form-group">Password </span></TD>
|
||||
<TD>
|
||||
<INPUT maxLength="15" size="15" name="newpass" value="#%password%#" type="password" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top" nowrap><span class="form-group">Email </span></TD>
|
||||
<TD>
|
||||
<INPUT size="60" maxLength="255" name="email" value="#%email%#" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top" nowrap><span class="form-group">Site URL </span></TD>
|
||||
<TD>
|
||||
<INPUT size="60" maxLength="255" name="siteurl" value="#%siteurl%#" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left" valign="top" nowrap><span class="form-group">Banner URL </span></TD>
|
||||
<TD>
|
||||
<INPUT size="60" maxLength="255" name="urlbanner" value="#%urlbanner%#" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="center" colspan="2">
|
||||
<input type="submit" name="B1" value="Submit" class="btn btn-primary">
|
||||
</TD>
|
||||
</TR>
|
||||
</form>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<form action="member.php" method="POST">
|
||||
<INPUT type="hidden" value="#%username%#" name="username">
|
||||
<INPUT type="hidden" value="#%password%#" name="password">
|
||||
<input type="submit" name="B1" value="Back to home" class="btn btn-primary">
|
||||
</form>
|
|
@ -0,0 +1,29 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="10" width="500" class="jumbotron">
|
||||
<FORM method="post" action="member.php">
|
||||
<TR>
|
||||
<td align="center">
|
||||
|
||||
<table border="0" width="500" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td align="center" width="100%">
|
||||
<span class="form-group">Use this code to display banners on your your page(s):</span>
|
||||
<br>
|
||||
<textarea rows="12" name="text" cols="70" class="form-control">
|
||||
#%html%#
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
|
||||
<form action="member.php" method="POST">
|
||||
<INPUT type="hidden" value="#%username%#" name="username">
|
||||
<INPUT type="hidden" value="#%password%#" name="password">
|
||||
<input type="submit" name="B1" value="Back to home" class="btn btn-primary">
|
||||
</form>
|
|
@ -0,0 +1,34 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
|
||||
<span class="form-group">Please log in</span>
|
||||
<BR>
|
||||
<BR>
|
||||
<table border="0" cellspacing="0" cellpadding="3" width="300" class="jumbotron">
|
||||
<FORM method="post" action="member.php">
|
||||
<TR>
|
||||
<TD align="left"><span class="form-group">Username: </span></TD>
|
||||
<TD align="right">
|
||||
<INPUT size="60" maxLength="255" name="username" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="left"><span class="form-group">Password: </span></TD>
|
||||
<TD align="right">
|
||||
<INPUT type="password" size="60" maxLength="255" name="password" class="form-control">
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="center" colSpan="2">
|
||||
<INPUT type="submit" value="Submit" name="B1" class="btn btn-primary">
|
||||
</TD>
|
||||
</TR>
|
||||
</FORM>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<form action="index.php" method="GET">
|
||||
<input type="submit" name="B1" value="Back to home" class="btn btn-primary">
|
||||
</form>
|
|
@ -0,0 +1,44 @@
|
|||
<h1><img style="width:75px;" src="https://tildeverse.org/logos/tildeverse-green.png">tildeverse banner exchange</h1>
|
||||
<br>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="10" width="500" class="jumbotron">
|
||||
<tr>
|
||||
<td align="center" width="100%">
|
||||
<table border="0" width="300" cellspacing="3" cellpadding="0">
|
||||
<TR>
|
||||
<TD colspan=2 nowrap align=center><span class="form-group">Statistic for member #%username%#</span>
|
||||
<br>
|
||||
<br>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Banners displayed on your site: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-group">#%i_m%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Credits earned: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-group">#%i_earned%#</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Your banner have been displayed: </span></TD>
|
||||
<TD nowrap align="left"><span class="form-group">#%i_w%# times</span></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD nowrap align="left"><span class="form-group">Unused credits: </span>
|
||||
<br>
|
||||
<br>
|
||||
</TD>
|
||||
<TD nowrap align="left"><span class="form-group">#%i_nu%#</span>
|
||||
<br>
|
||||
<br>
|
||||
</TD>
|
||||
</TR>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<form action="member.php" method="POST">
|
||||
<INPUT type="hidden" value="#%username%#" name="username">
|
||||
<INPUT type="hidden" value="#%password%#" name="password">
|
||||
<input type="submit" name="B1" value="Back to home" class="btn btn-primary">
|
||||
</form>
|
|
@ -0,0 +1,11 @@
|
|||
[16-Mar-2019 03:41:42 UTC] PHP Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /home/nxeyrdeg/public_html/banner/setup.php:119
|
||||
Stack trace:
|
||||
#0 /home/nxeyrdeg/public_html/banner/setup.php(26): setup_form()
|
||||
#1 {main}
|
||||
thrown in /home/nxeyrdeg/public_html/banner/setup.php on line 119
|
||||
[01-Jun-2019 23:00:18 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/bannertildeverse/public_html/functions.php:30
|
||||
Stack trace:
|
||||
#0 /home/bannertildeverse/public_html/functions.php(23): db_connect()
|
||||
#1 /home/bannertildeverse/public_html/work.php(23): include('/home/bannertil...')
|
||||
#2 {main}
|
||||
thrown in /home/bannertildeverse/public_html/functions.php on line 30
|
|
@ -0,0 +1,262 @@
|
|||
<?PHP
|
||||
#####################################################################
|
||||
## ##
|
||||
## Easy Banner Free ##
|
||||
## http://www.phpwebscripts.com/ ##
|
||||
## e-mail: info@phpwebscripts.com ##
|
||||
## ##
|
||||
## copyright (c) 2005 ##
|
||||
## ##
|
||||
## This script is freeware ##
|
||||
## ##
|
||||
## You may distribute it by any way ##
|
||||
## BUT! You may not modify it! ##
|
||||
## Removing the link to PHPWebScripts.com is a copyright violation.##
|
||||
## Altering or removing any of the code that is responsible, in ##
|
||||
## any way, for generating that link is strictly forbidden. ##
|
||||
## Anyone violating the above policy will have their license ##
|
||||
## terminated on the spot. Do not remove that link - ever. ##
|
||||
## ##
|
||||
#####################################################################
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
include('./data/data.php');
|
||||
if (ini_get("magic_quotes_sybase"))
|
||||
ini_set("magic_quotes_sybase", 0);
|
||||
ini_set("magic_quotes_gpc", 0);
|
||||
ini_set("magic_quotes_runtime", 1);
|
||||
if ($s[kun] = 'UG93ZXJlZCBieSBFYXN5IEJhbm5lcg==')
|
||||
$x = 1;
|
||||
else
|
||||
$x = 0;
|
||||
if (ini_get("register_globals"))
|
||||
ini_set("register_globals", "Off");
|
||||
$r = $s[phprath] . $s[phpruth] . $s[kun];
|
||||
if (strlen($r) != 92)
|
||||
exit;
|
||||
$linkid = db_connect();
|
||||
include('./data/messages.php');
|
||||
$m = strip_replace_array($m);
|
||||
$linkid = db_connect();
|
||||
$s[header] = implode("\n", file("$s[phppath]/data/templates/_header.txt"));
|
||||
$s[footer] = implode("\n", file("$s[phppath]/data/templates/_footer.txt")); // public only
|
||||
//session_start(); if ($_GET[action] == 'admin_log_off') admin_log_off(); if ($_POST[action]=='admin_logged_in') admin_logged_in($_POST); if (!$_SESSION['admin_username']) admin_login_form(); admin_check_session($_SESSION); // admin only
|
||||
|
||||
function check_email($email) {
|
||||
if (eregi("^[a-z0-9_.-]+@[a-z0-9_-]+\.[a-z0-9.]+$", $email))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
function db_connect() {
|
||||
global $s;
|
||||
unset($s[db_error], $s[dben]);
|
||||
if ($s[nodbpass])
|
||||
$link_id = mysqli_connect($s[dbhost], $s[dbusername]);
|
||||
else
|
||||
$link_id = mysqli_connect($s[dbhost], $s[dbusername], $s[dbpassword]);
|
||||
if (!$link_id) {
|
||||
$s[db_error] = "Unable to connect to the host $s[dbhost]. Check database host, username, password.";
|
||||
$s[dben] = mysqli_errno();
|
||||
return 0;
|
||||
}
|
||||
if ((!$s[dbname]) && (!mysql_select_db($s[dbname]))) {
|
||||
$s[db_error] = mysql_errno() . ' ' . mysql_error();
|
||||
$s[dben] = mysql_errno();
|
||||
return 0;
|
||||
}
|
||||
if (($s[dbname]) && (!mysql_select_db($s[dbname]))) {
|
||||
$s[db_error] = mysql_errno() . ' ' . mysql_error();
|
||||
$s[dben] = mysql_errno();
|
||||
return 0;
|
||||
}
|
||||
return $link_id;
|
||||
}
|
||||
function strip_replace_array($a) {
|
||||
if (!$a)
|
||||
return $a;
|
||||
reset($a);
|
||||
while (list($k, $v) = each($a)) {
|
||||
if (is_array($v))
|
||||
continue;
|
||||
$a[$k] = ereg_replace("''", "'", strip_tags($v));
|
||||
$a[$k] = htmlspecialchars(str_replace(chr(92), '', $a[$k]));
|
||||
$a[$k] = eregi_replace('&', '&', $a[$k]);
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
function strip_replace_once($x) {
|
||||
if (!$x)
|
||||
return $x;
|
||||
$x = ereg_replace("''", "'", $x);
|
||||
$x = stripslashes($x);
|
||||
$x = eregi_replace('&', '&', $x);
|
||||
return $x;
|
||||
}
|
||||
function add_slashes_array($a) {
|
||||
if (!$a)
|
||||
return $a;
|
||||
reset($a);
|
||||
while (list($k, $v) = each($a)) {
|
||||
if (is_array($v))
|
||||
continue;
|
||||
$a[$k] = addslashes(ereg_replace("''", "'", $v));
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
function page_from_template($template, $value) {
|
||||
global $s;
|
||||
$template = "$s[phppath]/data/templates/$template";
|
||||
if (!is_array($value))
|
||||
$value = array();
|
||||
$value[mail] = $s[email];
|
||||
$f = fopen($template, 'r') or public_problem("Unable to read template $template");
|
||||
while (!feof($f))
|
||||
$line .= fgets($f, 4096);
|
||||
fclose($f);
|
||||
$line1 = base64_decode($s[phprath]) . base64_decode($s[phpruth]) . base64_decode($s[kun]) . base64_decode('PC9hPjxicj4=');
|
||||
while (list($k, $v) = each($value))
|
||||
$line = str_replace("#%$k%#", $v, $line);
|
||||
reset($value);
|
||||
$line = eregi_replace("#%[a-z0-9_]*%#", '', strip_replace_once($line));
|
||||
include("$s[phppath]/data/templates/_header.txt");
|
||||
echo $line;
|
||||
include("$s[phppath]/data/templates/_footer.txt");
|
||||
echo $line1;
|
||||
exit;
|
||||
}
|
||||
function mail_from_template($template, $value) {
|
||||
global $s;
|
||||
$template = "$s[phppath]/data/templates/$template";
|
||||
$fd = fopen($template, 'r') or public_problem("Unable to read template $template");
|
||||
while ($line = fgets($fd, 4096))
|
||||
$emailtext .= $line;
|
||||
fclose($fd);
|
||||
eregi("Subject: +([^\n\r]+)", $emailtext, $regs);
|
||||
$sub = $regs[1];
|
||||
$emailtext = eregi_replace("Subject: +([^\n\r]+)[\r\n]+", '', $emailtext);
|
||||
reset($value);
|
||||
while (list($key, $val) = each($value))
|
||||
$emailtext = str_replace("#%$key%#", $val, $emailtext);
|
||||
$emailtext = eregi_replace("#%[a-z0-9_]*%#", '', $emailtext);
|
||||
$emailtext = strip_replace_once($emailtext);
|
||||
//echo "To: $value[to]<br>From: $s[email]<br>Sub: $sub<br>$emailtext<br><br><br>"; $ok = 1;
|
||||
$ok = mail($value[to], $sub, $emailtext, "From: $s[email]");
|
||||
return $ok;
|
||||
}
|
||||
function parse_part($template, $value) {
|
||||
global $s;
|
||||
$template = "$s[phppath]/data/templates/$template";
|
||||
if (!is_array($value))
|
||||
$value = array();
|
||||
$value[mail] = $s[email];
|
||||
$fh = fopen($template, 'r') or public_problem("Unable to read template $template");
|
||||
while (!feof($fh))
|
||||
$line .= fgets($fh, 4096);
|
||||
fclose($fh);
|
||||
foreach ($value as $k => $v)
|
||||
$line = str_replace("#%$k%#", $v, $line);
|
||||
$line = eregi_replace("#%[a-z0-9]*%#", '', strip_replace_once($line));
|
||||
return $line;
|
||||
}
|
||||
function dq($query, $check) {
|
||||
global $s;
|
||||
$q = mysql_query($query);
|
||||
if (($check) AND (!$q))
|
||||
public_problem(mysql_error());
|
||||
return $q;
|
||||
}
|
||||
function datum($cas) {
|
||||
return date("m-d-Y", $cas);
|
||||
}
|
||||
function iot($info) {
|
||||
return '<span class="text13b_bold"><b>' . $info . '</b></span><br><br>';
|
||||
}
|
||||
function eot($info, $errors) {
|
||||
return '<span class="text13b_bold"><b>' . $info . '</b></span><br><span class="text13">' . $errors . '</span><br><br>';
|
||||
}
|
||||
function public_problem($error) {
|
||||
global $s;
|
||||
$s[info] = $error;
|
||||
page_from_template('error.html', $s);
|
||||
}
|
||||
function admin_right_frame_home() {
|
||||
admin_ih();
|
||||
echo '<br><br><br><br><br><span class="text13b_bold">Welcome to the Admin Area</span><br><br><span class="text13">Please select a function from the menu on the left</span>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_log_off() {
|
||||
global $s;
|
||||
session_destroy();
|
||||
$s[info] = iot('You have been logged off');
|
||||
admin_login_form(0);
|
||||
}
|
||||
function admin_problem($error) {
|
||||
admin_ih();
|
||||
echo '<br><br><span class="text13b_bold">ERROR<br><br>' . $error . '</span><br><br>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_ift() {
|
||||
include('./footer.txt');
|
||||
exit;
|
||||
}
|
||||
function admin_ih() {
|
||||
include('./head.txt');
|
||||
}
|
||||
function admin_check_session($data) {
|
||||
global $s;
|
||||
$a = file("$s[phppath]/data/.htpasswd");
|
||||
$b = split(':', trim($a[0]));
|
||||
if ($data[admin_username] != $b[0]) {
|
||||
session_destroy();
|
||||
$in[info] = iot('An error has occurred. Please login again.');
|
||||
admin_login_form($in);
|
||||
}
|
||||
}
|
||||
function admin_login_data_edit($a) {
|
||||
global $s;
|
||||
admin_ih();
|
||||
echo $s[info] . iot('Modify Admin\'s Username/Password') . '<table border="0" width="200" cellspacing="0" cellpadding="5" class="table1"><form action="index.php" method="post"><input type="hidden" name="action" value="admin_login_data_edited"><tr><td align="center"><tr><td align="right" nowrap><span class="text13">New username </span></td><td align="left"><input class="field11" size="15" name="new_username" value=' . $a[new_username] . '></td></tr> <tr><td align="right" nowrap><span class="text13">New password </span></td><td align="left"><input class="field11" size="15" name="new_password" value=' . $a[new_password] . '></td></tr> <tr><td align="center" colspan=2><input type="submit" name="A1" value="Submit" class="button10"></td></tr></form></table>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_login_data_edited($a) {
|
||||
global $s;
|
||||
if (($a[new_username]) AND ($a[new_password])) {
|
||||
$sb = fopen("$s[phppath]/data/.htpasswd", 'w');
|
||||
$zapis = fwrite($sb, "$a[new_username]:" . MD5($a[new_password]));
|
||||
fclose($sb);
|
||||
chmod("$s[phppath]/data/.htpasswd", 0666);
|
||||
if (!$zapis)
|
||||
$s[info] = iot('Unable to write to your "data/.htpasswd" file. Make sure that the data directory has 777 permission and the .htaccess file has 666 permission.');
|
||||
$s[info] = iot('Admin username and password have been updated.<br>If you have modified your username, you now have to log in again.');
|
||||
} elseif (($a[new_username]) OR ($a[new_password]))
|
||||
$s[info] = iot('Both fields are required');
|
||||
admin_login_data_edit($a);
|
||||
}
|
||||
function admin_login_form($in) {
|
||||
global $s;
|
||||
echo '<script>
|
||||
<!--
|
||||
if (window!= top)
|
||||
top.location.href=location.href
|
||||
// -->
|
||||
</script>';
|
||||
admin_ih();
|
||||
echo $s[info];
|
||||
echo '<table border="0" width="200" cellspacing="2" cellpadding="4" class="table1"><form method="POST" action="index.php"><input type="hidden" name="action" value="admin_logged_in"><tr><td align="left"><span class="text13">Username</span></td><td align="left"><input class="field11" name="username" size=15 maxlength=15 value="' . $in[username] . '"></td></tr><tr><td align="left"><span class="text13">Password</span></td><td align="left"><input class="field11" type="password" name="password" size=15 maxlength=15 value="' . $in[password] . '"></td></tr><tr><td colspan=2 align="center"><input type="submit" value="Submit" name="B1" class="button10"></td></tr> </form></table>';
|
||||
admin_ift();
|
||||
}
|
||||
function admin_logged_in($in) {
|
||||
global $s;
|
||||
if ((!$in[username]) OR (!$in[password]))
|
||||
admin_login_form($in);
|
||||
$password = md5($in[password]);
|
||||
$a = file('../data/.htpasswd');
|
||||
$b = split(':', trim($a[0]));
|
||||
if (($in[username] != $b[0]) OR ($password != $b[1])) {
|
||||
$s[info] = iot('Wrong username or password. Please try again.');
|
||||
admin_login_form($in);
|
||||
}
|
||||
$s[admin_username] = $_SESSION[admin_username] = $in['username'];
|
||||
unset($_POST);
|
||||
home_page();
|
||||
}
|
||||
?>
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -0,0 +1,66 @@
|
|||
<?PHP
|
||||
#####################################################################
|
||||
## ##
|
||||
## Easy Banner Free ##
|
||||
## http://www.phpwebscripts.com/ ##
|
||||
## e-mail: info@phpwebscripts.com ##
|
||||
## ##
|
||||
## copyright (c) 2005 ##
|
||||
## ##
|
||||
## This script is freeware ##
|
||||
## ##
|
||||
## You may distribute it by any way ##
|
||||
## BUT! You may not modify it! ##
|
||||
## Removing the link to PHPWebScripts.com is a copyright violation.##
|
||||
## Altering or removing any of the code that is responsible, in ##
|
||||
## any way, for generating that link is strictly forbidden. ##
|
||||
## Anyone violating the above policy will have their license ##
|
||||
## terminated on the spot. Do not remove that link - ever. ##
|
||||
## ##
|
||||
#####################################################################
|
||||
include('./functions.php');
|
||||
if (!$_POST)
|
||||
page_from_template('join.html', $s);
|
||||
$in = $_POST;
|
||||
if ((!$in[urlbanner]) OR (!$in[username]) OR (!$in[password]) OR (!$in[email]) OR (!$in[siteurl]))
|
||||
public_problem('All fields are required. Please try again.');
|
||||
if (!eregi("^[a-z0-9]{5,15}$", $in[username]))
|
||||
public_problem('Incorrect username. It should contain only letters and numbers and have 5-15 characters.');
|
||||
if (!eregi("^[a-z0-9]{5,15}$", $in[password]))
|
||||
public_problem('Incorrect password. It should contain only letters and numbers and have 5-15 characters.');
|
||||
if (strlen($in[email]) > 255)
|
||||
public_problem('Email address is too long. Maximum is 255 characters.');
|
||||
if (strlen($in[siteurl]) > 255)
|
||||
public_problem('URL is too long. Maximum is 255 characters.');
|
||||
if (strlen($in[urlbanner]) > 255)
|
||||
public_problem('Banner URL is too long. Maximum is 255 characters.');
|
||||
if (!check_email($in[email]))
|
||||
public_problem('Wrong email address. Please try again.');
|
||||
if (!eregi("https?://*", $in[siteurl]))
|
||||
public_problem('Wrong URL. Please try again.');
|
||||
$q = dq("select count(*) from $s[tblname] where username = '$in[username]'", 0);
|
||||
$data = mysql_fetch_row($q);
|
||||
if ($data[0])
|
||||
public_problem('Entered username is already in use. Please use another.');
|
||||
eregi(".*gif$", $in[urlbanner], $hh);
|
||||
eregi(".*jpg$", $in[urlbanner], $hh);
|
||||
eregi(".*png$", $in[urlbanner], $hh);
|
||||
if (!$hh[0])
|
||||
public_problem('Incorrect banner image format. Please try again.');
|
||||
$cas = time();
|
||||
$datum = Date('Y-m-d');
|
||||
dq("insert into $s[tblname] values('$in[username]','$in[password]','$in[email]','$in[siteurl]','$in[urlbanner]','0','0','0','$datum','$cas','0','0',NULL)", 1);
|
||||
$in[number] = mysql_insert_id();
|
||||
$in[memberfile] = "$s[phpdirectory]/member.php";
|
||||
$in[to] = $in[email];
|
||||
mail_from_template('email_join.txt', $in);
|
||||
$in[adminfile] = "$s[phpdirectory]/admin/";
|
||||
$in[memberemail] = $in[email];
|
||||
$in[to] = $s[email];
|
||||
mail_from_template('email_admin.txt', $in);
|
||||
$s[workfile] = "$s[phpdirectory]/work.php?ID=$in[username]";
|
||||
$in[html] = parse_part('html.txt', $s);
|
||||
$a[memberfile] = "$s[phpdirectory]/member.php";
|
||||
$in[banner] = '<img border=0 width="' . $s[width] . '" height="' . $s[height] . '" src="' . $in[urlbanner] . '">';
|
||||
page_from_template('join_success.html', $in);
|
||||
?>
|
|
@ -0,0 +1,4 @@
|
|||
Coming back very soon. Working on updating the codebase to php 7.x.
|
||||
|
||||
Thanks
|
||||
Tildeverse Banner Network
|
|
@ -0,0 +1,94 @@
|
|||
<?PHP
|
||||
#####################################################################
|
||||
## ##
|
||||
## Easy Banner Free ##
|
||||
## http://www.phpwebscripts.com/ ##
|
||||
## e-mail: info@phpwebscripts.com ##
|
||||
## ##
|
||||
## copyright (c) 2005 ##
|
||||
## ##
|
||||
## This script is freeware ##
|
||||
## ##
|
||||
## You may distribute it by any way ##
|
||||
## BUT! You may not modify it! ##
|
||||
## Removing the link to PHPWebScripts.com is a copyright violation.##
|
||||
## Altering or removing any of the code that is responsible, in ##
|
||||
## any way, for generating that link is strictly forbidden. ##
|
||||
## Anyone violating the above policy will have their license ##
|
||||
## terminated on the spot. Do not remove that link - ever. ##
|
||||
## ##
|
||||
#####################################################################
|
||||
include('./functions.php');
|
||||
if (!$_POST)
|
||||
page_from_template('member_login.html', $s);
|
||||
foreach ($_POST as $k => $v)
|
||||
$_POST[$k] = htmlspecialchars(str_replace('"', '', str_replace("'", '', str_replace('"', '', str_replace(chr(92), '', $v)))));
|
||||
$q = dq("select password from $s[tblname] where username = '$_POST[username]' AND password = '$_POST[password]'", 1);
|
||||
$data = mysql_fetch_row($q);
|
||||
if (!$data[0])
|
||||
public_problem('Wrong username or password. Please try again.');
|
||||
if (!$_POST[action])
|
||||
page_from_template('member_action.html', $_POST);
|
||||
switch ($_POST[action]) {
|
||||
case 'edit':
|
||||
edit($_POST);
|
||||
case 'edited':
|
||||
edited($_POST);
|
||||
case 'stats':
|
||||
stats($_POST);
|
||||
case 'html':
|
||||
html($_POST);
|
||||
}
|
||||
function edit($in) {
|
||||
global $s;
|
||||
$q = dq("select * from $s[tblname] where username = '$in[username]'", 1);
|
||||
$data = mysql_fetch_assoc($q);
|
||||
$data[width] = $s[width];
|
||||
$data[height] = $s[height];
|
||||
$data[info] = $s[info];
|
||||
$data[banner] = '<img border=0 width="' . $s[width] . '" height="' . $s[height] . '" src="' . $data[urlbanner] . '">';
|
||||
page_from_template('member_edit.html', $data);
|
||||
}
|
||||
function edited($in) {
|
||||
global $s;
|
||||
if (!eregi("^[a-z0-9]{5,15}$", $in[newpass]))
|
||||
public_problem('Incorrect password. It should contain only letters and numbers and have 5-15 characters.');
|
||||
if (strlen($in[email]) > 255)
|
||||
public_problem('Email address is too long. Maximum is 255 characters.');
|
||||
if (strlen($in[siteurl]) > 255)
|
||||
public_problem('URL is too long. Maximum is 255 characters.');
|
||||
if (strlen($in[urlbanner]) > 255)
|
||||
public_problem('Banner URL is too long. Maximum is 255 characters.');
|
||||
if (!check_email($in[email]))
|
||||
public_problem('Wrong email address. Please try again.');
|
||||
if (!eregi("https?://*", $in[siteurl]))
|
||||
public_problem('Wrong URL. Please try again.');
|
||||
eregi(".*gif$", $in[urlbanner], $hh);
|
||||
eregi(".*jpg$", $in[urlbanner], $hh);
|
||||
eregi(".*png$", $in[urlbanner], $hh);
|
||||
if (!$hh[0])
|
||||
public_problem('Incorrect banner image format. Please try again.');
|
||||
$q = dq("update $s[tblname] set password='$in[newpass]',email='$in[email]',siteurl='$in[siteurl]',urlbanner='$in[urlbanner]' where username = '$in[username]'", 1);
|
||||
$in[memberemail] = $in[email];
|
||||
$in[to] = $s[email];
|
||||
$in[password] = $in[newpass];
|
||||
mail_from_template('email_admin_edit.txt', $in);
|
||||
$s[info] = iot('Data has been saved');
|
||||
edit($in);
|
||||
}
|
||||
function stats($in) {
|
||||
global $s;
|
||||
$q = dq("select * from $s[tblname] where username = '$in[username]'", 1);
|
||||
$data = mysql_fetch_assoc($q);
|
||||
page_from_template('member_stats.html', $data);
|
||||
}
|
||||
function html($in) {
|
||||
global $s;
|
||||
$in[workfile] = "$s[phpdirectory]/work.php?ID=$in[username]";
|
||||
$in[width] = $s[width];
|
||||
$in[height] = $s[height];
|
||||
$in[html] = parse_part('html.txt', $in);
|
||||
page_from_template('member_html.html', $in);
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,3 @@
|
|||
# vestacp autogenerated robots.txt
|
||||
User-agent: *
|
||||
Crawl-delay: 10
|
|
@ -0,0 +1,129 @@
|
|||
BODY {
|
||||
SCROLLBAR-ARROW-COLOR: #990000;
|
||||
SCROLLBAR-BASE-COLOR: #FFCC99;
|
||||
background-color: #FFCC99;
|
||||
margin-top: 3px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
A:link {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 13px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
A:visited {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 13px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
A:hover {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 13px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
|
||||
A:active {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 13px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
|
||||
A.link10 {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 10px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
A.link10:visited {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 10px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
A.link10:hover {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 10px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
|
||||
A.link10:active {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 10px;
|
||||
COLOR: #820000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
|
||||
.text13 {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 13px;
|
||||
COLOR: #000000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
.text13b_bold {
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 13px;
|
||||
COLOR: #980505;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
.text10 {
|
||||
FONT-WEIGHT: normal;
|
||||
FONT-SIZE: 10px;
|
||||
COLOR: #000000;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
.text10b_bold {
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 10px;
|
||||
COLOR: #980505;
|
||||
FONT-FAMILY: "VERDANA", "ARIAL", "HELVETICA";
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
|
||||
.button10 {
|
||||
font-size: 10px;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.field11 {
|
||||
BORDER-RIGHT: 1px solid;
|
||||
BORDER-TOP: 1px solid;
|
||||
BORDER-LEFT: 1px solid;
|
||||
BORDER-BOTTOM: 1px solid;
|
||||
FONT-SIZE: 11px;
|
||||
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
|
||||
border-color: #A8B0B8;
|
||||
BACKGROUND-COLOR: #FFF2E1;
|
||||
}
|
||||
|
||||
.table1 {
|
||||
BORDER-RIGHT: #B84E4E 1px solid;
|
||||
BORDER-TOP: #B84E4E 1px solid;
|
||||
BORDER-LEFT: #B84E4E 1px solid;
|
||||
BORDER-BOTTOM: #B84E4E 1px solid;
|
||||
BACKGROUND-COLOR: #FFDFBF
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
<?PHP
|
||||
#####################################################################
|
||||
## ##
|
||||
## Easy Banner Free ##
|
||||
## http://www.phpwebscripts.com/ ##
|
||||
## e-mail: info@phpwebscripts.com ##
|
||||
## ##
|
||||
## copyright (c) 2005 ##
|
||||
## ##
|
||||
## This script is freeware ##
|
||||
## ##
|
||||
## You may distribute it by any way ##
|
||||
## BUT! You may not modify it! ##
|
||||
## Removing the link to PHPWebScripts.com is a copyright violation.##
|
||||
## Altering or removing any of the code that is responsible, in ##
|
||||
## any way, for generating that link is strictly forbidden. ##
|
||||
## Anyone violating the above policy will have their license ##
|
||||
## terminated on the spot. Do not remove that link - ever. ##
|
||||
## ##
|
||||
#####################################################################
|
||||
include('./functions.php');
|
||||
if ((!$_GET[all]) AND (!eregi("^[a-z0-9]{5,15}$", $_GET[ID])))
|
||||
exit;
|
||||
dq("update $s[tblname] set i_m = i_m + 1, i_earned = (i_m*$s[ratio]), i_nu = (i_nu+$s[ratio]) where username = '$_GET[ID]'", 1);
|
||||
$q = dq("select max(number) from $s[tblname]");
|
||||
$data = mysql_fetch_row($q);
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
srand((float) ($sec + ($usec * 100000)));
|
||||
$i = rand(0, $data[0]);
|
||||
if ($_GET[all]) {
|
||||
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>
|
||||
<META http-equiv=Content-Type content=\"text/html;\"><title>ALL BANNERS</title></HEAD>
|
||||
<BODY><center><table border=0 cellpadding=0 cellspacing=0 width=$s[width]>";
|
||||
$q = dq("select $s[tblname].*,MD5(RAND()) AS m from $s[tblname] where approved = 1 ORDER BY m", 1);
|
||||
while ($data = mysql_fetch_assoc($q)) {
|
||||
echo "<tr>
|
||||
<td width=$s[width] valign=\"top\" align=\"left\"><a target=\"_top\" href=\"$data[siteurl]\"><img border=0 src=\"$data[urlbanner]\" width=$s[width] height=$s[height]></a>
|
||||
</td></tr>";
|
||||
}
|
||||
echo '</table></BODY>';
|
||||
exit;
|
||||
}
|
||||
$q = dq("select $s[tblname].*,MD5(RAND()) AS m from $s[tblname] where approved = 1 AND i_nu >= 1 AND NOT(username = '$_GET[ID]') ORDER BY m LIMIT 1", 1);
|
||||
$data = mysql_fetch_assoc($q);
|
||||
if ($data[username]) {
|
||||
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>
|
||||
<META http-equiv=Content-Type content=\"text/html;\"></HEAD>
|
||||
<BODY><table border=0 cellpadding=0 cellspacing=0 width=$s[width]><tr>
|
||||
<td width=$s[width] valign=\"top\" align=\"left\"><a target=\"_blank\" href=\"$data[siteurl]\"><img border=0 src=\"$data[urlbanner]\" width=$s[width] height=$s[height]></a>
|
||||
</td></tr></table></BODY>";
|
||||
dq("update $s[tblname] set i_nu = i_nu-1, i_w = i_w + 1 where username = '$data[username]'", 1);
|
||||
} else {
|
||||
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>
|
||||
<META http-equiv=Content-Type content=\"text/html;\"></HEAD>
|
||||
<BODY><table border=0 cellpadding=0 cellspacing=0 width=$s[width]><tr>
|
||||
<td width=$s[width] valign=\"top\" align=\"left\"><a target=\"_blank\" href=\"$s[defaulturl]\"><img border=0 src=\"$s[defaultbanner]\" width=$s[width] height=$s[height]></a>
|
||||
</td></tr></table></BODY>";
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue