fixed_classes['email'] = 'Email Address =>';
$uc->text_class_link['email'] = 'email';
if (isset($_POST['update']))
{
$message = ($nc -> update()) ? LAN_UPDATED : LAN_UPDATED_FAILED;
$ns -> tablerender($message,"
".$message."
");
}
$nc -> config();
class notify_config {
var $notify_prefs;
function notify_config() {
global $sysprefs, $eArrayStorage, $tp, $sql,$pref;
$this -> notify_prefs = $sysprefs -> get('notify_prefs');
$this -> notify_prefs = $eArrayStorage -> ReadArray($this -> notify_prefs);
// load every e_notify.php file.
foreach($pref['e_notify_list'] as $val)
{
if (!isset($this -> notify_prefs['plugins'][$val]))
{
$this -> notify_prefs['plugins'][$val] = TRUE;
if (is_readable(e_PLUGIN.$val."/e_notify.php"))
{
require_once(e_PLUGIN.$val.'/e_notify.php');
foreach ($config_events as $event_id => $event_text)
{
$this -> notify_prefs['event'][$event_id] = array('class' => '255', 'email' => '');
}
$recalibrate = true;
}
}
}
if ($recalibrate) {
$s_prefs = $tp -> toDB($this -> notify_prefs);
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
$sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'");
}
}
function config() {
global $ns, $rs;
$text = "";
$ns -> tablerender(NT_LAN_1, $text);
}
function render_event($id, $description) {
global $rs, $tp, $uc;
$text .= "
";
return $text;
}
function update() {
global $sql, $pref, $tp, $eArrayStorage;
foreach ($_POST['event'] as $key => $value)
{
if ($this -> update_event($key))
{
$active = TRUE;
}
}
if ($active)
{
$pref['notify'] = TRUE;
}
else
{
$pref['notify'] = FALSE;
}
save_prefs();
$s_prefs = $tp -> toDB($this -> notify_prefs);
$s_prefs = $eArrayStorage -> WriteArray($s_prefs);
if($sql -> db_Update("core", "e107_value='".$s_prefs."' WHERE e107_name='notify_prefs'")!==FALSE)
{
return TRUE;
}
else
{
return FALSE;
}
}
function update_event($id) {
$this -> notify_prefs['event'][$id]['class'] = $_POST['event'][$id]['class'];
$this -> notify_prefs['event'][$id]['email'] = $_POST['event'][$id]['email'];
if ($this -> notify_prefs['event'][$id]['class'] != 255) {
return TRUE;
} else {
return FALSE;
}
}
}
require_once('footer.php');
function headerjs()
{
$js = "
";
return $js;
}
?>