Exemplo n.º 1
0
         $message = t("Alias invalid or occupied: ") . "<br />" . join(', ', $removed);
     }
     $type = $removed ? 'warning' : 'notice';
     sync();
     setmsg($message, $type, 'self');
 }
 if (checktoken() && 'remove' == $_REQUEST['op']) {
     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');
Exemplo n.º 2
0
function changeDocRoot($domain, $newRoot)
{
    return ZVhosts::changeDocRoot($domain, $newRoot);
}