mcma_view.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. $langFile = 'survey';
  3. require ('../inc/global.inc.php');
  4. require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
  5. $status = surveymanager::get_status();
  6. if($status==5)
  7. {
  8. api_protect_admin_script();
  9. }
  10. $cidReq = $_REQUEST['cidReq'];
  11. require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
  12. $surveyid=$_REQUEST['surveyid'];
  13. $groupid=$_REQUEST['groupid'];
  14. $ques_type = $_GET['qtype'];
  15. $table_category = Database :: get_main_table(MAIN_CATEGORY_TABLE);
  16. $table_survey = Database :: get_course_table('survey');
  17. $table_group = Database :: get_course_table('survey_group');
  18. $table_question = Database :: get_course_table('questions');
  19. $db_name = $_REQUEST['db_name'];
  20. $gname=surveymanager::get_groupname($db_name,$groupid);
  21. $header2 = get_lang('GroupName');
  22. $header2 = $header2." ".$gname;
  23. $header3 = get_lang('Type');
  24. $header3=$header3." ".$ques_type;
  25. $ques_id = $_GET['qid'];
  26. $sql = "SELECT * FROM $db_name.questions where qid='$ques_id'";
  27. $res = api_sql_query($sql);
  28. $obj = mysql_fetch_object($res);
  29. ?>
  30. <html>
  31. <head>
  32. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  33. <title>White Template</title>
  34. <link href="../survey/css_white/style.css" rel="stylesheet" type="text/css">
  35. <style type="text/css">
  36. <!--
  37. body {
  38. margin-left: 0px;
  39. margin-top: 0px;
  40. margin-right: 0px;
  41. margin-bottom: 0px;
  42. }
  43. .style5 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
  44. -->
  45. </style>
  46. </head>
  47. <body>
  48. <table width="100%" cellpadding="0" cellspacing="1" bordercolor="#000000" bgcolor="#000000">
  49. <tr>
  50. <td width="66%" bgcolor="#FFFFFF" class="bg-3">&nbsp;&nbsp;<span class="text">My Portal &gt; Course Home &gt; Survey</span></td>
  51. <td width="34%" align="right" bgcolor="#FFFFFF" class="bg-3"><span class="text"></span>&nbsp;</td>
  52. </tr>
  53. <tr bgcolor="#FFFFFF">
  54. <td colspan="2" align="center" valign="top"><br>
  55. <br>
  56. <table width="600" border="0" cellspacing="0" cellpadding="0">
  57. <tr>
  58. <td width="23" height="21"><img src="../survey/images_white/top-1.gif" width="23" height="21"></td>
  59. <td height="21" background="../survey/images_white/top-2.gif">&nbsp;</td>
  60. <td width="20" height="21"><img src="../survey/images_white/top-3.gif" width="20" height="21"></td>
  61. </tr>
  62. <tr>
  63. <td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
  64. <td><strong>Question: </strong><br><? echo $obj->caption;?><br><br><strong>Answers: </strong><br>
  65. <?
  66. for($i=1;$i<10;$i++)
  67. {
  68. $temp = "a".$i;
  69. if(empty($obj->$temp))
  70. break;
  71. else
  72. {
  73. ?>
  74. <textarea cols="50" rows="3" disabled='true'><? echo $obj->$temp; ?></textarea>
  75. <input type="checkbox" name="checkbox" value="checkbox"><br>
  76. <?
  77. }
  78. }
  79. ?>
  80. </td>
  81. <td background="../survey/images_white/right.gif">&nbsp;</td>
  82. </tr>
  83. <tr>
  84. <td background="../survey/images_white/left.gif">&nbsp;</td>
  85. <td><p>&nbsp;</p>
  86. </td>
  87. <td background="../survey/images_white/right.gif">&nbsp;</td>
  88. </tr>
  89. <tr>
  90. <td><img src="../survey/images_white/bottom-1.gif" width="23" height="21"></td>
  91. <td background="../survey/images_white/bottom-2.gif">&nbsp;</td>
  92. <td><img src="../survey/images_white/bottom-3.gif" width="20" height="21"></td>
  93. </tr>
  94. </table>
  95. <p><br>
  96. <br>
  97. </p>
  98. <p>&nbsp;</p>
  99. <p>&nbsp;</p></td>
  100. </tr>
  101. <tr align="right" bgcolor="#FFFFFF">
  102. <td height="30" align="left" class="bg-4">&nbsp;&nbsp;<span class="text">Manager : </span><span class="text-2">user admin</span> </td>
  103. <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>
  104. </tr>
  105. </table>
  106. </body>
  107. </html>