if (substr($file, strrpos($file, '.')) == $file_extension) { $directory_array[] = $file; } } } sort($directory_array); $dir->close(); } $modules_array = array(); $installed_modules = array(); for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) { $file = $directory_array[$i]; include $module_directory . $file; include $module_language_directory . 'admin/languages/' . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file; $class = substr($file, 0, strrpos($file, '.')); if (xos_class_exists($class)) { $module = new $class(); if ($module->check() > 0) { if ($module->sort_order > 0 && !isset($installed_modules[$module->sort_order])) { $installed_modules[$module->sort_order] = $file; } else { $installed_modules[] = $file; } } if ((empty($_GET['module']) || $_GET['module'] == $class) && !isset($mInfo)) { $module_info = array('code' => $module->code, 'title' => $module->title, 'description' => $module->description, 'status' => $module->check(), 'signature' => isset($module->signature) ? $module->signature : null, 'api_version' => isset($module->api_version) ? $module->api_version : null); $module_keys = $module->keys(); if ($module->check() > 0) { $keys_extra = array(); for ($j = 0, $k = sizeof($module_keys); $j < $k; $j++) { $key_value_query = xos_db_query("select configuration_key as lang_key, configuration_value, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_keys[$j] . "'");
if ($module->enabled) { $payment_allowed_array[] = array('group_payment_allowed_in_values' => xos_draw_checkbox_field('payment_allowed[' . $y . ']', $file, 0), 'group_payment_allowed_title' => $module->title); } } } } $smarty->assign('payment_allowed', $payment_allowed_array); $ship_module_active = explode(";", MODULE_SHIPPING_INSTALLED); $shipping_allowed_array = array(); for ($i = 0, $n = sizeof($ship_directory_array); $i < $n; $i++) { $file = $ship_directory_array[$i]; if (in_array($ship_directory_array[$i], $ship_module_active)) { include $ship_module_directory . $file; include DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '/modules/shipping/' . $file; $ship_class = substr($file, 0, strrpos($file, '.')); if (xos_class_exists($ship_class)) { $ship_module = new $ship_class(); if ($ship_module->enabled) { $shipping_allowed_array[] = array('group_shipping_allowed_in_values' => xos_draw_checkbox_field('shipping_allowed[' . $y . ']', $file, 0), 'group_shipping_allowed_title' => $ship_module->title); } } } } $smarty->assign(array('shipping_allowed' => $shipping_allowed_array, 'new' => true, 'form_begin_customers_new' => xos_draw_form('customers', FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('action')) . 'action=newconfirm', 'post', 'onsubmit="return check_form();"'), 'group_name_in_values' => xos_draw_input_field('customers_group_name', '', 'maxlength="32"', false), 'group_discount_in_out_values' => xos_draw_input_field('customers_group_discount', $cInfo->customers_group_discount, 'maxlength="5" size="5"', false), 'group_show_tax_in_values' => xos_draw_pull_down_menu('customers_group_show_tax', $cg_show_tax_array, '1'), 'group_tax_exempt_in_values' => xos_draw_pull_down_menu('customers_group_tax_exempt', $cg_tax_exempt_array, '0'), 'group_payment_settings_in_values_1' => xos_draw_radio_field('group_payment_settings', '1', false, '0'), 'group_payment_settings_in_values_0' => xos_draw_radio_field('group_payment_settings', '0', false, '0'), 'group_shipment_settings_in_values_1' => xos_draw_radio_field('group_shipment_settings', '1', false, xos_not_null($cInfo->group_shipment_allowed) ? '1' : '0'), 'group_shipment_settings_in_values_0' => xos_draw_radio_field('group_shipment_settings', '0', false, xos_not_null($cInfo->group_shipment_allowed) ? '1' : '0'), 'link_filename_customers_groups' => xos_href_link(FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('action', 'cID'))), 'form_end' => '</form>')); } else { switch ($_GET[listing]) { case "group": $order = "g.customers_group_name"; break; case "group-desc": $order = "g.customers_group_name DESC";