public function read_url_keys_text_for_list($db_table_name, $is_required = TRUE) { if (isset($this->board_list_object)) { /** * URL key text management */ $related_url_keys_text = url::set_url_rewrite_var(url::get_url_level_count(), "related_url_keys_text", FALSE); if (!empty($related_url_keys_text)) { $related_table = $db_table_name; $related_db_table = new \k1lib\crudlexs\class_db_table($this->db_table->db, $related_table); $related_url_keys_array = \k1lib\sql\table_url_text_to_keys($related_url_keys_text, $related_db_table->get_db_table_config()); $related_url_keys_text_auth_code = md5(\k1lib\K1MAGIC::get_value() . $related_url_keys_text); if (isset($_GET['auth-code']) && $_GET['auth-code'] === $related_url_keys_text_auth_code) { $this->db_table->set_query_filter($related_url_keys_array, TRUE); return $related_url_keys_text; } else { $this->board_list_object->set_is_enabled(FALSE); DOM_notification::queue_mesasage(board_base_strings::$error_url_keys_no_auth, "alert", $this->notifications_div_id, \k1lib\common_strings::$error); return FALSE; } } else { if ($is_required) { $this->board_list_object->set_is_enabled(FALSE); DOM_notification::queue_mesasage(board_base_strings::$error_url_keys_no_keys_text, "alert", $this->notifications_div_id, \k1lib\common_strings::$error); return FALSE; } } } }
public function check_login() { // /** // * SQL check // */ $fielter_array = [$this->user_login_field => $this->user_login_input_value, $this->user_password_field => $this->user_password_input_value]; $this->db_table->set_query_filter($fielter_array, TRUE); $this->user_data = $this->db_table->get_data(FALSE); return $this->user_data; }
/** * @param \k1lib\crudlexs\class_db_table $db_table * @param array $field_links_array * @param string $board_root * @param string $board_read * @param boolean $clear_url * @return \k1lib\crudlexs\listing|boolean */ public function do_related_list(class_db_table $db_table, $field_links_array, $board_root, $board_read, $clear_url = FALSE) { $table_alias = \k1lib\db\security\db_table_aliases::encode($db_table->get_db_table_name()); if ($this->is_enabled && $this->read_object->is_valid()) { /** * Clients list */ if ($db_table->get_state()) { if ($this->related_use_rows_key_text) { $current_row_keys_array = $this->read_object->get_row_keys_array(); $db_table->set_field_constants($current_row_keys_array); $db_table->set_query_filter($current_row_keys_array, TRUE, $this->related_do_clean_array_on_query_filter); } /** * LIST OBJECT must be created here to know if ther is data or not to show * all data button. */ $this->related_list = new \k1lib\crudlexs\listing($db_table, FALSE); $this->related_list->set_rows_per_page($this->related_rows_to_show); $data_loaded = $this->related_list->load_db_table_data($this->related_use_show_rule); if ($data_loaded) { if ($this->related_apply_filters) { $this->related_apply_filters(); $this->related_apply_link_read_field($field_links_array, $board_root, $board_read, $clear_url); } } return $this->related_list; } else { trigger_error("DB Table couldn't be opened : " . $db_table->get_db_table_name(), E_USER_NOTICE); return FALSE; } } else { return FALSE; } }