function mdl_read($str_app, $str_by = "app_id", $num_notId = 0)
{
$_arr_appSelect = array("app_id", "app_name", "app_url_notify", "app_url_sync", "app_key", "app_note", "app_status", "app_time", "app_ip_allow", "app_ip_bad", "app_sync", "app_allow");
if (is_numeric($str_app)) {
$_str_sqlWhere = $str_by . "=" . $str_app;
} else {
$_str_sqlWhere = $str_by . "='" . $str_app . "'";
}
if ($num_notId > 0) {
$_str_sqlWhere .= " AND app_id<>" . $num_notId;
}
$_arr_appRows = $this->obj_db->select(BG_DB_TABLE . "app", $_arr_appSelect, $_str_sqlWhere, "", "", 1, 0);
//检查本地表是否存在记录
if (isset($_arr_appRows[0])) {
//用户名不存在则返回错误
$_arr_appRow = $_arr_appRows[0];
} else {
return array("alert" => "x050102");
}
if (isset($_arr_appRow["app_allow"])) {
$_arr_appRow["app_allow"] = fn_jsonDecode($_arr_appRow["app_allow"], "no");
} else {
$_arr_appRow["app_allow"] = array();
}
if (!$_arr_appRow["app_url_sync"]) {
$_arr_appRow["app_url_sync"] = $_arr_appRow["app_url_notify"];
}
$_arr_appRow["app_url_notify"] = fn_htmlcode($_arr_appRow["app_url_notify"], "decode", "url");
$_arr_appRow["app_url_sync"] = fn_htmlcode($_arr_appRow["app_url_sync"], "decode", "url");
$_arr_appRow["alert"] = "y050102";
return $_arr_appRow;
}