statisticsList($api); break; case 'recordList': recordList($api); break; case 'recordAdd': recordAdd($api); break; case 'spareAdd': spareAdd($api); break; case 'recordUpdate': recordUpdate($api); break; case 'recordDelete': recordDelete($api); break; default: return false; } /** * 域名列表 * * @return string */ function domainList($api) { $domain = json_decode($api->domain->domainList(), true); $html = '<tr class="bg_white h_30"><td colspan="9">暂无数据</td></tr>'; if (!empty($domain['data'])) { $html = '';
$mysqli = $system->get_mysqli(); if ($system->get_user_id() < 1) { $response = $system->addError(HEURIST_REQUEST_DENIED); } else { $action = @$_REQUEST['a']; // || @$_REQUEST['action']; // call function from db_record library // these function returns standard response: status and data // data is recordset (in case success) or message if ($action == "a" || $action == "add") { $record = array(); $record['RecTypeID'] = @$_REQUEST['rt']; $record['OwnerUGrpID'] = @$_REQUEST['ro']; $record['NonOwnerVisibility'] = @$_REQUEST['rv']; $response = recordAdd($system, $record); } else { if ($action == "s" || $action == "save") { $response = recordSave($system, $_REQUEST); } else { if (($action == "d" || $action == "delete") && @$_REQUEST['ids']) { $response = recordDelete($system, $_REQUEST['ids']); } else { $response = $system->addError(HEURIST_INVALID_REQUEST); } } } } } header('Content-type: text/javascript'); print json_encode($response); exit;