2 $monLibrary= dirname(__FILE__) .
"/../library";
3 require_once(
"$monLibrary/cu_top.i");
4 require_once(
"$monLibrary/ck_hticket.i");
6 if (isset($w) ==
false || $w > 2)
11 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
14 header(
"Location: /hcuadm/hcu_noperm.prg");
18 $dms_ok = array(
'cu' =>
'string',
'w' =>
'string',
'msg' =>
'string');
21 $cu = isset($cu) ? strtoupper($cu) :
"";
26 cu_header(
"Force Member Email Verification");
28 $sql =
"SELECT COUNT(user_name) FROM {$cu}user";
29 $cnt_rs = db_query($sql, $dbh);
30 list($memcount) = db_fetch_array($cnt_rs);
31 db_free_result($cnt_rs);
33 <form action=
"<?php echo $_SERVER['PHP_SELF']; ?>?cu=<?php echo $cu; ?>" method=
"post">
34 <input type=
"hidden" value=
"2" name=
"w">
35 <table border=0 align=center cellpadding=3 cellspacing=0 width=500
class=
"dmsbg"><tr><td>
36 <table border=0 cellpadding=1 cellspacing=0 width=
"100%" bgcolor=white>
38 <td
class=
'bar' align=center>
39 Force Email Verification
42 <?php
if ($memcount == 0): ?>
44 <td
class=
'dtl' align=center>
45 <br>No members found!<br>Please check CU code and
try again
49 <?php
if (isset($msg)): ?>
51 <td
class=
'dtl' align=center>
52 <br><?php echo $msg; ?>
57 <td align=center
class=
'dtl'>
58 <font size=
"3" color=
"red">
60 This will force email verification
for members at <?php echo $cu; ?>. <br>Be sure
this is what you want to
do.
65 <td
class=
'dtl' align=center>
66 <table border=0 cellpadding=0 cellspacing=0>
68 <td
class=
"dtl" align=
"left">
69 Current Members:
71 <td
class=
"dtl" align=
"right">
72 <?php echo $memcount; ?>
79 <td
class=
'dtl' align=center>
85 Are you sure you want to force email verification
for members at <?php echo strtoupper($cu); ?>?
90 <input type=
"submit" value=
"Yes, please do it NOW!!" name=
"btnVerify">
106 $sql =
"SELECT trim(cu) FROM cuadmin WHERE cu = '" . prep_save($cu) .
"'";
107 $cu_rs = db_query($sql, $dbh);
108 list($cu_code) = db_fetch_array($cu_rs);
109 db_free_result($cu_rs);
111 if ($cu_code !=
"") {
113 $upd_sql =
"UPDATE {$cu_code}user SET msg_tx = COALESCE((msg_tx | 512::smallint), 512)";
115 if ($upd_rs = db_query($upd_sql, $dbh)) {
116 $upd_msg =
"I have flagged " . db_affected_rows($upd_rs) .
" members for email verification. I hope this helped.";
118 $upd_msg =
"The members were NOT updated. Please contact a system administrator to update the members.";
122 $upd_msg =
"The credit union code is NOT valid. Please contact a system administrator to update the members.";
125 header(
"Location: {$_SERVER['PHP_SELF']}?cu={$cu}&msg=" . urlencode($upd_msg));