stappenplanBAO

This commit is contained in:
2023-07-03 12:08:17 +02:00
parent d0b8914462
commit 4c1536e8b3
6 changed files with 59 additions and 35 deletions
+47 -30
View File
@@ -2,60 +2,68 @@
/** Labels_model januari 2015 */
class Labels_model extends MY_Model{
class Labels_model extends MY_Model
{
protected $tablename = 'tb_labels';
function __construct(){
parent::__construct();
$models = array();
$this->load->model($models);
}
protected $tablename = 'tb_labels';
function getLabel($sysnr){
$this->sql="SELECT waarde
function __construct()
{
parent::__construct();
$models = array();
$this->load->model($models);
}
function getLabel($sysnr)
{
$this->sql = "SELECT waarde
FROM tb_translate
WHERE modulenr = {$sysnr} ";
return $this->get_query_row("waarde");
}
function getLabels($module){
$this->sql="SELECT *
function getLabels($module)
{
$this->sql = "SELECT *
FROM tb_translate
WHERE modulenr = {$module} ";
return $this->get_query_result();
return $this->get_query_result();
}
function getalllabels($module = false){
if (! $module) $module = $this->session->userdata('module');
$this->sql="SELECT L.omschrijving, T.waarde
function getalllabels($module = false)
{
if (!$module) $module = $this->session->userdata('module');
$this->sql = "SELECT L.omschrijving, T.waarde
FROM tb_translate T
JOIN tb_labels L on L.id = T.labelid
WHERE modulenr = {$module}";
$labels = $this->get_query_result();
$lbl = array();
if ($labels){
foreach($labels as $label){
$lbl[$label->omschrijving]=$label->waarde;
};// foreach
}
return $lbl;
}
WHERE modulenr = {$module}";
$labels = $this->get_query_result();
$lbl = array();
if ($labels) {
foreach ($labels as $label) {
$lbl[$label->omschrijving] = $label->waarde;
};// foreach
}
return $lbl;
}
function gettabellabel($modulenr){
$this->sql="SELECT waarde
function gettabellabel($modulenr)
{
$this->sql = "SELECT waarde
FROM tb_translate T
WHERE modulenr = {$modulenr}
AND labelid = 2 ";
return $this->get_query_row("waarde");
}
function getresultaatlabel($modulenr){
$this->sql="SELECT waarde
function getresultaatlabel($modulenr)
{
$this->sql = "SELECT waarde
FROM tb_translate T
WHERE modulenr = {$modulenr}
AND labelid = 1 ";
@@ -63,4 +71,13 @@ class Labels_model extends MY_Model{
}
function get_label_by_id($module, $id)
{
$this->sql = "SELECT waarde
FROM tb_translate T
WHERE modulenr = {$module}
AND labelid = {$id} ";
return $this->get_query_row("waarde");
}
}