当前位置: 首页>>代码示例>>PHP>>正文


PHP get_domain_default_props函数代码示例

本文整理汇总了PHP中get_domain_default_props函数的典型用法代码示例。如果您正苦于以下问题:PHP get_domain_default_props函数的具体用法?PHP get_domain_default_props怎么用?PHP get_domain_default_props使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_domain_default_props函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: client_generatePageLists

/**
 * client_generatePageLists.
 *
 * @param iMSCP_pTemplate $tpl Template engine instance
 * @return void
 */
function client_generatePageLists($tpl)
{
    $domainProperties = get_domain_default_props($_SESSION['user_id']);
    $stmt = exec_query('SELECT created_by FROM admin WHERE admin_id = ?', $_SESSION['user_id']);
    $software_poss = gen_software_list($tpl, $domainProperties['domain_id'], $stmt->fields['created_by']);
    $tpl->assign('TOTAL_SOFTWARE_AVAILABLE', $software_poss);
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:13,代码来源:software.php

示例2: gen_editalias_page

function gen_editalias_page(&$tpl, $edit_id)
{
    global $sql;
    //Get data from sql
    list($domain_id) = get_domain_default_props($sql, $_SESSION['user_id']);
    $res = exec_query($sql, "select * from domain_aliasses where alias_id=? and domain_id = ?", array($edit_id, $domain_id));
    if ($res->RecordCount() <= 0) {
        $_SESSION['aledit'] = '_no_';
        header('Location: manage_domains.php');
        die;
    }
    $data = $res->FetchRow();
    $alias_ip_id = $data['alias_ip_id'];
    // Get ip -data
    $ipres = exec_query($sql, "select * from server_ips where ip_id=?", array($alias_ip_id));
    $ipdat = $ipres->FetchRow();
    $ip_data = $ipdat['ip_number'] . ' (' . $ipdat['ip_alias'] . ')';
    if (isset($_POST['uaction']) && $_POST['uaction'] == 'modify') {
        $url_forward = $_POST['forward'];
    } else {
        $url_forward = $data['url_forward'];
    }
    // Fill in the fileds
    $tpl->assign(array('ALIAS_NAME' => $data['alias_name'], 'DOMAIN_IP' => $ip_data, 'FORWARD' => $url_forward == 'no' ? '' : $url_forward, 'ID' => $edit_id));
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:25,代码来源:enable_als_fwd.php

示例3: check_client_domainalias_counts

/**
 *
 * @param <type> $sql
 * @param <type> $user_id
 */
function check_client_domainalias_counts($sql, $user_id)
{
    $dmn_props = get_domain_default_props($user_id);
    $als_cnt = get_domain_running_als_cnt($sql, $dmn_props['domain_id']);
    if ($dmn_props['domain_alias_limit'] != 0 && $als_cnt >= $dmn_props['domain_alias_limit']) {
        set_page_message(tr('Domain alias limit reached!'), 'warning');
        user_goto('domains_manage.php');
    }
}
开发者ID:gOOvER,项目名称:EasySCP,代码行数:14,代码来源:alias_add.php

示例4: check_domainalias_permissions

function check_domainalias_permissions($sql, $user_id)
{
    list($dmn_id, $dmn_name, $dmn_gid, $dmn_uid, $dmn_created_id, $dmn_created, $dmn_last_modified, $dmn_mailacc_limit, $dmn_ftpacc_limit, $dmn_traff_limit, $dmn_sqld_limit, $dmn_sqlu_limit, $dmn_status, $dmn_als_limit, $dmn_subd_limit, $dmn_ip_id, $dmn_disk_limit, $dmn_disk_usage, $dmn_php, $dmn_cgi) = get_domain_default_props($sql, $user_id);
    $als_cnt = get_domain_running_als_cnt($sql, $dmn_id);
    if ($dmn_als_limit != 0 && $als_cnt >= $dmn_als_limit) {
        set_page_message(tr('Domain alias limit expired!'));
        header("Location: manage_domains.php");
        die;
    }
}
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:10,代码来源:add_alias.php

示例5: reseller_generatePage

/**
 * Generates page
 *
 * @param iMSCP_pTemplate $tpl Template instance engine
 * @param int $domainId Domain unique identifier
 * @return void
 */
function reseller_generatePage($tpl, $domainId)
{
    $stmt = exec_query('
            SELECT
                domain_admin_id
            FROM
                domain
            INNER JOIN
                admin ON(admin_id = domain_admin_id)
            WHERE
                domain_id = ?
            AND
                created_by = ?
        ', array($domainId, $_SESSION['user_id']));
    if (!$stmt->rowCount()) {
        showBadRequestErrorPage();
    }
    $domainAdminId = $stmt->fields['domain_admin_id'];
    $domainProperties = get_domain_default_props($domainAdminId, $_SESSION['user_id']);
    // Domain IP address info
    $stmt = exec_query("SELECT ip_number FROM server_ips WHERE ip_id = ?", $domainProperties['domain_ip_id']);
    if (!$stmt->rowCount()) {
        $domainIpAddr = tr('Not found.');
    } else {
        $domainIpAddr = $stmt->fields['ip_number'];
    }
    $domainStatus = $domainProperties['domain_status'];
    // Domain status
    if ($domainStatus == 'ok' || $domainStatus == 'disabled' || $domainStatus == 'todelete' || $domainStatus == 'toadd' || $domainStatus == 'torestore' || $domainStatus == 'tochange' || $domainStatus == 'toenable' || $domainStatus == 'todisable') {
        $domainStatus = '<span style="color:green">' . tohtml(translate_dmn_status($domainStatus)) . '</span>';
    } else {
        $domainStatus = '<b><font size="3" color="red">' . $domainStatus . "</font></b>";
    }
    // Get total domain traffic usage in bytes
    $query = "\n        SELECT\n            IFNULL(SUM(dtraff_web), 0) AS dtraff_web, IFNULL(SUM(dtraff_ftp), 0) AS dtraff_ftp,\n            IFNULL(SUM(dtraff_mail), 0) AS dtraff_mail, IFNULL(SUM(dtraff_pop), 0) AS dtraff_pop\n        FROM\n            domain_traffic\n        WHERE\n            domain_id = ?\n        AND\n            dtraff_time BETWEEN ? AND ?\n    ";
    $stmt = exec_query($query, array($domainProperties['domain_id'], getFirstDayOfMonth(), getLastDayOfMonth()));
    if ($stmt->rowCount()) {
        $trafficUsageBytes = $stmt->fields['dtraff_web'] + $stmt->fields['dtraff_ftp'] + $stmt->fields['dtraff_mail'] + $stmt->fields['dtraff_pop'];
    } else {
        $trafficUsageBytes = 0;
    }
    // Get limits in bytes
    $trafficLimitBytes = $domainProperties['domain_traffic_limit'] * 1048576;
    $diskspaceLimitBytes = $domainProperties['domain_disk_limit'] * 1048576;
    // Get usages in percent
    $trafficUsagePercent = make_usage_vals($trafficUsageBytes, $trafficLimitBytes);
    $diskspaceUsagePercent = make_usage_vals($domainProperties['domain_disk_usage'], $diskspaceLimitBytes);
    // Get Email quota info
    list($quota, $quotaLimit) = reseller_gen_mail_quota_limit_mgs($domainAdminId);
    # Features
    $trEnabled = '<span style="color:green">' . tr('Enabled') . '</span>';
    $trDisabled = '<span style="color:red">' . tr('Disabled') . '</span>';
    $tpl->assign(array('DOMAIN_ID' => $domainId, 'VL_DOMAIN_NAME' => tohtml(decode_idna($domainProperties['domain_name'])), 'VL_DOMAIN_IP' => tohtml($domainIpAddr), 'VL_STATUS' => $domainStatus, 'VL_PHP_SUPP' => $domainProperties['domain_php'] == 'yes' ? $trEnabled : $trDisabled, 'VL_PHP_EDITOR_SUPP' => $domainProperties['phpini_perm_system'] == 'yes' ? $trEnabled : $trDisabled, 'VL_CGI_SUPP' => $domainProperties['domain_cgi'] == 'yes' ? $trEnabled : $trDisabled, 'VL_DNS_SUPP' => $domainProperties['domain_dns'] == 'yes' ? $trEnabled : $trDisabled, 'VL_EXT_MAIL_SUPP' => $domainProperties['domain_external_mail'] == 'yes' ? $trEnabled : $trDisabled, 'VL_SOFTWARE_SUPP' => $domainProperties['domain_software_allowed'] == 'yes' ? $trEnabled : $trDisabled, 'VL_BACKUP_SUP' => translate_limit_value($domainProperties['allowbackup']), 'VL_TRAFFIC_PERCENT' => $trafficUsagePercent, 'VL_TRAFFIC_USED' => bytesHuman($trafficUsageBytes), 'VL_TRAFFIC_LIMIT' => bytesHuman($trafficLimitBytes), 'VL_DISK_PERCENT' => $diskspaceUsagePercent, 'VL_DISK_USED' => bytesHuman($domainProperties['domain_disk_usage']), 'VL_DISK_LIMIT' => bytesHuman($diskspaceLimitBytes), 'VL_MAIL_ACCOUNTS_USED' => get_domain_running_mail_acc_cnt($domainId), 'VL_MAIL_ACCOUNTS_LIMIT' => translate_limit_value($domainProperties['domain_mailacc_limit']), 'VL_MAIL_QUOTA_USED' => $quota, 'VL_MAIL_QUOTA_LIMIT' => $domainProperties['domain_mailacc_limit'] != '-1' ? $quotaLimit : tr('Disabled'), 'VL_FTP_ACCOUNTS_USED' => get_customer_running_ftp_acc_cnt($domainAdminId), 'VL_FTP_ACCOUNTS_LIMIT' => translate_limit_value($domainProperties['domain_ftpacc_limit']), 'VL_SQL_DB_ACCOUNTS_USED' => get_domain_running_sqld_acc_cnt($domainId), 'VL_SQL_DB_ACCOUNTS_LIMIT' => translate_limit_value($domainProperties['domain_sqld_limit']), 'VL_SQL_USER_ACCOUNTS_USED' => get_domain_running_sqlu_acc_cnt($domainId), 'VL_SQL_USER_ACCOUNTS_LIMIT' => translate_limit_value($domainProperties['domain_sqlu_limit']), 'VL_SUBDOM_ACCOUNTS_USED' => get_domain_running_sub_cnt($domainId), 'VL_SUBDOM_ACCOUNTS_LIMIT' => translate_limit_value($domainProperties['domain_subd_limit']), 'VL_DOMALIAS_ACCOUNTS_USED' => get_domain_running_als_cnt($domainId), 'VL_DOMALIAS_ACCOUNTS_LIMIT' => translate_limit_value($domainProperties['domain_alias_limit'])));
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:61,代码来源:domain_details.php

示例6: client_generatePage

/**
 * Generate Page
 *
 * @param iMSCP_pTemplate $tpl Template engine instance
 * @param int $softwareId Software uique identifier
 * @return int Software unique identifier
 */
function client_generatePage($tpl, $softwareId)
{
    $customerId = $_SESSION['user_id'];
    $domainProperties = get_domain_default_props($customerId);
    $stmt = exec_query('SELECT created_by FROM admin WHERE admin_id = ?', $customerId);
    if ($stmt->rowCount()) {
        $row = $stmt->fetchRow(PDO::FETCH_ASSOC);
        get_software_props_install($tpl, $domainProperties['domain_id'], $softwareId, $row['created_by'], $domainProperties['domain_sqld_limit']);
    } else {
        throw new iMSCP_Exception('An unexpected error occurred. Please contact your reseller.');
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:19,代码来源:software_install.php

示例7: _client_getSubdomainData

/**
 * Get subdomain data
 *
 * @access private
 * @param int $subdomainId Subdomain unique identifier
 * @param string $subdomainType Subdomain Type
 * @return array Subdomain data. If any error occurs FALSE is returned
 */
function _client_getSubdomainData($subdomainId, $subdomainType)
{
    static $subdomainData = null;
    if (null === $subdomainData) {
        $mainDmnProps = get_domain_default_props($_SESSION['user_id']);
        $domainId = $mainDmnProps['domain_id'];
        $domainName = $mainDmnProps['domain_name'];
        if ($subdomainType == 'dmn') {
            $query = '
				SELECT
					`subdomain_name` AS `subdomain_name` , `subdomain_url_forward` AS `forward_url`
				FROM
					`subdomain`
				WHERE
					`subdomain_id` = ?
				AND
					`domain_id` = ?
				AND
					`subdomain_status` = ?
			';
        } else {
            $query = '
				SELECT
					`t1`.`subdomain_alias_name` AS `subdomain_name`, `t1`.`subdomain_alias_url_forward` AS `forward_url`,
					`t2`.`alias_name` `aliasName`
				FROM
					`subdomain_alias` AS `t1`
				INNER JOIN
					`domain_aliasses` AS `t2` USING(`alias_id`)
				WHERE
					`subdomain_alias_id` = ?
				AND
					`t2`.`domain_id` = ?
				AND
					`t1`.`subdomain_alias_status` = ?
			';
        }
        $stmt = exec_query($query, array($subdomainId, $domainId, 'ok'));
        if (!$stmt->rowCount()) {
            return false;
        }
        $subdomainData = $stmt->fetchRow(PDO::FETCH_ASSOC);
        if ($subdomainType == 'dmn') {
            $subdomainData['subdomain_name'] .= '.' . $domainName;
            $subdomainData['subdomain_name_utf8'] = decode_idna($subdomainData['subdomain_name']);
        } else {
            $subdomainData['subdomain_name'] .= '.' . $subdomainData['aliasName'];
            $subdomainData['subdomain_name_utf8'] = decode_idna($subdomainData['subdomain_name']);
        }
    }
    return $subdomainData;
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:60,代码来源:subdomain_edit.php

示例8: client_generatePage

/**
 * Generate page and return software unique identifier.
 *
 * @param iMSCP_pTemplate $tpl Template engine instance
 * @return int software unique identifier
 */
function client_generatePage($tpl)
{
    if (!isset($_GET['id']) || $_GET['id'] === '' || !is_numeric($_GET['id'])) {
        showBadRequestErrorPage();
        exit;
        // Useless but avoid IDE warning about possible undefined variable
    } else {
        $softwareId = intval($_GET['id']);
    }
    $domainProperties = get_domain_default_props($_SESSION['user_id']);
    $stmt = exec_query('SELECT created_by FROM admin WHERE admin_id = ?', $_SESSION['user_id']);
    get_software_props($tpl, $domainProperties['domain_id'], $softwareId, $stmt->fields['created_by'], $domainProperties['domain_sqld_limit']);
    return $softwareId;
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:20,代码来源:software_view.php

示例9: client_checkSqlUserPermissions

/**
 * Check SQL permissions
 *
 * @param iMSCP_pTemplate $tpl
 * @param int $databaseId Database unique identifier
 */
function client_checkSqlUserPermissions($tpl, $databaseId)
{
    $domainProperties = get_domain_default_props($_SESSION['user_id']);
    $domainSqlUsersLimit = $domainProperties['domain_sqlu_limit'];
    $limits = get_domain_running_sql_acc_cnt($domainProperties['domain_id']);
    if ($domainSqlUsersLimit != 0 && $limits[1] >= $domainSqlUsersLimit) {
        $tpl->assign('CREATE_SQLUSER', '');
    }
    $stmt = exec_query('
            SELECT domain_id FROM domain INNER JOIN sql_database USING(domain_id)
            WHERE domain_id = ? AND sqld_id = ? LIMIT 1
        ', array($domainProperties['domain_id'], $databaseId));
    if (!$stmt->rowCount()) {
        showBadRequestErrorPage();
    }
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:22,代码来源:sql_user_add.php

示例10: _client_getAliasData

/**
 * Get domain alias data
 *
 * @access private
 * @param int $domainAliasId Subdomain unique identifier
 * @return array Domain alias data. If any error occurs FALSE is returned
 */
function _client_getAliasData($domainAliasId)
{
    static $domainAliasData = null;
    if (null === $domainAliasData) {
        $mainDmnProps = get_domain_default_props($_SESSION['user_id']);
        $domainId = $mainDmnProps['domain_id'];
        $query = "\n\t\t\tSELECT\n\t\t\t\t`alias_name`, `url_forward` AS `forward_url`\n\t\t\tFROM\n\t\t\t\t`domain_aliasses`\n\t\t\tWHERE\n\t\t\t\t`alias_id` = ?\n\t\t\tAND\n\t\t\t\t`domain_id` = ?\n\t\t\tAND\n\t\t\t\t`alias_status` = ?\n\t\t";
        $stmt = exec_query($query, array($domainAliasId, $domainId, 'ok'));
        if (!$stmt->rowCount()) {
            return false;
        }
        $domainAliasData = $stmt->fetchRow(PDO::FETCH_ASSOC);
        $domainAliasData['alias_name_utf8'] = decode_idna($domainAliasData['alias_name']);
    }
    return $domainAliasData;
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:23,代码来源:alias_edit.php

示例11: getDomainsList

/**
 * Get domains list
 *
 * @return array Domains list
 */
function getDomainsList()
{
    static $domainsList = null;
    if (null !== $domainsList) {
        return $domainsList;
    }
    $mainDmnProps = get_domain_default_props($_SESSION['user_id']);
    $domainsList = array(array('name' => $mainDmnProps['domain_name'], 'id' => $mainDmnProps['domain_id'], 'type' => 'dmn', 'mount_point' => '/'));
    $stmt = exec_query("\n            SELECT CONCAT(t1.subdomain_name, '.', t2.domain_name) AS name, t1.subdomain_mount AS mount_point\n            FROM subdomain AS t1 INNER JOIN domain AS t2 USING(domain_id)\n            WHERE t1.domain_id = :domain_id AND t1.subdomain_status = :status_ok\n            UNION ALL\n            SELECT alias_name AS name, alias_mount AS mount_point\n            FROM domain_aliasses\n            WHERE domain_id = :domain_id AND alias_status = :status_ok\n            UNION ALL\n            SELECT CONCAT(t1.subdomain_alias_name, '.', t2.alias_name) AS name, t1.subdomain_alias_mount AS mount_point\n            FROM subdomain_alias AS t1 INNER JOIN domain_aliasses AS t2 USING(alias_id)\n            WHERE t2.domain_id = :domain_id AND subdomain_alias_status = :status_ok\n        ", array('domain_id' => $mainDmnProps['domain_id'], 'status_ok' => 'ok'));
    if ($stmt->rowCount()) {
        $domainsList = array_merge($domainsList, $stmt->fetchAll(PDO::FETCH_ASSOC));
        usort($domainsList, function ($a, $b) {
            return strnatcmp(decode_idna($a['name']), decode_idna($b['name']));
        });
    }
    return $domainsList;
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:22,代码来源:alias_add.php

示例12: _client_getVerifiedData

/**
 * Returns verified data
 *
 * @access private
 * @param int $itemId Item id (Domain ID or domain alias id)
 * @param string $itemType Item type (normal or alias
 * @return array An array that holds verified data
 */
function _client_getVerifiedData($itemId, $itemType)
{
    $domainProps = get_domain_default_props($_SESSION['user_id']);
    $domainId = $domainProps['domain_id'];
    if ($itemType == 'normal') {
        $stmt = exec_query('
				SELECT
					domain_id, domain_name AS name, external_mail, external_mail_dns_ids
				FROM
					domain WHERE domain_id = ?
			', $domainId);
        if ($stmt->rowCount()) {
            $row = $stmt->fetchRow(PDO::FETCH_ASSOC);
            if ($row['domain_id'] !== $itemId) {
                showBadRequestErrorPage();
                exit;
            }
        } else {
            showBadRequestErrorPage();
            exit;
        }
    } elseif ($itemType == 'alias') {
        $stmt = exec_query('
				SELECT
					domain_id, alias_name AS name, external_mail, external_mail_dns_ids
				FROM
					domain_aliasses
				WHERE
					alias_id = ?
				AND
					domain_id = ?
			', array($itemId, $domainId));
        if ($stmt->rowCount()) {
            $row = $stmt->fetchRow(PDO::FETCH_ASSOC);
        } else {
            showBadRequestErrorPage();
            exit;
        }
    } else {
        showBadRequestErrorPage();
        exit;
    }
    return array('domain_id' => $domainId, 'item_id' => $itemId, 'item_name' => $row['name'], 'item_type' => $itemType, 'external_mail_type' => $row['external_mail'], 'external_mail_dns_ids' => explode(',', $row['external_mail_dns_ids']));
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:52,代码来源:mail_external_edit.php

示例13: check_sql_permissions

/**
 * @param EasySCP_TemplateEngine $tpl
 * @param EasySCP_Database $sql
 * @param int $user_id
 * @param int $db_id
 * @param bool $sqluser_available
 * @return void
 */
function check_sql_permissions($tpl, $sql, $user_id, $db_id, $sqluser_available)
{
    $dmn_props = get_domain_default_props($user_id);
    list(, $sqlu_acc_cnt) = get_domain_running_sql_acc_cnt($sql, $dmn_props['domain_id']);
    if ($dmn_props['domain_sqlu_limit'] != 0 && $sqlu_acc_cnt >= $dmn_props['domain_sqlu_limit']) {
        if (!$sqluser_available) {
            set_page_message(tr('SQL users limit reached!'), 'warning');
            user_goto('sql_manage.php');
        }
    } else {
        $tpl->assign('CREATE_SQLUSER', true);
    }
    $dmn_name = $_SESSION['user_logged'];
    $query = "\n\t\tSELECT\n\t\t\tt1.`sqld_id`, t2.`domain_id`, t2.`domain_name`\n\t\tFROM\n\t\t\t`sql_database` AS t1,\n\t\t\t`domain` AS t2\n\t\tWHERE\n\t\t\tt1.`sqld_id` = ?\n\t\tAND\n\t\t\tt2.`domain_id` = t1.`domain_id`\n\t\tAND\n\t\t\tt2.`domain_name` = ?\n\t";
    $rs = exec_query($sql, $query, array($db_id, $dmn_name));
    if ($rs->recordCount() == 0) {
        set_page_message(tr('User does not exist or you do not have permission to access this interface!'), 'warning');
        user_goto('sql_manage.php');
    }
}
开发者ID:gOOvER,项目名称:EasySCP,代码行数:28,代码来源:sql_user_add.php

示例14: _client_getVerifiedData

/**
 * Returns verified data
 *
 * @access private
 * @param int $itemId Item id (Domain ID or domain alias id)
 * @param string $itemType Item type (normal or alias
 * @return array An array that holds verified data (main domain id and item name)
 */
function _client_getVerifiedData($itemId, $itemType)
{
    $domainProps = get_domain_default_props($_SESSION['user_id']);
    $domainId = $domainProps['domain_id'];
    if ($itemType == 'normal') {
        $stmt = exec_query('SELECT domain_id, domain_name AS name FROM domain WHERE domain_id = ?', $domainId);
        if (!$stmt->rowCount() || $stmt->fields['domain_id'] !== $itemId) {
            showBadRequestErrorPage();
        }
    } elseif ($itemType == 'alias') {
        $stmt = exec_query('SELECT domain_id, alias_name AS name FROM domain_aliasses WHERE alias_id = ? AND domain_id = ?', array($itemId, $domainId));
        if (!$stmt->rowCount()) {
            showBadRequestErrorPage();
        }
    } else {
        showBadRequestErrorPage();
        exit;
        // Only to make some IDE happy
    }
    return array('domain_id' => $domainId, 'item_id' => $itemId, 'item_name' => $stmt->fields['name'], 'item_type' => $itemType);
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:29,代码来源:mail_external_add.php

示例15: client_checkMailAccountOwner

/**
 * Checks that the given mail account is owned by current customer and its responder is not active
 *
 * @param int $mailAccountId Mail account id to check
 * @return bool TRUE if the mail account is owned by the current customer, FALSE otherwise
 */
function client_checkMailAccountOwner($mailAccountId)
{
    $domainProps = get_domain_default_props($_SESSION['user_id']);
    $query = '
		SELECT
			`t1`.*, `t2`.`domain_id`, `t2`.`domain_name`
		FROM
			`mail_users` AS `t1`, `domain` AS `t2`
		WHERE
			`t1`.`mail_id` = ?
		AND
			`t2`.`domain_id` = `t1`.`domain_id`
		AND
			`t2`.`domain_id` = ?
		AND
			`t1`.`mail_auto_respond` = ?
		AND
			`t1`.`status` = ?
    ';
    $stmt = exec_query($query, array($mailAccountId, $domainProps['domain_id'], 0, 'ok'));
    return (bool) $stmt->rowCount();
}
开发者ID:svenjantzen,项目名称:imscp,代码行数:28,代码来源:mail_autoresponder_enable.php


注:本文中的get_domain_default_props函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。