• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP oos_get_languages函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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']) . '&nbsp;' . 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']) . '&nbsp;' . 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));
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:manufacturers.php


示例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) {
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:67,代码来源:easypopulate.php



注:本文中的oos_get_languages函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP oos_get_local_path函数代码示例发布时间:2022-05-15
下一篇:
PHP oos_get_filename函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap