admin_paymanage.inc.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
  3. exit('Access Denied');
  4. }
  5. include 'source/plugin/xj_event/include/core.class.php';
  6. $eventcore = new xj_eventcore();
  7. if($_GET['act'] == 'search'){
  8. $keyword = addslashes($_GET['keyword']);
  9. $sqlstr = " AND (D.subject like '%".str_replace(array('%', '*', '_'), array('\%', '%', '\_'), $keyword)."%' OR C.username like '%".str_replace(array('%', '*', '_'), array('\%', '%', '\_'), $keyword)."%')";
  10. $extra = "&keyword=".$_GET['keyword']."&act=search";
  11. }
  12. showsubmenu(lang('plugin/xj_event', 'huodongbaomingzhifuguanli'));
  13. echo '<div><form name="form1" method="post" action="'.ADMINSCRIPT.'?action=plugins&operation=config&do=$pluginid&identifier=xj_event&pmod=admin_paymanage&act=search">'.lang('plugin/xj_event', 'guanjianzi').'<input type="text" name="keyword" value=""> <input type="submit" name="button" id="button" value="'.lang('plugin/xj_event', 'chazhao').'" /></form></div>';
  14. showtableheader(lang('plugin/xj_event', 'huodonggl'));
  15. showtablerow('',array(),array('ID',lang('plugin/xj_event', 'huodongmingcheng'),lang('plugin/xj_event', 'yonghuming'),lang('plugin/xj_event', 'baomingrs'),lang('plugin/xj_event', 'zhifujine'),lang('plugin/xj_event', 'baomingsj'),lang('plugin/xj_event', 'zhifuleixing'),lang('plugin/xj_event','dindanhao'),lang('plugin/xj_event', 'zhifushijian'),''),'');
  16. $ppp = 15; //ÿÌìÊýÁ¿
  17. $page = $_GET['page']?intval($_GET['page']):1;
  18. $count = DB::result_first("SELECT COUNT(*) FROM ".DB::table('xj_eventapply')." A LEFT JOIN ".DB::table('xj_eventpay_log')." B ON A.applyid=B.applyid LEFT JOIN ".DB::table('common_member')." C ON A.uid=C.uid LEFT JOIN ".DB::table('forum_thread')." D ON A.tid=D.tid WHERE A.first=1 AND B.paystate=3 ".$sqlstr);
  19. $query = DB::query("SELECT A.*,B.*,C.username,D.subject FROM ".DB::table('xj_eventapply')." A LEFT JOIN ".DB::table('xj_eventpay_log')." B ON A.applyid=B.applyid LEFT JOIN ".DB::table('common_member')." C ON A.uid=C.uid LEFT JOIN ".DB::table('forum_thread')." D ON A.tid=D.tid WHERE A.first=1 AND B.paystate=3 $sqlstr ORDER BY dateline DESC LIMIT ".(($page - 1) * $ppp).",$ppp");
  20. while($value = DB::fetch($query)) {
  21. if($value['tid']){
  22. $value['subject'] = DB::result_first("SELECT subject FROM ".DB::table('forum_thread')." WHERE tid=".$value['tid']);
  23. }
  24. $value['applynumber'] = $eventcore->GetEventApply($value['tid'],$value['uid']);
  25. if($value['paytype'] == 'alipay'){
  26. $value['paytype'] = lang('plugin/xj_event', 'zhifubao');
  27. }elseif($value['paytype'] == 'wxpay'){
  28. $value['paytype'] = lang('plugin/xj_event', 'weixzf');
  29. }elseif($value['paytype'] == 'tenpay'){
  30. $value['paytype'] = lang('plugin/xj_event', 'caifutong');
  31. }elseif($value['paytype'] == 'appwxpay'){
  32. $value['paytype'] = 'APP'.lang('plugin/xj_event', 'weixzf');
  33. }
  34. showtablerow('', array('class="td25"', 'class="td28"'), array($value['eid'],$value['subject'],$value['username'],$value['applynumber'],$value['total_fee'],dgmdate($value['dateline']),$value['paytype'],$value['tradeno'],dgmdate($value['notify_time'])));
  35. }
  36. showtablefooter();
  37. echo multi($count, $ppp, $page, ADMINSCRIPT."?action=plugins&operation=config&do=$pluginid&identifier=xj_event&pmod=admin_paymanage$extra");
  38. //showsubmit('picsubmit', 'delete', $detail ? 'del' : '', '', $multi);
  39. ?>