2 $monLibrary= dirname(__FILE__) .
"/../library";
3 $sharedLibrary= dirname(__FILE__) .
"/../../shared/library";
4 require_once(
"$monLibrary/cu_top.i");
5 require_once(
"$monLibrary/ck_hticket.i");
6 require_once(
"$monLibrary/cu_pass.i");
7 require_once(
"$sharedLibrary/cu_flagconst.i");
9 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
12 header(
"Location: /hcuadm/hcu_noperm.prg");
16 $results_dir =
"/home/homecu/html";
17 $view_dir =
"/homecu/html";
18 $alerts_prefix =
"alerts";
19 $recur_prefix =
"recurltx";
21 $month = Array(
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec");
23 cu_header(
"Alerts and Recurring");
26 $alerts_list = Array();
27 $recur_list = Array();
30 if (is_dir($results_dir)) {
31 if ($dir_hndl = opendir($results_dir)) {
32 while (($file = readdir($dir_hndl)) !==
false) {
34 if (filetype(
"$results_dir/$file") !=
"file")
38 if (substr($file, 0, strlen($alerts_prefix)) == $alerts_prefix) {
39 if (!in_array($file, array(
"alerts.runslotlist.conf",
"alerts.blacklist.conf"))) {
40 $alerts_list[] = $file;
42 } elseif (substr($file, 0, strlen($recur_prefix)) == $recur_prefix) {
44 $recur_list[] = $file;
57 <table cellpadding=
"3" cellspacing=
"0" border=
"0" width=
"500" class=
'dmsbg'>
58 <tr><td colspan=
'2' class=
'dtl'>
59 <a href=
"${produrl}/hcuadm/cuilist.prg" target=
"parent">Credit Union List</a></td></tr>
61 <table cellpadding=
"1" cellspacing=
"0" border=
"0" width=
"100%" bgcolor=
"white">
63 <td colspan=
"2" class=
"bar" align=
"center">
68 <td width=
'5%' align=
"right" class=
"hdr" valign=
'top'>
71 <td width=
'*' nowrap
class=
'dtll' valign=
'top'>
75 foreach ($alerts_list as $value) {
77 $year = substr($value,strlen($alerts_prefix), 4);
78 $mon = intval(substr($value, strlen($alerts_prefix) + 4, 2));
79 $day = intval(substr($value, strlen($alerts_prefix) + 6, 2));
80 $hour = intval(substr($value, strlen($alerts_prefix) + 8, 2));
81 $min = intval(substr($value, strlen($alerts_prefix) + 10, 2));
83 $minute = intval(substr($value, strlen($alerts_prefix) + 10, 2));
84 # CALCULATE THE RUNSLOT value -- 85 # if we decide to run on the half-hour, use $minute on the end to distinguish 86 # may have to use fancy math to round to 0 or 30, but anyway the minute is there 87 $runslot = strtoupper(date(
'D',mktime($hour,$minute,0,$mon,$day,$year)) .
" " . sprintf(
"%02d:%02d", $hour, $min));
89 $disp_value = date(
"F jS, Y", mktime(0, 0, 0, $mon, $day, $year));
91 print
"<br><a href='/hcuadm/tfiles.prg$view_dir/$value' title='$runslot'>Alerts $disp_value $runslot</a>";
98 <td width=
'*' valign=
'top'>
99 <table cellpadding=
"1" cellspacing=
"0" border=
"0" width=
"100%" bgcolor=
"white">
101 <td colspan=
"2" class=
"bar" align=
"center" nowrap>
102 Daily Recurring Reports
106 <td width=
'5%' align=
"right" class=
"hdr" valign=
'top'>
109 <td width=
'*' nowrap
class=
'dtl' valign=
'top'>
112 foreach ($recur_list as $value) {
114 $year = substr($value,strlen($recur_prefix), 4);
115 $mon = intval(substr($value, strlen($recur_prefix) + 4, 2));
116 $day = intval(substr($value, strlen($recur_prefix) + 6, 2));
117 $disp_value = date(
"F jS, Y", mktime(0, 0, 0, $mon, $day, $year));
118 print
"<br><a href='/hcuadm/tfiles.prg$view_dir/$value' >Recur Tx $disp_value</a>";