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(
'showid'=>
'string',
'viewmsg'=>
'digits');
18 <TABLE WIDTH=95% BORDER=0 CELLPADDING=0 CELLSPACING=0>
19 <tr><td CLASS=
""><DIV CLASS=
"barb">Admin Survey</DIV></td></tr>
21 <table border=0 cellspacing=0 cellpadding=2 width=100%>
22 <tr><td
class=
'bar'>HomeCU Survey</td></tr></table>
23 <table border=0 cellspacing=0 cellpadding=2 width=100%>
26 $showid = trim(strtoupper((empty($showid) ?
"PRESENT" : $showid)));
33 $sclause =
" and runstat = 1 and m.startdate < now() and m.stopdate > now() ";
36 $sclause =
" and m.runstat = 0 ";
39 $sclause =
" and m.runstat = 1 and m.startdate > now() ";
42 $sclause =
" and m.surveyid = $showid ";
45 $sql =
"select m.surveyid, qstyle, question, answerid, answertext 46 from cuadmin_surveymaster m, cuadmin_surveydetail d 47 where m.surveyid = d.surveyid $sclause 48 order by stopdate, surveyid, answerid";
50 $sth = db_query($sql,$link);
54 for ($row=0; list( $surveyid, $qstyle, $qtext, $answerid, $atext ) =
55 db_fetch_array($sth,$row); $row++) {
57 if ($cur_sid !=
"$surveyid"){
61 if ($cur_sid !=
"" ) {
65 if (intval($viewmsg) == 0) {
66 $qtext = htmlspecialchars($qtext);
68 $qtext = trim($qtext);
70 echo
"<table border=0 CELLSPACING=1 CELLPADDING=2 width=100%><tr>\n 71 <td CLASS=hdr1>$qtext</td></tr>";
72 $cur_sid =
"$surveyid";
76 if (intval($viewmsg) == 0) {
77 $atext = htmlspecialchars($atext);
79 <tr CLASS={$rbg}_small>
80 <td><input type=
"radio" name=
"response[$surveyid]" value=
"$answerid">
81 <font size=-1>$atext</font></td></tr>
84 $rbg = ($rbg ==
"odd" ?
"even" :
"odd");
88 if ($cur_sid ==
"" ) {
91 $notfound =
"No PRESENT Surveys Found";
94 $notfound =
"No DRAFT Surveys Found";
97 $notfound =
"No FUTURE Surveys Found";
100 $notfound =
"No Surveys Found";
104 <table border=0 cellspacing=0 cellpadding=2 width=100%>
105 <tr><td
class=
'hdr1'>$notfound</td></tr>
109 </table></td></tr></TABLE><br>
110 <input type=button value=
'Close' onClick=
'self.close();'></form>
112 echo
"</body></html>";