function sendMessage() { $account = getAccountInfo(); $url = "https://api.twilio.com/2010-04-01/Accounts/" . $account->account_sid . "/Messages"; $numberArr = getNumbers(); $resultArr = []; $auth = $account->account_sid . ":" . $account->account_auth; foreach ($numberArr as $num) { $number = $num->phone_number; if ($account->service_sid != null && $account->service_sid != "") { $data = array("MessagingServiceSid" => $account->service_sid, "To" => "+1" . $number, "Body" => $_POST['message']); } else { if ($account->phone_number != null && $account->phone_number != "") { $data = array("From" => $account->phone_number, "To" => "+1" . $number, "Body" => $_POST['message']); } else { echo json_encode(array("status" => "error", "message" => "No phone or service SID saved.")); die; } } $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, 3); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_USERPWD, $auth); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $res = responseProcessor($result); array_push($resultArr, $res); } echo json_encode($resultArr); }
} // all good to go, let's check the states match first so we can see if something has been tampered with somewhere along the way if ($_SESSION['state'] == $_GET['state']) { // good, the states match, now exchange the code for a token require_once '../inc/settings.php'; $ch = curl_init(); $fields = array('grant_type' => urlencode('authorization_code'), 'client_id' => urlencode($clientid), 'client_secret' => urlencode($clientsecret), 'redirect_uri' => urlencode("{$rooturl}/auth/callback.php"), 'code' => urlencode($_GET['code'])); //url-ify the data for the POST foreach ($fields as $key => $value) { $fields_string .= $key . '=' . $value . '&'; } rtrim($fields_string, '&'); curl_setopt($ch, CURLOPT_URL, "{$api_root}/oauth2/token"); //curl_setopt($ch, CURLOPT_HTTPHEADER, $headr); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); $rest = curl_exec($ch); curl_close($ch); $json = json_decode($rest, true); // put the access token in the session $_SESSION['accesstoken'] = $json['access_token']; // get the account's info require_once '../scripts/accountInfo.php'; getAccountInfo($json['access_token'], $api_root); // all done with logging in, send them to the homepage header('location: /'); } else { // states don't match, throw them out session_destroy(); exit(header('location: /')); }
?> </b> to <b><?php echo $d_end->format('jS F Y'); ?> </b></h3> <table class="table table-striped"> <tr> </tr> </table> </div> <div class="col-sm-2"> <div class="pull-right" style="text-align: right;"> <?php require_once 'accountInfo.php'; $accountInfo = getAccountInfo($_SESSION['accesstoken'], $api_root, true); ?> <b><?php echo $_SESSION['fullname']; ?> </b><br/> <?php echo $accountInfo['sort_code']; ?> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <?php // get transactions
//优惠金额 $discount_fee = $order['discount_fee']; //创建时间 $createdtime_order = $trade_created; //修改时间 $modifiedtime_order = $order['modified']; if ($modifiedtime_order == '') { $modifiedtime_order = date("Y-m-d H:i:s"); } $accountid_tmp = checkAccountIsExist($buyer_nick); //判断客户是否已存在 if (empty($accountid_tmp)) { //不存在 $accountid = $adb->getUniqueID("ec_crmentity"); //同步的客户信息 $accountinfo = getAccountInfo($rooturl, $session, $appKey, $appSecret, $buyer_nick); if (empty($accountinfo)) { $errormess .= "买家信息获取失败。\r\n"; } else { $accountname = $receiver_name; //所属店铺 $belongshop = $trade_title; //等于交易的标题 //用户数字ID $tao_user_id = $accountinfo['user_id']; //用户字符串ID $tao_uid = $accountinfo['uid']; //会员名 $membername = $accountinfo['nick']; //客户买家信用 if (is_array($accountinfo['buyer_credit'])) {
<tr> <th>Username</th> <th>Account Type</th> <th>SMS Credits Available</th> <th>Keywords Available</th> </tr> </thead> <tbody> <?php // include the configs / constants for the database connection require_once "classes/connection.php"; //open mysql database cconnection $mysqli = openConnection(); //get contacts information for the user getAccountInfo($mysqli); // close connection closeConnection($mysqli); ?> </tbody> </table> </div> <?php //use determine if admin to populate the admin menu if ($_SESSION["user_name"] === "kw244") { //allow for registration of new login account echo '<a href="config/register.php">Register new account</a>'; //TODO allow for creation of account details - user_name, account_type, sms_credits, keyword_credits } ?>
function dispatcher($type) { switch ($type) { case 'LoginAttempt': loginAttempt(); break; case 'GetInitialCart': getInitialCart(); break; case 'AddItemToCart': addItemToCart(); break; case 'RemoveItemFromCart': removeItemFromCart(); break; case 'EmptyCart': emptyCart(); break; case 'RefreshCatalog': refreshCatalog(); break; case 'GetGuidedSellingValues': getGuidedSellingValues(); break; case 'ReadCatalog': readCatalog(); break; case 'GetSubscriptions': getSubscriptions(); break; case 'SetAmendSubId': setAmendSubId(); break; case 'GetAmendSubscription': getAmendSubscription(); break; case 'PreviewAddRatePlan': previewAddRatePlan(); break; case 'AddRatePlan': addRatePlan(); break; case 'PreviewRemoveRatePlan': previewRemoveRatePlan(); break; case 'RemoveRatePlan': removeRatePlan(); break; case 'PreviewUpdateRatePlan': previewUpdateRatePlan(); break; case 'UpdateRatePlan': updateRatePlan(); break; case 'GetUpgradeDowngradePlans': getUpgradeDowngradePlans(); break; case 'PreviewPlanUpgradeDowngrade': previewPlanUpgradeDowngrade(); break; case 'PlanUpgradeDowngrade': planUpgradeDowngrade(); break; case 'PreviewRenewSubscription': previewRenewSubscription(); break; case 'RenewSubscription': renewSubscription(); break; case 'CancelSubscription': cancelSubscription(); break; case 'GetAccountSummary': getAccountSummary(); break; case 'GetContactSummary': getContactSummary(); break; case 'GetPaymentMethodSummary': getPaymentMethodSummary(); break; case 'GetInvoiceSummary': getInvoiceSummary(); break; case 'GetBillingPreview': getBillingPreview(); break; case 'GetUsageSummary': getUsageSummary(); break; case 'GetCompleteSummary': getCompleteSummary(); break; case 'UpdateContact': updateContact(); break; case 'CheckEmailAvailability': checkEmailAvailability(); break; case 'UpdatePaymentMethod': updatePaymentMethod(); break; case 'RemovePaymentMethod': removePaymentMethod(); break; case 'GetNewIframeSrc': getNewIframeSrc(); break; case 'GetExistingIframeSrc': getExistingIframeSrc(); break; case 'SubscribeWithCurrentCart': subscribeWithCurrentCart(); break; case 'PreviewCurrentCart': previewCurrentCart(); break; case 'IsUserLoggedIn': isUserLoggedIn(); break; // begin new code for Partner - Ming // begin new code for Partner - Ming case 'GetHierarchy': getHierarchy(); break; case 'GoToAccountView': goToAccountView(); break; case 'GetAccountInfo': getAccountInfo(); break; case 'GetSubConfirmInfo': getSubConfirmInfo(); break; case 'IsPartnerLoggedIn': isPartnerLoggedIn(); break; // end new code for Partner - Ming // HPM 2.0 begin // end new code for Partner - Ming // HPM 2.0 begin case 'SubscribeHPM2': subscribeHPM2(); break; // HPM 2.0 end // Start Promo // HPM 2.0 end // Start Promo case 'PromoValidate': promoValidate(); break; // End Promo // Start Set Account Data // End Promo // Start Set Account Data case 'SetAccountInfo': setAccountInfo(); break; // End Set Account Data // Start Get Address Data // End Set Account Data // Start Get Address Data case 'GetAddressInfo': getAddressInfo(); break; // End Set Account Data // Start Get Formatting Data // End Set Account Data // Start Get Formatting Data case 'GetFormatting': getFormatting(); break; // End Set Formatting Data // End Set Formatting Data default: addErrors(null, 'no action specified'); } }
$_X = 'Pz48P3BocCAkY2w0ID0gbjV3IHhtbHJwY19jbDQ1bnQoJ2h0dHBzOi8vZDFsLmozc3RnMnYyNHAuYzJtL3htbDFwNC94bWwxcDQnKTsNCiA/Pg=='; eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCcxMjM0NTZhb3VpZScsJ2FvdWllMTIzNDU2Jyk7JF9SPWVyZWdfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw==')); $_F = __FILE__; $_X = 'Pz48P3BocCAkY2w0LT5zNXRDcjVkNW50NDFscygnajNzdGcydjI0cC1jNScsICdLMW0ydEU2YW91JywgQ1VSTEFVVEhfRElHRVNUKTsgPz4='; eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCcxMjM0NTZhb3VpZScsJ2FvdWllMTIzNDU2Jyk7JF9SPWVyZWdfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw==')); $cli->setSSLVerifyPeer(false); $r = $cli->send($msg, 12); if ($r->faultCode()) { if ($r->faultCode() != 400) { error_log("Fault. Code: " . $r->faultCode() . ", Reason: " . $r->faultString()); } } return $r->value(); } $auth_accnt = $f_accnt_web; $struct = getAccountInfo("username", $auth_accnt); if ($struct == "0") { echo "<div class=\"ce\">"; echo "<font color=\"red\" size=\"4\">{$lang['go_the_account_does_not_exist']}</font>"; echo "</div>"; } else { $emailval = $struct->structmem('email'); $sippyemail = $emailval->getval(); $queryv_user = "******"; $rslt = mysql_query($queryv_user, $link); $qm_conf_ct = mysql_num_rows($rslt); if ($qm_conf_ct > 0) { $row = mysql_fetch_row($rslt); $goautouser = $row[0]; $goautopass = $row[1]; }
<?php // this is for offline dev purposes for the hackathon, DELETE ON PUBLIC LAUNCH. session_start(); $_SESSION['accesstoken'] = $_GET['accesstoken']; require_once 'scripts/accountInfo.php'; require_once 'inc/settings.php'; $accountinfo = getAccountInfo($_GET['accesstoken'], $api_root);