예제 #1
0
    </div>
</div>

<script>


    $("#share").click(function () {
        $('#myModal').modal('show');
        $(".modal-body").html("请点击右上角按钮,选择分享到朋友圈");
    });
    wx.ready(function () {
        // 在这里调用 API
<?php 
if ($cork[0]['check'] != 2) {
    echo "link = 'http://mp.weixin.qq.com/s?__biz=MzA3MDAyMzA5OQ==&mid=211569463&idx=1&sn=a5b14cf144aa75756a1b7ecfeb6385ab&key=fbe9f9f4b565962ca850ccd7e7722cd4fa08b41e58c0dca9df28ae7d1a6aaf81a79a9340aed989d68a24068ad21ddbba&ascene=1&uin=MjQ4ODEzMjAw&devicetype=webwx&version=70000001&pass_ticket=4DKHDCVyjNvgYxv%2FdRYDuZVhfQ%2BgIFy2JljQIaW3mr0%3D';";
    echo "imgUrl = '" . v_theme_url() . "/image/share.jpg';";
    echo "title = '脑洞有多大,奖品就有多大!';";
} else {
    echo "link = '" . v_site_url() . "/?m=Cork&a=success&openid=" . $cork[0]['openid'] . "';";
    echo "imgUrl = '" . $cork[0]['imgpath'] . "';";
    echo "title = '" . $cork[0]['nickname'] . " 已参加 “脑洞有多大,奖品就有多大!” 活动,你还在等什么?';";
}
?>

        /**
         * user share 
         */
        wx.onMenuShareTimeline({
            title: title,
            link: link,
            imgUrl: imgUrl,
예제 #2
0
  
<?php 
v_template_part(array("name" => "AdminHeader", "path" => "Admin/Public"));
?>
<link href="<?php 
echo v_theme_url();
?>
/Admin/media/css/news.css" rel="stylesheet" type="text/css"/>
<?php 
v_template_part(array("name" => "AdminCrumb", "path" => "Admin/Public", "title" => "单页管理", "data" => array(array("name" => "Page", "path", U("Admin/Page/index")))));
?>
<div class="row-fluid">
    <div class="span12 text-right">
        <a class="btn btn-success green" href="<?php 
echo U("Admin/Page/edit");
?>
">添加单页</a>
    </div>
</div>
<br />
<div class="row-fluid">
    <div class="span12">
  <table class="table table-bordered table-hover">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>顶级</th>
				        <th>标题</th>
                    <th>描述</th>
                    <th>发布时间</th>
                    <th></th>
예제 #3
0
 public function index($category = 0)
 {
     $pagesize = 12;
     /**
      *  初始化文章
      */
     $Article = M('product');
     // 实例化Data数据对象
     //            $map['tag'] = array('like', "%" . $tag . "%");
     $map['lang'] = array('like', LANG_SET);
     if ($category != 0) {
         $map['category_id'] = array('like', $category);
         $temo = M('product_category')->where(array("lang" => LANG_SET, "id" => $category))->select();
         if ($temo[0]['sub_id'] == "0") {
             $subcategory = M('product_category')->where(array("lang" => LANG_SET, "sub_id" => $category))->select();
             $in = "";
             foreach ($subcategory as $subcate) {
                 //$map['id']  = array('not in','1,5,8');
                 $in .= $subcate['id'] . ",";
             }
             $in = substr($in, 0, strlen($in) - 1);
             $map['category_id'] = array('in', $in);
         }
         $this->assign('currcategory', $temo[0]);
         // 赋值数据集
     } else {
         $this->assign('currcategory', array("img" => v_theme_url() . "/img/logo.png", "name" => "", "summary" => ""));
         // 赋值数据集
     }
     /**
      * seache
      */
     //        $categoryid = $_POST['category_id'];
     //        $title = $_POST['title'];
     //        if ($categoryid != "") {
     //            $map['category_id'] = array('like', "$categoryid");
     //        }
     //        if ($title != "") {
     //            $map['title'] = array('like', "%" . $title . "%");
     //        }
     //        $this->assign('querydata', $_POST); // 赋值数据集
     //        $map['type'] = array('like', "article");
     $count = $Article->where($map)->count();
     // 查询满足要求的总记录数 $map表示查询条件
     $Page = new \Think\Page($count, $pagesize);
     // 实例化分页类 传入总记录数(这是根据@979137的意见修改的,这个建议非常好!)
     $totalpage = ceil($Page->totalRows / $pagesize);
     $show["total_page"] = $totalpage;
     // 分页显示输出
     $show["curr_page"] = $Page->parameter['p'];
     // 分页显示输出
     // 进行分页数据查询
     $orderby['id'] = 'desc';
     $list = $Article->order($orderby)->limit($Page->firstRow . ',' . $Page->listRows)->where($map)->select();
     $categorylist = M('product_category')->where(array("lang" => LANG_SET))->order(array("order" => "asc", "created" => "desc"))->select();
     $tree = build_tree(0, $categorylist);
     $this->assign('categorylist', $tree);
     // 赋值数据集
     $this->assign('product', $list);
     // 赋值数据集
     //print_r($Page->show());die;
     $this->assign('page', $show);
     // 赋值分页输出
     $this->theme("default")->display('Product/index');
 }