Files
Froxlor/lib/functions/froxlor/function.domainHasSslIpPort.php
2013-09-19 22:13:12 +02:00

34 lines
984 B
PHP

<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2013 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Michael Kaufmann <mkaufmann@nutime.de>
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Cron
*
* @since 0.9.29.1-dev1
*
*/
function domainHasSslIpPort($domainid = 0) {
global $db;
$result = $db->query_first("
SELECT `dt`.* FROM `".TABLE_DOMAINTOIP."` `dt`, `".TABLE_PANEL_IPSANDPORTS."` `iap`
WHERE `dt`.`id_ipandports` = `iap`.`id` AND `iap`.`ssl` = '1' AND `dt`.`id_domain` = '".(int)$domainid."';
");
if (is_array($result) && isset($result['id_ipandports'])) {
return true;
}
return false;
}