PLEASE HELP! I am new to PHP and I am trying to insert a javascript slideshow into the center of a PHP generated page.
Here is the script, if ANYONE will help me I will GREATLY APPRECIATE IT!
I'm trying to get it to work at www.cbstphoto.com/webstore
<?php
/*
$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $
Copyright (c) 2004 CBSTPhoto.com
*/
define('TEXT_MAIN', ' ');
echo `', <SCRIPT type="text/javascript">
<!--
/
Script by FPMC at http://jsarchive.8m.com
Submitted to JavaScript Kit (http://javascriptkit.com)
For this and 400+ free scripts, visit http://javascriptkit.com
/
//set image paths
src = ["http://www.cbstphoto.com/slideshow/1.jpg", "http://www.cbstphoto.com/slideshow/2.jpg", "http://www.cbstphoto.com/slideshow/3.jpg", "http://www.cbstphoto.com/slideshow/4.jpg"]
//set corresponding urls
url = ["http://freewarejava.com", "http://javascriptkit.com", "http://dynamicdrive.com", "http://www.geocities.com"]
//set duration for each image
duration = 4;
//Please do not edit below
ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
}
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
setTimeout("switchAd()",duration*1000);
}
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)
switchAd();
}
//-->
</SCRIPT> ';
<?php
define('TABLE_HEADING_NEW_PRODUCTS', 'New For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Coming Soon');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'What\'s New?');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Product Name');
define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
define('TABLE_HEADING_QUANTITY', 'Quantity');
define('TABLE_HEADING_PRICE', 'Price');
define('TABLE_HEADING_WEIGHT', 'Weight');
define('TABLE_HEADING_BUY_NOW', 'Buy Now');
define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
define('TEXT_SHOW', '<b>Show:</b>');
define('TEXT_BUY', 'Buy 1 \'');
define('TEXT_NOW', '\' now');
define('TEXT_ALL_CATEGORIES', 'All Categories');
define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
define('HEADING_TITLE', 'What`s New?');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>