Exemplo n.º 1
0
 public function build($obj_build_exclude = array())
 {
     $me_setting = new me_setting();
     $all_me_settings = $me_setting->get_from_hashrange($this->id_expr . "@" . $this->idx_id);
     $this->obj_me_settings = array();
     if (is_array($all_me_settings)) {
         foreach ($all_me_settings as $each_mes) {
             $a_mes = new me_setting();
             $a_mes->set($each_mes);
             $a_mes->build();
             $this->obj_me_settings[$a_mes->name] = $a_mes;
         }
     }
     parent::build($obj_build_exclude);
     if (isset($this->obj_me_settings['str_expression'])) {
         if ($this->obj_me_settings['str_expression'] != 'undefined') {
             $this->hash_to_expression_tree($this->obj_me_settings['str_expression']->obj_value->id);
         }
     }
 }
Exemplo n.º 2
0
     // end if (addwhere button was hit)
 }
 // for each (post field)
 // LEVEL 1 - DELETE A DATABASE ACTION
 foreach ($_POST as $PK => $PV) {
     if (strpos($PK, 'btn_del_subsetting_db_action') === 0) {
         $base_db_action = str_replace("btn_del_", "", $PK);
         $base_db_action = str_replace("_table", "", $base_db_action);
         $base_db_action = str_replace("_name", "", $base_db_action);
         $me_to_del = new me_setting();
         $me_del_list = $me_to_del->get_from_hashrange($_POST['id_expr'] . "@" . $_POST['idx_id']);
         if (count($me_del_list) > 0) {
             foreach ($me_del_list as $me_del_item) {
                 if (strpos($me_del_item['name'], $base_db_action) === 0) {
                     $me_del = new me_setting();
                     $me_del->set($me_del_item);
                     $me_del->delete();
                     if (isset($_POST[$me_del_item['name']])) {
                         unset($_POST[$me_del_item['name']]);
                     }
                 }
             }
         }
         unset($_POST[$PK]);
     }
 }
 // LEVEL 1 - ADD A DATABASE ACTION
 if (isset($_POST['btn_add_subsetting_db_action_table_name'])) {
     if (isset($_POST['add_subsetting_db_action_table_name'])) {
         if (strlen($_POST['add_subsetting_db_action_table_name']) > 0) {
             $max_db_action = 0;