Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show boxes on certain pages.


dblake

Recommended Posts

I have this working but I am looking for an easier way with less lines. This is what I have right now:

 

<?php

if (basename($PHP_SELF) == FILENAME_RECIPES_ADDRECIPE) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_INDEX) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_LIST) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_LISTUSERRECIPES) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_RECIPE) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_RESULTS) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_SAVERECIPE) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_SEARCH) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_SENDDETAILS) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_SUBSCRIBE) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
if (basename($PHP_SELF) == FILENAME_RECIPES_UNSUBSCRIBE) {
require(DIR_WS_BOXES . 'recipes.php');
} else {
}
}
}
}
}
}
}
}
}
}
}
?>

 

Can I do something like if (basename($PHP_SELF) == FILENAME_RECIPES_UNSUBSCRIBE OR ANOTHER_PAGE)

 

and so on... or is this the only way to do it?

 

-Dennis

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...