예제 #1
0
 public function __construct($getCurrentUrl)
 {
     $this->Url = $getCurrentUrl;
     $this->operation = decode(fk_post('oper'));
     $this->DateTime = new DateTime();
     // No display header
     if (fk_post('ajax') == '1') {
         fk_no_display_header();
     }
 }
예제 #2
0
 public function __construct()
 {
     if (@$_GET['ajax'] == '1') {
         $Act = 'show-json';
         fk_no_display_header();
     } else {
         $Act = 'show-table';
     }
     $this->Action = $Act;
 }
예제 #3
0
 /**
  *@package AppList
  *@since v0.2
  *@method __construct()
  * */
 public function __construct($sql)
 {
     $this->sql = $sql;
     // Set Op
     if (isset($_POST['op'])) {
         $this->operation = decode($_POST['op']);
     } elseif (isset($_GET['op'])) {
         $this->operation = decode($_GET['op']);
     }
     // No display header
     if (@$_POST['ajax'] == '1' || $this->operation == 'export') {
         fk_no_display_header();
     }
 }
예제 #4
0
 /**
  *@package AppForm
  *@since v0.1 beta
  *@method __construct()
  * */
 public function __construct($table = '', $CodeName = '')
 {
     // Table name
     if ($table != '') {
         $m_name = $table . 'Form';
     } else {
         $m_name = get_class($this);
     }
     // Set Op
     if (isset($_POST['op'])) {
         $this->operation = decode($_POST['op']);
     } elseif (isset($_GET['op'])) {
         $this->operation = decode($_GET['op']);
     }
     // No display header
     if (@$_POST['ajax'] == '1' || $this->operation == 'export') {
         fk_no_display_header();
     }
     $m_name_tot = strlen($m_name);
     // Remove 'Form' word from ModelNameForm
     $this->model = substr($m_name, 0, $m_name_tot - 4);
     $this->IdObject = self::getFormId($this->model) . $CodeName;
     $this->ObjectCode = $CodeName;
     // Crear DbRecord para el Modelo
     $this->DbRecord = new db_record($this->model);
     $this->DbRecord->prefix_field = $this->IdObject;
     $this->sql_list = "SELECT * FROM  " . $this->model;
     //id user
     $this->id_user = isset($_SESSION['id_usuario']) ? $_SESSION['id_usuario'] : 0;
 }