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


PHP helper::filterField方法代码示例

本文整理汇总了PHP中helper::filterField方法的典型用法代码示例。如果您正苦于以下问题:PHP helper::filterField方法的具体用法?PHP helper::filterField怎么用?PHP helper::filterField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在helper的用法示例。


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

示例1: init

 function init() {
     if(front::$act=='message') return;
     $this->table=front::get('form');
     if(!preg_match('/^my_\w+/',$this->table)) exit('PAGE NOT FOUND!');
     $this->_table=new defind($this->table);
     if(!$this->_table->getFields()) exit('PAGE NOT FOUND!');
     $this->view->form=$this->_table->get_form();
     $this->_pagesize=config::get('manage_pagesize');
     $this->view->manage=$this->table;
     $this->view->primary_key=$this->_table->primary_key;
     $fieldlimit=$this->_table->getcols(front::$act=='list'?'user_manage':'user_modify');
     $field=$this->_table->getFields();
     
     helper::filterField($field,$fieldlimit);
     $this->view->field=$field;
     //var_dump($field);
     if(!front::get('page')) front::$get['page']=1;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:18,代码来源:form_act.php

示例2: init

 function init() {
 	if(!config::get('guestbook_enable')){
 		alerterror('留言本功能已关闭');
 	}
     $user='';
     if(cookie::get('login_username') &&cookie::get('login_password')) {
         $user=new user();
         $user=$user->getrow(array('username'=>cookie::get('login_username')));
     }
     $this->view->user=$user;
     $this->_user=new user;
     $this->table='guestbook';
     $this->_table=new $this->table;
     if(!$this->_table->getFields()) exit('PAGE NOT FOUND!');
     $this->view->form=$this->_table->get_form();
     $this->_pagesize=config::get('manage_pagesize');
     $this->view->manage=$this->table;
     $this->view->primary_key=$this->_table->primary_key;
     $fieldlimit=$this->_table->getcols(front::$act=='list'?'user_list':'user_modify');
     $field=$this->_table->getFields();
     helper::filterField($field,$fieldlimit);
     $this->view->field=$field;
     if(!front::get('page')) front::$get['page']=1;
 }
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:24,代码来源:guestbook_act.php

示例3: show_action

    function show_action() {
        if (!front::get('aid'))
            front::$get['aid'] = front::get('id');
        front::check_type(front::$get['aid']);
        $this->view->aid = trim(front::get('aid'));
        $this->view->archive = archive::getInstance()->getrow(front::get('aid'));
        $this->view->categorys = category::getpositionlink2($this->view->archive['catid']);
        if (!is_array($this->view->archive))
            $this->out('message/error.html');
        if ($this->view->archive['checked'] < 1)
            exit(lang('未审核!<a href="'.front::$from.'">返回</a>'));
        if (!rank::arcget(front::get('aid'), $this->view->usergroupid)) {
            $this->out('message/error.html');
        }
        $this->view->catid = $this->view->archive['catid'];
        $this->view->topid = category::gettopparent($this->view->catid);
        $this->view->parentid = $this->category->getparent($this->view->catid);
        if (!rank::catget($this->view->catid, $this->view->usergroupid))
            $this->out('message/error.html');
        if (!isset($this->category->category[$this->view->catid]) ||
                !isset($this->category->category[$this->view->topid])) {

        }
        $template = @$this->view->archive['template'];
        $linkword = new linkword();
        $linkwords = $linkword->getrows(null, 1000, 'linkorder desc');
        $content = $this->view->archive['content'];
        $contents = preg_split('%<div style="page-break-after(.*?)</div>%si', $content);
        if ($contents) {
            $this->view->pages = count($contents);
            front::$record_count = $this->view->pages * config::get('list_pagesize');
            $content = $contents[$this->view->page - 1];
        }

        //$content = preg_replace("/(<a(.*))(>)(.*)(<)(\/a>)/isU", '\\1-]-\\4-[-\\6', $content);

        foreach ($linkwords as $linkword) {
            $linkword['linktimes'] = (int) $linkword['linktimes'];
            if (trim($linkword['linkurl']) && !preg_match('%^http://$%', trim($linkword['linkurl']))) {
                $link = "<a href='$linkword[linkurl]' target='_blank'>$linkword[linkword]</a>";
            } else {
                $link = "<a href='" . url('archive/search/keyword/' . urlencode($linkword['linkword'])) . "' target='_blank'>$linkword[linkword]</a>";
            }
            $content = _keylinks($content,$linkword['linkword'],$link,$linkword['linktimes']);
        }

        $this->view->likenews = $this->getLike($this->view->archive['tag'], $this->view->archive['keyword']);

        $taghtml = '';
        $tag_table = new tag();
        foreach ($tag_table->urls($this->view->archive['tag']) as $tag => $url) {
            $taghtml.="<a href='$url' target='_blank'>$tag</a>&nbsp;&nbsp;";
        }
        $this->view->archive['tag'] = $taghtml;

        $this->view->archive['special'] = null;
        if ($this->view->archive['spid']) {
            $spurl = special::url($this->view->archive['spid'],special::getishtml($this->view->archive['spid']));
            $sptitle = special::gettitle($this->view->archive['spid']);
            $this->view->archive['special'] = "<a href='$spurl' target='_blank'>$sptitle</a>&nbsp;&nbsp;";
        }
        $this->view->archive['type'] = null;
        if ($this->view->archive['typeid']) {
            $typeurl = type::url($this->view->archive['typeid'],1);
            $typetitle = type::name($this->view->archive['typeid']);
            $this->view->archive['type'] = "<a href='$typeurl' target='_blank'>$typetitle</a>&nbsp;&nbsp;";
        }
        $this->view->archive['area'] = null;
        $this->view->archive['area'] = area::getpositonhtml($this->view->archive['province_id'], $this->view->archive['city_id'], $this->view->archive['section_id']);
        $this->view->archive['content'] = $content;
        $aid = front::$get['aid'];
        $catid = $this->view->catid;
        if(!$this->view->archive['showform']) {
            $this->getshowform($catid);
        }else if($this->view->archive['showform'] && $this->view->archive['showform'] == '1') {
            $this->showform = 1;
        }else {
            $this->showform = $this->view->archive['showform'];
        }
        if(preg_match('/^my_/is',$this->showform)) {
            $this->view->archive['showform'] = $this->showform;
            $o_table = new defind($this->showform);
            front::$get['form'] = $this->showform;
            $this->view->primary_key = $o_table->primary_key;
            $field = $o_table->getFields();
            $fieldlimit = $o_table->getcols('user_modify');
            helper::filterField($field,$fieldlimit);
            $this->view->field = $field;
        }else {
            $this->view->archive['showform'] = '';
        }
        
        $str = "";
        cb_data($this->view->archive);
        foreach( $this->view->archive as $key => $value){
        	if(!preg_match('/^my/',$key) || !$value)
        		continue;
        	$category = category::getInstance();
        	$sonids = $category->sons(setting::$var['archive'][$key]['catid']);
        	if(setting::$var['archive'][$key]['catid'] != $this->view->archive['catid'] && !in_array($this->view->archive['catid'],$sonids) && (setting::$var['archive'][$key]['catid'])){
//.........这里部分代码省略.........
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:101,代码来源:archive_act.php

示例4: getform

function getform($name){
	session::set('table', $name);
	$_table=new defind($name);
	$field=$_table->getFields();
	$fieldlimit=$_table->getcols('user_modify');
	helper::filterField($field,$fieldlimit);
	front::$view->field = $field;
	front::$view->archive['showform'] = $name;
	return front::$view->fetch(@setting::$var[$name]['myform']['template']);
}
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:10,代码来源:userfunction.php

示例5: uri



<?php helper::filterField($field,$fieldlimit);?>

<form name="listform" id="listform"  action="<?php echo uri();?>" method="post">

  <?php
  if(get('table')=='type')
  $this->render('_table/type/_list.php');
  else { ?>


<div class="blank20"></div>
<div id="tagscontent" class="right_box">
<table border="0" cellspacing="0" cellpadding="0" name="table1" id="table1" width="100%">
<thead>
<tr class="th">

<th width="60px"><input title="点击可全选本页的所有项目"  onclick="CheckAll(this.form)" type="checkbox" name="chkall" class="checkbox" /> </th>
{loop $field $f}
          <th align="center"><!--{$f.name}-->{$f.name|lang}</th>
{/loop}
          <th align="center">操作</th>
		  <th align="center">关联</th>
        </tr>

</thead>
<tbody>
{loop $data $d}
<tr class="s_out">
开发者ID:jiangsuei8,项目名称:public_php_shl,代码行数:28,代码来源:list.php


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