function vhcs_email_check($data, $num)
{
    $data = "{$data}\n";
    $res = preg_match("/^([^\\@]+)\\@([^\n+]+)\n\$/", $data, $match);
    if ($res == 0) {
        return 0;
    }
    $res = vhcs_username_check($match[1], $num);
    if ($res == 0) {
        return 0;
    }
    $res = full_domain_check($match[2]);
    if ($res == 0) {
        return 0;
    }
    return 1;
}
function vhcs_mountpt_check($data, $num)
{
    $res = preg_match("/^\\/htdocs\$/", $data, $match);
    if ($res == 1) {
        return 0;
    }
    $res = preg_match("/^\\/backups\$/", $data, $match);
    if ($res == 1) {
        return 0;
    }
    $res = preg_match("/^\\/cgi-bin\$/", $data, $match);
    if ($res == 1) {
        return 0;
    }
    $res = preg_match("/^\\/errors\$/", $data, $match);
    if ($res == 1) {
        return 0;
    }
    $res = preg_match("/^\\/logs\$/", $data, $match);
    if ($res == 1) {
        return 0;
    }
    $res = explode("/", trim($data));
    $cnt_res = count($res);
    if ($cnt_res > 2) {
        return 0;
    }
    $res = preg_match_all("(\\/[^\\/]*)", $data, $match, PREG_PATTERN_ORDER);
    if ($res == 0) {
        return 0;
    }
    $count = $res;
    for ($i = 0; $i < $count; $i++) {
        $token = substr($match[0][$i], 1);
        $res = vhcs_username_check($token, $num);
        if ($res == 0) {
            return 0;
        }
    }
    return 1;
}