white.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?php
  2. $langFile = 'survey';
  3. $temp = $_REQUEST['temp'];
  4. require ('../inc/global.inc.php');
  5. require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
  6. $status = surveymanager::get_status();
  7. if($status==5)
  8. {
  9. api_protect_admin_script();
  10. }
  11. $cidReq = $_REQUEST['cidReq'];
  12. require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
  13. $ques = $_REQUEST['ques'];
  14. $ans = $_REQUEST['ans'];
  15. $answers = explode("|",$ans);
  16. $count = count($answers);
  17. $qtype = $_REQUEST['qtype'];
  18. ?>
  19. <html>
  20. <head>
  21. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  22. <title>White Template</title>
  23. <link href="../survey/css_white/style.css" rel="stylesheet" type="text/css">
  24. <style type="text/css">
  25. <!--
  26. body {
  27. margin-left: 0px;
  28. margin-top: 0px;
  29. margin-right: 0px;
  30. margin-bottom: 0px;
  31. }
  32. .style5 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
  33. -->
  34. </style>
  35. </head>
  36. <body>
  37. <table width="100%" cellpadding="0" cellspacing="0">
  38. <tr>
  39. <td height="85" colspan="2" align=left><img src="../cssimggray/logo_ofo.gif" border=0></td>
  40. </tr>
  41. <tr>
  42. <td width="66%" bgcolor="#949A9C">&nbsp;&nbsp;<span class="text">My Portal &gt; My Organisation</span></td>
  43. <td width="34%" align="right" bgcolor="#949A9C"><span class="text"></span>&nbsp;</td>
  44. </tr>
  45. <tr>
  46. <td width="66%" bgcolor="#F7EBEF" colspan="2">&nbsp;&nbsp;<span class="text"></span></td>
  47. </tr>
  48. <tr>
  49. <td width="66%" bgcolor="949A9C">&nbsp;&nbsp;<span class="text">My Portal &gt; Course Home &gt; Survey</span></td>
  50. <td width="34%" align="right" bgcolor="#949A9C"><span class="text"></span>&nbsp;</td>
  51. </tr>
  52. </table>
  53. <table width="100%" cellpadding="0" cellspacing="0">
  54. <tr bgcolor="#FFFFFF">
  55. <td colspan="2" align="center" valign="top"><br>
  56. <br>
  57. <table width="600" border="0" cellspacing="0" cellpadding="0">
  58. <tr>
  59. <td width="23" height="21"><img src="../survey/images_white/top-1.gif" width="23" height="21"></td>
  60. <td height="21" background="../survey/images_white/top-2.gif">&nbsp;</td>
  61. <td width="20" height="21"><img src="../survey/images_white/top-3.gif" width="20" height="21"></td>
  62. </tr>
  63. <tr>
  64. <?
  65. switch ($qtype)
  66. {
  67. case "Yes/No":
  68. {?>
  69. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  70. <td><strong>Question: </strong><br><? echo $ques;?><br><br><strong>Answers: </strong><br>
  71. <textarea cols="50" rows="3" disabled='true'><?echo $answers[0];?></textarea>
  72. <input name="radiobutton" type="radio" value="radiobutton"><br><textarea name="textfield" cols="50" rows="3" disabled='true'> <?echo $answers[1];?></textarea>
  73. <input name="radiobutton" type="radio" value="radiobutton"></td>
  74. <td background="../survey/images_white/right.gif">&nbsp;</td>
  75. <?
  76. break;
  77. }
  78. case "Multiple Choice (multiple answer)":
  79. {?>
  80. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  81. <td><strong>Question: </strong><br><? echo $ques;?><br><br><strong>Answers: </strong><br>
  82. <?
  83. $i=0;
  84. for($p=1;$p<$count;$i++,$p++)
  85. {
  86. ?>
  87. <textarea cols="50" rows="3" disabled='true'><? echo $answers[$i]; ?></textarea>
  88. <input type="checkbox" name="checkbox" value="checkbox"><br>
  89. <?
  90. }
  91. ?>
  92. </td>
  93. <td background="../survey/images_white/right.gif">&nbsp;</td>
  94. <?
  95. break;
  96. }
  97. case "Multiple Choice (single answer)":
  98. {?>
  99. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  100. <td><strong>Question: </strong><br><? echo $ques;?><br><br><strong>Answers: </strong><br>
  101. <?
  102. $i=0;
  103. for($p=1;$p<$count;$i++,$p++)
  104. {
  105. ?>
  106. <textarea cols="50" rows="3" disabled='true'><? echo $answers[$i]; ?></textarea>
  107. <input name="radiobutton" type="radio" value="radiobutton"><br>
  108. <?
  109. }
  110. ?>
  111. </td>
  112. <td background="../survey/images_white/right.gif">&nbsp;</td>
  113. <?
  114. break;
  115. }
  116. case "Open":
  117. {?>
  118. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  119. <td><strong>Question: </strong><br><? echo $ques;?><br><br><strong>Answer: </strong><br>
  120. <TEXTAREA style="WIDTH: 100%" name="defaultext" rows=3 cols=60>
  121. </TEXTAREA>
  122. </td>
  123. <td background="../survey/images_white/right.gif">&nbsp;</td>
  124. <?
  125. break;
  126. }
  127. case "Numbered":
  128. {?>
  129. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  130. <td><strong>Question: </strong><br><? echo $ques;?><br><br><strong>Answers: </strong><br>
  131. <?
  132. $i=0;
  133. for($p=1;$p<$count;$i++,$p++)
  134. {
  135. ?>
  136. <textarea cols="50" rows="3" disabled='true'><? echo $answers[$i]; ?></textarea>
  137. <select>
  138. <option value="not applicable">Not Applicable</option>
  139. <option value="$i">1</option>
  140. <option value="$i">2</option>
  141. <option value="$i">3</option>
  142. <option value="$i">4</option>
  143. <option value="$i">5</option>
  144. <option value="$i">6</option>
  145. <option value="$i">7</option>
  146. <option value="$i">8</option>
  147. <option value="$i">9</option>
  148. <option value="$i">10</option>
  149. </select><br>
  150. <?
  151. }
  152. ?>
  153. </td>
  154. <td background="../survey/images_white/right.gif">&nbsp;</td>
  155. <?
  156. break;
  157. }
  158. }
  159. ?>
  160. </tr>
  161. <tr>
  162. <td background="../survey/images_white/left.gif">&nbsp;</td>
  163. <td><p>&nbsp;</p>
  164. </td>
  165. <td background="../survey/images_white/right.gif">&nbsp;</td>
  166. </tr>
  167. <tr>
  168. <td><img src="../survey/images_white/bottom-1.gif" width="23" height="21"></td>
  169. <td background="../survey/images_white/bottom-2.gif">&nbsp;</td>
  170. <td><img src="../survey/images_white/bottom-3.gif" width="20" height="21"></td>
  171. </tr>
  172. </table>
  173. <p><br>
  174. <br>
  175. </p>
  176. <p>&nbsp;</p>
  177. <p>&nbsp; </p></td>
  178. </tr>
  179. <tr align="right" bgcolor="#942039">
  180. <td height="30" align="left" class="bg-4">&nbsp;&nbsp;<span class="text">Manager : </span><span class="text-2">user admin</span> </td>
  181. <td height="30" class="bg-4"><span class="text">Platform</span> <span class="text-2">Dokeos 1.6.3</span> <span class="text">&copy; 2006&nbsp;&nbsp;</span></td>
  182. </tr>
  183. </table>
  184. </body>
  185. </html>