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',
'user_name'=>
'string',
'wc'=>
'string',
'set_trunc'=>
'string',
'unset_trunc'=>
'string');
17 if (isset($w) ==
false || $w > 2) $w =
"1";
24 cu_header(
"Truncate Export");
26 $tr_hist = $sql_row[
'histtrunc'];
29 <form action=
"tr_export.prg" method=
"post" onsubmit=
'return confirm( "Are you sure?" )'>
30 <input type=
"hidden" value=
"<?php echo $user_name; ?>" name=
"user_name">
31 <input type=
"hidden" value=
"<?php echo $wc; ?>" name=
"wc">
32 <input type=
"hidden" value=
"2" name=
"w">
33 <table border=0 align=center cellpadding=3 cellspacing=0 width=500
class=
"dmsbg"><tr><td>
34 <table border=0 cellpadding=1 cellspacing=0 width=
"100%" bgcolor=white>
36 <td
class=
'bar' align=center>
41 <td align=center
class=
'dtl' style=
"background-color:#CCCC00;">
44 This will
delete the export
id log of
this Credit Union.
49 <td
class=
'dtl' style=
'padding:10px;'>
50 The export
id log file will be backed up and truncated. The only reason
for this is
if the core system
51 has started
using ids that are lower than the highest
id in the current export file.
55 <td
class=
'dtl' style=
'padding:10px;'>
56 Are you sure you want to truncate the file
for this credit
union (<?php echo $user_name ?>)?
61 <table style=
"width:100%; text-align:center;">
63 <td><input type=
"submit" id=
"submit" value=
"Yes" name=
"do_truncate"></td>
64 <td><input type=
"button" value=
"No" onClick=
"location.href='<?php echo "$infourl/hcuadm/cuview.prg?user_name=$user_name&wc=$wc
" ?>'"></td>
75 $filePath =
"/home/$user_name/tmp/";
76 $sourceName =
"exportid.log";
77 $destName =
"exportid.logO";
80 $result = copy( $filePath . $sourceName, $filePath . $destName );
83 $handle = fopen( $filePath . $sourceName,
"w" );
89 if ( !$result || !$handle ) {
90 cu_header(
"Truncate Export");
92 cu_message(
"Unexpected errors!<br>Try again.");
94 cu_message(
"Copy to backup failed." );
96 cu_message(
"Truncating file failed." );
101 header(
"Location: $infourl/hcuadm/cuview.prg?user_name=$user_name&wc=$wc");