Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php problems


ozarkhighs

Recommended Posts

I am trying to configure my header.php to function like the site it will be connected to.

 

Take a look: http://www.work.ncobs.org

 

This is what I am using:

<?php

function page() {

print "<div id=\"page\" align=\"center\">\n<table id=\"template\" cellpadding=\"0\" cellspacing=\"0\">\n<tr id=\"headerrow\">\n<td rowspan=\"4\" id=\"leftedge\" valign=\"bottom\"><img src=\"/images/leftedgebottom.gif\" alt=\"\" width=\"5\" height=\"4\"></td><td id=\"header\" colspan=\"2\">";

print "<div id=\"headertitle\"><img src=\"/images/ncobtitle.jpg\" alt=\"North Carolina Outward Bound School\" name=\"header\" width=\"557\" height=\"67\" border=\"0\" usemap=\"#headermap\" id=\"headergfx\"></div>";

print "<div id=\"headermenu\"><img src=\"/images/phonenumber.gif\" width=\"203\" height=\"47\" alt=\"Live bigger! 1-888-75-NCOBS (1-888-756-2627)\">";

print "<a href=\"java script:;\" onClick=\"newOpenWindow('http://public.obusa.net/obpub/catreq/ncobs/nccrq1.asp','requestcatalog','toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0','750','935')\" onMouseOut=\"MM_swapImage('requestacatalog','','/images/btn_requestacatalog_off.gif',1);\" onMouseOver=\"MM_swapImage('requestacatalog','','/images/btn_requestacatalog_on.gif',1)\"><img src=\"/images/btn_requestacatalog_off.gif\" alt=\"Request a Catalog\" name=\"requestacatalog\" width=\"101\" height=\"20\" border=\"0\" id=\"requestacatalog\"></a>";

print "<a href=\"/faq/index.php\" onMouseOut=\"MM_swapImage('faq','','/images/btn_faq_off.gif',1);\" onMouseOver=\"MM_swapImage('faq','','/images/btn_faq_on.gif',1)\"><img src=\"/images/btn_faq_off.gif\" alt=\"FAQ\" name=\"faq\" width=\"35\" height=\"20\" border=\"0\" id=\"faq\"></a>";

print "<a href=\"/contact_us/index.php\" onMouseOut=\"MM_swapImage('contactus','','/images/btn_contactus_off.gif',1);\" onMouseOver=\"MM_swapImage('contactus','','/images/btn_contactus_on.gif',1)\"><img src=\"/images/btn_contactus_off.gif\" alt=\"Contact Us\" name=\"contactus\" width=\"67\" height=\"20\" border=\"0\" id=\"contactus\"></a>";

print "</div>";

print "</td>\n<td rowspan=\"4\" id=\"rightedge\" valign=\"bottom\"><img src=\"/images/rightedgebottom.gif\" alt=\"\" width=\"5\" height=\"4\"></td></tr>\n";

print "<tr><td id=\"content\">\n<div id=\"contenttop\"></div>";

print "<div id=\"mainmenu\"><a href=\"/index.php\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"hideActiveMenus();FW_clearTimeout();MM_swapImage('home','','/images/btn_home_on.gif',1)\"><img src=\"/images/btn_home_off.gif\" alt=\"Home\" name=\"home\" width=\"32\" height=\"31\" border=\"0\" id=\"home\"></a>";

print "<img src=\"/images/menudivider.gif\" alt=\"\" width=\"7\" height=\"31\">";

print "<a href=\"/about_us/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_0,0,29,null,'aboutus');MM_swapImage('aboutus','','/images/btn_aboutus_on.gif',1)\"><img src=\"/images/btn_aboutus_off.gif\" alt=\"About Us\" name=\"aboutus\" width=\"61\" height=\"31\" border=\"0\" id=\"aboutus\"></a>";

print "<a href=\"/individual_courses/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_1,0,29,null,'individualcourses');MM_swapImage('individualcourses','','/images/btn_individualcourses_on.gif',1)\"><img src=\"/images/btn_individualcourses_off.gif\" alt=\"Individual Courses\" name=\"individualcourses\" width=\"68\" height=\"31\" border=\"0\" id=\"individualcourses\"></a>";

print "<a href=\"/schools_and_groups/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_2,0,29,null,'schoolgroups');MM_swapImage('schoolgroups','','/images/btn_schoolgroups_on.gif',1)\"><img src=\"/images/btn_schoolgroups_off.gif\" alt=\"Schools & Groups\" name=\"schoolgroups\" width=\"70\" height=\"31\" border=\"0\" id=\"schoolgroups\"></a>";

print "<a href=\"/business_and_professional/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_3,0,29,null,'businessprofessional');MM_swapImage('businessprofessional','','/images/btn_businessprofessional_on.gif',1)\"><img src=\"/images/btn_businessprofessional_off.gif\" alt=\"Business & Professional\" name=\"businessprofessional\" width=\"80\" height=\"31\" border=\"0\" id=\"businessprofessional\"></a>";

print "<a href=\"/course_preparation/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_4,0,29,null,'courseprep');MM_swapImage('courseprep','','/images/btn_courseprep_on.gif',1)\"><img src=\"/images/btn_courseprep_off.gif\" alt=\"Course Preparation\" name=\"courseprep\" width=\"79\" height=\"31\" border=\"0\" id=\"courseprep\"></a>";

print "<a href=\"/alumni/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_5,0,29,null,'alumni');MM_swapImage('alumni','','/images/btn_alumni_on.gif',1)\"><img src=\"/images/btn_alumni_off.gif\" alt=\"Alumni\" name=\"alumni\" width=\"55\" height=\"31\" border=\"0\" id=\"alumni\"></a>";

print "<a href=\"/giving/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_6,0,29,null,'giving');MM_swapImage('giving','','/images/btn_giving_on.gif',1)\"><img src=\"/images/btn_giving_off.gif\" alt=\"Giving\" name=\"giving\" width=\"52\" height=\"31\" border=\"0\" id=\"giving\"></a>";

print "<a href=\"/enroll/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_7,0,29,null,'enroll');MM_swapImage('enroll','','/images/btn_enroll_on.gif',1)\"><img src=\"/images/btn_enroll_off.gif\" alt=\"Enroll\" name=\"enroll\" width=\"53\" height=\"31\" border=\"0\" id=\"enroll\"></a>";

print "</div>";

}

?>

 

I also put the fw_menu in the include folder...

 

Nothing happens when I do this...

 

Help!

Link to comment
Share on other sites

I am trying to configure my header.php to function like the site it will be connected to.

 

Take a look: http://www.work.ncobs.org

 

This is what I am using:

<?php

function page() {

print "<div id=\"page\" align=\"center\">\n<table id=\"template\" cellpadding=\"0\" cellspacing=\"0\">\n<tr id=\"headerrow\">\n<td rowspan=\"4\" id=\"leftedge\" valign=\"bottom\"><img src=\"/images/leftedgebottom.gif\" alt=\"\" width=\"5\" height=\"4\"></td><td id=\"header\" colspan=\"2\">";

print "<div id=\"headertitle\"><img src=\"/images/ncobtitle.jpg\" alt=\"North Carolina Outward Bound School\" name=\"header\" width=\"557\" height=\"67\" border=\"0\" usemap=\"#headermap\" id=\"headergfx\"></div>";

print "<div id=\"headermenu\"><img src=\"/images/phonenumber.gif\" width=\"203\" height=\"47\" alt=\"Live bigger! 1-888-75-NCOBS (1-888-756-2627)\">";

print "<a href=\"java script:;\" onClick=\"newOpenWindow('http://public.obusa.net/obpub/catreq/ncobs/nccrq1.asp','requestcatalog','toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,left=0,top=0','750','935')\" onMouseOut=\"MM_swapImage('requestacatalog','','/images/btn_requestacatalog_off.gif',1);\" onMouseOver=\"MM_swapImage('requestacatalog','','/images/btn_requestacatalog_on.gif',1)\"><img src=\"/images/btn_requestacatalog_off.gif\" alt=\"Request a Catalog\" name=\"requestacatalog\" width=\"101\" height=\"20\" border=\"0\" id=\"requestacatalog\"></a>";

print "<a href=\"/faq/index.php\" onMouseOut=\"MM_swapImage('faq','','/images/btn_faq_off.gif',1);\" onMouseOver=\"MM_swapImage('faq','','/images/btn_faq_on.gif',1)\"><img src=\"/images/btn_faq_off.gif\" alt=\"FAQ\" name=\"faq\" width=\"35\" height=\"20\" border=\"0\" id=\"faq\"></a>";

print "<a href=\"/contact_us/index.php\" onMouseOut=\"MM_swapImage('contactus','','/images/btn_contactus_off.gif',1);\" onMouseOver=\"MM_swapImage('contactus','','/images/btn_contactus_on.gif',1)\"><img src=\"/images/btn_contactus_off.gif\" alt=\"Contact Us\" name=\"contactus\" width=\"67\" height=\"20\" border=\"0\" id=\"contactus\"></a>";

print "</div>";

print "</td>\n<td rowspan=\"4\" id=\"rightedge\" valign=\"bottom\"><img src=\"/images/rightedgebottom.gif\" alt=\"\" width=\"5\" height=\"4\"></td></tr>\n";

print "<tr><td id=\"content\">\n<div id=\"contenttop\"></div>";

print "<div id=\"mainmenu\"><a href=\"/index.php\" onMouseOut=\"MM_swapImgRestore();\" onMouseOver=\"hideActiveMenus();FW_clearTimeout();MM_swapImage('home','','/images/btn_home_on.gif',1)\"><img src=\"/images/btn_home_off.gif\" alt=\"Home\" name=\"home\" width=\"32\" height=\"31\" border=\"0\" id=\"home\"></a>";

print "<img src=\"/images/menudivider.gif\" alt=\"\" width=\"7\" height=\"31\">";

print "<a href=\"/about_us/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_0,0,29,null,'aboutus');MM_swapImage('aboutus','','/images/btn_aboutus_on.gif',1)\"><img src=\"/images/btn_aboutus_off.gif\" alt=\"About Us\" name=\"aboutus\" width=\"61\" height=\"31\" border=\"0\" id=\"aboutus\"></a>";

print "<a href=\"/individual_courses/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_1,0,29,null,'individualcourses');MM_swapImage('individualcourses','','/images/btn_individualcourses_on.gif',1)\"><img src=\"/images/btn_individualcourses_off.gif\" alt=\"Individual Courses\" name=\"individualcourses\" width=\"68\" height=\"31\" border=\"0\" id=\"individualcourses\"></a>";

print "<a href=\"/schools_and_groups/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_2,0,29,null,'schoolgroups');MM_swapImage('schoolgroups','','/images/btn_schoolgroups_on.gif',1)\"><img src=\"/images/btn_schoolgroups_off.gif\" alt=\"Schools & Groups\" name=\"schoolgroups\" width=\"70\" height=\"31\" border=\"0\" id=\"schoolgroups\"></a>";

print "<a href=\"/business_and_professional/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_3,0,29,null,'businessprofessional');MM_swapImage('businessprofessional','','/images/btn_businessprofessional_on.gif',1)\"><img src=\"/images/btn_businessprofessional_off.gif\" alt=\"Business & Professional\" name=\"businessprofessional\" width=\"80\" height=\"31\" border=\"0\" id=\"businessprofessional\"></a>";

print "<a href=\"/course_preparation/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_4,0,29,null,'courseprep');MM_swapImage('courseprep','','/images/btn_courseprep_on.gif',1)\"><img src=\"/images/btn_courseprep_off.gif\" alt=\"Course Preparation\" name=\"courseprep\" width=\"79\" height=\"31\" border=\"0\" id=\"courseprep\"></a>";

print "<a href=\"/alumni/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_5,0,29,null,'alumni');MM_swapImage('alumni','','/images/btn_alumni_on.gif',1)\"><img src=\"/images/btn_alumni_off.gif\" alt=\"Alumni\" name=\"alumni\" width=\"55\" height=\"31\" border=\"0\" id=\"alumni\"></a>";

print "<a href=\"/giving/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_6,0,29,null,'giving');MM_swapImage('giving','','/images/btn_giving_on.gif',1)\"><img src=\"/images/btn_giving_off.gif\" alt=\"Giving\" name=\"giving\" width=\"52\" height=\"31\" border=\"0\" id=\"giving\"></a>";

print "<a href=\"/enroll/index.php\" onMouseOut=\"FW_startTimeout();\" onMouseOver=\"window.FW_showMenu(window.fw_menu_7,0,29,null,'enroll');MM_swapImage('enroll','','/images/btn_enroll_on.gif',1)\"><img src=\"/images/btn_enroll_off.gif\" alt=\"Enroll\" name=\"enroll\" width=\"53\" height=\"31\" border=\"0\" id=\"enroll\"></a>";

print "</div>";

}

?>

 

I also put the fw_menu in the include folder...

 

Nothing happens when I do this...

 

Help!

 

Have you used an HTML shrinker on this code ?

 

If so unshrink it - then re-try - PHP goes bananas when shrunk.

 

Charles

A kite flies highest AGAINST the wind !

 

"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"

Link to comment
Share on other sites

When you need to include the html within php do it like so:

 

'<a href="index.php" target="_blank">Text Here</a>'

 

There is no need to escape every set of double quotes used.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...