function check_user_ip_data($reseller_id, $r_ips, $u_ips, &$err)
{
    if ($r_ips == $u_ips) {
        return;
    } else {
        $rip_array = explode(";", $r_ips);
        for ($i = 0; $i < count($rip_array) - 1; $i++) {
            $ip = $rip_array[$i];
            if (!preg_match("/{$ip};/", $u_ips)) {
                $ip_num = '';
                $ip_name = '';
                if (have_reseller_ip_users($reseller_id, $ip, $ip_num, $ip_name)) {
                    $ip_msg = "{$ip_num} ({$ip_name})";
                    $err = tr('This reseller has domains assigned To <b>') . $ip_msg;
                    $err .= tr('</b> Address !<br>Edit reseller aborted!');
                    return;
                }
            }
        }
    }
}
Esempio n. 2
0
/**
 * Must be documented
 *
 * @param int $reseller_id reselller unique identifier
 * @param string $r_ips reseller Ips
 * @param string $u_ips users Ips
 * @return void
 */
function check_user_ip_data($reseller_id, $r_ips, $u_ips)
{
    if ($r_ips != $u_ips) {
        $rip_array = explode(';', $r_ips);
        for ($i = 0, $cnt_rip_array = count($rip_array) - 1; $i < $cnt_rip_array; $i++) {
            $ip = $rip_array[$i];
            if (!preg_match("/{$ip};/", $u_ips)) {
                $ip_num = '';
                $ip_name = '';
                if (have_reseller_ip_users($reseller_id, $ip, $ip_num, $ip_name)) {
                    $ip_msg = "{$ip_num} ({$ip_name})";
                    set_page_message(tr('This reseller has domains assigned to the <strong>%s</strong> address!', $ip_msg), 'warning');
                    break;
                }
            }
        }
    }
}