global $tpl, $topdir, $list;
if(is_file($topdir."/".$list."/control/".$name))
- $checked = TRUE;
+ $checked = TRUE;
else
- $checked = FALSE;
+ $checked = FALSE;
$tpl->assign(array("NAME" => htmlentities($name),
"NICENAME" => htmlentities($nicename),
$value = "";
if(is_file($file)) {
- $lines = file($file);
- $value = $lines[0];
+ $lines = file($file);
+ $value = $lines[0];
}
$tpl->assign(array("NAME" => htmlentities($name),
$value = "";
if(is_file($file))
- $value = file_get_contents($file);
+ $value = file_get_contents($file);
$tpl->assign(array("NAME" => htmlentities($name),
"NICENAME" => htmlentities($nicename),
if(isset($_POST[$name]) && !empty($_POST[$name]))
{
- if(!touch($file))
- die("Couldn't open ".$file." for writing");
- if (!chmod($file, 0644))
- die("Couldn't chmod ".$file);
+ if(!touch($file))
+ die("Couldn't open ".$file." for writing");
+ if (!chmod($file, 0644))
+ die("Couldn't chmod ".$file);
+ }
+ else {
+ @unlink($file);
}
- else
- @unlink($file);
}
function mlmmj_string ($name, $nicename, $text)
if(isset($_POST[$name]) && !empty($_POST[$name]))
{
- if (!$fp = fopen($file, "w"))
- die("Couldn't open ".$file." for writing");
+ if (!$fp = fopen($file, "w"))
+ die("Couldn't open ".$file." for writing");
fwrite($fp, preg_replace('/\\r/',"",$_POST[$name]));
- fclose($fp);
+ fclose($fp);
- if (!chmod($file, 0644))
- die("Couldn't chmod ".$file);
+ if (!chmod($file, 0644))
+ die("Couldn't chmod ".$file);
+ }
+ else {
+ @unlink($file);
}
- else
- @unlink($file);
}