Location: PHPKode > scripts > PHP Classified script made easy > php-classified-script-made-easy/Files/print.php
<style type="text/css">
<!--
.style52 {font-size: 12px}
.style54 {
	font-size: 35px;
	color: #FFFFFF;
}
.style55 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {	font-size: 18px;
	font-weight: bold;
}
.style26 {font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; }
.style1 {
	font-size: 24px;
	font-family: Geneva, Arial, Helvetica, sans-serif;
}
-->
</style>
<script type="text/javascript">alert("You May Now Print This Page Using Your Browser!\n\nAfter Printing, Close This Window To Return.");</script>
<div class="style1">Classified Details</div>
<?PHP
            $id = $_GET['id'];
			$admin = $_GET['adminpreview'];
			if(isset($admin)){
			$preview = true;
			}
if(!isset($id)) {
echo "<meta http-equiv='refresh' content='0;url=index.php'>";
}
        include("inc/header.php");
		$id = strtoupper($id);
		$id = strip_tags($id);
		$id = trim ($id); 
		// Checking for classified ad that the user is trying to view, and making sure it's a validated ad, not awaiting approval.
		if($preview == true){
        $query  = "SELECT * FROM classifieds WHERE adid = '".$id."'";
		} else {
        $query  = "SELECT * FROM classifieds WHERE adid = '".$id."' AND authorized = '1'";		
		}
        $result3 = mysql_query($query) or die(mysql_query());
        $rows3 = mysql_num_rows($result3);
		// If it can't find the given ad in the Database
if($rows3 < 1) {
echo "<meta http-equiv='refresh' content='0;url=index.php'>";
} else {
if(isset($_GET['remove'])){
echo "<meta http-equiv='refresh' content='0;url=remove.php?id=".$id."'>";
}
?>
			  <?PHP

while($row = mysql_fetch_array($result3, MYSQL_ASSOC))
{
$id = $row['adid'];
    echo "
	 <table width='100%' border='0' cellspacing='0' cellpadding='0'>
					<tr>
                      <td width='65%' valign='top' style='padding-top:5px;padding:10px;'><table width='100%' border='0' cellspacing='4' cellpadding='0'>
                        <tr>
                          <td width='75%'><span class='style1'>".$row['title']."</span><br /></td>  <td rowspan='4' background='images/pricebg.gif' style='height:83;width:85;background-position:center;background-repeat:no-repeat;'><div align='center' class='style26 style54' style='color:#000000;'>$".$row['price']."</div></td></tr><tr>
 <td><span  class='style55'>Listed: ".$row['date']."</span></td></tr><tr/>
 <td><span  class='style55'>Contact Number: ".$row['number']."</span></td></tr><tr>
 <td><span  class='style55'>Email Address: <a href='contact.php?id=".$row['adid']."' class='style55' style='text-decoration:none;'>Contact This Seller</a></span></td></tr>
                      </table>
                        <div class='style55' style='border-bottom:1px solid #000;font-size:20px;'><br />
                          Description:</div>
                        <div style='padding-top:5px;'><span class='style55'>".$row['description']."</span></div>
                        <p class='style55'>
                        <div class='style55' style='border-bottom:1px solid #000;font-size:20px;'>Listing Details :</div>
                       <table width='100%' border='0' cellspacing='4' cellpadding='0' style='padding-top:5px;'>
  <tr>
    <td width='40%' style='padding-right:15px;'><div align='left'><span class='style55'>Title:</span></div></td>
    <td width='60%'><span class='style55'>".$row['title']."</span></td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'><span class='style55'>Price:</span></div></td>
    <td><span class='style55'>$".$row['price']."</span></td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'></div></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'><span class='style55'>Seller Name:</span></div></td>
    <td><span class='style55'>".$row['name']."</span></td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'><span class='style55'>Contact Number:</span></div></td>
    <td><span class='style55'>".$row['number']."</span></td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'><span class='style55'>Email Address:</span></div></td>
    <td><span class='style55'><a href='contact.php?id=".$row['adid']."' class='style55' style='text-decoration:none;'>Contact This Seller</a></span></td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'></div></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'><span class='style55'>Date Added:</span></div></td>
    <td><span class='style55'>".$row['date']." </span></td>
  </tr>
  <tr>
    <td style='padding-right:15px;'><div align='left'><span class='style55'>Ad Views:</span></div></td>
    <td><span class='style55'>".$row['views']."</span></td>
  </tr>
  
</table>
                      </td>
                      <td width='31%' valign='top' style='padding-top:15px;'><div align='center'><a href='".$row['picture']."' rel='lightbox' title='".$row['title']."' style='text-decoration:none;'>
                        <img src='".$row['picture']."' width='150' border='0' /><br />
                        <span class='style52'>Click To See Larger Image</span> </a><br/>
"; echo $block5; echo "				
						</div></td>
                    </tr>
                  </table>
	
	";
		$views = $row['views']+1;
	    $query2  = "UPDATE classifieds SET views = '$views' WHERE adid = '".$row['adid']."'";
        $result2 = mysql_query($query2);
		$contactlink = "contact.php?id=".$row['adid'];
	}
	}

			  ?>
Return current item: PHP Classified script made easy