'spacecp', 'ac' => 'payment', 'starttime' => $_GET['starttime'], 'endtime' => $_GET['endtime'], 'optype' => $_GET['optype'] ); $theurl = 'home.php?' . url_implode($gets); $multi = ''; $endunixstr = $beginunixstr = 0; if($_GET['starttime']) { $beginunixstr = strtotime($_GET['starttime']); $_GET['starttime'] = dgmdate($beginunixstr, 'Y-m-d'); } if($_GET['endtime']) { $endunixstr = strtotime($_GET['endtime'] . ' 23:59:59'); $_GET['endtime'] = dgmdate($endunixstr, 'Y-m-d'); } if($beginunixstr && $endunixstr && $endunixstr < $beginunixstr) { showmessage('start_time_is_greater_than_end_time'); } $payment_type_data = C::t('common_payment_order')->fetch_type_all($_G['uid']); $optype = ''; if($_GET['optype'] && in_array($_GET['optype'], array_keys($payment_type_data))) { $optype = $_GET['optype']; } $count = C::t('common_payment_order')->count_by_search($_G['uid'], $optype, $beginunixstr, $endunixstr); $order_list = array(); if($count) { foreach(C::t('common_payment_order')->fetch_all_by_search($_G['uid'], $optype, $_GET['starttime'], $_GET['endtime'], '', '', '', $start, $perpage) as $order) { $order['type_name'] = dhtmlspecialchars($order['type_name']); $order['amount'] = number_format($order['amount'] / 100, 2, '.', ','); $order['subject'] = dhtmlspecialchars($order['subject']); $order['description'] = dhtmlspecialchars($order['description']); $order['dateline'] = dgmdate($order['dateline'], 'Y-m-d H:i:s'); $status = $order['status']; if(!$order['status'] && $order['expire_time'] < time()) { $status = 2; } $order['status'] = $status; $order['status_name'] = lang('spacecp', 'payment_status_' . $status); $order_list[] = $order; } } if($count) { $multi = multi($count, $perpage, $page, $theurl); } $optypehtml = ''; include template('home/spacecp_payment_order'); ?>