public function ajax_page($current_id)
 {
     isset($_GET['current_id']) && ($current_id = intval($_GET['current_id']));
     $Page = D('Page');
     import("ORG.Util.Page");
     $count = M("current_investor")->where("current_id = {$current_id} and `order` <> ''")->count('id');
     $Page = new Page($count, 5);
     $show = $Page->ajax_show();
     $this->assign('page', $show);
     if ($_GET['current_id']) {
         $list = M("current_investor t")->join("lzh_members s ON s.id = t.invest_uid")->where("t.current_id = {$current_id} and t.order <> ''")->order('t.id')->limit($Page->firstRow . ',' . $Page->listRows)->select();
         $str = '';
         foreach ($list as $k => $v) {
             $str .= "<ul class='items'>\n\t\t\t\t\t\t<li class='col_1'>" . hidecard($v['user_name'], 5) . "</li>\n\t\t\t\t\t\t<li class='col_2'>" . $v['buy_money'] . "</li>\n\t\t\t\t\t\t<li class='col_3'>" . date("Y-m-d H:i", $v['add_time']) . "</li>\n\t\t\t\t\t\t<li class='col_4'><span class='succ'><i class='icons cm-green'></i>成功</span></li>\t\t\t\t\t\t\n\t\t\t\t\t</ul>";
         }
         $data = array();
         $data['html'] = empty($str) ? '暂时没有投资记录' : $str;
         $data['count'] = $count;
         echo json_encode($data);
     }
 }
 public function ajax_page($id = 0)
 {
     isset($_GET['id']) && ($id = intval($_GET['id']));
     $Page = D('Page');
     import("ORG.Util.Page");
     $count = M('member_moneylog')->field("add_time,affect_money,type")->where("shares_id = {$id}")->count('id');
     $Page = new Page($count, 5);
     $show = $Page->ajax_show();
     $this->assign('page', $show);
     if ($_GET['id']) {
         $log = M('member_moneylog')->field("add_time,affect_money,type")->where("shares_id = {$id}")->limit($Page->firstRow . ',' . $Page->listRows)->select();
         $str = '';
         foreach ($log as $key => $v) {
             $str .= "<tr align='center'>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . date("Y-m-d H:i:s", $v['add_time']) . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . $v['type'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . $v['affect_money'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
         }
         if ($this->isAjax()) {
             echo $str;
         }
     }
 }
Example #3
0
 /**
  * ajax 获取投资记录
  * 
  */
 public function investRecord($borrow_id = 0)
 {
     isset($_GET['borrow_id']) && ($borrow_id = intval($_GET['borrow_id']));
     $Page = D('Page');
     import("ORG.Util.Page");
     $count = M("borrow_investor")->where('borrow_id=' . $borrow_id)->count('id');
     $Page = new Page($count, 100);
     $show = $Page->ajax_show();
     $this->assign('page', $show);
     if ($_GET['borrow_id']) {
         $list = M("borrow_investor as b")->join(C(DB_PREFIX) . "members as m on  b.investor_uid = m.id")->join(C(DB_PREFIX) . "borrow_info as i on  b.borrow_id = i.id")->field('i.borrow_interest_rate, i.repayment_type, b.investor_capital, b.add_time, b.is_auto, m.user_name')->where('b.borrow_id=' . $borrow_id)->order('b.id')->limit($Page->firstRow . ',' . $Page->listRows)->select();
         $string = '';
         foreach ($list as $k => $v) {
             $relult = $k % 2;
             if (!$relult) {
                 $string .= "<tr style='background-color: rgb(255, 255, 255);' class='borrowlist3'>\n                   <td width='148' class='txtC'>" . hidecard($v['user_name'], 5) . "</td>\n                      <td  width='148' class='txtC'>";
             } else {
                 $string .= "<tr style='background-color: rgb(236, 249, 255);' class='borrowlist5'>\n                   <td width='148' class='txtC'>" . hidecard($v['user_name'], 5) . "</td>\n                      <td  width='148' class='txtC'>";
             }
             $string .= $v['is_auto'] ? '自动' : '手动';
             $string .= "</td>\n                      <td  width='128' class='txtRight pr30'>" . Fmoney($v['investor_capital']) . "元</td>\n                      <td width='198' class='txtC'>" . date("Y-m-d H:i", $v['add_time']) . "</td>\n                     <td></td></tr>";
         }
         echo empty($string) ? '暂时没有投资记录' : $string;
     }
 }
    /**
     * ajax 获取投资记录
     *
     */
    public function investRecord($re = false, $page = false)
    {
        isset($_GET['id']) && ($borrow_id = intval($_GET['id']));
        //$Page = D('Page');
        import("ORG.Util.Page");
        $count = M("borrow_investor")->where('borrow_id=' . $borrow_id)->count('id');
        $Page = new Page($count, 10);
        $show = $Page->ajax_show();
        $this->assign('page', $show);
        if (true === $page) {
            return true;
        }
        if ($borrow_id) {
            $list = M("borrow_investor as b")->join(C(DB_PREFIX) . "members as m on  b.investor_uid = m.id")->join(C(DB_PREFIX) . "borrow_info as i on  b.borrow_id = i.id")->field('b.id,b.ent,i.borrow_interest_rate, i.repayment_type, b.investor_capital, b.add_time, b.is_auto, m.user_name')->where('b.borrow_id=' . $borrow_id)->order('b.id')->limit($Page->firstRow . ',' . $Page->listRows)->select();
            $string = '';
            if (true === $re) {
                return array('count' => $count, 'list' => $list);
            }
            foreach ($list as $k => $v) {
                $relult = $k % 2;
                if (!$relult) {
                    $string .= "<tr class='h_tdblue'><td width='148' class='txtC'>" . hidecard($v['user_name'], 5) . "</td>";
                } else {
                    $string .= "<tr><td width='148' class='txtC'>" . hidecard($v['user_name'], 5) . "</td>";
                }
                $string .= "<td width='148' class='txtC" . ($v['ent'] ? ' new_add' : '') . "'>";
                if ($v['ent']) {
                    $string .= <<<EOT
<em class="new_wechat_tit">微信</em><i class="new_wechat" data-id='{$v['id']}'></i>
<p class="sweep_wechat" style="display: none;" id='sweep_wechat_{$v['id']}'>
    <em class="point1"></em>
    <img src="/Style/img/wechat.jpg" width="140" height="138">
    <span class="sweep_wechat_con">扫码注册领<i>百元</i>红包</span>
    <span class="sweep_wechat_con">微信投标享<i>干二</i>奖励</span>
</p>
EOT;
                } else {
                    $string .= $v['is_auto'] ? '自动' : '手动';
                }
                $string .= "</td>\n                      <td  width='128' class='txtRight pr30'>" . Fmoney($v['investor_capital']) . "元</td>\n                      <td width='198' class='txtC'>" . date("Y-m-d H:i:s", $v['add_time']) . "</td>\n                     <td></td></tr>";
            }
            echo empty($string) ? '暂时没有投资记录' : $string;
        }
    }