C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RAQKNYH\admin\preview.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/*
* LimeSurvey
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.

* $Id: preview.php 6606 2009-04-09 18:26:36Z c_schmitz $
*/


//Ensure script is not run directly, avoid path disclosure
include_once("login_check.php");
require_once(
dirname(__FILE__).'/sessioncontrol.php');
require_once(
dirname(__FILE__).'/../qanda.php');

if (!isset(
$surveyid)) {$surveyid=returnglobal('sid');}
if (!isset(
$qid)) {$qid=returnglobal('qid');}
if (empty(
$surveyid)) {die("No SID provided.");}
if (empty(
$qid)) {die("No QID provided.");}

if (!isset(
$_GET['lang']) || $_GET['lang'] == "")
{
    
$language GetBaseLanguageFromSurveyID($surveyid);
} else {
    
$language $_GET['lang'];
}

$_SESSION['s_lang'] = $language;
$clang = new limesurvey_lang($language);

$qquery 'SELECT * FROM '.db_table_name('questions')." WHERE sid='$surveyid' AND qid='$qid' AND language='{$language}'";
$qresult db_execute_assoc($qquery);
$qrows $qresult->FetchRow();
$ia = array(=> $qid=> "FIELDNAME"=> $qrows['title'], => $qrows['question'], => $qrows['type'], => $qrows['gid'],
=> $qrows['mandatory'], => $qrows['other']);
$answers retrieveAnswers($ia);
$thistpl="$publicdir/templates";
doHeader();
//echo "\t\t\t\t<div id='question'";
$form_start '
        <!-- JAVASCRIPT FOR CONDITIONAL QUESTIONS -->
        <script type="text/javascript">
<!--
function checkconditions(value, name, type)
{
}
//-->
        </script>
        <form method="post" action="index.php" id="limesurvey" name="limesurvey">
'
;



$question="<label for='$answers[0][7]'>" $answers[0][0] . "</label>";
$answer=$answers[0][1];
$help=$answers[0][2];
$questioncode=$answers[0][5];
$content templatereplace(file_get_contents("$thistpl/preview.pstpl"));
$content str_replace('{FORM_START}' $form_start $content);
if(
$qrows['mandatory'] == 'Y')
{
    
$mandatory ' mandatory';
}
else
{
    
$mandatory '';
}
$content str_replace('{QUESTION_CLASS}' question_class($qrows['type']) . $mandatory $content);
echo 
$content;
echo 
"</html>\n";


exit;
?>