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


PHP getcategory函数代码示例

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


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

示例1: explode

        $newgradearr = explode("\t", $_SCONFIG['checkgrade']);
        for ($i = 0; $i < 5; $i++) {
            if (!empty($newgradearr[$i])) {
                $gradearr[$i + 1] = $newgradearr[$i];
            }
        }
    }
    //分类
    $catstr = '';
    $ptype = postget('type');
    if (!empty($ptype)) {
        $catstr .= '<tr>
		<th><input class="radio" type="radio" name="theop" value="move">' . $alang['mass_transfer_classification'] . '</th>
		<td>
		<select name="catid">';
        $clistarr = getcategory($ptype);
        foreach ($clistarr as $key => $value) {
            $catstr .= '<option value="' . $value['catid'] . '">' . $value['pre'] . $value['name'] . '</option>';
        }
        $catstr .= '</select>
		</td>
		</tr>';
    }
    $formhash = formhash();
    print <<<END
\t<form method="post" name="thevalueform" action="{$theurl}" onsubmit="return confirm('{$alang['information_operations_to_determine']}');">
\t<input type="hidden" name="formhash" value="{$formhash}">
\t<table cellspacing="0" cellpadding="0" width="100%"  class="maintable">
\t<tr>
\t<th>{$alang['information_with_a_few_conditions']}</th>
\t<td><strong>{$count}</strong></td>
开发者ID:jonycookie,项目名称:projectm2,代码行数:31,代码来源:admin_items.php

示例2: exit

<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: portalcp_article.php 7701 2010-04-12 06:01:33Z zhengqingpeng $
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
$op = $_GET['op'] == 'push' ? 'push' : 'list';
require_once libfile('function/portalcp');
$category = getcategory();
if (!checkperm('allowmanagearticle')) {
    $permission = getallowcategory($_G['uid']);
    if (empty($permission)) {
        showmessage('portal_nopermission');
    }
    $permissioncategory = getpermissioncategory($category, array_keys($permission));
} else {
    $permissioncategory = $category;
}
if ($op == 'push') {
    $_GET['id'] = intval($_GET['id']);
    $_GET['idtype'] = in_array($_GET['idtype'], array('tid', 'blogid')) ? $_GET['idtype'] : '';
    if (empty($_GET['idtype'])) {
        showmessage('article_push_invalid_object');
    }
    $havepush = DB::result_first("SELECT COUNT(*) FROM " . DB::table('portal_article_title') . " WHERE id='{$_GET['id']}' AND idtype='{$_GET['idtype']}'");
    if ($havepush) {
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:portalcp_index.php

示例3: showcats

function showcats($fields)
{
    $tempcats = "";
    if ($fields['category1_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category1_id'])) . ", ";
    }
    if ($fields['category2_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category2_id'])) . ", ";
    }
    if ($fields['category3_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category3_id'])) . ", ";
    }
    if ($fields['category4_id'] != "0") {
        $tempcats .= urldecode(getcategory($fields['category4_id'])) . ", ";
    }
    //trim the string
    $tempcats = str_replace("&", "&amp;", trim(substr($tempcats, 0, strrpos($tempcats, ","))));
    $tunecats = str_replace(",", "", $tempcats);
    if ($tempcats != "") {
        echo "    <dc:subject>" . $tempcats . "</dc:subject>\n";
        echo "    <itunes:keywords>" . $tunecats . "</itunes:keywords>\n";
    }
}
开发者ID:BackupTheBerlios,项目名称:loudblog-svn,代码行数:23,代码来源:buildpodcast.php

示例4: urldecode

 echo "    <title>{$fields['title']}</title>\n";
 //link
 echo "    <link>{$settings['url']}/index.php?id={$fields['id']}</link>\n";
 //categories
 $tempcats = "";
 if ($fields['category1_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category1_id'])) . ", ";
 }
 if ($fields['category2_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category2_id'])) . ", ";
 }
 if ($fields['category3_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category3_id'])) . ", ";
 }
 if ($fields['category4_id'] != "0") {
     $tempcats .= urldecode(getcategory($fields['category4_id'])) . ", ";
 }
 //trim the string
 $tempcats = trim(htmlentities(substr($tempcats, 0, strrpos($tempcats, ",")), ENT_QUOTES, "UTF-8"));
 if ($tempcats != "") {
     echo "    <dc:subject>{$tempcats}</dc:subject>\n";
 }
 //author
 echo "    <dc:creator>\n" . getfullname($fields['author_id']) . "\n</dc:creator>\n";
 //description
 echo "    <description>\n";
 echo html_entity_decode(trim(strip_tags($fields['message_html'])), ENT_QUOTES);
 echo "\n    </description>\n";
 //bodytext
 echo "    <content:encoded>\n" . trim(htmlspecialchars($fields['message_html'], ENT_QUOTES));
 //hyperlinks
开发者ID:BackupTheBerlios,项目名称:loudblog-svn,代码行数:31,代码来源:buildpodcast.php

示例5: is_admin

<?php

include_once 'function.php';
is_admin();
if (isset($_POST['submit'])) {
    addproduct();
    //echo "dsf";
}
$allproduct = getproduct();
$x = getcategory();
?>
<html>
<head>
<link rel="stylesheet" href="css/styles.css">
  <link rel="stylesheet" href="css/style1.css">
  	<!-- TinyMCE -->
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/setup.js" type="text/javascript"></script/>
    <script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
	
            setupTinyMCE();

        });
		
    </script>
	
    <!-- /TinyMCE -->
  <script>
    $(function(){
开发者ID:jyotiprava,项目名称:45serverbackup,代码行数:31,代码来源:add_product.php

示例6: exit

<?php

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: admin_blocks_spaceitem.inc.php 13493 2009-11-11 06:15:33Z zhaofei $
*/
if (!defined('IN_SUPESITE_ADMINCP')) {
    exit('Access Denied');
}
if (!in_array($type, $_SGLOBAL['type']) && in_array($type, $_SCONFIG['closechannels'])) {
    showmessage('block_type_error');
}
$catlistarr = getcategory($type);
if (!isset($theblcokvalue['setitemid'])) {
    $theblcokvalue['setitemid'] = '';
}
if ($theblcokvalue['setitemid'] == '1') {
    $divsetitemid1display = '';
    $divsetitemid2display = 'none';
} else {
    $divsetitemid1display = 'none';
    $divsetitemid2display = '';
}
//multi
if (!isset($theblcokvalue['showmultipage'])) {
    $theblcokvalue['showmultipage'] = 0;
}
if ($theblcokvalue['showmultipage'] == '1') {
    $divshowmulti1display = 'none';
    $divshowmulti2display = '';
} else {
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:admin_blocks_spaceitem.inc.php

示例7: is_admin

<?php

include_once 'function.php';
is_admin();
if (isset($_POST['submit'])) {
    addcategory();
}
$allcategory = getcategory();
?>
<html>
    <head>
	<head>
<link rel="stylesheet" href="css/styles.css">
  <link rel="stylesheet" href="css/style1.css">
</head>
        <script type="text/javascript">
            function deletecategory(catid) {
                var r=confirm("Are you sure you want to delete this category");
                if (r==true) {
                    window.location.href='delete_category.php?id='+catid;
                }
            }
        </script>
		<!-- TinyMCE -->
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/setup.js" type="text/javascript"></script/>
    <script src="js/tiny-mce/jquery.tinymce.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
	
            setupTinyMCE();
开发者ID:jyotiprava,项目名称:45serverbackup,代码行数:31,代码来源:add_category.php

示例8: showfieldform

/**
 * 顯示該模型下允許使用的分類
 *
 * @param string $type 模型
 */
function showfieldform($type)
{
    global $_G, $group;
    $categorylist = getcategory($type);
    foreach ($categorylist as $cid => $cate) {
        $catarr[$cate['upid']][$cid] = $cid;
    }
    $arr = getchilds($catarr, 0);
    echo '<tr><td class="td27" colspan="2" style="border:none;"><div class="fieldform" id="fieldform_' . $type . '"><div style="border-bottom: 1px dotted #DEEFFB; height:20px; line-height:20px;">' . lang('group_' . $type) . '</div>' . showcatelist($arr, $categorylist, 0, $group[$type . '_field'], $type) . '</div>';
    echo '<style>.fieldform{padding-left:20px;} .fieldform li {padding:5px 0 5px 0;}</style>';
    echo '</td></tr>';
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:17,代码来源:tpl.func.php

示例9: getcategory



    <div class="content">
        <div class="header">
            <div class="stats">
</div>

            <h1 class="page-title">Dashboard</h1>
                    <ul class="breadcrumb">
            <li><a href="<?php 
echo $app_path;
?>
">Home</a> </li>
            <li class="active">
        	<?php 
$category = getcategory($category_id);
echo $category['level_name'];
?>
</li>
        </ul>

        </div>
        <div class="main-content">
            
<div class="row">
    <div class="col-sm-6 col-md-6 " style="width:100%">
        <div class="panel panel-default">
            <div class="panel-heading no-collapse"> <h4 style="color:#F00">Danh sách thành viên</h4>
                <span class="label label-warning"> 
                    <form action="." method="get"><input type="hidden" name="add_product" value="add_product"/>
                   <a href="<?php 
开发者ID:thunderclap560,项目名称:php,代码行数:29,代码来源:category.php

示例10: array_keys

/*
	[SupeSite] (C) 2007-2009 Comsenz Inc.
	$Id: admin_blocks_spaceitem.inc.php 11951 2009-04-16 01:34:12Z zhaolei $
*/

if(!defined('IN_SUPESITE_ADMINCP')) {
	exit('Access Denied');
}

@include_once S_ROOT.'/data/system/click.cache.php';

$clickgroupids = array_keys($_SGLOBAL['clickgroup']['postitems']);

if(empty($_GET['name'])) $_GET['name'] = 'news';
$catlistarr = getcategory($_GET['name']);

if(!isset($theblcokvalue['setitemid'])) $theblcokvalue['setitemid'] = '';
if($theblcokvalue['setitemid'] == '1') {
	$divsetitemid1display = '';
	$divsetitemid2display = 'none';
} else {
	$divsetitemid1display = 'none';
	$divsetitemid2display = '';
}

$blockarr = array();
$blockarr['where'][] = array(
	'setitemid' => array(
		'type' =>'radio',
		'alang' => 'block_'.$blocktype.'_title_setitemid',
开发者ID:jonycookie,项目名称:projectm2,代码行数:30,代码来源:admin_blocks_postitem.inc.php

示例11: import_saving_tovars

function import_saving_tovars(){
	global $par;
	$sql = 'SELECT * FROM `import_obj` WHERE 1';
	$res = mysql_query($sql);
	while( $line = mysql_fetch_array($res,MYSQL_ASSOC)){
		$code = $line['code'];
		$code_arr = explode('#',$code);
		$parent_id = 0;
		$elem = array();
		$categid = getcategory($line['group']);
		foreach($code_arr as $simle_code){
			$element = search_parent_element_code($simle_code,$parent_id,$categid); // insert or select
			$parent_id = $element['id'];
			$elem = $element;
		};		
		if($element['id']>0){
			/// update
			if(!empty($line['picture'])){
				$oldname = $_SERVER['DOCUMENT_ROOT'].'/upload/'.$line['picture'];
				//debug($oldname);
				if(is_file($_SERVER['DOCUMENT_ROOT'].'/upload/'.$line['picture'])){		
					debug($oldname);			
					$newname = $_SERVER['DOCUMENT_ROOT'].'/fotos/products/product_'.$element['id'].'.jpg';
					copy($oldname, $newfile);
				}
			}
			/// save picture
			$update_sql = "UPDATE ".$par->objectstable." SET `title`='".myaddslashes($line['title'])."', `parentid`=".$elem['parentid'].",`width`=".intval($line['width']).", `height`=".intval($line['height']).", `form`='".myaddslashes($line['form'])."', ";
			$update_sql .= "`design`=".intval($line['design']).", `color`='".myaddslashes($line['color'])."',`categid`=".$categid." WHERE `id`=".$element['id'];
			mysql_query($update_sql);
		}
		
	}
}
开发者ID:Apxe,项目名称:Rubin_final,代码行数:34,代码来源:1c_integ.php

示例12: elseif

                 if ($arrnum <= 0) {
                     break;
                 }
             }
         }
         if ($arrnum <= 0) {
             break;
         }
     }
 } elseif ($channel['type'] == 'model') {
     $itemsql = '';
     if (!empty($makecache['pro']['id'])) {
         $itemsql = ' AND itemid < \'' . $makecache['pro']['id'] . '\' ';
     }
     if (empty($catarr)) {
         $catarr = getcategory();
     }
     $catvalue = $catarr[$value];
     $listcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM ' . tname($value . 'items') . ' WHERE 1 ' . $itemsql), 0);
     if ($listcount) {
         $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname($value . 'items') . ' WHERE 1 ' . $itemsql . ' ORDER BY itemid DESC');
         while ($item = $_SGLOBAL['db']->fetch_array($query)) {
             if ($arrnum <= 0) {
                 break;
             }
             $proarr['id'] = $item['itemid'];
             $elearr[] = 'action/model/name/' . $value . '/itemid/' . $item['itemid'];
             $arrnum--;
             if ($arrnum <= 0) {
                 break;
             }
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_freshhtml.php

示例13: getcategory

}
if (isset($_GET['did'])) {
    $ssql = "SELECT `dinid` FROM `wm_dininfo` where `shopid`='{$sid}' and `dintype`='{$_GET['did']}' limit 0,1";
    $ts = $db->query($ssql)->fetch();
    if (empty($ts)) {
        $dsql = "delete from `wm_dincategory` where `shopid`='{$sid}' and `id`='{$_GET['did']}'";
        if ($db->query($dsql)) {
            echo "<font color='red'>删除成功</font>";
        } else {
            echo "<font color='red'>删除失败</font>";
        }
    } else {
        echo "<font color='red'>此类型已关联,无法进行删除</font>";
    }
}
$arr = getcategory($db, $sid, 0);
?>
<html>
<head>
<link rel="stylesheet" href="./css/main.css" type="text/css" />
</head>
<body>
  <table  width="30%" border=0 cellpadding=2 cellspacing=1 bordercolor="#799AE1" class=tableBorder>
    <tbody>
      <tr>
        <th align=center colspan=4 style="height: 23px">餐品类别|添加</th>
      </tr>
      <tr align="center" bgcolor="#799AE1">
        <td width="35%"  align="center" class=txlHeaderBackgroundAlternate>类别名称</td>
        <td colspan="2"  align="center" class=txlHeaderBackgroundAlternate>操作</td>
      </tr>  
开发者ID:sandyliao80,项目名称:oswaimai,代码行数:31,代码来源:addCategory.php

示例14: GetCatzFromOpenDNS

function GetCatzFromOpenDNS($sitename)
{
    echo "Testing {$sitename}\n";
    $uri = "http://domain.opendns.com/{$sitename}";
    $curl = new ccurl($uri);
    if (!$curl->get()) {
        echo "Unable to get {$uri}\n";
        return;
    }
    $categories = getcategory($curl->data);
    if (count($categories) == 0) {
        echo "Not found {$ligne["sitename"]} is not an array\n";
        return array();
    }
    return $categories;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:16,代码来源:exec.scrapper.php

示例15: label

        echo label(array('type' => 'table-start', 'class' => 'listpage'));
        echo '<tr><td>' . $multipage . '</td></tr>';
        echo label(array('type' => 'table-end'));
    }
}
$output = '';
$s_url = S_URL;
//THE VALUE SHOW
if (is_array($thevalue) && $thevalue) {
    $savepicarr = array('0' => $alang['robot_savepic_0'], '1' => $alang['robot_savepic_1']);
    $saveflasharr = array('0' => $alang['robot_saveflash_0'], '1' => $alang['robot_saveflash_1']);
    $messagepagetypearr = array('page' => $alang['robot_messagepagetype_page'], 'next' => $alang['robot_messagepagetype_next']);
    $subjectallowrepeatarr = array('1' => $alang['robot_subjectallowrepeat_1'], '0' => $alang['robot_subjectallowrepeat_0']);
    //获取资讯分类
    $clistarr = getcategory('news');
    $allcatarr = getcategory();
    $catselectstr = '<select name="import">';
    $catselectstr .= '<option value="0">-------</option>';
    foreach ($allcatarr as $key => $cvalue) {
        if (empty($channels['types'][$key])) {
            continue;
        }
        $catselectstr .= '<optgroup label="' . $channels['types'][$key]['name'] . '">';
        foreach ($cvalue as $value) {
            $checkstr = $thevalue['importcatid'] == $value['catid'] ? ' selected' : '';
            $catselectstr .= '<option value="' . $key . '_' . $value['catid'] . '"' . $checkstr . '>' . $value['pre'] . $value['name'] . '</option>';
        }
        $catselectstr .= '</optgroup>';
    }
    $catselectstr .= '</select>';
    $autotype = array(1 => '', 2 => '');
开发者ID:superman1982,项目名称:ng-cms,代码行数:31,代码来源:admin_robots.php


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