Posted in Font awesome, HTML, PHP

Info icon

echo ‘<i style=”float:right; color:#AFAFAF;padding-right: 10px;” title=”Program inl_sev_064_Z_ver.php, Template inl_sev_065_T_ver.php, JSON inl_sev_066_J_ver.php” class=”fa fa-info-circle”></i>’;

echo ‘<br>’;

Posted in Bootstrap, Font awesome, HTML, PHP

The button bar

ButtonBar

// — btnDocupload ——————————————————————–

$obj = $form->add(‘button’, ‘btnDocupload’,'<i class=”fa fa fa-save” ></i>&nbsp’ . ‘CESUpload’);

$obj->set_attributes(array(
‘class’ => ‘btn btn-success’,
‘onclick’ => ‘docUpload()’,
‘type’ => ‘button’
));

// — btnDocview ——————————————————————–

$obj = $form->add(‘button’, ‘btnDocview’,'<i class=”fa fa fa-info-circle” ></i>&nbsp’ . ‘CESViewdocs’);

$obj->set_attributes(array(
‘class’ => ‘btn btn-info’,
‘onclick’ => ‘docView()’,
‘type’ => ‘button’
));

// — btnEvaluasiestaat —————————————————————

$obj = $form->add(‘button’, ‘btnEvaluasiestaat’,'<i class=”fa fa fa-info-circle” ></i>&nbsp’ . ‘CESStaat’);

$obj->set_attributes(array(
‘class’ => ‘btn btn-info’,
‘onclick’ => ‘statementEvaluation()’,
‘type’ => ‘button’
));

// — btnPrintMyPDF ——————————————————————-

$obj = $form->add(‘button’, ‘btnPrintMyPDF’,'<i class=”fa fa fa-print” ></i>&nbsp’ . ‘CESPrintmypdf’);

$obj->set_attributes(array(
‘class’ => ‘btn btn-info’,
‘type’ => ‘button’,
‘onclick’ => ‘printPage()’,
));


 

The template

ButtonBarTemplate

Posted in EasyUI, Font awesome, PHP, SQL

EasyUI Datagrid JSON information

require_once($_SERVER[‘DOCUMENT_ROOT’].’/xyz/db/MysqliDb.php’);

// — Parameters input ——————————————————–

$questionnaire = (isset($_REQUEST[‘QUESTIONNAIRE’])) ? $_REQUEST[‘QUESTIONNAIRE’] : ”;
$version = (isset($_REQUEST[‘VERSION’])) ? $_REQUEST[‘VERSION’] : ”;
$tak = (isset($_REQUEST[‘TAK’])) ? $_REQUEST[‘TAK’] : ”;

// — Define containers ——————————————————-

$terugvoer = array();
$tmp = array();

// — Retrieve the list of UPLOADID’s by DEPARTMENT —————————

$sql = “SELECT upload_id, _UPLOADID FROM uploads
WHERE _TAK = ‘$tak’ AND _TEMPLATE = ‘$questionnaire’ AND _VERSION = ‘$version’ “;

$db = new MysqliDb(‘CES’);

$selectStatus = $db->rawQuery($sql);

if ($selectStatus > 0) {

foreach ($selectStatus as $row) {

$tmp[‘_UPLOADID’] = $row[‘_UPLOADID’];

$uploadid = $row[‘_UPLOADID’];
$isn = $row[‘upload_id’];

// — Add buttons with event parameters ———————————

$tmp[‘view’] = ‘<a onclick=”viewDoc (\”.$uploadid.’\’)”
<button class=”btn btn-info fa fa-info-circle”> </button></a>’;

// ———————————————————————–

$tmp[‘delete’] = ‘<a onclick=”Delete (\”.$uploadid.’\’)”
<button class=”btn btn-danger fa fa-trash”> </button></a>’;

// ———————————————————————–

$terugvoer[] = $tmp;

}

}

echo json_encode($terugvoer);

?>