public static function get_httpd_from_servername($servername)
    {
        $sql = '
		SELECT		vh.*
		FROM		vhffs_httpd vh
		WHERE		vh.servername = ' . VHFFS_db::get()->quote($servername);
        $st = VHFFS_db::get()->query($sql);
        if (VHFFS_db::get()->errorCode() != 0) {
            echo '<pre>' . $sql . '</pre>';
            foreach (VHFFS_db::get()->errorInfo() as $info) {
                echo $info . '<br>';
            }
            die;
        }
        $res = $st->fetch(PDO::FETCH_OBJ);
        return $res;
    }
 public static function get_servernames_to_renew()
 {
     global $conf;
     $now = new DateTime();
     $di = new DateInterval('P' . $conf['le_recommended_renewal'] . 'D');
     $limit = $now->sub($di)->format('Y-m-d');
     $sql = "\n\t\tSELECT\tvh.servername\n\t\tFROM\tvhffs_letsencrypt vl, vhffs_httpd vh\n\t\tWHERE\tvl.httpd_id = vh.httpd_id\n\t\t\tAND\tvl.certificate_date <= '" . $limit . "'";
     $st = VHFFS_db::get()->query($sql);
     $res = $st->fetchAll(PDO::FETCH_COLUMN, 'servername');
     // 		var_dump($res); die;
     return $res;
 }
 public static function close()
 {
     self::$db = NULL;
 }