cronAction = e_QUERY;
if(isset($_POST['submit']))
{
$this -> cronSave();
}
if(isset($_POST['save_prefs']))
{
$this -> cronSavePrefs();
}
// Set Core Cron Options.
$this->coreCrons[] = array('name'=>'User Purge','function' => 'user_purge', 'description'=>'Purge Unactivated Users');
$this->coreCrons[] = array('name'=>'User UnActivated','function' => 'user_unactivated', 'description'=>'Resend activation email to unactivated users.');
$this->coreCrons[] = array('name'=>'News Sticky','function' => 'news_purge', 'description'=>'Remove Sticky News Items');
// These core functions need to be put into e_BASE/cron.php ie. news_purge()
if($this->cronAction == "" || $this->cronAction == "main")
{
$this -> cronRenderPage();
}
if($this->cronAction == "pref")
{
$this -> cronRenderPrefs();
}
}
function cronSavePref()
{
// Store the USERID with the password.
// This way only the one password is needed, and the user login can be looked up in e_base/cron.php
}
function cronSave()
{
global $pref;
foreach($_POST['cron'] as $key=>$val)
{
if(!$val['active'])
{
$val['active'] = 0;
}
$t['minute'] = implode(",",$_POST['tab'][$key]['minute']);
$t['hour'] = implode(",",$_POST['tab'][$key]['hour']);
$t['day'] = implode(",",$_POST['tab'][$key]['day']);
$t['month'] = implode(",",$_POST['tab'][$key]['month']);
$t['weekday'] = implode(",",$_POST['tab'][$key]['weekday']);
$val['tab'] = implode(" ",$t);
$tabs .= $val['tab']."
";
$cron[$key] = $val;
}
$pref['e_cron_pref'] = $cron;
$emessage = &eMessage::getInstance();
if(save_prefs())
{
$emessage->add(LAN_SETSAVED, E_MESSAGE_SUCCESS);
}
else
{
$emessage->add("There was a problem saving your settings.", E_MESSAGE_ERROR);
}
}
// --------------------------------------------------------------------------
function cronRenderPrefs()
{
global $frm,$ns;
$text = "