Exemple #1
0
 /**
  * 列表
  */
 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;
 }
Exemple #2
0
 /**
  * 分类列表
  */
 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;
 }
Exemple #3
0
 /**
  * 列表
  */
 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;
 }
Exemple #4
0
 /**
  * 列表
  */
 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;
 }
Exemple #5
0
 /**
  * 列表
  */
 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;
 }
 /**
  * 得到留言的信息状态以及留言者的信息
  *
  * @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;
 }
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'];
    ?>
">
Exemple #8
0
 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>
        <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'];
        ?>
<?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>
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 
} 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();
?>
Exemple #13
0
 /**
  * 得到树型结构
  * @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;
 }
Exemple #14
0
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();
Exemple #15
0
                                <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();
Exemple #16
0
">
                <thead>
                    <tr class="headings">
                        <th width="20"> <input type="checkbox" id="check_all"></th>
                        <th width="40">操作</th>
                        <?php 
    echo view_tool::sort('虚拟分类名称', 2, 100);
    ?>
                        <?php 
    echo view_tool::sort('前台链接', 4, 100);
    ?>
                        <?php 
    echo view_tool::sort('排序', 8, 100);
    ?>
                        <?php 
    echo view_tool::sort('更新时间', 6, 100);
    ?>
                    </tr>
                </thead>
                <tbody>
                 <?php 
    $str = '<tr id=\\"top_div_{$id}\\" pid=\\"{$pid}\\" >
                                <td>
                                        <input class=\\"sel\\" name=\\"id[]\\" value=\\"{$id}\\" type=\\"checkbox\\" pid=\\"{$pid}\\">
                                    </td>
                                    <td>
                                        <a href=\\"/product/aliasfilter/edit?id={$id}\\">编辑</a>
                                        <a class=\\"act_dodelete\\" href=\\"/product/aliasfilter/delete?id={$id}\\"> 删除</a>
                                    </td>
                                    <td>&nbsp; {$spacer} <img src=\\"/images/icon_dot2.gif\\" class=\\"icon_dot\\" onclick=\\"fold({$id})\\" /> {$title}&nbsp;</td>
                                    <td>&nbsp; {$uri_name}&nbsp;</td>
                    <th>名字:</th>
                    <td colspan="3"><?php 
echo $data['name'];
?>
</td>
                </tr>
            </thead>
            <tr>
                <th>邮箱:</th>
                <td><?php 
echo $data['email'];
?>
</td>
                <th>是否收到邮件:</th>
                <td><?php 
echo view_tool::get_active_img($data['is_receive']);
?>
</td>
            </tr>
            <tr>
                <th>时间:</th>
                <td><?php 
echo $data['date_add'];
?>
</td>
                <th>IP/地址:</th>
                <td><?php 
echo long2ip($data['ip']);
?>
</td>
            </tr>
Exemple #18
0
        ?>
"/>
                                    <input type="button" class="ui-button-small" value="取消" name="cancel_order_form" />
                            	</div>                       
							</div>	
                        </td>
                        <td>
                            <a href="<?php 
        echo url::base();
        ?>
site/link/do_active/<?php 
        echo $item['id'];
        ?>
">
                            <?php 
        echo view_tool::get_active_img($item['status'], true);
        ?>
                            </a>
                        </td>
                    </tr>
                     <?php 
    }
    ?>
                     <?php 
}
?>
                </tbody>
                </form>
        </table>
    </div>
</div>
                        <th width="20px"><input type="checkbox" id="check_all"></th>
                        <th width="30">操作</th>
                        <?php 
    echo view_tool::sort('ID号', 0, 40);
    ?>
                        <?php 
    echo view_tool::sort('名称', 2, 180);
    ?>
                        <?php 
    echo view_tool::sort('图片', 4, 250);
    ?>
                        <?php 
    echo view_tool::sort('驱动', 6, 80);
    ?>
                        <?php 
    echo view_tool::sort('提交地址', 8, 300);
    ?>
                    </tr>
                </thead>
                <tbody>
                     <?php 
    foreach ($payment_type_list as $rs) {
        ?>
                    <tr>
                        <td><input class="sel" name="payment_type_id[]" value="<?php 
        echo $rs['id'];
        ?>
" type="checkbox" /></td>
                        <td><a href="<?php 
        echo url::base();
        ?>
Exemple #20
0
                echo isset($ship_status[$order_history['ship_status']]) ? $ship_status[$order_history['ship_status']]['name'] : '未发货';
                break;
            case 'order_status':
                echo !empty($order_history['order_status']) && isset($order_status[$order_history['order_status']]) ? $order_status[$order_history['order_status']]['name'] : '未处理';
                break;
            default:
                echo "未处理";
        }
        ?>
                                <?php 
    }
    ?>
                        </td>
                        <td class="a_center">
                            <?php 
    echo view_tool::get_active_img($order_history['is_send_mail']);
    ?>
                        </td>
                        <td class="a_center"><?php 
    echo $order_history['manager_name'];
    ?>
</td>
                        <td><?php 
    echo nl2br($order_history['content_admin']);
    ?>
</td>
                        <td><?php 
    echo nl2br($order_history['content_user']);
    ?>
</td>
                    </tr>