diff --git a/admin/preview.php b/admin/preview.php index 32dd2d8ffdc..16fbcb51dff 100644 --- a/admin/preview.php +++ b/admin/preview.php @@ -82,9 +82,9 @@ function noop_checkconditions(value, name, type) $answer=$answers[0][1]; $help=$answers[0][2]; -$questioncode=$answers[0][5]; $question = $answers[0][0]; +$question['code']=$answers[0][5]; $question['class'] = question_class($qrows['type']); $question['essentials'] = 'id="question'.$qrows['qid'].'"'; if ($qrows['mandatory'] == 'Y') diff --git a/admin/printablesurvey.php b/admin/printablesurvey.php index 2e1b03c91ba..bfe3d500843 100644 --- a/admin/printablesurvey.php +++ b/admin/printablesurvey.php @@ -70,35 +70,10 @@ function try_debug($line) } if(isset($_POST['printableexport'])){$pdf->titleintopdf($surveyname,$surveydesc);} -switch($dateformattype) -{ - case 1: $dformat = 'd.m.Y'; // dd.mm.yyyy - break; - case 2: $dformat = 'd-m-Y'; // dd-mm-yyyy - break; - case 5: $dformat = 'd/m/Y'; // dd/mm/yyyy - break; - case 3: $dformat = 'Y.m.d'; // yyyy.mm.dd - break; - case 7: $dformat = 'Y/m/d'; // yyyy/mm/dd - break; - case 6: $dbformat = 'Y-m-d'; // yyyy-mm-dd - break; - case 4: $dformat = 'j.n.Y'; // d.m.yyyy - break; - case 8: $dformat = 'j/n/y'; // d/m/yyyy - break; - case 12: $dbformat = 'j-n-Y'; // d-m-yyyy - break; - case 9: $dformat = 'm-d-Y'; // mm-dd-yyyy - break; - case 10: $dbformat = 'm.d.Y'; // mm.dd.yyyy - break; - case 11: $dbformat = 'm/d/Y'; // mm/dd/yyyy - break; - default: $dformat = 'Y-m-d'; // yyyy-mm-dd - break; -}; + +$dformat=getDateFormatData($dateformattype); +$dformat=$dformat['phpdate']; + $expirytimestamp = strtotime($surveyexpirydate); $expirytimeofday_h = date('H',$expirytimestamp); $expirytimeofday_m = date('i',$expirytimestamp); diff --git a/admin/templates.php b/admin/templates.php index af456a198f8..330d1c68a03 100644 --- a/admin/templates.php +++ b/admin/templates.php @@ -510,12 +510,10 @@ ,'input_error_class' => '' ); - // $questioncode="1a"; $answer="\n"; $myoutput = array_merge($myoutput, doreplacement(sGetTemplatePath($templatename)."/question.pstpl")); // $question='*'.$clang->gT("Please explain something in detail:"); - // $questioncode="2"; $answer=""; $question = array( 'all' => '*'.$clang->gT("Please explain something in detail:")