Пример #1
0
     if (!$alias) {
         $alias = 'x';
     }
     $res = $pdo->update('site', array('aliases' => $alias), "name='{$name}'");
     if ($res) {
         $message = t("Httpd configuration saved.");
     }
     if ($removed) {
         $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']))) {
Пример #2
0
function removeVhost($domain)
{
    return ZVhosts::removeVhost($domain) && syncVhosts();
}