public function detail() { if ($_GET['type'] == 'commentlist') { //评论 $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 5); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $data['html'] = $this->fetch('commentlist'); exit(json_encode($data)); } $pre = C('DB_PREFIX'); $id = intval($_REQUEST['id']); $good = M('market_goods')->where("is_sys=1 AND id={$id}")->find(); if (!is_array($good)) { $this->error("数据出错"); } $imgArr = $good['middle_img']; $styleArr = explode("|", $good['style']); if (count($styleArr) == 1 && $styleArr[0] == "") { $isstyle = 0; } else { $isstyle = 1; } $good['surplus'] = $good['number'] - $good['convert']; //剩余数量 $this->assign("vo", $good); $this->assign("styleArr", $styleArr); $this->assign("imgArr", $imgArr); $this->assign("isstyle", $isstyle); $list = M('market_log l')->field("l.*,m.user_name")->join("{$pre}members m ON m.id=l.uid")->where("l.type=1")->order("l.price DESC")->limit(10)->select(); $this->assign('list', $list); $cmap['tid'] = $id; $clist = getCommentList($cmap, 5); $this->assign("Bconfig", $Bconfig); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $this->display(); }
public function tdetail() { if ($_GET['type'] == 'commentlist') { //评论 $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 5); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $data['html'] = $this->fetch('commentlist'); exit(json_encode($data)); } $pre = C('DB_PREFIX'); $id = intval($_GET['id']); $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); //合同ID if ($this->uid) { $invs = M('transfer_borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid} OR borrow_uid={$this->uid})")->find(); if ($invs['id'] > 0) { $invsx = $invs['id']; } elseif (!is_array($invs)) { $invsx = 'no'; } } else { $invsx = 'login'; } $this->assign("invid", $invsx); //合同ID //borrowinfo //$borrowinfo = M("borrow_info")->field(true)->find($id); $borrowinfo = M("transfer_borrow_info b")->join("{$pre}transfer_detail d ON d.borrow_id=b.id")->field(true)->find($id); /*if(!is_array($borrowinfo) || $borrowinfo['is_show'] == 0){ $this->error("数据有误或此标已认购完"); }*/ $borrowinfo['progress'] = getfloatvalue($borrowinfo['transfer_out'] / $borrowinfo['transfer_total'] * 100, 2); $borrowinfo['need'] = getfloatvalue(($borrowinfo['transfer_total'] - $borrowinfo['transfer_out']) * $borrowinfo['per_transfer'], 2); $borrowinfo['updata'] = unserialize($borrowinfo['updata']); $this->assign("vo", $borrowinfo); //此标借款利息还款相关情况 //memberinfo $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find(); $areaList = getArea(); $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']]; $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']]; $this->assign("minfo", $memberinfo); //memberinfo //investinfo $fieldx = "bi.investor_capital,bi.transfer_month,bi.transfer_num,bi.add_time,m.user_name,bi.is_auto,bi.final_interest_rate"; $investinfo = M("transfer_borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->where("bi.borrow_id={$id}")->order("bi.id DESC")->select(); $this->assign("investinfo", $investinfo); //investinfo $oneday = 86400; $time_1 = time() - 30 * $oneday . "," . time(); $time_6 = time() - 180 * $oneday . "," . time(); $time_12 = time() - 365 * $oneday . "," . time(); $mapxr['borrow_id'] = $id; $this->assign("time_all_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['add_time'] = array("between", "{$time_1}"); $this->assign("time_1_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['add_time'] = array("between", "{$time_6}"); $this->assign("time_6_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['add_time'] = array("between", "{$time_12}"); $this->assign("time_12_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr = array(); $mapxr['borrow_id'] = $id; $mapxr['status'] = 2; $this->assign("time_all_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['back_time'] = array("between", "{$time_1}"); $this->assign("time_1_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['back_time'] = array("between", "{$time_6}"); $this->assign("time_6_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['back_time'] = array("between", "{$time_12}"); $this->assign("time_12_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $this->assign("Bconfig", $Bconfig); $this->display(); }
<span class="page-num">/</span> <span class="page-num" id="total-page"></span> </span> <div class="btn-group btn-group-sm" style="margin-left:5px;"> <button class="btn btn-default btn-page disabled" id="btn-prev" data-toggle="tooltip" title="Prev"><i class="fa fa-chevron-left"></i></button> <button class="btn btn-default btn-page" id="btn-next" data-toggle="tooltip" title="Next"><i class="fa fa-chevron-right"></i></button> </div> <?php } ?> </div> </div> <ul class="list-group" id="comment-list-box"> <?php getCommentList($g['dir_module_skin'], $m . $R['uid'], $_where, $c_recnum, $c_sort, $orderby1, $orderby2, $cp); ?> </ul> <p class="list-loader text-center" style="display:none;position:absolute;bottom:100px;left:50%;"><i class="fa fa-spinner fa-spin fa-lg"></i></p> </div> </div> <!-- 코드미러를 먼저 호출하고 난 후에 summernote 호출해야 코드미러가 적용이 됨--> <!-- include summernote codemirror--> <style> .CodeMirror { font-size: 13px; font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important; }
</span> <div class="btn-group btn-group-sm" style="margin-left:5px;"> <button class="btn btn-default btn-page disabled" id="btn-prev" data-toggle="tooltip" title="Prev"><i class="fa fa-chevron-left"></i></button> <button class="btn btn-default btn-page <?php echo $btn_next_disabled; ?> " id="btn-next" data-toggle="tooltip" title="Next"><i class="fa fa-chevron-right"></i></button> </div> <?php } ?> </div> </div> <ul class="list-group" id="comment-list-box"> <?php getCommentList($g['dir_comment_skin'], $d['comment']['parent'], $_where, $c_recnum, $c_sort, $orderby1, $orderby2, $cp); ?> </ul> <p class="list-loader text-center" style="display:none;position:absolute;bottom:100px;left:50%;"><i class="fa fa-spinner fa-spin fa-lg"></i></p> </div> </div> <!-- include summernote css/js--> <?php getImport('summernote', 'dist/summernote.min', false, 'js'); getImport('summernote', 'lang/summernote-ko-KR', false, 'js'); getImport('summernote', 'dist/summernote', false, 'css'); ?> <script type="text/javascript"> //<![CDATA[
public function tdetail() { if ($_GET['type'] == 'commentlist') { //评论 $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 5); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $data['html'] = $this->fetch('commentlist'); exit(json_encode($data)); } $pre = C('DB_PREFIX'); $id = intval($_GET['id']); $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); //合同ID if ($this->uid) { $invs = M('borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid})")->find(); if ($invs['id'] > 0) { $invsx = $invs['id']; } elseif (!is_array($invs)) { $invsx = 'no'; } } else { $invsx = 'login'; } $this->assign("invid", $invsx); //合同ID //borrowinfo //$borrowinfo = M("borrow_info")->field(true)->find($id); $borrowinfo = M("borrow_info bi")->field('bi.*,ac.title,ac.id as aid')->join('lzh_article ac on ac.id= bi.danbao')->where('bi.id=' . $id)->find(); if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) { $this->error("数据有误"); } $borrowinfo['biao'] = $borrowinfo['borrow_times']; $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow']; $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time(); $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2); $this->assign("vo", $borrowinfo); $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find(); $areaList = getArea(); $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']]; $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']]; $memberinfo['zcze'] = $memberinfo['account_money'] + $memberinfo['back_money'] + $memberinfo['money_collect'] + $memberinfo['money_freeze']; $this->assign("minfo", $memberinfo); //data_list $data_list = M("member_data_info")->field('type,add_time,count(status) as num,sum(deal_credits) as credits')->where("uid={$borrowinfo['borrow_uid']} AND status=1")->group('type')->select(); $this->assign("data_list", $data_list); //data_list // 投资记录 $this->investRecord($id); $this->assign('borrow_id', $id); //近期还款的投标 //$time1 = microtime(true)*1000; $history = getDurationCount($borrowinfo['borrow_uid']); $this->assign("history", $history); //$time2 = microtime(true)*1000; //echo $time2-$time1; //investinfo $fieldx = "bi.investor_capital,bi.add_time,m.user_name,bi.is_auto"; $investinfo = M("borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->limit(10)->where("bi.borrow_id={$id}")->order("bi.id DESC")->select(); $this->assign("investinfo", $investinfo); //investinfo //帐户资金情况 $this->assign("investInfo", getMinfo($this->uid, true)); $this->assign("mainfo", getMinfo($borrowinfo['borrow_uid'], true)); $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid'])); //帐户资金情况 //展示资料 $show_list = M("member_borrow_show")->where("uid={$borrowinfo['borrow_uid']}")->order('sort DESC')->select(); $this->assign("show_list", $show_list); //展示资料 //上传资料类型 $upload_type = FilterUploadType(FS("Webconfig/integration")); $this->assign("upload_type", $upload_type); // 上传资料所有类型 //评论 $cmap['tid'] = $id; $clist = getCommentList($cmap, 5); $this->assign("Bconfig", $Bconfig); $this->assign("gloconf", $this->gloconf); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $this->display(); }
public function detail() { if ($_GET['type'] == 'commentlist') { //评论 $cmap['type'] = 2; $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 10); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $data['html'] = $this->fetch('commentlist'); exit(json_encode($data)); } $use = C('DONATE_TYPE'); $vo = M('donate')->find(intval($_GET['id'])); $vo['use'] = $use[$vo['use']]; //评论 $cmap['type'] = 2; $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 10); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $this->assign("vo", $vo); $this->assign("id", intval($_GET['id'])); $this->display(); }
$minuid = getDbCnt($table['s_comment'], 'min(uid)', ''); $uid = $minuid ? $minuid - 1 : 1000000000; $QKEY = "uid,site,parent,parentmbr,display,hidden,notice,name,nic,mbruid,id,pw,subject,content,html,"; $QKEY .= "hit,down,oneline,score1,score2,report,point,d_regis,d_modify,d_oneline,upload,ip,agent,sync,sns,adddata"; $QVAL = "'{$uid}','{$s}','" . $m . $R['uid'] . "','{$parentmbr}','{$display}','{$hidden}','{$notice}','{$name}','{$nic}','{$mbruid}','{$id}','{$pw}','{$subject}','{$content}','{$html}',"; $QVAL .= "'{$hit}','{$down}','{$oneline}','{$score1}','{$score2}','{$report}','{$point}','{$d_regis}','{$d_modify}','{$d_oneline}','{$upload}','{$ip}','{$agent}','{$cync}','','{$adddata}'"; getDbInsert($table['s_comment'], $QKEY, $QVAL); getDbUpdate($table['s_numinfo'], 'comment=comment+1', "date='" . $date['today'] . "' and site=" . $s); if ($point && $my['uid']) { getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $my['uid'] . "','0','" . $point . "','댓글(" . getStrCut($subject, 15, '') . ")포인트','" . $date['totime'] . "'"); getDbUpdate($table['s_mbrdata'], 'point=point+' . $point, 'memberuid=' . $my['uid']); } $_SESSION['xW'] = $uid; if ($snsCallBack && is_file($g['path_module'] . $snsCallBack)) { $xcync = $cync . ',CMT:' . $uid; $orignSubject = strip_tags($subject); $orignContent = getStrCut($orignSubject, 60, '..'); $orignUrl = 'http://' . $_SERVER['SERVER_NAME'] . str_replace('./', '/', getCyncUrl($xcync)) . '#CMT'; include $g['path_module'] . $snsCallBack; if ($snsSendResult) { getDbUpdate($table['s_comment'], "sns='" . $snsSendResult . "'", 'uid=' . $uid); } } } include $theme . 'comment/function.php'; $response = getCommentList($theme, $m . $parent, $_where, $c_recnum, $sort, $orderby1, $orderby2, $cp); echo $response; exit; ?>
public function tdetail() { if ($_GET['type'] == 'commentlist') { //评论 $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 5); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $data['html'] = $this->fetch('commentlist'); exit(json_encode($data)); } $pre = C('DB_PREFIX'); $id = intval($_GET['id']); $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); //合同ID if ($this->uid) { $invs = M('transfer_borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid} OR borrow_uid={$this->uid})")->find(); if ($invs['id'] > 0) { $invsx = $invs['id']; } elseif (!is_array($invs)) { $invsx = 'no'; } } else { $invsx = 'login'; } $this->assign("invid", $invsx); //合同ID //borrowinfo //$borrowinfo = M("borrow_info")->field(true)->find($id); $borrowinfo = M("transfer_borrow_info b")->join("{$pre}transfer_detail d ON d.borrow_id=b.id")->field(true)->find($id); /*if(!is_array($borrowinfo) || $borrowinfo['is_show'] == 0){ $this->error("数据有误或此标已认购完"); }*/ $borrowinfo['progress'] = getfloatvalue($borrowinfo['transfer_out'] / $borrowinfo['transfer_total'] * 100, 2); $borrowinfo['need'] = getfloatvalue(($borrowinfo['transfer_total'] - $borrowinfo['transfer_out']) * $borrowinfo['per_transfer'], 2); $borrowinfo['updata'] = unserialize($borrowinfo['updata']); if ($borrowinfo['danbao'] != 0) { $danbao = M('article')->field('id,title')->where("type_id=7 and id={$borrowinfo['danbao']}")->find(); $borrowinfo['danbao'] = $danbao['title']; //担保机构 $borrowinfo['danbaoid'] = $danbao['id']; } else { $borrowinfo['danbao'] = '暂无担保机构'; //担保机构 } if (time() >= $borrowinfo['deadline'] || $borrowinfo['progress'] == 100) { $borrowinfo['restday'] = 0; $borrowinfo['currentday'] = $borrowinfo['add_time']; } else { $borrowinfo['restday'] = ceil(($borrowinfo['deadline'] - time()) / (24 * 60 * 60)); $borrowinfo['currentday'] = time(); } $now = time(); $borrowinfo['aa'] = floor($borrowinfo['collect_day'] - $now); $borrowinfo['lefttime'] = $borrowinfo['collect_day'] - $now; $borrowinfo['leftday'] = ceil(($borrowinfo['collect_day'] - $now) / 3600 / 24); $borrowinfo['leftdays'] = floor(($borrowinfo['collect_day'] - $now) / 3600 / 24) . '天以上'; $money = 100000; switch ($borrowinfo['repayment_type']) { //收益 case 2: //等额本息 $monthData['duration'] = $borrowinfo['borrow_duration']; $monthData['money'] = $money; $monthData['year_apr'] = $borrowinfo['borrow_interest_rate']; $monthData['type'] = "all"; $repay_detail = EqualMonth($monthData); $borrowinfo['shouyi'] = $repay_detail['repayment_money'] - $money; break; case 4: //每月还息 $monthData['month_times'] = $borrowinfo['borrow_duration']; $monthData['account'] = $money; $monthData['year_apr'] = $borrowinfo['borrow_interest_rate']; $monthData['type'] = "all"; $repay_detail = EqualEndMonth($monthData); $borrowinfo['shouyi'] = $repay_detail['repayment_account'] - $money; break; case 5: //一次性还款 $borrowinfo['shouyi'] = floor($borrowinfo['borrow_interest_rate'] * $money * $borrowinfo['borrow_duration'] / 12) / 100; break; } $this->assign("vo", $borrowinfo); //帐户资金情况 $this->assign("investInfo", getMinfo($this->uid, true)); //帐户资金情况 //此标借款利息还款相关情况 //memberinfo $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*,mm.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->join("{$pre}member_money mm ON mm.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find(); $areaList = getArea(); $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']]; $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']]; $this->assign("minfo", $memberinfo); //memberinfo //investinfo $fieldx = "bi.investor_capital,bi.transfer_month,bi.transfer_num,bi.add_time,m.user_name,bi.is_auto,bi.final_interest_rate"; $investinfo = M("transfer_borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->where("bi.borrow_id={$id}")->order("bi.id DESC")->select(); $this->assign("investinfo", $investinfo); //investinfo $oneday = 86400; $time_1 = time() - 30 * $oneday . "," . time(); $time_6 = time() - 180 * $oneday . "," . time(); $time_12 = time() - 365 * $oneday . "," . time(); $mapxr['borrow_id'] = $id; $this->assign("time_all_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['add_time'] = array("between", "{$time_1}"); $this->assign("time_1_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['add_time'] = array("between", "{$time_6}"); $this->assign("time_6_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['add_time'] = array("between", "{$time_12}"); $this->assign("time_12_out", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr = array(); $mapxr['borrow_id'] = $id; $mapxr['status'] = 2; $this->assign("time_all_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['back_time'] = array("between", "{$time_1}"); $this->assign("time_1_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['back_time'] = array("between", "{$time_6}"); $this->assign("time_6_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); $mapxr['back_time'] = array("between", "{$time_12}"); $this->assign("time_12_back", M("transfer_borrow_investor")->where($mapxr)->sum("transfer_num")); //评论 $cmap['tid'] = $id; $clist = getCommentList($cmap, 5); $this->assign("Bconfig", $Bconfig); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $this->display(); }
//data 배열화 : data=theme+'^^'+parent+'^^'+sort+'^^'+recnum+'^^'+page+'^^'+'+orderby+'^^'+last_cuid; $data_arr = explode('^^', $data); $theme = $data_arr[0]; $parent = $data_arr[1]; $c_sort = $data_arr[2]; $c_recnum = $data_arr[3]; $c_page = $data_arr[4]; $c_orderby = $data_arr[5]; $last_sort = $data_arr[6]; $_where = $c_sort . "<>0"; if ($type == 'more') { if ($c_orderby == 'asc') { $_where .= " and " . $c_sort . ">" . $last_sort; } else { $_where .= " and " . $c_sort . "<" . $last_sort; } } include $theme . 'comment/function.php'; ?> [RESULT: <?php getCommentList($theme, $m . $parent, $_where, $c_recnum, $c_sort, $orderby1, $c_orderby, $c_page); ?> :RESULT] <?php exit; ?>
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT) require ROOT . '/library/preprocessor.php'; $search = isset($_GET['search']) ? $_GET['search'] : $suri['value']; $search = isset($_GET['q']) ? $_GET['q'] : $search; // Consider the common search query GET name. (for compatibility) $list = array('title' => '', 'items' => array(), 'count' => 0); if (strlen($search) > 0 && !empty($suri['page'])) { $listWithPaging = getEntryListWithPagingBySearch($blogid, $search, $suri['page'], $blog['entriesOnList']); $list = array('title' => $search, 'items' => $listWithPaging[0], 'count' => $listWithPaging[1]['total']); $listFeedURL = 'search/' . $search; $paging = $listWithPaging[1]; require ROOT . '/interface/common/blog/begin.php'; require ROOT . '/interface/common/blog/list.php'; } if ($suri['page'] === true || $suri['page'] === '1') { $commentList = getCommentList($blogid, $search); $trackbackList = getTrackbackList($blogid, $search); if (!isset($view)) { require ROOT . '/interface/common/blog/begin.php'; } if (isset($commentList)) { require ROOT . '/interface/common/blog/commentList.php'; } if (isset($trackbackList)) { require ROOT . '/interface/common/blog/trackbackList.php'; } } if ($skinSetting['showListOnSearch'] != 2) { if (!isset($view)) { require ROOT . '/interface/common/blog/begin.php'; }
<?php if (!defined('__KIMS__')) { exit; } $json_data = stripslashes($data); $data_arr = json_decode($json_data, true); $content = $html == 'text' ? strip_tags($data_arr['content']) : $data_arr['content']; $uid = $data_arr['uid']; $theme = $data_arr['theme']; $parent = $data_arr['parent']; $c_sort = $data_arr['c_sort']; $c_recnum = $data_arr['c_recnum']; $c_page = $data_arr['c_page']; $c_orderby = $data_arr['c_orderby']; include $theme . '/_var.php'; include $theme . '/function.php'; getDbUpdate($table['s_comment'], "content='" . $content . "'", 'uid=' . $uid); $response = getCommentList($theme, $parent, $_where, $c_recnum, $c_sort, $c_orderby, $orderby2, $c_page); echo $response; exit;
<?php require 'queries/commentQueries.php'; $PAGE->id = 'commentGet'; //get inputs. requires listId $requiredField = 'blogid'; $input = ''; if (isset($_GET[$requiredField]) && !empty($_GET[$requiredField])) { $input = $_GET[$requiredField]; } else { return errorHandler("missing {$requiredField}", 503); } //setup for query $stmt = getCommentList($DB, $input); if (!$stmt) { return; } // getLists already send error. if (!$stmt->execute()) { return errorHandler("failed to get this list {$stmt->errno}: {$stmt->error}"); } //format results $data = array(); $stmt->bind_result($data['commentId'], $data['commentDate'], $data['commentName'], $data['commentHtml']); /* fetch values */ $listResults = array(); while ($stmt->fetch()) { $row = arrayCopy($data); array_push($listResults, $row); } echo json_encode($listResults);
public function detail() { $vminfo = M('members')->field("user_leve,time_limit")->find($this->uid); if (!($vminfo['user_leve'] > 0 && $vminfo['time_limit'] > time())) { $this->error("请先通过VIP审核再投资", __APP__ . "/member/vip/invest"); } if ($_GET['type'] == 'commentlist') { //评论 $cmap['tid'] = intval($_GET['id']); $clist = getCommentList($cmap, 5); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $data['html'] = $this->fetch('commentlist'); exit(json_encode($data)); } $pre = C('DB_PREFIX'); $id = intval($_GET['id']); $Bconfig = (require C("APP_ROOT") . "Conf/borrow_config.php"); //合同ID if ($this->uid) { $invs = M('borrow_investor')->field('id')->where("borrow_id={$id} AND (investor_uid={$this->uid} OR borrow_uid={$this->uid})")->find(); if ($invs['id'] > 0) { $invsx = $invs['id']; } elseif (!is_array($invs)) { $invsx = 'no'; } } else { $invsx = 'login'; } $this->assign("invid", $invsx); //合同ID //borrowinfo $borrowinfo = M("borrow_info")->field(true)->find($id); if (!is_array($borrowinfo) || $borrowinfo['borrow_status'] == 0 && $this->uid != $borrowinfo['borrow_uid']) { $this->error("数据有误"); } $borrowinfo['biao'] = $borrowinfo['borrow_times']; $borrowinfo['need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_borrow']; $borrowinfo['lefttime'] = $borrowinfo['collect_time'] - time(); $borrowinfo['progress'] = getFloatValue($borrowinfo['has_borrow'] / $borrowinfo['borrow_money'] * 100, 2); $borrowinfo['vouch_progress'] = getFloatValue($borrowinfo['has_vouch'] / $borrowinfo['borrow_money'] * 100, 2); $borrowinfo['vouch_need'] = $borrowinfo['borrow_money'] - $borrowinfo['has_vouch']; $this->assign("vo", $borrowinfo); //borrowinfo //此标借款利息还款相关情况 if ($borrowinfo['repayment_type'] == 2) { $money = 100; $rate = $borrowinfo['borrow_interest_rate']; $month = $borrowinfo['borrow_duration']; $monthData['money'] = $money; $monthData['year_apr'] = $rate; $monthData['duration'] = $month; $monthData['type'] = "all"; $repay_detail = EqualMonth($monthData); $this->assign('repay_detail', $repay_detail); } elseif ($borrowinfo['repayment_type'] == 3) { $money = 100; $rate = $borrowinfo['borrow_interest_rate']; $month = $borrowinfo['borrow_duration']; $monthData['account'] = $money; $monthData['year_apr'] = $rate; $monthData['month_times'] = $month; $monthData['type'] = "all"; $repay_detail = EqualSeason($monthData); $this->assign('repay_detail', $repay_detail); } elseif ($borrowinfo['repayment_type'] == 4) { $money = 100; $rate = $borrowinfo['borrow_interest_rate']; $month = $borrowinfo['borrow_duration']; $parm['month_times'] = $month; $parm['account'] = $money; $parm['year_apr'] = $rate; $parm['type'] = "all"; $repay_detail = EqualEndMonth($parm); $repay_detail['repayment_money'] = $repay_detail['repayment_account']; $this->assign("repay_detail", $repay_detail); } elseif ($borrowinfo['repayment_type'] == 1) { $repay_detail['repayment_money'] = getFloatValue(100 + 100 * $borrowinfo['borrow_interest_rate'] * $borrowinfo['borrow_duration'] / 100, 2); $this->assign('repay_detail', $repay_detail); } //此标借款利息还款相关情况 //memberinfo $memberinfo = M("members m")->field("m.id,m.customer_name,m.customer_id,m.user_name,m.reg_time,m.credits,fi.*,mi.*")->join("{$pre}member_financial_info fi ON fi.uid = m.id")->join("{$pre}member_info mi ON mi.uid = m.id")->where("m.id={$borrowinfo['borrow_uid']}")->find(); $areaList = getArea(); $memberinfo['location'] = $areaList[$memberinfo['province']] . $areaList[$memberinfo['city']]; $memberinfo['location_now'] = $areaList[$memberinfo['province_now']] . $areaList[$memberinfo['city_now']]; $this->assign("minfo", $memberinfo); //memberinfo //vouch_list $vouch_list = M("borrow_vouch")->field(true)->where("borrow_id={$id}")->select(); $this->assign("vouch_list", $vouch_list); $this->assign("Vstatus", array(0 => '担保中', 1 => "担保完成")); //vouch_list //data_list $data_list = M("member_data_info")->field('type,add_time,count(status) as num,sum(deal_credits) as credits')->where("uid={$borrowinfo['borrow_uid']} AND status=1")->group('type')->select(); $this->assign("data_list", $data_list); //data_list //paying_list $paying_list = getMemberBorrow($borrowinfo['borrow_uid']); $this->assign("paying_list", $paying_list); //paying_list //近期还款的投标 //$time1 = microtime(true)*1000; $history = getDurationCount($borrowinfo['borrow_uid']); $this->assign("history", $history); //$time2 = microtime(true)*1000; //echo $time2-$time1; //investinfo $fieldx = "bi.investor_capital,bi.add_time,m.user_name,bi.is_auto"; $investinfo = M("borrow_investor bi")->field($fieldx)->join("{$pre}members m ON bi.investor_uid = m.id")->where("bi.borrow_id={$id}")->order("bi.id DESC")->select(); $this->assign("investinfo", $investinfo); //investinfo //帐户资金情况 $this->assign("mainfo", getMinfo($borrowinfo['borrow_uid'], true)); $this->assign("capitalinfo", getMemberBorrowScan($borrowinfo['borrow_uid'])); //帐户资金情况 //评论 $cmap['tid'] = $id; $cmap['is_audit'] = 1; //审核通过的评论 $clist = getCommentList($cmap, 5); $this->assign("Bconfig", $Bconfig); $this->assign("commentlist", $clist['list']); $this->assign("commentpagebar", $clist['page']); $this->assign("commentcount", $clist['count']); $this->display(); }
<span class="page-num text-danger" id="now-page">1</span> <span class="page-num">/</span> <span class="page-num" id="total-page"></span> </span> <div class="btn-group btn-group-sm" style="margin-left:5px;"> <button class="btn btn-default btn-page disabled" id="btn-prev" data-toggle="tooltip" title="Prev"><i class="fa fa-chevron-left"></i></button> <button class="btn btn-default btn-page" id="btn-next" data-toggle="tooltip" title="Next"><i class="fa fa-chevron-right"></i></button> </div> <?php } ?> </div> </div> <ul class="list-group" id="comment-list-box"> <?php getCommentList($object_id, $g['dir_comment_skin'], $R['uid'], $_where, $c_recnum, $c_sort, $orderby, $cp); ?> </ul> <p class="list-loader text-center" style="display:none;position:absolute;bottom:100px;left:50%;"><i class="fa fa-spinner fa-spin fa-lg"></i></p> </div> </div> <!-- 코드미러를 먼저 호출하고 난 후에 summernote 호출해야 코드미러가 적용이 됨--> <!-- include summernote codemirror--> <style> .CodeMirror { font-size: 13px; font-family: Menlo,Monaco,Consolas,"Courier New",monospace !important; }