79 lines
2.8 KiB
PHP
79 lines
2.8 KiB
PHP
<?php
|
|
|
|
|
|
|
|
require_once 'include/utils/utils.php';
|
|
|
|
require_once 'includes/Loader.php';
|
|
|
|
vimport ('includes.runtime.EntryPoint');
|
|
|
|
require_once 'SUtiles.php';
|
|
|
|
@session_start();
|
|
|
|
|
|
|
|
global $adb;
|
|
|
|
$current_user = Users_Record_Model::getCurrentUserModel();
|
|
|
|
$userId = $current_user->get('id');
|
|
|
|
$roleid = $current_user->get('roleid');
|
|
|
|
|
|
|
|
function result($Question ,$userId ,$roleid ){
|
|
|
|
|
|
|
|
echo'<tr class="listViewEntries" >
|
|
|
|
<td class="related-list-actions">';
|
|
|
|
if($roleid =='H2'){
|
|
|
|
echo'<span class="actionImages"> <a id="modele" onclick="showEditQuestion('.$Question['id'].',1)"><i class="fa fa-pencil" title="Editer"></i></a> </span>';
|
|
|
|
}
|
|
|
|
echo'<span><a class="quickView fa fa-eye icon action" onclick="showEditQuestion('.$Question['id'].',0)" title="Vue Rapide"></a></span>';
|
|
|
|
echo'</td>
|
|
|
|
<td class="relatedListEntryValues" title="'.$Question['question'].'" data-field-type="picklist" nowrap=""><span class="value textOverflowEllipsis">'.$Question['question'].'</span></td>';
|
|
|
|
|
|
|
|
echo'</tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
function getAllQuestions($RecordId){
|
|
|
|
global $adb;
|
|
|
|
|
|
|
|
$query = "SELECT * FROM `result_lignes_formulaire` , `lignes_formulaire` ,`formulaire` where lignes_formulaire.id_ligne_formulaire = result_lignes_formulaire.id_ligne_formulaire
|
|
|
|
and formulaire.id_formulaire = lignes_formulaire.id_formulaire and result_lignes_formulaire.accountId='".$RecordId."' ";
|
|
|
|
$result =$adb->query($query);
|
|
|
|
$Questions=array();
|
|
|
|
while ($recordinfo = $adb->fetch_array($result)) {
|
|
|
|
$Questions[] = $recordinfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $Questions;
|
|
|
|
}
|
|
|
|
|
|
|
|
$Questions = getAllQuestions($_GET['RecordId']);
|
|
|
|
|
|
|
|
echo'
|
|
|
|
<div class="relatedContainer">
|
|
|
|
<div class="relatedContents col-lg-12 col-md-12 col-sm-12 table-container">
|
|
|
|
<div class="bottomscroll-div">
|
|
|
|
<table id="listview-table" class="table listview-table">
|
|
|
|
<thead>
|
|
|
|
<tr class="listViewHeaders">
|
|
|
|
<th style="min-width:100px"></th>
|
|
|
|
<th class="nowrap"><a class="listViewContentHeaderValues"><i class="fa fa-sort customsort"></i> Question </a></th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</thead>
|
|
|
|
<tbody>';
|
|
|
|
|
|
|
|
foreach ($Questions as $Question) {
|
|
|
|
result($Question , $userId , $roleid );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo' </tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="ResultModalEditQuestion"></div>';
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|