當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。