Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 18th, 2010 | Syntax: None | Size: 8.70 KB | Hits: 49 | Expires: Never
Copy text to clipboard
  1. <?
  2. session_start();
  3. $page="offers";
  4. include"header.php";
  5. include"mysql.php";
  6.  
  7. $_GET['out']=strip_tags($_GET['out']);
  8. $_GET['out']=mysql_real_escape_string($_GET['out']);
  9. if($_GET['out']!="")
  10. {
  11. mysql_query("update offers set visits=visits+1 where id={$_GET['out']}",$c);
  12. $geturl=mysql_query("select * from offers where id={$_GET['out']}",$c);
  13. $out=mysql_fetch_array($geturl);
  14. print"
  15. <h2>Please wait..</h2>
  16. <p>
  17. <center>
  18. <meta http-equiv=\"refresh\" content=\"1;url={$out['url']}{$ui['username']}\">
  19. Taking you to the offer...<br>
  20. If this page does not change in 1 seconds, <a href=\"{$out['url']}{$ui['username']}\">click here</a>.
  21. </center>
  22. </p>
  23. ";
  24. include"side.php";
  25. include"footer.php";
  26. exit;
  27. }
  28. else
  29. {
  30. $money=0;
  31. $getoffercash=mysql_query("select * from offers where active=1",$c);
  32. while($oc=mysql_fetch_array($getoffercash))
  33. {
  34. $money=$money+$oc['reward'];
  35. }
  36. }
  37. if($_SESSION['loggedin']==1)
  38. {
  39. //$refer="<br>Refer your friends: $siteurl/?ref={$ui['username']}<br>and receive an instant $$refbonus bonus per referral!";
  40. $refer="<br>Refer your friends: $siteurl/?ref={$ui['username']}<br>and receive an instant $$refbonus bonus when they earn their first $5.00!";
  41. }
  42. else
  43. {
  44. $refer="";
  45. }
  46. ?>
  47.  
  48.  
  49. <h2>Mail</h2>
  50. <br />
  51. <?
  52. //fetch mail
  53. $uiuname=$ui['username'];
  54.  
  55. $mailquery=mysql_query("select * from user_mailbox where message_to='$uiuname'",$c);
  56.  
  57. while($mailquery2=mysql_fetch_array($mailquery))
  58. {
  59. $mailfinal=$mailquery2['message_from'];
  60. $mailfinal2=$mailquery2['message_to'];
  61. $mailfinal3=$mailquery2['message_subject'];
  62. $mailfinal4=$mailquery2['message_body'];
  63. echo "<hr>";
  64. echo "Mail From: " . $mailfinal . "<br>";
  65. //echo "Mail To: " . $mailfinal . "<br>";
  66. echo "Mail Subject: " . $mailfinal3 . "<br>";
  67. echo "Mail Body: " . $mailfinal4 . "<br>";
  68. echo "<hr>";
  69. }
  70. //fetch mail
  71. ?>
  72.  
  73. <h2>Offers</h2>
  74. <p class="post-by"><a href="how.php?ref=<? print"$ref"; ?>">not sure what to do?</a></p>
  75. <p class="post-by" color="red"><b>IMPORTANT Notice - After clicking and doing an offer make sure to go back and click "Done" for that offer. Also if you just click "Done" but don't click the link to go to the offer and do it. You will be banned</b></p>
  76. <p>Referal banners will be available for you to use shortly! Our graphics artist is still working on them!</p>
  77. <p>Hover your mouse over the offer links to view the requirements for that offer. That is a MUST</p>
  78. <p><center>Possible Earnings: $<?=$money;?><?=$refer;?></center></p>
  79. <table width="100%">
  80. <tr>
  81. <th colspan="4" align="center">
  82. Free To Complete
  83. </th>
  84. </tr>
  85. <tr>
  86. <th width="50%">Offer</th>
  87. <th width="50%">Instructions</th>
  88. <th width="15%">Reward</th>
  89. <th width="35%">Completed?</th>
  90. </tr>
  91. <?
  92.  
  93. $_GET['offer']=strip_tags($_GET['offer']);
  94. $_GET['offer']=mysql_real_escape_string($_GET['offer']);
  95. $type="free";
  96. $getoffers=mysql_query("select * from offers where `type`='$type' and active=1 order by reward desc",$c);
  97.  
  98. if(mysql_num_rows($getoffers)==0)
  99. {
  100. print"<tr><td colspan=\"3\">There are currently no free offers available</td></tr>";
  101. }
  102. else
  103. {
  104.  
  105. while($off=mysql_fetch_array($getoffers))
  106. {
  107.  
  108.  
  109. if($_GET['offer']==$off['id'])
  110. {
  111. $color="style=\"background-color: #a2e250;\"";
  112. $front="<font color=\"black\"><b>";
  113. $back="</b></font>";
  114. }
  115. else
  116. {
  117. $color="";
  118. $front="";
  119. $back="";
  120. }
  121. if($_SESSION['loggedin']==1)
  122. {
  123. $form="<form class=\"searchform2\" action=\"completed.php\" method=\"get\"><input type=\"hidden\" name=\"offer\" value=\"{$off['id']}\"><input type=\"submit\" class=\"button\" value=\"Done!\"></form>";
  124. }
  125. else
  126. {
  127. $form="<font color=\"red\"><b>Please Login</b></font>";
  128. }
  129.  
  130.  
  131. $checkpend=mysql_query("select * from pending where offer_id={$off['id']} and user_id='{$_SESSION['userid']}' and denied=0",$c);
  132. $checkcompleted=mysql_query("select * from completed where offer_id={$off['id']} and user_id='{$_SESSION['userid']}'",$c);
  133.  
  134. if(mysql_num_rows($checkpend)!=0)
  135. {
  136. $form="<font color=\"orange\"><b>Pending</b></font>";
  137. }
  138. else if(mysql_num_rows($checkcompleted)!=0)
  139. {
  140. $form="<font color=\"green\"><b>Completed</b></font>";
  141. }
  142.  
  143. if(mysql_num_rows($checkpend)!=0 || mysql_num_rows($checkcompleted)!=0)
  144. {
  145. $link="$front{$off['name']}$back";
  146. }
  147. else
  148. {
  149. $tmptext="    On most offers you must complete the path until you get to the final results page or it may not credit. On that page click 2 or more offers to ensure it credits. Please allow up to 72 hours for offers that you completed to be approved";
  150.  
  151. $link="<a href=\"http://www.sociallgbt.com/trythings/offers.php?offerid={$off['id']}&user=$uiuname\" target=\"_blank\" title=\"{$off['description']}\">$front{$off['name']}$back</a>";
  152. }
  153.  
  154. print"
  155. <tr $color>
  156. <td width=\"50%\">$link</td>
  157. <td width=\"50%\">{$off['description']}</td>
  158. <td align=\"center\">$front\${$off['reward']}$back</font></td>
  159. <td align=\"center\">$form</td>
  160. </tr>
  161. ";
  162. }
  163. }
  164.  
  165.  
  166.  
  167. ?>
  168.  
  169. </table>
  170. <table width="100%">
  171. <tr>
  172. <th colspan="3" align="center">
  173. Complete a Survey
  174. </th>
  175. </tr>
  176. <tr>
  177. <th width="50%">Offer</th>
  178. <th width="15%">Reward</th>
  179. <th width="35%">Completed?</th>
  180. </tr>
  181. <?
  182.  
  183. $type="survey";
  184. $getoffers=mysql_query("select * from offers where `type`='$type' and active=1 order by reward desc",$c);
  185.  
  186. if(mysql_num_rows($getoffers)==0)
  187. {
  188. print"<tr><td colspan=\"3\">There are currently no surveys available</td></tr>";
  189. }
  190. else
  191. {
  192.  
  193. while($off=mysql_fetch_array($getoffers))
  194. {
  195.  
  196.  
  197. if($_GET['offer']==$off['id'])
  198. {
  199. $color="style=\"background-color: #a2e250;\"";
  200. $front="<font color=\"black\"><b>";
  201. $back="</b></font>";
  202. }
  203. else
  204. {
  205. $color="";
  206. $front="";
  207. $back="";
  208. }
  209. if($_SESSION['loggedin']==1)
  210. {
  211. $form="<form class=\"searchform2\" action=\"completed.php\" method=\"get\"><input type=\"hidden\" name=\"offer\" value=\"{$off['id']}\"><input type=\"submit\" class=\"button\" value=\"Done!\"></form>";
  212. }
  213. else
  214. {
  215. $form="<font color=\"red\"><b>Please Login</b></font>";
  216. }
  217.  
  218.  
  219. $checkpend=mysql_query("select * from pending where offer_id={$off['id']} and user_id={$_SESSION['userid']} and denied=0",$c);
  220. $checkcompleted=mysql_query("select * from completed where offer_id={$off['id']} and user_id={$_SESSION['userid']}",$c);
  221.  
  222. if(mysql_num_rows($checkpend)!=0)
  223. {
  224. $form="<font color=\"orange\"><b>Pending</b></font>";
  225. }
  226. else if(mysql_num_rows($checkcompleted)!=0)
  227. {
  228. $form="<font color=\"green\"><b>Completed</b></font>";
  229. }
  230.  
  231. if(mysql_num_rows($checkpend)!=0 || mysql_num_rows($checkcompleted)!=0)
  232. {
  233. $link="$front{$off['name']}$back";
  234. }
  235. else
  236. {
  237. $link="<a href=\"http://www.sociallgbt.com/trythings/offers.php?offerid={$off['id']}&user=$uiuname\" target=\"_blank\" title=\"{$off['countries']}\">$front{$off['name']}$back</a>";
  238. }
  239.  
  240. print"
  241. <tr $color>
  242. <td width=\"50%\">$link</td>
  243. <td align=\"center\">$front\${$off['reward']}$back</font></td>
  244. <td align=\"center\">$form</td>
  245. </tr>
  246. ";
  247. }
  248. }
  249. print"</table>";
  250.  
  251.  
  252. ?>
  253.  
  254. <table width="100%">
  255. <tr>
  256. <th colspan="3" align="center">
  257. Non-Free Offers
  258. </th>
  259. </tr>
  260. <tr>
  261. <th width="50%">Offer</th>
  262. <th width="15%">Reward</th>
  263. <th width="35%">Completed?</th>
  264. </tr>
  265. <?
  266.  
  267. $type="card";
  268. $getoffers=mysql_query("select * from offers where `type`='$type' and active=1 order by reward desc",$c);
  269.  
  270. if(mysql_num_rows($getoffers)==0)
  271. {
  272. print"<tr><td colspan=\"3\">There are currently no non-free offers available.</td></tr>";
  273. }
  274. else
  275. {
  276.  
  277. while($off=mysql_fetch_array($getoffers))
  278. {
  279.  
  280.  
  281. if($_GET['offer']==$off['id'])
  282. {
  283. $color="style=\"background-color: #a2e250;\"";
  284. $front="<font color=\"black\"><b>";
  285. $back="</b></font>";
  286. }
  287. else
  288. {
  289. $color="";
  290. $front="";
  291. $back="";
  292. }
  293. if($_SESSION['loggedin']==1)
  294. {
  295. $form="<form class=\"searchform2\" action=\"completed.php\" method=\"get\"><input type=\"hidden\" name=\"offer\" value=\"{$off['id']}\"><input type=\"submit\" class=\"button\" value=\"Done!\"></form>";
  296. }
  297. else
  298. {
  299. $form="<font color=\"red\"><b>Please Login</b></font>";
  300. }
  301.  
  302.  
  303. $checkpend=mysql_query("select * from pending where offer_id={$off['id']} and user_id='{$_SESSION['userid']}' and denied=0",$c);
  304. $checkcompleted=mysql_query("select * from completed where offer_id={$off['id']} and user_id='{$_SESSION['userid']}'",$c);
  305.  
  306. if(mysql_num_rows($checkpend)!=0)
  307. {
  308. $form="<font color=\"orange\"><b>Pending</b></font>";
  309. }
  310. else if(mysql_num_rows($checkcompleted)!=0)
  311. {
  312. $form="<font color=\"green\"><b>Completed</b></font>";
  313. }
  314.  
  315. if(mysql_num_rows($checkpend)!=0 || mysql_num_rows($checkcompleted)!=0)
  316. {
  317. $link="$front{$off['name']}$back";
  318. }
  319. else
  320. {
  321. $link="<a href=\"http://www.sociallgbt.com/trythings/offers.php?offerid={$off['id']}&user=$uiuname\" target=\"_blank\" title=\"{$off['countries']}\">$front{$off['name']}$back</a>";
  322. }
  323.  
  324. print"
  325. <tr $color>
  326. <td width=\"50%\">$link</td>
  327. <td align=\"center\">$front\${$off['reward']}$back</font></td>
  328. <td align=\"center\">$form</td>
  329. </tr>
  330. ";
  331. }
  332. }
  333.  
  334.  
  335.  
  336. ?>
  337. </table>
  338. <?
  339. include"side.php";
  340. include"footer.php";
  341. ?>