本文整理汇总了PHP中oos_get_languages函数的典型用法代码示例。如果您正苦于以下问题:PHP oos_get_languages函数的具体用法?PHP oos_get_languages怎么用?PHP oos_get_languages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oos_get_languages函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: oos_get_languages
$manufacturer_inputs_string = '';
$languages = oos_get_languages();
for ($i = 0, $n = count($languages); $i < $n; $i++) {
$manufacturer_inputs_string .= '<br />' . oos_image(OOS_SHOP_IMAGES . 'flags/' . $languages[$i]['iso_639_2'] . '.gif', $languages[$i]['name']) . ' ' . oos_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');
}
$contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
$contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('save', 'save_off.gif', IMAGE_SAVE) . ' <a href="' . oos_href_link_admin($aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $_GET['mID']) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
break;
case 'edit':
$heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_MANUFACTURER . '</b>');
$contents = array('form' => oos_draw_form('manufacturers', $aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
$contents[] = array('text' => TEXT_EDIT_INTRO);
$contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_NAME . '<br />' . oos_draw_input_field('manufacturers_name', $mInfo->manufacturers_name));
$contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_IMAGE . '<br />' . oos_draw_file_field('manufacturers_image') . '<br />' . $mInfo->manufacturers_image);
$manufacturer_inputs_string = '';
$languages = oos_get_languages();
for ($i = 0, $n = count($languages); $i < $n; $i++) {
$manufacturer_inputs_string .= '<br />' . oos_image(OOS_SHOP_IMAGES . 'flags/' . $languages[$i]['iso_639_2'] . '.gif', $languages[$i]['name']) . ' ' . oos_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', oos_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));
}
$contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
$contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('save', 'save_off.gif', IMAGE_SAVE) . ' <a href="' . oos_href_link_admin($aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
break;
case 'delete':
$heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_MANUFACTURER . '</b>');
$contents = array('form' => oos_draw_form('manufacturers', $aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_DELETE_INTRO);
$contents[] = array('text' => '<br /><b>' . $mInfo->manufacturers_name . '</b>');
$contents[] = array('text' => '<br />' . oos_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE);
if ($mInfo->products_count > 0) {
$contents[] = array('text' => '<br />' . oos_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
$contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
示例2: walk
//.........这里部分代码省略.........
' . $v_products_id . ',
' . $v_products_price . '
)');
}
if ($v_customer_price_3 != '') {
$result = $dbconn->Execute('
INSERT INTO
' . $oostable['products_groups'] . '
VALUES
(
' . $v_customer_group_id_3 . ',
' . $v_customer_price_3 . ',
' . $v_products_id . ',
' . $v_products_price . '
)');
}
if ($v_customer_price_4 != '') {
$result = $dbconn->Execute('
INSERT INTO
' . $oostable['products_groups'] . '
VALUES
(
' . $v_customer_group_id_4 . ',
' . $v_customer_price_4 . ',
' . $v_products_id . ',
' . $v_products_price . '
)');
}
}
// VJ product attribs begin
if (isset($v_attribute_options_id_1)) {
$attribute_rows = 1;
// master row count
$languages = oos_get_languages();
// product options count
$attribute_options_count = 1;
$v_attribute_options_id_var = 'v_attribute_options_id_' . $attribute_options_count;
while (isset(${$v_attribute_options_id_var}) && !empty(${$v_attribute_options_id_var})) {
// remove product attribute options linked to this product before proceeding further
// this is useful for removing attributes linked to a product
$attributes_clean_result = "delete FROM " . $oostable['products_attributes'] . " WHERE products_id = '" . (int) $v_products_id . "' and options_id = '" . (int) ${$v_attribute_options_id_var} . "'";
$dbconn->Execute($attributes_clean_result);
$attribute_options_result = "SELECT products_options_name FROM " . $oostable['products_options'] . " WHERE products_options_id = '" . (int) ${$v_attribute_options_id_var} . "'";
$attribute_options_values = $dbconn->Execute($attribute_options_result);
// option table update begin
if ($attribute_rows == 1) {
// insert into options table if no option exists
if ($attribute_options_values->RecordCount() <= 0) {
for ($i = 0, $n = count($languages); $i < $n; $i++) {
$lid = $languages[$i]['id'];
$v_attribute_options_name_var = 'v_attribute_options_name_' . $attribute_options_count . '_' . $lid;
if (isset(${$v_attribute_options_name_var})) {
$attribute_options_insert_result = "insert into " . $oostable['products_options'] . " (products_options_id, products_options_languages_id, products_options_name) values ('" . (int) ${$v_attribute_options_id_var} . "', '" . (int) $lid . "', '" . ${$v_attribute_options_name_var} . "')";
$attribute_options_insert = $dbconn->Execute($attribute_options_insert_result);
}
}
} else {
// update options table, if options already exists
for ($i = 0, $n = count($languages); $i < $n; $i++) {
$lid = $languages[$i]['id'];
$v_attribute_options_name_var = 'v_attribute_options_name_' . $attribute_options_count . '_' . $lid;
if (isset(${$v_attribute_options_name_var})) {
$attribute_options_update_lang_result = "SELECT products_options_name FROM " . $oostable['products_options'] . " WHERE products_options_id = '" . (int) ${$v_attribute_options_id_var} . "' and products_options_languages_id ='" . (int) $lid . "'";
$attribute_options_update_lang_values = $dbconn->Execute($attribute_options_update_lang_result);
// if option name doesn't exist for particular language, insert value
if ($attribute_options_update_lang_values->RecordCount() <= 0) {