2 $monLibrary= dirname(__FILE__) .
"/../library";
3 require_once(
"$monLibrary/cu_top.i");
4 require_once(
"$monLibrary/ck_hticket.i");
7 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
10 header(
"Location: /hcuadm/hcu_noperm.prg");
14 $dms_ok=array(
'Cu'=>
'string',
'Cl'=>
'string',
'cu_name'=>
'string',
'Cv'=>
'string',
'Cr'=>
'string',
'Cs'=>
'string');
18 cu_header(
"HomeCU - Credit Union Implementation");
20 $cuset =
"/usr/local/bin/cuset";
24 $set_vend =
"WEBONLY";
28 if ( $Cv ==
'ST-BSDC' ||
32 $set_vend =
"SHARETEC";
37 $t_val = ($Cl ==
"L" ?
"L" :
"B");
41 print
"<LINK REL=stylesheet HREF='/monitor/css/monitor.css' TYPE='text/css'> 44 <table width='500' border=0 cellpadding=3 cellspacing=0 class='dmsbg'> 46 <table width='100%' border=0 cellpadding=2 cellspacing=0 bgcolor='white'> 48 <td colspan=2 class='bar' align='center'> 49 <font size='5'>Create Credit Union User</font> 53 <td align=right width='30%' class='hdr'> 56 <td width='70%' class='dtl'>" .
57 htmlspecialchars(trim($Cu)) .
61 <td align=right width='30%' class='hdr'> 64 <td width='70%' class='dtl'>" .
65 htmlspecialchars(trim($cu_name)) .
73 if (!isset($cu_name) || strlen($cu_name) == 0) {
74 $err .=
"<li>The name of the credit union code. Be sure the information was saved.<br>";
76 if (!isset($Cu) || strlen($Cu) == 0) {
77 $err .=
"<li>The credit union code is missing. Be sure the information was saved.<br>";
79 if (!isset($Cl) || strlen($Cl) == 0) {
80 $err .=
"<li>The credit union CU Type is missing. Be sure the information was saved.<br>";
82 if (!isset($Cv) || strlen($Cv) == 0) {
83 $err .=
"<li>The credit union vendor is missing. Be sure the information was saved.<br>";
88 $vend_file =
"/home/cuskel/bin/{$set_vend}.pi";
89 if (!is_file($vend_file)){
91 $err .=
"<li>The vendor does not have an upload script. One must be created before this credit union can be used.<br>";
95 $sql =
"SELECT cu, user_name 97 WHERE user_name = '" . prep_save($Cu) .
"' ";
99 $cu_rs = db_query($sql, $link);
100 if ($cu_row = db_fetch_array($cu_rs, 0)) {
103 $err .=
"<li>The credit union {$Cu} already has a record in the credit union table.<br>";
107 $cu_home_dir =
"/home/{$Cu}";
108 if (is_dir($cu_home_dir)) {
110 $err .=
"<li>The credit union {$Cu} already has a home directory.<br>";
113 db_free_result($cu_rs);
115 if (strlen($err) > 0) {
116 $err =
"The credit union you selected can not be setup at this time.<br> 117 This is the reason it can not be setup.<br>$err<br><br> 118 Please see the Credit Union Admininstrator if this information is incorrect.<br> 119 Thank you for using this utility<br><br> 120 <a href='$infourl/hcuadm/imp_menu.prg'>Return to the Implementation Menu</a>";
122 <td colspan='2' align='center' class='err'>$err 131 $field_val =
"Batch";
137 $field_val =
"Web ONLY";
143 $field_val =
"UNKNOWN";
147 <td align=right class='hdr'> 154 <tr><td align=right class='hdr'>Home Page URL: </td> 156 htmlspecialchars(trim($Cr)) .
159 <tr><td align=right class='hdr'>Vendor: </td> 161 htmlspecialchars(trim($Cv)) .
165 <td colspan='2' class='ahd'> 166 Login into the server <b> {$Cs} </b> 168 You will need to be root to setup the credit union. 170 This is the command to setup credit union <b> {$Cu} </b> 174 $domain = preg_replace(
"/^http[s]?:\/\//i",
"",$domain);
175 $domain = preg_replace(
"/^www./i",
"",$domain);
176 $domain = trim($domain);
178 $param =
" -u {$Cu} -n \"" . $cu_name .
"\"" ;
180 $param .=
" -d $domain";
182 $param .=
" -v $set_vend" 186 $command = $cuset .
" " . $param;
192 <a href='$infourl/hcuadm/imp_menu.prg'>Return to Implementation Menu</a><br> 193 <a href='$infourl/hcuadm/imp_main.prg?cuid={$Cu}'>Return to information on {$Cu} </td></tr>";