当前位置: 首页>>代码示例>>PHP>>正文


PHP AZLib::getCategoriesTree方法代码示例

本文整理汇总了PHP中AZLib::getCategoriesTree方法的典型用法代码示例。如果您正苦于以下问题:PHP AZLib::getCategoriesTree方法的具体用法?PHP AZLib::getCategoriesTree怎么用?PHP AZLib::getCategoriesTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AZLib的用法示例。


在下文中一共展示了AZLib::getCategoriesTree方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: draw

 function draw()
 {
     global $display;
     //For ajax_upload form
     $display->add('url_gallery', WEB_ROOT . AZRewrite::formatUrl('?page=gallery&is_popup=1&user_id=' . User::id()));
     //$display->add('no_img_upload',AZLib::getImageSrc('',100,100));
     $display->add('no_img_upload', $this->no_image);
     // Keep item avatar when update false
     if (isset($_POST["avatar_img_server"]) && $_POST["avatar_img_server"]) {
         $avatar['img_server'] = $_POST["avatar_img_server"];
         $avatar['img_url'] = $_POST["avatar_img_url"];
         $avatar['thumb280_280'] = AZLib::getImageThumb($_POST["avatar_img_url"], 280, 280, 0, $_POST["avatar_img_server"]);
         $avatar['max_path'] = AZLib::getImageThumbMax($_POST["avatar_img_url"], 'thumb_max', 1, $_POST["avatar_img_server"]);
         $display->add('avatarInfo', $avatar);
         $display->add('avatar', json_encode($avatar));
     }
     $display->add('item_user_id', User::id());
     $display->add('user_name', User::user_name());
     $display->add('user_id', User::id());
     $display->add('is_can_edit', (int) User::have_permit(ADMIN_ITEM));
     $display->add('browser_is_ie', $this->browser_is_ie);
     $display->output('ajax_upload');
     //For ajax_upload form
     $this->beginForm(true);
     $display->add('max_image_page', $this->max_image_page);
     $display->add('images_per_page', $this->images_per_page);
     $display->add('post_item_images', $this->item_images);
     $display->add('jsImages', json_encode($this->jsImages));
     $display->add('first_combo', (int) Url::get('first_combo'));
     $display->add('second_combo', (int) Url::get('second_combo'));
     //$display->add('category_tree',json_encode(AZLib::getCategoriesTree(0,true)));
     $display->add('category_tree', json_encode(AZLib::getCategoriesTree(true)));
     $display->add('currency_tree', json_encode(CGlobal::$currency));
     $display->add('az_filters', json_encode(CGlobal::$filters));
     $display->add('image_path', 'http://' . IMAGE_PATH);
     $display->add('img_cur_server', IMAGE_SERVER_NO);
     $display->add('img_server', json_encode(CGlobal::$img_server));
     $display->add('no_img', $this->no_image);
     $display->add('multi_upload', User::have_permit(ADMIN_ITEM));
     $display->add('post_img', $display->output('post_img', true));
     $display->add('currency_id_option', AZLib::getOption(CGlobal::$currency, Url::get('currency_id', 1)));
     $display->add('msg', $this->showFormErrorMessages(1));
     $display->add('mode', "ĐĂNG");
     $display->add('sku', Url::get('sku'));
     $display->add('name', stripslashes(Url::get('name')));
     $display->add('offer', stripslashes(Url::get('offer')));
     $display->add('brief', stripslashes(Url::get('brief')));
     $display->add('item_description', stripslashes(Url::get('item_description')));
     $display->add('price', number_format(Url::cdouble(Url::get('price')), 0, ',', '.'));
     $display->add('price', number_format(Url::cdouble(Url::get('price')), 0, ',', '.'));
     $display->add('price_out', number_format(Url::cdouble(Url::get('price_out')), 0, ',', '.'));
     $display->add('quantity', number_format(Url::cdouble(Url::get('quantity')), 0, ',', '.'));
     $display->add('item_order', (int) Url::get('item_order'));
     $display->add('made_in', Url::get('made_in'));
     $display->add('warranty', Url::get('warranty'));
     $display->add('add_for_user', User::have_permit(ADMIN_ITEM));
     $display->output('post_sale');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:59,代码来源:PostItemForm.php

示例2: GetCatTree

 function GetCatTree($availCat = 0)
 {
     $categories = AZLib::getCategoriesTree(1);
     if ($availCat) {
         $returnCat = array();
         foreach ($categories as $cat) {
             if (strpos(',' . $availCat . ',', ',' . $cat['id'] . ',') !== false) {
                 $returnCat[$cat['id']] = $cat;
             }
         }
         $categories = $returnCat;
     }
     return $categories;
 }
开发者ID:duynhan07,项目名称:elink,代码行数:14,代码来源:ManageItem.php

示例3: draw

 function draw()
 {
     global $display;
     $this->item['price'] = AZLib::convertCurrency($this->item['price'], $this->item['currency_id']);
     $this->item['price_out'] = AZLib::convertCurrency($this->item['price_out'], $this->item['currency_id']);
     $this->item['currency_id'] = 1;
     //For ajax_upload form
     $display->add('url_gallery', WEB_ROOT . AZRewrite::formatUrl('?page=gallery&is_popup=1&user_id=' . $this->item['user_id']));
     ////$display->add('no_img_upload',AZLib::getImageSrc('',100,100));
     $display->add('browser_is_ie', $this->browser_is_ie);
     $display->add('no_img_upload', $this->no_image);
     $display->add('user_id', User::id());
     $display->add('item_user_id', $this->item['user_id']);
     $display->add('is_can_edit', (int) User::have_permit(ADMIN_ITEM));
     $display->add('user_name', $this->item['user_name']);
     if (isset($_POST["avatar_img_server"])) {
         $avatar['img_server'] = $_POST["avatar_img_server"];
         $avatar['img_url'] = $_POST["avatar_img_url"];
         $avatar['thumb280_280'] = AZLib::getImageThumb($_POST["avatar_img_url"], 280, 280, 0, $_POST["avatar_img_server"]);
         $avatar['max_path'] = AZLib::getImageThumbMax($_POST["avatar_img_url"], 'thumb_max', 1, $_POST["avatar_img_server"]);
         $display->add('avatarInfo', $avatar);
         $display->add('avatar', json_encode($avatar));
     } elseif ($this->item['img_url']) {
         $avatar['img_server'] = $this->item['img_server'];
         $avatar['img_url'] = $this->item['img_url'];
         $avatar['thumb280_280'] = AZLib::getImageThumb($this->item['img_url'], 280, 280, 0, $this->item['img_server']);
         $avatar['max_path'] = AZLib::getImageThumbMax($this->item['img_url'], $this->item['name'], 1, $this->item['img_server']);
         $display->add('avatarInfo', $avatar);
         $display->add('avatar', json_encode($avatar));
     }
     $display->output('ajax_upload');
     //For ajax_upload form
     $this->beginForm(true);
     //$display->add('img_fnkjgk',json_encode($bakjgkj));
     $display->add('max_image_page', $this->max_image_page);
     $display->add('images_per_page', $this->images_per_page);
     $display->add('post_item_images', $this->item_images);
     $display->add('jsImages', json_encode($this->jsImages));
     if ($this->item['level_1_catid'] != $this->item['category_id']) {
         $first = $this->item['level_1_catid'];
         $second = $this->item['category_id'];
     } else {
         $first = $this->item['category_id'];
         $second = 0;
     }
     $display->add('first_combo', (int) Url::get('first_combo', $first));
     $display->add('second_combo', (int) Url::get('second_combo', $second));
     ///$display->add('category_tree',json_encode(AZLib::getCategoriesTree(0,true)));
     $display->add('category_tree', json_encode(AZLib::getCategoriesTree(true)));
     $display->add('currency_tree', json_encode(CGlobal::$currency));
     $display->add('az_filters', json_encode(CGlobal::$filters));
     $display->add('item_filters', $this->item['filter_ids']);
     $display->add('image_path', 'http://' . IMAGE_PATH);
     $display->add('img_cur_server', IMAGE_SERVER_NO);
     $display->add('img_server', json_encode(CGlobal::$img_server));
     $display->add('multi_upload', User::have_permit(ADMIN_ITEM));
     $display->add('no_img', $this->no_image);
     $display->add('post_img', $display->output('post_img', true));
     $display->add('currency_id_option', AZLib::getOption(CGlobal::$currency, Url::get('currency_id', $this->item['currency_id'])));
     $display->add('msg', $this->showFormErrorMessages(1));
     $display->add('name', stripslashes(Url::get('name', $this->item['name'])));
     $display->add('sku', Url::get('sku', $this->item['sku']));
     $display->add('offer', stripslashes(Url::get('offer', $this->item['offer'])));
     if (isset(CGlobal::$allCategories[$this->item['category_id']])) {
         $item_href = WEB_DIR . CGlobal::$allCategories[$this->item['category_id']]['nice_name'] . "/p{$this->item['id']}/" . AZLib::safe_title($this->item['name']) . ".html";
     } else {
         $item_href = WEB_DIR . "p{$this->item['id']}/" . AZLib::safe_title($this->item['name']) . ".html";
     }
     $display->add('item_href', $item_href);
     $display->add('name_length', 120 - mb_strlen(AZLib::stripUnicode(Url::get('name', $this->item['name'])), "UTF-8"));
     $display->add('brief', stripslashes(Url::get('brief', $this->item['brief'])));
     $display->add('item_description', stripslashes(Url::get('item_description', $this->item['description'])));
     $display->add('mode', "CẬP NHẬT");
     $display->add('price', number_format(Url::get('price', $this->item['price']), 0, ',', '.'));
     $display->add('price_out', number_format(Url::get('price_out', $this->item['price_out']), 0, ',', '.'));
     $display->add('quantity', number_format(Url::cdouble(Url::get('quantity', $this->item['quantity'])), 0, ',', '.'));
     $display->add('item_order', (int) Url::get('item_order', $this->item['item_order']));
     $display->add('made_in', Url::get('made_in', $this->item['made_in']));
     $display->add('warranty', Url::get('warranty', $this->item['warranty']));
     $display->output('post_sale');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:82,代码来源:EditItemForm.php


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