Jump to content

Archived

This topic is now archived and is closed to further replies.

bored-fix

need to change code

Recommended Posts

For the life of me I cannot figure this out.
Can someone help me isolate the code that calls up the mysql.
My problem is I just want it, not the header the body the footer and everything else to show up.
Every time I try a new error pops up.
Thankyou.

<?
require_once( ROOT_DIR ."/include/db.php");
require ROOT_DIR  . "/include/pager.class.php";
$title = $desc = "Myspace Sexy Dolls";

$onepage = 10;

$sql = "select * from ad WHERE style='468x60'";
$rs = $db->Execute( $sql );
$ad = $rs->fields['content'];

$sql = "SELECT count(*) AS max FROM sexy_dolls";
$rs = $db->Execute( $sql );
if ( $rs )
{
$total = $rs->fields['max'];
}



$p = new Page( $total, $onepage );
$p->perPage  = 500;
$p->paramStr = "/myspace-sexy-dolls/";
$p->trunStr = array( "First", "Prev", "Next", "Last" );


$sql = "SELECT * FROM sexy_dolls ORDER BY id DESC ".$p->limitStr();
$rs = $db->Execute( $sql );
?>


<table width="670" border="0" align="center" cellpadding="6" cellspacing="0">
      <tr>
        <td align="left" valign="top" class="mainbgwholeleft2">
         
          <div align="left">
            <h1>MySpace Graphics: Sexy Dolls</h1>
           
Use these graphics in comments, about me, bulletins, or anywhere you like.
<br />
          </div>
       
            <div align="center">
              <?
echo $ad;
?>
            </div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
while( $rs && !$rs->EOF ):
?>  
  <tr>
  <td valign="bottom">
  <div align="center">
  <a class="maintext" target="_blank" href="<?=HOMEPAGE?>viewimage/<?=HOMEPAGE?>userpics/myspace-sexy-dolls/<?=$rs->fields['path']?>"><img border="0" width="100" src="<?=HOMEPAGE?>userpics/myspace-sexy-dolls/<?=$rs->fields['path']?>" /><br>Click to view large and get MySpace Codes</a>
  </div><br /><br />
  </td>
<?
$rs->MoveNext();
if ( !$rs->EOF ):
?>
  <td valign="bottom">
  <div align="center"><a class="maintext" target="_blank" href="<?=HOMEPAGE?>viewimage/<?=HOMEPAGE?>userpics/myspace-sexy-dolls/<?=$rs->fields['path']?>"><img border="0" width="100" src="<?=HOMEPAGE?>userpics/myspace-sexy-dolls/<?=$rs->fields['path']?>" /><br>Click to view large and get MySpace Codes</a>
  </div><br /><br />
  </td>
  </tr>
<?
else:
?>
  <td valign="bottom">
  <div align="center">&nbsp;
  </div><br /><br />
  </td>
  </tr>
<?
endif;
$rs->MoveNext();
endwhile;
?>

</table>
            <br><div style="padding-bottom:15px; padding-top:15px; width: 660px" align="left">
<?echo $p->printPage();?>
</div>           
     
        </td>
      </tr>
    </table>

Share this post


Link to post
Share on other sites

$sql = "select * from ad WHERE style='468x60'";
$rs = $db->Execute( $sql );
$ad = $rs->fields['content'];

$sql = "SELECT count(*) AS max FROM sexy_dolls";
$rs = $db->Execute( $sql );

that is the code
however, it calls a class' methods
maybe one of these two files has the class that is being called in it

require_once( ROOT_DIR ."/include/db.php");
require ROOT_DIR  . "/include/pager.class.php";

Share this post


Link to post
Share on other sites

×

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.