return $ret;
}
//
-function admin_WriteData ($file, $COMMENT, $PREFIX, $SUFFIX, $DATA, $SEEK=0)
+function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0)
{
- $DONE = false; $SEEK++; $found = false;
+ $done = false; $seek++; $found = false;
if (file_exists($file))
{
- $search = "CFG: ".$COMMENT;
+ $search = "CFG: ".$comment;
$tmp = $file.".tmp";
- $fp = fopen($file, 'r') or OUTPUT_HTML ("<STRONG>READ:</STRONG> ".$file."<BR>");
+ $fp = fopen($file, 'r') or OUTPUT_HTML("<STRONG>READ:</STRONG> ".$file."<BR>");
if ($fp)
{
- $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML ("<STRONG>WRITE:</STRONG> ".$tmp."<BR>");
+ $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML("<STRONG>WRITE:</STRONG> ".$tmp."<BR>");
if ($fp_tmp)
{
while (! feof($fp))
if (strpos($line, $search) > -1) { $next = 0; $found = true; }
if ($next > -1)
{
- if ($next == $SEEK)
+ if ($next == $seek)
{
$next = -1;
- $line = $PREFIX.$DATA.$SUFFIX."\n";
+ $line = $prefix . $DATA . $suffix."\n";
}
else
{
}
fclose($fp_tmp);
// Finished writing tmp file
- $DONE = true;
+ $done = true;
}
fclose($fp);
- if (($DONE) && ($found))
+ if (($done) && ($found))
{
// Copy back tmp file and delete tmp :-)
@copy($tmp, $file);
}
elseif (!$found)
{
- OUTPUT_HTML ("<STRONG>CHANGE:</STRONG> 404!");
+ OUTPUT_HTML("<STRONG>CHANGE:</STRONG> 404!");
define ('_FATAL', true);
}
else
{
- OUTPUT_HTML ("<STRONG>TMP:</STRONG> UNDONE!");
+ OUTPUT_HTML("<STRONG>TMP:</STRONG> UNDONE!");
define ('_FATAL', true);
}
}
}
else
{
- OUTPUT_HTML ("<STRONG>404:</STRONG> ".$file."<BR>");
+ OUTPUT_HTML("<STRONG>404:</STRONG> ".$file."<BR>");
}
}
//
function ADMIN_DO_ACTION($wht)
{
- global $menuDesription, $MTITLE, $CONFIG, $EXTENSIONS, $link, $DATA;
+ global $menuDesription, $menuTitle, $CONFIG, $EXTENSIONS, $link, $DATA;
//* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*<br />\n";
if (EXT_IS_ACTIVE("cache"))
{
//
function ADD_ADMIN_MENU($act, $wht,$return=false)
{
- global $_GET, $menuDesription, $MTITLE, $link;
+ global $_GET, $menuDesription, $menuTitle, $link;
$SUB = false;
// Menu descriptions
$menuDesription = array();
- $MTITLE = array();
+ $menuTitle = array();
// Build main menu
$result_main = SQL_QUERY("SELECT action, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE what='' ORDER BY sort, id DESC", __FILE__, __LINE__);
if (!$SUB)
{
// Insert compiled menu title and description
- $MTITLE[$menu] = $title;
+ $menuTitle[$menu] = $title;
$menuDesription[$menu] = $descr;
}
$OUT .= "<TR>
if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
{
$menuDesription = array();
- $MTITLE = array(); $SUB = true;
+ $menuTitle = array(); $SUB = true;
$OUT .= "<TR>
<TD width=\"10\" class=\"seperator\"> </TD>
<TD class=\"admin_menu\">
if ($ACL)
{
// Insert compiled title and description
- $MTITLE[$wht_sub] = $title_what;
+ $menuTitle[$wht_sub] = $title_what;
$menuDesription[$wht_sub] = $desc_what;
$OUT .= "<TR>
<TD class=\"admin_menu\" colspan=\"2\">
if ($return) {
return $OUT;
} else {
- OUTPUT_HTML ($OUT);
+ OUTPUT_HTML($OUT);
}
}
//