commit 853b7a1c3dc329d8985b346379b2cb36f661f73b Author: root Date: Wed Apr 15 16:31:34 2020 -0600 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/admin/footer.txt b/admin/footer.txt new file mode 100644 index 0000000..e855e30 --- /dev/null +++ b/admin/footer.txt @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/admin/functions.php b/admin/functions.php new file mode 100644 index 0000000..21fc4d2 --- /dev/null +++ b/admin/functions.php @@ -0,0 +1,277 @@ +From: $s[email]
Sub: $sub
$emailtext


"; $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 '' . $info . '

'; +} +function eot($info, $errors) { + return '' . $info . '
' . $errors . '

'; +} +function public_problem($error) { + global $s; + $s[info] = $error; + page_from_template('error.html', $s); +} +function admin_right_frame_home() { + admin_ih(); + echo '




Welcome to the Admin Area

Please select a function from the menu on the left'; + 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 '

ERROR

' . $error . '


'; + 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') . '
New username
New password
'; + 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.
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 ''; + admin_ih(); + echo $s[info]; + echo '
Username
Password
'; + 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(); +} +?> \ No newline at end of file diff --git a/admin/head.txt b/admin/head.txt new file mode 100644 index 0000000..9c566ab --- /dev/null +++ b/admin/head.txt @@ -0,0 +1,13 @@ + + + + + + Easy Banner + + + + +
+
+
\ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..d327e5d --- /dev/null +++ b/admin/index.php @@ -0,0 +1,278 @@ + + +Easy Banner - Administration + + + + + +'; +} +######################################################################### +function left_frame() { + global $s; + admin_ih(); +?> + + + + + + +'; + while ($data = mysql_fetch_assoc($q)) { + echo ' + + + + + + '; + $xzobr = $xzobr + $data[i_m]; + $xmy = $xmy + $data[i_w]; + $xnep = $xnep + $data[i_nu]; + } + echo ' + + + + +

+
Menu
+All users
+Approved users
+Unapproved users
+Reset stats
+Configuration
+Username/pass

+Log off
+
+
UsernameURLImpressions sent
by this user
Impressions received
by this user
Impressions
unused
Joined
' . $data[username] . 'URL' . $data[i_m] . '' . $data[i_w] . '' . $data[i_nu] . '' . $data[date] . '
TOTAL' . $xzobr . '' . $xmy . '' . $xnep . ' 
'; + 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 = '
'; + } + if (!$data[username]) + admin_problem('Selected user does not exist'); + $cas = date("Y-m-j, H:i:s"); + admin_ih(); + echo $s[info] . 'User ' . $data[username] . '
This user is ' . $jeschvaleny . '
' . $schvalbutton . '
'; +?> + + + + +
User Details
URL$data[siteurl]"; +?>
Email$data[email]"; +?>
Password
Date joined
Banner
"; +?>
+
+ + + +
Statistic
Banners displayed by this user
Credits earned
Banners displayed for this user
Unused credits

+
+ + + + + +
Edit user details
URL
Banner URL
Email
Password
Configuration
Do not use these characters: \ $ in any of your values

+
+
+ + + + + + + + + + + + + + + +
Mysql database host
Mysql database username
Mysql database password
Name of your mysql database
Name of the table to use
Full path to the folder where this script is installed. No trailing slash.
Example: /htdocs/sites/user/html/folder_name
URL of the directory where your php scripts are installed. No trailing slash.
Example: http://www.yourdomain.com/folder_name
URL of your default banner. It is displayed only if no one account has credits.
Example: http://www.yourdomain.com/folder_name/banner.gif
Default URL. It gets surfer after clicking on your default banner.
Width of all banners
Height of all banners
Exchange ratio. How many impressions get every user for showing 100 banners.
Your email address.
'; + 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 = ""; + 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('

Statistic been reseted to zero'); + admin_ift(); +} +function statistic_reset() { + global $s; + admin_ih(); + echo iot('

This function resets all statistics to zero. Are you sure?') . '
'; + admin_ift(); +} +######################################################################### +?> \ No newline at end of file diff --git a/data/.htaccess b/data/.htaccess new file mode 100644 index 0000000..56919fc --- /dev/null +++ b/data/.htaccess @@ -0,0 +1,7 @@ +AuthName "BANNED" +AuthType Basic +AuthUserFile /dev/null +AuthGroupFile /dev/null + +require valid-user + diff --git a/data/.htpasswd b/data/.htpasswd new file mode 100644 index 0000000..2b90d23 --- /dev/null +++ b/data/.htpasswd @@ -0,0 +1 @@ +mbuchholz:46200e1dda93e87f871dd635b317aac6 \ No newline at end of file diff --git a/data/data.php b/data/data.php new file mode 100644 index 0000000..31e8cf2 --- /dev/null +++ b/data/data.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/data/resettime b/data/resettime new file mode 100644 index 0000000..86db1a1 --- /dev/null +++ b/data/resettime @@ -0,0 +1 @@ +1552759006 \ No newline at end of file diff --git a/data/templates/_footer.txt b/data/templates/_footer.txt new file mode 100644 index 0000000..e0e3ddc --- /dev/null +++ b/data/templates/_footer.txt @@ -0,0 +1,8 @@ +
+
+
+
+
+ + + \ No newline at end of file diff --git a/data/templates/_header.txt b/data/templates/_header.txt new file mode 100644 index 0000000..4a6799c --- /dev/null +++ b/data/templates/_header.txt @@ -0,0 +1,13 @@ + + + + + + tildeverse banner exchange + + + + +
+
+
\ No newline at end of file diff --git a/data/templates/email_admin.txt b/data/templates/email_admin.txt new file mode 100644 index 0000000..4214c82 --- /dev/null +++ b/data/templates/email_admin.txt @@ -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%# + diff --git a/data/templates/email_admin_edit.txt b/data/templates/email_admin_edit.txt new file mode 100644 index 0000000..51140d4 --- /dev/null +++ b/data/templates/email_admin_edit.txt @@ -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%# + diff --git a/data/templates/email_join.txt b/data/templates/email_join.txt new file mode 100644 index 0000000..e915d07 --- /dev/null +++ b/data/templates/email_join.txt @@ -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%# + diff --git a/data/templates/error.html b/data/templates/error.html new file mode 100644 index 0000000..3545829 --- /dev/null +++ b/data/templates/error.html @@ -0,0 +1,16 @@ +

tildeverse banner exchange

+
+ +Error! +

+#%info%# +
+
+
+Please email admin if you have questions. +
+
+
+ +
+
\ No newline at end of file diff --git a/data/templates/html.txt b/data/templates/html.txt new file mode 100644 index 0000000..aef2b4d --- /dev/null +++ b/data/templates/html.txt @@ -0,0 +1,5 @@ + +
+ +
+ \ No newline at end of file diff --git a/data/templates/join.html b/data/templates/join.html new file mode 100644 index 0000000..18cac2d --- /dev/null +++ b/data/templates/join.html @@ -0,0 +1,65 @@ +

tildeverse banner exchange

+
+

Sign Up Now!

+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Username + +
Password + +
Email + +
Site URL + +
Banner URL + +
The banner must measure #%width%# x #%height%# pixels.
+ +
+
+
+ +
+
+
+
+
+ +
+ +
+ \ No newline at end of file diff --git a/data/templates/join_success.html b/data/templates/join_success.html new file mode 100644 index 0000000..517e9b8 --- /dev/null +++ b/data/templates/join_success.html @@ -0,0 +1,47 @@ +

tildeverse banner exchange

+
+ +Your account has been created. Thank you! +
+You may give our code to your site and earn credits immediately.
To see statistic, update your information or get HTML code for your site, please go to our members area.
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
Username: #%username%#
Password: #%password%#
Email: #%email%#
URL: #%siteurl%#
Your banner:
#%banner%#
+ +
+

+ + + + +
+This is the banner exchange code for your page(s): +
+ +
\ No newline at end of file diff --git a/data/templates/member_action.html b/data/templates/member_action.html new file mode 100644 index 0000000..9e24c7c --- /dev/null +++ b/data/templates/member_action.html @@ -0,0 +1,51 @@ +

tildeverse banner exchange

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
Please select function +
+
+
+ + +
Edit account
+ + +
Statistic
+ + +
Display HTML code
+
+
+ +
+
\ No newline at end of file diff --git a/data/templates/member_edit.html b/data/templates/member_edit.html new file mode 100644 index 0000000..2d6d539 --- /dev/null +++ b/data/templates/member_edit.html @@ -0,0 +1,54 @@ +

tildeverse banner exchange

+
#%info%# + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Username #%username%#
Password + +
Email + +
Site URL + +
Banner URL + +
+ +
+
+ +
+ + + +
\ No newline at end of file diff --git a/data/templates/member_html.html b/data/templates/member_html.html new file mode 100644 index 0000000..096ea8f --- /dev/null +++ b/data/templates/member_html.html @@ -0,0 +1,29 @@ +

tildeverse banner exchange

+
+ + + + + + + +
+ + + + + +
+ Use this code to display banners on your your page(s): +
+ +
+
+ +
+ + + +
\ No newline at end of file diff --git a/data/templates/member_login.html b/data/templates/member_login.html new file mode 100644 index 0000000..6453e74 --- /dev/null +++ b/data/templates/member_login.html @@ -0,0 +1,34 @@ +

tildeverse banner exchange

+
+ +Please log in +
+
+ + + + + + + + + + + + + + + +
Username: + +
Password: + +
+ +
+
+
+
+
+ +
\ No newline at end of file diff --git a/data/templates/member_stats.html b/data/templates/member_stats.html new file mode 100644 index 0000000..6702dd9 --- /dev/null +++ b/data/templates/member_stats.html @@ -0,0 +1,44 @@ +

tildeverse banner exchange

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + +
Statistic for member #%username%# +
+
+
Banners displayed on your site: #%i_m%#
Credits earned: #%i_earned%#
Your banner have been displayed: #%i_w%# times
Unused credits: +
+
+
#%i_nu%# +
+
+
+
+
+ + + +
\ No newline at end of file diff --git a/error_log b/error_log new file mode 100644 index 0000000..adda37f --- /dev/null +++ b/error_log @@ -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 diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..3c1f3cd --- /dev/null +++ b/functions.php @@ -0,0 +1,262 @@ +From: $s[email]
Sub: $sub
$emailtext


"; $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 '' . $info . '

'; +} +function eot($info, $errors) { + return '' . $info . '
' . $errors . '

'; +} +function public_problem($error) { + global $s; + $s[info] = $error; + page_from_template('error.html', $s); +} +function admin_right_frame_home() { + admin_ih(); + echo '




Welcome to the Admin Area

Please select a function from the menu on the left'; + 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 '

ERROR

' . $error . '


'; + 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') . '
New username
New password
'; + 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.
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 ''; + admin_ih(); + echo $s[info]; + echo '
Username
Password
'; + 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(); +} +?> \ No newline at end of file diff --git a/images/yourtildebanner.jpg b/images/yourtildebanner.jpg new file mode 100644 index 0000000..92413fd Binary files /dev/null and b/images/yourtildebanner.jpg differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..b392461 --- /dev/null +++ b/index.php @@ -0,0 +1,66 @@ + 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] = ''; +page_from_template('join_success.html', $in); +?> \ No newline at end of file diff --git a/index1.php b/index1.php new file mode 100644 index 0000000..2f08864 --- /dev/null +++ b/index1.php @@ -0,0 +1,4 @@ +Coming back very soon. Working on updating the codebase to php 7.x. + +Thanks +Tildeverse Banner Network \ No newline at end of file diff --git a/member.php b/member.php new file mode 100644 index 0000000..b2c774d --- /dev/null +++ b/member.php @@ -0,0 +1,94 @@ + $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] = ''; + 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); +} + +?> \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..00ee83d --- /dev/null +++ b/robots.txt @@ -0,0 +1,3 @@ +# vestacp autogenerated robots.txt +User-agent: * +Crawl-delay: 10 diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..e9b7e22 --- /dev/null +++ b/styles.css @@ -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 +} \ No newline at end of file diff --git a/work.old b/work.old new file mode 100644 index 0000000..dddeb25 --- /dev/null +++ b/work.old @@ -0,0 +1,59 @@ + \n + ALL BANNERS +
"; + $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 " + "; + } + echo '
+
'; + 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 "\n + + +
+
"; + dq("update $s[tblname] set i_nu = i_nu-1, i_w = i_w + 1 where username = '$data[username]'", 1); +} else { + echo "\n + + +
+
"; +} +?> \ No newline at end of file diff --git a/work.php b/work.php new file mode 100644 index 0000000..9946c4f --- /dev/null +++ b/work.php @@ -0,0 +1 @@ +