Never Mind. This worked:
=========================================================
if (!USER_ID) define('TEMPLATE_FILE', 'template.html');
else {
if ( USER_ID && defined("INDEX_PHP") ) define('TEMPLATE_FILE', 'template1.html');
elseif ( USER_ID && defined("INDEX_PHP" ) && $HTTP_GET_VARS['cat'] = FIRST_USER_CAT + USER_ID ) define('TEMPLATE_FILE', 'template2.html');
elseif ( USER_ID && defined("UPLOAD_PHP") ) define('TEMPLATE_FILE', 'template3.html');
elseif ( USER_ID && defined("CART_PHP") ) define('TEMPLATE_FILE', 'template4.html');
else define('TEMPLATE_FILE', 'template.html');
}
I use an open source photo gallery. There is a mod for this that allows additional pages other than the default. "template.html" file.
The code from the mod allows three aditional pages and I need to add a fourth but can't figure out how. The mod code lokks like this:
if (!USER_ID) define('TEMPLATE_FILE', 'template.html');
else {
if ( $HTTP_GET_VARS['cat'] == FIRST_USER_CAT + USER_ID && defined("INDEX_PHP" ) ) define('TEMPLATE_FILE', 'template2.html');
elseif ( defined("UPLOAD_PHP") ) define('TEMPLATE_FILE', 'template3.html');
else define('TEMPLATE_FILE', 'template1.html');
}
// load the main template
load_template();
I tried this:
=========================================================
if (!USER_ID) define('TEMPLATE_FILE', 'template.html');
else {
if ( $HTTP_GET_VARS['cat'] == FIRST_USER_CAT + USER_ID && defined("INDEX_PHP" ) ) define('TEMPLATE_FILE', 'template2.html');
elseif ( defined("UPLOAD_PHP") ) define('TEMPLATE_FILE', 'template3.html');
elseif ( defined("CART_PHP") ) define('TEMPLATE_FILE', 'template4.html');
else define('TEMPLATE_FILE', 'template1.html');
}
The result being after a user enters their name and password to enter the site the page just reloads and doesn't log them in.
Truely appreciate any help.
Lance