Esempio n. 1
0
     if (ZVhosts::removeVhost($name)) {
         setmsg(t('Site removed.'), 'notice');
     } else {
         setmsg(t('Error'));
     }
 }
 if (checktoken() && 'chDocRoot' == $_REQUEST['op']) {
     $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();
function suspendVhost($domain, $state = 0)
{
    return ZVhosts::suspendVhost($domain, $state) && syncVhosts();
}