3 || count($domain_array) <2) { iajax(-1, '只支持一级域名和二级域名!'); } $domain = preg_replace('/^https?/', '', $bind_domain); $uniacid = pdo_getcolumn('uni_settings', array('bind_domain' => array('http' . $domain, 'https' . $domain)), 'uniacid'); if (empty($uniacid) || $uniacid == $_W['uniacid']) { uni_setting_save('bind_domain', $bind_domain); iajax(0, '绑定成功!', referer()); } else { $account_name = pdo_getcolumn('uni_account', array('uniacid' => $uniacid), 'name'); iajax(-1, "绑定失败, 该域名已被 {$account_name} 绑定!", referer()); } } $modulelist = uni_modules(); if (!empty($modulelist)) { foreach ($modulelist as $key => $module_val) { if (!empty($module_val['issystem']) || $module_val['webapp_support'] != MODULE_SUPPORT_WEBAPP) { unset($modulelist[$key]); continue; } } } template('webapp/bind-domain'); } if ($do == 'delete') { uni_setting_save('bind_domain', ''); itoast('删除成功!', referer(), 'success'); } if ($do == 'default_module') { $module_name = safe_gpc_string($_GPC['module_name']); if (empty($module_name)) { iajax(-1, '请选择一个模块!'); } $modulelist = array_keys(uni_modules()); if (!in_array($module_name, $modulelist)) { iajax(-1, '模块不可用!'); } uni_setting_save('default_module', $module_name); iajax(0, '修改成功!', referer()); }