mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
719f2d7314
- Method execReadOnlyQuery of DB_Model less strict check against SQL statements - Added new public method setup to DB_Model to setup the model after initialization - Added new constants to UDFLib - Added new private method _printEndUDFBlock and _printEndUDFBlock to UDFLib - Added new public methods setUDFUniqueId, getSession, getSessionElement, setSession, setSessionElement, saveUDFs and isAllowed to UDFLib - Removed model system/FAS_UDF_model - View views/system/fas_udf now uses the view templates/FHC-Header - Added new parameter udfs to view templates/FHC-Header - Added new properties to UDFWidget - Added new private methods _initUDFWidget, _checkParameters and _startUDFWidget to UDFWidget
53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?php
|
|
|
|
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
class FAS_UDF extends Auth_Controller
|
|
{
|
|
const FAS_UDF_SESSION_NAME = 'fasUdfSessionName';
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct(
|
|
array(
|
|
'index' => 'basis/person:r',
|
|
'saveUDF' => 'basis/person:rw'
|
|
)
|
|
);
|
|
|
|
$this->load->model('person/Person_model', 'PersonModel');
|
|
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public function index()
|
|
{
|
|
$person_id = $this->input->get('person_id');
|
|
$prestudent_id = $this->input->get('prestudent_id');
|
|
|
|
if (isset($person_id) && is_numeric($person_id))
|
|
{
|
|
if ($this->PersonModel->hasUDF())
|
|
{
|
|
$personUdfs = $this->PersonModel->getUDFs($person_id);
|
|
$data['person_id'] = $person_id;
|
|
$data['personUdfs'] = $personUdfs;
|
|
}
|
|
}
|
|
|
|
if (isset($prestudent_id) && is_numeric($prestudent_id))
|
|
{
|
|
if ($this->PrestudentModel->hasUDF())
|
|
{
|
|
$prestudentUdfs = $this->PrestudentModel->getUDFs($prestudent_id);
|
|
$data['prestudent_id'] = $prestudent_id;
|
|
$data['prestudentUdfs'] = $prestudentUdfs;
|
|
}
|
|
}
|
|
|
|
$this->load->view('system/fas_udf', $data);
|
|
}
|
|
}
|