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


PHP showCategories函数代码示例

本文整理汇总了PHP中showCategories函数的典型用法代码示例。如果您正苦于以下问题:PHP showCategories函数的具体用法?PHP showCategories怎么用?PHP showCategories使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: goAction

function goAction($act, $category_id, $course_id, $courses, $exercises)
{
    if (!$act || $act == null) {
        $act = "default";
    }
    switch ($act) {
        case 'default':
            showPage();
            break;
        case 'getCategory':
            showCategories();
            break;
        case 'getCategoryJson':
            showCategoryTree();
            break;
        case 'getCourses':
            showCourses($category_id);
            break;
        case 'getTracks':
            showTracks($category_id, $course_id);
            break;
        case 'getScores':
            showScores($category_id, $course_id);
            break;
        case 'getSummary':
            showSummary($category_id, $courses, $exercises);
            break;
        case 'getExcel':
            showExcel($category_id, $courses, $exercises);
            break;
        case 'getCfgs':
            showConfig($category_id, $course_id);
            break;
        case 'saveCfgs':
            $count = $_GET['count'];
            $configs = $_GET['config'];
            setConfig($category_id, $course_id, $count, $configs);
            break;
        case 'createCfgs':
            $quiz_count = @$_GET['count'];
            if (!isset($quiz_count) || $quiz_count == null || $quiz_count <= 0) {
                drawConfigPanel($category_id, $course_id);
            } else {
                drawConfigPanel($category_id, $course_id, $quiz_count);
            }
            break;
        case 'removeCfgs':
            removeConfig($category_id, $course_id);
            break;
        case 'getStudents':
            showStudentConfigs();
            break;
        case 'saveStudents':
            $students = $_GET['s'];
            saveStudentConfigs($students);
            break;
    }
}
开发者ID:adexbn,项目名称:sinomedex_report,代码行数:58,代码来源:index.php

示例2: showCart

        break;
    case 'addtocart':
    case 'deletefromcart':
    case 'emptycart':
    case 'showcart':
        echo "<hr /><h1>Your shopping cart</h1>";
        showCart($_SESSION['cart'], $mode);
        break;
    case 'image':
        showCategories($mode);
        echo "<h1>Large Product Image</h1>";
        showImage($ASIN, $mode);
        break;
    case 'search':
        showCategories($mode);
        echo "<h1>Search Results For " . $search . "</h1>";
        showSearch($search, $page, $mode);
        break;
    case 'browsenode':
    default:
        showCategories($mode);
        $category = getCategoryName($browseNode);
        if (!$category || $category == 'Best Selling Books') {
            echo "<h1>Current Best Sellers</h1>";
        } else {
            echo "<h1>Current Best Sellers in " . $category . "</h1>";
        }
        showBrowseNode($browseNode, $page, $mode);
        break;
}
require 'bottom.php';
开发者ID:umkin,项目名称:phpmysql,代码行数:31,代码来源:index.php

示例3: orderCategory

        orderCategory($cid[0], 1);
        break;
    case 'accesspublic':
        accessMenu($cid[0], 0, $section);
        break;
    case 'accessregistered':
        accessMenu($cid[0], 1, $section);
        break;
    case 'accessspecial':
        accessMenu($cid[0], 2, $section);
        break;
    case 'saveorder':
        saveOrder($cid, $section);
        break;
    default:
        showCategories($section, $option);
        break;
}
/**
* Compiles a list of categories for a section
* @param string The name of the category section
*/
function showCategories($section, $option)
{
    global $mainframe;
    $db =& JFactory::getDBO();
    $filter_order = $mainframe->getUserStateFromRequest($option . '.filter_order', 'filter_order', 'c.ordering', 'cmd');
    $filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.filter_order_Dir', 'filter_order_Dir', '', 'word');
    $filter_state = $mainframe->getUserStateFromRequest($option . '.' . $section . '.filter_state', 'filter_state', '', 'word');
    $sectionid = $mainframe->getUserStateFromRequest($option . '.' . $section . '.sectionid', 'sectionid', 0, 'int');
    $search = $mainframe->getUserStateFromRequest($option . '.search', 'search', '', 'string');
开发者ID:Fellah,项目名称:govnobaki,代码行数:31,代码来源:admin.categories.php

示例4: switch

}
$action = RMHttpRequest::request('action', 'string', '');
switch ($action) {
    case 'new':
        showForm();
        break;
    case 'save':
        bxpress_save_category();
        break;
    case 'edit':
        showForm(1);
        break;
    case 'saveedit':
        bxpress_save_category(1);
        break;
    case 'savechanges':
        updateOrderCatego();
        break;
    case 'delete':
        deleteCatego();
        break;
    case 'enable':
        activeCatego(1);
        break;
    case 'disable':
        activeCatego();
        break;
    default:
        showCategories();
        break;
}
开发者ID:petitours,项目名称:bxpress,代码行数:31,代码来源:categories.php

示例5: editForum

function editForum($uid, $option)
{
    $kunena_db =& JFactory::getDBO();
    $kunena_acl =& JFactory::getACL();
    $kunena_my =& JFactory::getUser();
    $row = new fbForum($kunena_db);
    // load the row from the db table
    $row->load($uid);
    //echo "<pre>"; print_r ($row); echo "</pre>";
    if ($uid) {
        $row->checkout($kunena_my->id);
        $categories = array();
    } else {
        // initialise new record
        $categories[] = JHTML::_('select.option', '0', _KUNENA_TOPLEVEL, 'value', 'text');
        $row->parent = 0;
        $row->published = 0;
        $row->ordering = 9999;
    }
    // get a list of just the categories
    $kunena_db->setQuery("SELECT a.id AS value, a.name AS text FROM #__fb_categories AS a WHERE parent='0' AND id<>'{$row->id}' ORDER BY ordering");
    $categories = array_merge($categories, $kunena_db->loadObjectList());
    check_dberror("Unable to load categories.");
    if ($row->parent == 0) {
        //make sure the Top Level Category is available in edit mode as well:
        $kunena_db->setQuery("SELECT distinct '0' AS value, '" . _KUNENA_TOPLEVEL . "' AS text FROM #__fb_categories AS a WHERE parent='0' AND id<>'{$row->id}' ORDER BY ordering");
        $categories = array_merge($categories, (array) $kunena_db->loadObjectList());
        check_dberror("Unable to load categories.");
        //build the select list:
        $categoryList = JHTML::_('select.genericlist', $categories, 'parent', 'class="inputbox" size="1"', 'value', 'text', $row->parent);
    } else {
        $categoryList = JHTML::_('select.genericlist', $categories, 'parent', 'class="inputbox" size="1"', 'value', 'text', $row->parent);
    }
    $categoryList = showCategories($row->parent, "parent", "", "4");
    // make a standard yes/no list
    $yesno = array();
    $yesno[] = JHTML::_('select.option', '0', _ANN_NO);
    $yesno[] = JHTML::_('select.option', '1', _ANN_YES);
    // make a standard no/yes list
    $noyes = array();
    $noyes[] = JHTML::_('select.option', '1', _ANN_YES);
    $noyes[] = JHTML::_('select.option', '0', _ANN_NO);
    //Create all kinds of Lists
    $lists = array();
    $accessLists = array();
    //create custom group levels to include into the public group selectList
    $pub_groups = array();
    $pub_groups[] = JHTML::_('select.option', 0, _KUNENA_EVERYBODY);
    $pub_groups[] = JHTML::_('select.option', -1, _KUNENA_ALLREGISTERED);
    $pub_groups = array_merge($pub_groups, $kunena_acl->get_group_children_tree(null, _KUNENA_REGISTERED, true));
    //create admin groups array for use in selectList:
    $adm_groups = array();
    $adm_groups = array_merge($adm_groups, $kunena_acl->get_group_children_tree(null, _KUNENA_PUBLICBACKEND, true));
    //create the access control list
    $accessLists['pub_access'] = JHTML::_('select.genericlist', $pub_groups, 'pub_access', 'class="inputbox" size="4"', 'value', 'text', $row->pub_access);
    $accessLists['admin_access'] = JHTML::_('select.genericlist', $adm_groups, 'admin_access', 'class="inputbox" size="4"', 'value', 'text', $row->admin_access);
    $lists['pub_recurse'] = JHTML::_('select.genericlist', $yesno, 'pub_recurse', 'class="inputbox" size="1"', 'value', 'text', $row->pub_recurse);
    $lists['admin_recurse'] = JHTML::_('select.genericlist', $yesno, 'admin_recurse', 'class="inputbox" size="1"', 'value', 'text', $row->admin_recurse);
    $lists['forumLocked'] = JHTML::_('select.genericlist', $yesno, 'locked', 'class="inputbox" size="1"', 'value', 'text', $row->locked);
    $lists['forumModerated'] = JHTML::_('select.genericlist', $noyes, 'moderated', 'class="inputbox" size="1"', 'value', 'text', $row->moderated);
    $lists['forumReview'] = JHTML::_('select.genericlist', $yesno, 'review', 'class="inputbox" size="1"', 'value', 'text', $row->review);
    //get a list of moderators, if forum/category is moderated
    $moderatorList = array();
    if ($row->moderated == 1) {
        $kunena_db->setQuery("SELECT * FROM #__fb_moderation AS a LEFT JOIN #__users as u ON a.userid=u.id where a.catid={$row->id}");
        $moderatorList = $kunena_db->loadObjectList();
        check_dberror("Unable to load moderator list.");
    }
    html_Kunena::editForum($row, $categoryList, $moderatorList, $lists, $accessLists, $option);
}
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:70,代码来源:admin.kunena.php

示例6: addCat

    }
    return $msg;
}
//Control logic
if ($privs >= 4) {
    //manager or admin
    $msg = '';
    if (isset($_POST['addExe'])) {
        $msg = addCat($cat);
    } elseif (isset($_POST['updExe'])) {
        $msg = updateCat($cat);
    } elseif (isset($_GET['delExe'])) {
        $msg = deleteCat($cat);
    }
    echo "<p class='error'>{$msg}</p>\n\t\t<div class='scrollBoxAd'>\n\t\t<div class='centerBox'>\n";
    if ($mode == 'sort') {
        sortCategories();
        //sort on name
    }
    if ($mode != 'add' and $mode != 'edit' or isset($_POST['back'])) {
        showCategories(false);
        //no add / no edit
    } else {
        editCategory($cat);
        //add or edit
        showCategories(true);
    }
    echo "</div>\n</div>\n";
} else {
    echo "<p class='error'>{$ax['no_way']}</p>\n";
}
开发者ID:sanluca,项目名称:py-acqua-hw,代码行数:31,代码来源:categories.php

示例7: session_start

<?php

session_start();
require_once 'constants.php';
require 'topbar.php';
require 'categoryfunctions.php';
showCategories('books');
?>
<h1>About Tahuayo.com</h1>

<p>The Tahuayo River is a tributary of the Amazon River.  <a href = 'index.com'>Tahuayo.com</a> is an interface to
<a href='http://www.amazon.com/'>Amazon.com</a>.

<p>You can purchase any books stocked by Amazon.com at Tahuayo.com, but it is not really intended to be a profit generating site.
It exists to demonstrate using Amazon's <a href = 'http://associates.amazon.com/exec/panama/associates/ntg/browse/-/1067662/ref=gw_hp_ls_1_3/104-9837819-3411136'>Web Services</a> interface.
The site is built using <a href='http://www.php.net/'>PHP</a> and connects to Amazon using XML/HTTP and SOAP.

<p>You can find out more about this site, and obtain the complete source code in Chapter 31 of <a href = 'index.php?action=detail&ASIN=067232525X'><i>PHP and MySQL Web Development 2nd Edition</i></a> by Luke Welling and Laura Thomson.

<hr>
<?php 
require 'bottom.php';
?>


开发者ID:sjaviel,项目名称:programacao_internet_2015_2,代码行数:23,代码来源:about.php

示例8: getBlockCode_Founded

 function getBlockCode_Founded($iBlockId)
 {
     $aParam = array('pagination' => getParam('categ_perpage_browse'));
     $sFilter = bx_get('filter');
     if ($sFilter !== false) {
         $aParam['filter'] = process_db_input($sFilter);
     } else {
         if ($this->oForm->isSubmittedAndValid()) {
             $aParam['filter'] = $this->oForm->getCleanValue('Keyword');
         }
     }
     if (isset($aParam['filter'])) {
         return showCategories($aParam, $iBlockId, BX_CATEG_ACTION_SEARCH, false, false, _t('_categ_caption_founded_categ'));
     } else {
         return MsgBox(_t('_Empty'));
     }
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:17,代码来源:categories.php

示例9: showCategories

     showCategories($category);
     break;
     // case Index
 // case Index
 case WEDDING:
     $filePath .= "images/weddings";
     break;
     // case WEDDING
 // case WEDDING
 case PORTRAIT:
     $filePath .= "images/portraits";
     break;
     // PORTRAIT
 // PORTRAIT
 case KIDS:
     showCategories($category);
     break;
     // case KIDS
 // case KIDS
 case KIDS_BABY:
     $filePath .= "images/babies";
     break;
     // case KIDS_BABY
 // case KIDS_BABY
 case KIDS_1_3:
     $filePath .= "images/kids_one_three";
     break;
     // case KIDS_BABY
 // case KIDS_BABY
 case KIDS_3_13:
     $filePath .= "images/kids_three_up";
开发者ID:noktigula,项目名称:Photo,代码行数:31,代码来源:index.php

示例10: session_start

<?php

session_start();
require_once 'constants.php';
require 'topbar.php';
require 'categoryfunctions.php';
showCategories('Books');
?>
<h1>About Tahuayo.com</h1>

<p>The Tahuayo River is a tributary of the Amazon River.
<a href="index.com">Tahuayo.com</a> is an interface to
<a href="http://www.amazon.com/">Amazon.com</a>.

<p>You can purchase any books stocked by Amazon.com at
Tahuayo.com, but it is not really intended to be a profit
generating site. It exists to demonstrate using Amazon's
<a href="http://aws.amazon.com/">Web Services</a>
interface. The site is built using <a href="http://www.php.net/">PHP</a>
and connects to Amazon using XML/HTTP (REST) or SOAP.

<p>You can find out more about this site, and obtain the complete
source code in Chapter 33 of
<a href="index.php?action=detail&ASIN=0672329166">
<em>PHP and MySQL Web Development 4th Edition</em></a>
by Luke Welling and Laura Thomson.

<hr>
<?php 
require 'bottom.php';
?>
开发者ID:kai-cn,项目名称:bookcode-php-mysql-web-development,代码行数:31,代码来源:about.php

示例11: switch

HTML_FPSlideShow::showNavBar($option, $task);
switch ($task) {
    // CONFIG
    case "save_config":
        saveConfig($option, $mosConfig_absolute_path);
        break;
    case "config":
        editConfig($fpss_config, $option);
        break;
        // CATEGORIES
    // CATEGORIES
    case "cancel_category":
        cancelCategory($option);
        break;
    case "categories":
        showCategories($option);
        break;
    case "new_category":
        editCategory(0, $option);
        break;
    case "edit_category":
        editCategory($cid, $option);
        break;
    case "save_category":
        saveCategory($option);
        break;
    case "delete_category":
        deleteCategories($option);
        break;
    case "publish_category":
        publishCategories(1, $option);
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:admin.fpss.php


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