예제 #1
0
파일: role.php 프로젝트: RenzcPHP/3dproduct
 /**
  * 列表
  */
 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;
 }
예제 #2
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;
 }
예제 #3
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;
 }
예제 #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;
 }
예제 #5
0
파일: mail.php 프로젝트: RenzcPHP/3dproduct
 /**
  * 列表
  */
 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;
 }
예제 #6
0
 /**
  * 得到留言的信息状态以及留言者的信息
  *
  * @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;
 }
예제 #7
0
                                <div class="new_float" style="z-index:9999">
                                    <input type="text" class="text" size="4" name="order" value="<?php 
        echo $rs['position'];
        ?>
"/>
                                    <input type="button" class="ui-button-small" value="保存" name="submit_order_form" />
                                    <input type="hidden" name="id" value="<?php 
        echo $rs['id'];
        ?>
"/>
                                    <input type="button" class="ui-button-small" value="取消" name="cancel_order_form" />
                            	</div>                       
							</div>	
						</td>
                        <td><?php 
        echo view_tool::get_active_img($rs['active']);
        ?>
&nbsp;</td>
                        <td></td>
                    </tr>
                     <?php 
    }
    ?>
                </tbody>
        </form>
        </table>
        <?php 
} else {
    ?>
        <?php 
    echo remind::no_rows();
예제 #8
0
                    <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>
예제 #9
0
        echo html::time_end($product['time_end']);
        ?>
</td>
                      <td><?php 
        echo $product['time_reset'];
        ?>
</td>
                      <td><?php 
        echo view_tool::get_active_img($product['status']);
        ?>
<input type="hidden" name="status" value="<?php 
        echo $product['id'] . '-' . $product['status'];
        ?>
"></td>
                      <td><?php 
        echo view_tool::get_active_img($product['recommend']);
        ?>
<input type="hidden" name="recommend" value="<?php 
        echo $product['id'] . '-' . $product['recommend'];
        ?>
"></td>
                      </tr>
                  <?php 
    }
    ?>
                </tbody>
            </form>
        </table>
        <?php 
} else {
    ?>
예제 #10
0
        echo $rs['date_add'];
        ?>
&nbsp;</td>
                        <td><?php 
        echo long2ip($rs['ip']);
        ?>
&nbsp;</td>
                        <td><a href="<?php 
        echo url::base();
        ?>
user/contact_us/do_active/<?php 
        echo $rs['id'];
        ?>
">
                            <?php 
        echo view_tool::get_active_img($rs['active'], false);
        ?>
                            </a></td>
                    </tr>
                     <?php 
    }
    ?>
                </tbody>
        </form>
        </table>
        <?php 
} else {
    ?>
        <?php 
    echo remind::no_rows();
    ?>
예제 #11
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>
예제 #12
0
파일: tree.php 프로젝트: RenzcPHP/3dproduct
 /**
  * 得到树型结构
  * @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;
 }
예제 #13
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();
예제 #14
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>
예제 #15
0
</td>
                  <td><?php 
        echo $product['title'];
        ?>
</td>
                  <td><?php 
        if (!empty($product['category'])) {
            echo $product['category'];
        } else {
            ?>
<font color="#ff0000">无</font><?php 
        }
        ?>
</td>
                  <td><?php 
        echo view_tool::get_active_img($product['on_sale']);
        ?>
<input type="hidden" value="<?php 
        echo $product['id'] . '-' . $product['on_sale'];
        ?>
"></td>
                  <td><?php 
        echo $product['price'];
        ?>
</td>
                  </tr>
                  <?php 
    }
    ?>
                </tbody>
            </form>
예제 #16
0
            ?>
" >查看</a>
                        	<?php 
        }
        ?>
                        </td>
                        <td><?php 
        echo $item['date_add'];
        ?>
&nbsp;</td>
                        <td><?php 
        echo $item['ip'];
        ?>
&nbsp;</td>
                        <td><?php 
        echo view_tool::get_active_img($item['active']);
        ?>
</td>
                        <td>
                          <div id="register_mail_active">
                          	<?php 
        $img = $item['register_mail_active'] == 1 ? '/images/icon/accept.png' : '/images/icon/cancel.png';
        echo '<img src="' . $img . '" rev="' . $item['id'] . '"/>';
        ?>
                          	<input type="hidden" name="mail_active" value="<?php 
        echo $item['register_mail_active'];
        ?>
"/>
                          </div>
                        </td>
                    </tr>