├── images ├── index.php └── readme.txt ├── banners └── index.php ├── members ├── images │ ├── readme.txt │ └── index.php ├── upgrade_members.php ├── banners.php ├── mem_auth.php ├── paidtoclick.php ├── confirmsite.php ├── ad_stats.php ├── allocate.php ├── buy.php ├── subtract.php ├── delete.php ├── edit.php ├── ptc.php ├── cashout.php ├── ptcstats.php ├── confirmbar.php ├── thankyou.php ├── upgrade.php ├── buy_upgrade.php ├── site.php ├── referral.php ├── upgrade_downline.php ├── history.php └── ptcbar.php ├── logout.php ├── target.php ├── README.md ├── bars.html ├── bars_done.html ├── urltest.php ├── bar.css ├── faq.php ├── control ├── adminauth.incl.php ├── style.css ├── emergency.php ├── remover.php ├── editptc.php └── admincron.php ├── clock.js ├── bar_break.php ├── main_page.php ├── memlinks.html ├── regmail.php ├── report.php ├── header.php ├── lost.php ├── timer.js ├── confirm.js ├── bonus.php ├── auth.php ├── vars.php ├── index.php ├── bonus_cash.php ├── activate.php ├── surfvisitor.php ├── stats.php ├── surf.php ├── contact.php ├── footer.php ├── styles.css ├── headfoot.php ├── banner.php └── surfbarvisitor.php /images/index.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /banners/index.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /images/readme.txt: -------------------------------------------------------------------------------- 1 | Add images here. Check css files for compatibility. 2 | -------------------------------------------------------------------------------- /members/images/readme.txt: -------------------------------------------------------------------------------- 1 | Check css files for image compatibility and other files. 2 | -------------------------------------------------------------------------------- /members/images/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /target.php: -------------------------------------------------------------------------------- 1 | Loading your session..."); 3 | ?> 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Traffic-Exchange 2 | ================ 3 | 4 | Open Source Traffic Exchange For Mutual Affordable Promotions 5 | 6 | Works up to PHP5.2 environment. Latest versions of PHP5 requires migration. 7 | 8 | Images are omitted. Check css files for image compatibility and other files. 9 | 10 | No further support is offered apart from which will stem from the open source community. 11 | 12 | Enjoy. 13 | -------------------------------------------------------------------------------- /bars.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 |
3 | 4 |
Please visit site for [timer] seconds...
8 | -------------------------------------------------------------------------------- /bars_done.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 |
3 | 4 |
Account #[userid] - Credited [amount]!
You May Now Close This Window.
8 | -------------------------------------------------------------------------------- /urltest.php: -------------------------------------------------------------------------------- 1 | $title
If you see this text and your site - and didn't get any pop ups or message boxes - your site will probably be approved...
"); 4 | } else { 5 | echo("$title"); 6 | } 7 | ?> 8 | -------------------------------------------------------------------------------- /bar.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, Helvetica, sans-serif; 3 | font-size: 11px; 4 | color: #E5E5E5; 5 | background-color: #000000; 6 | margin: 0; 7 | } 8 | 9 | table { 10 | font-family: Arial, Helvetica, sans-serif; 11 | font-size: 11px; 12 | color: #E5E5E5; 13 | } 14 | 15 | b { 16 | font-family: Arial, Helvetica, sans-serif; 17 | font-size: 11px; 18 | color: #FFFFFF; 19 | } 20 | 21 | a 22 | { 23 | font-family: Arial, Helvetica, sans-serif; 24 | font-size: 11px; 25 | color: #4DA0C6; 26 | text-decoration: none; 27 | } 28 | 29 | a:hover 30 | { 31 | color: #4DA0C6; 32 | text-decoration: underline; 33 | } 34 | -------------------------------------------------------------------------------- /faq.php: -------------------------------------------------------------------------------- 1 | Frequently Asked Questions (FAQs)"); 13 | for ($i = 0; $i < mysql_num_rows($res); $i++) { 14 | $quest = mysql_result($res, $i, "quest"); 15 | $answ = mysql_result($res, $i, "answ"); 16 | echo("

$quest
$answ

"); 17 | } 18 | ufooter(); 19 | mysql_close; 20 | exit; 21 | ?> 22 | -------------------------------------------------------------------------------- /members/upgrade_members.php: -------------------------------------------------------------------------------- 1 | 20 |

Upgraded members area

21 |

Place your upgraded member content here.

22 |

Back to members area

23 | 24 | 29 | -------------------------------------------------------------------------------- /control/adminauth.incl.php: -------------------------------------------------------------------------------- 1 | 38 | -------------------------------------------------------------------------------- /control/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin:20px; 3 | font-size:11px; 4 | line-height:18px; 5 | font-family: Arial, Helvetica, sans-serif; 6 | background: #000; 7 | } 8 | 9 | a { 10 | color:#018BC1; 11 | } 12 | 13 | a:hover { 14 | color:#333; 15 | } 16 | 17 | 18 | p { 19 | margin:0; 20 | padding:0 0 10px 0; 21 | font-size:11px; 22 | line-height:18px; 23 | font-family: Arial, Helvetica, sans-serif; 24 | } 25 | 26 | p.info { 27 | margin:0; 28 | padding:10px; 29 | border:1px solid #d7d7d7; 30 | background-color: #f5f5f5; 31 | font-size:11px; 32 | line-height:18px; 33 | font-family: Arial, Helvetica, sans-serif; 34 | } 35 | 36 | table { 37 | margin:0; 38 | font-size:11px; 39 | line-height:18px; 40 | font-family: Arial, Helvetica, sans-serif; 41 | } 42 | 43 | table.info { 44 | margin:0; 45 | border:1px solid #d7d7d7; 46 | background-color: #f5f5f5; 47 | font-size:11px; 48 | line-height:18px; 49 | font-family: Arial, Helvetica, sans-serif; 50 | } 51 | 52 | h1 { 53 | margin:0; 54 | padding:0 0 10px 0; 55 | line-height:18px; 56 | font-size:14px; color:#000;} 57 | -------------------------------------------------------------------------------- /clock.js: -------------------------------------------------------------------------------- 1 | function clock() { 2 | if (!document.layers && !document.all) return; 3 | var hours = theTime.getHours(); 4 | var minutes = theTime.getMinutes(); 5 | var seconds = theTime.getSeconds(); 6 | var m; 7 | theTime.setSeconds( seconds+1 ); 8 | var day = theTime.getDate(); 9 | var pre = "th"; 10 | var ampm = "am"; 11 | if (day == 1) pre = "st"; 12 | if (day == 21) pre = "st"; 13 | if (day == 31) pre = "st"; 14 | if (day == 2) pre = "nd"; 15 | if (day == 22) pre = "nd"; 16 | if (day == 3) pre = "rd"; 17 | if (day == 23) pre = "rd"; 18 | if (hours == 0) hours = "12"; 19 | if (hours >= 13) ampm = "pm"; 20 | if (hours >= 13) hours = hours - "12"; 21 | if (minutes <= 9) minutes = "0" + minutes; 22 | if (seconds <= 9) seconds = "0" + seconds; 23 | m = theTime.getMonth(); 24 | 25 | showTime = day+pre+" "+month[ m ]+" "+theTime.getFullYear()+" "+hours + ":" + minutes + ":" + seconds + ampm; 26 | if (document.layers) { 27 | document.layers.disp.document.write(showTime); 28 | document.layers.disp.document.close(); 29 | } 30 | else 31 | if (document.all) 32 | disp.innerHTML = showTime; 33 | setTimeout("clock()", 1000); 34 | } 35 | -------------------------------------------------------------------------------- /bar_break.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | <? echo("$title"); ?> - Surf Error 12 | 13 | 20 | "); ?> 21 | 22 | 23 |
24 | 25 | 26 | 29 | 33 | 34 |
28 |
30 |


31 |

32 |
35 |
36 | 37 | 38 | 42 | -------------------------------------------------------------------------------- /main_page.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Testimonials

4 | Read what members have to say about this service.
5 | signup.php?show=testimonials" title="Member Testimonials">click here...
6 | 7 |

Terms of Use

8 | Rules must be followed in order to be a member.
9 | signup.php?show=terms" title="Terms Of Use">click here...
10 | 11 |

Contact

12 | Use the contact form to say whats on your mind.
13 | contact.php" title="Contact Form">click here...
14 | 15 |
16 |
17 | 18 | 19 |

Welcome To

20 | 21 | $iearned_n

"); } ?> 22 | 23 |

24 | 25 |


signup.php" title="Signup">images/signup.gif" alt="Signup" border="0">

26 | -------------------------------------------------------------------------------- /memlinks.html: -------------------------------------------------------------------------------- 1 |

2 | Member Homepage ~ 3 | Account Details ~ 4 | Your Websites ~ 5 | Start Surfing Now ~ 6 | Paid To Click ~ 7 | Complete Account History 8 |
9 | Upgrade Account ~ 10 | Purchase Credits/PTC/Banner/Text ~ 11 | Banner/Text Ad Stats ~ 12 | PTC Ad Stats 13 |
14 | Referral Links/List ~ 15 | Referral Banners ~ 16 | Delete Your Account ~ 17 | Logout Of System
18 |

19 | -------------------------------------------------------------------------------- /regmail.php: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /members/banners.php: -------------------------------------------------------------------------------- 1 | Promotional Banners"); 14 | 15 | echo("

Member Homepage
"); 16 | 17 | echo("


Referral Banners:
18 | You can use these banners to refer new members to $title.
19 | All you need to do is copy the appropriate code into your HTML page.

"); 20 | for ($i = 0; $i < mysql_num_rows($res); $i++) { 21 | $bid = mysql_result($res, $i, "id"); 22 | $imgurl = mysql_result($res, $i, "imgurl"); 23 | $wh = mysql_result($res, $i, "widtheight"); 24 | $n = $i + 1; 25 | echo("

Banner #$n:
26 |
27 |

"); 28 | } 29 | 30 | echo("

 


Member Homepage
"); 31 | secfooter(); 32 | mysql_close; 33 | exit; 34 | ?> 35 | -------------------------------------------------------------------------------- /control/emergency.php: -------------------------------------------------------------------------------- 1 | \n"; ?> 8 | 9 | 10 | 11 | Energency Database Repair File 12 | 13 | 14 | 15 |

Your database was successfully repaired and optimized.

16 |

Click here to login to your admin area

17 | 18 | 19 | 23 | -------------------------------------------------------------------------------- /report.php: -------------------------------------------------------------------------------- 1 | = 1) { 23 | if ($_POST['text'] == "") { 24 | $text = "No commments given."; 25 | } else { 26 | $text = addslashes($_POST['text']); 27 | $text = addcslashes($_POST['text'], "%"); 28 | } 29 | $res = mysql_query("insert into abuse (siteid, usrid, text) values ($s, " . $_SESSION['sess_data']['usrid'] . ", '$text')"); 30 | } 31 | header("Location: $self_url" . "surf.php?done"); 32 | mysql_close; 33 | exit; 34 | } else { 35 | secheader(); 36 | echo("

Report Surf Abuse

37 |

38 | 39 | 40 | If you think this site in any way violates $title rules, please, type your complaint in the field below and press 'Send Report'. Reports are checked and verified by administration. If your report is found to be true, you may be rewarded.

41 |


42 |

"); 43 | secfooter(); 44 | mysql_close; 45 | exit; 46 | } 47 | ?> 48 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <? print ("$title"); ?> : <? print ("$slogan"); ?> 9 | 10 | 11 | styles.css" rel="stylesheet" type="text/css" media="screen" /> 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 | 5 | 6 | 7 | 8 |
9 |
10 | 11 |
Member Login
12 |
13 |
14 | E-mail:
15 | 16 |
17 | Password:
18 | 19 |
20 | ">Lost Password? - ">Not Registered? 21 |
22 | "; ?> 23 | 24 | 25 |

26 |
27 | 28 | 29 |
Member Menu
30 | 46 | 47 |
Website Statistics
48 |
49 | "; 69 | echo "\nTotal Members:$c1"; 70 | echo "\nUpgraded Members:$c2"; 71 | echo "\nMembers Surfing Now:$c7"; 72 | echo "\nWebsites In Surf:$c5"; 73 | echo "\nWebsites Shown Today:$c6"; 74 | echo "\nTotal Paid Out:$c8"; 75 | echo "\n"; 76 | ?>
77 | 81 |
82 | 83 |
Featured Links
84 |
85 |
    86 | ',''); ?> 87 |
88 |
89 | 90 |
91 |
92 |
93 | 94 | 106 | 107 |
108 |
109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /members/confirmbar.php: -------------------------------------------------------------------------------- 1 | $title 12 | link rel=stylesheet type=text/css href=../style.css>\n"); 13 | echo("\n"); 14 | echo(" 15 |
This page is not enabled on this site!
16 | Members Area 17 | "); 18 | mysql_close; 19 | exit; 20 | } 21 | $res = mysql_query("select value from adminprops where field='reftim'"); 22 | $wait_timer_amt = mysql_result($res, 0, "value") + 5; 23 | if ($_GET['siteid'] && $_GET['action'] == 'go' && $_GET['vc'] == md5($_SESSION['sess_data']['usrauthent'])) { 24 | if (!isset($_SESSION['sess_data']['timesa']) || (time() - $_SESSION['sess_data']['timesa']) >= $wait_timer_amt) { 25 | $_SESSION['sess_data']['timesa'] = time(); 26 | } 27 | if (!isset($delay)) { 28 | $delay = $wait_timer_amt; 29 | } 30 | $_SESSION['sess_data']['usrauthent'] = md5($_SESSION['sess_data']['usrauthent']); 31 | $_SESSION['sess_data']['usrauthentica'] = md5($_SESSION['sess_data']['usrauthent']); 32 | echo(" 33 | $title 34 | \n\n"); 35 | echo("\n"); 37 | echo("\n"); 38 | echo("\n"); 39 | echo("\n\n"); 40 | echo("
41 | 42 | 43 |

44 | When the timer above shows GO! click Confirm My Site
45 | 46 | 47 | 48 |
"); 49 | echo("$surf_ban_rotator
"); 50 | } elseif ($_GET['siteid'] && $_GET['action'] == 'approved' && $_GET['vc'] == md5($_SESSION['sess_data']['usrauthent'])) { 51 | if (!isset($_SESSION['sess_data']['timesa']) || (time() - $_SESSION['sess_data']['timesa']) >= $wait_timer_amt) { 52 | $_SESSION['sess_data']['timesa'] = ""; 53 | } else { 54 | $_SESSION['sess_data']['timesa'] = ""; 55 | $_SESSION['sess_data']['usrauthent'] = ""; 56 | $_SESSION['sess_data']['usrauthentica'] = ""; 57 | echo("$title 58 | 59 |
Sorry you did not wait $wait_timer_amt seconds you must start the verification process again
60 | Confirm Again
61 | Members Area
62 | "); 63 | mysql_close; 64 | exit; 65 | } 66 | $wer = mysql_query("SELECT * FROM site WHERE id=" . $_GET['siteid'] . " && usrid=$usrid"); 67 | $state = mysql_result($wer, 0, "state"); 68 | if ($state != 'Waiting') { 69 | $_SESSION['sess_data']['usrauthent'] = ""; 70 | $_SESSION['sess_data']['usrauthentica'] = ""; 71 | echo("$title 72 | 73 |
Sorry you can not validate this site!
Members Area
74 | "); 75 | mysql_close; 76 | exit; } 77 | $raz = mysql_query("UPDATE site SET state='Enabled' WHERE id=" . $_GET['siteid']); 78 | $_SESSION['sess_data']['usrauthent'] = ""; 79 | $_SESSION['sess_data']['usrauthentica'] = ""; 80 | echo("\n
Your site has been approved and is now ready for others to view!

Members Home
"); 81 | mysql_close; 82 | exit; 83 | } else { 84 | $_SESSION['sess_data']['usrauthent'] = ""; 85 | $_SESSION['sess_data']['usrauthentica'] = ""; 86 | echo(" 87 | $title 88 | \n"); 89 | echo("\n"); 90 | echo("
This page was not accessed correctly!
Members Area"); 91 | mysql_close; 92 | exit; 93 | } 94 | ?> 95 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | * 2 | 3 | { 4 | margin: 0px; 5 | padding: 0px; 6 | } 7 | 8 | 9 | a:link { 10 | color: #116EBD; 11 | } 12 | 13 | a:hover { 14 | text-decoration: underline; 15 | color: #FF0000; 16 | } 17 | 18 | body { 19 | 20 | background: #CACBC6 url(images/back_all2.gif); 21 | font: 11px Arial, Helvetica, sans-serif; 22 | color: #666666; 23 | } 24 | 25 | #content 26 | { 27 | width: 100%; 28 | text-align: left; 29 | background: url(images/back_all.jpg) repeat-x; 30 | } 31 | 32 | #main 33 | { 34 | width: 943px; 35 | margin: 0 auto; 36 | padding-left: 13px; 37 | background: url(images/top_left.jpg) no-repeat left top; 38 | } 39 | 40 | #page 41 | { 42 | background: url(images/table_back.gif) repeat-y; 43 | width: 943px; 44 | } 45 | 46 | #right #header { 47 | height: 199px; 48 | width: 714px; 49 | } 50 | 51 | #right #logo { 52 | width: 690px; 53 | height: 101px; 54 | text-align: right; 55 | padding-top: 55px; 56 | padding-right: 24px; 57 | background: url(images/header.jpg) no-repeat; 58 | } 59 | 60 | 61 | #right #logo a { 62 | text-decoration: none; 63 | text-transform: lowercase; 64 | font-style: italic; 65 | font-size: 18px; 66 | color: #ffffff; 67 | } 68 | #right #logo H2 a 69 | { 70 | font-size: 10px; 71 | text-transform: uppercase; 72 | } 73 | 74 | 75 | #right #menu 76 | { 77 | margin: 0 auto; 78 | width: 714px; 79 | height: 43px; 80 | background: url(images/menu.jpg) no-repeat; 81 | } 82 | 83 | #menu ul { 84 | list-style: none; 85 | } 86 | 87 | #menu li { 88 | 89 | display: inline; 90 | 91 | } 92 | 93 | #menu a { 94 | float: left; 95 | width: 100px; 96 | height: 34px; 97 | display: block; 98 | text-align: center; 99 | text-decoration: none; 100 | color: #ffffff; 101 | font-weight: bold; 102 | padding-top: 6px; 103 | font-size: 14px; 104 | text-transform: uppercase; 105 | } 106 | 107 | #menu a:hover { 108 | width: 100px; 109 | height: 34px; 110 | color: #68C1EA; 111 | text-decoration: underline; 112 | } 113 | 114 | 115 | 116 | 117 | #left 118 | { 119 | width: 229px; 120 | margin-left: 0px; 121 | color: #ffffff 122 | } 123 | 124 | #top_left 125 | { 126 | background: url(images/top.jpg) no-repeat; 127 | width: 229px; 128 | height: 156px; 129 | } 130 | 131 | .titl_left 132 | { 133 | width: 194px; 134 | height: 20px; 135 | padding-top: 3px; 136 | font-size: 14px; 137 | font-weight: bold; 138 | padding-left: 35px; 139 | text-transform: uppercase; 140 | color: #ffffff; 141 | background: url(images/title.gif) no-repeat; 142 | margin: 0px; 143 | } 144 | 145 | #left ul { 146 | list-style: none; 147 | margin-bottom: 10px; 148 | } 149 | 150 | 151 | #left li { 152 | border: 0px; 153 | background: url(images/small.gif) no-repeat 0px 5px; 154 | padding-left: 10px; 155 | } 156 | 157 | #left li { 158 | margin: 4px 0px; 159 | } 160 | 161 | #left a { 162 | color: #ffffff; 163 | text-decoration: underline; 164 | } 165 | 166 | #left a:hover { 167 | color: #ffffff; 168 | text-decoration: none; 169 | 170 | } 171 | 172 | 173 | .ug { 174 | padding: 10px 10px 10px 20px; 175 | } 176 | 177 | #right 178 | { 179 | float: right; 180 | width: 714px; 181 | } 182 | 183 | #right_page 184 | { 185 | background: url(images/top_right2.jpg) no-repeat 7px 0px; 186 | } 187 | 188 | #right_page_ads 189 | { 190 | background: #CACBC6 url(images/back_all2.gif); 191 | padding: 0px; 192 | margin: 0px; 193 | } 194 | 195 | #right_page #icons H3 196 | { 197 | color: #116EBD; 198 | font-size: 14px; 199 | font-weight: bold 200 | } 201 | 202 | #icons 203 | { 204 | background: url(images/top_right.gif) no-repeat 0px 0px; 205 | margin: 0; 206 | } 207 | 208 | #icons .icon 209 | { 210 | float: left; 211 | width: 145px; 212 | height: 80px; 213 | padding-left: 85px; 214 | padding-top: 10px; 215 | } 216 | 217 | #icons .icon a 218 | { 219 | font-size: 11px; 220 | color: #FF0000; 221 | font-weight: bold; 222 | } 223 | 224 | #right #right_page ul, #right #right_page ol 225 | { 226 | padding-left: 20px; 227 | } 228 | 229 | #right a 230 | { 231 | color: #4DA0C6; 232 | text-decoration: none; 233 | } 234 | 235 | #right a:hover 236 | { 237 | color: #4DA0C6; 238 | text-decoration: underline; 239 | } 240 | 241 | #right p { 242 | margin: 0; 243 | padding: 0px 10px 0px 10px; 244 | padding-bottom: 10px; 245 | } 246 | 247 | #right #right_page h4 { 248 | height: 27px; 249 | padding: 5px 0px 0px 0px; 250 | margin: 0; 251 | font-size: 14px; 252 | color: #116EBD; 253 | background: url(images/h4.gif) repeat-x; 254 | margin-left: 10px; 255 | } 256 | 257 | #right .date 258 | { 259 | height: 30px; 260 | margin-bottom: 10px; 261 | margin-top: 10px; 262 | } 263 | 264 | #right .date ul 265 | { 266 | list-style: none; 267 | } 268 | 269 | #right .date li 270 | { 271 | display: inline; 272 | } 273 | 274 | #right .small_icon1 275 | { 276 | background: url(images/icon1.gif) no-repeat; 277 | height: 24px; 278 | width: 170px; 279 | float: left; 280 | display: block; 281 | text-align: left; 282 | padding-top: 6px; 283 | padding-left: 30px; 284 | } 285 | 286 | #right .small_icon2 287 | { 288 | background: url(images/icon2.gif) no-repeat; 289 | height: 24px; 290 | width: 170px; 291 | float: left; 292 | display: block; 293 | text-align: left; 294 | padding-top: 6px; 295 | padding-left: 30px; 296 | } 297 | 298 | #right .small_icon3 299 | { 300 | background: url(images/icon3.gif) no-repeat; 301 | height: 24px; 302 | width: 170px; 303 | float: left; 304 | display: block; 305 | text-align: left; 306 | padding-top: 6px; 307 | padding-left: 30px; 308 | } 309 | 310 | 311 | #text 312 | { 313 | padding-top: 10px; 314 | padding-left: 10px; 315 | padding-right: 10px; 316 | } 317 | 318 | #right h4 a { 319 | color: #116EBD; 320 | } 321 | 322 | #right ol, #right ul 323 | { 324 | margin-left: 30px; 325 | } 326 | 327 | 328 | .date { 329 | text-align: right; 330 | color: #4DA0C6; 331 | font-size: 11px; 332 | } 333 | 334 | .date a { 335 | color: #4DA0C6; 336 | } 337 | 338 | 339 | 340 | #footer { 341 | height: 48px; 342 | clear: both; 343 | padding-top: 30px; 344 | background: url(images/footer.gif) no-repeat; 345 | } 346 | 347 | #footer p { 348 | margin: 0; 349 | font-size: 10px; 350 | text-align: center; 351 | color: #000000; 352 | } 353 | 354 | #footer a { 355 | color: #4DA0C6; 356 | text-decoration: none; 357 | } 358 | #footer a:hover { 359 | color: #4DA0C6; 360 | text-decoration: underline; 361 | } 362 | -------------------------------------------------------------------------------- /members/thankyou.php: -------------------------------------------------------------------------------- 1 | = 1 || round($_POST['purch_2']) >= 1)) { 17 | $error = "no"; 18 | if ($_POST['purch'] == "" && round($_POST['purch_2']) >= 1) { 19 | if ($_POST['extra_message'] != "" && (ereg('<', $_POST['extra_message']) || ereg('>', $_POST['extra_message']))) { 20 | $error = "yes"; 21 | $why = $why . "The additional details cannot contain html characters (< or >)!
"; 22 | } 23 | $my_share_tot = $my_shares + round($_POST['purch_2']); 24 | if ($my_share_tot > $sharea) { 25 | $error = "yes"; 26 | $why = $why . "You could not have purchased that many $upgrade_title"."s!
"; 27 | } elseif ($error == 'no') { 28 | $cash_ammmt = round($_POST['purch_2']) * $sharec; 29 | mail($private_sys_email, "User $usrid Requesting $upgrade_title"."s Confirmation", "Hi $title system here..\n\nMember $usrid has just confirmed their purchase of:\n\n" . $_POST['purch_2'] . " $upgrade_title(s) @ \$$sharec per $upgrade_title - Totaling: \$$cash_ammmt\n\nPaid with: " . $_POST['paid_with'] . "\n\nAdditional Comments:\n".trim($_POST['extra_message'])."\n\nRegards\n\n$title System", $email_headers); 30 | secheader(); 31 | members_main_menu($members_menu); 32 | echo("

User account #$usrid : Thank you!

"); 33 | echo("Your request has been received and $title Admin will update your account when your payment is verified."); 34 | secfooter(); 35 | mysql_close; 36 | exit; 37 | } 38 | } elseif ($_POST['purch_2'] == "" && $_POST['purch'] >= 1 && $error == 'no') { 39 | if ($_POST['extra_message'] != "" && (ereg('<', $_POST['extra_message']) || ereg('>', $_POST['extra_message']))) { 40 | $error = "yes"; 41 | $why = $why . "The additional details cannot contain html characters (< or >)!
"; 42 | } 43 | $res = mysql_query("select * from sellcredit where id=" . $_POST['purch']); 44 | if (mysql_num_rows($res) == 0) { 45 | $error = "yes"; 46 | $why = $why . "That purchase wasn't found!
"; 47 | } elseif ($error == 'no') { 48 | $sell_id = mysql_result($res, 0, "id"); 49 | $sell_name = mysql_result($res, 0, "name"); 50 | $sell_cost = mysql_result($res, 0, "cost"); 51 | mail($private_sys_email, "User $usrid Requesting Payment Update", "Hi $title system here..\n\nMember $usrid has confirmed their purchase of:\n\n$sell_name - \$$sell_cost\n\nPaid with: " . $_POST['paid_with'] . "\n\nAdditional Comments:\n".trim($_POST['extra_message'])."\n\nRegards\n\n$title System", $email_headers); 52 | secheader(); 53 | members_main_menu($members_menu); 54 | echo("

User account #$usrid : Thank you!

"); 55 | echo("Your request has been received and $title Admin will update your account when your payment is verified."); 56 | secfooter(); 57 | mysql_close; 58 | exit; 59 | } 60 | } else { 61 | $error = "yes"; 62 | $why = $why . "You must enter only one purchase type!
"; 63 | } 64 | } 65 | secheader(); 66 | members_main_menu($members_menu); 67 | echo("

User account #$usrid : Thank you!

"); 68 | if ($error == 'yes') { 69 | echo("

$why

"); 70 | } 71 | ?> 72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | 98 | 99 | 100 | 101 | 111 | 112 | 113 | 117 | 118 | 119 | 120 | 121 | 122 | 123 |
Confirm Purchase
Purchased : 80 | or 97 | (s) @
Paid with :
Additional Details (No HTML!) 114 | :
115 | PTC advert details etc.. 116 |
Confirm :
124 |
125 | 130 | -------------------------------------------------------------------------------- /members/upgrade.php: -------------------------------------------------------------------------------- 1 | = 1 || round($_POST['purch_2']) >= 1)) { 17 | $error = "no"; 18 | if ($_POST['purch'] == "" && round($_POST['purch_2']) >= 1) { 19 | if ($_POST['extra_message'] != "" && (ereg('<', $_POST['extra_message']) || ereg('>', $_POST['extra_message']))) { 20 | $error = "yes"; 21 | $why = $why . "The additional details cannot contain html characters (< or >)!
"; 22 | } 23 | $my_share_tot = $my_shares + round($_POST['purch_2']); 24 | if ($my_share_tot > $sharea) { 25 | $error = "yes"; 26 | $why = $why . "You could not have purchased that many $upgrade_title"."s!
"; 27 | } elseif ($error == 'no') { 28 | $cash_ammmt = round($_POST['purch_2']) * $sharec; 29 | mail($private_sys_email, "User $usrid Requesting $upgrade_title"."s Confirmation", "Hi $title system here..\n\nMember $usrid has just confirmed their purchase of:\n\n" . $_POST['purch_2'] . " $upgrade_title(s) @ \$$sharec per $upgrade_title - Totaling: \$$cash_ammmt\n\nPaid with: " . $_POST['paid_with'] . "\n\nAdditional Comments:\n".trim($_POST['extra_message'])."\n\nRegards\n\n$title System", $email_headers); 30 | secheader(); 31 | members_main_menu($members_menu); 32 | echo("

User account #$usrid : Thank you!

"); 33 | echo("Your request has been received and $title Admin will update your account when your payment is verified."); 34 | secfooter(); 35 | mysql_close; 36 | exit; 37 | } 38 | } elseif ($_POST['purch_2'] == "" && $_POST['purch'] >= 1 && $error == 'no') { 39 | if ($_POST['extra_message'] != "" && (ereg('<', $_POST['extra_message']) || ereg('>', $_POST['extra_message']))) { 40 | $error = "yes"; 41 | $why = $why . "The additional details cannot contain html characters (< or >)!
"; 42 | } 43 | $res = mysql_query("select * from sellcredit where id=" . $_POST['purch']); 44 | if (mysql_num_rows($res) == 0) { 45 | $error = "yes"; 46 | $why = $why . "That purchase wasn't found!
"; 47 | } elseif ($error == 'no') { 48 | $sell_id = mysql_result($res, 0, "id"); 49 | $sell_name = mysql_result($res, 0, "name"); 50 | $sell_cost = mysql_result($res, 0, "cost"); 51 | mail($private_sys_email, "User $usrid Requesting Payment Update", "Hi $title system here..\n\nMember $usrid has confirmed their purchase of:\n\n$sell_name - \$$sell_cost\n\nPaid with: " . $_POST['paid_with'] . "\n\nAdditional Comments:\n".trim($_POST['extra_message'])."\n\nRegards\n\n$title System", $email_headers); 52 | secheader(); 53 | members_main_menu($members_menu); 54 | echo("

User account #$usrid : Thank you!

"); 55 | echo("Your request has been received and $title Admin will update your account when your payment is verified."); 56 | secfooter(); 57 | mysql_close; 58 | exit; 59 | } 60 | } else { 61 | $error = "yes"; 62 | $why = $why . "You must enter only one purchase type!
"; 63 | } 64 | } 65 | secheader(); 66 | members_main_menu($members_menu); 67 | echo("

User account #$usrid : Thank you!

"); 68 | if ($error == 'yes') { 69 | echo("

$why

"); 70 | } 71 | ?> 72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | 98 | 99 | 100 | 101 | 111 | 112 | 113 | 117 | 118 | 119 | 120 | 121 | 122 | 123 |
Confirm Purchase
Purchased : 80 | or 97 | (s) @
Paid with :
Additional Details (No HTML!) 114 | :
115 | PTC advert details etc.. 116 |
Confirm :
124 |
125 | 130 | -------------------------------------------------------------------------------- /members/buy_upgrade.php: -------------------------------------------------------------------------------- 1 | = 1 && $_POST['pay_meth'] != "") { 18 | if ($sharec > 0 && $sharea > 0) { 19 | $my_shares = round($invested / $sharec); 20 | if ($my_shares < $sharea) { 21 | $allow_buy = 'yes'; 22 | } else { 23 | header("Location: $self_url" . "members/upgrade.php?maximum"); 24 | mysql_close; 25 | exit; 26 | } 27 | $tot_shares = $my_shares + round($_POST['amount']); 28 | $req_shares = round($_POST['amount']); 29 | $price = $req_shares * $sharec; 30 | if ($tot_shares > $sharea || $req_shares > $sharea) { 31 | header("Location: $self_url" . "members/upgrade.php?too-many"); 32 | mysql_close; 33 | exit; 34 | } 35 | if ($req_shares > 1) { 36 | $ss = "s"; 37 | } 38 | if (is_numeric($_POST['pay_meth']) && $_POST['pay_meth'] >= 1) { 39 | $m_codes = mysql_query("select * from merchant_codes WHERE id=" . $_POST['pay_meth']); 40 | if (mysql_num_rows($m_codes) == 0) { 41 | header("Location: $self_url" . "members/upgrade.php?merchant-error"); 42 | mysql_close; 43 | exit; 44 | } 45 | $code = mysql_result($m_codes, 0, "code"); 46 | $merch_name = mysql_result($m_codes, 0, "name"); 47 | $code = str_replace('[user]', $usrid, $code); 48 | $code = str_replace('[cost]', $price, $code); 49 | $code = str_replace('[description]', "$req_shares $upgrade_title$ss @ \$$sharec per $upgrade_title - Total: \$$price - User: $usrid", $code); 50 | $code = str_replace('[email]', $_SESSION['sess_name'], $code); 51 | secheader(); 52 | echo("

Upgrade Your Account

"); 53 | echo("
"); 54 | 55 | echo("You have requested to buy $req_shares $upgrade_title$ss for \$$sharec per $upgrade_title

56 | Please make sure to follow through your payment processor back to here to complete your order. To avoid fradulant purchases, all orders are manually approved and you can expect to see the change in your account within 48 hours.

57 | Your Total: \$$price
58 | Processor: $merch_name

59 | $code"); 60 | 61 | echo("

 

"); 62 | secfooter(); 63 | } else { 64 | if ($roi_cash < $price) { 65 | header("Location: $self_url" . "members/upgrade.php?not-enough-funds"); 66 | mysql_close; 67 | exit; 68 | } elseif ($allow_member_roi_upgrades != 1) { 69 | header("Location: $self_url" . "members/upgrade.php?not-allowed"); 70 | mysql_close; 71 | exit; 72 | } 73 | $date_now = date("Y-m-d"); 74 | $datetime_now = date("Y-m-d H:i:s"); 75 | $getdays = mysql_result(mysql_query("SELECT upg_time FROM acctype WHERE id!=1"), 0); 76 | $the_day = strftime("%Y-%m-%d", strtotime("$date_now + $getdays days")); 77 | if ($acctype == 1 && $upgrade_member_if_buy != 0) { 78 | $accupd = ", acctype=2, upgrade_ends='$the_day'"; 79 | } elseif ($acctype == 2 && $upgrade_member_if_buy != 0) { 80 | $accupd = ", upgrade_ends='$the_day'"; 81 | } else { 82 | $accupd = ""; 83 | } 84 | $month_now = date("m"); 85 | $year_now = date("Y"); 86 | $resm = mysql_query("SELECT * FROM monthly_stats WHERE monthis=$month_now && yearis=$year_now && usrid=$usrid"); 87 | if (mysql_num_rows($resm) != 0) { 88 | $ins_upd = mysql_query("UPDATE monthly_stats SET paid_out=paid_out+$price WHERE usrid=$usrid && yearis=" . date("Y") . " && monthis=" . date("m")) or die (mysql_error()); 89 | } else { 90 | header("Location: $self_url" . "members/upgrade.php?system-error_try-again"); 91 | include("../cronjob.php"); 92 | mysql_close; 93 | exit; 94 | } 95 | $upd = mysql_query("INSERT INTO investment_history (usrid, amount, descr, is_from, processor, adate) VALUES ($usrid, $price, '$req_shares $upgrade_title$ss @ \$$sharec per $upgrade_title', 'Account Earnings', '$title', '$date_now')") or die (mysql_error()); 96 | $upd = mysql_query("UPDATE user SET invested=invested+$price, roi_cash=roi_cash-$price" . $accupd . " WHERE id=$usrid"); 97 | $csures = mysql_query("UPDATE adminprops SET value=value+$price WHERE field='csurpl'"); 98 | if ($email_admin_if_buy == 1) { 99 | $left_ammmv = $roi_cash - $price; 100 | $ad_msg = "System here...\n\nMember Number $usrid just purchased $req_shares $upgrade_title$ss @ \$$sharec each..\n\nThey had: \$$roi_cash and now have \$$left_ammmv remaining\n\nRegards\n\n$title System\n$self_url"; 101 | mail($private_sys_email, "User $usrid Bought $upgrade_title$ss With Earnings", $ad_msg , $email_headers); 102 | } 103 | secheader(); 104 | echo("

Upgrade Your Account

"); 105 | echo("
"); 106 | echo("

Success!
You just purchased $req_shares $upgrade_title$ss for \$$sharec each. This upgrade has been instantly added to your account.

"); 107 | echo("

 

"); 108 | secfooter(); 109 | mysql_close; 110 | exit; 111 | } 112 | } else { 113 | header("Location: $self_url" . "members/?not-allowed"); 114 | mysql_close; 115 | exit; 116 | } 117 | } else { 118 | header("Location: $self_url" . "members/upgrade.php?form-error"); 119 | mysql_close; 120 | exit; 121 | } 122 | mysql_close; 123 | exit; 124 | ?> 125 | -------------------------------------------------------------------------------- /members/site.php: -------------------------------------------------------------------------------- 1 | "English", "Arabic" => "Arabic", "Chinese" => "Chinese", "Czech" => "Czech", "Danish" => "Danish", "Dutch" => "Dutch", "Estonian" => "Estonian", "Finnish" => "Finnish", "French" => "French", "German" => "German", "Greek" => "Greek", "Hebrew" => "Hebrew", "Hungarian" => "Hungarian", "Icelandic" => "Icelandic", "Italian" => "Italian", "Japanese" => "Japanese", "Korean" => "Korean", "Latvian" => "Latvian", "Lithuanian" => "Lithuanian", "Norwegian" => "Norwegian", "Polish" => "Polish", "Portuguese" => "Portuguese", "Romanian" => "Romanian", "Russian" => "Russian", "Spanish" => "Spanish", "Swedish" => "Swedish", "Turkish" => "Turkish"); 14 | if ($sid == 0) { 15 | secheader(); 16 | 17 | echo("

Add A New Website

"); 18 | 19 | echo(""); 20 | 21 | echo("


Add A New Website
Fill out the small form below to add a new website. You are the only one who will see the Website Name. Using a short Website Name will keep your website list more uniform.

"); 22 | echo("

23 | 24 | 25 | 27 | 28 | 29 | 30 |
Website Name: 26 |
Website URL:
Website Language:
 

"); 35 | 36 | echo("

 

"); 37 | secfooter(); 38 | } else { 39 | $res = mysql_query("select name, url, lang, state, cph from site where id=$sid && usrid=$usrid"); 40 | if (mysql_num_rows($res) == 0) { 41 | header("Location: ".$self_url."index.php?sid=".$sid); 42 | mysql_close; 43 | exit; 44 | } 45 | secheader(); 46 | 47 | echo("

Edit Your Website

"); 48 | 49 | echo(""); 50 | 51 | echo("


Edit Your Website
Fill out the small form below to edit your website. If you edit your website, it will have to go through the approval process again. You are the only one who will see the Website Name. Using a short Website Name will keep your website list more uniform.

"); 52 | $sname = mysql_result($res, 0, "name"); 53 | $sname = stripslashes($sname); 54 | $surl = mysql_result($res, 0, "url"); 55 | $slang = mysql_result($res, 0, "lang"); 56 | $sstate = mysql_result($res, 0, "state"); 57 | $cph = mysql_result($res, 0, "cph"); 58 | $usstates = array("Waiting" => "Waiting", "On hold" => "On hold"); 59 | echo("

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 76 | 77 | "); 90 | if ($acctype != 1) {echo(" 91 | ");} 92 | echo(" 93 | 94 | 95 |
Website Name:
Website URL:
Website Language:
Website State:"); 78 | if ($sstate == 'Waiting' || $sstate == 'Suspended') { 79 | echo("\n$sstate"); 80 | } else { 81 | echo(""); 88 | } 89 | echo("
Max Credits Per Hour: (MCPH)
 
 
96 | 97 | 98 |

"); 99 | 100 | echo("

 

"); 101 | secfooter(); 102 | } 103 | } else { 104 | header("Location: ".$self_url."members/index.php?".$sid); 105 | mysql_close; 106 | exit; 107 | } 108 | mysql_close; 109 | exit; 110 | ?> 111 | -------------------------------------------------------------------------------- /members/referral.php: -------------------------------------------------------------------------------- 1 | Level $nb:
$r_cbons2[$b]%
"; 30 | } 31 | for($c=0;$c<$acc_r_cbona;$c++) { 32 | $nbb=$c+1; 33 | $r_bonss = $r_bonss . "Level $nbb: $r_cbons2a[$c] credits
"; 34 | } 35 | for($d=0;$d<$acc_r_cbonb;$d++) { 36 | $nba=$d+1; 37 | $ptc_levs = $ptc_levs . "Level $nba: $r_cbons2b[$d]%
"; 38 | } 39 | secheader(); 40 | 41 | echo("

Referral Bonuses & Statistics

"); 42 | 43 | echo(""); 44 | 45 | ?> 46 | 47 |


Your Referral URL Is:
48 | " size="50"> 49 | 0) {echo("
You will earn $rpgebonus credit(s) per unique referral page view."); }?>

50 | 51 |

Earn From Your Referrals
52 | You can earn from your referrals whenever they signup and surf. See the below information for complete details.
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 87 | 88 |
Earn Credits (Surf & PTC)Earn PTC CashNew Referral BonusYour Referral Count
$acc_r_cbona && $acc_r_cbon > $acc_r_cbonb) {$greatest = $acc_r_cbon; } elseif ($acc_r_cbona > $acc_r_cbon && $acc_r_cbona > $acc_r_cbonb) {$greatest = $acc_r_cbona; } elseif ($acc_r_cbonb > $acc_r_cbon && $acc_r_cbonb > $acc_r_cbona) {$greatest = $acc_r_cbonb; } else { $greatest = $acc_r_cbon; } 67 | for($z=0;$z<$greatest;$z++) { 68 | $rxid=get_ref_levels($rxid,$z); 69 | if (count($rxid) >0){ 70 | $rxid = join(",",$rxid); 71 | $qry = "select id from user where id in ($rxid)"; 72 | $rss = mysql_query($qry); 73 | while($rs1 = mysql_fetch_array($rss)) { 74 | $rr_id[$z] .= $rs1[0]." , "; 75 | } 76 | $len = strlen($rr_id[$z]); 77 | $len-=2; 78 | $rr_id[$z] = substr($rr_id[$z],0,$len); 79 | } 80 | } 81 | for($i=0;$i<$greatest;$i++) { 82 | $n=$i+1; 83 | if ($tier[$i] == "") {$tier[$i] = 0; } 84 | echo("Level $n: $tier[$i] Referrals
"); 85 | } 86 | ?>

89 | 90 |


Your Referral List
91 | "); 94 | } else { 95 | 96 | echo(" 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | "); 105 | for ($i = 0; $i < mysql_num_rows($res); $i++) { 106 | $refs_id = mysql_result($res, $i, "id"); 107 | $name = mysql_result($res, $i, "name"); 108 | $tref = mysql_result($res, $i, "toref"); 109 | $cshtref = mysql_result($res, $i, "cshtoref"); 110 | $commstoref = mysql_result($res, $i, "commstoref"); 111 | $total_to_ref = $cshtref + $commstoref; 112 | $allow_contact = mysql_result($res, $i, "allow_contact"); 113 | $ref_acc = mysql_result($res, $i, "acctype"); 114 | $ptc_clicks = mysql_result($res, $i, "ptc_clicks"); 115 | $lifetime_pages = mysql_result($res, $i, "lifetime_pages"); 116 | if ($ref_acc == 1) { 117 | $refs_acc = "Free"; 118 | } else { 119 | $refs_acc = "Upgraded"; 120 | } 121 | if ($allow_contact == 'yes') { 122 | $ref_e = mysql_result($res, $i, "email"); 123 | $ref_email = "$ref_e"; 124 | } else { 125 | $ref_email = "Privacy Requested"; 126 | } 127 | $tref = mysql_result($res, $i, "toref"); 128 | $tref = round($tref, 3); 129 | $nn = $i + 1; 130 | echo(" 131 | 132 | 133 | 134 | 135 | 136 | 137 | "); 148 | } 149 | echo("
ID #NameEmailYour Earned CreditsYour Earned CashAccountUpgrade Referral
$nn$name$ref_emailSurf: $lifetime_pages pages
PTC: $ptc_clicks clicks
Totals: $tref credits
Comissions: \$$commstoref
PTC Cash: \$$cshtref
Totals: \$$total_to_ref
$refs_acc

"); 150 | } 151 | 152 | echo("

 

"); 153 | secfooter(); 154 | mysql_close; 155 | exit; 156 | ?> 157 | -------------------------------------------------------------------------------- /headfoot.php: -------------------------------------------------------------------------------- 1 | 0) { 45 | while ($r = mysql_fetch_array($res)) { 46 | $text = $r['text']; 47 | echo $fstart.$text.$fend; 48 | } 49 | } 50 | @mysql_free_result($res); 51 | } 52 | function get_referral($vid) { 53 | $query = "select ref_id from member_refs where mem_id=$vid"; 54 | if ($res = mysql_query($query)) { 55 | if ($res1 = mysql_fetch_array($res)) { 56 | return $res1[0]; 57 | } 58 | } 59 | @mysql_free_result($res); 60 | } 61 | function credit_ref_bonuses($par_id) { 62 | for ($i=0; $i < count($par_id); $i++) { 63 | $get_ref_data = mysql_query("SELECT acctype FROM user WHERE id=$par_id[$i] && status='Active'"); 64 | if (mysql_num_rows($get_ref_data) != 0) { 65 | $refacc = mysql_result($get_ref_data, 0); 66 | $get_bonuses = mysql_result(mysql_query("SELECT rbonuses FROM acctype WHERE id=$refacc"), 0); 67 | $bonuses = explode(",", $get_bonuses); 68 | $givebonus = $bonuses[$i]; 69 | if (!is_numeric($givebonus)) {$givebonus = 0; } 70 | @mysql_query("UPDATE user SET credits=credits+$givebonus, rbon_credits=rbon_credits+$givebonus, lifetime_credits=lifetime_credits+$givebonus WHERE id=$par_id[$i]"); 71 | @mysql_query("update adminprops set value=value-$givebonus where field='surplu'"); 72 | } 73 | @mysql_free_result($get_ref_data); 74 | } 75 | } 76 | function get_ref_levels($mid,$z) { 77 | global $tier; 78 | $squery = "select count(*),mem_id from member_refs where ref_id in ($mid) group by mem_id"; 79 | if ($res = mysql_query($squery)) { 80 | $tier[$z] = mysql_num_rows($res); 81 | $res = mysql_fetch_array($res); 82 | $mquery = "select mem_id from member_refs where ref_id in ($mid)"; 83 | if ($resultx = mysql_query($mquery)) { 84 | $z = 1; 85 | while ($rsvz = mysql_fetch_array($resultx)){ 86 | $rr_id[$z] = $rsvz[0]; 87 | $z++; 88 | } 89 | } 90 | return $rr_id; 91 | } 92 | @mysql_free_result($res); 93 | } 94 | function credit_r_bonuses($par_id,$type,$ammt) { 95 | $zzz = 0; 96 | for ($i=0; $i < count($par_id); $i++) { 97 | $zzz++; 98 | $get_ref_data = mysql_query("SELECT acctype FROM user WHERE id=$par_id[$i] && status='Active'"); 99 | if (mysql_num_rows($get_ref_data) != 0) { 100 | $refacc = mysql_result($get_ref_data, 0); 101 | if ($type == 'credits') { 102 | $get_bonuses = mysql_result(mysql_query("SELECT levels FROM acctype WHERE id=$refacc"), 0); 103 | } else { 104 | $get_bonuses = mysql_result(mysql_query("SELECT ptc_levels FROM acctype WHERE id=$refacc"), 0); 105 | } 106 | $bonuses = explode(",", $get_bonuses); 107 | $givebonus = $bonuses[$i] / 100; 108 | $givebonus = round($givebonus, 2); 109 | $givebonus = $givebonus * $ammt; 110 | if ($zzz == 1) { 111 | $return_val = $givebonus; 112 | } 113 | if (!is_numeric($givebonus)) {$givebonus = 0; } 114 | if ($type == 'credits') { 115 | @mysql_query("UPDATE user SET credits=credits+$givebonus, crdsfrmallrefs=crdsfrmallrefs+$givebonus, lifetime_credits=lifetime_credits+$givebonus WHERE id=$par_id[$i]"); 116 | @mysql_query("update adminprops set value=value-$givebonus where field='surplu'"); 117 | } else { 118 | @mysql_query("UPDATE user SET cshfrmallrefs=cshfrmallrefs+$givebonus, roi_cash=roi_cash+$givebonus, lifetime_cash=lifetime_cash+$givebonus WHERE id=$par_id[$i]"); 119 | @mysql_query("update adminprops set value=value-$givebonus where field='csurpl'"); 120 | $get_refstats = mysql_query("SELECT * FROM monthly_stats WHERE usrid=$par_id[$i] && yearis=" . date("Y") . " && monthis=" . date("m")); 121 | if (mysql_num_rows($get_refstats) == 0) { 122 | @mysql_query("INSERT INTO monthly_stats (usrid, refptc_cash, tot_owed, monthis, yearis) VALUES ($par_id[$i], $givebonus, $givebonus, " . date("m") . ", " . date("Y") . ")") or die (mysql_error()); 123 | } else { 124 | @mysql_query("UPDATE monthly_stats SET refptc_cash=refptc_cash+$givebonus, tot_owed=tot_owed+$givebonus WHERE usrid=$par_id[$i] && yearis=" . date("Y") . " && monthis=" . date("m")) or die (mysql_error()); 125 | } 126 | } 127 | } 128 | } 129 | return $return_val; 130 | } 131 | function ref_shunt($memb_id) { 132 | $par_id=get_referral($memb_id); 133 | $query="SELECT mem_id FROM member_refs WHERE ref_id=$memb_id"; 134 | $chv_id=array(); 135 | $i=0; 136 | if ($res=mysql_query($query)) { 137 | while($id=mysql_fetch_array($res)) { 138 | $chv_id[$i] = $id[0]; 139 | $i++; 140 | } 141 | $queryv="UPDATE member_refs SET ref_id=$par_id WHERE mem_id="; 142 | for ($i=0;$i '".date('H:i:s',(time()-30))."'"); 168 | 169 | return mysql_result($res,0,0); 170 | } 171 | function totalpayout() { 172 | $resum = mysql_query("SELECT SUM(amount) FROM cashout_history WHERE amount>0"); 173 | $sum = mysql_result($resum,0,0); 174 | $sum = empty($sum) ? 0 : $sum; 175 | $resum1 = mysql_query("SELECT SUM(amount) FROM investment_history WHERE amount>0 AND is_from='Upline Earnings'"); 176 | $sum1 = mysql_result($resum1,0,0); 177 | $sum1 = empty($sum1) ? 0 : $sum1; 178 | $sum2 = '$ '.number_format(($sum1+$sum),2,'.',','); 179 | return $sum2; 180 | } 181 | ?> 182 | -------------------------------------------------------------------------------- /members/upgrade_downline.php: -------------------------------------------------------------------------------- 1 | ", $_POST['comments']) && is_numeric(round($_POST['buy_amt'])) && round($_POST['buy_amt']) < $sharea && round($_POST['buy_amt']) >= 1) { 24 | $res = mysql_query("SELECT * FROM user where id=". $_POST['refs_id'] ." && ref=$usrid"); 25 | if (mysql_num_rows($res) == 0) { 26 | header("Location: $self_url" . "members/referral.php?not-your-ref"); 27 | mysql_close; 28 | exit; 29 | } 30 | $refs_name = mysql_result($res, 0, "name"); 31 | $ref_e = mysql_result($res, 0, "email"); 32 | $ref_acc = mysql_result($res, 0, "acctype"); 33 | $invested = round(mysql_result($res, 0, "invested"), 2); 34 | $roi_cash = round(mysql_result($res, 0, "roi_cash"), 3); 35 | $refs_shares = round($invested / $sharec); 36 | if ($refs_shares < $sharea) { 37 | $allow_buy = 'yes'; 38 | } else { 39 | header("Location: $self_url" . "members/referral.php?ref-has-maximum"); 40 | mysql_close; 41 | exit; 42 | } 43 | 44 | $tot_shares = $refs_shares + round($_POST['buy_amt']); 45 | $req_shares = round($_POST['buy_amt']); 46 | $price = $req_shares * $sharec; 47 | if ($tot_shares > $sharea || $req_shares > $sharea) { 48 | header("Location: $self_url" . "members/referral.php?too-many"); 49 | mysql_close; 50 | exit; 51 | } 52 | if ($req_shares > 1) { 53 | $ss = "s"; 54 | } 55 | if ($my_cash < $price) { 56 | header("Location: $self_url" . "members/referral.php?not-enough-funds"); 57 | mysql_close; 58 | exit; 59 | } 60 | $date_now = date("Y-m-d"); 61 | $datetime_now = date("Y-m-d H:i:s"); 62 | $getdays = mysql_result(mysql_query("SELECT upg_time FROM acctype WHERE id!=1"), 0); 63 | $the_day = strftime("%Y-%m-%d", strtotime("$date_now + $getdays days")); 64 | if ($ref_acc == 1) { 65 | $accupd = ", acctype=2, upgrade_ends='$the_day'"; 66 | } else { 67 | $accupd = ", upgrade_ends='$the_day'"; 68 | } 69 | $month_now = date("m"); 70 | $year_now = date("Y"); 71 | $resm = mysql_query("SELECT * FROM monthly_stats WHERE monthis=$month_now && yearis=$year_now && usrid=$usrid"); 72 | if (mysql_num_rows($resm) != 0) { 73 | $ins_upd = mysql_query("UPDATE monthly_stats SET paid_out=paid_out+$price WHERE usrid=$usrid && yearis=" . date("Y") . " && monthis=" . date("m")) or die (mysql_error()); 74 | } else { 75 | header("Location: $self_url" . "members/referral.php?system-error_try-again"); 76 | include("../cronjob.php"); 77 | mysql_close; 78 | exit; 79 | } 80 | $upd = mysql_query("INSERT INTO investment_history (usrid, amount, descr, is_from, processor, adate) VALUES (". $_POST['refs_id'] .", $price, '$req_shares $upgrade_title$ss @ \$$sharec per $upgrade_title', 'Upline Earnings', 'Upline: Member $usrid', '$date_now')") or die (mysql_error()); 81 | $upd = mysql_query("UPDATE user SET invested=invested+$price" . $accupd . " WHERE id=" . $_POST['refs_id']); 82 | $upd = mysql_query("UPDATE user SET roi_cash=roi_cash-$price WHERE id=$usrid"); 83 | $csures = mysql_query("UPDATE adminprops SET value=value+$price WHERE field='csurpl'"); 84 | if ($email_admin_if_buy == 1) { 85 | $left_ammmv = $my_cash - $price; 86 | $ad_msg = "System here...\n\nMember Number $usrid just purchased for their downline member (User " . $_POST['refs_id'] . ") $req_shares $upgrade_title$ss @ \$$sharec each..\n\nThey had: \$$roi_cash and now have \$$left_ammmv remaining\n\nRegards\n\n$title System\n$self_url"; 87 | mail($private_sys_email, "User $usrid Bought User " . $_POST['refs_id'] . " $upgrade_title$ss With Earnings", $ad_msg , $email_headers); 88 | } 89 | if ($_POST['comments'] == "") { 90 | $_POST['comments'] = "No comments were given"; 91 | } 92 | mail($ref_e, "$title $upgrade_title$ss Added!", "Hi there $refs_name,\n\nYour upline has just bought $req_shares $upgrade_title$ss @ \$$sharec each.. for you!\n\nThis was their reason:\n\n" . $_POST['comments'] . "\n\nRegards\n\n$title Admin\n$self_url", $email_headers); 93 | secheader(); 94 | members_main_menu($members_menu); 95 | echo("

Success! You just purchased $req_shares $upgrade_title$ss @ \$$sharec each.. for your downline member ($refs_name). An email regarding the transfer was just sent them, if you added comments, they also will be included.

"); 96 | secfooter(); 97 | mysql_close; 98 | exit; 99 | } elseif (isset($_POST['submit']) && is_numeric($_POST['refs_id'])) { 100 | $res = mysql_query("SELECT * FROM user where id=". $_POST['refs_id'] ." && ref=$usrid"); 101 | if (mysql_num_rows($res) == 0) { 102 | header("Location: $self_url" . "members/referral.php?not-your-ref"); 103 | mysql_close; 104 | exit; 105 | } else { 106 | if ($_POST['buy_amt'] < 1 || !is_numeric($_POST['buy_amt'])) { 107 | $_POST['buy_amt'] = 1; 108 | } 109 | $refs_name = mysql_result($res, 0, "name"); 110 | $ref_e = mysql_result($res, 0, "email"); 111 | $ref_acc = mysql_result($res, 0, "acctype"); 112 | secheader(); 113 | members_main_menu($members_menu); 114 | echo("

User account #$usrid : : Upgrade Referral ($refs_name)

"); 115 | print <<< REFUPDATER 116 |
117 | 118 | 119 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 |
Upgrade Referral 120 | ($refs_name) :
$upgrade_title(s) to buy (for your referral) :
Additional Comments (No HTML!):
Upgrade :
131 |
132 | REFUPDATER; 133 | } 134 | secfooter(); 135 | mysql_close; 136 | exit; 137 | } else { 138 | header("Location: $self_url" . "members/referral.php?error2"); 139 | mysql_close; 140 | exit; 141 | } 142 | ?> 143 | -------------------------------------------------------------------------------- /control/editptc.php: -------------------------------------------------------------------------------- 1 | = 1) { 14 | if ($_POST['user_id'] == "" || !is_numeric($_POST['user_id'])) { 15 | $errorz = $errorz . "Userid is blank or not a number!
"; 16 | } 17 | if (($_POST['image_url'] == "" || !ereg('http://', $_POST['image_url'])) && $_POST['type'] == 'banner') { 18 | $errorz = $errorz . "You must enter the banner URL!
"; 19 | } 20 | if ($_POST['text_link'] == "" && $_POST['type'] == 'text') { 21 | $errorz = $errorz . "You must enter the Link Text!
"; 22 | } 23 | if ($_POST['link_url'] == "" || !ereg('http://', $_POST['link_url'])) { 24 | $errorz = $errorz . "The Link URL is blank or invalid!
"; 25 | } 26 | if ($_POST['timer'] == "" || !is_numeric($_POST['timer'])) { 27 | $errorz = $errorz . "The timer is blank or not a number (enter 0 for no timer)!
"; 28 | } 29 | if ($_POST['crdtype'] == 'credit' && ($_POST['click_crd_amount'] == "" || !is_numeric($_POST['click_crd_amount']))) { 30 | $errorz = $errorz . "The credit amount is invalid!
"; 31 | } 32 | if ($_POST['crdtype'] == 'cash' && ($_POST['click_csh_amount'] == "" || !is_numeric($_POST['click_csh_amount']))) { 33 | $errorz = $errorz . "The credit amount is invalid!
"; 34 | } 35 | if ($_POST['once_perds'] == "" || !is_numeric($_POST['once_perds'])) { 36 | $errorz = $errorz . "Credit once per X amount of days is invalid!
"; 37 | } 38 | if ($errorz == "") { 39 | $doupd = mysql_query("UPDATE ptc_orders SET type='$_POST[type]', type2='$_POST[crdtype]', userid='$_POST[user_id]', banurl='$_POST[image_url]', linkurl='$_POST[link_url]', linktxt='$_POST[text_link]', clicks_remain='$_POST[clicks_remaining]', amt_sent='$_POST[amt_sent]', cash_click='$_POST[click_csh_amount]', credit_click='$_POST[click_crd_amount]', adtimer='$_POST[timer]', day_lock='$_POST[once_perds]' WHERE ptcid=$_POST[ptcid]") or die (mysql_error()); 40 | header("Location: ptc.php?page=edit"); 41 | mysql_close; 42 | exit; 43 | } else { 44 | echo("\n\nEdit PTC Advert Error\n\n\n\n\n"); 45 | echo("

ERROR:
$errorz

"); 46 | echo("

"); 47 | echo("\n\n"); 48 | mysql_close; 49 | exit; 50 | } 51 | } elseif ($_POST['action'] == 'edit' && $_POST['ptcid'] >= 1) { 52 | $getptc = mysql_query("SELECT * FROM ptc_orders WHERE ptcid=$_POST[ptcid]"); 53 | if (mysql_num_rows($getptc) == 0) { 54 | header("Location: ptc.php?page=edit"); 55 | mysql_close; 56 | exit; 57 | } 58 | $adtype = mysql_result($getptc, 0, "type"); 59 | $crdtype = mysql_result($getptc, 0, "type2"); 60 | $owner = mysql_result($getptc, 0, "userid"); 61 | $banurl = mysql_result($getptc, 0, "banurl"); 62 | $linkurl = mysql_result($getptc, 0, "linkurl"); 63 | $linktext = mysql_result($getptc, 0, "linktxt"); 64 | $c_remain = mysql_result($getptc, 0, "clicks_remain"); 65 | $amt_sent = mysql_result($getptc, 0, "amt_sent"); 66 | $cash_click = mysql_result($getptc, 0, "cash_click"); 67 | $credit_click = mysql_result($getptc, 0, "credit_click"); 68 | $adtimer = mysql_result($getptc, 0, "adtimer"); 69 | $day_lock = mysql_result($getptc, 0, "day_lock"); 70 | ?> 71 | 72 | 73 | Edit PTC Advert 74 | 75 | 80 | 81 | 82 |
83 | 84 | 85 | 142 |
86 |

Edit PTC Advert

87 | 88 | '> 89 | 90 | 91 | 92 | 93 | 94 | 100 | 101 | 103 | 104 | 105 | 106 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 136 | 139 | 140 | 141 |
Userid Number:
Type: 98 | 99 |
Credit Type: 102 |
Banner URL:
Link URL:
107 | Where 108 | people go when the link is clicked.
Link Text:
Timer (in seconds):
Click Amount (credits): 119 |
Click Amount (cash):$
Total Clicks: 127 |
Total Clicks Remaining:
Day Lock:
134 | Amount of days between credit. 135 | 0 = once per member.
One Click Every 137 | 138 | Days.
 
143 |
144 |

">Go Back to the Admin Area - ">Edit PTC Adverts - ">Add New PTC Advert

145 | 146 | 147 | 156 | -------------------------------------------------------------------------------- /members/history.php: -------------------------------------------------------------------------------- 1 | Your Complete Account History"); 27 | 28 | echo(""); 29 | 30 | echo("


Your Account History
31 | Lifetime Earned Cash: \$$lifetime_cash
32 | Lifetime Cash Paid: \$$lifetime_paid
33 | Lifetime Upgrade Credit Earnings: \$$lifetot_roi

34 | Lifetime Credits Earned: $lifetime_credits
35 | Lifetime Pages Surfed: $lifetime_pages

36 | Referring Page Credits: $rpage_credits
37 | New Referral Bonus Credits: $rbon_credits
38 | Credits From All Referrals: $crdsfrmallrefs
39 | Cash From All Referrals: \$$cshfrmallrefs

40 | Lifetime Surf Bonus Credits Won: $sb_credits
41 | Lifetime Surf Bonus Cash Won: \$$sb_cash

42 | PTC Clicks: $ptc_clicks
43 | PTC Cash Earned: \$$ptc_cash
44 | PTC Credits Earned: $ptc_credits
"); 45 | 46 | echo("

 

"); 47 | 48 | $get_history = mysql_query("SELECT * FROM investment_history WHERE usrid=$usrid ORDER BY adate"); 49 | $get_cashouts = mysql_query("SELECT * FROM cashout_history WHERE usrid=$usrid ORDER BY cdate"); 50 | $get_refcomms = mysql_query("SELECT * FROM comission_history WHERE paid_to=$usrid ORDER BY vdate"); 51 | $get_other = mysql_query("SELECT * FROM other_history WHERE usrid=$usrid ORDER BY adate"); 52 | 53 | echo("

Your Upgrade History
"); 54 | if (mysql_num_rows($get_history) != 0) { 55 | echo(" 56 | 57 | 58 | 59 | 60 | 61 | 62 | "); 63 | for ($i = 0; $i < mysql_num_rows($get_history); $i++) { 64 | $history_id = mysql_result($get_history, $i, "id"); 65 | $amount = mysql_result($get_history, $i, "amount"); 66 | $descr = mysql_result($get_history, $i, "descr"); 67 | $is_from = mysql_result($get_history, $i, "is_from"); 68 | $processor = mysql_result($get_history, $i, "processor"); 69 | $adate = mysql_result($get_history, $i, "adate"); 70 | echo(" 71 | 72 | 73 | 74 | 75 | 76 | "); 77 | } 78 | echo("
IDDateAmountDescriptionProcessorFrom
$history_id$adate\$$amount$descr$processor$is_from

"); 79 | } else { 80 | echo("You do not have any upgrade history at this time.

"); 81 | } 82 | echo("


Your Cashout History
"); 83 | if (mysql_num_rows($get_cashouts) != 0) { 84 | echo(" 85 | 86 | 87 | 88 | 89 | 90 | "); 91 | for ($ii = 0; $ii < mysql_num_rows($get_cashouts); $ii++) { 92 | $cashout_id = mysql_result($get_cashouts, $ii, "id"); 93 | $camount = mysql_result($get_cashouts, $ii, "amount"); 94 | $cdescr = mysql_result($get_cashouts, $ii, "descr"); 95 | $pay_merch = mysql_result($get_cashouts, $ii, "pay_merch"); 96 | $psid_to = mysql_result($get_cashouts, $ii, "paid_to"); 97 | $cdate = mysql_result($get_cashouts, $ii, "cdate"); 98 | echo(" 99 | 100 | 101 | 102 | 103 | "); 104 | } 105 | echo("
IDDateAmountDescriptionProcessor/Paid To
$cashout_id$cdate\$$camount$cdescr$pay_merch
$psid_to

"); 106 | } else { 107 | echo("You do not have any cashout history at this time.

"); 108 | } 109 | echo("


Your Referral Upgrade Commissions
"); 110 | if (mysql_num_rows($get_refcomms) != 0) { 111 | echo(" 112 | 113 | 114 | 115 | 116 | 117 | "); 118 | for ($z = 0; $z < mysql_num_rows($get_refcomms); $z++) { 119 | $comm_id = mysql_result($get_refcomms, $z, "id"); 120 | $comamount = mysql_result($get_refcomms, $z, "amount"); 121 | $wasfor = mysql_result($get_refcomms, $z, "wasfor"); 122 | $vdate = mysql_result($get_refcomms, $z, "vdate"); 123 | $cupline = mysql_result($get_refcomms, $z, "usrid"); 124 | echo(" 125 | 126 | 127 | 128 | 129 | "); 130 | } 131 | echo("
IDDateAmountDescriptionReferral
$comm_id$vdate\$$comamount$wasforUser $cupline

"); 132 | } else { 133 | echo("You do not have any referral commissions at this time.

"); 134 | } 135 | echo("


Other Cash Credits
"); 136 | if (mysql_num_rows($get_other) != 0) { 137 | echo(" 138 | 139 | 140 | 141 | 142 | 143 | "); 144 | for ($v = 0; $v < mysql_num_rows($get_other); $v++) { 145 | $oth_id = mysql_result($get_other, $v, "id"); 146 | $othamount = mysql_result($get_other, $v, "amount"); 147 | $other_descr = mysql_result($get_other, $v, "descr"); 148 | $oadate = mysql_result($get_other, $v, "adate"); 149 | $isfrm = mysql_result($get_other, $v, "is_from"); 150 | echo(" 151 | 152 | 153 | 154 | 155 | "); 156 | } 157 | echo("
IDDateAmountDescriptionFrom
$oth_id$oadate\$$othamount$other_descr$isfrm

"); 158 | } else { 159 | echo("You do not have any other cash credits at this time.

"); 160 | } 161 | 162 | echo("

 

"); 163 | secfooter(); 164 | mysql_close; 165 | exit; 166 | ?> 167 | -------------------------------------------------------------------------------- /members/ptcbar.php: -------------------------------------------------------------------------------- 1 | \n\n$title Paid to Click\n"); 24 | mysql_close; 25 | exit; 26 | } 27 | } else { 28 | echo("\n\n$title Paid to Click\n"); 29 | mysql_close; 30 | exit; 31 | } 32 | if ($clks_remain <= 0) { 33 | echo("\n\n$title Paid to Click\n"); 34 | mysql_close; 35 | exit; 36 | } 37 | if ($day_lock >= 1) { 38 | $the_sql_day = strftime("%Y-%m-%d", strtotime("$date + $day_lock days ago")); 39 | $and_date_sql = " AND (cdate>'$the_sql_day')"; 40 | } else { 41 | $and_date_sql = ""; 42 | } 43 | $query1 = mysql_query("SELECT * FROM ptc_tracking WHERE (userid=$usrid) AND (banlinkid='$_GET[banid]')$and_date_sql"); 44 | if ($_GET['action'] == 'open' && $_GET['vc'] == $_SESSION['sess_data']['verif_data'] && urlencode($_GET['site']) == $_SESSION['sess_data']['ptcurlis']) { 45 | if (mysql_num_rows($query1) == 0) { 46 | $_SESSION['sess_data']['verif_data'] = md5($_GET['vc']); 47 | $_SESSION['sess_data']['c_linkid'] = $_GET['banid']; 48 | $_SESSION['sess_data']['ptctime'] = time(); 49 | if (!isset($s_delay)) {$s_delay = $ad_timer;} 50 | $ptcbar_timer = ""; 51 | $ptcbarhtmla = file_reader("/bars.html"); 52 | $ptcbarhtmla = str_replace('[timer]', $ptcbar_timer, $ptcbarhtmla); 53 | $ptcbarhtmla = str_replace('[userid]', $usrid, $ptcbarhtmla); 54 | echo("\n\nPTC Bar 55 | 56 | \n\n\n
"); 74 | echo($ptcbarhtmla); 75 | echo("
\n\n"); 76 | mysql_close; 77 | exit; 78 | } else { 79 | echo("\n\n$title Paid to Click\n"); 80 | mysql_close; 81 | exit; 82 | } 83 | } elseif ($_GET['action'] == 'final_validate' && $_GET['fvc'] == $_SESSION['sess_data']['verif_data']) { 84 | if (!isset($_SESSION['sess_data']['ptctime']) || (time() - $_SESSION['sess_data']['ptctime']) >= $ad_timer) { 85 | $_SESSION['sess_data']['ptctime'] = ""; 86 | } else { 87 | $_SESSION['sess_data']['ptctime'] = ""; 88 | header("Location: paidtoclick.php?adid=$_GET[banid]&action=start&".session_name()."=".session_id().""); 89 | mysql_close; 90 | exit; 91 | } 92 | if (mysql_num_rows($query1) == 0 && $clks_remain >= 1) { 93 | if ($ad_type == 'cash') { 94 | $get_stats = mysql_query("SELECT * FROM monthly_stats WHERE usrid=$usrid && yearis=" . date("Y") . " && monthis=" . date("m")); 95 | if (mysql_num_rows($get_stats) == 0) { 96 | @mysql_query("INSERT INTO monthly_stats (usrid, ptc_cash_e, tot_owed, monthis, yearis) VALUES ($usrid, $cashclick, $cashclick, " . date("m") . ", " . date("Y") . ")") or die (mysql_error()); 97 | } else { 98 | @mysql_query("UPDATE monthly_stats SET ptc_cash_e=ptc_cash_e+$cashclick, tot_owed=tot_owed+$cashclick WHERE usrid=$usrid && yearis=" . date("Y") . " && monthis=" . date("m")) or die (mysql_error()); 99 | } 100 | @mysql_query("UPDATE user SET roi_cash=roi_cash+$cashclick, ptc_clicks=ptc_clicks+1, ptc_cash=ptc_cash+$cashclick, lifetime_cash=lifetime_cash+$cashclick WHERE id=$usrid"); 101 | $dgiven = "\$$cashclick"; 102 | if ($myref >= 1) { 103 | $accs = mysql_query("SELECT id, ptc_levels FROM acctype"); 104 | for ($i = 0; $i < mysql_num_rows($accs); $i++) { 105 | $accids = mysql_result($accs, $i, "id"); 106 | $r_bons = mysql_result($accs, $i, "ptc_levels"); 107 | $r_bons2[$accids] = explode(",", $r_bons); 108 | $acc_r_bon[$accids] = count($r_bons2[$accids]); 109 | } 110 | if ($acc_r_bon[2] > $acc_r_bon[1]) {$greatest = 2; } elseif ($acc_r_bon[1] > $acc_r_bon[2]) {$greatest = 1; } else {$greatest = 2; } 111 | if ($myref >= 1 && ($acc_r_bon[1] > 0 || $acc_r_bon[2] > 0)) { 112 | $cc = 0; 113 | $ref_id[$cc]=$myref; 114 | for ($v = 0; $v < ($acc_r_bon[$greatest] - 1); $v++) { 115 | $myref = get_referral($myref); 116 | if (!$myref || $myref == 0) 117 | break; 118 | ++$cc; 119 | $ref_id[$cc] = $myref; 120 | } 121 | $givento_ref = credit_r_bonuses($ref_id,"cash",$cashclick); 122 | } 123 | @mysql_query("UPDATE user SET cshtoref=cshtoref+$givento_ref WHERE id=$usrid"); 124 | } 125 | } else { 126 | @mysql_query("UPDATE user SET credits=credits+$creditclick, ptc_clicks=ptc_clicks+1, ptc_crds=ptc_crds+$creditclick, lifetime_credits=lifetime_credits+$creditclick WHERE id=$usrid"); 127 | $dgiven = "$creditclick credit(s)"; 128 | if ($myref >= 1) { 129 | $accs = mysql_query("SELECT * FROM acctype"); 130 | for ($i = 0; $i < mysql_num_rows($accs); $i++) { 131 | $accids = mysql_result($accs, $i, "id"); 132 | $r_bons = mysql_result($accs, $i, "levels"); 133 | $r_bons2[$accids] = explode(",", $r_bons); 134 | $acc_r_bon[$accids] = count($r_bons2[$accids]); 135 | } 136 | if ($acc_r_bon[2] > $acc_r_bon[1]) {$greatest = 2; } elseif ($acc_r_bon[1] > $acc_r_bon[2]) {$greatest = 1; } else {$greatest = 2; } 137 | if ($myref >= 1 && ($acc_r_bon[1] > 0 || $acc_r_bon[2] > 0)) { 138 | $cc = 0; 139 | $ref_id[$cc]=$myref; 140 | for ($v = 0; $v < ($acc_r_bon[$greatest] - 1); $v++) { 141 | $myref = get_referral($myref); 142 | if(!$myref || $myref == 0) 143 | break; 144 | ++$cc; 145 | $ref_id[$cc] = $myref; 146 | } 147 | $givento_ref = credit_r_bonuses($ref_id,"credits",$creditclick); 148 | } 149 | @mysql_query("UPDATE user SET toref=toref+$givento_ref WHERE id=$usrid"); 150 | } 151 | } 152 | $chkcc = mysql_query("SELECT * FROM ptc_tracking WHERE userid=$usrid AND banlinkid='$_GET[banid]'"); 153 | if (mysql_num_rows($chkcc) == 0 && mysql_num_rows($query1) == 0) { 154 | $updtrack = mysql_query("INSERT INTO ptc_tracking VALUES ($usrid, '$_GET[banid]', '$date')"); 155 | } elseif (mysql_num_rows($chkcc) != 0 && mysql_num_rows($query1) == 0) { 156 | $updtrack = mysql_query("UPDATE ptc_tracking SET cdate='$date' WHERE userid=$usrid && banlinkid='$_GET[banid]'"); 157 | } 158 | @mysql_query("UPDATE ptc_orders SET clicks_remain=clicks_remain-1 WHERE linkid='$_GET[banid]'"); 159 | $ptcbarhtmlb = file_reader("/bars_done.html"); 160 | $ptcbarhtmlb = str_replace('[userid]', $usrid, $ptcbarhtmlb); 161 | $ptcbarhtmlb = str_replace('[amount]', $dgiven, $ptcbarhtmlb); 162 | $_SESSION['sess_data']['verif_data'] = ""; 163 | $_SESSION['sess_data']['c_linkid'] = ""; 164 | echo("\n\n$title Paid to Click\n\n\n\n
\n"); 165 | echo($ptcbarhtmlb); 166 | //echo("
You may now close this window."); 167 | echo("
\n\n"); 168 | mysql_close; 169 | exit; 170 | } else { 171 | echo("\n\n$title Paid to Click\n"); 172 | mysql_close; 173 | exit; 174 | } 175 | } else { 176 | echo("\n\n$title Paid to Click\n"); 177 | mysql_close; 178 | exit; 179 | } 180 | ?> 181 | -------------------------------------------------------------------------------- /control/admincron.php: -------------------------------------------------------------------------------- 1 | 0 || $roi_conversion_ratio_pro > 0) { 22 | $res = mysql_query("SELECT * FROM user WHERE invested>0 && lastroi<'$the_day' ORDER BY id") or die ("Line: 22" . mysql_error()); 23 | if (mysql_num_rows($res) != 0) { 24 | for ($i = 0; $i < mysql_num_rows($res); $i++) { 25 | $theusr = mysql_result($res, $i, "id"); 26 | $my_invest = mysql_result($res, $i, "invested"); 27 | $my_acctype = mysql_result($res, $i, "acctype"); 28 | if ($my_acctype == 1) { 29 | $roi_rate = round($roi_conversion_ratio_free / 100, 3); 30 | $roi_credit_return = $my_invest * $roi_rate; 31 | $get_stats = mysql_query("SELECT num FROM 7stat WHERE num>=$min_credits_to_earn_free && date='$the_day' && received_pay='no' && usrid=$theusr") or die ("Line: 31" .mysql_error()); 32 | } else { 33 | $roi_rate = round($roi_conversion_ratio_pro / 100, 3); 34 | $roi_credit_return = $my_invest * $roi_rate; 35 | $get_stats = mysql_query("SELECT num FROM 7stat WHERE num>=$min_credits_to_earn_pro && date='$the_day' && received_pay='no' && usrid=$theusr") or die ("Line: 35" .mysql_error()); 36 | } 37 | if (mysql_num_rows($get_stats) != 0) { 38 | $amt_is = mysql_result($get_stats, 0, "num"); 39 | $mssg = $mssg . "Member: $theusr\nInvested: \$$my_invest\nJust Earned: \$$roi_credit_return\nCredits earned surfing today: $amt_is\n\n"; 40 | $updusr = mysql_query("UPDATE user SET roi_cash=roi_cash+$roi_credit_return, lifetot_roi=lifetot_roi+$roi_credit_return, lifetime_cash=lifetime_cash+$roi_credit_return, lastroi='$the_day' WHERE id=$theusr") or die(mysql_error()); 41 | $get_stats = mysql_query("UPDATE 7stat SET received_pay='yes' WHERE usrid=$theusr && date='$the_day' && received_pay='no'") or die (mysql_error()); 42 | $csures = mysql_query("UPDATE adminprops SET value=value-$roi_credit_return WHERE field='csurpl'"); 43 | $nns = explode('-', $the_day); 44 | $yearis = $nns[0]; 45 | $monthis = $nns[1]; 46 | $get_stats = mysql_query("SELECT * FROM monthly_stats WHERE usrid=$theusr && monthis=$monthis && yearis=$yearis"); 47 | if (mysql_num_rows($get_stats) != 0) { 48 | @mysql_query("UPDATE monthly_stats SET roi_earned=roi_earned+$roi_credit_return, days_paid_roi=days_paid_roi+1, tot_owed=tot_owed+$roi_credit_return, this_month='$the_day' WHERE usrid=$theusr && monthis=$monthis && yearis=$yearis") or die(mysql_error()); 49 | } else { 50 | @mysql_query("INSERT INTO monthly_stats (usrid, days_paid_roi, roi_earned, tot_owed, monthis, yearis, this_month) VALUES ($theusr, 1, $roi_credit_return, $roi_credit_return, $monthis, $yearis, '$the_day')") or die(mysql_error()); 51 | } 52 | $tot_paidto++; 53 | } 54 | } 55 | if ($email_admin_when_roi == 1 && $tot_paidto > 0) { 56 | mail($private_sys_email, "$title ROI Just Paid For $the_day", "Hi System here..\n\nHere are the daily $roi_conversion_ratio% Payouts processed for server time yesterday ($the_day)\n\n" . $mssg, $email_headers); 57 | } 58 | } 59 | if ($max_invest_days > 0) { 60 | $get_olds = mysql_query("SELECT * FROM investment_history WHERE expired='no'"); 61 | for ($t = 0; $t < mysql_num_rows($get_olds); $t++) { 62 | $purch_id = mysql_result($get_olds, $t, "id"); 63 | $purch_user = mysql_result($get_olds, $t, "usrid"); 64 | $purch_amt = mysql_result($get_olds, $t, "amount"); 65 | $purch_date = mysql_result($get_olds, $t, "adate"); 66 | $del_invest_date = strftime("%Y-%m-%d", strtotime("$the_day + $max_invest_days days ago")); 67 | if ($del_invest_date >= $purch_date) { 68 | $get_usr = mysql_query("UPDATE user SET invested=invested-$purch_amt WHERE id=$purch_user"); 69 | $update = mysql_query("UPDATE investment_history SET expired='yes' WHERE id=$purch_id"); 70 | mail($private_sys_email, "$title Member $purch_user $upgrade_title(s) Expired - $the_day", "Hi System here..\n\n\$$purch_amt of Member $purch_user's $upgrade_title have expired.\n\nDate Purchsed: $purch_date\n\nDate Expired: $the_day\n\n$title System", $email_headers); 71 | } 72 | } 73 | } 74 | $last_month = date("m") - 1; 75 | $year_now = date("Y"); 76 | if ($last_month == 0) { 77 | $last_month = 12; 78 | $year_now = $year_now - 1; 79 | } 80 | $resu = mysql_query("SELECT * FROM user"); 81 | if (mysql_num_rows($resu) != 0) { 82 | for ($xv = 0; $xv < mysql_num_rows($resu); $xv++) { 83 | $uid = mysql_result($resu, $xv, "id"); 84 | $my_cash = mysql_result($resu, $xv, "roi_cash"); 85 | $acctype = mysql_result($resu, $xv, "acctype"); 86 | $cashout_min = mysql_result(mysql_query("SELECT cashout FROM acctype WHERE id=$acctype"), 0); 87 | $resm = mysql_query("SELECT * FROM monthly_stats WHERE monthis=$last_month && yearis=$year_now && usrid=$uid && paidout='no' && finalized='no'"); 88 | if (mysql_num_rows($resm) != 0) { 89 | $dont_proc = "no"; 90 | $dont_proc_ne = "no"; 91 | $stats_owed = mysql_result($resm, 0, "tot_owed"); 92 | $paid_out = mysql_result($resm, 0, "paid_out"); 93 | $stats_owed = $stats_owed - $paid_out; 94 | if (ereg(".", $stats_owed)) { 95 | $dummy = explode(".", $stats_owed); 96 | $stats_owed_rounded = $dummy[0]; 97 | } 98 | if ($my_cash < $stats_owed) { 99 | $dont_proc = "yes"; 100 | $mail_error = $mail_error . "User ID: $uid has the unexpected error:\n\n\$$my_cash is in their account and \$$stats_owed is owed this month...\n\n"; 101 | } 102 | if ($cashout_min > $stats_owed_rounded) { 103 | $dont_proc_ne = "yes"; 104 | } 105 | if ($dont_proc_ne == 'yes' && $dont_proc == 'no') { 106 | $trnsfer = mysql_query("UPDATE monthly_stats SET paid_out=paid_out+$stats_owed, paidout='yes', finalized='yes' WHERE monthis=$last_month && yearis=$year_now && usrid=$uid && paidout='no' && finalized='no'"); 107 | $resume_stats = mysql_query("SELECT * FROM monthly_stats WHERE monthis=" . date("m") . " && yearis=" . date("Y") . " && usrid=$uid && paidout='no' && finalized='no'"); 108 | if (mysql_num_rows($resume_stats) != 0) { 109 | $updsts = mysql_query("UPDATE monthly_stats SET past_earnings=past_earnings+$stats_owed, tot_owed=tot_owed+$stats_owed WHERE usrid=$uid && monthis=" . date("m") . " && yearis=" . date("Y")) or die(mysql_error()); 110 | } else { 111 | $updsts = mysql_query("INSERT INTO monthly_stats (usrid, past_earnings, tot_owed, monthis, yearis) VALUES ($uid, $stats_owed, $stats_owed, " . date("m") . ", " . date("Y") . ")") or die(mysql_error()); 112 | } 113 | } 114 | } 115 | } 116 | if ($dont_proc == "yes" && $mail_error != "") { 117 | mail($private_sys_email, "$title Member Earnings Error", "Hi $title System here..\n\n" . $mail_error . "You will need to rectify these account through your $title Admin Area.\n\n$title System", $email_headers); 118 | } 119 | } 120 | } 121 | if ($keep_stats > 0) { 122 | $del_user_date = strftime("%Y-%m-%d", strtotime("$the_day + $keep_stats days ago")); 123 | $qwwresqw = mysql_query("delete from 7stat where date<'$del_user_date'"); 124 | } 125 | if ($keep_site_stats > 0) { 126 | $del_site_date = strftime("%Y-%m-%d", strtotime("$the_day + $keep_site_stats days ago")); 127 | $qwraasqw = mysql_query("delete from 7statsite where date<'$del_site_date'"); 128 | } 129 | if ($keep_refpage_stats > 0) { 130 | $refpagedate = strftime("%Y-%m-%d", strtotime("$the_day + $keep_refpage_stats days ago")); 131 | $uuio = mysql_query("DELETE FROM referstats WHERE cdate<'$refpagedate'"); 132 | } 133 | if ($the_day > $last_cronjob) { 134 | $upd_cronjob = mysql_query("UPDATE admin SET value='$the_day' where field='lstcrn'"); 135 | } 136 | $sql_repair = mysql_query("REPAIR TABLE `7stat` , `7statsite` , `abuse` , `acctype` , `ad_info` , `admin` , `adminprops` , `banned_emails` , `banned_ipadds` , `banned_sites` , `banner` , `cashout_history` , `comission_history` , `faq` , `gp_info` , `gp_name` , `html` , `investment_history` , `member_refs` , `merchant_codes` , `monthly_stats` , `other_history` , `ptc_orders` , `ptc_tracking` , `referstats` , `sellcredit` , `site` , `tads` , `user` "); 137 | $sql_optimize = mysql_query("OPTIMIZE TABLE `7stat` , `7statsite` , `abuse` , `acctype` , `ad_info` , `admin` , `adminprops` , `banned_emails` , `banned_ipadds` , `banned_sites` , `banner` , `cashout_history` , `comission_history` , `faq` , `gp_info` , `gp_name` , `html` , `investment_history` , `member_refs` , `merchant_codes` , `monthly_stats` , `other_history` , `ptc_orders` , `ptc_tracking` , `referstats` , `sellcredit` , `site` , `tads` , `user` "); 138 | ?> 139 | -------------------------------------------------------------------------------- /banner.php: -------------------------------------------------------------------------------- 1 | ');\n"; 17 | } else { 18 | print "\n"; 19 | } 20 | exit; 21 | } 22 | // MySQL Function 23 | function db($query) { 24 | global $db_host,$db_name,$db_user,$db_pwd; 25 | ($mysql_link = @mysql_connect($db_host,$db_user,$db_pwd)) or die (print "Error: Couldn't connect to database:

".mysql_error()); 26 | @mysql_select_db($db_name,$mysql_link) or die (print "Error: Couldn't Select Database:

".mysql_error()); 27 | ($mysql_result = @mysql_query($query,$mysql_link)) or die (print "Error: Database Select Failed:

".mysql_error()); 28 | @mysql_close($mysql_link) or die (print "Error: Couldn't close database".mysql_error()); 29 | return $mysql_result; 30 | } 31 | // Display Ad Function 32 | function display_banner(){ 33 | global $self_url,$style,$simultaneousbanner; 34 | if(isset($_SESSION['banneron']) && count($_SESSION['banneron']) > $simultaneousbanner){ 35 | $_SESSION['banneron'] =array(); 36 | } 37 | $wheresql = ''; 38 | if(isset($_SESSION['banneron']) && count($_SESSION['banneron']) > 0){ 39 | $wheresql = " WHERE ad_id NOT IN(".implode(',', $_SESSION['banneron']).') '; 40 | } 41 | $db = db("SELECT * FROM ad_info $wheresql"); 42 | $totalads = mysql_num_rows($db); 43 | if ($totalads == 0) {error("There are no banners/ads found in the database"); } 44 | while ($info = @mysql_fetch_row($db)){ 45 | if (($info[11] == 0) || ($info[12] < $info[11])) { 46 | for ($i=1;$i<=$info[14];$i++){ 47 | $valid[] = $info[0]; 48 | } 49 | } 50 | } 51 | $num = count($valid); 52 | $num--; 53 | if ($num >= 1) { 54 | srand ((double) microtime() * 1000000); 55 | $rand_num = rand(0,$num); 56 | $rand_num = $valid[$rand_num]; 57 | } else { 58 | $rand_num = $valid[0]; 59 | } 60 | $_SESSION['banneron'][] = $rand_num; 61 | 62 | $db = db("SELECT * FROM ad_info WHERE ad_id = $rand_num"); 63 | if ($info = mysql_fetch_row($db)){ 64 | $exp = $info[12] + 1; 65 | $update = db("UPDATE ad_info SET num_exp = $exp WHERE ad_id = $rand_num"); 66 | if ($info[2] == 1){ 67 | if ($exp == $info[11]){ 68 | error("The ad '$info[1] has reached its impression limit, $info[11].\n"."It will no longer be displayed unless you increase the\n"." number of impressions allowed"); 69 | } 70 | if ($style != "non_ssi") { 71 | if ($info[15] == 1) { 72 | $temp = " target=\"_blank\""; 73 | } 74 | if ($info[8]) { 75 | print "
\n"; 76 | } 77 | if ($info[7]) { 78 | $info[7] = addslashes($info[7]); 79 | $temp2 = " onMouseOver=\"window.status='$info[7]'; return true\" onMouseOut=\"window.status=''; return true\""; 80 | } 81 | print "\n"; 82 | print "\"$info[7]\"\n"; 83 | if ($info[8]) { 84 | print "
$info[8]
\n"; 85 | } 86 | } else { 87 | if ($info[15] == 1){ 88 | $temp = " target=\"_blank\""; 89 | } 90 | $info[9] = eregi_replace("'",'',$info[9]); 91 | $info[7] = eregi_replace("'","\'",$info[7]); 92 | $info[8] = eregi_replace("'","\\'",$info[8]); 93 | $info[14] = eregi_replace("'","\\'",$info[14]); 94 | if ($info[9]) { 95 | $temp2 = " onMouseOver=\"window.status=\\'$info[9]\\'; return true\" onMouseOut=\"window.status=\\'\\'; return true\""; 96 | } 97 | print "document.write('');\n"; 98 | print "document.write('\"$info[7]\"');\n"; 99 | if ($info[8]) { 100 | print "document.write('$info[8]');\n"; 101 | } 102 | } 103 | } else { 104 | $info[10] = eregi_replace('',"$self_url"."banner.php?action=r&id=$rand_num",$info[10]); 105 | $info[10] = eregi_replace('href','target="_blank" href',$info[10]); 106 | if ($style != "non_ssi") { 107 | $info[10] = stripslashes($info[10]); 108 | print "$info[10]"; 109 | } else { 110 | $info[10] = eregi_replace("'","\\'",$info[10]); 111 | print "document.write('
');\n"; 112 | print "document.write('$info[10]');\n"; 113 | print "document.write('
');\n"; 114 | } 115 | } 116 | } 117 | } 118 | // Redirect Function 119 | function redirect(){ 120 | global $id; 121 | if (eregi_replace('[^0-9]','',$info[8])) { 122 | error("Invalid id given, bad character given, perhaps messed with link or just an old banner link?"); 123 | } 124 | $db = db("SELECT num_clicks,link_url,type FROM ad_info WHERE ad_id = $id"); 125 | if ($info = @mysql_fetch_row($db)){ 126 | $num = $info[0] + 1; 127 | $update = db("UPDATE ad_info SET num_clicks = num_clicks+1 WHERE ad_id = $id"); 128 | $stuff = $_SERVER['QUERY_STRING']; 129 | $stuff = eregi_replace("action=r&id=$id","",$stuff); 130 | if (($stuff) && ($info[2] == 2)) { 131 | header("Location: $info[1]?$stuff\n"); 132 | exit; 133 | } 134 | header("Location: $info[1]\n"); 135 | exit; 136 | } 137 | } 138 | // Display Group Function 139 | function display_group() { 140 | global $style,$gid,$self_url,$simultaneousbanner; 141 | //global $PHP_SELF,$SERVER_NAME,$style,$gid,$DOCUMENT_ROOT,$self_url; 142 | if (eregi('[^0-9]',$gid)){ 143 | error("Invalid group id given"); 144 | } 145 | if(isset($_SESSION['banneron']) && count($_SESSION['banneron']) > $simultaneousbanner){ 146 | $_SESSION['banneron'] =array(); 147 | } 148 | $wheresql = ''; 149 | if(isset($_SESSION['banneron']) && count($_SESSION['banneron']) > 0){ 150 | $wheresql = " AND a.ad_id NOT IN(".implode(',', $_SESSION['banneron']).') '; 151 | } 152 | 153 | $db = db("SELECT a.ad_id,prob,num_allow_exp,num_exp,ad_prob FROM gp_info g,ad_info a WHERE gid = $gid AND g.ad_id = a.ad_id AND a.ad_id = g.ad_id $wheresql"); 154 | while ($info = mysql_fetch_row($db)){ 155 | if (($info[2] != 0) && ($info[3] <= $info[2])){ 156 | for ($i=1;$i<=$info[4];$i++){ 157 | $valid[] = $info[0]; 158 | } 159 | } 160 | if ($info[2] == 0) { 161 | for ($i=1;$i<=$info[4];$i++){ 162 | $valid[] = $info[0]; 163 | } 164 | } 165 | } 166 | $num = count($valid); 167 | $num--; 168 | if (!$valid[0]) { 169 | error("Was not able to select any banners for group ($gid).\n"."Perhaps all banners have run out of inpressions?"); 170 | } 171 | if ($num >= 1) { 172 | srand ((double) microtime() * 1000000); 173 | $rand_num = rand(0,$num); 174 | $rand_num = $valid[$rand_num]; 175 | } else { 176 | $rand_num = $valid[0]; 177 | } 178 | $_SESSION['banneron'][] = $rand_num; 179 | $db = db("SELECT * FROM ad_info WHERE ad_id = $rand_num"); 180 | if ($info = mysql_fetch_row($db)) { 181 | $exp = $info[12] + 1; 182 | $update = db("UPDATE ad_info SET num_exp = $exp WHERE ad_id = $rand_num"); 183 | if ($info[2] == 1) { 184 | if ($exp == $info[11]) { 185 | error("The advert '$info[1] has reached its impression limit, $info[11].\n"."It will no longer be displayed unless you increase the\n"." number of impressions allowed"); 186 | } 187 | if ($style != "non_ssi") { 188 | if ($info[15] == 1) { 189 | $temp = " target=\"_blank\""; 190 | } 191 | if ($info[8]) { 192 | print "
\n"; 193 | } 194 | if ($info[9] != "") { 195 | $info[9] = addslashes($info[9]); 196 | $temp2 = " onMouseOver=\"window.status='$info[9]'; return true\" onMouseOut=\"window.status=''; return true\""; 197 | } 198 | print "\n"; 199 | print "\"$info[7]\"\n"; 200 | if ($info[8]) { 201 | print "
$info[8]
\n"; 202 | } 203 | } else { 204 | if ($info[15] == 1) { 205 | $temp = " target=\"_blank\""; 206 | } 207 | if ($info[8]) { 208 | print "document.write('
');\n"; 209 | } 210 | $info[9] = eregi_replace("'",'',$info[9]); 211 | $info[7] = eregi_replace("'","\'",$info[7]); 212 | $info[8] = eregi_replace("'","\\'",$info[8]); 213 | $info[14] = eregi_replace("'","\\'",$info[14]); 214 | if ($info[9]) { 215 | $temp2 = " onMouseOver=\"window.status=\\'$info[9]\\'; return true\" onMouseOut=\"window.status=\\'\\'; return true\""; 216 | } 217 | 218 | print "document.write('');\n"; 219 | print "document.write('\"$info[7]\"');\n"; 220 | 221 | if ($info[8]) { 222 | print "document.write('
$info[8]
');\n"; 223 | } 224 | } 225 | } else { 226 | $info[10] = eregi_replace('',"$self_url"."banner.php?action=r&id=$rand_num",$info[10]); 227 | $info[10] = eregi_replace('href','target="_blank" href',$info[10]); 228 | if ($style != "non_ssi"){ 229 | $info[10] = stripslashes($info[10]); 230 | print "$info[10]"; 231 | } else { 232 | $info[10] = eregi_replace("'","\'",$info[10]); 233 | print "document.write('
');\n"; 234 | print "document.write('$info[10]');"; 235 | print "document.write('
');\n"; 236 | } 237 | } 238 | } 239 | } 240 | if ($_GET['gid']){ 241 | $gid = $_GET['gid']; 242 | display_group(); 243 | $action = 1; 244 | } elseif ($_GET['action'] == ""){ 245 | display_banner(); 246 | } elseif ($_GET['action'] == "r"){ 247 | $id = $_GET['id']; 248 | redirect(); 249 | } else { 250 | display_banner(); 251 | } 252 | ?> 253 | -------------------------------------------------------------------------------- /surfbarvisitor.php: -------------------------------------------------------------------------------- 1 | $time_now) { 50 | $wait = $_SESSION['sess_data']['reftim'] - (time() - $_SESSION['sess_data']['time']); 51 | if ($wait > $_SESSION['sess_data']['reftim'] || $wait == "" || $wait < 0) { 52 | $wait = $_SESSION['sess_data']['reftim']; 53 | } 54 | echo("$titleSurfing too fast! Re-connecting in $wait seconds..."); 55 | mysql_close; 56 | exit; 57 | } 58 | if ($_GET['vc_val'] == 'begin' && $_GET['coder'] == md5($_SESSION['sess_data']['from'])) { 59 | $credit_me = 'no'; 60 | $why = "Starting/Resuming Session"; 61 | } elseif ($_GET['vc_val'] != md5($_SESSION['sess_data']['surf_encoder_vals'])) { 62 | header("Location: " . $self_url . "?error=inv-access"); 63 | mysql_close; 64 | exit; 65 | } 66 | if (!isset($_SESSION['sess_data']['time']) || (time() - $_SESSION['sess_data']['time']) >= $_SESSION['sess_data']['reftim']) { 67 | $_SESSION['sess_data']['time'] = time(); 68 | } else { 69 | $wait = $_SESSION['sess_data']['reftim'] - (time() - $_SESSION['sess_data']['time']); 70 | echo("$titleSurfing too fast! Re-connecting in $wait seconds..."); 71 | mysql_close; 72 | exit; 73 | } 74 | @mysql_query("update site set hour='$hour', cth=0 where hour!='$hour' && cph!=0"); 75 | $query = "select id, url from site where usrid!='" .$_SESSION['sess_data']['usrid'] . "' && state='Enabled'"; 76 | if ($_SESSION['sess_data']['negact'] == 0) {$query = $query . " && credits>=1";} 77 | $query = $query . " && (cth"; 105 | $res = mysql_query("SELECT * FROM 7stat WHERE usrid='" . $_SESSION['sess_data']['usrid'] . "' && date='$date'"); 106 | if (mysql_num_rows($res) == 0) { 107 | $query = "insert into 7stat (usrid, date, time, pg_views, num) values (0, '" . $date . "', '" . $time_now . "', 1, " . $_SESSION['sess_data']['rate'] . ")"; 108 | $my_crds_today = $_SESSION['sess_data']['rate']; 109 | $iam_waiting = 'yes'; 110 | @mysql_free_result($res); 111 | } else { 112 | $c_today = mysql_result($res, 0, "num"); 113 | $laccess_time = mysql_result($res, 0, "time"); 114 | $was_paid_t = mysql_result($res, 0, "received_pay"); 115 | $thevftime = strftime("%H:%M:%S", strtotime("$laccess_time + " . $_SESSION['sess_data']['reftim'] . " seconds")); 116 | if ($thevftime>$time_now) { 117 | $wait = $_SESSION['sess_data']['reftim']; 118 | if($wait <=0) $wait =10; 119 | echo("$titleCheating Timer! Re-connecting in $wait seconds..."); 120 | mysql_close; 121 | exit; 122 | exit; 123 | } elseif ($c_today >= $daily_max) { 124 | echo("Sorry you have earned your daily maximum of $daily_max credits!
Please return tomorrow!

Login to your account here."); 125 | session_destroy(); 126 | mysql_close; 127 | exit; 128 | } else { 129 | $query = "update 7stat set time='$time_now', pg_views=pg_views+1, num=num+" . $_SESSION['sess_data']['rate'] . " where usrid=0 && date='$date'"; 130 | $my_crds_today = mysql_result($res, 0, "num") + $_SESSION['sess_data']['rate']; 131 | if ($was_paid_t == 'no') { 132 | $iam_waiting = 'yes'; 133 | } elseif ($was_paid_t == 'yes') { 134 | $iam_waiting = 'no'; 135 | } 136 | } 137 | @mysql_free_result($res); 138 | } 139 | $_SESSION['sess_data']['cts'] = $_SESSION['sess_data']['cts'] + $_SESSION['sess_data']['rate']; 140 | $_SESSION['sess_data']['sts']++; 141 | } 142 | if ($_SESSION['sess_data']['mmax'] == 0) { 143 | $extra_js = "top.window.moveTo(0,0);\nif (document.all) {\ntop.window.resizeTo(screen.availWidth,screen.availHeight);\n}\nelse if (document.layers||document.getElementById) {\nif\n(top.window.outerHeight\n\n$title\n\n"); 146 | echo("\n"); 183 | if ($my_crds_today == "") {$my_crds_today = 0; } 184 | echo("\n\n"); 185 | echo("\n"); 186 | echo("\n"); 187 | 188 | echo("
189 | 190 | 193 |
191 | 192 |
"); 194 | echo("
195 | [Open Account] [Open Site] [Site ID: $siteid]"); 196 | 197 | 198 | if (isset($_SESSION['sess_data']['contex']) && $credit_me == 'yes') { 199 | if (($_SESSION['sess_data']['sts'] % $_SESSION['sess_data']['contex']) == 0) { 200 | $_SESSION['sess_data']['won'] = 'really'; 201 | echo("

You have won " . $_SESSION['sess_data']['contey'] . " bonus credits!
Click here to add them to your account!\n"); 202 | } 203 | } 204 | if (isset($_SESSION['sess_data']['contcx']) && $credit_me == 'yes' && $_SESSION['sess_data']['won'] != 'really') { 205 | if (($_SESSION['sess_data']['sts'] % $_SESSION['sess_data']['contcx']) == 0) { 206 | $_SESSION['sess_data']['ccwon'] = 'ccreallycc'; 207 | echo("You have won \$" . $_SESSION['sess_data']['contcy'] . " bonus cash!
Click here to credit it to your account!\n"); 208 | } 209 | } 210 | echo("
211 | ID #: " . $_SESSION['sess_data']['usrid'] . " | $why | Credits This Surf: " . $_SESSION['sess_data']['cts'] . " | Credits Today: $my_crds_today
212 | $surf_ban_rotator
\n"); 213 | $surplus = 1; 214 | @mysql_query("update adminprops set value=value+$surplus where field='surplu'"); 215 | $resins = @mysql_query($query); 216 | $la = date("Y-m-d H:i:s"); 217 | echo("
\n\n"); 218 | mysql_close; 219 | exit; 220 | ?> 221 | --------------------------------------------------------------------------------