- <?
- session_start();
- $page="offers";
- include"header.php";
- include"mysql.php";
- $_GET['out']=strip_tags($_GET['out']);
- $_GET['out']=mysql_real_escape_string($_GET['out']);
- if($_GET['out']!="")
- {
- mysql_query("update offers set visits=visits+1 where id={$_GET['out']}",$c);
- $geturl=mysql_query("select * from offers where id={$_GET['out']}",$c);
- $out=mysql_fetch_array($geturl);
- print"
- <h2>Please wait..</h2>
- <p>
- <center>
- <meta http-equiv=\"refresh\" content=\"1;url={$out['url']}{$ui['username']}\">
- Taking you to the offer...<br>
- If this page does not change in 1 seconds, <a href=\"{$out['url']}{$ui['username']}\">click here</a>.
- </center>
- </p>
- ";
- include"side.php";
- include"footer.php";
- exit;
- }
- else
- {
- $money=0;
- $getoffercash=mysql_query("select * from offers where active=1",$c);
- while($oc=mysql_fetch_array($getoffercash))
- {
- $money=$money+$oc['reward'];
- }
- }
- if($_SESSION['loggedin']==1)
- {
- //$refer="<br>Refer your friends: $siteurl/?ref={$ui['username']}<br>and receive an instant $$refbonus bonus per referral!";
- $refer="<br>Refer your friends: $siteurl/?ref={$ui['username']}<br>and receive an instant $$refbonus bonus when they earn their first $5.00!";
- }
- else
- {
- $refer="";
- }
- ?>
- <h2>Mail</h2>
- <br />
- <?
- //fetch mail
- $uiuname=$ui['username'];
- $mailquery=mysql_query("select * from user_mailbox where message_to='$uiuname'",$c);
- while($mailquery2=mysql_fetch_array($mailquery))
- {
- $mailfinal=$mailquery2['message_from'];
- $mailfinal2=$mailquery2['message_to'];
- $mailfinal3=$mailquery2['message_subject'];
- $mailfinal4=$mailquery2['message_body'];
- echo "<hr>";
- echo "Mail From: " . $mailfinal . "<br>";
- //echo "Mail To: " . $mailfinal . "<br>";
- echo "Mail Subject: " . $mailfinal3 . "<br>";
- echo "Mail Body: " . $mailfinal4 . "<br>";
- echo "<hr>";
- }
- //fetch mail
- ?>
- <h2>Offers</h2>
- <p class="post-by"><a href="how.php?ref=<? print"$ref"; ?>">not sure what to do?</a></p>
- <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>
- <p>Referal banners will be available for you to use shortly! Our graphics artist is still working on them!</p>
- <p>Hover your mouse over the offer links to view the requirements for that offer. That is a MUST</p>
- <p><center>Possible Earnings: $<?=$money;?><?=$refer;?></center></p>
- <table width="100%">
- <tr>
- <th colspan="4" align="center">
- Free To Complete
- </th>
- </tr>
- <tr>
- <th width="50%">Offer</th>
- <th width="50%">Instructions</th>
- <th width="15%">Reward</th>
- <th width="35%">Completed?</th>
- </tr>
- <?
- $_GET['offer']=strip_tags($_GET['offer']);
- $_GET['offer']=mysql_real_escape_string($_GET['offer']);
- $type="free";
- $getoffers=mysql_query("select * from offers where `type`='$type' and active=1 order by reward desc",$c);
- if(mysql_num_rows($getoffers)==0)
- {
- print"<tr><td colspan=\"3\">There are currently no free offers available</td></tr>";
- }
- else
- {
- while($off=mysql_fetch_array($getoffers))
- {
- if($_GET['offer']==$off['id'])
- {
- $color="style=\"background-color: #a2e250;\"";
- $front="<font color=\"black\"><b>";
- $back="</b></font>";
- }
- else
- {
- $color="";
- $front="";
- $back="";
- }
- if($_SESSION['loggedin']==1)
- {
- $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>";
- }
- else
- {
- $form="<font color=\"red\"><b>Please Login</b></font>";
- }
- $checkpend=mysql_query("select * from pending where offer_id={$off['id']} and user_id='{$_SESSION['userid']}' and denied=0",$c);
- $checkcompleted=mysql_query("select * from completed where offer_id={$off['id']} and user_id='{$_SESSION['userid']}'",$c);
- if(mysql_num_rows($checkpend)!=0)
- {
- $form="<font color=\"orange\"><b>Pending</b></font>";
- }
- else if(mysql_num_rows($checkcompleted)!=0)
- {
- $form="<font color=\"green\"><b>Completed</b></font>";
- }
- if(mysql_num_rows($checkpend)!=0 || mysql_num_rows($checkcompleted)!=0)
- {
- $link="$front{$off['name']}$back";
- }
- else
- {
- $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";
- $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>";
- }
- print"
- <tr $color>
- <td width=\"50%\">$link</td>
- <td width=\"50%\">{$off['description']}</td>
- <td align=\"center\">$front\${$off['reward']}$back</font></td>
- <td align=\"center\">$form</td>
- </tr>
- ";
- }
- }
- ?>
- </table>
- <table width="100%">
- <tr>
- <th colspan="3" align="center">
- Complete a Survey
- </th>
- </tr>
- <tr>
- <th width="50%">Offer</th>
- <th width="15%">Reward</th>
- <th width="35%">Completed?</th>
- </tr>
- <?
- $type="survey";
- $getoffers=mysql_query("select * from offers where `type`='$type' and active=1 order by reward desc",$c);
- if(mysql_num_rows($getoffers)==0)
- {
- print"<tr><td colspan=\"3\">There are currently no surveys available</td></tr>";
- }
- else
- {
- while($off=mysql_fetch_array($getoffers))
- {
- if($_GET['offer']==$off['id'])
- {
- $color="style=\"background-color: #a2e250;\"";
- $front="<font color=\"black\"><b>";
- $back="</b></font>";
- }
- else
- {
- $color="";
- $front="";
- $back="";
- }
- if($_SESSION['loggedin']==1)
- {
- $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>";
- }
- else
- {
- $form="<font color=\"red\"><b>Please Login</b></font>";
- }
- $checkpend=mysql_query("select * from pending where offer_id={$off['id']} and user_id={$_SESSION['userid']} and denied=0",$c);
- $checkcompleted=mysql_query("select * from completed where offer_id={$off['id']} and user_id={$_SESSION['userid']}",$c);
- if(mysql_num_rows($checkpend)!=0)
- {
- $form="<font color=\"orange\"><b>Pending</b></font>";
- }
- else if(mysql_num_rows($checkcompleted)!=0)
- {
- $form="<font color=\"green\"><b>Completed</b></font>";
- }
- if(mysql_num_rows($checkpend)!=0 || mysql_num_rows($checkcompleted)!=0)
- {
- $link="$front{$off['name']}$back";
- }
- else
- {
- $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>";
- }
- print"
- <tr $color>
- <td width=\"50%\">$link</td>
- <td align=\"center\">$front\${$off['reward']}$back</font></td>
- <td align=\"center\">$form</td>
- </tr>
- ";
- }
- }
- print"</table>";
- ?>
- <table width="100%">
- <tr>
- <th colspan="3" align="center">
- Non-Free Offers
- </th>
- </tr>
- <tr>
- <th width="50%">Offer</th>
- <th width="15%">Reward</th>
- <th width="35%">Completed?</th>
- </tr>
- <?
- $type="card";
- $getoffers=mysql_query("select * from offers where `type`='$type' and active=1 order by reward desc",$c);
- if(mysql_num_rows($getoffers)==0)
- {
- print"<tr><td colspan=\"3\">There are currently no non-free offers available.</td></tr>";
- }
- else
- {
- while($off=mysql_fetch_array($getoffers))
- {
- if($_GET['offer']==$off['id'])
- {
- $color="style=\"background-color: #a2e250;\"";
- $front="<font color=\"black\"><b>";
- $back="</b></font>";
- }
- else
- {
- $color="";
- $front="";
- $back="";
- }
- if($_SESSION['loggedin']==1)
- {
- $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>";
- }
- else
- {
- $form="<font color=\"red\"><b>Please Login</b></font>";
- }
- $checkpend=mysql_query("select * from pending where offer_id={$off['id']} and user_id='{$_SESSION['userid']}' and denied=0",$c);
- $checkcompleted=mysql_query("select * from completed where offer_id={$off['id']} and user_id='{$_SESSION['userid']}'",$c);
- if(mysql_num_rows($checkpend)!=0)
- {
- $form="<font color=\"orange\"><b>Pending</b></font>";
- }
- else if(mysql_num_rows($checkcompleted)!=0)
- {
- $form="<font color=\"green\"><b>Completed</b></font>";
- }
- if(mysql_num_rows($checkpend)!=0 || mysql_num_rows($checkcompleted)!=0)
- {
- $link="$front{$off['name']}$back";
- }
- else
- {
- $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>";
- }
- print"
- <tr $color>
- <td width=\"50%\">$link</td>
- <td align=\"center\">$front\${$off['reward']}$back</font></td>
- <td align=\"center\">$form</td>
- </tr>
- ";
- }
- }
- ?>
- </table>
- <?
- include"side.php";
- include"footer.php";
- ?>
