Jump to content

gene4848

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gene4848's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. here is how i imported the code in: <? ini_set ("display_errors", "1"); error_reporting(E_ALL); ob_start(); session_start(); require("include/conn.php"); $sid = mysql_real_escape_string($_GET['sid']); $sql = "UPDATE ad SET sitehits = '$new_hits' WHERE siteid='$sid' "; $row_hit = mysql_query($sql) or die(mysql_error()); $qr_hit = mysql_fetch_array($row_hit); $sitehits = $qr_hit['sitehits']; if(!isset($_COOKIE['vote']) || $_COOKIE['vote'] != $_GET['sid']){ $new_hits = $sitehits + 1; $sql = "UPDATE ad SET sitehits =".$new_hits." WHERE siteid=".$_GET['sid']; mysql_query($sql) or die(mysql_error()); setcookie('vote',$_GET['sid'], time()+60*60*24,'/'); } ?> <html> <head> <title>Online Classifieds; Ad Details</title> <link href="include/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff" style="text-align: center" topmargin="0"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php include("include/top.php"); ?></td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"><table width="96%" border="0" cellpadding="3" cellspacing="0" class="brd"> <? $sql = "SELECT * FROM ad WHERE approve=1 and siteid=".$_GET['sid']; $row = mysql_query($sql) or die(mysql_error()); $qr = mysql_fetch_array($row); if (mysql_num_rows($row) < 1) { header("Location: index.php"); } /** FOR CAT NAME *************************************/ $sql_cat = "SELECT catname FROM category WHERE catid =".$qr['sitecatid']; $row_cat = mysql_query($sql_cat) or die(mysql_error()); $qr_cat = mysql_fetch_array($row_cat); ?> <tr> <td colspan="2" bgcolor="#E0D2DF" class="blackhead"> <?=$qr_cat['catname']?> > <?=$qr['sitetitle']?> </td> </tr> <tr> <td height="10" colspan="2"></td> </tr> <tr> <td width="63%" valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" class="brd"> <tr> <td bgcolor="#E0D2DF" class="blacktxt">Description</td> </tr> <tr> <td class="leftlinks"><?=$qr['sitedescription']?></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td bgcolor="#E0D2DF" class="blacktxt">General Details</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="leftlinks"> <td width="30%">Sold By </td> <td width="70%"><? $sql_mem = "SELECT name FROM users WHERE email='".$qr['ad_username']."'"; $row_mem = mysql_query($sql_mem) or die(mysql_error()); $qr_mem = mysql_fetch_array($row_mem); echo($qr_mem['name']); ?> </td> </tr> <tr class="leftlinks"> <td>Email </td> <td><a href="contact_seller.php?sid=<?=$_GET['sid']?>" class="leftlinks">Contact Seller</a> </td> </tr> </table></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td bgcolor="#E0D2DF" class="blacktxt">Ad Details </td> </tr> <tr> <td><table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr class="leftlinks"> <td width="30%">Ad Id </td> <td width="70%"><?=$qr['siteid']?></td> </tr> <tr class="leftlinks"> <td>Ad Views </td> <td><?=$sitehits?></td> </tr> <tr class="leftlinks"> <td>Ad Expires </td> <td class="blacktxt"> <? $expire_days = $qr['expire_days']; echo $prev_date = date("d.m.Y",strtotime ("+$expire_days day",mktime(0,0,0,substr($qr['sitedate'],3,2),substr($qr['sitedate'],0,2),substr($qr['sitedate'],6,4)))); ?> </td> </tr> <tr class="leftlinks"> <td>Added</td> <td><?=$qr['sitedate']?></td> </tr> <tr class="leftlinks"> <td>Country</td> <td><?=$qr['country']?></td> </tr> <tr class="leftlinks"> <td>State</td> <td><?=$qr['state']?></td> </tr> <tr class="leftlinks"> <td>City</td> <td><?=$qr['city']?></td> </tr> <tr class="leftlinks"> <td> </td> <td> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <? if(isset($_SESSION['session_login'])){ $sql = "SELECT * FROM favourites WHERE f_adid=".$_GET['sid']." AND femail = '".$_SESSION['session_login']."'"; $result_fav = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result_fav) == 0){ ?> <tr> <td class="blacktxt"><a href="ad_favorite.php?sid=<?=$_GET['sid']?>" class="blacktxt"><img src="images/bookmark.gif" width="20" height="20" border="0"> Add to Favorites </a></td> </tr> <? }else{ ?> <tr> <td class="blacktxt"><a href="ad_favorite.php?sid=<?=$_GET['sid']?>&id=r" class="blacktxt"><img src="images/bookmark.gif" width="20" height="20" border="0"> Remove from Favorites </a></td> </tr> <? } } ?> </table></td> <td width="37%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="brd"> <? $sql_img = "SELECT * FROM picture WHERE pictures_siteid=".$qr['siteid']." ORDER BY id DESC LIMIT 0,3"; $row_img = mysql_query($sql_img) or die(mysql_error()); //$qr_img = mysql_fetch_array($row_img); if(mysql_num_rows($row_img) == 0){ ?> <tr> <td align="center" class="leftlinks"><br><br><br>No Images Available!<br><br><br></td> </tr> <tr> <td height="10"></td> </tr> <? }else{ while($qr_img = mysql_fetch_array($row_img)){ if($qr_img['filename'] != "") { ?> <tr> <td align="center"><a href="ad_images/<? echo($qr_img['filename']);?>" target="_blank"><img src="ad_images/<? echo($qr_img['filename']);?>" width="100px" border="0"></a></td> </tr> <tr> <td height="10"></td> </tr> <? } } } ?> </table></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center"><table width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="24%" align="center" valign="top"><a href="search.php?cid=<?=$qr['sitecatid']?>" class="leftlinks"><img src="images/icon_moreadsincat.gif" width="32" height="32" border="0" align="middle"> More ads in this Category</a> </td> <td width="24%" align="center"><a href="search.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_adsfromseller.gif" width="32" height="32" border="0" align="middle"> Ads from this seller</a> </td> <td width="27%" align="center"><a href="contact_seller.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_contactsalesperson.gif" width="32" height="32" border="0" align="middle"> Contact Seller</a></td> <td width="25%" align="center"><a href="tell_friend.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_tellafriend.gif" width="32" height="32" border="0" align="middle"> Tell a Friend</a> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td bgcolor="#E0D2DF"><? require("include/footer.php");?></td> </tr> </table> </body> </html>
  2. I got this message now : Notice: Undefined variable: new_hits in /home/content/g/m/d/gmdistributors/html/post/detail.php on line 9 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/g/m/d/gmdistributors/html/post/detail.php on line 12 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= Notice: Undefined index: siteid in /home/content/g/m/d/gmdist' at line 1
  3. I did what you said I replaced the line in detail with the one you left I then got this erro: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/g/m/d/gmdistributors/html/post/detail.php on line 9 whats this one mean?
  4. Hi I did thaT to the detail php page erro message as follows: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= Notice: Undefined index: siteid in /home/content/g/m/d/gmdist' at line 1 What dose this mean ???
  5. Im needing help on one more major problem with my classified ad php software ,heres the problem: when some one joins for free and they get one of the ad packages weather it be 25 credits or ten all the other members get the same credit qty updat as the ones you buy,other wards, if one member has 25 credits in there account and the other member buys 50 that other members acount updates to the same qty?how do you fix the credit problem they give the same credit amout to all users plus or minus this is useless please give the fix info for this see for your selflink below: http://www.copylathe.com/post/index.php note i dont know where to begine i know itys not the mysql data base ,i elimated that, it might be in these two php files/pages can some one look at it and see if its right? or see where the problem is ? the first page is called :selectpackage) second page is called (detail) you guys are my last resort . 1) seleckpackage: <?php session_start(); if(!isset($_SESSION['session_login']) || $_SESSION['session_login'] == "") header("Location:loginform.php?errFlag=1"); require("include/conn.php"); ?> <html> <head> <title>Online Classifieds; Add Advertisment</title> <link href="include/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff" style="text-align: center" topmargin="0"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><?php include("include/top.php"); ?></td> </tr> <tr> <td width="224" valign="top" bgcolor="#E8E3E8"><? require("include/left.php");?></td> <td width="560" valign="top"> <table width="98%" border="0" align="center" cellpadding="2" cellspacing="0" class="brd"> <tr> <td bgcolor="#B3A2B2" class="whitetxt">Select Package</td> </tr> <? /* $sql = "SELECT * FROM page_text WHERE page_id=1"; $result = mysql_query($sql) or die(mysql_error()); $qr = mysql_fetch_array($result); $page_text = $qr['page_text']; */ ?> <tr> <td height="23"><br><form action="save_ad.php" method="post" name="frm_ad" onSubmit="return validateForm(this);"> <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="brd"> <tr bgcolor="#E0D2DF"> <td width="33%" class="blacktxt">Package Name</td> <td width="28%" class="blacktxt"><div align="center">No of Credits</div></td> <td width="12%" class="blacktxt">Price</td> <td class="blacktxt"><div align="center">Pic.View Detail </div></td> </tr> <? $result=mysql_query("Select * from packages order by amount asc"); $rc=mysql_num_rows($result); while($qr = mysql_fetch_array($result)) { ?> <tr> <td height="5" colspan="4"></td> </tr> <tr class="leftlinks"> <td><? echo $qr["title"]; ?> </td> <td><div align="center"><a href="detail.php?sid=<?=$qr['siteid']?>" class="leftlinks"> <?=$qr['no_days'];?> </a></div></td> <td>$<?=$qr['amount']?> </td> <td><div align="center"><A href="paypal.php?pkid=<? echo $qr["packageid"];?>"><font color="#000000">Buy Now</font></A></div></td> </tr> <? }?> </table> </form></td> </tr> <tr> <td class="leftlinks"> </td> </tr> <tr> <td align="right"></td> </tr> </table> <br> <br> <br> <br> <br> <br> <br> <br></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" bgcolor="#E0D2DF"><? require("include/footer.php");?></td> </tr> </table> </body> </html> Reply Quote Notify 2 PHP Applications, Frameworks and Libraries / Third Party PHP Scripts / Re: need urgent help with php classified script php myacount mode on: December 20, 2008, 05:20:25 PM Quote from: gene4848 on December 20, 2008, 08:27:26 AM i think you might be on to something there redarrow refrer to (points=points+$added_points where user_id='$user_id') instead of points it might be refrered to as credits : not sure witch php page contanes this ill send you the user select packackage page :below: Please i hope youguys do,nt give up on me, these last two php files i think the problem is in these.files names detail and selectpackage. Code: (php) [select] 2) Detail: <? ob_start(); session_start(); require("include/conn.php"); $sql = "SELECT sitehits FROM ad WHERE siteid=".$_GET['sid']; $row_hit = mysql_query($sql) or die(mysql_error()); $qr_hit = mysql_fetch_array($row_hit); $sitehits = $qr_hit['sitehits']; if(!isset($_COOKIE['vote']) || $_COOKIE['vote'] != $_GET['sid']){ $new_hits = $sitehits + 1; $sql = "UPDATE ad SET sitehits =".$new_hits." WHERE siteid=".$_GET['sid']; mysql_query($sql) or die(mysql_error()); setcookie('vote',$_GET['sid'], time()+60*60*24,'/'); } ?> <html> <head> <title>Online Classifieds; Ad Details</title> <link href="include/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff" style="text-align: center" topmargin="0"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php include("include/top.php"); ?></td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"><table width="96%" border="0" cellpadding="3" cellspacing="0" class="brd"> <? $sql = "SELECT * FROM ad WHERE approve=1 and siteid=".$_GET['sid']; $row = mysql_query($sql) or die(mysql_error()); $qr = mysql_fetch_array($row); if (mysql_num_rows($row) < 1) { header("Location: index.php"); } /** FOR CAT NAME *************************************/ $sql_cat = "SELECT catname FROM category WHERE catid =".$qr['sitecatid']; $row_cat = mysql_query($sql_cat) or die(mysql_error()); $qr_cat = mysql_fetch_array($row_cat); ?> <tr> <td colspan="2" bgcolor="#E0D2DF" class="blackhead"> <?=$qr_cat['catname']?> > <?=$qr['sitetitle']?> </td> </tr> <tr> <td height="10" colspan="2"></td> </tr> <tr> <td width="63%" valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" class="brd"> <tr> <td bgcolor="#E0D2DF" class="blacktxt">Description</td> </tr> <tr> <td class="leftlinks"><?=$qr['sitedescription']?></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td bgcolor="#E0D2DF" class="blacktxt">General Details</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="leftlinks"> <td width="30%">Sold By </td> <td width="70%"><? $sql_mem = "SELECT name FROM users WHERE email='".$qr['ad_username']."'"; $row_mem = mysql_query($sql_mem) or die(mysql_error()); $qr_mem = mysql_fetch_array($row_mem); echo($qr_mem['name']); ?> </td> </tr> <tr class="leftlinks"> <td>Email </td> <td><a href="contact_seller.php?sid=<?=$_GET['sid']?>" class="leftlinks">Contact Seller</a> </td> </tr> </table></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td bgcolor="#E0D2DF" class="blacktxt">Ad Details </td> </tr> <tr> <td><table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr class="leftlinks"> <td width="30%">Ad Id </td> <td width="70%"><?=$qr['siteid']?></td> </tr> <tr class="leftlinks"> <td>Ad Views </td> <td><?=$sitehits?></td> </tr> <tr class="leftlinks"> <td>Ad Expires </td> <td class="blacktxt"> <? $expire_days = $qr['expire_days']; echo $prev_date = date("d.m.Y",strtotime ("+$expire_days day",mktime(0,0,0,substr($qr['sitedate'],3,2),substr($qr['sitedate'],0,2),substr($qr['sitedate'],6,4)))); ?> </td> </tr> <tr class="leftlinks"> <td>Added</td> <td><?=$qr['sitedate']?></td> </tr> <tr class="leftlinks"> <td>Country</td> <td><?=$qr['country']?></td> </tr> <tr class="leftlinks"> <td>State</td> <td><?=$qr['state']?></td> </tr> <tr class="leftlinks"> <td>City</td> <td><?=$qr['city']?></td> </tr> <tr class="leftlinks"> <td> </td> <td> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <? if(isset($_SESSION['session_login'])){ $sql = "SELECT * FROM favourites WHERE f_adid=".$_GET['sid']." AND femail = '".$_SESSION['session_login']."'"; $result_fav = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result_fav) == 0){ ?> <tr> <td class="blacktxt"><a href="ad_favorite.php?sid=<?=$_GET['sid']?>" class="blacktxt"><img src="images/bookmark.gif" width="20" height="20" border="0"> Add to Favorites </a></td> </tr> <? }else{ ?> <tr> <td class="blacktxt"><a href="ad_favorite.php?sid=<?=$_GET['sid']?>&id=r" class="blacktxt"><img src="images/bookmark.gif" width="20" height="20" border="0"> Remove from Favorites </a></td> </tr> <? } } ?> </table></td> <td width="37%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="brd"> <? $sql_img = "SELECT * FROM picture WHERE pictures_siteid=".$qr['siteid']." ORDER BY id DESC LIMIT 0,3"; $row_img = mysql_query($sql_img) or die(mysql_error()); //$qr_img = mysql_fetch_array($row_img); if(mysql_num_rows($row_img) == 0){ ?> <tr> <td align="center" class="leftlinks"><br><br><br>No Images Available!<br><br><br></td> </tr> <tr> <td height="10"></td> </tr> <? }else{ while($qr_img = mysql_fetch_array($row_img)){ if($qr_img['filename'] != "") { ?> <tr> <td align="center"><a href="ad_images/<? echo($qr_img['filename']);?>" target="_blank"><img src="ad_images/<? echo($qr_img['filename']);?>" width="100px" border="0"></a></td> </tr> <tr> <td height="10"></td> </tr> <? } } } ?> </table></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center"><table width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="24%" align="center" valign="top"><a href="search.php?cid=<?=$qr['sitecatid']?>" class="leftlinks"><img src="images/icon_moreadsincat.gif" width="32" height="32" border="0" align="middle"> More ads in this Category</a> </td> <td width="24%" align="center"><a href="search.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_adsfromseller.gif" width="32" height="32" border="0" align="middle"> Ads from this seller</a> </td> <td width="27%" align="center"><a href="contact_seller.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_contactsalesperson.gif" width="32" height="32" border="0" align="middle"> Contact Seller</a></td> <td width="25%" align="center"><a href="tell_friend.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_tellafriend.gif" width="32" height="32" border="0" align="middle"> Tell a Friend</a> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td bgcolor="#E0D2DF"><? require("include/footer.php");?></td> </tr> </table> </body> </html> Report to moderator 64.223.121.82 gene4848 New Member Online Posts: 6 Re: need urgent help with php classified script php myacount mode « Reply #5 on: December 20, 2008, 05:20:25 PM » Quote Quote from: gene4848 on December 20, 2008, 08:27:26 AM
  6. Hi here is another page i think relates to the problem called detail below :I think the prblem code is in one o these pages : <? ob_start(); session_start(); require("include/conn.php"); $sql = "SELECT sitehits FROM ad WHERE siteid=".$_GET['sid']; $row_hit = mysql_query($sql) or die(mysql_error()); $qr_hit = mysql_fetch_array($row_hit); $sitehits = $qr_hit['sitehits']; if(!isset($_COOKIE['vote']) || $_COOKIE['vote'] != $_GET['sid']){ $new_hits = $sitehits + 1; $sql = "UPDATE ad SET sitehits =".$new_hits." WHERE siteid=".$_GET['sid']; mysql_query($sql) or die(mysql_error()); setcookie('vote',$_GET['sid'], time()+60*60*24,'/'); } ?> <html> <head> <title>Online Classifieds; Ad Details</title> <link href="include/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff" style="text-align: center" topmargin="0"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td><?php include("include/top.php"); ?></td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td align="center"><table width="96%" border="0" cellpadding="3" cellspacing="0" class="brd"> <? $sql = "SELECT * FROM ad WHERE approve=1 and siteid=".$_GET['sid']; $row = mysql_query($sql) or die(mysql_error()); $qr = mysql_fetch_array($row); if (mysql_num_rows($row) < 1) { header("Location: index.php"); } /** FOR CAT NAME *************************************/ $sql_cat = "SELECT catname FROM category WHERE catid =".$qr['sitecatid']; $row_cat = mysql_query($sql_cat) or die(mysql_error()); $qr_cat = mysql_fetch_array($row_cat); ?> <tr> <td colspan="2" bgcolor="#E0D2DF" class="blackhead"> <?=$qr_cat['catname']?> > <?=$qr['sitetitle']?> </td> </tr> <tr> <td height="10" colspan="2"></td> </tr> <tr> <td width="63%" valign="top"><table width="100%" border="0" cellpadding="3" cellspacing="0" class="brd"> <tr> <td bgcolor="#E0D2DF" class="blacktxt">Description</td> </tr> <tr> <td class="leftlinks"><?=$qr['sitedescription']?></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td bgcolor="#E0D2DF" class="blacktxt">General Details</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="leftlinks"> <td width="30%">Sold By </td> <td width="70%"><? $sql_mem = "SELECT name FROM users WHERE email='".$qr['ad_username']."'"; $row_mem = mysql_query($sql_mem) or die(mysql_error()); $qr_mem = mysql_fetch_array($row_mem); echo($qr_mem['name']); ?> </td> </tr> <tr class="leftlinks"> <td>Email </td> <td><a href="contact_seller.php?sid=<?=$_GET['sid']?>" class="leftlinks">Contact Seller</a> </td> </tr> </table></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td bgcolor="#E0D2DF" class="blacktxt">Ad Details </td> </tr> <tr> <td><table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr class="leftlinks"> <td width="30%">Ad Id </td> <td width="70%"><?=$qr['siteid']?></td> </tr> <tr class="leftlinks"> <td>Ad Views </td> <td><?=$sitehits?></td> </tr> <tr class="leftlinks"> <td>Ad Expires </td> <td class="blacktxt"> <? $expire_days = $qr['expire_days']; echo $prev_date = date("d.m.Y",strtotime ("+$expire_days day",mktime(0,0,0,substr($qr['sitedate'],3,2),substr($qr['sitedate'],0,2),substr($qr['sitedate'],6,4)))); ?> </td> </tr> <tr class="leftlinks"> <td>Added</td> <td><?=$qr['sitedate']?></td> </tr> <tr class="leftlinks"> <td>Country</td> <td><?=$qr['country']?></td> </tr> <tr class="leftlinks"> <td>State</td> <td><?=$qr['state']?></td> </tr> <tr class="leftlinks"> <td>City</td> <td><?=$qr['city']?></td> </tr> <tr class="leftlinks"> <td> </td> <td> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <? if(isset($_SESSION['session_login'])){ $sql = "SELECT * FROM favourites WHERE f_adid=".$_GET['sid']." AND femail = '".$_SESSION['session_login']."'"; $result_fav = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result_fav) == 0){ ?> <tr> <td class="blacktxt"><a href="ad_favorite.php?sid=<?=$_GET['sid']?>" class="blacktxt"><img src="images/bookmark.gif" width="20" height="20" border="0"> Add to Favorites </a></td> </tr> <? }else{ ?> <tr> <td class="blacktxt"><a href="ad_favorite.php?sid=<?=$_GET['sid']?>&id=r" class="blacktxt"><img src="images/bookmark.gif" width="20" height="20" border="0"> Remove from Favorites </a></td> </tr> <? } } ?> </table></td> <td width="37%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="brd"> <? $sql_img = "SELECT * FROM picture WHERE pictures_siteid=".$qr['siteid']." ORDER BY id DESC LIMIT 0,3"; $row_img = mysql_query($sql_img) or die(mysql_error()); //$qr_img = mysql_fetch_array($row_img); if(mysql_num_rows($row_img) == 0){ ?> <tr> <td align="center" class="leftlinks"><br><br><br>No Images Available!<br><br><br></td> </tr> <tr> <td height="10"></td> </tr> <? }else{ while($qr_img = mysql_fetch_array($row_img)){ if($qr_img['filename'] != "") { ?> <tr> <td align="center"><a href="ad_images/<? echo($qr_img['filename']);?>" target="_blank"><img src="ad_images/<? echo($qr_img['filename']);?>" width="100px" border="0"></a></td> </tr> <tr> <td height="10"></td> </tr> <? } } } ?> </table></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center"><table width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="24%" align="center" valign="top"><a href="search.php?cid=<?=$qr['sitecatid']?>" class="leftlinks"><img src="images/icon_moreadsincat.gif" width="32" height="32" border="0" align="middle"> More ads in this Category</a> </td> <td width="24%" align="center"><a href="search.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_adsfromseller.gif" width="32" height="32" border="0" align="middle"> Ads from this seller</a> </td> <td width="27%" align="center"><a href="contact_seller.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_contactsalesperson.gif" width="32" height="32" border="0" align="middle"> Contact Seller</a></td> <td width="25%" align="center"><a href="tell_friend.php?sid=<?=$_GET['sid']?>" class="leftlinks"><img src="images/icon_tellafriend.gif" width="32" height="32" border="0" align="middle"> Tell a Friend</a> </td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td bgcolor="#E0D2DF"><? require("include/footer.php");?></td> </tr> </table> </body> </html>
  7. i think you might be on to something there redarrow refrer to (points=points+$added_points where user_id='$user_id') instead of points it might be refrered to as credits : not sure witch php page contanes this ill send you the user select packackage page :below: <?php session_start(); if(!isset($_SESSION['session_login']) || $_SESSION['session_login'] == "") header("Location:loginform.php?errFlag=1"); require("include/conn.php"); ?> <html> <head> <title>Online Classifieds; Add Advertisment</title> <link href="include/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff" style="text-align: center" topmargin="0"> <table width="780" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><?php include("include/top.php"); ?></td> </tr> <tr> <td width="224" valign="top" bgcolor="#E8E3E8"><? require("include/left.php");?></td> <td width="560" valign="top"> <table width="98%" border="0" align="center" cellpadding="2" cellspacing="0" class="brd"> <tr> <td bgcolor="#B3A2B2" class="whitetxt">Select Package</td> </tr> <? /* $sql = "SELECT * FROM page_text WHERE page_id=1"; $result = mysql_query($sql) or die(mysql_error()); $qr = mysql_fetch_array($result); $page_text = $qr['page_text']; */ ?> <tr> <td height="23"><br><form action="save_ad.php" method="post" name="frm_ad" onSubmit="return validateForm(this);"> <table width="90%" border="0" align="center" cellpadding="3" cellspacing="0" class="brd"> <tr bgcolor="#E0D2DF"> <td width="33%" class="blacktxt">Package Name</td> <td width="28%" class="blacktxt"><div align="center">No of Credits</div></td> <td width="12%" class="blacktxt">Price</td> <td class="blacktxt"><div align="center">Pic.View Detail </div></td> </tr> <? $result=mysql_query("Select * from packages order by amount asc"); $rc=mysql_num_rows($result); while($qr = mysql_fetch_array($result)) { ?> <tr> <td height="5" colspan="4"></td> </tr> <tr class="leftlinks"> <td><? echo $qr["title"]; ?> </td> <td><div align="center"><a href="detail.php?sid=<?=$qr['siteid']?>" class="leftlinks"> <?=$qr['no_days'];?> </a></div></td> <td>$<?=$qr['amount']?> </td> <td><div align="center"><A href="paypal.php?pkid=<? echo $qr["packageid"];?>"><font color="#000000">Buy Now</font></A></div></td> </tr> <? }?> </table> </form></td> </tr> <tr> <td class="leftlinks"> </td> </tr> <tr> <td align="right"></td> </tr> </table> <br> <br> <br> <br> <br> <br> <br> <br></td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" bgcolor="#E0D2DF"><? require("include/footer.php");?></td> </tr> </table> </body> </html>
  8. Hi guys im here agian needing help on one more major problem with my classified ad php software ,heres the problem: when some one joins for free and they get one of the ad packages weather it be 25 credits or ten all the other members get the same credit qty as the ones you buy,other wards, if one member has 25 credits in there account and the other member buys 50 that other members acount updates to the same qty?how do you fix the credit problem they give the same credit amout to all users plus or minus this is useless please give the fix info for this see for your selflink below: http://www.copylathe.com/post/index.php note i dont know where to begine i know itys not the mysql data base ,i elimated that, it might be in the my count php page /code here it is can some one look at it and see if its right? [attachment deleted by admin]
  9. Hi I installed a classified ads software in my godaddy space and when I click ad listing I get this erro message : machine-post/addlisting.php Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/m/d/gmdistributors/html/machine-post/addlisting.php:12) in /home/content/g/m/d/gmdistributors/html/machine-post/addlisting.php on line 118 Itlooks to me like a path problem but not sure where to look ?? if any one can drect me how to fix it that would be great iv been at it for 8hrs now. this is the file im having problems with : <?php require_once("conn.php"); require_once("access.php"); require_once("includes.php"); $cryptinstall="captcha/cryptographp.fct.php"; include_once $cryptinstall; //get the info echo $PATH_INFO; if(isset($_POST[s1]) and chk_crypt($_POST['code']) ) { $LogoImage = $_FILES[logo][name]; if(!empty($LogoImage)) { $MyLogo = $t."_logo_".$LogoImage; copy($_FILES[logo][tmp_name], "yellow_images/".$MyLogo); } else { $MyLogo = ""; } //manage files $MyImages = array(); if(!empty($_FILES[ResumeImages][name][0])) { while(list($key,$value) = each($_FILES[ResumeImages][name])) { if(!empty($value)) { $NewImageName = $t."_resume_".$value; copy($_FILES[ResumeImages][tmp_name][$key], "yellow_images/".$NewImageName); $MyImages[] = $NewImageName; } } if(!empty($MyImages)) { if(empty($_POST[OldImages])) { $ImageStr = implode("|", $MyImages); } else { $ImageStr = ""; } } } else { $ImageStr = ""; } $qu = " select * from yellow_settings "; $msql = mysql_query($qu); $fet = mysql_fetch_array($msql); if ($fet[approve_free] == 'yese') { $status = "active"; $expd = date('Y-m-d' , mktime(0,0,0,date(m) , date(d) + $fet[freelex], date(Y))); } else { $status = "notconf"; $expd = "Pending"; } if ($fet[freelex] == 0) { $expd = 'Never'; } $notpq = "select * from yellow_subcat where subcatid = '$_POST[subCategoryID]'"; $mynotpq = mysql_query($notpq); $fetch = mysql_fetch_array($mynotpq); if($fetch[O1] != '0' || $fetch[O2] != '0' || $fetch[O3] != '0') { $status = "notpaid"; $expd = "Pending"; } function sec(&$arr){ foreach($arr as $n=>$v) $arr[$n] = addslashes($v); } sec($_POST); $q1 = "insert into yellow_posts set CompanyName = '$_POST[CompanyName]', CategoryID = '$_POST[CategoryID]', SubCategoryID = '$_POST[subCategoryID]', resume = '$_POST[resume]', logo = '$MyLogo', ResumeImages = '$ImageStr', PostDate = '$t', AgentID = '$_SESSION[AgentID]', status = '$status', expd = '$expd' "; mysql_query($q1); header("location:managelisting.php"); exit(); } for($z = '1'; $z <= (5 - $i); $z++) { $ImageBlock .= "<input type=file name=\"ResumeImages[]\"><br>\n"; } if (!chk_crypt($_POST['code']) and !empty($_POST[resume]) and !empty($_POST[CompanyName]) ) {$error="Wrong Confirmation Code!"; } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/AddListTemplate.php"); require_once("templates/FooterTemplate.php"); ?> (Edited by kenrbnsn to add tags)
×
×
  • 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.