header('Location: https://parkreg.uccs.edu/payonline/payonline.php');
exit;
$GLOBALS[debug]=0;
include ('top.html'); // bring in the top of the page
//
// STOP payonline
//
/* print "UCCS Public Safety Parking Ticket PAYONLINE program is currently OFFLINE. Please check back in 1 hour. Time now is 4:20 PM July 11, 2006
\n";
exit;
*/
/*print "UCCS Public Safety Parking Ticket PAYONLINE program is currently OFFLINE. Please check back in a few minutes. Time now is 10:55 AM July 3, 2008
\n";
exit;*/
$msg_timer = date("YmdHi");
print "\n";
if ( ($msg_timer > "200611201420") && ($msg_timer < "200611201430" ) ){
print "
";
print "Scheduled Service Maintenance: Midnight to 4:00 a.m. on November 19, 2006";
print "
\n\n";
}
if ( ($msg_timer > "200612022000") && ($msg_timer < "200612030800" ) ){
print "";
print "Scheduled Service Maintenance: Midnight to 4:00 a.m. on December 3, 2006";
print "
\n\n";
}
if ( ($msg_timer > "200612162000") && ($msg_timer < "200612170800") ){
print "";
print "Scheduled Service Maintenance: Midnight to 4:00 a.m. on December 17, 2006";
print "
\n\n";
}
$now = date("m/d/y h:i a");
print "$now
\n";
$todaySort = date(U);
if ($GLOBALS[debug]) print "\$todaySort=$todaySort
\n";
$discount = '10.00';
$discount_info = "You are paying the ticket within ten (10) days, you are recieving a \$$discount discount. Ticket amount with discount included $.00.
\n";
$discount_disclaimer="Note: If the ticket date does not match our records, you may still be responsible for the remaining \$$discount
";
$name='';
$tickNum='';
$tickDate='';
$violation='';
$amount=0;
$problem=0;
$status='';
$violNum='';
$description='';
$description_disclaimer='';
include ('formmail.php'); // bring in formmail.php
if (get_fields($HTTP_POST_VARS,$HTTP_GET_VARS,$fields,$errors,$errorFields,$fieldsFull)>0)
{
// If coming back from Verisign then give back a thank you page.
if ($fields[USER10] == 'UCCS TICKET PAY ONLINE')
{ if ($GLOBALS[debug]) print "Return from Verisign
\n";
print "
Thank you $fields[NAME] for your online payment.
$fields[DESCRIPTION]
Amount paid: \$$fields[AMOUNT].
If the ticket date you entered is within ten (10) business days, a $10.00 discount has been applied to the original amount due (for example, if original amount was $30.00, amount paid will show $20.00). If the ticket date does not match our records, you may still be responsible for the remaining $10.00.
Within five (5) business
days you will receive a message concerning your ticket payment.
Please notify UCCS Public Safety if you have not received notification at any of the following addresses within this time period:
Email: $fields[EMAIL]
or
U.S. Mail:
$fields[NAMETOSHIP]
$fields[ADDRESSTOSHIP]
$fields[CITYTOSHIP] $fields[STATETOSHIP], $fields[ZIPTOSHIP]
Date and time online payment sent: " . date("D F j Y g:i:s A") . "
Please contact UCCS Public Safety if you have any questions.
";
$fields[Program_IP] = $_SERVER[REMOTE_ADDR];
$extraFields='';
$extraFields[_subject]="Ticket ONLINE $fields[INVOICE] $fields[NAME]";
//$extraFields[email]=$fields[EMAIL];
$sent='.';
if (send_form("kmoore_ATsign_uccs.edu,pusafety_ATsign_uccs.edu",$fields,$extraFields))
{ $sent = ' and sent.'; }
else
{ print "Data was NOT SENT.
Please try back in a couple of hours, thank you."; }
include ('bottom.html'); // birng in the bottom of the page.
exit;
} // if ($fields[USER10] == 'UCCS TICKET PAY ONLINE')
// get certain fields in easier to work with vars.
$name="$fields[first_name] $fields[last_name]";
$tickNum=$fields[ticket_number];
$tickDate=$fields[ticket_date];
$violation=$fields[ticket_violation];
// remove the amount from the violation
$violation = preg_replace('/\s+-\s+\$.+$/','',$violation);
$description="UCCS Parking Fine: $tickNum; $violation; ";
// make sure the violation is not 16. if so tell the user that they need to call or come into public safety.
preg_match('/^(\d+)\./',$fields['ticket_violation'],$matches);
$violNum = $matches[1];
if ($GLOBALS[debug]) print "\$fields[ticket_violation]=$fields[ticket_violation], \$violNum=$violNum, \$matches[0]=".$matches[0].", \$matches[1]=".$matches[1]."
\n";
if ($violNum == 16)
{ // can not pay online with Violoation Other
++$problem;
$errors.="You can not pay online for \"Other\" Violation. You must call or visit UCCS Public Safety.
\n";
$errorFields[ticket_violation] = "Call or visit UCCS Public Safety office\n";
}
else
{
// Get the violation and the Amount
preg_match('/\$(.+)/',$fields['ticket_violation'],$matches);
$amount=$matches[1];
$amount_org = $amount;
if ($GLOBALS[debug]) print "\$fields[ticket_violation]=$fields[ticket_violation], \$amount=$amount \$matches[0]=".$matches[0].", \$matches[1]=".$matches[1]."
\n";
if (! $amount)
{ // we do not have an amount stop the user
++$problem;
$errors.='Can not find amount for Violation';
}
$description .= "Amount Due $amount_org";
// check to see if the customer gets $10.00 off of the amount.
$mdy = preg_split('/\/|-|\.|\s/',$tickDate);
$tickDate = "$mdy[0]/$mdy[1]/$mdy[2]";
$tickDateSort = date(U,strtotime($tickDate));
if ($GLOBALS[debug]) print "\$tickDateSort=$tickDateSort
\n";
// there are 86400 seconds in 1 day. 60 sec * 60 minutes * 24 hours = 1 day
$secondsDay = 86400;
if ($GLOBALS[debug])
{ print "todaySort = $todaySort
\n";
print "tickDateSort = $tickDateSort
\n";
$temp = ($todaySort - $tickDateSort) / $secondsDay;
if ($GLOBALS[debug])
{ print "todaySort = $todaySort
\n";
print "tickDateSort = $tickDateSort
\n";
print "temp = $temp
\n";
}
}
if ($GLOBALS[debug]) { print "todaySort = $todaySort - tickDateSort = $tickDateSort = " . $todaySort - $tickDateSort . "
\n"; }
if ($tickDateSort > $todaySort)
{ ++$problem;
$errors.="Ticket date not correct
\n";
$errorFields[ticket_date]='Ticket date not correct';
}
elseif (($todaySort - $tickDateSort) / $secondsDay < 15)
{ $amount = $amount - $discount;
$discount_info =preg_replace('//',$amount,$discount_info);
$status.=$discount_info;
// $description.=" (\$$discount Discount)";
$description_disclaimer = $discount_disclaimer;
if ($GLOBALS[debug]) print "new amount = $amount
\n";
}
} // if ($violNum == 16) else end
if (! $problem)
{ // create form to send to verisign
$submitButton = "Click Here to Securely Pay Online";
print "
\n".$status;
print "To Pay Online with a Credit Card, click on the button '$submitButton'
\n";
print "\n";
print "$description_disclaimer
\n";
include ('bottom.html'); // birng in the bottom of the page.
exit;
}
}
include ('payonline_form.php'); // bring in the form
include ('bottom.html'); // birng in the bottom of the page.
?>