Location: PHPKode > projects > Pointter PHP CMS > pointtercms_package/pointtercms_package/pointtercms/includes/newestitems.php
<?php 

/***************************************************************************
 * Product Name			: Pointter PHP Content Management System
 * Version 			: V 1.2
 * Release Date			: 01/02/11
 * Copyright			: (C) 2011 PangramSoft / Murat Cevik
 * Program URL			: http://www.pointter.com
 * Company URL			: http://www.pangramsoft.com
 * Email Address                : hide@address.com
 
 ***************************************************************************/
 

/****************************************************************************

Pointter PHP Content Management System is licensed under Creative Commons Attribution Non-commercial No Derivatives 3.0 Unported (by-nc-nd) License.
To view a copy of this license, (a) visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or (b) send a letter to Creative Commons, 171 2nd Street, 
Suite 300, San Francisco, California, 94105, USA.” 

You must not remove/modify/alter the copyright informations both visible and invisible forms in the source code and you must not remove/modify/alter 
the copyright informations in the footer part of the script including the Pointter image (png format file), hard link and title tag.

Please contact the copyright holder PangramSoft / Murat Cevik for a commercial license to remove the copyright information in the footer part of the script.


*****************************************************************************/

if ($n_onoff==1)
{

include 'configset/conn.php';

$new_data=mysql_query("SELECT * FROM Products ORDER BY ProductID DESC Limit 0,10");
$new_num=mysql_num_rows($new_data);

$z=0;

while ($row_new=mysql_fetch_array($new_data))

     {
      $image[$z]=$row_new[Image];
      $url[$z]=$row_new[Url];
      $name[$z]=$row_new[ProductName];
      $z++;
     }

echo '<table cellpadding="10" style="background-image:url(pixel_3.png);width:210px;" align="center" cellspacing="0"><tr><td style="background-image:url(pixel_1.png);" class="header" align="left"><b>'.$n_name.'</b></td></tr>';
echo '<tr><td align="center">';


?>

<script type="text/javascript">

function slide()
{
document.getElementById("slide").src="images/<?php echo $image[0]; ?>";
document.getElementById("slideurl").href="<?php echo $url[0]; ?>";
document.getElementById("slideurl").title="<?php echo $name[0]; ?>";
setTimeout("slide_1()",5000);
}

function slide_1()
{
document.getElementById("slide").src="images/<?php echo $image[1]; ?>";
document.getElementById("slideurl").href="<?php echo $url[1]; ?>";
document.getElementById("slideurl").title="<?php echo $name[1]; ?>";
setTimeout("slide_2()",5000);
}

function slide_2()
{
document.getElementById("slide").src="images/<?php echo $image[2]; ?>";
document.getElementById("slideurl").href="<?php echo $url[2]; ?>";
document.getElementById("slideurl").title="<?php echo $name[2]; ?>";
setTimeout("slide_3()",5000);
}

function slide_3()
{
document.getElementById("slide").src="images/<?php echo $image[3]; ?>";
document.getElementById("slideurl").href="<?php echo $url[3]; ?>";
document.getElementById("slideurl").title="<?php echo $name[3]; ?>";
setTimeout("slide_4()",5000);
}

function slide_4()
{
document.getElementById("slide").src="images/<?php echo $image[4]; ?>";
document.getElementById("slideurl").href="<?php echo $url[4]; ?>";
document.getElementById("slideurl").title="<?php echo $name[4]; ?>";
setTimeout("slide_5()",5000);
}

function slide_5()
{
document.getElementById("slide").src="images/<?php echo $image[5]; ?>";
document.getElementById("slideurl").href="<?php echo $url[5]; ?>";
document.getElementById("slideurl").title="<?php echo $name[5]; ?>";
setTimeout("slide_6()",5000);
}

function slide_6()
{
document.getElementById("slide").src="images/<?php echo $image[6]; ?>";
document.getElementById("slideurl").href="<?php echo $url[6]; ?>";
document.getElementById("slideurl").title="<?php echo $name[6]; ?>";
setTimeout("slide_7()",5000);
}

function slide_7()
{
document.getElementById("slide").src="images/<?php echo $image[7]; ?>";
document.getElementById("slideurl").href="<?php echo $url[7]; ?>";
document.getElementById("slideurl").title="<?php echo $name[7]; ?>";
setTimeout("slide_8()",5000);
}

function slide_8()
{
document.getElementById("slide").src="images/<?php echo $image[8]; ?>";
document.getElementById("slideurl").href="<?php echo $url[8]; ?>";
document.getElementById("slideurl").title="<?php echo $name[8]; ?>";
setTimeout("slide_9()",5000);
}

function slide_9()
{
document.getElementById("slide").src="images/<?php echo $image[9]; ?>";
document.getElementById("slideurl").href="<?php echo $url[9]; ?>";
document.getElementById("slideurl").title="<?php echo $name[9]; ?>";
setTimeout("slide()",5000);
}

</script>

<a href="<?php echo $url[0]; ?>" id="slideurl" title=""><img src="images/<?php echo $image[0]; ?>" id="slide" border="0" style="width:120px;height:120px;" alt="product image"/></a>

<?php

echo '</td></tr></table><br/><br/>';

mysql_close($connect);

}


?>
Return current item: Pointter PHP CMS