Jump to content

claffin

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

claffin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. fixed it by creating the products.php to be set up like the index <head> <title>Cash Zone Products</title> </head> <body bgcolor="#000000" link="#000000" vlink="#000000" alink="#9F9F00"> <?php $page = 'productsmain.php'; // Default page $pages = array('productsmain', 'cards','collectables','dvds','electronics'); // Check if p is set if(isset($_GET['d'])) { // Check if the page in the url is in the defined array if(in_array($_GET['d'], $pages)) { $page = $_GET['d'].'.php'; } else { $page = 'productsmain.php'; } } ?> <center><table border="0" width="810" height="800" cellspacing="0" cellpadding="0" bgcolor="#FFFF99"> <tr> <td height="100" width="810" bgcolor="#000000" colspan="4"><?php include('../heading.php');?> </td> </tr> <tr> <td height="30" width="30" valign="top" background="../images/corner.png"> </td> <td height="30" width="750" valign="top" background="../images/links.png" colspan="2"><?php include('../topmenu.php');?></td> <td height="30" width="30" valign="top" background="../images/corner.png"> </td> </tr> <tr> <td height="100%" width="30" valign="top" background="../images/border.png"> </td> <td height="100%" width="150" valign="top"><?php include('../products/productcatergory.php');?></td> <td height="100%" width="600" valign="top"><?php include($page);?></td> <td height="100%" width="30" valign="top" background="../images/border.png"></td> </tr> <tr> <td height="30" width="30" background="../images/corner.png"> </td> <td height="30" width="750" background="../images/links.png" colspan="2"><?php include('../bottom.php');?></td> <td height="30" width="30" background="../images/corner.png"> </td> </tr> </table> for refrence
  2. been working in it all day and still cant figure it out im sure its something simple please help
  3. Go to http://cashzone.seitservices.com.au click on products you will notice a list of product categorys on the left and the products main page on the right when you click on one of the product catergorys on the left it opens up in the wrong manner What I would like it to do is if you click on cards it will open up the cards for sale on the right replacing the products main page. It currently does that but outside of the current layout
  4. need some help creating a product catalog website = http://cashzone.seitservices.com.au currently have it set up as follows index is setup using the following code <?php $page = 'main.php'; // Default page $pages = array('main', 'about','./products/products','contact','new'); // Check if p is set if(isset($_GET['p'])) { // Check if the page in the url is in the defined array if(in_array($_GET['p'], $pages)) { $page = $_GET['p'].'.php'; } else { $page = 'main.php'; } } ?> products has its own folder products.php is set up as follows <?php $page = 'productsmain.php'; // Default page $pages = array('productsmain', 'cards','collectables','dvds','electronics'); // Check if p is set if(isset($_GET['p'])) { // Check if the page in the url is in the defined array if(in_array($_GET['p'], $pages)) { $page = $_GET['p'].'.php'; } else { $page = 'productsmain.php'; } } ?> <table border="0" width="750" height="100%"> <tr> <td height="100%" width="150" valign="top"><?php include('productcatergory.php');?></td> <td height="100%" width="600" valign="top"><?php include($page);?></td> </tr> </table> productscatergory.php is set up as follows <a href="./products/products.php?p=cards"><b>Cards</a><br> <a href="./products/products.php?p=collectables"><b>Collectables</a><br> <a href="./products/products.php?p=dvds"><b>DVDs</a><br> <a href="./products/products.php?p=electronics"><b>Electronics</a><br> you ca see the results at http://cashzone.seitservices.com.au obviously i do not want a new page open for the products except I would like them to stay within the original site. I would like it to load in the productsmain section. If u require me to extend on my explanation please let me know
  5. how does this look <? require_once "config.php"; if($_REQUEST[auto] == "on") { $meta = "<meta http-equiv=\"refresh\" content=\"2;url=$PHP_SELF?image=$next_img&auto=on" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />"; $nav = "<a href=\"$PHP_SELF?image=$back_img&auto=on">Back</a> | <a href="$PHP_SELF?image=$image&auto=off">Stop Slideshow</a> | <a href="$PHP_SELF?image=$next_img&auto=on">Next</a>"; } if($_REQUEST[auto] == "off" || !$_REQUEST[auto]) { $meta = " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1" />"; $nav = "<a href=\"$PHP_SELF?image=$back_img&auto=off">Back</a> | <a href="$PHP_SELF?image=$image&auto=on">Start Slideshow</a> | <a href="$PHP_SELF?image=$next_img&auto=off">Next</a>"; } if(!$_REQUEST[image]) { //Default thumbnil page $i = 0; foreach($arr_img as $var_img) { //Grabs all the image names in th array if($var_img != "") { //Dont show first entery of the array that is blank echo<<<EOF <a href="$PHP_SELF?image=$i"><img src="../gallery/$var_img" /></a> EOF; } $i++; } } else { //Show the slides echo<<<EOF <div align="center"> <img src="./gallery/$arr_img[$image]" /><br /><br /> $nav </div> EOF; } ?>
  6. got rid of all the " and replaced with ' <? require_once 'config.php'; if($_REQUEST[auto] == 'on') { $meta = '<meta http-equiv='refresh' content='2;url=$PHP_SELF?image=$next_img&auto=on' /> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />'; $nav = '<a href='$PHP_SELF?image=$back_img&auto=on'>Back</a> | <a href='$PHP_SELF?image=$image&auto=off'>Stop Slideshow</a> | <a href='$PHP_SELF?image=$next_img&auto=on'>Next</a>"; } if($_REQUEST[auto] == 'off' || !$_REQUEST[auto]) { $meta = ' <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />'; $nav = '<a href='$PHP_SELF?image=$back_img&auto=off'>Back</a> | <a href='$PHP_SELF?image=$image&auto=on'>Start Slideshow</a> | <a href='$PHP_SELF?image=$next_img&auto=off'>Next</a>'; } if(!$_REQUEST[image]) { //Default thumbnil page $i = 0; foreach($arr_img as $var_img) { //Grabs all the image names in th array if($var_img != '') { //Dont show first entery of the array that is blank echo<<<EOF <a href='$PHP_SELF?image=$i'><img src='../gallery/$var_img' /></a> EOF; } $i++; } } else { //Show the slides echo<<<EOF <div align='center'> <img src='./gallery/$arr_img[$image]' /><br /><br /> $nav </div> EOF; } ?> no change still error in line 4
  7. Im trying to create a slideshow for my gallery i have the following code config.php <? $total = 4; //Total number of images in slideshow $var_total = 5; //Total number of images + 1 $arr_img = Array(); $handle = opendir('../gallery/'); while (false !== ($file = readdir($handle))) { if ($file != "." & & $file != "..") { $arr_img[] = $file; } } $i = 1; $next = 2; $back = 0; while($i <= $total){ if($back == 0) { $back_link = $total; } else { $back_link = $back; } if($next == $var_total) { $next_link = 1; } else { $next_link = $next; } if ($image == "$i") { $next_img = "$next_link"; $back_img = "$back_link"; } $i++; $next++; $back++; }?> and in gallery.php I have <? require_once "config.php"; if($_REQUEST[auto] == "on") { $meta = "<meta http-equiv="refresh" content="2;url=$PHP_SELF?image=$next_img&auto=on" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />"; $nav = "<a href="$PHP_SELF?image=$back_img&auto=on">Back</a> | <a href="$PHP_SELF?image=$image&auto=off">Stop Slideshow</a> | <a href="$PHP_SELF?image=$next_img&auto=on">Next</a>"; } if($_REQUEST[auto] == "off" || !$_REQUEST[auto]) { $meta = " <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />"; $nav = "<a href="$PHP_SELF?image=$back_img&auto=off">Back</a> | <a href="$PHP_SELF?image=$image&auto=on">Start Slideshow</a> | <a href="$PHP_SELF?image=$next_img&auto=off">Next</a>"; } if(!$_REQUEST[image]) { //Default thumbnil page $i = 0; foreach($arr_img as $var_img) { //Grabs all the image names in th array if($var_img != "") { //Dont show first entery of the array that is blank echo<<<EOF <a href="$PHP_SELF?image=$i"><img src="../gallery/$var_img" /></a> EOF; } $i++; } } else { //Show the slides echo<<<EOF <div align="center"> <img src="./gallery/$arr_img[$image]" /><br /><br /> $nav </div> EOF; } ?> I found this code online as I am unsure of how to do a slideshow the results can be found at http://handweaving.seitservices.com.au/index.php?p=gallery
  8. marvelous thanks for the help I shall never forget it again lol.
  9. Ok i have put the following code in index.php <head> <title>test</title> </head> <body> <?php $page = 'main.php'; // Default page $pages = array('main', 'about','products','gallery','contact'); // Check if p is set if(isset($_GET['p'])) { // Check if the page in the url is in the defined array if(in_array($_GET['p'])) { $page = $_GET['p'].'.php'; } else { $page = 'main.php'; } } ?> <table border="1" width="100%" height="0"> <tr> <td height="120" width="100%" colspan="2"><?php include('heading.php');?> </td> </tr> <tr> <td height="0" width="20%"><?php include('leftmenu.php');?> </td> <td height="0" width="80%"><?php include($page);?> </td> </tr> <tr> <td height="50" width="100%" colspan="2"><?php include('bottom.php');?> </td> </tr> </table> </body> and in leftmenu.php <a href="../index.php?p=main">Home</a><p> <a href="../index.php?p=about">About Us</a><p> <a href="../index.php?p=products">Products</a><p> <a href="../index.php?p=gallery">Gallery</a><p> <a href="../index.php?p=contact">Contact Us</a><p> you can see results at http://handweaving.seitservices.com.au/
  10. another way to explain it would be When clicking the links on the navbar i would like the corresponding page to open up in the main section.
  11. Hey, I feel a bit stupid asking this question but i've drawn a blank im using the include function to make a website having heading/nav/footer but I cannot for the life of me remember the code thats needed to open the links in the nav bar in the main section i remember doing it years ago but just cant seem to remember now. http://handweaving.seitservices.com.au/index3.php is the site im testing it on. I know the main.php isnt suppose be that just cant remember what it is suppose to be. Here is what I have. <table border="1" width="100%" height="0"> <tr> <td height="120" width="100%" colspan="2"><?php include('heading.php');?> </td> </tr> <tr> <td height="0" width="20%"><?php include('leftmenu.php');?> </td> <td height="0" width="80%"><?php include('main.php');?> </td> </tr> <tr> <td height="50" width="100%" colspan="2"><?php include('bottom.php');?> </td> </tr> </table> leftmenu.php (not suppose to be what it is either) <a href="../index.php">Home</a><p> <a href="../aboutus.php">About Us</a><p> <a href="../products.php">Products</a><p> <a href="../gallery.php">Gallery</a><p> <a href="../contactus.php">Contact Us</a><p>
×
×
  • Create New...

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.