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

PHP getAllCategories函数代码示例

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

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



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

示例1: getAllCategories

        <!-- Latest compiled and minified CSS -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

        <!-- Optional theme -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    </head>
    <body>
        <?php 
require_once '../../includes/session-start.req-inc.php';
include_once '../../includes/ico.html.php';
require_once '../../includes/access-required.html.php';
include_once '../../functions/dbconnect.php';
include_once '../../functions/category-functions.php';
include_once '../../functions/products-functions.php';
include_once '../../functions/utils-function.php';
$categories = getAllCategories();
if (isPostRequest()) {
    $category_id = filter_input(INPUT_POST, 'category_id');
    $product = filter_input(INPUT_POST, 'product');
    $price = filter_input(INPUT_POST, 'price');
    include_once '../../includes/products/uploadCheck.php';
    $errors = array();
    if (!isValidProduct($product)) {
        $errors[] = 'Product is not Valid';
    }
    if (!isValidPrice($price)) {
        $errors[] = 'Price is not Valid';
    }
    if (count($errors) == 0) {
        if (createProduct($category_id, $product, $price, $FN)) {
            $results = 'Product Added';
开发者ID:rjedwards95,项目名称:PHPClassWinter2016,代码行数:31,代码来源:create.php


示例2: dirname

<?php

require_once dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/core/system/ajax.php';
require_once dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/common/php/class/class.website_category.php';
require_once dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/common/php/class/class.category.php';
require_once dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . '/common/php/class/class.website.php';
/* TEST DE LA VARIABLE ACTION PASSER EN AJAX 
	POUR DETERMINER QUELLE FONCTION EST APPELER */
if (isset($_POST['action']) && !empty($_POST['action'])) {
    $action = $_POST['action'];
    switch ($action) {
        case 'getAllWebsites':
            echo getAllWebsites();
            break;
        case 'getAllCategories':
            echo getAllCategories();
            break;
        case 'getAllWebsiteCategoriesDT':
            echo getAllWebsiteCategoriesDT();
            break;
        case 'deleteWebsiteCategory':
            $id = $_POST['id'];
            echo deleteWebsiteCategory($id);
            break;
        case 'editWebsiteCategory':
            $id = $_POST['id'];
            $category_id = $_POST['category_id'];
            $website_id = $_POST['website_id'];
            $category = $_POST['category'];
            $url = $_POST['url'];
            $use_url = $_POST['use_url'];
开发者ID:xXNoceboXx,项目名称:WUS,代码行数:31,代码来源:website_category.controller.php


示例3: getCategory

/**
 * Gets a category titlelink by id
 *
 * @param int $id id of the category
 * @return array
 */
function getCategory($id)
{
    deprecated_function_notify(gettext('Use the Zenpage class method instead.'));
    foreach (getAllCategories() as $cat) {
        if ($cat['id'] == $id) {
            return $cat;
        }
    }
    return '';
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:16,代码来源:deprecated-functions.php


示例4: getAllCategories

<!--      Top Navigation End     -->
	<div class="container">
		<div class="row">
			<div class="span9">
      			<div id="ad_details">
      			<!-- Product Category Start -->
 					<div class="thumbnail-header">
						<span class="cat_header">Select Category & Subcategory: <span id="select_cat" class="label"></span>&nbsp;<button class="btn btn-small" type="button" id="change_cat_selection" >Change Selection</button></span>
					</div>
					<div id="category_table">
					<table class="category_table" cellpadding="10" cellspacing="0">     
					  <tr>  
			          	<!--   Colum One Start   -->
			            <td width="33%" valign="top">
						<?php 
$category_list = getAllCategories();
$rowcount = mysqli_num_rows($category_list);
$idcount = 1;
$counter = 3;
while ($row = mysqli_fetch_array($category_list)) {
    ?>
			            	<!--    Category Box Start   -->
			            	<div class="category_thumbnail">
			            		<legend><?php 
    echo $row['category_name'];
    ?>
</legend>
			            		<ul>
									<?php 
    $subcategory_list = getAllSubcategories($row['category_id']);
    while ($row_sub = mysqli_fetch_array($subcategory_list)) {
开发者ID:sauravmajumder89,项目名称:WizLyst,代码行数:31,代码来源:post.php


示例5: getJs

 // require all needed models
 require_once APP_PATH . 'model/getJs.php';
 require_once APP_PATH . 'model/getAllCategories.php';
 require_once APP_PATH . 'model/getAllSubcategories.php';
 require_once APP_PATH . 'model/getAllSubcategoriesFromCategory.php';
 require_once APP_PATH . 'model/transformCategoryToUrl.php';
 require_once APP_PATH . 'model/transformProductNameToUrl.php';
 require_once APP_PATH . 'model/getAllProductsByCategory.php';
 require_once APP_PATH . 'model/getJs.php';
 require_once APP_PATH . 'model/getMenu.php';
 require_once APP_PATH . 'model/getOption.php';
 // call models
 $scripts = getJs($allScripts, ['liveChange' => 1, 'maps' => 1, 'search' => 1], true);
 $menu = getMenu($db);
 $slogan = getOption($db, 'slogan');
 $categories = getAllCategories($db);
 foreach ($categories as $key => $category) {
     if ($category['subcategory_id'] != NULL && $category['subcategory_name'] != NULL) {
         $cat['id'] = explode(',', $category['subcategory_id']);
         $cat['name'] = explode(',', $category['subcategory_name']);
         $max = count($cat['id']);
         for ($i = 0; $i <= $max - 1; $i++) {
             $categories[$key]['subcategories'][$i]['id'] = $cat['id'][$i];
             $categories[$key]['subcategories'][$i]['name'] = $cat['name'][$i];
         }
     }
 }
 $actionUrl = transformCategoryToUrl($categories, $action);
 $sidebar = APP_PATH . 'view/template/searchSidebar.php';
 // Is action parameter a category ? Else: Error
 if ($actionUrl['exists']) {
开发者ID:bassels,项目名称:moebel-mafia,代码行数:31,代码来源:indexController.php


示例6: getAllCategories

                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th style="text-align:center;">#sl</th>
                                            <th style="text-align:center;">Category Name</th>
                                            <th style="text-align:center;">Created By</th>
                                            <th style="text-align:center;">Created on</th>
                                             <th style="text-align:center;">Entry Date</th>
                                            <th style="text-align:center;">Delete</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <?php 
$qry = getAllCategories();
$i = 1;
while ($data = mysql_fetch_object($qry)) {
    ?>

                                        <tr class="odd gradeX">
                                            <td> <?php 
    echo $i;
    ?>
 </td>
                                            <td> <a href="edit-category.php?cId=<?php 
    echo $data->cId;
    ?>
 "><?php 
    echo $data->cName;
    ?>
开发者ID:ishvaram,项目名称:simple-inventory,代码行数:31,代码来源:all-category.php


示例7: getCategoriesList

 public function getCategoriesList()
 {
     $list = new CategoriesModel($app);
     $list = getAllCategories();
     return $list;
 }
开发者ID:julkapuk,项目名称:project_silex,代码行数:6,代码来源:ImageForm.php


示例8: getDBInstance

<?php
	require_once '../util.php';
	require_once '../db_helper.php';
	
	$db = getDBInstance();
	$result = getAllCategories($db);
	$smarty = getSmartyInstance();
	$smarty->assign('categories',$result);
	$smarty->display('admin/category.html');
?>
开发者ID:9px,项目名称:BookShare,代码行数:10,代码来源:category.php


示例9: getAllCategories

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>   
        <link href="../../css/bootstrap.css" rel="stylesheet">
        <script src="../../cd.js" language="JavaScript" type="text/javascript"></script>
    </head>
    <body>
        <?php 
require_once '../../includes/session-start.req-inc.php';
require_once '../../includes/access-required.html.php';
include_once '../../functions/dbConn.php';
include_once '../../functions/category-functions.php';
include_once '../../functions/products-functions.php';
include_once '../../functions/until.php';
$results = getAllCategories();
?>
        <div class="container">
            <table class="table table-striped table-hover">
                <thead>
                    <tr> <!-- Table Headers -->
                        <th>Name</th>
                        
                        <th>Options</th>
                    </tr>
                <h1>Company Name</h1> <a href="create.php" class="btn btn-primary btn-index">Create New Category</a>
                </thead>
            <tbody>
            <?php 
foreach ($results as $row) {
    ?>
开发者ID:slasher15987,项目名称:PHPSummerClass2015,代码行数:31,代码来源:index.php


示例10: drawChart

require "includes/dashboard_widget.php";
?>
            </div>
            
            <!-- Chart -->
            <div class="container row col-xs-12">
                <script type="text/javascript">
                    google.charts.load('current', {'packages':['bar']});
                    google.charts.setOnLoadCallback(drawChart);

                    function drawChart() {
                        var data = new google.visualization.arrayToDataTable([
                            ['Metric', 'Count'],
                            <?php 
$metrics = ['Published posts', 'Draft posts', 'Approved comments', 'Unapproved comments', 'Admin users', 'Other users', 'Categories'];
$counts = [count(getPublishedPosts()), count(getDraftPosts()), count(getApprovedComments()), count(getUnapprovedComments()), count(getAdminUsers()), count(getNoAdminUsers()), count(getAllCategories())];
for ($i = 0; $i < 7; $i++) {
    echo "['{$metrics[$i]}', {$counts[$i]}],";
}
?>
                        ]);

                        var options = {
                            title: '',
                            width: '100%',
                            height: '100%',
                            legend: { position: 'none' },
                            chart: { subtitle: '' },
                            axes: {
                                x: {
                                    0: { side: 'top', label: '' } // Top x-axis.
开发者ID:natxoraga22,项目名称:Cockatoo,代码行数:31,代码来源:index.php


示例11: getFilmData

        $filmData = getFilmData(trim($_GET['id']), $pdo);
    } else {
        if (isset($_GET['fromimdb'])) {
            require_once 'vendor/autoload.php';
            $imdbData = \Jleagle\Imdb\Imdb::retrieve(trim($_GET['fromimdb']));
            $filmData['fil_titre'] = $imdbData->title;
            $filmData['fil_annee'] = $imdbData->year;
            $filmData['fil_affiche'] = $imdbData->poster;
            $filmData['cat_id'] = getCategoryId(mb_substr($imdbData->genre, 0, mb_strpos($imdbData->genre, ',')), $pdo);
            $filmData['fil_description'] = $imdbData->plot;
            $filmData['fil_acteurs'] = $imdbData->actors;
        }
    }
}
$year = date('Y');
$categories = getAllCategories($pdo);
$title = 'GCFL - Add a film';
require_once 'inc/header.php';
?>
<main>
			<fieldset>
				<output><?php 
echo $message;
?>
</output>
				<form action="./form_film.php" method="post">
					<?php 
echo outputArrayValueIfExists($filmData, 'fil_id', '<input type="hidden" name="id" value="', '"/>');
?>
					<label>Title: <input name="title"<?php 
echo outputArrayValueIfExists($filmData, 'fil_titre', ' value="', '"');
开发者ID:claudemarson,项目名称:gclf,代码行数:31,代码来源:form_film.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getAllCurrencies函数代码示例发布时间:2022-05-15
下一篇:
PHP getAll函数代码示例发布时间: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