fetch($orderid)) { showmessage('credits_addfunds_order_invalid'); } C::t('forum_order')->insert(array( 'orderid' => $orderid, 'status' => '1', 'uid' => 0, 'amount' => $amount, 'price' => $price, 'submitdate' => $_G['timestamp'], 'email' => $email, 'ip' => $_G['clientip'], )); include template('common/header_ajax'); echo '
'; include template('common/footer_ajax'); dexit(); } else { showmessage('action_closed', NULL); } } if($_GET['action'] == 'paysucceed' && $_GET['orderid']) { $orderid = $_GET['orderid']; $order = C::t('forum_order')->fetch($orderid); if(!$order) { showmessage('parameters_error'); } $codes = array(); foreach(C::t('common_invite')->fetch_all_orderid($orderid) as $code) { $codes[] = $code['code']; } if(empty($codes)) { showmessage('buyinvitecode_no_id'); } $codetext = implode("\r\n", $codes); } if($_G['group']['maxinviteday']) { $maxinviteday = time() + 86400 * $_G['group']['maxinviteday']; } else { $maxinviteday = time() + 86400 * 10; } $maxinviteday = dgmdate($maxinviteday, 'Y-m-d H:i'); $_G['setting']['inviteconfig']['invitecodeprompt'] = nl2br($_G['setting']['inviteconfig']['invitecodeprompt']); include template('common/buyinvitecode'); ?>