123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?php
- $language_file='survey';
- require_once ('../inc/global.inc.php');
- require_once (api_get_path(LIBRARY_PATH).'/fileManage.lib.php');
- require_once (api_get_path(CONFIGURATION_PATH) ."/add_course.conf.php");
- require_once (api_get_path(LIBRARY_PATH)."/add_course.lib.inc.php");
- require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
- require_once (api_get_path(LIBRARY_PATH)."/groupmanager.lib.php");
- require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
- require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
- $table_survey = Database :: get_course_table(TABLE_SURVEY);
- $surveyid = $_REQUEST['surveyid'];
- $uid = $_REQUEST['uid'];
- $uid1 = $_REQUEST['uid1'];
- $db_name = $_REQUEST['db_name'];
- $temp = $_REQUEST['temp'];
- $mail = $_REQUEST['mail'];
- session_start();
- $_SESSION["user_language_choice"]='english';
- if(isset($_GET['next'])){
- $lang = $_REQUEST['lang'];
- $code_survey = $_REQUEST['code_survey'];
- $sql = 'SELECT survey.survey_id
- FROM '.$db_name.'.survey as survey
- WHERE survey.code="'.addslashes($code_survey).'"
- AND survey.lang="'.addslashes($lang).'"';
- $rs = api_sql_query($sql, __FILE__, __LINE__);
- $surveyid = mysql_result($rs,0,'survey_id');
- header('Location:template1.php?'.$_SERVER['QUERY_STRING'].'&surveyid='.$surveyid);
- }
- $sql_sname = " SELECT survey2.* FROM $db_name.survey as survey1
- INNER JOIN $db_name.survey as survey2
- ON survey1.code = survey2.code
- WHERE survey1.survey_id='$surveyid'";
- $res_sname = api_sql_query($sql_sname,__FILE__,__LINE__);
- $code_survey = mysql_result($res_sname, 0, 'code');
- mysql_data_seek($res_sname,0);
- $surveyname = '';
- while($obj_sname = mysql_fetch_object($res_sname))
- {
- $surveyname .= $obj_sname->title.'<br>';
- }
- mysql_data_seek($res_sname,0);
- Display::display_header($tool_name);
- api_display_tool_title($surveyname);
- api_display_tool_title($tool_name);
- if($error_message)
- {
- Display::display_error_message($error_message);
- }
- ?>
- <link href="../css/survey_white.css" rel="stylesheet" type="text/css">
- <table width="727" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F6F5F5">
- <tr>
- <td width="23" height="21"> </td>
- <td height="21"> </td>
- <td width="20" height="21"> </td>
- </tr>
- <tr>
- <td> </td>
- <td valign="top">
- <table width="100%" height="132" border="0" cellpadding="0" cellspacing="0" bgcolor="#F6F5F5">
- <form method="GET" action="<?php echo $_SERVER['PHP_SELF'] ?>">
- <input type="hidden" name="uid" value="<?php echo $uid;?>">
- <input type="hidden" name="db_name" value="<?php echo $db_name;?>">
- <input type="hidden" name="temp" value="<?php echo $temp;?>">
- <input type="hidden" name="email" value="<?php echo $email;?>">
- <input type="hidden" name="mail" value="<?php echo $mail;?>">
- <input type="hidden" name="uid1" value="<?php echo $uid1;?>">
- <input type="hidden" name="code_survey" value="<?php echo $code_survey;?>">
- Select in which language you want to see this survey :
- <select name="lang">
- <?php
- while($survey = mysql_fetch_object($res_sname)){
- echo '<option value="'.$survey->lang.'">'.$survey->lang.'</option>';
- }
- ?>
- </select>
- <br /><br />
- <input type="submit" name="next" value="<?php echo get_lang('Next') ?>" />
- </form>
- </table>
- </td>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- </table>
- <?php
- Display::display_footer();
- ?>
|