Jump to content

Just can't find the problem


n1kko

Recommended Posts

Hi,

 

This piece of code below stops site loading, can't find the problem  :wtf:

Please help. If i remove the whole of this the site loads but does not function correct.

 

if ( $_GET[sssess] )
{
    session_id( $_GET[sssess] );
}
session_start( );
header( "cache-control: private" );
if ( isset( $_GET[redeempoints] ) && $_GET[redeempoints] == "Y" )
{
    $_SESSION[redeemer] = "Y";
}
if ( $_POST[purchaseorder] )
{
    $_SESSION[po] = "{$_POST['purchaseorder']}";
}
if ( !$_SESSION[loginemail] )
{
    $_SESSION[loginemail] = "noemail@site";
}
if ( !$_SESSION[adminemail] )
{
    $_SESSION[adminemail] = "noadmin@site";
}
if ( $_POST[discode] )
{
    $_SESSION[discode] = trim( "{$_POST['discode']}" );
}
$auth_ok_check = md5( "{$_SESSION['loginemail']}.{$hash}" );
$admin_ok_check = md5( "{$_SESSION['adminemail']}.{$hash}" );
if ( isset( $_GET['oidref'] ) )
{
    $GLOBALS['_GET']['oidref'] = mysql_real_escape_string( $_GET['oidref'] );
    $sql = "SELECT o_id FROM order_list WHERE ref='".$_GET['oidref']."' AND unh='{$_GET['oidref']}'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        exit( "**COULD NOT GET COPYRIGHT KEYS**" );
    }
    if ( $row = mysql_fetch_array( $result ) )
    {
        $_SESSION['unh'] = $_GET['oidref'];
        header( "location: ".$sshopurl."orderdetails_os.php?o_id={$row['o_id']}" );
        exit( );
    }
    if ( $_SESSION['auth_ok'] == $auth_ok_check )
    {
        header( "location: ".$sshopurl."secure/orders.php" );
        exit( );
    }
    header( "location: ".$sshopurl."secure/login.php?next=orders.php" );
    exit( );
}
if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/doqreg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/qreg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/voicepaycallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/secpaysecpagecallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/vps_handle_protx_response.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protx/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protxformcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protxcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/worldpaycallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/securetradingcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/barclayscpicallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/paypalcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/moneybookerscallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/nochexcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/offlinecallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/doregister.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/register.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/doprereg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/login.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/dologin.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $auth_ok_check != $_SESSION[auth_ok] )
    {
        header( "Location: ".$sshopurl."secure/login.php?next={$_GET['next']}&shk&p={$_SERVER['PHP_SELF']}" );
        exit( );
    }
    if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isaccount = "1";
    }
}
if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/adlogin.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/forgetful.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $admin_ok_check != $_SESSION[admin_ok] )
    {
        header( "Location: ".$adminurl."adlogin.php" );
        exit( );
    }
    if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isadmin = "1";
    }
}
$noadirs = count( $admin_dirs );
$i = 0;
for ( ; $i <= $noadirs; ++$i )
{
    if ( !preg_match( "/admin\\/".$admin_dirs[$i]."/", "{$_SERVER['PHP_SELF']}" ) && preg_match( "/".$admin_dirs[$i]."/", "{$_SESSION['admin_type']}" ) )
    {
        continue;
    }
    header( "Location: ".$adminurl."perms.php?noperm={$admin_dirs[$i]}" );
    exit( );
}
if ( !$_SESSION[shopper_type] )
{
    $_SESSION[shopper_type] = "1";
}
if ( $_GET[setcurrency] == 1 )
{
    if ( $_GET[new_currency_id] )
    {
        $GLOBALS['_POST'][new_currency_id] = $_GET[new_currency_id];
    }
    $_SESSION['currency_id'] = $_POST[new_currency_id];
}
if ( $_GET[clearptid] == Y )
{
    session_unregister( "ptid" );
}
if ( $_GET[selectpostage] == 1 )
{
    if ( $_POST[selptid] == Free || $_POST[selptid] == free )
    {
        session_unregister( "ptid" );
    }
    else if ( isset( $_POST[selptid] ) )
    {
        $_SESSION['ptid'] = $_POST[selptid];
    }
    else
    {
        session_unregister( "ptid" );
    }
    $GLOBALS['_POST'][selptid] = mysql_real_escape_string( $_POST[selptid] );
    $sql1 = "UPDATE basket SET ptid='".$_POST['selptid']."' WHERE session_id='".session_id( )."'";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't execute request 1" );
    }
}

Link to comment
Share on other sites

Sorry yes this is my errors

 

Notice: Use of undefined constant sssess - assumed 'sssess' in /home/site/public_html/private/file.php on line 538

 

Notice: Undefined index: sssess in /home/site/public_html/private/file.php on line 538

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/site/public_html/private/messages.php:58) in /home/site/public_html/private/file.php on line 542

 

Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/private/messages.php:58) in /home/site/public_html/private/file.php on line 543

Link to comment
Share on other sites

Thanks for that, but I still have problem of site not loading.

It loads with this removed below, so problem must be within this.

 

if ( $auth_ok_check != $_SESSION[auth_ok] )
    {
        header( "Location: ".$sshopurl."secure/login.php?next={$_GET['next']}&shk&p={$_SERVER['PHP_SELF']}" );
        exit( );
    }
    if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isaccount = "1";
    }
}
if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/adlogin.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/forgetful.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $admin_ok_check != $_SESSION[admin_ok] )
    {
        header( "Location: ".$adminurl."adlogin.php" );
        exit( );
    }
    if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isadmin = "1";
    }
}
$noadirs = count( $admin_dirs );
$i = 0;
for ( ; $i <= $noadirs; ++$i )
{
    if ( !preg_match( "/admin\\/".$admin_dirs[$i]."/", "{$_SERVER['PHP_SELF']}" ) && preg_match( "/".$admin_dirs[$i]."/", "{$_SESSION['admin_type']}" ) )
    {
        continue;
    }
    header( "Location: ".$adminurl."perms.php?noperm={$admin_dirs[$i]}" );
    exit( );
}

Link to comment
Share on other sites

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/site/public_html/private/messages.php:58) in /home/site/public_html/private/file.php on line 542

 

Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/private/messages.php:58) in /home/site/public_html/private/file.php on line 543

 

Are you still getting this error?  This means that you have started sending content at messages.php line 58 before you called session_start().  You can't output anything to the browser before you call session_start()

Link to comment
Share on other sites

Think I have problems with this but not really good with code

 

<?php
session_start( );
header( "cache-control: private" );
function write_cache( $f_cache_data, $f_cache_file )
{
    if ( !( $fp = fopen( $f_cache_file, "w" ) ) )
    {
        trigger_error( "Error opening cache file" );
        exit( );
    }
    if ( !flock( $fp, LOCK_EX ) )
    {
        trigger_error( "Unable to lock file" );
        exit( );
    }
    if ( !fwrite( $fp, serialize( $f_cache_data ) ) )
    {
        trigger_error( "Error writing to cache file" );
        exit( );
    }
    flock( $fp, LOCK_UN );
    fclose( $fp );
}
function read_cache( $f_cache_file )
{
    if ( !file_exists( $f_cache_file ) )
    {
        trigger_error( "Invalid cache file" );
        exit( );
    }
    return unserialize( file_get_contents( $f_cache_file ) );
}
function list_options( $arrayname, $mode )
{
    global $row;
    global $row_2;
    $sarray = "";
    foreach ( $arrayname as $v )
    {
        if ( !isset( $row['salutation'] ) && $row['salutation'] == $v || isset( $row_2['salutation'] ) && $row_2['salutation'] == $v )
        {
            if ( !isset( $mode ) )
            {
                echo "<option value=\"".$v."\" selected>{$v}</option>\n";
            }
            else
            {
                $sarray .= "<option value=\"".$v."\" selected>{$v}</option>\n";
            }
        }
        else if ( !isset( $mode ) )
        {
            echo "<option value=\"".$v."\">{$v}</option>\n";
        }
        else
        {
            $sarray .= "<option value=\"".$v."\">{$v}</option>\n";
        }
    }
    return $sarray;
}
function genprevnext( $numrows, $position, $nresults, $scriptis, $extras )
{
    $disppages = intval( $numrows / $nresults );
    if ( $numrows % $nresults )
    {
        ++$disppages;
    }
    if ( $nresults <= $position )
    {
        $current_page_num = $position / $nresults + 1;
    }
    else
    {
        $current_page_num = 1;
    }
    if ( 1 < $disppages )
    {
        echo "(Viewing ".$current_page_num." of {$disppages} pages)<br /><br />";
    }
    if ( !( $numrows <= $nresults ) )
    {
        if ( "{$nresults}" <= $position )
        {
            $prevoffset = $position - $nresults;
            echo "<a href=\"".$shopur."{$scriptis}?position={$prevoffset}&nresults={$nresults}{$extras}\">« Prev</a>";
        }
        else
        {
            echo "<a href=\"#\">« Prev </a>";
        }
        $pages = intval( $numrows / $nresults );
        if ( $numrows % $nresults )
        {
            ++$pages;
        }
        $i = 1;
        for ( ; $i <= $pages; ++$i )
        {
            $newoffset = $nresults * ( $i - 1 );
            echo "<a href=\"".$http."{$scriptis}?position={$newoffset}&nresults={$nresults}{$extras}\">{$i}</a>";
        }
        if ( !( $offset / $nresults == $pages ) || $pages != 1 )
        {
            $newoffset = $position + $nresults;
            if ( $numrows <= $newoffset )
            {
                echo "<a href=\"#\">Next »</a>";
            }
            else
            {
                echo "<a href=\"".$shopur."{$scriptis}?position={$newoffset}&nresults={$nresults}{$extras}\">Next »</a>";
            }
        }
    }
}
function buildCategorySelect( )
{
    global $connection;
    global $category_id;
    $level = "0";
    $sql = "SELECT * from categories WHERE category_parent_id='deftl'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        exit( "** COULD NOT BUILD CATEGORY DROP DOWN ** ".mysql_error( ) );
    }
    while ( $row = mysql_fetch_array( $result ) )
    {
        $parent = "{$row['category_id']}";
        $row[category_name] = stripslashes( "{$row['category_name']}" );
        if ( $category_id == $row[category_id] )
        {
            echo "<option value=\"".$row['category_id']."\" selected>+ {$row['category_name']}</option>\n";
        }
        else
        {
            echo "<option value=\"".$row['category_id']."\">+ {$row['category_name']}</option>\n";
        }
        getchildren( $parent, $level );
    }
}
function getChildren( $parent, $level )
{
    global $connection;
    global $category_id;
    ++$level;
    $sql1 = "SELECT * from categories WHERE category_parent_id='".$parent."' order by category_name";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't build category tree child part: ".mysql_error( ) );
    }
    while ( $row1 = mysql_fetch_array( $result1 ) )
    {
        $parent = "{$row1['category_id']}";
        if ( $category_id == $row1[category_id] )
        {
            echo "<option value=\"".$row1['category_id']."\" selected>";
        }
        else
        {
            echo "<option value=\"".$row1['category_id']."\">";
        }
        $i = 0;
        for ( ; $i < $level; ++$i )
        {
            echo " ";
        }
        echo "|--[".$level."]";
        echo " ".$row1['category_name']."</option>\n";
        getchildren( $parent, $level );
    }
}
function getChildrenSEL( $parent, $myparent, $level )
{
    global $connection;
    global $https;
    global $category_id;
    ++$level;
    $sql1 = "SELECT * from categories WHERE category_parent_id='".$parent."' order by category_name";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't build category tree child part: ".mysql_error( ) );
    }
    while ( $row1 = mysql_fetch_array( $result1 ) )
    {
        $parent = "{$row1['category_id']}";
        if ( $myparent == $row1[category_id] )
        {
            echo "<option value=\"".$row1['category_id']."\" selected>";
        }
        else if ( $category_id == $row1[category_id] )
        {
            echo "<option value=\"deftl\">";
        }
        else
        {
            echo "<option value=\"".$row1['category_id']."\">";
        }
        $i = 0;
        for ( ; $i < $level; ++$i )
        {
            echo " ";
        }
        echo "|".$level."|";
        echo "{$row1['category_name']}</option>\n";
        getchildrensel( $parent, $myparent, $level );
    }
}
function makeCategoryMap( )
{
    global $connection;
    global $adminurl;
    $level = "0";
    $sql = "SELECT * from categories WHERE category_parent_id='deftl'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        exit( "Couldn't build category tree parent part: ".mysql_error( ) );
    }
    while ( $row = mysql_fetch_array( $result ) )
    {
        $parent = "{$row['category_id']}";
        $sql3 = "SELECT product_id from products WHERE category_id='".$parent."'";
        if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
        {
            exit( "Couldn't get data from products db" );
        }
        $numrows = mysql_num_rows( $result3 );
        if ( $numrows < 1 )
        {
            $linker = "";
        }
        else
        {
            $linker = "<input type=\"button\" class=\"list\" onclick=\"location.href='".$adminurl."products/productlist.php?category_id={$row['category_id']}'\" value=\"Products ({$numrows})\" />";
        }
        $row[category_name] = stripslashes( "{$row['category_name']}" );
        echo "<tr>\n\t\t\t\t<td> + <a href=\"".$adminurl."products/editcategory.php?category_id={$row['category_id']}\" title=\"{$row['category_desc']}\">{$row['category_name']}</a> </td>\n\t\t\t\t<td>";
        if ( $row[category_publish] == Y )
        {
            echo "<input type=\"button\" class=\"deactivate\" value=\"(click to deactivate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row['category_id']}&act=N'\" />";
        }
        else
        {
            echo "<input type=\"button\" class=\"activate\" value=\"(click to activate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row['category_id']}&act=Y'\" />";
        }
        echo "</td>\n\t\t\t\t<td> <input type=\"button\" class=\"add\" onclick=\"location.href='".$adminurl."products/addproduct.php?category_id={$row['category_id']}'\" value=\"Add\" /> {$linker} </td>\n\t\t\t\t<td> <input type=\"button\" class=\"edit\" onclick=\"location.href='{$adminurl}products/editcategory.php?category_id={$row['category_id']}'\" value=\"Edit\" /> <input type=\"button\" class=\"delete\" value=\"DELETE\" onclick='usr_conf(\"{$adminurl}products/bin/deletecategory.php\",\"category_id={$row['category_id']}\",\"Are you sure you want to delete this category?\");' /> </td>\n\t\t\t</tr>\n";
        getchildrenlist( $parent, $level );
    }
}
function getChildrenList( $parent, $level )
{
    global $connection;
    global $adminurl;
    ++$level;
    $where_in_level = "0";
    $sql1 = "SELECT * from categories WHERE category_parent_id='".$parent."'";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't build category tree child part: ".mysql_error( ) );
    }
    while ( $row1 = mysql_fetch_array( $result1 ) )
    {
        ++$where_in_level;
        $parent = "{$row1['category_id']}";
        $level_indent = $level - 1;
        $i = 0;
        for ( ; $i < $level_indent; ++$i )
        {
            echo " ";
        }
        if ( $last_level == $level )
        {
            echo " ";
        }
        else
        {
            echo " ";
        }
        $i = 0;
        for ( ; $i < $level; ++$i )
        {
            echo " ";
        }
        $sql3 = "SELECT product_id from products WHERE category_id='".$parent."'";
        if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
        {
            exit( "Couldn't get data from products db" );
        }
        $numrows = mysql_num_rows( $result3 );
        if ( $numrows < 1 )
        {
            $linker = "";
        }
        else
        {
            $linker = "<input type=\"button\" class=\"list\" onclick=\"location.href='".$adminurl."products/productlist.php?category_id={$row1['category_id']}'\" value=\"Products ({$numrows})\" />";
        }
        echo "\t<tr>\n\t\t<td> » (".$level.") <a href=\"{$adminurl}products/editcategory.php?category_id={$row1['category_id']}\" title=\"{$row1['category_desc']}\">{$row1['category_name']}</a></td>\n\t\t\t<td>";
        if ( $row1[category_publish] == Y )
        {
            echo "<input type=\"button\" class=\"deactivate\" value=\"(click to deactivate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row1['category_id']}&act=N'\" />";
        }
        else
        {
            echo "<input type=\"button\" class=\"activate\" value=\"(click to activate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row1['category_id']}&act=Y'\" />";
        }
        echo "</td> \n\t\t\t<td><input type=\"button\" class=\"add\" onclick=\"location.href='".$adminurl."products/addproduct.php?category_id={$row1['category_id']}'\" value=\"Add\" /> {$linker}</td>\n\t\t\t<td> <input type=\"button\" class=\"edit\" onclick=\"location.href='{$adminurl}products/editcategory.php?category_id={$row1['category_id']}'\" value=\"Edit\" /> <input type=\"button\" class=\"delete\" value=\"DELETE\" onclick='usr_conf(\"{$adminurl}products/bin/deletecategory.php\",\"category_id={$row1['category_id']}\",\"Are you sure you want to delete this category?\");' /></td>\n\t</tr>\n";
        getchildrenlist( $parent, $level );
        $last_level = $level;
    }
}
function productcheckcategories( )
{
    global $connection;
    global $oktoadd;
    $sql3 = "SELECT * from categories";
    if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
    {
        exit( "Couldn't get data from category db" );
    }
    $numrows = mysql_num_rows( $result3 );
    if ( 1 <= $numrows )
    {
        $oktoadd = "Y";
    }
}
function countrycompareDD( $country_dd )
{
    global $connection;
    echo "<select name=\"country\">";
    $sql3 = "SELECT country_short, country_long from country WHERE zone_id !='0'";
    if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
    {
        exit( "Couldn't execute request 1" );
    }
    while ( $row3 = mysql_fetch_array( $result3 ) )
    {
        if ( $row3[country_short] == $country_dd )
        {
            echo "<option value=\"".$row3['country_short']."\" selected>{$row3['country_long']}</option>\n";
        }
        else
        {
            echo "<option value=\"".$row3['country_short']."\">{$row3['country_long']}</option>\n";
        }
    }
    echo "</select>";
}
function alternatecolour( $level )
{
    global $altclass;
    $class_1 = " class=altlight";
    $class_2 = " class=altdark";
    $altclass = $class_1;
    $level % 2 ? 0 : ( $altclass = $class_2 );
}
function check_email_address( $email )
{
    if ( !ereg( "[^@]{1,64}@[^@]{1,255}", $email ) )
    {
        return FALSE;
    }
    $email_array = explode( "@", $email );
    $local_array = explode( ".", $email_array[0] );
    $i = 0;
    for ( ; $i < sizeof( $local_array ); ++$i )
    {
        if ( ereg( "^(([A-Za-z0-9!#\$%&'*+/=?^_`{|}~-][A-Za-z0-9!#\$%&'*+/=?^_`{|}~\\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))\$", $local_array[$i] ) )
        {
            continue;
        }
        return FALSE;
    }
    if ( !ereg( "^\\[?[0-9\\.]+\\]?\$", $email_array[1] ) )
    {
        $domain_array = explode( ".", $email_array[1] );
        if ( sizeof( $domain_array ) < 2 )
        {
            return FALSE;
        }
        $i = 0;
        for ( ; $i < sizeof( $domain_array ); ++$i )
        {
            if ( ereg( "^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))\$", $domain_array[$i] ) )
            {
                continue;
            }
            return FALSE;
        }
    }
    return TRUE;
}
$sYear = "2007";
$cwd = dirname( __FILE__ );
$instdir = str_replace( "private", "", "{$cwd}" );
include( "{$instdir}private/config.php" );
include( "{$instdir}private/cache.php" );
if ( !$shopurl )
{
    header( "Location: install/" );
    exit( );
}
include( "{$instdir}private/db_connect.php" );
include( "{$instdir}private/messages.php" );
include( "{$instdir}private/shop_messages.php" );
$admin_dirs = array( "settings", "orders", "newsletter", "reports", "shoppers", "products", "content" );
$mtta = array( "mail", "smtp" );
$ppgfields = array( "ppemail", "ppmerchantid", "ppsecret", "pptestmode", "ppinstid", "ppintip", "ppextip", "ppgiftaid", "ppApply3DSecure", "ppApplyAVSCV2", "ppauthmode", "ppsignature" );
$category_style = array( "List with Thumbnail", "List no Thumbnail", "Grid 2 Across", "Grid 3 Across", "Grid 4 Across", "Grid 5 Across" );
$category_sort_order = array( "Alphabetical", "Newest Items First", "Newest Items Last", "Featured Items First", "Custom Sort", "Price Low - High", "Price High - Low" );
$sf_style = array( "List", "Grid 2 Across", "Grid 3 Across", "Grid 4 Across", "Grid 5 Across" );
$sf_sort_order = array( "Alphabetical", "By ID", "Randomised" );
$cf_sort_order = array( "Alphabetical", "By ID", "Custom" );
$allow_next = array( "selectdeliveryaddress.php", "revieworder.php", "reviewproduct.php", "revieworder.php?clearptid=Y", "orders.php" );
if ( $_GET[next] && !in_array( "{$_GET['next']}", $allow_next ) )
{
    echo "Not allowed!";
    exit( );
}
$GLOBALS['_GET'][category_id] = mysql_real_escape_string( "{$_GET['category_id']}" );
$GLOBALS['_GET'][product_id] = mysql_real_escape_string( "{$_GET['product_id']}" );
$GLOBALS['_GET'][product_xo_id] = mysql_real_escape_string( "{$_GET['product_xo_id']}" );
$GLOBALS['_GET'][o_id] = mysql_real_escape_string( "{$_GET['o_id']}" );
$GLOBALS['_GET'][p_id] = mysql_real_escape_string( "{$_GET['p_id']}" );
$GLOBALS['_GET'][a_id] = mysql_real_escape_string( "{$_GET['a_id']}" );
$GLOBALS['_POST'][query_string] = mysql_real_escape_string( "{$_POST['query_string']}" );
$GLOBALS['_POST'][new_currency_id] = mysql_real_escape_string( "{$_POST['new_currency_id']}" );
$GLOBALS['_POST'][pre_xo_id] = mysql_real_escape_string( "{$_POST['pre_xo_id']}" );
$GLOBALS['_POST'][p_id] = mysql_real_escape_string( "{$_POST['p_id']}" );
$GLOBALS['_POST'][qty] = mysql_real_escape_string( "{$_POST['qty']}" );
$GLOBALS['_POST'][loginemail] = mysql_real_escape_string( "{$_POST['loginemail']}" );
$GLOBALS['_POST'][loginpass] = mysql_real_escape_string( "{$_POST['loginpass']}" );
$GLOBALS['_POST'][mail_outs] = mysql_real_escape_string( "{$_POST['mail_outs']}" );
$GLOBALS['_POST'][old_password] = mysql_real_escape_string( "{$_POST['old_password']}" );
$GLOBALS['_POST'][confirm_password] = mysql_real_escape_string( "{$_POST['confirm_password']}" );
$GLOBALS['_GET'][category_id] = mysql_real_escape_string( "{$_GET['category_id']}" );
$GLOBALS['_GET'][product_id] = mysql_real_escape_string( "{$_GET['product_id']}" );
$GLOBALS['_GET'][new_currency_id] = mysql_real_escape_string( "{$_GET['new_currency_id']}" );
$GLOBALS['_GET'][new_currency_id] = mysql_real_escape_string( "{$_GET['new_currency_id']}" );
$search = array( "@<script[^>]*?>.*?</script>@si", "@<[\\/\\!]*?[^<>]*?>@si", "@&(quot|#34);@i", "@&(amp|#38);@i", "@&(lt|#60);@i", "@&(gt|#62);@i", "@&(nbsp|#160);@i", "@&(iexcl|#161);@i", "@&(cent|#162);@i", "@&(pound|#163);@i", "@&(copy|#169);@i", "@&#(\\d+);@e" );
$replace = array(
    "",
    "",
    "\\1",
    "\"",
    "&",
    "<",
    ">",
    " ",
    chr( 161 ),
    chr( 162 ),
    chr( 163 ),
    chr( 169 ),
    "chr(\\1)"
);
$GLOBALS['_POST'][company] = mysql_real_escape_string( "{$_POST['company']}" );
$GLOBALS['_POST'][company] = preg_replace( $search, $replace, $_POST[company] );
$GLOBALS['_POST'][first_name] = mysql_real_escape_string( "{$_POST['first_name']}" );
$GLOBALS['_POST'][first_name] = preg_replace( $search, $replace, $_POST[first_name] );
$GLOBALS['_POST'][last_name] = mysql_real_escape_string( "{$_POST['last_name']}" );
$GLOBALS['_POST'][last_name] = preg_replace( $search, $replace, $_POST[last_name] );
$GLOBALS['_POST'][email] = mysql_real_escape_string( "{$_POST['email']}" );
$GLOBALS['_POST'][email] = preg_replace( $search, $replace, $_POST[email] );
$GLOBALS['_POST'][no_name] = mysql_real_escape_string( "{$_POST['no_name']}" );
$GLOBALS['_POST'][no_name] = preg_replace( $search, $replace, $_POST[no_name] );
$GLOBALS['_POST'][street] = mysql_real_escape_string( "{$_POST['street']}" );
$GLOBALS['_POST'][street] = preg_replace( $search, $replace, $_POST[street] );
$GLOBALS['_POST'][town] = mysql_real_escape_string( "{$_POST['town']}" );
$GLOBALS['_POST'][town] = preg_replace( $search, $replace, $_POST[town] );
$GLOBALS['_POST'][county] = mysql_real_escape_string( "{$_POST['county']}" );
$GLOBALS['_POST'][county] = preg_replace( $search, $replace, $_POST[county] );
$GLOBALS['_POST'][postcode] = mysql_real_escape_string( "{$_POST['postcode']}" );
$GLOBALS['_POST'][postcode] = preg_replace( $search, $replace, $_POST[postcode] );
$GLOBALS['_POST'][country] = mysql_real_escape_string( "{$_POST['country']}" );
$GLOBALS['_POST'][country] = preg_replace( $search, $replace, $_POST[country] );
$GLOBALS['_POST'][day_tel] = mysql_real_escape_string( "{$_POST['day_tel']}" );
$GLOBALS['_POST'][day_tel] = preg_replace( $search, $replace, $_POST[day_tel] );
$GLOBALS['_POST'][eve_tel] = mysql_real_escape_string( "{$_POST['eve_tel']}" );
$GLOBALS['_POST'][eve_tel] = preg_replace( $search, $replace, $_POST[eve_tel] );
$GLOBALS['_POST'][mobile] = mysql_real_escape_string( "{$_POST['mobile']}" );
$GLOBALS['_POST'][mobile] = preg_replace( $search, $replace, $_POST[mobile] );
$GLOBALS['_POST'][fax] = mysql_real_escape_string( "{$_POST['fax']}" );
$GLOBALS['_POST'][fax] = preg_replace( $search, $replace, $_POST[fax] );
$GLOBALS['_POST'][emailaddress] = mysql_real_escape_string( "{$_POST['emailaddress']}" );
$GLOBALS['_POST'][emailaddress] = preg_replace( $search, $replace, $_POST[emailaddress] );
$GLOBALS['_POST'][password] = mysql_real_escape_string( "{$_POST['password']}" );
$GLOBALS['_POST'][password] = preg_replace( $search, $replace, $_POST[password] );
if (isset($_GET['sssess'])) {
     session_id($_GET['sssess'] );
}
if ( isset( $_GET[redeempoints] ) && $_GET[redeempoints] == "Y" )
{
    $_SESSION[redeemer] = "Y";
}
if ( $_POST[purchaseorder] )
{
    $_SESSION[po] = "{$_POST['purchaseorder']}";
}
if ( !$_SESSION[loginemail] )
{
    $_SESSION[loginemail] = "noemail@email";
}
if ( !$_SESSION[adminemail] )
{
    $_SESSION[adminemail] = "noadmin@email";
}
if ( $_POST[discode] )
{
    $_SESSION[discode] = trim( "{$_POST['discode']}" );
}
$auth_ok_check = md5( "{$_SESSION['loginemail']}.{$hash}" );
$admin_ok_check = md5( "{$_SESSION['adminemail']}.{$hash}" );
if ( isset( $_GET['oidref'] ) )
{
    $GLOBALS['_GET']['oidref'] = mysql_real_escape_string( $_GET['oidref'] );
    $sql = "SELECT o_id FROM order_list WHERE ref='".$_GET['oidref']."' AND unh='{$_GET['oidref']}'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        
    }
    if ( $row = mysql_fetch_array( $result ) )
    {
        $_SESSION['unh'] = $_GET['oidref'];
        header( "location: ".$sshopurl."orderdetails_os.php?o_id={$row['o_id']}" );
        exit( );
    }
    if ( $_SESSION['auth_ok'] == $auth_ok_check )
    {
        header( "location: ".$sshopurl."secure/orders.php" );
        exit( );
    }
    header( "location: ".$sshopurl."secure/login.php?next=orders.php" );
    exit( );
}
if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/doqreg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/qreg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/voicepaycallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/secpaysecpagecallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/vps_handle_protx_response.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protx/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protxformcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protxcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/worldpaycallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/securetradingcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/barclayscpicallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/paypalcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/moneybookerscallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/nochexcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/offlinecallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/doregister.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/register.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/doprereg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/login.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/dologin.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $auth_ok_check != $_SESSION[auth_ok] )
    {
        header( "Location: ".$sshopurl."secure/login.php?next={$_GET['next']}&shk&p={$_SERVER['PHP_SELF']}" );
        exit( );
    }
    if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isaccount = "1";
    }
}
if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/adlogin.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/forgetful.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $admin_ok_check != $_SESSION[admin_ok] )
    {
        header( "Location: ".$adminurl."adlogin.php" );
        exit( );
    }
    if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isadmin = "1";
    }
}
$noadirs = count( $admin_dirs );
$i = 0;
for ( ; $i <= $noadirs; ++$i )
{
    if ( !preg_match( "/admin\\/".$admin_dirs[$i]."/", "{$_SERVER['PHP_SELF']}" ) && preg_match( "/".$admin_dirs[$i]."/", "{$_SESSION['admin_type']}" ) )
    {
        continue;
    }
    header( "Location: ".$adminurl."perms.php?noperm={$admin_dirs[$i]}" );
    exit( );
}
if ( !$_SESSION[shopper_type] )
{
    $_SESSION[shopper_type] = "1";
}
if ( $_GET[setcurrency] == 1 )
{
    if ( $_GET[new_currency_id] )
    {
        $GLOBALS['_POST'][new_currency_id] = $_GET[new_currency_id];
    }
    $_SESSION['currency_id'] = $_POST[new_currency_id];
}
if ( $_GET[clearptid] == Y )
{
    session_unregister( "ptid" );
}
if ( $_GET[selectpostage] == 1 )
{
    if ( $_POST[selptid] == Free || $_POST[selptid] == free )
    {
        session_unregister( "ptid" );
    }
    else if ( isset( $_POST[selptid] ) )
    {
        $_SESSION['ptid'] = $_POST[selptid];
    }
    else
    {
        session_unregister( "ptid" );
    }
    $GLOBALS['_POST'][selptid] = mysql_real_escape_string( $_POST[selptid] );
    $sql1 = "UPDATE basket SET ptid='".$_POST['selptid']."' WHERE session_id='".session_id( )."'";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't execute request 1" );
    }
}
?>

Link to comment
Share on other sites

Getting this error now

 

Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/private/file.php:446) in /home/adaver/public_html/private/file.php on line 570

 

Look at what the error says.  "output started at /home/site/public_html/private/file.php:446" - this error means that you attempted to send headers on line 570 (probably session_start) but you've already echoed something at line 446.  You can't send headers (session_start() sends headers) after you've sent something to the browser.

Link to comment
Share on other sites

Thanks,

 

This is driving me crazy  :confused:

I just can't seem to get this fixed.

 

This is now my code and error:

Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/private/file.php:426) in /home/site/public_html/private/file.php on line 549

 

<?php
function write_cache( $f_cache_data, $f_cache_file )
{
    if ( !( $fp = fopen( $f_cache_file, "w" ) ) )
    {
        trigger_error( "Error opening cache file" );
        exit( );
    }
    if ( !flock( $fp, LOCK_EX ) )
    {
        trigger_error( "Unable to lock file" );
        exit( );
    }
    if ( !fwrite( $fp, serialize( $f_cache_data ) ) )
    {
        trigger_error( "Error writing to cache file" );
        exit( );
    }
    flock( $fp, LOCK_UN );
    fclose( $fp );
}

function read_cache( $f_cache_file )
{
    if ( !file_exists( $f_cache_file ) )
    {
        trigger_error( "Invalid cache file" );
        exit( );
    }
    return unserialize( file_get_contents( $f_cache_file ) );
}

function list_options( $arrayname, $mode )
{
    global $row;
    global $row_2;
    $sarray = "";
    foreach ( $arrayname as $v )
    {
        if ( !isset( $row['salutation'] ) && $row['salutation'] == $v || isset( $row_2['salutation'] ) && $row_2['salutation'] == $v )
        {
            if ( !isset( $mode ) )
            {
                echo "<option value=\"".$v."\" selected>{$v}</option>\n";
            }
            else
            {
                $sarray .= "<option value=\"".$v."\" selected>{$v}</option>\n";
            }
        }
        else if ( !isset( $mode ) )
        {
            echo "<option value=\"".$v."\">{$v}</option>\n";
        }
        else
        {
            $sarray .= "<option value=\"".$v."\">{$v}</option>\n";
        }
    }
    return $sarray;
}

function genprevnext( $numrows, $position, $nresults, $scriptis, $extras )
{
    $disppages = intval( $numrows / $nresults );
    if ( $numrows % $nresults )
    {
        ++$disppages;
    }
    if ( $nresults <= $position )
    {
        $current_page_num = $position / $nresults + 1;
    }
    else
    {
        $current_page_num = 1;
    }
    if ( 1 < $disppages )
    {
        echo "(Viewing ".$current_page_num." of {$disppages} pages)<br /><br />";
    }
    if ( !( $numrows <= $nresults ) )
    {
        if ( "{$nresults}" <= $position )
        {
            $prevoffset = $position - $nresults;
            echo "<a href=\"".$shopur."{$scriptis}?position={$prevoffset}&nresults={$nresults}{$extras}\">« Prev</a>";
        }
        else
        {
            echo "<a href=\"#\">« Prev </a>";
        }
        $pages = intval( $numrows / $nresults );
        if ( $numrows % $nresults )
        {
            ++$pages;
        }
        $i = 1;
        for ( ; $i <= $pages; ++$i )
        {
            $newoffset = $nresults * ( $i - 1 );
            echo "<a href=\"".$http."{$scriptis}?position={$newoffset}&nresults={$nresults}{$extras}\">{$i}</a>";
        }
        if ( !( $offset / $nresults == $pages ) || $pages != 1 )
        {
            $newoffset = $position + $nresults;
            if ( $numrows <= $newoffset )
            {
                echo "<a href=\"#\">Next »</a>";
            }
            else
            {
                echo "<a href=\"".$shopur."{$scriptis}?position={$newoffset}&nresults={$nresults}{$extras}\">Next »</a>";
            }
        }
    }
}

function buildCategorySelect( )
{
    global $connection;
    global $category_id;
    $level = "0";
    $sql = "SELECT * from categories WHERE category_parent_id='deftl'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        exit( "** COULD NOT BUILD CATEGORY DROP DOWN ** ".mysql_error( ) );
    }
    while ( $row = mysql_fetch_array( $result ) )
    {
        $parent = "{$row['category_id']}";
        $row[category_name] = stripslashes( "{$row['category_name']}" );
        if ( $category_id == $row[category_id] )
        {
            echo "<option value=\"".$row['category_id']."\" selected>+ {$row['category_name']}</option>\n";
        }
        else
        {
            echo "<option value=\"".$row['category_id']."\">+ {$row['category_name']}</option>\n";
        }
        getchildren( $parent, $level );
    }
}

function getChildren( $parent, $level )
{
    global $connection;
    global $category_id;
    ++$level;
    $sql1 = "SELECT * from categories WHERE category_parent_id='".$parent."' order by category_name";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't build category tree child part: ".mysql_error( ) );
    }
    while ( $row1 = mysql_fetch_array( $result1 ) )
    {
        $parent = "{$row1['category_id']}";
        if ( $category_id == $row1[category_id] )
        {
            echo "<option value=\"".$row1['category_id']."\" selected>";
        }
        else
        {
            echo "<option value=\"".$row1['category_id']."\">";
        }
        $i = 0;
        for ( ; $i < $level; ++$i )
        {
            echo " ";
        }
        echo "|--[".$level."]";
        echo " ".$row1['category_name']."</option>\n";
        getchildren( $parent, $level );
    }
}

function getChildrenSEL( $parent, $myparent, $level )
{
    global $connection;
    global $https;
    global $category_id;
    ++$level;
    $sql1 = "SELECT * from categories WHERE category_parent_id='".$parent."' order by category_name";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't build category tree child part: ".mysql_error( ) );
    }
    while ( $row1 = mysql_fetch_array( $result1 ) )
    {
        $parent = "{$row1['category_id']}";
        if ( $myparent == $row1[category_id] )
        {
            echo "<option value=\"".$row1['category_id']."\" selected>";
        }
        else if ( $category_id == $row1[category_id] )
        {
            echo "<option value=\"deftl\">";
        }
        else
        {
            echo "<option value=\"".$row1['category_id']."\">";
        }
        $i = 0;
        for ( ; $i < $level; ++$i )
        {
            echo " ";
        }
        echo "|".$level."|";
        echo "{$row1['category_name']}</option>\n";
        getchildrensel( $parent, $myparent, $level );
    }
}

function makeCategoryMap( )
{
    global $connection;
    global $adminurl;
    $level = "0";
    $sql = "SELECT * from categories WHERE category_parent_id='deftl'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        exit( "Couldn't build category tree parent part: ".mysql_error( ) );
    }
    while ( $row = mysql_fetch_array( $result ) )
    {
        $parent = "{$row['category_id']}";
        $sql3 = "SELECT product_id from products WHERE category_id='".$parent."'";
        if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
        {
            exit( "Couldn't get data from products db" );
        }
        $numrows = mysql_num_rows( $result3 );
        if ( $numrows < 1 )
        {
            $linker = "";
        }
        else
        {
            $linker = "<input type=\"button\" class=\"list\" onclick=\"location.href='".$adminurl."products/productlist.php?category_id={$row['category_id']}'\" value=\"Products ({$numrows})\" />";
        }
        $row[category_name] = stripslashes( "{$row['category_name']}" );
        echo "<tr>\n\t\t\t\t<td> + <a href=\"".$adminurl."products/editcategory.php?category_id={$row['category_id']}\" title=\"{$row['category_desc']}\">{$row['category_name']}</a> </td>\n\t\t\t\t<td>";
        if ( $row[category_publish] == Y )
        {
            echo "<input type=\"button\" class=\"deactivate\" value=\"(click to deactivate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row['category_id']}&act=N'\" />";
        }
        else
        {
            echo "<input type=\"button\" class=\"activate\" value=\"(click to activate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row['category_id']}&act=Y'\" />";
        }
        echo "</td>\n\t\t\t\t<td> <input type=\"button\" class=\"add\" onclick=\"location.href='".$adminurl."products/addproduct.php?category_id={$row['category_id']}'\" value=\"Add\" /> {$linker} </td>\n\t\t\t\t<td> <input type=\"button\" class=\"edit\" onclick=\"location.href='{$adminurl}products/editcategory.php?category_id={$row['category_id']}'\" value=\"Edit\" /> <input type=\"button\" class=\"delete\" value=\"DELETE\" onclick='usr_conf(\"{$adminurl}products/bin/deletecategory.php\",\"category_id={$row['category_id']}\",\"Are you sure you want to delete this category?\");' /> </td>\n\t\t\t</tr>\n";
        getchildrenlist( $parent, $level );
    }
}

function getChildrenList( $parent, $level )
{
    global $connection;
    global $adminurl;
    ++$level;
    $where_in_level = "0";
    $sql1 = "SELECT * from categories WHERE category_parent_id='".$parent."'";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't build category tree child part: ".mysql_error( ) );
    }
    while ( $row1 = mysql_fetch_array( $result1 ) )
    {
        ++$where_in_level;
        $parent = "{$row1['category_id']}";
        $level_indent = $level - 1;
        $i = 0;
        for ( ; $i < $level_indent; ++$i )
        {
            echo " ";
        }
        if ( $last_level == $level )
        {
            echo " ";
        }
        else
        {
            echo " ";
        }
        $i = 0;
        for ( ; $i < $level; ++$i )
        {
            echo " ";
        }
        $sql3 = "SELECT product_id from products WHERE category_id='".$parent."'";
        if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
        {
            exit( "Couldn't get data from products db" );
        }
        $numrows = mysql_num_rows( $result3 );
        if ( $numrows < 1 )
        {
            $linker = "";
        }
        else
        {
            $linker = "<input type=\"button\" class=\"list\" onclick=\"location.href='".$adminurl."products/productlist.php?category_id={$row1['category_id']}'\" value=\"Products ({$numrows})\" />";
        }
        echo "\t<tr>\n\t\t<td> » (".$level.") <a href=\"{$adminurl}products/editcategory.php?category_id={$row1['category_id']}\" title=\"{$row1['category_desc']}\">{$row1['category_name']}</a></td>\n\t\t\t<td>";
        if ( $row1[category_publish] == Y )
        {
            echo "<input type=\"button\" class=\"deactivate\" value=\"(click to deactivate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row1['category_id']}&act=N'\" />";
        }
        else
        {
            echo "<input type=\"button\" class=\"activate\" value=\"(click to activate)\" onclick=\"location.href='".$adminurl."products/bin/categoryonoff.php?category_id={$row1['category_id']}&act=Y'\" />";
        }
        echo "</td> \n\t\t\t<td><input type=\"button\" class=\"add\" onclick=\"location.href='".$adminurl."products/addproduct.php?category_id={$row1['category_id']}'\" value=\"Add\" /> {$linker}</td>\n\t\t\t<td> <input type=\"button\" class=\"edit\" onclick=\"location.href='{$adminurl}products/editcategory.php?category_id={$row1['category_id']}'\" value=\"Edit\" /> <input type=\"button\" class=\"delete\" value=\"DELETE\" onclick='usr_conf(\"{$adminurl}products/bin/deletecategory.php\",\"category_id={$row1['category_id']}\",\"Are you sure you want to delete this category?\");' /></td>\n\t</tr>\n";
        getchildrenlist( $parent, $level );
        $last_level = $level;
    }
}

function productcheckcategories( )
{
    global $connection;
    global $oktoadd;
    $sql3 = "SELECT * from categories";
    if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
    {
        exit( "Couldn't get data from category db" );
    }
    $numrows = mysql_num_rows( $result3 );
    if ( 1 <= $numrows )
    {
        $oktoadd = "Y";
    }
}

function countrycompareDD( $country_dd )
{
    global $connection;
    echo "<select name=\"country\">";
    $sql3 = "SELECT country_short, country_long from country WHERE zone_id !='0'";
    if ( !( $result3 = @mysql_query( $sql3, $connection ) ) )
    {
        exit( "Couldn't execute request 1" );
    }
    while ( $row3 = mysql_fetch_array( $result3 ) )
    {
        if ( $row3[country_short] == $country_dd )
        {
            echo "<option value=\"".$row3['country_short']."\" selected>{$row3['country_long']}</option>\n";
        }
        else
        {
            echo "<option value=\"".$row3['country_short']."\">{$row3['country_long']}</option>\n";
        }
    }
    echo "</select>";
}

function alternatecolour( $level )
{
    global $altclass;
    $class_1 = " class=altlight";
    $class_2 = " class=altdark";
    $altclass = $class_1;
    $level % 2 ? 0 : ( $altclass = $class_2 );
}

function check_email_address( $email )
{
    if ( !ereg( "[^@]{1,64}@[^@]{1,255}", $email ) )
    {
        return FALSE;
    }
    $email_array = explode( "@", $email );
    $local_array = explode( ".", $email_array[0] );
    $i = 0;
    for ( ; $i < sizeof( $local_array ); ++$i )
    {
        if ( ereg( "^(([A-Za-z0-9!#\$%&'*+/=?^_`{|}~-][A-Za-z0-9!#\$%&'*+/=?^_`{|}~\\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))\$", $local_array[$i] ) )
        {
            continue;
        }
        return FALSE;
    }
    if ( !ereg( "^\\[?[0-9\\.]+\\]?\$", $email_array[1] ) )
    {
        $domain_array = explode( ".", $email_array[1] );
        if ( sizeof( $domain_array ) < 2 )
        {
            return FALSE;
        }
        $i = 0;
        for ( ; $i < sizeof( $domain_array ); ++$i )
        {
            if ( ereg( "^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))\$", $domain_array[$i] ) )
            {
                continue;
            }
            return FALSE;
        }
    }
    return TRUE;
}

$sYear = "2007";
$cwd = dirname( __FILE__ );
$instdir = str_replace( "private", "", "{$cwd}" );
include( "{$instdir}private/config.php" );
include( "{$instdir}private/cache.php" );
if ( !$shopurl )
{
    header( "Location: install/" );
    exit( );
}
include( "{$instdir}private/db_connect.php" );
include( "{$instdir}private/messages.php" );
include( "{$instdir}private/shop_messages.php" );
$admin_dirs = array( "settings", "orders", "newsletter", "reports", "shoppers", "products", "content" );
$mtta = array( "mail", "smtp" );
$ppgfields = array( "ppemail", "ppmerchantid", "ppsecret", "pptestmode", "ppinstid", "ppintip", "ppextip", "ppgiftaid", "ppApply3DSecure", "ppApplyAVSCV2", "ppauthmode", "ppsignature" );
$category_style = array( "List with Thumbnail", "List no Thumbnail", "Grid 2 Across", "Grid 3 Across", "Grid 4 Across", "Grid 5 Across" );
$category_sort_order = array( "Alphabetical", "Newest Items First", "Newest Items Last", "Featured Items First", "Custom Sort", "Price Low - High", "Price High - Low" );
$sf_style = array( "List", "Grid 2 Across", "Grid 3 Across", "Grid 4 Across", "Grid 5 Across" );
$sf_sort_order = array( "Alphabetical", "By ID", "Randomised" );
$cf_sort_order = array( "Alphabetical", "By ID", "Custom" );
$allow_next = array( "selectdeliveryaddress.php", "revieworder.php", "reviewproduct.php", "revieworder.php?clearptid=Y", "orders.php" );
if ( $_GET[next] && !in_array( "{$_GET['next']}", $allow_next ) )
{
    echo "Not allowed!";
    exit( );
}
$GLOBALS['_GET'][category_id] = mysql_real_escape_string( "{$_GET['category_id']}" );
$GLOBALS['_GET'][product_id] = mysql_real_escape_string( "{$_GET['product_id']}" );
$GLOBALS['_GET'][product_xo_id] = mysql_real_escape_string( "{$_GET['product_xo_id']}" );
$GLOBALS['_GET'][o_id] = mysql_real_escape_string( "{$_GET['o_id']}" );
$GLOBALS['_GET'][p_id] = mysql_real_escape_string( "{$_GET['p_id']}" );
$GLOBALS['_GET'][a_id] = mysql_real_escape_string( "{$_GET['a_id']}" );
$GLOBALS['_POST'][query_string] = mysql_real_escape_string( "{$_POST['query_string']}" );
$GLOBALS['_POST'][new_currency_id] = mysql_real_escape_string( "{$_POST['new_currency_id']}" );
$GLOBALS['_POST'][pre_xo_id] = mysql_real_escape_string( "{$_POST['pre_xo_id']}" );
$GLOBALS['_POST'][p_id] = mysql_real_escape_string( "{$_POST['p_id']}" );
$GLOBALS['_POST'][qty] = mysql_real_escape_string( "{$_POST['qty']}" );
$GLOBALS['_POST'][loginemail] = mysql_real_escape_string( "{$_POST['loginemail']}" );
$GLOBALS['_POST'][loginpass] = mysql_real_escape_string( "{$_POST['loginpass']}" );
$GLOBALS['_POST'][mail_outs] = mysql_real_escape_string( "{$_POST['mail_outs']}" );
$GLOBALS['_POST'][old_password] = mysql_real_escape_string( "{$_POST['old_password']}" );
$GLOBALS['_POST'][confirm_password] = mysql_real_escape_string( "{$_POST['confirm_password']}" );
$GLOBALS['_GET'][category_id] = mysql_real_escape_string( "{$_GET['category_id']}" );
$GLOBALS['_GET'][product_id] = mysql_real_escape_string( "{$_GET['product_id']}" );
$GLOBALS['_GET'][new_currency_id] = mysql_real_escape_string( "{$_GET['new_currency_id']}" );
$GLOBALS['_GET'][new_currency_id] = mysql_real_escape_string( "{$_GET['new_currency_id']}" );
$search = array( "@<script[^>]*?>.*?</script>@si", "@<[\\/\\!]*?[^<>]*?>@si", "@&(quot|#34);@i", "@&(amp|#38);@i", "@&(lt|#60);@i", "@&(gt|#62);@i", "@&(nbsp|#160);@i", "@&(iexcl|#161);@i", "@&(cent|#162);@i", "@&(pound|#163);@i", "@&(copy|#169);@i", "@&#(\\d+);@e" );
$replace = array(
    "",
    "",
    "\\1",
    "\"",
    "&",
    "<",
    ">",
    " ",
    chr( 161 ),
    chr( 162 ),
    chr( 163 ),
    chr( 169 ),
    "chr(\\1)"
);
$GLOBALS['_POST'][company] = mysql_real_escape_string( "{$_POST['company']}" );
$GLOBALS['_POST'][company] = preg_replace( $search, $replace, $_POST[company] );
$GLOBALS['_POST'][first_name] = mysql_real_escape_string( "{$_POST['first_name']}" );
$GLOBALS['_POST'][first_name] = preg_replace( $search, $replace, $_POST[first_name] );
$GLOBALS['_POST'][last_name] = mysql_real_escape_string( "{$_POST['last_name']}" );
$GLOBALS['_POST'][last_name] = preg_replace( $search, $replace, $_POST[last_name] );
$GLOBALS['_POST'][email] = mysql_real_escape_string( "{$_POST['email']}" );
$GLOBALS['_POST'][email] = preg_replace( $search, $replace, $_POST[email] );
$GLOBALS['_POST'][no_name] = mysql_real_escape_string( "{$_POST['no_name']}" );
$GLOBALS['_POST'][no_name] = preg_replace( $search, $replace, $_POST[no_name] );
$GLOBALS['_POST'][street] = mysql_real_escape_string( "{$_POST['street']}" );
$GLOBALS['_POST'][street] = preg_replace( $search, $replace, $_POST[street] );
$GLOBALS['_POST'][town] = mysql_real_escape_string( "{$_POST['town']}" );
$GLOBALS['_POST'][town] = preg_replace( $search, $replace, $_POST[town] );
$GLOBALS['_POST'][county] = mysql_real_escape_string( "{$_POST['county']}" );
$GLOBALS['_POST'][county] = preg_replace( $search, $replace, $_POST[county] );
$GLOBALS['_POST'][postcode] = mysql_real_escape_string( "{$_POST['postcode']}" );
$GLOBALS['_POST'][postcode] = preg_replace( $search, $replace, $_POST[postcode] );
$GLOBALS['_POST'][country] = mysql_real_escape_string( "{$_POST['country']}" );
$GLOBALS['_POST'][country] = preg_replace( $search, $replace, $_POST[country] );
$GLOBALS['_POST'][day_tel] = mysql_real_escape_string( "{$_POST['day_tel']}" );
$GLOBALS['_POST'][day_tel] = preg_replace( $search, $replace, $_POST[day_tel] );
$GLOBALS['_POST'][eve_tel] = mysql_real_escape_string( "{$_POST['eve_tel']}" );
$GLOBALS['_POST'][eve_tel] = preg_replace( $search, $replace, $_POST[eve_tel] );
$GLOBALS['_POST'][mobile] = mysql_real_escape_string( "{$_POST['mobile']}" );
$GLOBALS['_POST'][mobile] = preg_replace( $search, $replace, $_POST[mobile] );
$GLOBALS['_POST'][fax] = mysql_real_escape_string( "{$_POST['fax']}" );
$GLOBALS['_POST'][fax] = preg_replace( $search, $replace, $_POST[fax] );
$GLOBALS['_POST'][emailaddress] = mysql_real_escape_string( "{$_POST['emailaddress']}" );
$GLOBALS['_POST'][emailaddress] = preg_replace( $search, $replace, $_POST[emailaddress] );
$GLOBALS['_POST'][password] = mysql_real_escape_string( "{$_POST['password']}" );
$GLOBALS['_POST'][password] = preg_replace( $search, $replace, $_POST[password] );
if ( $_GET[sssess] )
{
    session_id( $_GET[sssess] );
}
session_start( );
/*header( "cache-control: private" );*/
if ( isset( $_GET[redeempoints] ) && $_GET[redeempoints] == "Y" )
{
    $_SESSION[redeemer] = "Y";
}
if ( $_POST[purchaseorder] )
{
    $_SESSION[po] = "{$_POST['purchaseorder']}";
}
if ( !$_SESSION[loginemail] )
{
    $_SESSION[loginemail] = "noemail@email";
}
if ( !$_SESSION[adminemail] )
{
    $_SESSION[adminemail] = "noadmin@email";
}
if ( $_POST[discode] )
{
    $_SESSION[discode] = trim( "{$_POST['discode']}" );
}
$auth_ok_check = md5( "{$_SESSION['loginemail']}.{$hash}" );
$admin_ok_check = md5( "{$_SESSION['adminemail']}.{$hash}" );
if ( isset( $_GET['oidref'] ) )
{
    $GLOBALS['_GET']['oidref'] = mysql_real_escape_string( $_GET['oidref'] );
    $sql = "SELECT o_id FROM order_list WHERE ref='".$_GET['oidref']."' AND unh='{$_GET['oidref']}'";
    if ( !( $result = @mysql_query( $sql, $connection ) ) )
    {
        exit( "**COULD NOT GET COPYRIGHT KEYS**" );
    }
    if ( $row = mysql_fetch_array( $result ) )
    {
        $_SESSION['unh'] = $_GET['oidref'];
        header( "location: ".$sshopurl."orderdetails_os.php?o_id={$row['o_id']}" );
        exit( );
    }
    if ( $_SESSION['auth_ok'] == $auth_ok_check )
    {
        header( "location: ".$sshopurl."secure/orders.php" );
        exit( );
    }
    header( "location: ".$sshopurl."secure/login.php?next=orders.php" );
    exit( );
}
if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/doqreg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/qreg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/voicepaycallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/secpaysecpagecallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/vps_handle_protx_response.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protx/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protxformcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/protxcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/worldpaycallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/securetradingcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/barclayscpicallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/paypalcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/moneybookerscallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/nochexcallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/offlinecallback.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/doregister.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/register.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/doprereg.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/login.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/dologin.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $auth_ok_check != $_SESSION[auth_ok] )
    {
        header( "Location: ".$sshopurl."secure/login.php?next={$_GET['next']}&shk&p={$_SERVER['PHP_SELF']}" );
        exit( );
    }
    if ( preg_match( "/secure/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isaccount = "1";
    }
}
if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) && !preg_match( "/adlogin.php/", "{$_SERVER['PHP_SELF']}" ) || !preg_match( "/forgetful.php/", "{$_SERVER['PHP_SELF']}" ) )
{
    if ( $admin_ok_check != $_SESSION[admin_ok] )
    {
        header( "Location: ".$adminurl."adlogin.php" );
        exit( );
    }
    if ( preg_match( "/".$adminDir."/", "{$_SERVER['PHP_SELF']}" ) )
    {
        $isadmin = "1";
    }
}
$noadirs = count( $admin_dirs );
$i = 0;
for ( ; $i <= $noadirs; ++$i )
{
    if ( !preg_match( "/admin\\/".$admin_dirs[$i]."/", "{$_SERVER['PHP_SELF']}" ) && preg_match( "/".$admin_dirs[$i]."/", "{$_SESSION['admin_type']}" ) )
    {
        continue;
    }
    header( "Location: ".$adminurl."perms.php?noperm={$admin_dirs[$i]}" );
    exit( );
}
if ( !$_SESSION[shopper_type] )
{
    $_SESSION[shopper_type] = "1";
}
if ( $_GET[setcurrency] == 1 )
{
    if ( $_GET[new_currency_id] )
    {
        $GLOBALS['_POST'][new_currency_id] = $_GET[new_currency_id];
    }
    $_SESSION['currency_id'] = $_POST[new_currency_id];
}
if ( $_GET[clearptid] == Y )
{
    session_unregister( "ptid" );
}
if ( $_GET[selectpostage] == 1 )
{
    if ( $_POST[selptid] == Free || $_POST[selptid] == free )
    {
        session_unregister( "ptid" );
    }
    else if ( isset( $_POST[selptid] ) )
    {
        $_SESSION['ptid'] = $_POST[selptid];
    }
    else
    {
        session_unregister( "ptid" );
    }
    $GLOBALS['_POST'][selptid] = mysql_real_escape_string( $_POST[selptid] );
    $sql1 = "UPDATE basket SET ptid='".$_POST['selptid']."' WHERE session_id='".session_id( )."'";
    if ( !( $result1 = @mysql_query( $sql1, $connection ) ) )
    {
        exit( "Couldn't execute request 1" );
    }
}
?>

 

 

Link to comment
Share on other sites

do these files exist? i would echo the paths and make sure.

 

$config = "{$instdir}private/config.php";
$cache = "{$instdir}private/cache.php";
$dbc = "{$instdir}private/db_connect.php";
$msgs = "{$instdir}private/messages.php";
$smsgs = "{$instdir}private/shop_messages.php";

echo "config: $config <br />";
echo "cache: $cache <br />";
echo "dbc: $dbc <br />";
echo "msgs: $msgs <br />";
echo "smsgs: $smsgs <br />";

include($config);
include($cache);
if ( !$shopurl ) {
    header("Location: install/");
    exit();
}
include($dbc);
include($msgs);
include($smsgs);

 

Link to comment
Share on other sites

Not sure what I did but things have now changed to this

 

Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/private/messages.php:53) in /home/site/public_html/private/file.php on line 553

 

Line 53 in messages.php is: $SHOPPERS_accexists = "There is already an account on the system that uses the email address ".$_GET['emailaddress'].", please remove that account and try again or use a different address!";

 

 

Line 553 in file.php is: header( "Location: ".$sshopurl."secure/login.php?next={$_GET['next']}&shk&p={$_SERVER['PHP_SELF']}" );

 

Thanks

Link to comment
Share on other sites

here is the code from messages.php I appreciate your help

 

errors

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/private/messages.php:53) in /home/xxxxx/public_html/private/corefunctions.php on line 535

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/private/messages.php:53) in /home/xxxxx/public_html/private/corefunctions.php on line 584

 

<?php
$DELIVERY_maxpriceadd = "You have successfully added a shipping rule";
$DELIVERY_maxpriceaddfailed = "There was an error! The value entered was not numeric, please try again";
$DELIVERY_maxpricedel = "You have successfully deleted a shipping rule";
$DELIVERY_maxpricenotdel = "There was an error! A value was missing and the rule was not deleted";
$DELIVERY_countryupdateok = "You have successfully updated shipping destinations";
$DELIVERY_countryadded = "You have successfully added new shipping destinations";
$DELIVERY_countryaddfailed = "There was an error! No variables were received by the script.";
$DELIVERY_countryaddfailednumeric = "There was an error! Tax rates MUST be NUMERIC values.";
$DELIVERY_countryupdatefailed = "Country update failed, missing parameters";
$DELIVERY_zoneexists = "The zone you have tried to add already exists, please try again";
$DELIVERY_zonecreated = "Your new shipping zone has been created, please add countries to this zone using the form below";
$DELIVERY_defaultzonechanged = "You have successfully changed the default shipping zone";
$DELIVERY_defaultzonechangefailed = "Your attempt to change the default shipping zone failed due to a missing value, please try again";
$DELIVERY_zoneaddfailed = "Your attempt to add a new shipping zone failed because of a missing value, please try again";
$DELIVERY_zonedeletefailed = "Your attempt to delete a shipping zone failed due to a missing value, please try again";
$DELIVERY_zonedeletesuccess = "You successfully deleted a shipping zone";
$DELIVERY_codeexists = "The code you have tried to add already exists, please try again";
$DELIVERY_codecreated = "Your new code has been created";
$DELIVERY_codeaddfailed = "Your attempt to add a new code failed because of a missing value, please try again";
$DELIVERY_codeupdated = "The code has been successfully updated";
$DELIVERY_codedeleted = "The code has been successfully deleted";
$DELIVERY_typeaddfailed = "Your attempt to add a new shipping type failed because of a missing value, please try again";
$DELIVERY_typeexists = "The shipping type you have tried to add already exists, please try again";
$DELIVERY_typecreated = "Your new shipping type has been created, use the links below to add applicable zones, weights and prices";
$DELIVERY_typedeleted = "The shipping type has been successfully deleted";
$DELIVERY_typeupdated = "The shipping type has been successfully updated";
$DELIVERY_wbcreated = "Your new weight bands have been created";
$DELIVERY_wbcreatedwitherrors = "Your new weight bands have been created, although 1 or more had errors and were omitted because they included non numeric characters or had missing values";
$DELIVERY_wbcreatefailed = "There was an error! 1 or more of the values you entered was not numeric, please make sure you do not enter any symbols or letters";
$DELIVERY_wbdeleted = "The weight band has been successfully deleted";
$DELIVERY_wbexists = "The weight band you have tried to add already exists, please try again";
$DELIVERY_wbaddfailed = "Your attempt to add a new weight band failed because of a missing value, please try again";
$DELIVERY_typezonedeleted = "The zone has been successfully deleted from the applicable zones list";
$DELIVERY_typezoneadded = "The zone has been added to the applicable zones list";
$DELIVERY_typezoneexists = "The zone already exists in the applicable zones list";
$DELIVERY_czoneadded = "The country has been successfully added to the zone";
$DELIVERY_czoneaddfailed = "There was an error! A required value was missing, please return to 'Shipping Zones'";
$DELIVERY_czonedeleted = "The selected countries have been removed from the zone";
$DELIVERY_delzoneok = "The Zone has been successfully deleted";
$DELIVERY_wbupdateok = "You successfully updated the weight bands";
$DELIVERY_wbupdatefailed = "There was an Error! A required value was missing, please try again";
$SHOPPERS_shopperupdated = "This shoppers details have been successfully updated";
$SHOPPERS_shoppertypeexists = "This shopper type already exists, please try again using an alternative";
$SHOPPERS_shoppertypeadded = "Your new shopper type has been added";
$SHOPPERS_shoppertypefailed = "Your attempt to add a new shopper type failed because of a missing value, please try again";
$SHOPPERS_shoppertypeupdated = "The shopper type has been successfully updated";
$SHOPPERS_shoppertypeupdatefailed = "The update did not run. The 'standard' shopper type cannot be updated as it is required for the system to operate.";
$SHOPPERS_shoppertypedeleted = "The shopper type has been successfully deleted";
$SHOPPERS_emailerror = "The email address you entered for this shopper account is malformed, please check and try again";
$SHOPPERS_passerror = "The password you entered for this shopper account is not long enough, please check and try again";
$SHOPPERS_missingvalues = "You did not complete all of the fields required to create a new shopper account, please try again!";
$SHOPPERS_accexists = "There is already an account on the system that uses the email address ".$_GET['emailaddress'].", please remove that account and try again or use a different address!";
$SHOPPERS_newaccount = "You successfully created a new account and it should be visible in the list below.";
$ORDERS_orderstatusupdated = "The status of this order has been successfully updated";
$ORDERS_statusadded = "You have successfully added an order status";
$ORDERS_statusaddfailed = "There was an error, the status you attempted to add was missing a value, please try again";
$ORDERS_cantdelstatus = "This is a required system status and cannot be deleted. Please update it - you cannot remove it!";
$ORDERS_orderstatusdeleted = "You have successfully deleted an order status";
$ORDERS_orderstatusupdated = "You have successfully updated an order status";
$ORDERS_statusupdatefailed = "The order status could not be updated as there was a required value missing";
$ORDERS_findorderfailed = "That order could not be located, either it does not exist or, you failed to enter a value!";
$ORDERS_trackingadded = "You have successfully added a tracking type";
$ORDERS_trackingaddfailed = "Error! Could not add tracking type as a value was missing - try again.";
$ORDERS_trackingdeleted = "You have successfully deleted a tracking type.";
$ORDERS_discountcodeexists = "The discount code you tried to add already exists.";
$ORDERS_discountcodeadded = "You have successfully added a discount code.";
$ORDERS_discountcodeaddfailed = "Could not add the discount code as a value was missing.";
$ORDERS_discountcodedeleted = "You have successfully deleted a discount code.";
$ORDERS_orderdeleted = "You have successfully deleted an order.";
$PRODUCTS_categoryexists = "The category you have tried to add already exists";
$PRODUCTS_categoryadded = "The new category has been successfully added";
$PRODUCTS_addcategoryfailed = "Your attempt to add a new category failed because of a missing value, please try again";
$PRODUCTS_categoryupdated = "This category has been updated successfully";
$PRODUCTS_categorychildren = "You cannot delete this category, please remove all child categories and try again";
$PRODUCTS_categoryproducts = "You cannot delete this category, please remove all products from this category and try again";
$PRODUCTS_categorydeleted = "This category has been deleted successfully";
$PRODUCTS_categorydeletefailed = "This category cannot be deleted";
$PRODUCTS_productadd1 = "Your product details have been added, please scroll down the page to continue with the next step";
$PRODUCTS_productaddfailed = "Error! product could not be added because of a missing field, please try again";
$PRODUCTS_productupdated = "The product descriptionhas been successfully updated";
$PRODUCTS_productupdatefailed = "Error! The product name field was empty so the update was not successful, please try again";
$PRODUCTS_productaddprice = "The price and shipping option have been added successfully";
$PRODUCTS_optionadded = "New price and shipping options for this product have been added successfully";
$PRODUCTS_optionupdated = "Price and shipping options for this product have been updated successfully";
$PRODUCTS_imageadded = "Your image for this product has been added successfully";
$PRODUCTS_imagedeleted = "The image for this product has been removed successfully";
$PRODUCTS_productaddtocategory = "Product has been successfully added to category";
$PRODUCTS_productaddtocatfailedhome = "Error! The product will automatically display in the category as it is it's parent category!";
$PRODUCTS_productdelfromcategory = "Product has been successfully removed from category";
$PRODUCTS_updateprodlinksok = "Linked products have been updated successfully";
$PRODUCTS_updateprodlinksfailed = "There was an error! A required value was missing and the update failed";
$PRODUCTS_deletelinkfailed = "There was an error! A required value was missing and the deletion failed";
$PRODUCTS_deletelinksuccess = "The product link was successfully removed";
$PRODUCTS_prodclonefailed = "There was an error! A required value was missing and the product clone failed";
$PRODUCTS_prodclonesuccess = "The product was successfully cloned, you are now editing the new product!";
$PRODUCTS_brandcreated = "You have successfully created a new brand.";
$PRODUCTS_brandupdated = "You have successfully updated the brand.";
$PRODUCTS_branddeletesuccess = "You have successfully deleted the brand from the store.";
$PRODUCTS_updatebrandfailed = "The brand could not be updated as a value was missing.";
$PRODUCTS_catonoff = "You have successfully updated the status of a category.";
$PRODUCTS_genericfail = "There was an error! Probably due to a missing value.";
$PRODUCTS_sladdfailed = "There was an error! Probably due to a missing value.";
$PRODUCTS_ddupdated = "You have successfully updated the drop down.";
$PRODUCTS_sldeletesuccess = "You have successfully removed a dropdown.";
$PRODUCTS_ddcreated = "You have successfully created a dropdown selector.";
$PRODUCTS_sfupdated = "You have successfully updated this selling function.";
$PRODUCTS_brandaddfailed = "There was an error! Probably due to a missing value.";
$SETTINGS_storedetailsupdated = "Your shop details have been updated successfully";
$SETTINGS_settingsupdated = "Your payment method details have been updated successfully";
$SETTINGS_currencyexists = "The currency you have tried to add already exists, please try again";
$SETTINGS_currencyadded = "The currency has been added successfully";
$SETTINGS_currencyaddfailed = "Your attempt to add a new currency failed because of a missing value, please try again";
$SETTINGS_currencyupdated = "Currency settings have been updated successfully";
$SETTINGS_currencyupdatefailed = "Your attempt to update your currency settings failed because of a missing value, please try again";
$SETTINGS_currencydeleted = "The currency has been successfully deleted";
$SETTINGS_cmsupdated = "The content for this page have been successfully updated";
$SETTINGS_pageadded = "You have successfully added a page.";
$SETTINGS_pageaddfailed = "Page could not be added as a value was missing.";
$SETTINGS_pagedeleted = "You have successfully deleted a page.";
$SETTINGS_cmsfailed = "There was a missing value - is the page title box empty?? Please select the page again!";
$SETTINGS_newsdelok = "News item has been successfully removed";
$SETTINGS_newsupdateok = "News item has been updated successfully";
$SETTINGS_newsfail = "Your attempt to update the news item has failed because of a missing value";
$SETTINGS_newsaddok = "News item has been successfully added";
$SETTINGS_newsaddfailed = "Your attempt to add a news item has failed because of a missing value";
$SETTINGS_metacontentupdated = "You have successfully updated your store's default meta content";
$SETTINGS_homecountryset = "You have successfully set your store's home country";
$SETTINGS_taxationset = "You have successfully set your store's tax rule";
$SETTINGS_currencyset = "You have successfully set your store's home currency";
$SETTINGS_userupdatefailed = "User update failed due to a missing value";
$SETTINGS_userupdated = "You have successfully updated a user account";
$SETTINGS_userdeleted = "You have successfully removed a user account";
$SETTINGS_pointsupdated = "You have successfully updated loyalty points settings";
$SETTINGS_minupdated = "You have successfully updated the minimum order value";
$SETTINGS_thumbupdated = "You have successfully updated the default thumbnail width for auto scaling";
$SETTINGS_useradded = "You have successfully added a new admin user.";
$SETTINGS_cacheok = "You have successfully updated cache settings.";
$SETTINGS_cachefile = "Your cache settings file is either not present or writeable - please check the /private/cache.php file exists and is writeable.";
$SETTINGS_cachevar = "There was a missing value - please try again!";
$ROOT_userupdated = "You have successfully updated this admin user's settings.";
$ROOT_useradded = "You have successfully added a new admin user.";
$ROOT_useraddfailed = "Unable to add new admin user due to missing values - please try again!";
$ROOT_adminexists = "This user already exists!";
$ROOT_userdeleted = "You successfully removed an admin user from the system!";
$ROOT_newsletterconfigupdated = "Newsletter configuration has been updated!";
$ROOT_ppgupdated = "Payment method was successfully updated!";
$ROOT_updateppgfailed = "Payment method update failed!";
$INDEX_nosuchuser = "The email address or password you entered did not match any on record.";
$INDEX_loginfail = "You did not enter both a username and password - please try again.";
$INDEX_logoutok = "You have successfully logged out of the store control panel.";
define( "SS_FM_title_bar", "File Management" );
define( "SS_FM_current_dir", "Current Folder" );
define( "SS_FM_back", "« Up a level" );
define( "SS_FM_close", "(x) Close" );
define( "SS_FM_mkdir_label", "Create Folder" );
define( "SS_FM_upload_label", "Upload" );
define( "SS_FM_confirm_delete", "Are you sure you want to permanently delete: " );
define( "SS_FM_failed_upload", "Failed - mime type or file extension not permitted" );
$ss_fm_ext_array = array( "jpg", "jpe", "jpeg", "bmp", "png", "gif", "css", "zip", "tiff", "mpeg", "mp2", "mp3", "mpa", "mpe", "pdf", "ai", "avi", "doc", "htm", "html", "pps", "ppt", "xla", "xlc", "xlm", "xls", "xlt" );
$ss_fm_mime_types = array( "application/x-gtar", "application/x-tar", "application/zip", "application/x-zip", "image/gif", "image/jpeg", "image/png", "image/tiff", "video/mpeg", "text/plain", "application/pdf", "application/postscript", "video/x-msvideo", "application/msword", "text/html", "application/vnd.ms-powerpoint", "application/vnd.ms-excel" );
?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.