You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (in_array($type, array_keys($int_map)) && in_array($ip_owner, get_internal_ip_owners())) {
236
+
if (in_array($service_type, array_keys($int_map)) && in_array($ip_owner, get_internal_ip_owners())) {
237
237
$return['status'] = 'error';
238
-
$return['status_text'] .= "Your IP appears to be within the {$ip_owner} Network. Because of this your license should be changed to a {$service_types[$int_map[$type]]['services_name']} License. Please submit the updated order form to place the order.\n";
238
+
$return['status_text'] .= "Your IP appears to be within the {$ip_owner} Network. Because of this your license should be changed to a {$service_types[$int_map[$service_type]]['services_name']} License. Please submit the updated order form to place the order.\n";
239
239
$continue = false;
240
240
}
241
-
if ($service_types[$type]['services_field2'] != '') {
$return['status_text'] .= "This IP does not appear to be a {$service_types[$type]['services_field2']} IP\n";
245
+
$return['status_text'] .= "This IP does not appear to be a {$service_types[$service_type]['services_field2']} IP\n";
246
246
$continue = false;
247
247
}
248
248
}
249
249
// coupon code
250
250
if ($coupon != '') {
251
-
$couponquery = <<<SQL
252
-
select * from coupons where (customer=-1 or customer={$custid}) and (usable != 0) and module='{$module}' and (applies=-1 or applies like '%,{$type},%' or applies='{$type}' or applies like '{$type},%' or applies like '%,{$type}') and (name='{$coupon}')
253
-
SQL;
251
+
$couponquery = "select * from coupons where (customer=-1 or customer={$custid}) and (usable != 0) and module='{$module}' and (applies=-1 or find_in_set('{$service_type}', applies) != 0) and (name='{$coupon}')";
254
252
$db->query($couponquery, __LINE__, __FILE__);
255
253
if ($db->num_rows() == 0) {
256
254
$return['status'] = 'error';
257
-
$return['status_text'] .= "Invalid {$module} Coupon '{$coupon}' Specified for type '{$type}'\n";
255
+
$return['status_text'] .= "Invalid {$module} Coupon '{$coupon}' Specified for type '{$service_type}'\n";
if ($service_types[$type]['services_type'] == get_service_define('CPANEL')) {
287
+
if ($service_types[$service_type]['services_type'] == get_service_define('CPANEL')) {
290
288
$db->query("SELECT services_id FROM services LEFT JOIN service_categories ON category_id=services_category WHERE services_module = 'licenses' AND category_module = 'licenses' and category_tag = 'cpanel'");
$db->query("select * from {$settings['TABLE']} where {$settings['PREFIX']}_ip='{$ip}' and {$settings['PREFIX']}_type=$type", __LINE__, __FILE__);
328
+
$db->query("select * from {$settings['TABLE']} where {$settings['PREFIX']}_ip='{$ip}' and {$settings['PREFIX']}_type=$service_type", __LINE__, __FILE__);
0 commit comments