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


PHP view_tool类代码示例

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


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

示例1: index

 /**
  * 列表
  */
 public function index()
 {
     $this->template->content = new View("manage/role_list");
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Myrole::instance()->count(), 'items_per_page' => $per_page));
     //管理员可能查看所有的用户组,其实只能看到对应等级下面的用户组
     if ($this->manager_is_admin == 1) {
         $roles = Myrole::instance()->roles();
     } else {
         $role_id = Mymanager::instance($this->manager_id)->get('role_id');
         $roles = Myrole::instance()->childrens($role_id);
     }
     foreach ($roles as $k => $v) {
         //显示图片标识
         $roles[$k]['active_img'] = view_tool::get_active_img($v['active']);
         $roles[$k]['type_name'] = 'merchant';
         if ($v['type'] == 1) {
             $roles[$k]['type_name'] = 'admin';
         }
         //列表中显示上级用户组
         $roles[$k]['parent_name'] = '空';
         if ($v['parent_id'] > 0) {
             $role = Myrole::instance($v['parent_id'])->get();
             $roles[$k]['parent_name'] = $role['name'];
         }
     }
     $this->template->content->roles = $roles;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:32,代码来源:role.php

示例2: index

 /**
  * 分类列表
  */
 public function index()
 {
     //* 权限验证 */
     $site_id = site::id();
     Myseo_manage::instance()->update_seo_manage_by_site_id($site_id);
     if ($site_id == 0) {
         remind::set('请首先进入所要操作的站点', request::referrer(), 'error');
     }
     $site_id_list = role::check('seo_manage', 0, 0);
     if (empty($site_id_list)) {
         remind::set('access denied', request::referrer(), 'error');
     }
     $query_struct = array();
     $query_struct = array('where' => array('site_id' => $site_id));
     $list_columns = array(array('name' => 'ID', 'column' => 'id', 'class_num' => '1'), array('name' => '分类', 'column' => 'parent_id', 'class_num' => '4'), array('name' => '包含子分类', 'column' => 'is_contain_child', 'class_num' => '3'), array('name' => 'Meta Title', 'column' => 'meta_title', 'class_num' => '5'), array('name' => 'Meta Keywords', 'column' => 'meta_keywords', 'class_num' => '5'), array('name' => 'Meta Description', 'column' => 'meta_description', 'class_num' => '6'), array('name' => '发布时间', 'column' => 'create_timestamp', 'class_num' => '5'), array('name' => '更新时间', 'column' => 'update_timestamp', 'class_num' => '5'));
     $this->template->content = new View("product/seo_manage_list");
     $this->template->content->list_columns = $list_columns;
     /**
      * 搜索
      */
     /*
     		$search_arr = array('site_domain','site_id');
     		
     		$search_type = $this->input->get('search_type');
     		$search_value = $this->input->get('search_value');
     		if($search_value&&$search_type)
     		{
     			if(in_array($search_type,$search_arr))
     			{
     				$query_struct['like'][$search_type] = $search_value;
     			}
     		}*/
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Myseo_manage::instance()->count($query_struct), 'items_per_page' => $per_page));
     $orderby = array('update_timestamp' => 'DESC');
     $seo_manages = Myseo_manage::instance()->seo_manages($query_struct, $orderby, $per_page, $this->pagination->sql_offset);
     $request_category = array('where' => array('site_id' => $site_id), 'like' => array(), 'orderby' => array());
     $category = Mycategory::instance()->lists($request_category);
     foreach ($category as $val) {
         $category_list[$val['id']] = $val;
     }
     foreach ($seo_manages as $seo_manages_key => $seo_manages_value) {
         $seo_manages[$seo_manages_key]['is_contain_child'] = view_tool::get_active_img($seo_manages_value['is_contain_child']);
         $seo_manages[$seo_manages_key]['meta_description'] = strip_tags(text::limit_words($seo_manages_value['meta_description'], 50));
         $seo_manages[$seo_manages_key]['create_timestamp'] = date('Y-m-d H:i:s', $seo_manages_value['create_timestamp']);
         $seo_manages[$seo_manages_key]['update_timestamp'] = date('Y-m-d H:i:s', $seo_manages_value['update_timestamp']);
         if ($seo_manages_value['parent_id'] && array_key_exists($seo_manages_value['parent_id'], $category_list)) {
             $seo_manages[$seo_manages_key]['parent_id'] = $category_list[$seo_manages_value['parent_id']]['name'];
         } else {
             $seo_manages[$seo_manages_key]['parent_id'] = '';
         }
         foreach ($seo_manages_value as $key => $value) {
             if (!is_numeric($value) && empty($value)) {
                 $seo_manages[$seo_manages_key][$key] = "NULL";
             }
         }
     }
     $this->template->content->seo_manages = $seo_manages;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:63,代码来源:seo_manage.php

示例3: index

 /**
  * 列表
  */
 public function index()
 {
     $query_struct = array();
     /**
      * 搜索
      */
     $search_value = $this->input->get('search_value');
     if ($search_value) {
         $query_struct['where']['mail_category_id'] = $search_value;
     }
     //调用分页
     $per_page = controller_tool::per_page();
     $this->pagination = new Pagination(array('total_items' => Mymail_template::instance()->count($query_struct), 'items_per_page' => $per_page));
     $mail_templates = Mymail_template::instance()->mail_templates($query_struct, array('id' => 'DESC'), $per_page, $this->pagination->sql_offset);
     foreach ($mail_templates as $k => $v) {
         foreach ($v as $key => $value) {
             if (!is_numeric($value) && empty($value)) {
                 $mail_templates[$k][$key] = 'NULL';
             }
         }
         $mail_templates[$k]['content_small'] = strip_tags(text::limit_words($v['content'], 30));
         $mail_templates[$k]['active_img'] = view_tool::get_active_img($v['active']);
     }
     $mail_categories = Mymail_category::instance()->mail_categories();
     $this->template->content = new View("manage/mail_template_list");
     $this->template->content->mail_templates = $mail_templates;
     $this->template->content->mail_categories = $mail_categories;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:mail_template.php

示例4: index

 /**
  * 列表
  */
 public function index()
 {
     $this->template->content = new View("manage/mail_category_list");
     $mail_categories = Mymail_category::instance()->mail_categories(array(), array('id' => 'DESC'));
     foreach ($mail_categories as $key => $value) {
         $mail_categories[$key]['active_img'] = view_tool::get_active_img($value['active']);
     }
     $this->template->content->mail_categories = $mail_categories;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:12,代码来源:mail_category.php

示例5: index

 /**
  * 列表
  */
 public function index()
 {
     $mails = Mymail::instance()->mails();
     foreach ($mails as $k => $v) {
         $mails[$k]['content_small'] = strip_tags(text::limit_words($v['content'], 30));
         $mails[$k]['active_img'] = view_tool::get_active_img($v['active']);
     }
     $this->template->content = new View("site/mail_list");
     $this->template->content->mails = $mails;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:13,代码来源:mail.php

示例6: messages

 /**
  * 得到留言的信息状态以及留言者的信息
  *
  * @param Array $query_struct
  * @return Array
  */
 public function messages($query_struct = array())
 {
     $list = array();
     $results = $this->query_assoc($query_struct);
     if (!empty($results)) {
         foreach ($results as $result) {
             $managers = Mymanager::instance($result['manager_id'])->get();
             $managers['name'] = !empty($managers['name']) ? $managers['name'] : '无';
             $managers['phone'] = !empty($managers['phone']) ? $managers['phone'] : '无';
             $managers['reply_status'] = view_tool::get_active_img($result['is_reply']);
             $status = Kohana::config('message.status');
             $merge_arr = array('site_manager_name' => $managers['name'], 'phone' => $managers['phone'], 'status' => $status[$result['status']], 'reply_status' => $managers['reply_status']);
             $list[] = array_merge($result, $merge_arr);
         }
     } else {
         $list = '';
     }
     return $list;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:25,代码来源:MessageService.php

示例7:

echo view_tool::orderby('ID', 3, 0);
?>
			  <?php 
echo view_tool::orderby('名称', 5, 2);
?>
			  <?php 
echo view_tool::orderby('前台URL', 6, 6);
?>
			  <?php 
echo view_tool::orderby('排序', 3, 10);
?>
			  <?php 
echo view_tool::orderby('添加时间', 4, 12);
?>
			  <?php 
echo view_tool::orderby('更新时间', 4, 14);
?>
            </div>
          </div>
        </div>
      </div>
      <div class="main_content" style="visibility: visible; opacity: 1;">
        <div class="finder">
<?php 
foreach ($data as $item) {
    ?>
<div class="finder-list" >
<div class="row" id="top_div_<?php 
    echo $item['id'];
    ?>
">
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:doc_template_list.php

示例8:

 echo view_tool::sort('名称', 4, 0);
 ?>
                         <?php 
 echo view_tool::sort('别名', 2, 130);
 ?>
                         <?php 
 echo view_tool::sort('类型', 6, 100);
 ?>
                         <?php 
 echo view_tool::sort('排序', 8, 100);
 ?>
                         <?php 
 echo view_tool::sort('更新时间', 10, 150);
 ?>
                         <?php 
 echo view_tool::sort('前台显示', 12, 80);
 ?>
                 </tr>
             </thead>
             <tbody>
                 <?php 
 $str = '<tr class=\\"row\\" id=\\"top_div_{$id}\\" pid=\\"{$pid}\\" >
                                 <td>
                                     <a href=\\"/product/category/edit?id={$id}\\">编辑</a>
                                     <a href=\\"/product/product/?category_id=".urlencode($title_manage)."\\">分类商品</a>
                                     <a class=\\"act_dodelete\\" href=\\"/product/category/delete?id={$id}\\">删除</a>
                                     <a class=\\"act_doexport\\" href=\\"/product/export/index?type=category&id={$id}\\">导出商品</a>
                                 </td>
                                 <td>{$id}&nbsp;</td>
                                 <td>{$uri_name}&nbsp;</td>
                                 <td>&nbsp; {$spacer} <img src=\\"/images/icon_dot2.gif\\" class=\\"icon_dot\\" onclick=\\"fold({$id})\\" /> {$title}&nbsp;</td>
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:index.php

示例9: foreach

        <form id="add_form" name="add_form" method="post" action="<?php 
    echo url::base() . url::current();
    ?>
">
        <table  cellspacing="0">
                <thead>
                    <tr class="headings">
                        <!-- <th width="20"><input type="checkbox" id="check_all"></th> -->
                        <th width="100">操作</th>
                        <?php 
    foreach ($list_columns as $key => $value) {
        echo '<th title="' . $value['name'] . '" width="' . $value['class_num'] . '">' . $value['name'] . '</th>';
    }
    ?>
                        <?php 
    echo view_tool::sort('排序', 2, 40);
    ?>
                        <th></th> 
                    </tr>
                </thead>
                
                <tbody id="list-line">
                     <?php 
    foreach ($categories as $value) {
        ?>
                    <tr id="<?php 
        echo $value['level_depth'];
        ?>
" name="<?php 
        echo $value['id'];
        ?>
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:doc_category_list.php

示例10: defined

<?php

defined('SYSPATH') or die('No direct access allowed.');
?>
<div class="dialog" id="notice_dialog" title="公告">
    <div class="newgrid">
        <table  cellspacing="0">
                <thead>
                    <tr class="headings">
                        <?php 
echo view_tool::sort('IP/地址', 12, 100);
?>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td><?php 
echo long2ip($rs['ip']);
?>
&nbsp;</td>
                    </tr>
                </tbody>
        </table>
    </div>
</div>
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:25,代码来源:notice_view_dialog.php

示例11: foreach

echo view_tool::sort('货号SKU', 4, 0);
?>
                        <?php 
echo view_tool::sort('商品名称', 6, 0);
?>
                        <?php 
echo view_tool::sort('数量', 8, 0);
?>
                        <?php 
echo view_tool::sort('卖价', 10, 0);
?>
                        <?php 
echo view_tool::sort('总折后价', 12, 0);
?>
                        <?php 
echo view_tool::sort('平均折后价', 14, 0);
?>
                    </tr>
                </thead>
                <tbody>
                  <?php 
if (is_array($order_product_stat) && count($order_product_stat)) {
    ?>
                 <?php 
    foreach ($order_product_stat as $key => $rs) {
        ?>
                  <tr id="top_div_<?php 
        echo $key;
        ?>
">
                  <td><?php 
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:order_product_stat.php

示例12:

} else {
    ?>
		<?php 
    echo remind::no_rows();
    ?>
		<?php 
}
?>
    </div>
</div>
<!--**content end**-->
<!--FOOTER-->
<div class="new_bottom fixfloat">
    <div class="b_r_view new_bot_l">
        <?php 
echo view_tool::per_page();
?>
    </div>
    <div class="Turnpage_rightper">
        <div class="b_r_pager">
            <?php 
echo $this->pagination->render('opococ');
?>
        </div>
    </div>
</div>
<!--END FOOTER-->
<div id="site_msg" style='display:none;'>    
    <form id="msg_form" name="msg_form" class="new_search" method="post" action="<?php 
echo url::base();
?>
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:client_month_contract_list.php

示例13: get_tree

 /**
  * 得到树型结构
  * @param $arr array 2维数组,例如:
  * array(
  * 1 => array('id'=>'1','pid'=>0,'title'=>'一级栏目一','level_depth'=>1),
  * 2 => array('id'=>'2','pid'=>0,'title'=>'一级栏目二','level_depth'=>1),
  * 3 => array('id'=>'3','pid'=>1,'title'=>'二级栏目一','level_depth'=>2),
  * 4 => array('id'=>'4','pid'=>1,'title'=>'二级栏目二','level_depth'=>2),
  * 5 => array('id'=>'5','pid'=>2,'title'=>'二级栏目三','level_depth'=>2),
  * 6 => array('id'=>'6','pid'=>3,'title'=>'三级栏目一','level_depth'=>3),
  * 7 => array('id'=>'7','pid'=>3,'title'=>'三级栏目二','level_depth'=>3)
  * )
  * @param $str string 生成树型结构的基本代码,例如:'<option value={$id} {$selected}>{$spacer}{$title}</option>'
  * @param $myid int 指定生成此id的子级树
  * @param $sid int 被选中的ID,比如在做树型下拉框的时候需要用到
  * @param $icon 前缀
  * @return string
  */
 public static function get_tree($arr, $str, $myid = 0, $sid = 0, $icon = '--')
 {
     $return_str = '';
     $newarr = array();
     if (is_array($arr)) {
         foreach ($arr as $key => $a) {
             if ($a['pid'] == $myid) {
                 $newarr[$key] = $a;
             }
         }
     }
     if (is_array($newarr)) {
         foreach ($newarr as $key => $a) {
             @extract($a);
             $spacer = '';
             for ($i = 1; $i < $level_depth; $i++) {
                 $spacer .= $icon;
             }
             $selected = $id == $sid ? 'selected' : '';
             if (isset($a['is_show'])) {
                 $is_show = view_tool::get_active_img($a['is_show']);
             }
             eval("\$nstr = \"{$str}\";");
             $myid = $id;
             $return_str .= $nstr . self::get_tree($arr, $str, $myid, $sid, $icon);
         }
     }
     return $return_str;
 }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:47,代码来源:tree.php

示例14: foreach

product/gift_card/delete_all/">
                <thead>
                    <tr class="headings">
                        <th width="20"><input type="checkbox" id="check_all"></th>
                        <th width="100">操作</th>
                            <?php 
    echo view_tool::sort('商品 SKU', 2, 150);
    ?>
                            <?php 
    echo view_tool::sort('商品名称', 10, 0);
    ?>
                            <?php 
    echo view_tool::sort('价格', 16, 50);
    ?>
                            <?php 
    echo view_tool::sort('上架', 14, 50);
    ?>
                    </tr>
                </thead>
                <tbody>         
                        <?php 
    foreach ($product_list as $rs) {
        ?>
                    <tr>
                        <td><input class="sel" name="ids[]" value="<?php 
        echo $rs['id'];
        ?>
" type="checkbox" /></td>
                        <td>
                            <a class="act_doedit" href="<?php 
        echo url::base();
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:index.php

示例15:

                                <div class="new_float" style="z-index:9999">
                                    <input type="text" class="text" size="4" name="order" value="<?php 
        echo $value['order'];
        ?>
"/>
                                    <input type="button" class="ui-button-small" value="保存" name="submit_order_form" />
                                    <input type="hidden" name="id" value="<?php 
        echo $value['id'];
        ?>
"/>
                                    <input type="button" class="ui-button-small" value="取消" name="cancel_order_form" />
                            	</div>                       
							</div>	
                        </td>
                        <td><?php 
        echo view_tool::get_active_img($value['active']);
        ?>
</td>
                        <td></td>
                    </tr>
                        <?php 
    }
    ?>
                </tbody>                
            </table>
        </form>
            <?php 
} else {
    ?>
            <?php 
    echo remind::no_rows();
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:menu_list.php


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