Execute("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id='" . $_SESSION['languages_id'] . "' limit 1"); if ($chk_option_names->RecordCount() < 1) { $messageStack->add_session(ERROR_DEFINE_OPTION_NAMES, 'caution'); zen_redirect(zen_href_link(FILENAME_OPTIONS_NAME_MANAGER)); } // if (!$lng_id) $_GET['lng_id'] = $_SESSION['languages_id']; // if (!$_GET['lng_id']) $_GET['lng_id'] = $_SESSION['languages_id']; $languages_array = array(); $languages = zen_get_languages(); $_GET['lng_exists'] = false; for ($i=0; $i $languages[$i]['id'], 'text' => $languages[$i]['name']); } if (!$_GET['lng_exists']==true) $_GET['lng_id'] = $_SESSION['languages_id']; if ($_GET['action'] == "update_sort_order") { foreach($_POST['products_options_sort_order'] as $id => $new_sort_order) { $row++; $db->Execute("UPDATE " . TABLE_PRODUCTS_OPTIONS . " set products_options_sort_order= " . $_POST['products_options_sort_order'][$id] . " where products_options_id= $id and language_id=" . $_GET['lng_id']); } $messageStack->add_session(SUCCESS_OPTION_SORT_ORDER, 'success'); $_GET['action']=''; zen_redirect(zen_href_link(FILENAME_PRODUCTS_OPTIONS_NAME, 'options_id=' . $options_id . '&lng_id=' . $_GET['lng_id'])); } ?> > <?php echo TITLE; ?>
'; if ($_GET['lng_id'] != $_SESSION['languages_id']) { echo ' '; } echo ' '; $row = $db->Execute("SELECT * FROM " . TABLE_PRODUCTS_OPTIONS . " WHERE language_id = '" . $_GET['lng_id'] . "' ORDER BY products_options_sort_order, products_options_id"); while (!$row->EOF) { switch (true) { case ($row->fields['products_options_type']==PRODUCTS_OPTIONS_TYPE_RADIO): $the_attributes_type= '(RADIO)'; break; case ($row->fields['products_options_type']==PRODUCTS_OPTIONS_TYPE_TEXT): $the_attributes_type= '(TEXT)'; break; case ($row->fields['products_options_type']==PRODUCTS_OPTIONS_TYPE_FILE): $the_attributes_type= '(FILE)'; break; case ($row->fields['products_options_type']==PRODUCTS_OPTIONS_TYPE_CHECKBOX): $the_attributes_type= '(CHECKBOX)'; break; default: $the_attributes_type='(DROPDOWN)'; break; } if ($_GET['lng_id'] !=$_SESSION['languages_id']) { echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; } echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; $row->MoveNext(); } ?>
   
  ' . TEXT_CURRENT_NAME . ' ' . TEXT_SORT_ORDER . '  ' . TEXT_OPTION_ID . ' ' . TEXT_OPTION_TYPE . ' ' . TEXT_OPTION_NAME . ' ' . TEXT_SORT_ORDER . '
' . zen_get_language_icon($_SESSION['languages_id']) . '' . zen_get_option_name_language($row->fields["products_options_id"], $_SESSION['languages_id']) . '' . zen_get_option_name_language_sort_order($row->fields["products_options_id"], $_SESSION['languages_id']) . '  ' . zen_get_language_icon($_GET['lng_id']) . '' . $row->fields["products_options_id"] . '' . $the_attributes_type . '' . $row->fields["products_options_name"] . '' . "fields['products_options_id']."]\" value={$row->fields['products_options_sort_order']} size=\"4\">" . '