[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
 OpenForum.dk • Vis emne - Lille mod til Down for Maintenance

Lille mod til Down for Maintenance

Her kan du beskrive smarte løsninger og tips til andre.

Redaktør: Redaktionen

Lille mod til Down for Maintenance

Indlægaf BlackCap » 2007-08-31 09:22

Hvis du bruger og gerne vil kunne give mere ene en administrator (IP) adgang til shoppen, sååååååå.....

i catalog/includes/application_top.php FIND
[php]if (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE != getenv('REMOTE_ADDR')){[/php]

og ERSTAT med
[php]$ExcludeIP = explode(" ", EXCLUDE_ADMIN_IP_FOR_MAINTENANCE);
if (!in_array(getenv('REMOTE_ADDR'), $ExcludeIP)) {
[/php]

I catalog/includes/header.php find
[php] if ( (DOWN_FOR_MAINTENANCE == 'true') && (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE == getenv('REMOTE_ADDR')) ) {[/php]
erstat med
[php] if ( (DOWN_FOR_MAINTENANCE == 'true') && (in_array(getenv('REMOTE_ADDR'), $ExcludeIP)) ) {[/php]


nu kan du så angive de ipadresser som skal ha adgang med mellemrum mellem dem... (127.0.0.1 192.168.1.1 osv.)

BlackCap

Update... tilføjet koden til header.php så det hele er samlet i denne "post"

Tak til Michael for at gøre opmærksom på header.php osse skulle laves om.
Senest rettet af BlackCap 2007-09-2 14:25, rettet i alt 1 gang.
BlackCap
Oldtimer :o)
Oldtimer :o)
 
Indlæg: 258
Tilmeldt: 2006-11-5 19:29
Geografisk sted: 8670

Indlægaf Michael » 2007-08-31 13:18

Demoshop : www.The-Exterminator.dk
_________________
Knapper til din shop :
_________________
Contri jeg har været med i : http://addons.oscommerce.com/profile/94952
Brugeravatar
Michael
Ekspert medlem
Ekspert medlem
 
Indlæg: 1593
Tilmeldt: 2006-01-15 10:43
Geografisk sted: Ballerup

Indlægaf BlackCap » 2007-08-31 20:23

hmmm, det virker nu fint for mig med det mellemrum, hvorfor kan jeg så ikke lige sige... Men ville nu gerne vide hvorfor....

kan godt se at man ikke får den warning med, den havde jeg ikke lige selv opdaget..

Så derfor...

I header.php find
[php] if ( (DOWN_FOR_MAINTENANCE == 'true') && (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE == getenv('REMOTE_ADDR')) ) {[/php]
erstat med
[php] if ( (DOWN_FOR_MAINTENANCE == 'true') && (in_array(getenv('REMOTE_ADDR'), $ExcludeIP)) ) {[/php]

BlackCap
Senest rettet af BlackCap 2007-08-31 20:49, rettet i alt 1 gang.
BlackCap
Oldtimer :o)
Oldtimer :o)
 
Indlæg: 258
Tilmeldt: 2006-11-5 19:29
Geografisk sted: 8670

Indlægaf Michael » 2007-08-31 20:29

BlackCap >> jeg har osse fået mellemrummet til at virke, jeg skulle bare lige gøre lidt mere i min. Men kan ikke får warning til at virke, ved ikke om du kan. Ville være godt hvis man kunne få den med.
Demoshop : www.The-Exterminator.dk
_________________
Knapper til din shop :
_________________
Contri jeg har været med i : http://addons.oscommerce.com/profile/94952
Brugeravatar
Michael
Ekspert medlem
Ekspert medlem
 
Indlæg: 1593
Tilmeldt: 2006-01-15 10:43
Geografisk sted: Ballerup

Indlægaf BlackCap » 2007-11-14 11:11

så er jeg her igen med en lille tilføjelse til contribben..

i admin/configuration.php skal du erstatte den gamle kode

[php] // *** Add for getting the actual IP (when not fix)
if ($HTTP_GET_VARS['gID'] == '15') {
$IP_Admin = tep_db_prepare_input(getenv(REMOTE_ADDR));
$IP_Admin_DB_query = tep_db_query ("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE'");
$IP_Admin_DB = tep_db_fetch_array($IP_Admin_DB_query);
if ($IP_Admin_DB['configuration_value'] != $IP_Admin) {
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $IP_Admin . "' where configuration_key = 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE'");
}
}
// *** end[/php]

med .....

[php] // *** Add for getting the actual IP (when not fix) (Check at gID er rigtigt i forhold til config tabellen)
if ($HTTP_GET_VARS['gID'] == '17') {
$IP_Admin = tep_db_prepare_input(getenv(REMOTE_ADDR));

$IP_Admin_DB_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE'");
$IP_Admin_DB = tep_db_fetch_array($IP_Admin_DB_query);

if (empty($IP_Admin_DB['configuration_value'])) {
// hvis ingen ip er i db'en
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $IP_Admin . "' where configuration_key = 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE'");
} else {
$ExcludeIP = explode(" ", $IP_Admin_DB['configuration_value']);
if (!in_array(getenv('REMOTE_ADDR'), $ExcludeIP)) {
$IP_Admin = $IP_Admin . ' ' . $IP_Admin_DB['configuration_value'];
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $IP_Admin . "' where configuration_key = 'EXCLUDE_ADMIN_IP_FOR_MAINTENANCE'");
}
}
}
// *** end[/php]

resultatet bliver at din ip tilføjes og ikke vil overskrive som i den gamle..

BlackCap
BlackCap
Oldtimer :o)
Oldtimer :o)
 
Indlæg: 258
Tilmeldt: 2006-11-5 19:29
Geografisk sted: 8670


Tilbage til Tips & Tricks

Hvem er online

Brugere der læser dette forum: Ingen tilmeldte og 9 gæster

cron