2 require_once(
"dms_imp_val.i");
4 $dms_ok=array(
'set_restrict'=>
'string',
'unset_restrict'=>
'string',
5 'mode'=>
'string',
'ft'=>
'digits');
10 if (isset($set_restrict)) {
12 $Tran_Ret = Restrict_Tran(
'rt');
13 if ($Tran_Ret ==
"000") {
14 $err_msg =
"Transactions are now set to restricted.";
16 $err_msg =
"An error occurred while trying to set transactions to restricted. Please try again.";
18 } elseif (isset($unset_restrict)) {
20 $Tran_Ret = Restrict_Tran(
'ut');
21 if ($Tran_Ret ==
"000") {
22 $err_msg =
"Transactions have been set to unrestricted.";
24 $err_msg =
"An error occurred while trying to unrestrict transactions. Please try again.";
30 $Tran_Ret = Restrict_Tran(
'qt');
36 $restrict_set =
false;
43 <form name=
"checkinfo" method=
"post" action=
"<?php echo $menu_link; ?>?ft=<?php echo intval($ft); ?>">
44 <input type=
"hidden" name=
"mode" value=
"VIEW">
46 <table width=
"90%" border=0 cellpadding=0 cellspacing=0>
48 <td
class=
"bar" align=
"center">
49 Restrict Transactions for <?php echo $Cu; ?>
52 <?php
if ($err_msg !=
""): ?>
54 <td
class=
"msg" align=
"center">
55 <?php echo $err_msg; ?>
60 <td align=center
class=
'dtl'>
61 <font size=
"4" color=
"red">
63 This will restrict all transactions from being processed. <br>Be sure
this is what you want to
do.
69 Currently Restrict Transactions is
set to
70 <span style=
"font-weight: bold; color: red;" class=
"err2"><?php echo ($restrict_set ?
"Restrict" :
"UnRestrict"); ?></span>
73 <tr><td
class=
"dtl"><hr></td></tr>
76 You may change the transactions setting for <?php echo $Cu; ?> by selecting a button below.
81 <input type=
"submit" value=
"Set to Restrict" name=
"set_restrict">
82 <input type=
"submit" value=
"Set to UnRestrict" name=
"unset_restrict">
85 <tr><td
class=
"dtl"> </td></tr>
99 function Restrict_Tran($stat_type) {
103 $sql =
"SELECT liveserver 106 $sth = db_query($sql,$dbh);
107 list($Cs) = db_fetch_array($sth,0);
108 db_free_result($sth);
113 $fd = @fopen(
"$FETCHER?type=$stat_type&member=99999999",
"r");
116 while ($buff = fread ($fd, 1500)) {
121 $pktpieces = array();
122 $pktpattern=
'/<([^<>\/]*)>(.*)<\/\\1>/Us';
123 $inqpattern=
'/<\/*Inquiry>/i';
126 preg_match_all(
"$pktpattern",preg_replace($inqpattern,
"",$packet),$pktpieces);
128 array_shift($pktpieces);
129 foreach ($pktpieces[0] as $pos => $tag) {
130 $tags[(strtolower($tag))] = $pos;
132 array_shift($pktpieces);
133 list($mem, $pcutoff) = explode(
"\t",$pktpieces[0][($tags[
'parameters'])]);
135 $cutoff = (trim($pcutoff) ==
"" ? trim($cutoff) : trim($pcutoff));
136 list($mem, $statcode, $statdesc) = explode(
"\t",$pktpieces[0][($tags[
'status'])]);