Jump to content

mushfik

New Members
  • Posts

    2
  • Joined

  • Last visited

mushfik's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Please can someone fix this code below <?php include("function.php"); ?> <?php include("header.php"); ?> <?php include("headscript.php"); ?> <script type="text/javascript"> function noAcc(){ $.fallr('show', { icon : 'error', content : '<p>You need an account to complete offers. Don\'t you want us to track the points you earn!? <br></p>' }); }; </script> <script type="text/javascript"> function errorMsg(msg){ $.fallr('show', { icon : 'error', content : msg }); }; </script> <div id="body"> <div class="box"> <h2>Rewards</h2> <div style="padding:10px; border:1px solid #557453; background:url(../images/boxbg.png);"> <table align="center"> <?php $rewards = mysql_query("SELECT * FROM rewards ORDER BY points"); $rowNum = 0; $rowMax = 4; while($row = mysql_fetch_array($rewards)) { if($rowNum ==0){ echo "<tr>"; } echo "<td style=\"border:1px solid #557453;\" align=\"center\" width=\"200px\"><h3 style=\"background:url(../images/historytop.png);\">". $row['title']."</h3><img style=\"margin:5px;\" src=\"". $row['img']."\" width=\"150\" height=\"150\" /><br /><table width=\"100%\"><tr><td valign=\"middle\"><h4 style=\"display:inline\">Points:</h4> ". $row['points']." <img src=\"images/point.png\" /></td>"; if(!isset($_SESSION["user"])){ echo"<td valign=\"middle\"><img onclick=\"errorMsg('You need an account to be able to purchase items.')\" style=\"cursor:pointer; border:0px\" src=\"/images/purchase.png\" /></td> </tr></table></td>"; } else { $userId = $_SESSION["user"]; $myPoints = mysql_result(mysql_query("SELECT points FROM balances WHERE userId = '$userId'"), 0); if($myPoints <= $row['points']){ echo"<td valign=\"middle\"><img onclick=\"errorMsg('You do not have enough points to get that. You have $myPoints points.')\" style=\"cursor:pointer; border:0px\" src=\"/images/purchase.png\" /></td> </tr></table></td>"; } else { echo"<td valign=\"middle\"><a href=\"redeem.php?id=".$row['rewardId']."\"><img border:0px\" src=\"/images/purchase.png\" /></a></td> </tr></table></td>"; } } $rowNum++; if($rowNum >= $rowMax){ $rowNum = 0; echo "</tr>"; } } ?> </table> </div> </div> <div class="clear"></div> </div> </div> <?php include("footer.php"); ?> </body> </html>
  2. Can Someone please look at the following zip file and edit index and code-gen so when someone refer required amount of visitors, php echo will redirect them to complete.php I have got css and js but not uploading as they are too big Thanks (please help me) script.zip
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.