if (is_equal(false, $result)) { return array('template' => 'error', 'error_msg' => 'Could not fetch domain details. Go back and try again.'); } $result = json_decode($result, true); $exp_date = $result['endtime']; $invoice_option = $req['form']['invoice_option']; $years = $req['form']['years']; $request = "https://test.httpapi.com/api/domains/renew.json?{$auth_params}&order-id={$orderid}&years={$years}&exp-date={$exp_date}&invoice-option={$invoice_option}"; $result = file_get_contents($request); if (is_equal(false, $result)) { return array('template' => 'error', 'error_msg' => 'Could not perform action. Go back and try again.'); } return array('result' => 'Action performed successfully.'); } handle_get('/apps/gappsconf', 'auth_filter', afunc_returning(array('template' => 'gappsconf_form'))); handle_post(array('/apps/gappsconf', 'action' => 'configure_dns'), 'gappsconf'); function gappsconf($req) { /* The following DNS recrods are added: MX 10 ASPMX.L.GOOGLE.COM MX 20 ALT1.ASPMX.L.GOOGLE.COM MX 20 ALT2.ASPMX.L.GOOGLE.COM MX 30 ASPMX2.GOOGLEMAIL.COM MX 30 ASPMX3.GOOGLEMAIL.COM MX 30 ASPMX4.GOOGLEMAIL.COM MX 30 ASPMX5.GOOGLEMAIL.COM calendar CNAME ghs.google.com docs CNAME ghs.google.com mail CNAME ghs.google.com sites CNAME ghs.google.com */
$team_id = 11; $fund = 100; $attendees_member_id = [1, 2, 3, 4, 5, 6, 7]; $reset_code = "1234"; $password1 = "anshul"; $password2 = "anshul"; $message = "debug"; } // Handle Methods try { switch ($method) { case 'PUT': handle_put($query, $member_id, $email, $official_dob, $first_name, $last_name); break; case 'POST': handle_post($query, $team_name, $team_admin_id, $email, $password, $official_dob, $first_name, $last_name, $team_id, $member_id, $fund, $birthday_of_member_id, $cake_amount, $other_expense, $celebration_date, $attendees_member_id, $reset_code, $password1, $password2, $message); break; case 'GET': handle_get($query, $val, $subquery); break; case "DELETE": handle_delete($query, $val, $subquery); break; default: //handle_error($query,$val,$subquery); break; } } catch (Exception $e) { echo "here"; } // Handle Get Requests
// return the User object for the logged-in user. // DEPRECATED: just use PA::$login_user now! function get_login_user() { return PA::$login_user; } // return the User object of the uid specified by the user // DEPRECATED: just use PA::$page_user now. function get_page_user() { return PA::$page_user; } // return a User object for the uid specified by the user, or if none, for the logged in user // DEPRECATED: just use PA::$user now. function get_user() { return PA::$user; } // Various functions return this object to indicate that the user // should be redirected somewhere. (For an example, see // web/cnuser_register.php). class PA_Redirect { function __construct($url) { $this->url = $url; } } // For form handling handle_post();