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


PHP menu_linkage函数代码示例

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


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

示例1: linkage

 public function linkage($field, $value, $fieldinfo)
 {
     $setting = string2array($fieldinfo['setting']);
     $linkageid = $setting['linkageid'];
     return menu_linkage($linkageid, $field, $value);
 }
开发者ID:9618211,项目名称:TP-Admin-V2.0,代码行数:6,代码来源:content_form.class.php

示例2: init

 /**
  * 按照模型搜索
  */
 public function init()
 {
     $grouplist = getcache('grouplist', 'member');
     $_groupid = param::get_cookie('_groupid');
     if (!$_groupid) {
         $_groupid = 8;
     }
     if (!$grouplist[$_groupid]['allowsearch']) {
         if ($_groupid == 8) {
             showmessage(L('guest_not_allowsearch'));
         } else {
             showmessage('');
         }
     }
     if (!isset($_GET['catid'])) {
         showmessage(L('missing_part_parameters'));
     }
     $catid = intval($_GET['catid']);
     $siteids = getcache('category_content', 'commons');
     $siteid = $siteids[$catid];
     $this->categorys = getcache('category_content_' . $siteid, 'commons');
     if (!isset($this->categorys[$catid])) {
         showmessage(L('missing_part_parameters'));
     }
     if (isset($_GET['info']['catid']) && $_GET['info']['catid']) {
         $catid = intval($_GET['info']['catid']);
     } else {
         $_GET['info']['catid'] = 0;
     }
     $modelid = $this->categorys[$catid]['modelid'];
     $modelid = intval($modelid);
     if (!$modelid) {
         showmessage(L('illegal_parameters'));
     }
     //搜索间隔
     $minrefreshtime = getcache('common', 'commons');
     $minrefreshtime = intval($minrefreshtime['minrefreshtime']);
     $minrefreshtime = $minrefreshtime ? $minrefreshtime : 5;
     if (param::get_cookie('search_cookie') && param::get_cookie('search_cookie') > SYS_TIME - 2) {
         showmessage(L('search_minrefreshtime', array('min' => $minrefreshtime)), 'index.php?m=content&c=search&catid=' . $catid, $minrefreshtime * 1280);
     } else {
         param::set_cookie('search_cookie', SYS_TIME + 2);
     }
     //搜索间隔
     $CATEGORYS = $this->categorys;
     //产生表单
     pc_base::load_sys_class('form', '', 0);
     $fields = getcache('model_field_' . $modelid, 'model');
     $forminfos = array();
     foreach ($fields as $field => $r) {
         if ($r['issearch']) {
             if ($r['formtype'] == 'catid') {
                 $r['form'] = form::select_category('', $_GET['info']['catid'], 'name="info[catid]"', L('please_select_category'), $modelid, 0, 1);
             } elseif ($r['formtype'] == 'number') {
                 $r['form'] = "<input type='text' name='{$field}_start' id='{$field}_start' value='' size=5 class='input-text'/> - <input type='text' name='{$field}_end' id='{$field}_start' value='' size=5 class='input-text'/>";
             } elseif ($r['formtype'] == 'datetime') {
                 $r['form'] = form::date("info[{$field}]");
             } elseif ($r['formtype'] == 'box') {
                 $options = explode("\n", $r['options']);
                 foreach ($options as $_k) {
                     $v = explode("|", $_k);
                     $option[$v[1]] = $v[0];
                 }
                 switch ($r['boxtype']) {
                     case 'radio':
                         $string = form::radio($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                     case 'checkbox':
                         $string = form::radio($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                     case 'select':
                         $string = form::select($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                     case 'multiple':
                         $string = form::select($option, $value, "name='info[{$field}]' id='{$field}'");
                         break;
                 }
                 $r['form'] = $string;
             } elseif ($r['formtype'] == 'typeid') {
                 $types = getcache('type_content', 'commons');
                 $types_array = array(L('no_limit'));
                 foreach ($types as $_k => $_v) {
                     if ($modelid == $_v['modelid']) {
                         $types_array[$_k] = $_v['name'];
                     }
                 }
                 $r['form'] = form::select($types_array, 0, "name='info[{$field}]' id='{$field}'");
             } elseif ($r['formtype'] == 'linkage') {
                 $setting = string2array($r['setting']);
                 $value = $_GET['info'][$field];
                 $r['form'] = menu_linkage($setting['linkageid'], $field, $value);
             } elseif (in_array($r['formtype'], array('text', 'keyword', 'textarea', 'editor', 'title', 'author', 'omnipotent'))) {
                 $value = safe_replace($_GET['info'][$field]);
                 $r['form'] = "<input type='text' name='info[{$field}]' id='{$field}' value='" . $value . "' class='input-text search-text'/>";
             } else {
                 continue;
             }
//.........这里部分代码省略.........
开发者ID:cfhb,项目名称:MIS,代码行数:101,代码来源:search.php

示例3: L

</td>
						<td>
			<?php 
echo form::select($grouplist, $memberinfo['groupid'], 'name="info[groupid]"', '');
?>
 <div
								class="onShow"><?php 
echo L('changegroup_notice');
?>
</div>
						</td>
					</tr>
					<tr>
						<td>所属区域:</td>
						<td><?php 
echo menu_linkage(3360, 'area', $memberinfo['area']);
?>
</td>
					</tr>
					<tr>
						<td><?php 
echo L('member_model');
?>
</td>
						<td>
			<?php 
echo form::select($modellist, $modelid, 'name="info[modelid]" onchange="changemodel($(this).val())"', '');
?>
			</td>
					</tr>
					
开发者ID:shenhua4286,项目名称:gxw,代码行数:30,代码来源:member_edit.tpl.php

示例4: menu_linkage

    ?>
&curmb=add&menu=1&t=<?php 
    echo $t;
    ?>
&pt=<?php 
    echo $pt;
    ?>
" class="blue-bt red-bt xfr">+添加项目</a>
				<?php 
}
?>
			</div>
            <!-- <div style="height: 30px; width: 100%; margin: 5px 0; line-height: 30px;">
                <div style="float: left; display: inline-block; height: 30px; line-height: 30px;">
                    <?php 
echo menu_linkage(3381, 'pro_type', $pro_type, 1);
?>
                </div>
                <span style="line-height: 30px;">项目状态</span>
                <select class="checkStatus">
                    <option value="-1">全部</option>
                    <option  value="1">审核中</option>
                    <option value="99">审核通过</option>
                    <option value="0">审核未通过</option>
                </select>

                <input type="button" value="查找" id="searchbtn">

            </div>
             -->
			<div class="table-widget table-list">
开发者ID:shenhua4286,项目名称:gxw,代码行数:31,代码来源:content_published_project.php


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