Location: PHPKode > projects > phpRefManager > phpRefManager/leadaddnoticescript.php
<?php
require_once('functions/functions.php');
print_html_header('Group Notice Added');
print_access_check('L');
if (!is_numeric($_POST['expireMonth'])||!is_numeric($_POST['expireDay'])||!is_numeric($_POST['expireYear'])||!is_numeric($_POST['startMonth'])||!is_numeric($_POST['startDay'])||!is_numeric($_POST['startYear'])||!is_safe($_POST['text']))
{
   echo 'Please go back and fill out the form completely and correctly.';
}
else
{
   $expireDate=make_date($_POST['expireMonth'],$_POST['expireDay'],$_POST['expireYear']);
   $startDate=make_date($_POST['startMonth'],$_POST['startDay'],$_POST['startYear']);
   if ($startDate>=$expireDate)
   {
      echo 'The message must start being displayed before it is set to expire';
   }
   elseif ($expireDate<time())
   {
      echo 'The message must be set to expire in the future';
   }
   elseif ($expireDate>strtotime('+1 week'))
   {
      echo 'The expire date must be within the next week';
   }
   else
   {
      print_group_added_notice($_POST['text'],$_SESSION['validid'],$expireDate,$startDate,sched_group_bottom(get_scheduler_group($_SESSION['validid'])));
   }
}
print_html_footer();
?>
Return current item: phpRefManager