
$(‘select’).select2({theme: ‘bootstrap’});
$(‘#_QUESTIONNAIRES’).select2(‘open’);

$(‘select’).select2({theme: ‘bootstrap’});
$(‘#_QUESTIONNAIRES’).select2(‘open’);
$(‘select’).select2({theme: ‘bootstrap’});
$(‘#label_versionlist’).hide();
$(‘#_VERSIONS’).next().hide();
require “”.$_SERVER[‘DOCUMENT_ROOT’].”/xyz/Zebra_Form/Zebra_Form.php”;
$form = new Zebra_Form(‘form1’, ‘post’, ”, array(‘autocomplete’ => ‘off’));
// — _UPLOADS_MULTI ——————————————————————
$form->add(‘label’, ‘lbl_uploads_multi’, ‘_UPLOADS_MULTI’, “CESUploads”);
$obj = $form->add(‘multiplefile’, ‘_UPLOADS_MULTI’);
$myPath1 = ‘CES’ . ‘/’ . ‘Docs’;
$obj->set_rule(array(
‘upload’ => array($myPath1, false, ‘error’, ‘errUpload’),
‘filetype’ => array(‘pdf,jpg,jpeg, png’, ‘error’, ‘errFileType’),
‘filesize’ => array(2000000, ‘error’, ‘errMaxFileSize#2000000’),
‘maxfiles’ => array(50, ‘error’, ‘lblMaxFiles#50’),
));
On Submit …..
if ($form->validate()) {
$fileUploadId = $form->getUploadId();
foreach ($fileUploadId as $key => $value)
echo ‘ storeDetail (‘ . $value . ‘); ‘;
}
$form->render(‘inl_sev_057_T_opl.php’);
$fileUpload = $form->getUploadDetails($uploadid);
$myArray = json_decode(json_encode($fileUpload), True);
$myArray = array_shift($myArray);
$myEnv = “http://” . $myEnv;
foreach ($myArray as $key => $value) {
$myURL = substr($myArray[$key][‘path’], 5);
$mySafeURL = str_replace(‘ ‘, ‘%20’, $myURL);
$mysrc = $myEnv . $mySafeURL;

echo “<hr>”;
}
$form->render(‘inl_sev_065_T_ver.php’);
?>
$obj = $form->add(‘button’, ‘btnSubmit’,'<i class=”fa fa fa-save” ></i> ’ . ‘Submit’);
$obj->set_attributes(array(
‘class’ => ‘btn btn-success’,
‘type’ => ‘button’,
‘onclick’ => ‘storeDetail ()’
));
$form->add(‘label’, ‘label_questionlist’, ”, “CESChooseaquestionfromthepool”);
for ($x = 0; $x <= 14; $x++) {
$obj = $form->add(‘select’, ‘_QUESTION_LIST’ . $x);
$obj->add_options($questionArray);
$obj->set_attributes(array(
‘class’ => ‘input-field control form-control’,
‘style’ => ‘width:500px’,
));
$obj->set_rule(array(
));
$obj->disable_spam_filter();
}
$form->add(‘label’, ‘label_weight’, ”, “CESWeightin”);
for ($x = 0; $x <= 14; $x++) {
$obj = $form->add(‘select’, ‘_WEIGHT’ . $x);
$obj->add_options(array(
0 => ‘0’,
1 => ‘1’,
5 => ‘5’,
10 => ’10’,
15 => ’15’,
20 => ’20’,
25 => ’25’,
30 => ’30’,
35 => ’35’,
40 => ’40’,
45 => ’45’,
50 => ’50’,
60 => ’60’,
100 => ‘100’,
));
$obj->set_attributes(array(
‘class’ => ‘input-field control form-control’,
‘style’ => ‘width:150px’,
‘onChange’ => ‘calculatePercentage()’
));
$obj->set_rule(array(
));
$obj->disable_spam_filter();
}
$(document).ready( function () {
$(‘select’).select2({theme: ‘bootstrap’});
});
$(document).ready( function () {
$(“input[type=text]”).focus(function() {
$(this).select();
});
});
// — Retrieve the list of questions ——————————————
$sql = “SELECT _QUESTION FROM questions WHERE _DEPT = ‘$dept'”;
$db = new MysqliDb(‘CES’);
$selectStatus = $db->rawQuery($sql);
$questionArray = [];
if ($selectStatus > 0) {
$tmp[‘message’] = ‘Central evaluation system – Questions loaded successfully’;
$tmp[‘success’] = ‘Y’;
foreach ($selectStatus as $row) {
$questionArray[] = $row[‘_QUESTION’];
}
}
You must be logged in to post a comment.