Jump to content
xt:Commerce Community Forum

Neue Contribution: "down For Maintenance"


gswkaiser

Recommended Posts

Hallo,

ich habe das Modul ins das v3.0.3 eingebaut.

Nun habe ich damit folgendes Problem.

Setze ich "Vor der Wartungsabschaltung eine WARNUNG anzeigen" auf true, dann erhalte ich folgende Fehlermeldung, wenn ich mich ins Admin Menue einloggen will.

Fatal error: Call to undefined function: xtc_output_warning() in /www/htdocs/erotikdr/inc/down_for_maintenance.php on line 56

Die Zeile 56 sieht so aus:

xtc_output_warning($ErrorMessage);

Habe hier auch den kompletten Code.

<?php

// W. Kaiser BOF: Down for Maintenance except for admin ip or admin password

// Check for "Down for Maintenance" and allow processing or not


if (DOWN_FOR_MAINTENANCE == 'true')

{

	if (!$_SESSION['allowmaintenance']) 

	{

 ?// set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true

 ?if (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true')

 ?{

 ?	xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '

 ? ? ?now()' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); 

 ?}

 ?//Check if user is allowed to work

 ?$RemoteAdress=getenv('REMOTE_ADDR');

 ?if ($RemoteAdress == EXCLUDE_ADMIN_IP_FOR_MAINTENANCE)

 ?{

 ?	// ADMIN_IP --> Allow working

 ?}

 ?elseif ($_GET['allowmaintenance'] == ADMIN_PASSWORD_FOR_MAINTENANCE)

 ?{

 ?	// "allowmaintenance"-password --> Allow working

 ?}

 ?elseif ($RemoteAdress == "127.0.0.1")

 ?{

 ?	// Local system --> Allow working

 ?}

 ?else

 ?{

 ?	// No special user --> Show info

 ? ? ?xtc_redirect(xtc_href_link(FILENAME_DOWN_FOR_MAINTENANCE, '', 'NONSSL'));


 ?}

 ?$_SESSION['allowmaintenance']=true;

	}

	$ErrorMessage = TEXT_ADMIN_DOWN_FOR_MAINTENANCE;

}

elseif (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') 

{

	$ErrorMessage = TEXT_BEFORE_DOWN_FOR_MAINTENANCE;

}

if ($ErrorMessage != '') 

{

	$IsAdminFunction = strpos($_SERVER['REQUEST_URI'],'/admin/') > 0;

	if (PERIOD_DOWN_FOR_MAINTENANCE != '') 

	{

 ?$ErrorMessage .= " (" . DOWN_FOR_MAINTENANCE_NAME . ' ' . ltrim(PERIOD_DOWN_FOR_MAINTENANCE).")";

	}

	if ($IsAdminFunction) 

	{

 ?$messageStack->add($ErrorMessage, 'warning');

	}

	else 

	{

 ?xtc_output_warning($ErrorMessage);

	}

}


// ?W. Kaiser EOF: WebMakers.com Added: Down for Maintenance

?>

Ich hoffe das Ihr bei meinem Problem helfen k?nnt.

Gru?

Grandpiano

P.S. Habe mein Problem auch nochmal im Sponsoren Bereich gepostet aber leider noch keine Antwort. :cry:

Link to comment
Share on other sites

Originally posted by grandpiano@Apr 19 2005, 14:33 PM

Hallo,

ich habe das Modul ins das v3.0.3 eingebaut.

Nun habe ich damit folgendes Problem.

Setze ich "Vor der Wartungsabschaltung eine WARNUNG anzeigen" auf true, dann erhalte ich folgende Fehlermeldung.

Fatal error: Call to undefined function: xtc_output_warning() in /www/htdocs/erotikdr/inc/down_for_maintenance.php on line 56

Die Zeile 56 sieht so aus:

xtc_output_warning($ErrorMessage);

Habe hier auch den kompletten Code.

<?php

// W. Kaiser BOF: Down for Maintenance except for admin ip or admin password

// Check for "Down for Maintenance" and allow processing or not


if (DOWN_FOR_MAINTENANCE == 'true')

{

	if (!$_SESSION['allowmaintenance']) 

	{

 // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true

 if (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true')

 {

 	xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '

   now()' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); 

 }

 //Check if user is allowed to work

 $RemoteAdress=getenv('REMOTE_ADDR');

 if ($RemoteAdress == EXCLUDE_ADMIN_IP_FOR_MAINTENANCE)

 {

 	// ADMIN_IP --> Allow working

 }

 elseif ($_GET['allowmaintenance'] == ADMIN_PASSWORD_FOR_MAINTENANCE)

 {

 	// "allowmaintenance"-password --> Allow working

 }

 elseif ($RemoteAdress == "127.0.0.1")

 {

 	// Local system --> Allow working

 }

 else

 {

 	// No special user --> Show info

   xtc_redirect(xtc_href_link(FILENAME_DOWN_FOR_MAINTENANCE, '', 'NONSSL'));


 }

 $_SESSION['allowmaintenance']=true;

	}

	$ErrorMessage = TEXT_ADMIN_DOWN_FOR_MAINTENANCE;

}

elseif (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') 

{

	$ErrorMessage = TEXT_BEFORE_DOWN_FOR_MAINTENANCE;

}

if ($ErrorMessage != '') 

{

	$IsAdminFunction = strpos($_SERVER['REQUEST_URI'],'/admin/') > 0;

	if (PERIOD_DOWN_FOR_MAINTENANCE != '') 

	{

 $ErrorMessage .= " (" . DOWN_FOR_MAINTENANCE_NAME . ' ' . ltrim(PERIOD_DOWN_FOR_MAINTENANCE).")";

	}

	if ($IsAdminFunction) 

	{

 $messageStack->add($ErrorMessage, 'warning');

	}

	else 

	{

 xtc_output_warning($ErrorMessage);

	}

}


// W. Kaiser EOF: WebMakers.com Added: Down for Maintenance

?>

Ich hoffe das Ihr bei meinem Problem helfen k?nnt.

Gru?

Grandpiano

P.S. Habe mein Problem auch nochmal im Sponsoren Bereich gepostet aber leider noch keine Antwort. :cry:

Ist das nicht eigentlich nur f?r die 2er Version passend?

Link to comment
Share on other sites

Originally posted by grandpiano@Apr 19 2005, 14:58 PM

Ja richtig, es ist f?r die V2. Aber ich wollte das Modul in die v3 ?bernehmen.

Ich denke mal das es nur um einen kleinen Fehler handelt.

F?r jede Hilfe bin ich Dankbar.

Gru?

Grandpiano

Gibt es in der V3 die Funktion "xtc_output_warning" ("inc/xtc_output_warning.inc.php")?

Offenbar nicht, wie die Fehlermeldung zeigt. In der V3 schein die "Warnungsausgabe" anders gel?st zu sein.

Link to comment
Share on other sites

Hi,

in der V3 gibt es die Datei im INC Ordner. Hier mal der Code:

<?php

/* -----------------------------------------------------------------------------------------

 ? $Id: xtc_output_warning.inc.php,v 1.1 2003/09/06 21:47:50 fanta2k Exp $ ? 


 ? XT-Commerce - community made shopping

 ? http://www.xt-commerce.com


 ? Copyright (c) 2003 XT-Commerce

 ? -----------------------------------------------------------------------------------------

 ? based on: 

 ? (c) 2000-2001 The Exchange Project ?(earlier name of osCommerce)

 ? (c) 2002-2003 osCommerce(general.php,v 1.225 2003/05/29); [url]www.oscommerce.com[/url] 

 ? (c) 2003 ?nextcommerce (xtc_output_warning.inc.php,v 1.3 2003/08/13); [url]www.nextcommerce.org[/url]

 ? 

 ? Released under the GNU General Public License 

 ? ---------------------------------------------------------------------------------------*/

 ? 

 ?function xtc_output_warning($warning) {

 ? ?new errorBox(array(array('text' => xtc_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $warning)));

 ?}


 ?>

Hast Du ne Idee woran mein Problem liegt?

Gru?

Grandpiano

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

hallo,

habe die Contri down_for_mantenance installiert musste aber feststellen, das nicht alles so funktioniert wie ich es gerne h?tte.

Nun um mir die ganze Arbeit der Deinstallation zu ersparen habe ich mich entschlossen das Ding umzuschreiben und habe es lokal mit v2.0 RC1.2 und v3.0.3 getestet.

F?r diejenigen die das Ergebnis auch testen m?chten habe ich nachfolgend alle n?tigen ?nderungen gepostet.

Voraussetzung:

Die Instalation der Contri down for maintenance wurde nach Anleitung durchgef?hrt.

Wichtig!: F?r die v3.0.3 muss die 18 in den Datenbankbefehlen ge?ndert werden ich habe 22 genommen.

Die folgenden ?nderungen m?ssen danach en bloc gemacht werden!

BEGIN

1.

Das Bild down_for_maintenance.gif aus

/images/

l?schen und in

/admin/images/

einf?gen.

2.

In Index.php die folgenden Zeilen am Ende des Skripts l?schen.


// W. Kaiser BOF: Down for Maintenance

require_once(DIR_FS_INC . 'xtc_output_warning.inc.php');

require_once(DIR_FS_INC . 'xtc_image.inc.php');

include( DIR_FS_INC . FILENAME_DOWN_FOR_MAINTENANCE);

// W. Kaiser BOF: Down for Maintenance

3. In /includes/header.php vor

// require theme based javascript

require('templates/'.CURRENT_TEMPLATE.'/javascript/general.js.php');

aber nach

<?php

folgende Anweisung einf?gen

if (DOWN_FOR_MAINTENANCE == 'true') ob_start();

und am Ende des Skripts nach

include(DIR_WS_INCLUDES.FILENAME_BANNER); 

folgende Anweisung einf?gen

include( DIR_FS_INC . FILENAME_DOWN_FOR_MAINTENANCE);

4. In /admin/down_for_maintenance.php Inhalt durch nachfolgendes Skript ersetzen

<?php

/*

 Created by: Linda McGrath [email][email protected][/email]


 Update by: fram 05-05-2003

 Updated by: Donald Harriman - 08-08-2003 - MS2


 down_for_maintenance.php v1.1


 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com


 Copyright (c) 2003 osCommerce


 Ported to xtCommerce by Winfried Kaiser


 Released under the GNU General Public License

*/


 require('includes/application_top.php');


 // require(DIR_WS_LANGUAGES . $language . '/' . DOWN_FOR_MAINTENANCE_FILENAME);


 // $breadcrumb->add(NAVBAR_TITLE, xtc_href_link(DOWN_FOR_MAINTENANCE_FILENAME));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>"> 

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="javascript" src="includes/general.js"></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

<!#header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!#header_eof //-->


<!#body //-->

<table border="0" width="100%" cellspacing="2" cellpadding="2">

<tr>

 <td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top">

  <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<!#left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!#left_navigation_eof //-->

  </table>

 </td>

<!#body_text //-->

 <td class="boxCenter" width="100%" valign="top">

  <table border="0" width="100%" cellspacing="0" cellpadding="2">

   <tr>

    <td>

     <table border="0" width="100%" cellspacing="0" cellpadding="0">

      <tr>

       <td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS . 'heading_configuration.gif'); ?></td>

       <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

      </tr>

      <tr>

       <td class="main" valign="top">XT Konfiguration</td>

      </tr>

     </table>

   </tr>

<!#body_text_eof //-->

<?php 

if (DOWN_FOR_MAINTENANCE == 'true') { 

 $maintenance_on_at_time_raw = xtc_db_query("select last_modified from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'DOWN_FOR_MAINTENANCE'"); 

 $maintenance_on_at_time= xtc_db_fetch_array($maintenance_on_at_time_raw); 

 define('TEXT_DATE_TIME', $maintenance_on_at_time['last_modified']); 

} 

?> 

<!#body_text //-->

<?php

if (ADMIN_PASSWORD_FOR_MAINTENANCE == 'password'){?> 

<tr>

 <td>

  <table style="border: 1px solid; border-color: #ff0000;" bgcolor="FDAC00" border="0" width="100%" align="center" cellspacing="0" cellpadding="0">

   <tr>

    <td>

     <div class"main"> 

      <table width="100%" border="0">

       <tr>

        <td width="1"><?php echo xtc_image(DIR_WS_ICONS . 'big_warning.gif'); ?></td>

        <td class="main"><?php echo DOWN_FOR_MAINTENANCE_WARNING_TEXT; ?></td>

        <td align="right"><?php echo xtc_image(DIR_WS_IMAGES . 'down_for_maintenance.gif', HEADING_TITLE); ?></td>

       </tr>

      </table>

     </div>

    </td>

   </tr>

  </table>

 </td>

</tr>

<?php }else{ ?>

<tr>

 <td>

  <table width="100%" align="center" cellspacing="0" cellpadding="0">

   <tr>

    <td>

     <div class"main"> 

      <table width="100%" border="0">

       <tr>

        <td class="pageHeading" align="center"><?php echo xtc_image(DIR_WS_IMAGES . 'down_for_maintenance.gif', HEADING_TITLE); ?></td>

       </tr>

      </table>

     </div>

    </td>

   </tr>

  </table>

 </td>

</tr>

<?php } ?>

<tr>

 <td><?php echo xtc_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

 <td>

  <table border="0" width="100%" cellspacing="0" cellpadding="2">

   <tr>

     <td align="center" class="pageHeading"><?php echo DOWN_FOR_MAINTENANCE_STATUS_TEXT; ?></td>

   </tr>

   <tr>

    <td align="center" width="100%" class="main"><?php echo DOWN_FOR_MAINTENANCE_TEXT_INFORMATION, DOWN_FOR_MAINTENANCE_TEXT_INFORMATION_LOGIN . '<br><strong>' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . 'index.php' . '?allowmaintenance=' . ADMIN_PASSWORD_FOR_MAINTENANCE . '<br><br>' . '<a href="' . xtc_href_link(FILENAME_DEFAULT, 'allowmaintenance=' . ADMIN_PASSWORD_FOR_MAINTENANCE) . '">' . xtc_image_button('button_review_approve.gif') . '</a></strong>'; ?></td>

   </tr>

  </table>

 </td>

</tr>

<tr>

 <td></td>

</tr>

</table>

</td>

</table>

<!#body_text_eof //-->

<!#body_eof //-->

<!#footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!#footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

5. In /inc/down_for_maintenance.php Inhalt durch folgendes Skript ersetzen

<?php

// W. Kaiser BOF: Down for Maintenance except for admin ip or admin password

// Check for "Down for Maintenance" and allow processing or not


if (DOWN_FOR_MAINTENANCE == 'false')

{

$_SESSION['allowmaintenance']=false;

}


if ((DOWN_FOR_MAINTENANCE == 'false') && (strpos($_SERVER['REQUEST_URI'],FILENAME_DOWN_FOR_MAINTENANCE)))

{

xtc_redirect(xtc_href_link(FILENAME_DEFAULT, '', 'NONSSL'));

}


if ((ADMIN_PASSWORD_FOR_MAINTENANCE == '') || (ADMIN_PASSWORD_FOR_MAINTENANCE == 'Ihr Passwort')) { 

 xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'password', last_modified = NOW() where configuration_key = 'ADMIN_PASSWORD_FOR_MAINTENANCE'");

}


if (DOWN_FOR_MAINTENANCE == 'true')

{

	// set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true

	if (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true')

	{

 xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = now() where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); 

	}

	if (!$_SESSION['allowmaintenance']) 

	{

 //Check if user is allowed to work

 $RemoteAdress=getenv('REMOTE_ADDR');

 if ($RemoteAdress == EXCLUDE_ADMIN_IP_FOR_MAINTENANCE)

  {

 	// ADMIN_IP --> Allow working

  }

  elseif ($_GET['allowmaintenance'] == ADMIN_PASSWORD_FOR_MAINTENANCE)

  {

 	// "allowmaintenance"-password --> Allow working

  }

  elseif ($RemoteAdress == "127.0.0.1")

  {

 	// Local system --> Allow working

  }

  elseif (!strpos($_SERVER['REQUEST_URI'],FILENAME_DOWN_FOR_MAINTENANCE))

  {

 	// No special user --> Show info

    xtc_redirect(xtc_href_link(FILENAME_DOWN_FOR_MAINTENANCE, '', 'NONSSL'));

  }

  else

  {

         return;

  }

 $_SESSION['allowmaintenance']=true;

	}

	$ErrorMessage = TEXT_ADMIN_DOWN_FOR_MAINTENANCE;

}

elseif (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') 

{

	$ErrorMessage = TEXT_BEFORE_DOWN_FOR_MAINTENANCE;

}

if ($ErrorMessage != '') 

{

	if (PERIOD_DOWN_FOR_MAINTENANCE != '') 

	{

 $ErrorMessage .= " (" . DOWN_FOR_MAINTENANCE_NAME . ' ' . ltrim(PERIOD_DOWN_FOR_MAINTENANCE).")";

	}

	if ((strpos($_SERVER['REQUEST_URI'],'/admin/')) === false)

	{

    if (!strpos($_SERVER['REQUEST_URI'],FILENAME_DOWN_FOR_MAINTENANCE))

      {

  xtc_output_warning($ErrorMessage);

      }

	}

	else

	{

 $messageStack->add($ErrorMessage, 'warning');

	}

}


// W. Kaiser EOF: WebMakers.com Added: Down for Maintenance

?>

6. In /lang/german/admin/ eine Datei mit Namen down_for_maintenance.php errichten und mit folgenden Inhalt einf?gen.

<?php


define('HEADING_TITLE', 'Down for maintenance');


define('DOWN_FOR_MAINTENANCE_WARNING_TEXT', '<b>WARNUNG:</b><br>Das Wartungsmodul dieses Shops ist auf das Standardpasswort<b> (password) </b>eingestellt.<br />Sie sollten aus Sicherheitsgründen unbedingt im Modul Wartungsarbeiten ein individuelles Passwort vergeben.');


define('DOWN_FOR_MAINTENANCE_STATUS_TEXT', 'Dieser Shop befindet sich jetzt im Wartungszustand');

define('DOWN_FOR_MAINTENANCE_TEXT_INFORMATION', '<br /><br /><strong>Wichtige Hinweise:</strong><br /><br />Als Administrator sollten Sie Cookies von diesem Shop zulassen.<br />Während der Wartungsabschaltung muss die Funktionalität des Shops gewährleistet sein.<br />');

define('DOWN_FOR_MAINTENANCE_TEXT_INFORMATION_LOGIN', 'Sollte Ihre Session ablaufen k?nnen Sie sich mit folgender Eingabe in der Adresszeile Ihres Browsers anmelden.');


?>

7. In /templates/aktuelles_template/module/down_for_maintenance.html Inhalt mit folgendem HTML ersetzen.

{config_load file="$language/lang_$language.conf" section="index"} 

 <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">

 	<tr>

  <td>

  	<table width="100%" border="0" cellspacing="0" cellpadding="0">

   <tr>

   	<td valign="top" width="92%" height="120"><br /><br /><img src="{$tpl_path}img/logo.gif" border="0" /></td>

   </tr>

  	</table>

  </td>

 	</tr>

 	<tr>

  <td>

  	<table width="100%" border="0" cellspacing="0" cellpadding="0">

   <tr>

   	<td><img src="{$tpl_path}img/pixel_trans.gif" alt="" height="70" width="1" /></td>

   </tr>

   <tr>

   	<td>

    <table width="100%" border="0">

    	<tr>

     <td class="errorBox" align="center" valign="top"><br />{$main_content}<br /><br /></td>

    	</tr>

    </table>

   	</td>

   </tr>

  	</table>

  </td>

 	</tr>

 	<tr>

  <td>

  	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">

   <tr>

   	<td align="center">{$BANNER}</td>

   </tr>

   <tr>

   	<td class="poweredby" align="center"><br />{#text_footer#}</td>

   </tr>

  	</table>

  </td>

 	</tr>

 </table>

8. !NUR F?R v3.0.3! In /admin/includes/column_left.php folgende Zeilen l?schen

//W. Kaiser Down for Maintenance

if ($_SESSION['customers_status']['customers_status_id'] == '0') 

{

   if ($admin_access['down_for_maintenance'] == '1')

  {

    echo ('<div class="menuBoxHeading"><b>'.BOX_HEADING_DOWN_FOR_MAINTENANCE .'</b></div>');

    echo '<a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=18', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_DOWN_FOR_MAINTENANCE . '</a><br>';

  }

}

//W. Kaiser Down for Maintenance

und am des Skripts folgende Anweisungen einf?gen

 //W. Kaiser Down for Maintenance

 if ($_SESSION['customers_status']['customers_status_id'] == '0') 

 {

   if ($admin_access['down_for_maintenance'] == '1')

  {

    echo ('<div class="dataTableHeadingContent"><b>'.BOX_HEADING_DOWN_FOR_MAINTENANCE .'</b></div>');

    echo '<a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=22', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_DOWN_FOR_MAINTENANCE . '</a><br>';

  }

 }

 //W. Kaiser Down for Maintenance

ACHTUNG!: Die giD (hier 22) muss mit Deinem Datenbakeintrag ?bereinstimmen (Siehe Installationsanleitung). ENDE So und nun noch wer m?chte kan (optional) in der /lang/german/admin/german.php die Zeile

define(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE_DESC, EXCLUDE_ADMIN_IP_FOR_MAINTENANCE_TITL . '<br>Diese IP-Addresse darf die Website w?hrend der Wartungsabschaltung bearbeiten (Administrator?)');

ersetzen mit

define(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE_DESC, EXCLUDE_ADMIN_IP_FOR_MAINTENANCE_TITLE . '<br>Diese IP-Addresse darf die Website w?hrend der Wartungsabschaltung bearbeiten (Administrator?)');

wer noch nicht genug hat kann in der MySQL noch folgenden Befehl ausf?hren

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ( 18, 'Down for maintenance', 'Down for maintenance', 18, 1)

ACHTUNG!: Die beiden 18 musst Du ev. anpassen (Siehe Installationsanleitung)

ICH HABE FERTIG!

Link to comment
Share on other sites

Hallo und sorry

leider muss ich bereits eine wichtige ?nderung bzw. zwei Nachtr?ge zu meinem obigem Beitrag anbringen.

1.

In /includes/header.php

vor


// require theme based javascript

require('templates/'.CURRENT_TEMPLATE.'/javascript/general.js.php');

aber nach

<?php

folgende Anweisung wieder l?schen bzw. nicht einf?gen

if (DOWN_FOR_MAINTENANCE == 'true') ob_start();

2. In admin/includes/application_top.php vor

 // initialize the logger class

 require(DIR_WS_CLASSES . 'logger.php');


 // include shopping cart class

 require(DIR_WS_CLASSES . 'shopping_cart.php');


 // some code to solve compatibility issues

 require(DIR_WS_FUNCTIONS . 'compatibility.php');

folgende Anweisung einf?gen

 if ((DOWN_FOR_MAINTENANCE == 'true') || (strpos($_SERVER['REQUEST_URI'],FILENAME_DOWN_FOR_MAINTENANCE))) ob_start();

3. In includes/application_top.php folgende Zeilen

 // if gzip_compression is enabled, start to buffer the output

 if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {

  if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {

   ob_start('ob_gzhandler');

  } else {

   ini_set('zlib.output_compression_level', GZIP_LEVEL);

  }

 }

erstzen mit folgenden Anweisungen

 if ((DOWN_FOR_MAINTENANCE == 'true') || (strpos($_SERVER['REQUEST_URI'],FILENAME_DOWN_FOR_MAINTENANCE))){

  ob_start();

 }else{

  // if gzip_compression is enabled, start to buffer the output

  if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {

   if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {

    ob_start('ob_gzhandler');

   } else {

    ini_set('zlib.output_compression_level', GZIP_LEVEL);

   }

  }

 } 

sorry

Link to comment
Share on other sites

Archived

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

×
  • Create New...