2 $monLibrary= dirname(__FILE__) .
"/../library";
3 require_once(
"$monLibrary/cu_top.i");
4 require_once(
"$monLibrary/ck_hticket.i");
6 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
9 header(
"Location: /hcuadm/hcu_noperm.prg");
13 $dms_ok=array(
'w'=>
'digits',
'cu'=>
'string',
'remove_daz'=>
'string');
17 if (isset($w) ==
false || $w > 2) $w =
"1";
21 $uplfilename = RetrieveFileName($cu);
25 cu_header(
"Delete Upload Files");
28 <form action=
"<?php echo $_SERVER['PHP_SELF']; ?>" method=
"post">
29 <input type=
"hidden" value=
"<?php echo $cu; ?>" name=
"cu">
30 <input type=
"hidden" value=
"2" name=
"w">
31 <table border=0 align=center cellpadding=3 cellspacing=0 width=500
class=
"dmsbg"><tr><td>
32 <table border=0 cellpadding=1 cellspacing=0 width=
"100%" bgcolor=white>
34 <td
class=
'bar' align=center>
39 <td align=center
class=
'dtl'>
40 <font size=
"4" color=
"red">
42 This will
delete the <?php echo $uplfilename; ?>.dat file. <br>Be sure
this is what you want to
do 48 Delete the <?php echo $uplfilename; ?>.dat file
for <?php echo strtoupper($cu); ?>?
53 <input type=
"submit" value=
"Yes" name=
"remove_daz">
54 <!-- <input type=
"submit" value=
"No" name=
"keep_daz"> -->
64 if ((isset($remove_daz)) && isset($cu)) {
67 $filename =
"/home/$cu/tmp/$uplfilename.dat";
68 if (is_file($filename)) {
70 if (is_writeable($filename)) {
72 if (unlink($filename) ==
true) {
75 $filenamez =
"/home/$cu/tmp/$uplfilename.daz";
76 if (is_file($filenamez)) {
81 $add_msg =
"<br><br>I tried to delete the file, but could not. Please contact a system administrator to delete the file.";
85 $add_msg =
"<br><br>The file was found, but it can not be deleted. Please contact a system administrator to delete.";
94 cu_header(
"Error Deleting File");
96 cu_message(
"Unexpected errors!$add_msg");
98 cu_header(
"File Deleted");
99 $msg =
"The $cu.daz file was deleted.<br>The Credit Union should be able to upload the file again.";
101 <table border=0 align=center cellpadding=3 cellspacing=0 width=500
class=
"dmsbg"><tr><td>
102 <table border=0 cellpadding=1 cellspacing=0 width=
"100%" bgcolor=white>
104 <td
class=
'bar' align=center>
109 <td align=center
class=
'dtl'>
110 <font size=
"3" color=
"red">
127 function RetrieveFileName($cuname) {
136 $lookforname = $cuname;
138 $tmpfilename =
"/home/$cuname/tmp/$lookforname.dat";
139 if (is_file($tmpfilename)) {
144 $lookforname = substr($cuname, 0, 6);
145 $tmpfilename =
"/home/$cuname/tmp/$lookforname.dat";
146 if (is_file($tmpfilename)) {