$root = $_REQUEST['root']; if (ZVhosts::changeDocRoot($name, $root)) { setmsg(t('Site updated.'), 'notice'); } else { setmsg(t('Error')); } } if (checktoken() && 'suspend' == $_REQUEST['op']) { if (ZVhosts::suspendVhost($name, !intval($_REQUEST['suspend']))) { setmsg('', 'notice'); } else { setmsg(t('Error')); } } if (checktoken() && 'default' == $_REQUEST['op'] && isadmin()) { if (ZVhosts::setDefaultSite($name)) { setmsg('Updated', 'notice'); } else { setmsg(t('Error')); } } $deny_begin = '####ZHPANEL DENY BEGIN'; $deny_end = '####ZHPANEL DENY END'; $token = token(); $vhost = ZVhosts::getVhost($name); $aliases = ZVhosts::getAliases($name); $htaccess = "{$home}/{$vhost->owner}/{$name}/.htaccess"; if (checktoken() && 'denyips' == $_REQUEST['op']) { $denyips = $_REQUEST['denyips']; $patten_ip = "@^[0-9\\./a-f:]+\$@"; $arr_ips = explode("\n", $denyips);
function setDefaultSite($name) { return ZVhosts::setDefaultSite($name); }