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


PHP category::get方法代码示例

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


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

示例1: categoryEdit

function categoryEdit()
{
    $page = new page();
    $categ = new category();
    if (isset($_GET['cid']) and $_GET['cid'] != 0) {
        $id = $_GET['cid'];
    } else {
        $id = 0;
    }
    $editthis = $categ->get($id);
    $msg = $page->processCategory();
    $get_all_categories = $categ->getAlltree($editthis['par_id']);
    $page->printCategoryForm($get_all_categories, $editthis['name'], $id, $msg);
}
开发者ID:nesoman,项目名称:zadaca1,代码行数:14,代码来源:edit_category.php

示例2: categories

 public function categories()
 {
     if (!$this->user->is_logged_in()) {
         redirect("/user/main/userLogin", 'location');
     } else {
         $category = new category(-1);
         $data['objects'] = $category->get();
         $data['id_user'] = $this->user->get_id();
         $this->show->set_user_backend();
         $this->show->user_backend('show_category_objects', $data);
     }
 }
开发者ID:hyrmedia,项目名称:builderengine,代码行数:12,代码来源:User_blog.php

示例3: fix_shardAction

 public function fix_shardAction()
 {
     $category = new category();
     $categories = $category->select($count, array('filter' => array('shard' => true)));
     echo 'Total categories: ' . $count . '<br>';
     if (is_array($categories) && count($categories)) {
         foreach ($categories as $category) {
             echo 'Fix shard: ' . $category->get('category') . '<br>';
             $category->fix_shard($category->get('id'));
             //sleeup(1);
         }
     }
     die('ok');
 }
开发者ID:evnazarchuk,项目名称:code_examples,代码行数:14,代码来源:controller_maintenance.php

示例4: watch_cat

 private function watch_cat($data)
 {
     if ($this->user['SiteRank'] >= 4) {
         if (isset($data['cat'])) {
             $watchingStatus = false;
             $key = 0;
             $watchersCSV = '';
             // Get category data
             $category = category::get($data['cat']);
             // Parse watching
             $watchers = explode(',', $category['watching']);
             // Check array
             if (($key = array_search($this->user['Username'], $watchers)) !== false) {
                 unset($watchers[$key]);
                 $watchersCSV = implode(',', $watchers);
             } else {
                 // Add user to watching
                 $watchingStatus = true;
                 array_push($watchers, $this->user['Username']);
                 $watchersCSV = implode(',', $watchers);
             }
             // Update DB
             category::watch($category['id'], $watchersCSV);
             json::resp(array('success' => true, 'watching' => $watchingStatus));
         }
     }
 }
开发者ID:TheDoxMedia,项目名称:pgs,代码行数:27,代码来源:forum.worker.php


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