SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot pannick's Avatar
    Join Date
    Aug 2003
    Location
    Florida
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can someone help me figure out

    I get on error on line 75

    www.southernhorsetraders.com

    Line:75
    Error: ' mystring is undefined

    This was a script that I got online and I am still learning this stuff so I could use a little help... Thanks in advance..

    <?
    # *******************************************************
    # * *
    # * ClassifiedsCaffe 1.0 - a PHP/MySQL classifieds script *
    # * *
    # * [December, 2003 ] *
    # * *
    # *******************************************************
    #
    #Copyright 2003 gonafish.COM
    #
    #All gonafish.COM copyright notices contained therein must remain unchanged and visible on all web pages .
    #Link (Powder by ClassifiedsCaffe) notices must not be removed or altered under any circumstances without the express permission of gonafish.COM.
    #This scripts is owned by gonafish.COM and is protected by national copyright laws and international copyright treaties.
    #Scripts may be used and modified free of charge for personal and non-profit use.
    #Commercial use must purchase a Licence.
    #You may not sell or distribute the code of scripts in whole or part.
    #This script may not be used for promoting racism, violence, pornography and such.
    #All rights reserved. gonafish.COM as freeware distributes of scripts.
    #The user assumes the entire risk of using the program.
    #BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM
    # ********************************************************


    include('paramlinks.inc.php');


    function dbConnect()
    {
    global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;
    @mysql_connect( $mysql_host, $mysql_user, $mysql_pass ) or error( mysql_error() );
    mysql_select_db( $mysql_db );
    }

    dbConnect();



    include("paramlinks.inc.php");

    if (($action) OR ($cat) OR ($search))
    {
    $cat = $cat;
    $action = $action;
    $search = $search;
    }
    else
    {
    showindex();
    exit;
    }



    function showlinksheader() {
    require( 'paramlinks.inc.php');
    global $sitenames
    ?>
    <center>
    <table><tr><td height='5'></td></tr></table>
    <table width='620' border='0' cellspacing='0'><tr><td class='text12' width='500' align='left'><b><? echo $sitenames;?></td></tr></table>
    <table><tr><td height='5'></td></tr></table>
    <?
    }




    function showlinksfooter() {
    require( 'paramlinks.inc.php');
    ?>
    <center>
    </td></tr></table>
    <hr size=1 noshade width=620>
    <table width='620' border='0' cellspacing='0'><tr>
    <td class='text8' align='left'><? echo $copyright;?></td><td class='text8' align='right'>Powder By <a href='http://gonafish.com/lc/script/classifieds.php'>ClassifiedsCaffe</a></td></tr></table>
    <?
    }




    function showsearchtable() {
    require( 'paramlinks.inc.php');
    ?>
    <center><form action='<? echo $PHP_SELF; ?>' method='post' ><table width='620' cellspacing='5'><tr><td class='small' width ='100'> Search Again : </td><td><input type='text' name='search' class='button'>&nbsp;&nbsp; <select NAME='andor' class='button'><option>and<option>or</select>&nbsp;&nbsp;
    <input type='submit' value='search' class='button'ONCLICK="remove_XS_whitespace(search);mystring.select();return false" style='font-size: 9pt; padding: 0'></td></tr><tr><td></td><td><font class='text8'>* Note : Last word must contain at least 3 characters.</font></td></tr></table></form>
    </center>
    <?
    }




    function showindex() {
    require( 'paramlinks.inc.php');
    $sitenames = "$sitename :: Index";
    include('header.inc.php');
    dbConnect();
    ?>
    <center>
    <table width='620' border='0' cellspacing='10'><tr><td class='text12' width='500' align='left' valign='top'><b><? echo $sitenames;?></td></tr></table>
    <table><tr><td height='5'></td></tr></table>
    <table width='620'>
    <?
    $search = strtoupper($search);
    $cinuz= 620/$nocat;
    dbConnect();
    $rime = mysql_query("SELECT * from classified_category WHERE sub_cat='0' ORDER BY lcat_name") or die(mysql_error());
    echo "<tr>";
    $i = 1;
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $id = $row["lcat_id"];
    $name = $row["lcat_name"];

    $rime11 = mysql_query("SELECT COUNT(*) from classified WHERE link_val LIKE 'yes' AND cat_id='$id'") or die(mysql_error());
    $totalnum = mysql_result($rime11, 0, 0);
    $navigator = "" ;
    $rime1= mysql_query("SELECT * FROM classified_category WHERE sub_cat='$id' LIMIT $nosub") or die(mysql_error());
    while($row = mysql_fetch_array($rime1)) {
    extract($row);
    $ida = $row["lcat_id"];
    $name1 = $row["lcat_name"];
    $sub_cat = $row["sub_cat"];
    $linnk = "<a href='$PHP_SELF?cat=$lcat_id'>$name1</a>";
    $navigator = $linnk ." ".$navigator;
    }
    echo "<td width='$cinuz' valign='top'><img src='./images/icon.gif' align=left hspace=4 vspace=4 border=0>&nbsp;<a href='$PHP_SELF?cat=$id'><font class='text10'><b>$name</b></font></a> ";
    If ($shownumlinks=="1"){echo " <font class='text7'>($totalnum)</font>";}
    If ($nosub >0){echo "<br><font class='text7'>$navigator</font></td>";}
    else
    echo "</td>";
    if (is_int($i / $nocat))
    echo "</tr>";
    $i++;
    }
    echo "</tr></table>";
    ?>
    <table width='620' border='0' cellspacing='10'><tr><td class='small' width='580' align='left'>
    To place classifieds on our system, you first need to <a href='register.php?action=register'>register</a> with us. You only need to do this once, and your registration is free and never expires.<br><br>Forgot password? - <a href='register.php?action=forgotpassword'>Click here</a>
    </td></tr></table>
    <?
    showlinksfooter();
    exit;
    }



    if ($action=="addads")
    {
    $sitenames = "$sitename :: Place Ads";
    include('header.inc.php');
    showlinksheader();
    dbConnect();
    echo "<table width=620 class='small'><tr><td>Find the appropriate category in the Classifieds.<br>POST FREE ADS from the category you think most appropriate.<br>Do this by clicking on the <b>'place ads'</b> link.<br><br>To place classifieds on our system, you first need to <a href='http://$siteurl_class/register.php?action=register'>register</a> with us. You only need to do this once, and your registration is free and never expires</td><td align='right' class='small'></td></tr></table>";
    showlinksfooter();
    exit;
    }





    if ($action=="searchform")
    {
    $sitenames = "$sitename :: Search";
    include('header.inc.php');
    showlinksheader();
    dbConnect();
    echo "<table width=620 class='small'><tr><td><a href='$PHP_SELF'>CLASSIFIEDS</a> :: Advanced search </td><td align='right' class='small'></td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='2'></td></tr></table>";
    showsearchtable();
    showlinksfooter();
    exit;
    }




    if ($search)
    {
    $sitenames = "$sitename :: Search Result";
    include('header.inc.php');
    showlinksheader();
    dbConnect();
    $today = time();

    $limit = $nolinks;
    if (empty($page)) {
    $page = 1;
    }
    $offset = $limit * ($page - 1);
    $searchwords = split ( "[ ,]", $search );
    $search = strtoupper($search);

    $first = true;
    foreach ( $searchwords as $word )
    {
    if ( $first )
    {
    $first = false;
    $like .= " WHERE ";
    }
    elseif ( $andor == "or" )
    $like .= " OR ";
    else
    $like .= " AND ";
    $word = chop($word);
    $like .= "link_val = 'yes' AND (link_name LIKE '%$word%' OR link_desc LIKE '%$word%' OR country LIKE '%$word%' OR state LIKE '%$word%' OR city LIKE '%$word%' OR personal_name LIKE '%$word%')";
    }
    $words = $word;

    if (strlen($words) < 3)
    {
    echo "<table width=620 class='small'><tr><td><a href='$PHP_SELF'>CLASSIFIEDS</a> :: Search Result </td><td align='right' class='small'><font color=red><b>$search</b></font> resulted in : 0 links</td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='2'></td></tr></table>";
    showsearchtable();
    showlinksfooter();
    exit;
    }


    if (strlen($words) > 20)
    {
    echo "<table width=620 class='small'><tr><td><a href='$PHP_SELF'>CLASSIFIEDS</a> :: Search Result </td><td align='right' class='small'><font color=red><b>word</b></font> is too long : 0 links</td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='2'></td></tr></table>";
    showsearchtable();
    showlinksfooter();
    exit;
    }

    $rime = mysql_query("SELECT * from classified $like AND expires>$today") or die(mysql_error());
    $totalnum = mysql_num_rows($rime);
    $numrows = mysql_num_rows($rime);
    if ($totalnum < 1)
    {
    echo "<table width=620 class='small'><tr><td><a href='$PHP_SELF'>CLASSIFIEDS</a> :: Search Result </td><td align='right' class='small'><font color=red><b>$search</b></font> resulted in : $totalnum links</td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='2'></td></tr></table>";
    showsearchtable();
    showlinksfooter();
    exit;
    }
    else
    {
    echo "<table width=620 class='small'><tr><td><a href='$PHP_SELF'>CLASSIFIEDS</a> :: Search Result </td><td align='right' class='small'><font color=red><b>$search</b></font> resulted in : $totalnum links</td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='2'></td></tr></table>";
    echo "<center><table width='620'><tr><td class='small'>";
    $rime = mysql_query ("SELECT * FROM classified $like AND expires>$today ORDER BY link_gold DESC, link_name DESC LIMIT $offset, $limit");
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $expires = date("M-d-Y",$expires);
    $date = date("M-d-Y",$add_date);
    echo "<table width=620 class=small bgcolor='#dde2f9'><tr><td width=430><a href='http://$siteurl_class/$PHP_SELF?action=show&link_id=$link_id&email=$email'><b>$link_name</b></a></td><td width=70 class=text8 align='right'>$date</td><td width=100 class=text8 align='right'>$state $country</td></tr></table>";
    echo "<table width=620 cellspacing='1'><tr><td></td></tr></table>";

    }
    echo "<br><b>Page : </b>";
    if ($page > 1) {
    $regpage = $page - 1;
    echo "<a href='$PHP_SELF?search=$search&andor=$andor&page=1'>first</a> ";
    echo "<a href='$PHP_SELF?search=$search&andor=$andor&page=$regpage'>prev</a> ";
    }
    $numpages = intval($numrows / $limit);
    if ($numrows % $limit) {
    $numpages++;
    }
    $firstpage=max(1,$page-5);
    $lastpage=min($numpages,$firstpage+15);
    for($i=$firstpage; $i<=$lastpage; ++$i) {
    if($page != $i) {
    echo "<a href='$PHP_SELF?search=$search&andor=$andor&page=$i'>";
    }
    echo $i;
    if($page != $i) {
    echo "</a> ";
    }
    echo " \n";
    }
    if ($page < $numpages) {
    $refpage = $page + 1;
    echo "<a href='$PHP_SELF?search=$search&andor=$andor&page=$refpage'>next</a> ";
    echo "<a href='$PHP_SELF?search=$search&andor=$andor&page=$numpages'>last</a><p>\n";
    }
    }
    ?>
    </td></tr></table></center>
    <?
    showlinksfooter();
    exit;
    }





    if ($action=="new")
    {
    $sitenames = "$sitename :: Recent Ads";
    include('header.inc.php');
    showlinksheader();
    ?>
    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=400><a href='index.php'>CLASSIFIEDS</a> :: <b>New Ads In Last 7 Days</b></td><td align='right'></td></tr></table>
    <table><tr><td height='1'></td></tr></table>
    <hr size=2 noshade width=620>
    <?
    $today = time();
    $rime = mysql_query("SELECT * FROM classified WHERE add_date>$today-3000000 ORDER BY add_date DESC") or die(mysql_error());
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $date = date("M-d-Y",$add_date);
    echo "<table width=620 class=small bgcolor='#dde2f9'><tr><td width=430><a href='http://$siteurl_class/$PHP_SELF?action=show&link_id=$link_id&email=$email'><b>$link_name</b></a></td><td width=70 class=text8 align='right'>$date</td><td width=100 class=text8 align='right'>$state $country</td></tr></table>";
    echo "<table width=620 cellspacing='1'><tr><td></td></tr></table>";
    }
    showlinksfooter();
    exit;
    }









    if ($action=="add")
    {
    $sitenames = "$sitename :: Place Ads";
    include('header.inc.php');
    showlinksheader();

    $rime2 = mysql_query("SELECT * from classified_category WHERE lcat_id='$cat_id'") or die(mysql_error());
    while($row = mysql_fetch_array($rime2)) {
    extract($row);
    $id = $row["lcat_id"];
    $name = $row["lcat_name"];
    $sub_cat = $row["sub_cat"];
    $navigator = "<font color=black><b>" .$name ."</b></font>" . "" ;
    }
    while ($sub_cat > 0) {
    $rime2 = mysql_query("SELECT * from classified_category WHERE lcat_id='$sub_cat'") or die(mysql_error());
    $row = mysql_fetch_array($rime2);
    $id = $row["lcat_id"];
    $name = $row["lcat_name"];
    $sub_cat = $row["sub_cat"];
    $linnk = "<a href='$PHP_SELF?cat=$id'>$name</a> >";
    $linnk1 = "$name";
    $navigator = $linnk . " " .$navigator;
    }


    ?>
    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td><a href='index.php'>CLASSIFIEDS</a> :: <b><a href='index.php?cat=<? echo $cat_id;?>'><? echo $navigator;?></a></b><hr size=1 noshade width=620></td></tr></table>
    <table><tr><td height='6'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96></td><td>To ads classified you have to be registered member.<br>Please go to <a href='http://<? echo $siteurl_class;?>/register.php'>register</a>. Forgot you password. No problem <a href='http://<? echo $siteurl_class;?>/register.php?action=forgotpassword'>click here</a>.<br>Fields with(*) are required.</td></tr></table>

    <table><tr><td height='4'></td></tr></table>

    <form action='index.php?action=adsadd' method ='POST'>
    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Name </td><td width='200'><input type='text' name='personal_name' size='25' maxlength='30' value='' class='button'>&nbsp;*</td><td width=96 valign=top>Country </td><td width='200'>
    <select name='country' class='button'>
    <OPTION>Antigua <OPTION>Argentina <OPTION>Armenia <OPTION>Australia <OPTION>Austria <OPTION>Bahamas <OPTION>Barbados <OPTION>Belarus <OPTION>Belgium <OPTION>Belize <OPTION>Bermuda <OPTION>Bolivia <OPTION>Bosnia & Herzegovina <OPTION>Brazil <OPTION>Bulgaria <OPTION>Canada <OPTION>Cayman Islands <OPTION>Chile <OPTION>China <OPTION>Colombia <OPTION>Croatia <OPTION>Cyprus <OPTION>Czech Republic <OPTION>Denmark <OPTION>Dominican Republic <OPTION>Egypt <OPTION>Estonia <OPTION>Finland <OPTION>France <OPTION>Germany <OPTION>Greece <OPTION>Greenland <OPTION>Grenada <OPTION>Guatemala <OPTION>Guyana <OPTION>Holland <OPTION>Hong Kong <OPTION>Iceland <OPTION>India <OPTION>Indonesia <OPTION>Ireland <OPTION>Israel <OPTION>Italy <OPTION>Ivory Coast <OPTION>Jamaica <OPTION>Japan <OPTION>Jordan <OPTION>Kamchatka <OPTION>Kaunas <OPTION>Kazakhstan <OPTION>Korea <OPTION>Kuwait <OPTION>Latvia <OPTION>Lebanon <OPTION>Lithuania <OPTION>Macedonia <OPTION>Malaysia <OPTION>Malta <OPTION>Mexico <OPTION>Moldova <OPTION>Netherland Antilles <OPTION>Netherlands <OPTION>New Zealand <OPTION>Norway <OPTION>Oman <OPTION>Pakistan <OPTION>Panama <OPTION>Paraguay <OPTION>Peru <OPTION>Philippines <OPTION>Poland <OPTION>Portugal <OPTION>Romania <OPTION>Russia <OPTION>Saudi Arabia <OPTION>Scotland <OPTION>Senegal <OPTION>Serbia & MonteNegro <OPTION>Singapore <OPTION>Slovakia <OPTION>Slovenia <OPTION>South Africa <OPTION>Spain <OPTION>St Lucia <OPTION>Sweden <OPTION>Switzerland <OPTION>Syria <OPTION>Taiwan <OPTION>Tatarstan <OPTION>Trinidad <OPTION>Turkey <OPTION>Ukraine <OPTION>United Arab Emirates <OPTION>United Kingdom <OPTION selected>USA <OPTION>Uruguay <OPTION>Venezuela <OPTION>Vietnam
    </select>&nbsp;*
    </td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>City </td><td width='200'><input type='text' name='city' size='25' maxlength='30' value='' class='button'>&nbsp;*</td><td width=96 valign=top>State </td><td width='200'>
    <select name='state' class='button'>
    <option><option>Alabama<option>Alaska<option>Arizona<option>Arkansas<option>California<option>Colorado<option>Connecticut<option>Delaware<option>Florida<option>Georgia<option>Hawaii<option>Idaho<option>Illinois<option>Indiana<option>Iowa<option>Kansas<option>Kentucky<option>Louisiana<option>Maine<option>Maryland<option>Massachusetts<option>Michigan<option>Minnesota<option>Mississippi<option>Missouri<option>Montana<option>Nebraska<option>Nevada<option>New Hampshire<option>New Jersey<option>New Mexico<option>New York<option>North Carolina<option>North Dakota<option>Ohio<option>Oklahoma<option>Oregon<option>Pennsylvania<OPTION>Puerto Rico<option>Rhode Island<option>South Carolina<option>South Dakota<option>Tennessee<option>Texas<option>Utah<option>Vermont<option>Virginia<option>Washington<option>Washington D.C.<option>West Virginia<option>Wisconsin<option>Wyoming</select>&nbsp;*
    </td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Address</td><td width='200'><input type='text' name='address' size='25' maxlength='30' value='' class='button'></td><td width=94 valign=top>Telephone</td><td width='200'><input type='text' name='telephone' size='25' maxlength='12' value='' class='button'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Ad Title</td><td width=500><input type='text' name='link_name' size='75' maxlength='60' value='' class='button' onChange="remove_XS_whitespace(link_name);link_name.select();return false">&nbsp;*<br><font class=text8>(ad has to be 20-60 characters)</td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Content </td><td width=500 valign=top><textarea name='link_desc' rows='6' cols='56' class='button' onChange="remove_XS_whitespace(link_desc);link_desc.select();return false"></textarea><font class=text8>&nbsp;*<br>(limit is 1000 characters)</td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Web Page</td><td width=500><input type='text' name='web_page' size='75' maxlength='150' value='http://' class='button'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Link To Photo</td><td width=500><input type='text' name='picture' size='75' maxlength='150' value='http://' class='button'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Price</td><td width=500><input type='text' name='price' size='20' maxlength='20' value='' class='button'></td></tr></table>

    <table><tr><td height='4'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>User Name </td><td width='200'><input type='text' name='user_name' size='25' maxlength='12' value='' class='button'>&nbsp;*</td><td width=94 valign=top>Password </td><td width='200'><input type='password' name='password' size='25' maxlength='12' value='' class='button'>&nbsp;*</td></tr></table>

    <input type='hidden' name='cat_id' value='<? echo $cat_id;?>'>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top></td><td width=500><input type="submit" value="submit" class='button'></td></tr></table>
    </form>
    <?
    showlinksfooter();
    exit;
    }




    if ($action=="adsadd")
    {
    $sitenames = "$sitename :: Ad";
    include('header.inc.php');
    showlinksheader();


    if (strlen($web_page)<10){$web_page = "";}else{$web_page=$web_page;}
    if (strlen($picture)<10){$picture = "";}else{$picture=$picture;}

    $link_name = strip_tags($link_name);
    $link_desc = strip_tags($link_desc);
    $price = strip_tags($price);
    $personal_name = strip_tags($personal_name);
    $address = strip_tags($address);
    $telephone = strip_tags($telephone);
    $city = strip_tags($city);
    $web_page = strip_tags($web_page);
    $picture = strip_tags($picture);

    if(strlen($link_name)<20)
    {
    ?>
    <table width='620' border='0' cellspacing='0'><tr><td class='small' align='left'>Ad Title is less then 20 characters.<br>Please click <a href="javascript:history.back(1)">here</a> to correct problem.</td></tr></table>
    <?
    showlinksfooter();
    exit;
    }
    if(strlen($link_desc)>1000)
    {
    ?>
    <table width='620' border='0' cellspacing='0'><tr><td class='small' align='left'>Content is more then 1000 characters.<br>Please click <a href="javascript:history.back(1)">here</a> to correct problem.</td></tr></table>
    <?
    showlinksfooter();
    exit;
    }

    $rime = mysql_query("SELECT *,email as hepa,gold_member as hepa1 from members WHERE member_name='$user_name' AND member_password='$password'") or die(mysql_error());

    $result = mysql_num_rows($rime);
    if($result<1)
    {
    ?>
    <table width='620' border='0' cellspacing='0'><tr><td class='small' align='left'>User name or password ase incorrect.<br>Please click <a href="javascript:history.back(1)">here</a> to correct.</td></tr></table>
    <?
    showlinksfooter();
    exit;
    }

    $result_email = mysql_result($rime,0,hepa);
    $result_gold = mysql_result($rime,0,hepa1);

    $today = time();
    $rime = mysql_query("SELECT * FROM classified WHERE email='$result_email' AND add_date>$today-20") or die(mysql_error());
    $result = mysql_num_rows($rime);
    if ($result>0)
    {
    ?>
    <table width='620' border='0' cellspacing='0'><tr><td class='small' align='left'>Soory. You can add classified only once per hour.</td></tr></table>
    <?
    echo "<meta http-equiv='refresh' content=3;URL='http://$siteurl_class/index.php?cat=$cat_id'>";
    showlinksfooter();
    exit;
    }

    if ($country =="USA" AND $state==""){echo "<table width='620' border='0' cellspacing='0' class='small'><tr><td>Please chose state.</td></tr></table>";showlinksfooter();exit;}
    if ($country !=="USA" AND $state!==""){$country=$country;$state="";}

    $today = time();
    $expires = $today +$nodays*84600;
    $rime1 = "INSERT into classified VALUES ('NULL','$cat_id','$link_name','$link_desc','$price','$personal_name','$address','$telephone','$result_email','$country','$state','$city','$today','$expires','$web_page','$picture','yes','$result_gold','0')";
    $rime=$rime;
    $result = mysql_query($rime1);
    if (!$result)
    {
    ?>
    <table width='620' border='0' cellspacing='0'><tr><td class='small' align='left'>Something is wrong!!!</td></tr></table>
    <?
    showlinksfooter();
    exit;
    }
    else
    {
    ?>
    <table width='620' border='0' cellspacing='0'><tr><td class='small' align='left'>Thank you</td></tr></table>
    <?
    }
    showlinksfooter();
    echo "<meta http-equiv='refresh' content=0;URL='http://$siteurl_class/index.php?cat=$cat_id'>";
    exit;
    }






    if ($action=="show")
    {
    $sitenames = "$sitename :: Show";
    include('header.inc.php');
    showlinksheader();
    $today = time();
    $rime = mysql_query("SELECT COUNT(*) FROM classified WHERE email='$email' AND expires>$today") or die(mysql_error());
    $emailresult = mysql_result($rime,0,0);
    if ($emailresult <=1){$hepa="";}else{$hepa="<img src='./images/new.gif'>&nbsp;<a href=http://$siteurl_class/$PHP_SELF?action=showall&email=$email>Click here to view the $emailresult other ads!</a>";}

    $rime = mysql_query("SELECT * FROM classified WHERE link_id='$link_id'") or die(mysql_error());
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $expires = date("M-d-Y",$expires);
    $add_date = date("M-d-Y",$add_date);
    $rime22 = mysql_query("SELECT *,lcat_name as hepa from classified_category WHERE lcat_id='$cat_id'") or die(mysql_error());
    $name = mysql_result($rime22,0,hepa);

    if(!$web_page){$page="WEB PAGE";}else{$page="<a href='$web_page' target='_blank'>WEB PAGE</a>";}
    if(!$picture){$page1="PHOTO";}else{$page1="<a href='$picture' target='_blank'>PHOTO</a>";}

    $telephone = preg_match("/([0-9]{1,3})([0-9]{1,3})([0-9]{1,6})?/i", $telephone, $matches);
    $telephone = "$matches[1] $matches[2] $matches[3]";

    ?>
    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=400><a href='index.php'>CLASSIFIEDS</a> :: <b><a href='index.php?cat=<? echo $cat_id;?>'><? echo $name;?></a></b></td><td align='right'><a href='index.php?action=add&cat_id=<? echo $cat_id;?>'>place ads</a></td></tr></table>
    <table><tr><td height='5'></td></tr></table>
    <table width='620' border='0' cellspacing='0' bgcolor='#000000'><tr><td>
    <table width='620' border='0' cellspacing='4' class='small' bgcolor='#66ccff'>
    <tr><td width=420><b><? echo $link_name;?></b></td><td align='right'>Expires : <? echo $expires;?></td></tr></table>
    <table width='620' border='0' cellspacing='3' class='small' bgcolor='#ffffff'>
    <tr bgcolor='#fffcf2'><td width=100 valign=top>Description</td><td width='500'><? echo $link_desc;?></td></tr>
    <tr bgcolor='#ebebeb'><td width=100 valign=top>Posted On</td><td width='500'><? echo $add_date;?></td></tr>
    <tr bgcolor='#fffcf2'><td width=100 valign=top>Location</td><td width='500'><? echo "$city, $state $country";?>&nbsp;&nbsp;&nbsp;<? echo $address;?></td></tr>
    <tr bgcolor='#ebebeb'><td width=100 valign=top>Contact</td><td width='500'><a href='mailto? echo $email;?>?subject=<? echo $sitename;?>::Classified'><? echo $email;?></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tel (<? echo $telephone;?>)&nbsp;&nbsp;&nbsp;<? echo $personal_name;?></td></tr>
    <tr bgcolor='#fffcf2'><td width=100 valign=top>Details</td><td width='500'><? echo $page;?>&nbsp;&nbsp;&nbsp;<? echo $page1;?></td></tr>
    <tr bgcolor='#ebebeb'><td width=100 valign=top>Price</td><td width='500'><? echo $price;?></td></tr>
    <tr bgcolor='#fffcf2'><td width=100 valign=top>Manage Ad</td><td width='500'><a href='http://<? echo $siteurl_class;?>/<? echo $PHP_SELF;?>?action=edit&link_id=<? echo $link_id;?>&email=<? echo $email;?>'>EDIT AD</a>&nbsp;&nbsp;<a href='http://<? echo $siteurl_class;?>/<? echo $PHP_SELF;?>?action=deleteads&link_id=<? echo $link_id;?>&email=<? echo $email;?>'>DELETE AD</a>&nbsp;&nbsp;&nbsp;</td></tr>
    </table>
    </td></tr></table>
    <table width='620' border='0' cellspacing='2' class='text8' bgcolor='#ffffff'>
    <tr><td align='left'>viewed <b><? echo $hits; ?></b> times</td><td align='right'><? echo $hepa;?></td></tr></table>
    <table><tr><td height='10'></td></tr></table>
    <table width='620' border='0' cellspacing='0' bgcolor='#000000'><tr><td>
    <table width='620' border='0' cellspacing='2' class='text8' bgcolor='#ebebeb'>
    <tr><td><? echo $sitename;?> gives no warranties, conditions, guarantees or representations, express or implied, as to the completeness or accuracy of the advice and information contained in this classified ad or the content of this advertisement including but not limited to the ownership, quality, compliance with description or fitness for purpose of any such items.
    </td></tr></table></td></tr></table>
    <?
    }
    $rime= mysql_query("SELECT hits as hepa FROM classified WHERE link_id = '$link_id'")
    or die(mysql_error());
    $result = mysql_result($rime,0,hepa);
    $hits=$result+1;
    $rime2 = @mysql_query("UPDATE classified SET hits = '$hits' WHERE link_id = '$link_id'");
    showlinksfooter();
    exit;
    }





    if ($action=="deleteads")
    {
    $sitenames = "$sitename :: Delete Ads";
    include('header.inc.php');
    showlinksheader();
    ?>
    <table width='600' border='0' cellspacing='0' class='small'><tr><td width='100' align='left'></td><td>To delete ads you have to know secretname.<br>Forgot secretname? No problem - <a href='register.php?action=forgotpassword'>Click here</a></td></tr></table>
    <form action='index.php?action=addelete' method ='POST'>
    <table width='600' border='0' cellspacing='0' class='small'>
    <tr><td width='100'>Secretname /td><td><input type='password' name='secret_name' size='25' maxlength='15' value='' class='button' onChange="this.value=ignoreSpaces(this.value);"></td></tr>
    <input type='hidden' name='id' value='<? echo $link_id;?>'>
    <input type='hidden' name='secret_email' value='<? echo $email;?>'>
    <tr><td></td><td><input type='submit' value='submit' class='button'></td></tr>
    </table></form>
    <?
    showlinksfooter();
    exit;
    }





    if ($action=="addelete")
    {
    $sitenames = "$sitename :: Ads Deleted";
    include('header.inc.php');
    showlinksheader();
    dbConnect();
    $rime = mysql_query("SELECT * from members WHERE secret_name='$secret_name' AND email='$secret_email'") or die(mysql_error());
    $result = mysql_num_rows($rime);
    if ($result<1)
    {
    echo "<table width='620' border='0' cellspacing='0' class='small'><tr><td>Something is wrong!</td></tr></table>";
    showlinksfooter();
    exit;
    }

    $rime = mysql_query("SELECT *,link_name as hepa FROM classified WHERE link_id = '$id'")
    or die(mysql_error());
    $link_name = mysql_result($rime,0,hepa);
    $result = mysql_num_rows($rime);
    if ($result<1)
    {
    echo "<table width='600' border='0' cellspacing='0'><tr><td class='small' align='left'>Something is wrong<br><br></td></tr></table>";
    showlinksfooter();
    exit;
    }
    else
    $rime = mysql_query("DELETE FROM classified WHERE link_id = '$id'")
    or die(mysql_error());
    echo "<table width='600' border='0' cellspacing='0'><tr><td class='small' align='left'>Link <b>$link_name</b> is deleted.<br><br></td></tr></table>";
    showlinksfooter();
    exit;
    }





    if ($action=="showall")
    {
    $sitenames = "$sitename :: Show All";
    include('header.inc.php');
    showlinksheader();
    ?>
    <table width='620' border='0' cellspacing='2' class='midd' bgcolor='#ffffff'>
    <tr><td>ALL ADS FROM USER :: <b><? echo $email;?></b><td align='right' class='small'><a href='index.php'>CLASSIFIEDS</a></td></td></tr></table>
    <hr size=1 noshade width=620>
    <?
    $today = time();
    $rime = mysql_query("SELECT * FROM classified WHERE email='$email' AND expires>$today ORDER BY add_date DESC") or die(mysql_error());
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $date = date("M-d-Y",$add_date);
    echo "<table width=620 class=small bgcolor='#dde2f9'><tr><td width=430><a href='http://$siteurl_class/$PHP_SELF?action=show&link_id=$link_id&email=$email'><b>$link_name</b></a></td><td width=70 class=text8 align='right'>$date</td><td width=100 class=text8 align='right'>$state $country</td></tr></table>";
    echo "<table width=620 cellspacing='1'><tr><td></td></tr></table>";
    }
    showlinksfooter();
    exit;
    }



    if ($action=="edit")
    {
    $sitenames = "$sitename :: User Edit Ad";
    include('header.inc.php');
    showlinksheader();
    ?>
    <table width='620' border='0' cellspacing='0' class='small'><tr><td width='100' align='left'></td><td>To edit ads you have to login.<br>Forgot password? No problem - <a href='register.php?action=forgotpassword'>Click here</a></td></tr></table>
    <form action='index.php?action=editadd' method ='POST'>
    <table width='620' border='0' cellspacing='0' class='small'>
    <tr><td width='100'>User Name /td><td><input type='text' name='user_name' size='30' maxlength='12' value='' class='button' onChange="this.value=ignoreSpaces(this.value);"></td></tr>
    <tr><td width='100'>Password /td><td><input type='password' name='password' size='30' maxlength='12' value='' class='button' onChange="this.value=ignoreSpaces(this.value);"></td></tr>
    <input type='hidden' name='link_id' value='<? echo $link_id;?>'>
    <input type='hidden' name='val_email' value='<? echo $email;?>'>
    <tr><td></td><td><input type='submit' value='submit' class='button'></td></tr>
    </table></form>
    <?
    showlinksfooter();
    exit;
    }









    if ($action=="editadd")
    {
    $sitenames = "$sitename :: User Edit Ad";
    include('header.inc.php');
    showlinksheader();
    $rime = mysql_query("SELECT * from members WHERE member_name='$user_name' AND member_password='$password' AND email='$val_email'") or die(mysql_error());
    $result = mysql_num_rows($rime);
    if ($result<1)
    {
    ?>
    <table width='620' border='0' cellspacing='0' class='small'><tr><td>Something is wrong!</td></tr></table>
    <?
    showlinksfooter();
    exit;
    }
    else
    $rime = mysql_query("SELECT * FROM classified WHERE link_id='$link_id'") or die(mysql_error());
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $expires = date("M-d-Y",$expires);
    $rime22 = mysql_query("SELECT *,lcat_name as hepa from classified_category WHERE lcat_id='$cat_id'") or die(mysql_error());
    $name = mysql_result($rime22,0,hepa);
    ?>
    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=400><a href='index.php'>CLASSIFIEDS</a> :: <b><a href='index.php?cat=<? echo $cat_id;?>'><? echo $name;?></a></b></td><td align='right'><a href='index.php?action=add&cat_id=<? echo $cat_id;?>'>place ads</a></td></tr></table>
    <table><tr><td height='5'></td></tr></table>

    <table width='620' border='0' cellspacing='2' class='small' bgcolor='#66ccff'>
    <tr><td width=400><b><? echo $link_name;?></b></td><td align='right'>Expires : <? echo $expires;?></td></tr></table>

    <form action='index.php?action=adsupdate' method ='POST'>
    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Name </td><td width='200'><input type='text' name='personal_name' size='25' maxlength='30' value='<? echo $personal_name;?>' class='button'>&nbsp;*</td><td width=96 valign=top>Country </td><td width='200'>
    <select name='country' class='button'><option><? echo $country;?>
    <OPTION>Antigua <OPTION>Argentina <OPTION>Armenia <OPTION>Australia <OPTION>Austria <OPTION>Bahamas <OPTION>Barbados <OPTION>Belarus <OPTION>Belgium <OPTION>Belize <OPTION>Bermuda <OPTION>Bolivia <OPTION>Bosnia & Herzegovina <OPTION>Brazil <OPTION>Bulgaria <OPTION>Canada <OPTION>Cayman Islands <OPTION>Chile <OPTION>China <OPTION>Colombia <OPTION>Croatia <OPTION>Cyprus <OPTION>Czech Republic <OPTION>Denmark <OPTION>Dominican Republic <OPTION>Egypt <OPTION>Estonia <OPTION>Finland <OPTION>France <OPTION>Germany <OPTION>Greece <OPTION>Greenland <OPTION>Grenada <OPTION>Guatemala <OPTION>Guyana <OPTION>Holland <OPTION>Hong Kong <OPTION>Iceland <OPTION>India <OPTION>Indonesia <OPTION>Ireland <OPTION>Israel <OPTION>Italy <OPTION>Ivory Coast <OPTION>Jamaica <OPTION>Japan <OPTION>Jordan <OPTION>Kamchatka <OPTION>Kaunas <OPTION>Kazakhstan <OPTION>Korea <OPTION>Kuwait <OPTION>Latvia <OPTION>Lebanon <OPTION>Lithuania <OPTION>Macedonia <OPTION>Malaysia <OPTION>Malta <OPTION>Mexico <OPTION>Moldova <OPTION>Netherland Antilles <OPTION>Netherlands <OPTION>New Zealand <OPTION>Norway <OPTION>Oman <OPTION>Pakistan <OPTION>Panama <OPTION>Paraguay <OPTION>Peru <OPTION>Philippines <OPTION>Poland <OPTION>Portugal <OPTION>Romania <OPTION>Russia <OPTION>Saudi Arabia <OPTION>Scotland <OPTION>Senegal <OPTION>Serbia & MonteNegro <OPTION>Singapore <OPTION>Slovakia <OPTION>Slovenia <OPTION>South Africa <OPTION>Spain <OPTION>St Lucia <OPTION>Sweden <OPTION>Switzerland <OPTION>Syria <OPTION>Taiwan <OPTION>Tatarstan <OPTION>Trinidad <OPTION>Turkey <OPTION>Ukraine <OPTION>United Arab Emirates <OPTION>United Kingdom <OPTION>USA <OPTION>Uruguay <OPTION>Venezuela <OPTION>Vietnam
    </select>&nbsp;*
    </td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>City </td><td width='200'><input type='text' name='city' size='25' maxlength='30' value='<? echo $city;?>' class='button'>&nbsp;*</td><td width=96 valign=top>State </td><td width='200'>
    <select name='state' class='button'>
    <option><? echo $state;?><option>Alabama<option>Alaska<option>Arizona<option>Arkansas<option>California<option>Colorado<option>Connecticut<option>Delaware<option>Florida<option>Georgia<option>Hawaii<option>Idaho<option>Illinois<option>Indiana<option>Iowa<option>Kansas<option>Kentucky<option>Louisiana<option>Maine<option>Maryland<option>Massachusetts<option>Michigan<option>Minnesota<option>Mississippi<option>Missouri<option>Montana<option>Nebraska<option>Nevada<option>New Hampshire<option>New Jersey<option>New Mexico<option>New York<option>North Carolina<option>North Dakota<option>Ohio<option>Oklahoma<option>Oregon<option>Pennsylvania<OPTION>Puerto Rico<option>Rhode Island<option>South Carolina<option>South Dakota<option>Tennessee<option>Texas<option>Utah<option>Vermont<option>Virginia<option>Washington<option>Washington D.C.<option>West Virginia<option>Wisconsin<option>Wyoming</select>&nbsp;*
    </td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Address</td><td width='200'><input type='text' name='address' size='25' maxlength='30' value='<? echo $address;?>' class='button'></td><td width=94 valign=top>Telephone</td><td width='200'><input type='text' name='telephone' size='25' maxlength='30' value='<? echo $telephone;?>' class='button'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Ad Title</td><td width=500><input type='text' name='link_name' size='74' maxlength='60' value='<? echo $link_name;?>' class='button' onChange="remove_XS_whitespace(link_name);link_name.select();return false">&nbsp;*<br><font class=text8>(ad has to be 20-60 characters)</td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Content </td><td width=500 valign=top><textarea name='link_desc' rows='6' cols='56' class='button' onChange="remove_XS_whitespace(link_desc);link_desc.select();return false"><? echo $link_desc;?></textarea><font class=text8>&nbsp;*<br>(limit is 1000 characters)</td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Web Page</td><td width=500><input type='text' name='web_page' size='75' maxlength='150' value='<? echo $web_page;?>' class='button'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Link To Photo</td><td width=500><input type='text' name='picture' size='75' maxlength='150' value='<? echo $picture;?>' class='button'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top>Price</td><td width=500><input type='text' name='price' size='20' maxlength='12' value='<? echo $price;?>' class='button'></td></tr></table>

    <table><tr><td height='4'></td></tr></table>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top><font color='red'>Secret Name</font> /td><td width=500><input type='password' name='secret_name' size='20' maxlength='20' value='' class='button'>&nbsp;&nbsp;&nbsp;&nbsp;Forgot secret name? - <a href='register.php?action=forgotpassword' target='_blank'>Click here</a></td></tr></table>

    <input type='hidden' name='link_id' value='<? echo $link_id;?>'>
    <input type='hidden' name='secret_email' value='<? echo $email;?>'>

    <table width='620' border='0' cellspacing='0' class='small' bgcolor='#ffffff'>
    <tr><td width=96 valign=top></td><td width=500 class='small'><input type="submit" value="update ad" class='button'></td></tr></table>
    </form>
    <?
    }
    showlinksfooter();
    exit;
    }



    if ($action=="adsupdate")
    {
    $sitenames = "$sitename :: Ads Updated";
    include('header.inc.php');
    showlinksheader();
    dbConnect();

    $link_name = strip_tags($link_name);
    $link_desc = strip_tags($link_desc);
    $price = strip_tags($price);
    $personal_name = strip_tags($personal_name);
    $address = strip_tags($address);
    $telephone = strip_tags($telephone);
    $city = strip_tags($city);
    $web_page = strip_tags($web_page);
    $picture = strip_tags($picture);

    $rime = mysql_query("SELECT * from members WHERE secret_name='$secret_name' AND email='$secret_email'") or die(mysql_error());
    $result = mysql_num_rows($rime);
    if ($result<1)
    {
    echo "<table width='620' border='0' cellspacing='0' class='small'><tr><td>Something is wrong!</td></tr></table>";
    showlinksfooter();
    exit;
    }

    if ($country =="USA" AND $state==""){echo "<table width='620' border='0' cellspacing='0' class='small'><tr><td>Please chose state.</td></tr></table>";showlinksfooter();exit;}
    if ($country !=="USA" AND $state!==""){$country=$country;$state="";}

    $rime = "UPDATE classified SET
    link_name = '$link_name',
    link_desc = '$link_desc',
    price = '$price',
    personal_name = '$personal_name',
    address = '$address',
    telephone = '$telephone',
    country = '$country',
    state = '$state',
    city = '$city',
    web_page = '$web_page',
    picture = '$picture'
    WHERE link_id=$link_id";
    $result = mysql_query($rime);
    if($result)
    {
    echo "<table width='620' border='0' cellspacing='0' class='small'><tr><td>You updated successfully!!!</td></tr></table>";
    }
    else
    {
    echo "<table width='620' border='0' cellspacing='0' class='small'><tr><td>No updated. Something is wrong!</td></tr></table>";
    }
    showlinksfooter();
    exit;
    }





    if ($cat)
    {
    dbConnect();
    $rime22 = mysql_query("SELECT * from classified_category WHERE lcat_id='$cat'") or die(mysql_error());
    $row = mysql_fetch_array($rime22);
    $name = $row["lcat_name"];
    $sitenames = "$sitename :: $name";
    include('header.inc.php');
    showlinksheader();

    $limit = $nolinks;
    $offset = ($offset) ? $offset : 0;
    $query = "&cat=".urlencode($cat);
    dbConnect();
    $rime1 = mysql_query("SELECT COUNT(*) from classified WHERE link_val LIKE 'yes' AND cat_id LIKE '$cat'") or die(mysql_error());
    $totalnum = mysql_result($rime1, 0, 0);
    $rime2 = mysql_query("SELECT * from classified_category WHERE lcat_id='$cat'") or die(mysql_error());
    while($row = mysql_fetch_array($rime2)) {
    extract($row);
    $id = $row["lcat_id"];
    $name = $row["lcat_name"];
    $sub_cat = $row["sub_cat"];
    $navigator = "<font color=black><b>" .$name ."</b></font>" . "" ;

    while ($sub_cat > 0) {
    $rime2 = mysql_query("SELECT * from classified_category WHERE lcat_id='$sub_cat'") or die(mysql_error());
    $row = mysql_fetch_array($rime2);
    $id = $row["lcat_id"];
    $name = $row["lcat_name"];
    $sub_cat = $row["sub_cat"];
    $linnk = "<a href='$PHP_SELF?cat=$id'>$name</a> >";
    $linnk1 = "$name";
    $navigator = $linnk . " " .$navigator;
    }

    echo "<table width=620 class='small'><tr><td><a href='$PHP_SELF'>CLASSIFIEDS</a> :: $navigator </td><td align='right' class='small'><a href='index.php?action=add&cat_id=$cat'>place ads</a></td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='2'></td></tr></table>";

    $hepa = "<table width=620><tr><td><font class='small'>$cat_desc</font></td></tr></table><table width=620><tr><td><img src='dot.gif' width='620' height='1'></td></tr></table>";

    if($showdescription==0 && $cat_desc!==""){echo "$hepa";}

    $rime = mysql_query("SELECT * FROM classified_category WHERE sub_cat='$lcat_id'") or die(mysql_error());
    $numrows = mysql_num_rows($rime);
    if ($numrows != 'NULL') {
    echo "<table width='620' border='0'><tr>";
    $nocol=1;
    while ($i < $numrows) {
    $row = mysql_fetch_array($rime);
    $ida = $row["lcat_id"];
    $name = $row["lcat_name"];
    $sub_cat = $row["sub_cat"];
    $cat_icon = $row["cat_icon"];
    $rime7 = mysql_query("SELECT * FROM classified WHERE cat_id='$ida'") or die(mysql_error());
    $numrows7 = mysql_num_rows($rime7);
    $shownumber = "1";
    If ($shownumber == $shownumlinks){$shownum = "<font class='text7'>($numrows7)</font>";}
    $widthcol = 100/$nosubcat;
    if ($nocol==$nosubcat) {
    echo "<td width='$widthcol%' valign='top' class='small'>";
    echo "<img src='./images/icon.gif' width='14' align=left hspace=1 vspace=1 border=0>&nbsp;<a href='$PHP_SELF?cat=$ida'>$name</a> $shownum ";
    echo "</td></tr><tr>";
    $i++;
    $nocol=1;
    }
    else
    {
    echo "<td width='$widthcol%' valign='top' class='small'>";
    echo "<img src='./images/icon.gif' width='14' align=left hspace=1 vspace=1 border=0>&nbsp;<a href='$PHP_SELF?cat=$ida'>$name</a> $shownum";
    echo "</td>";
    $nocol++;
    $i++;
    }
    }
    echo "</tr></table>";
    echo "<table width=620><tr><td><img src='dot.gif' width='620' height='1'></td></tr></table>";
    }
    }
    $today = time();
    $rime = mysql_query("SELECT * from classified WHERE link_val like 'yes' AND cat_id LIKE '$cat' AND expires>$today ORDER BY add_date DESC LIMIT $offset, $limit") or die(mysql_error());
    while($row = mysql_fetch_array($rime)) {
    extract($row);
    $expires = date("M-d-Y",$expires);
    $date = date("M-d-Y",$add_date);
    echo "<table width=620 class=small bgcolor='#dde2f9'><tr><td width=430><a href='http://$siteurl_class/$PHP_SELF?action=show&link_id=$link_id&email=$email'><b>$link_name</b></a></td><td width=70 class=text8 align='right'>$date</td><td width=100 class=text8 align='right'>$state $country</td></tr></table>";
    echo "<table width=620 cellspacing='1'><tr><td></td></tr></table>";

    }
    echo "<table width=620><tr><td><img src='dot.gif' width='620' height='1'></td></tr></table>";
    ShowNav($totalnum, $query, $offset, $limit);
    showlinksfooter();
    exit;
    }


    function ShowNav($totalnum, $query, $offset, $limit) {
    global $PHP_SELF;
    if ($totalnum > $limit) {
    $pages = intval($totalnum/$limit);
    if ($totalnum%$limit) $pages++;
    if (($offset + $limit) > $totalnum) {
    $lastnum = $totalnum;
    }
    else {
    $lastnum = ($offset + $limit);
    }
    ?>
    </center><table cellpadding='1' cellspacing='1'><tr><td class="small">&nbsp;&nbsp;Page </td>
    <?
    for ($i=1; $i <= $pages; $i++) {
    $newoffset=$limit*($i-1);
    if ($newoffset != $offset) {
    ?>
    <td class="text9"><a href="<? echo $PHP_SELF ?>?<?=$query?>&offset=<?=$newoffset?>"><?=$i?></a></td>
    <?
    }
    else {
    ?>
    <td class="text9"><font color='red'><?=$i?></font></td>
    <?
    }
    }
    ?>
    </tr></table>
    <?
    echo "</td></tr></table>";
    }
    return;
    }
    echo ""
    ?>

  2. #2
    <? james('rules'); ?>
    Join Date
    Jun 2004
    Location
    Wales, UK
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, where the hell is line 75? Point it out for us using PHP syntax hightlighting.
    At a guess its:
    PHP Code:
    <input type='submit' value='search' class='button'ONCLICK="remove_XS_whitespace(search);mystring.select();return false" style='font-size: 9pt; padding: 0'></td></tr><tr><td></td><td><font class='text8'>* Note Last word must contain at least 3 characters.</font></td></tr></table></form
    Hmm looking at it, you havent defined it as a function or something?

    On your very last line:
    PHP Code:
    echo "" 
    Dont know what this is doing? but its missing a ; at the end of it.
    If knowledge is power - Why isn't our army librarians?!
    Statistics show that 63% of all statistics are fake.
    When i was little i broke my neck, and i havent looked back since .
    I completed the internet in 1 week. The end boss was pretty easy though .

  3. #3
    SitePoint Zealot pannick's Avatar
    Join Date
    Aug 2003
    Location
    Florida
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that it has to do with this
    <BODY TOPMARGIN="10" MARGINHEIGHT="0" LEFTMARGIN="5" MARGINWIDTH="0" BGCOLOR="#ffffff" text="#000000" alink="#000000" link="#000000" vlink="#000000" onLoad="mystring.select()">

  4. #4
    <? james('rules'); ?>
    Join Date
    Jun 2004
    Location
    Wales, UK
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If thats line 75 then yeah it is.

    Have you defined mystring() as a function
    Code:
    function mystring ();
    for example..
    If knowledge is power - Why isn't our army librarians?!
    Statistics show that 63% of all statistics are fake.
    When i was little i broke my neck, and i havent looked back since .
    I completed the internet in 1 week. The end boss was pretty easy though .

  5. #5
    SitePoint Zealot pannick's Avatar
    Join Date
    Aug 2003
    Location
    Florida
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't, like I said this is a prewritten script. So trying to figure it out.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •