本文整理汇总了PHP中update_query函数的典型用法代码示例。如果您正苦于以下问题:PHP update_query函数的具体用法?PHP update_query怎么用?PHP update_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了update_query函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: whmcsreseller_CreateAccount
function whmcsreseller_CreateAccount($params)
{
$clientid = $params['clientsdetails']['userid'];
$serviceid = $params['serviceid'];
$pid = $params['pid'];
switch ($params['configoption1']) {
case "Branding":
$lic_type = "branding";
break;
case "No Branding":
$lic_type = "nobranding";
break;
}
$query = "SELECT id, license FROM whmcsresellerlicenses WHERE user_id IS NULL AND type='{$lic_type}' LIMIT 1";
$data = full_query($query);
if (!mysql_num_rows($data)) {
return "No licenses available to assign";
}
$r = mysql_fetch_array($data);
$lic_id = $r[0];
$lic_str = $r[1];
$res = select_query("tblcustomfields", "*", array("relid" => $pid, "fieldname" => "License"));
if (!mysql_num_rows($res)) {
return "License field not created for product";
} else {
$row = mysql_fetch_assoc($res);
$customfield = $row['id'];
}
update_query("whmcsresellerlicenses", array("user_id" => $clientid, "prod_id" => $serviceid), "id='{$lic_id}'");
full_query("UPDATE tblcustomfieldsvalues SET value='{$lic_str}' WHERE fieldid='{$customfield}' AND relid='{$serviceid}'");
return "success";
}
示例2: widget_staffboard_overview
/**
*
* @ WHMCS FULL DECODED & NULLED
*
* @ Version : 5.2.15
* @ Author : MTIMER
* @ Release on : 2013-12-24
* @ Website : http://www.mtimer.cn
*
* */
function widget_staffboard_overview($vars)
{
global $_ADMINLANG;
$title = "Staff Noticeboard";
$lastviews = get_query_val("tbladdonmodules", "value", array("module" => "staffboard", "setting" => "lastviewed"));
if ($lastviews) {
$lastviews = unserialize($lastviews);
$new = false;
} else {
$lastviews = array();
$new = true;
}
$lastviewed = $lastviews[$_SESSION['adminid']];
$lastviews[$_SESSION['adminid']] = time();
if ($new) {
insert_query("tbladdonmodules", array("module" => "staffboard", "setting" => "lastviewed", "value" => serialize($lastviews)));
} else {
update_query("tbladdonmodules", array("value" => serialize($lastviews)), array("module" => "staffboard", "setting" => "lastviewed"));
}
$numchanged = get_query_val("mod_staffboard", "COUNT(id)", "date>='" . date("Y-m-d H:i:s", $lastviewed) . "'");
$content = "\n<style>\n.staffboardchanges {\n margin: 0 0 5px 0;\n padding: 8px 25px;\n font-size: 1.2em;\n text-align: center;\n}\n.staffboardnotices {\n max-height: 130px;\n overflow: auto;\n border-top: 1px solid #ccc;\n border-bottom: 1px solid #ccc;\n}\n.staffboardnotices div {\n padding: 5px 15px;\n border-bottom: 2px solid #fff;\n}\n.staffboardnotices div.pink {\n background-color: #F3CBF3;\n}\n.staffboardnotices div.yellow {\n background-color: #FFFFC1;\n}\n.staffboardnotices div.purple {\n background-color: #DCD7FE;\n}\n.staffboardnotices div.white {\n background-color: #FAFAFA;\n}\n.staffboardnotices div.pink {\n background-color: #F3CBF3;\n}\n.staffboardnotices div.blue {\n background-color: #A6E3FC;\n}\n.staffboardnotices div.green {\n background-color: #A5F88B;\n}\n</style>\n<div class=\"staffboardchanges\">There are <strong>" . $numchanged . "</strong> New or Updated Staff Notices Since your Last Visit - <a href=\"addonmodules.php?module=staffboard\">Visit Noticeboard »</a></div><div class=\"staffboardnotices\">";
$result = select_query("mod_staffboard", "", "", "date", "DESC");
while ($data = mysql_fetch_array($result)) {
$content .= "<div class=\"" . $data['color'] . "\">" . fromMySQLDate($data['date'], 1) . " - " . (100 < strlen($data['note']) ? substr($data['note'], 0, 100) . "..." : $data['note']) . "</div>";
}
$content .= "</div>";
return array("title" => $title, "content" => $content, "jquerycode" => $jquerycode);
}
示例3: doUnsubscribe
/**
*
* @ WHMCS FULL DECODED & NULLED
*
* @ Version : 5.2.15
* @ Author : MTIMER
* @ Release on : 2013-12-24
* @ Website : http://www.mtimer.cn
*
**/
function doUnsubscribe($email, $key)
{
global $whmcs;
global $_LANG;
$whmcs->get_hash();
if (!$email) {
return $_LANG['pwresetemailrequired'];
}
$result = select_query("tblclients", "id,email,emailoptout", array("email" => $email));
$data = mysql_fetch_array($result);
$userid = $data['id'];
$email = $data['email'];
$emailoptout = $data['emailoptout'];
$newkey = sha1($email . $userid . $cc_encryption_hash);
if ($newkey == $key) {
if (!$userid) {
return $_LANG['unsubscribehashinvalid'];
}
if ($emailoptout == 1) {
return $_LANG['alreadyunsubscribed'];
}
update_query("tblclients", array("emailoptout" => "1"), array("id" => $userid));
sendMessage("Unsubscribe Confirmation", $userid);
logActivity("Unsubscribed From Marketing Emails - User ID:" . $userid, $userid);
return null;
}
return $_LANG['unsubscribehashinvalid'];
}
示例4: paymentwallbrick_capture
function paymentwallbrick_capture($params)
{
if (!class_exists("Paymentwall_Config")) {
require_once dirname(__FILE__) . "/paymentwallbrick/lib/paymentwall.php";
}
if ($params["test_mode"] == "on") {
Paymentwall_Config::getInstance()->set(array('api_type' => Paymentwall_Config::API_GOODS, 'public_key' => $params['test_public_key'], 'private_key' => $params['test_private_key']));
} else {
Paymentwall_Config::getInstance()->set(array('api_type' => Paymentwall_Config::API_GOODS, 'public_key' => $params['public_key'], 'private_key' => $params['private_key']));
}
$email = $params['clientdetails']['email'];
$charge = new Paymentwall_Charge();
if (isset($_POST['brick_token'])) {
$charge->create(array('email' => $email, 'currency' => $params['currency'], 'capture' => true, 'amount' => $params['amount'], 'fingerprint' => $_POST['brick_fingerprint'], 'token' => $_POST['brick_token'], 'plan' => $params["invoiceid"], 'description' => "Payment of Invoice #" . $params['invoiceid']));
update_query("tblclients", array("cardtype" => $charge->card->type, "gatewayid" => $charge->card->token, "cardlastfour" => $charge->card->last4), array("id" => $params['clientdetails']['id']));
} else {
$charge->create(array('token' => $params['gatewayid'], 'email' => $email, 'currency' => $params['currency'], 'capture' => true, 'amount' => $params['amount'], 'plan' => $params["invoiceid"], 'description' => "Payment of Invoice #" . $params['invoiceid']));
}
if ($charge->isSuccessful()) {
if ($charge->isCaptured()) {
return array('status' => 'success', 'transid' => $charge->id);
} elseif ($charge->isUnderReview()) {
$_SESSION['paywall_pending_review'] = true;
$_SESSION['paymentwall_errors'] = "Your payment is currently under review, you will be notified via email within two minutes if your transaction is approved.";
return array('status' => 'error', 'rawdata' => $errors['error']['message']);
}
} else {
$response = $charge->getPublicData();
$errors = json_decode($response, true);
$_SESSION['paymentwall_errors'] = $errors['error']['message'];
return array('status' => 'error', 'rawdata' => $errors['error']['message']);
}
}
示例5: kwspamexperts_CreateAccount
/**
* FUNCTION kwspamexperts_CreateAccount
* Create Account
* @param array $params
* @return string
*/
function kwspamexperts_CreateAccount($params)
{
$api = new kwspamexperts_api($params);
$domain = !empty($params["customfields"]["Domain"]) ? $params["customfields"]["Domain"] : $params['domain'];
$password = !empty($params['password']) ? $params["password"] : createServerPassword();
$email = !empty($params["customfields"]["Email"]) ? $params["customfields"]["Email"] : $params['clientsdetails']['email'];
$archiving = (int) (!empty($params["configoptions"]["archiving"]) && $params["configoptions"]["archiving"]);
// update password
update_query("tblhosting", array("password" => encrypt($password)), array("id" => $params['serviceid']));
// add domain
if (empty($domain)) {
return "Domain cannot be empty. Please enter domain name in Domain field.";
}
$api->call("domain/add/domain/" . $domain . "/");
if ($api->isError()) {
return $api->error();
}
// add email
$api->call("domainuser/add/domain/" . $domain . "/password/" . $password . "/email/" . $email . "/");
if ($api->isError()) {
return $api->error();
}
$outgoing = $params["configoption1"] != 'Incoming' ? 1 : 0;
$incoming = $params["configoption1"] != 'Outgoing' ? 1 : 0;
$api->call("domain/setproducts/domain/" . $domain . "/incoming/" . $incoming . "/outgoing/" . $outgoing . "/archiving/{$archiving}/");
if ($api->isError()) {
return $api->error();
}
$res = kwspamexperts_ChangePackage($params);
if (!$res) {
return $res;
}
return "success";
}
示例6: save
public static function save($account)
{
$params = [':identity' => $account->getIdentity(), ':active_email' => $account->getActiveEmail(), ':type' => $account->getType(), ':oauth_provider' => $account->getOauthProvider(), ':oauth_id' => (string) $account->getOauthId($account->getOauthProvider()), ':account_id' => $account->getId()];
$updated = update_query('update accounts set
account_identity = :identity, active_email = :active_email, type = :type, oauth_provider = :oauth_provider,
oauth_id = :oauth_id
where account_id = :account_id', $params);
return $updated;
}
示例7: insert_ratings
function insert_ratings()
{
$user_id = $_POST["user_id"];
$help_request_id = $_POST["help_request_id"];
$comments = $_POST["comments"];
$rating = $_POST["rating"];
$query = "INSERT into ratings (user_id,help_request_id,comments,rating) values ({$user_id},{$help_request_id},'{$comments}', {$rating}) ";
return update_query($query);
}
示例8: gamecp_CreateAccount
function gamecp_CreateAccount($params)
{
$serviceid = $params['serviceid'];
$pid = $params['pid'];
$producttype = $params['producttype'];
$domain = $params['domain'];
$username = $params['username'];
$password = $params['password'];
$clientsdetails = $params['clientsdetails'];
$customfields = $params['customfields'];
$configoptions = $params['configoptions'];
$configoption1 = $params['configoption1'];
$configoption2 = $params['configoption2'];
$configoption3 = $params['configoption3'];
$configoption4 = $params['configoption4'];
$server = $params['server'];
$serverid = $params['serverid'];
$serverip = $params['serverip'];
$serverusername = $params['serverusername'];
$serverpassword = $params['serverpassword'];
$serveraccesshash = $params['serveraccesshash'];
$serversecure = $params['serversecure'];
if (!$username) {
$username = strtolower($customfields['field_name']);
}
$username = preg_replace("/[^a-z0123456789]/", "", $username);
update_query("tblhosting", array("username" => $username), array("id" => $params['serviceid']));
$args = array("plugin_gamecp_GameCP_URL" => $params['configoption1'], "plugin_gamecp_Connector_Passphrase" => $params['configoption2'], "debugging" => "off");
$unfio = array("action" => "userinfo", "function" => "userinfo", "customerid" => $clientsdetails['userid']);
$userinfo = curl2gcp($args, $unfio);
preg_match_all('/USER: (?P<name>\\w+) ::/', $userinfo, $matches);
if ($matches['name'][0] && $matches['name'][0] != $username) {
update_query("tblhosting", array("username" => $matches['name'][0]), array("id" => $params['serviceid']));
$customfields['field_name'] = $matches['name'][0];
}
preg_match_all('/PASS: (?P<pass>\\w+) ::/', $userinfo, $pwmatch);
if ($pwmatch['pass'][0]) {
update_query("tblhosting", array("password" => encrypt($pwmatch['pass'][0])), array("id" => $params['serviceid']));
$params['password'] = $pwmatch['pass'][0];
}
$urlvars = array("action" => "create", "function" => "createacct", "username" => $customfields['field_name'], "password" => $params['password'], "customerid" => $clientsdetails['userid'], "packageid" => $params['serviceid'], "email_server" => $params['configoption8'], "start_server" => $params['configoption9'], "mark_ip_used" => $params['configoption10'], "emailaddr" => $clientsdetails['email'], "firstname" => $clientsdetails['firstname'], "lastname" => $clientsdetails['lastname'], "address" => $clientsdetails['address1'], "city" => $clientsdetails['city'], "state" => $clientsdetails['state'], "country" => $clientsdetails['country'], "zipcode" => $clientsdetails['postcode'], "phonenum" => $clientsdetails['phonenumber'], "game_id" => $params['configoption3'], "max_players" => $configoptions['field_players'], "pub_priv" => $params['configoption4'], "login_path" => $params['configoption5'], "sv_location" => $customfields['field_location'], "website" => $customfields['field_website'], "hostname" => $customfields['field_hostname'], "motd" => $customfields['field_motd'], "rcon_password" => $customfields['field_rconpw'], "priv_password" => $customfields['field_serverpw'], "addons" => serialize($configoptions));
$args = array("plugin_gamecp_GameCP_URL" => $params['configoption1'], "plugin_gamecp_Connector_Passphrase" => $params['configoption2'], "debugging" => $params['configoption7']);
$r_result = curl2gcp($args, $urlvars);
preg_match_all('/USER: (?P<name>\\w+) ::/', $r_result, $matches);
if ($matches['name'][0] && $matches['name'][0] != $username) {
update_query("tblhosting", array("username" => $matches['name'][0]), array("id" => $params['serviceid']));
$customfields['field_name'] = $matches['name'][0];
}
$result = checkStatus($r_result);
if ($result == "completed") {
$result = "success";
} else {
logModuleCall("gamecp", "create", $_REQUEST, $result);
$result = "There was an error, please check Utilities, Logs, Module Debug Log for more details.";
}
return $result;
}
示例9: noti_output
function noti_output($vars)
{
global $customadminpath, $CONFIG;
$access_token = select_query('tblnoti', '', array('adminid' => $_SESSION['adminid']));
if ($_GET['return'] == '1' && $_SESSION['request_token']) {
$response = curlCall("http://notiapp.com/api/v1/get_access_token", array('app' => $vars['key'], 'request_token' => $_SESSION['request_token']));
$result = json_decode($response, true);
insert_query("tblnoti", array("adminid" => $_SESSION['adminid'], "access_token" => $result['access_token']));
$_SESSION['request_token'] = "";
curlCall("http://notiapp.com/api/v1/add", array('app' => $vars['key'], 'user' => $result['access_token'], "notification[title]" => "WHMCS is ready to go!", "notification[text]" => "You will now receive WHMCS notifications directly to your desktop", "notification[sound]" => "alert1"));
header("Location: addonmodules.php?module=noti");
} elseif ($_GET['setup'] == '1' && !mysql_num_rows($access_token)) {
$response = curlCall("http://notiapp.com/api/v1/request_access", array('app' => $vars['key'], 'redirect_url' => $CONFIG['SystemURL'] . "/" . $customadminpath . "/addonmodules.php?module=noti&return=1"));
$result = json_decode($response, true);
if ($result['request_token'] && $result['redirect_url']) {
$_SESSION['request_token'] = $result['request_token'];
header("Location: " . $result['redirect_url']);
} else {
echo "<div class='errorbox'><strong>Incorrect API Key</strong></br>Incorrect Noti API Key specified.</div>";
}
} elseif ($_GET['disable'] == '1' && mysql_num_rows($access_token)) {
full_query("DELETE FROM `tblnoti` WHERE `adminid` = '" . $_SESSION['adminid'] . "'");
echo "<div class='infobox'><strong>Successfully Disabled Noti</strong></br>You have successfully disabled Noti.</div>";
} elseif (mysql_num_rows($access_token) && $_POST) {
update_query('tblnoti', array('permissions' => serialize($_POST['notification'])), array('adminid' => $_SESSION['adminid']));
echo "<div class='infobox'><strong>Updated Notifications</strong></br>You have successfully updated your notification preferences.</div>";
}
$access_token = select_query('tblnoti', '', array('adminid' => $_SESSION['adminid']));
$result = mysql_fetch_array($access_token, MYSQL_ASSOC);
$permissions = unserialize($result['permissions']);
if (!mysql_num_rows($access_token)) {
echo "<p><a href='addonmodules.php?module=noti&setup=1'>Setup Noti</a></p>";
} else {
echo "<p><a href='addonmodules.php?module=noti&disable=1'>Disable Noti</a></p>";
echo '<form method="POST"><table class="form" width="100%" border="0" cellspacing="2" cellpadding="3">
<tr>
<td class="fieldlabel" width="200px">Notifications</td>
<td class="fieldarea">
<table width="100%">
<tr>
<td valign="top">
<input type="checkbox" name="notification[new_client]" value="1" id="notifications_new_client" ' . ($permissions['new_client'] == "1" ? "checked" : "") . '> <label for="notifications_new_client">New Clients</label><br>
<input type="checkbox" name="notification[new_invoice]" value="1" id="notifications_new_invoice" ' . ($permissions['new_invoice'] == "1" ? "checked" : "") . '> <label for="notifications_new_invoice">Paid Invoices</label><br>
<input type="checkbox" name="notification[new_ticket]" value="1" id="notifications_new_ticket" ' . ($permissions['new_ticket'] == "1" ? "checked" : "") . '> <label for="notifications_new_ticket">New Support Ticket</label><br>
</td>
</tr>
</table>
</table>
<p align="center"><input type="submit" value="Save Changes" class="button"></p></form>
';
}
}
示例10: bluepayremote_capture
function bluepayremote_capture($params)
{
update_query("tblclients", array("cardtype" => "", "cardnum" => "", "expdate" => "", "issuenumber" => "", "startdate" => ""), array("id" => $params['clientdetails']['userid']));
$url = "https://secure.bluepay.com/interfaces/bp20post";
$postfields = array();
$postfields['ACCOUNT_ID'] = $params['bpaccountid'];
$postfields['USER_ID'] = $params['bpuserid'];
$postfields['TRANS_TYPE'] = "SALE";
$postfields['PAYMENT_TYPE'] = "CREDIT";
$postfields['MODE'] = $params['testmode'] ? "TEST" : "LIVE";
$postfields['AMOUNT'] = $params['amount'];
$postfields['INVOICE_ID'] = $params['invoiceid'];
$postfields['NAME1'] = $params['clientdetails']['firstname'];
$postfields['NAME2'] = $params['clientdetails']['lastname'];
$postfields['COMPANY_NAME'] = $params['clientdetails']['companyname'];
$postfields['ADDR1'] = $params['clientdetails']['address1'];
$postfields['ADDR2'] = $params['clientdetails']['address2'];
$postfields['CITY'] = $params['clientdetails']['city'];
$postfields['STATE'] = $params['clientdetails']['state'];
$postfields['ZIP'] = $params['clientdetails']['postcode'];
$postfields['COUNTRY'] = $params['clientdetails']['country'];
$postfields['PHONE'] = $params['clientdetails']['phonenumber'];
$postfields['EMAIL'] = $params['clientdetails']['email'];
if ($params['gatewayid'] && !$params['cardnum']) {
$postfields['MASTER_ID'] = $params['gatewayid'];
$postfields['TAMPER_PROOF_SEAL'] = md5($params['bpsecretkey'] . $params['bpaccountid'] . $postfields['TRANS_TYPE'] . $postfields['AMOUNT'] . $postfields['MASTER_ID'] . $postfields['NAME1'] . $postfields['PAYMENT_ACCOUNT']);
$data = curlCall($url, $postfields);
$result = explode("&", $data);
foreach ($result as $res) {
$res = explode("=", $res);
$resultarray[$res[0]] = $res[1];
}
if ($resultarray['STATUS'] == "1") {
return array("status" => "success", "transid" => $resultarray['TRANS_ID'], "rawdata" => $resultarray);
}
return array("status" => "error", "rawdata" => $resultarray);
}
$postfields['PAYMENT_ACCOUNT'] = $params['cardnum'];
$postfields['CARD_CVV2'] = $params['cccvv'];
$postfields['CARD_EXPIRE'] = $params['cardexp'];
$postfields['TAMPER_PROOF_SEAL'] = md5($params['bpsecretkey'] . $params['bpaccountid'] . $postfields['TRANS_TYPE'] . $postfields['AMOUNT'] . $postfields['MASTER_ID'] . $postfields['NAME1'] . $postfields['PAYMENT_ACCOUNT']);
$data = curlCall($url, $postfields);
$result = explode("&", $data);
foreach ($result as $res) {
$res = explode("=", $res);
$resultarray[$res[0]] = $res[1];
}
if ($resultarray['STATUS'] == "1") {
update_query("tblclients", array("gatewayid" => $resultarray['TRANS_ID']), array("id" => $params['clientdetails']['userid']));
return array("status" => "success", "transid" => $resultarray['TRANS_ID'], "rawdata" => $resultarray);
}
return array("status" => "error", "rawdata" => $resultarray);
}
示例11: request_update
function request_update($index, $update)
{
$sql = update_query($index, $update);
$conn = connect_db();
try {
$stmt = $conn->prepare($sql);
$stmt->execute();
return $stmt;
} catch (PDOException $e) {
echo $sql . "<br>" . $e->getMessage();
}
// end catch
}
示例12: monitis_addon_config
function monitis_addon_config()
{
$configarray = array("name" => "Monitis monitoring", "description" => "Monitis addon for monitoring automation for you and your clients. www.monitis.com", "version" => "1.0", "author" => "Monitis", "logo" => '../modules/addons/monitis_addon/static/img/logo-big.png', "language" => "english", "fields" => array("adminuser" => array("FriendlyName" => "WHMCS Admin", "Type" => "text", "Size" => "25", "Description" => "Username or ID of the admin user under which to execute the WHMCS API call", "Default" => "")));
if (isset($_REQUEST) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'save') {
//&& isset($_REQUEST['msave_monitis_addon']) && $_REQUEST['msave_monitis_addon'] == 'Save Changes') {
$adminuser = $_REQUEST['fields']['monitis_addon']['adminuser'];
MonitisConf::$adminName = MonitisHelper::checkAdminName();
$update = array('admin_name' => MonitisConf::$adminName);
$where = array('client_id' => MONITIS_CLIENT_ID);
update_query('mod_monitis_setting', $update, $where);
}
return $configarray;
}
示例13: updateAddonSettings
public function updateAddonSettings($addonId, $settings, $type)
{
$addon = monitisSqlHelper::objQuery('SELECT * FROM mod_monitis_addon WHERE addon_id=' . $addonId);
if ($addon && count($addon) > 0) {
$value = array('settings' => $settings, 'type' => $type);
$where = array('addon_id' => $addonId);
update_query('mod_monitis_addon', $value, $where);
return 'update';
} else {
$value = array('addon_id' => $addonId, 'type' => $type, 'settings' => $settings, 'status' => 'active');
insert_query('mod_monitis_addon', $value);
return 'create';
}
}
示例14: spamexpertsreseller_CreateAccount
/**
* FUNCTION spamexpertsreseller_CreateAccount
* Create Reseller Account
* @param array $params
* @return string
*/
function spamexpertsreseller_CreateAccount($params)
{
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'class.connection.php';
$api = new spamexperts_api($params);
$domain = !empty($params["customfields"]["Domain"]) ? $params["customfields"]["Domain"] : $params['domain'];
$password = !empty($params['password']) ? $params["password"] : createServerPassword();
$email = !empty($params["customfields"]["Email"]) ? $params["customfields"]["Email"] : $params['clientsdetails']['email'];
$username = !empty($params['username']) ? $params['username'] : uniqid();
$api->call('/reseller/add/username/' . $username . '/password/' . $password . '/email/' . urlencode($email) . '/domainslimit/' . $params['configoption4'] . '/api_usage/' . ($params['configoption5'] == 'on' ? 1 : 0));
if ($api->isSuccess()) {
// update password & username
update_query("tblhosting", array("password" => encrypt($password), "username" => $username), array("id" => $params['serviceid']));
return "success";
} else {
return $api->error();
}
}
示例15: payza_config
/**
*
* @ WHMCS FULL DECODED & NULLED
*
* @ Version : 5.2.15
* @ Author : MTIMER
* @ Release on : 2013-12-24
* @ Website : http://www.mtimer.cn
*
* */
function payza_config()
{
$configarray = array("FriendlyName" => array("Type" => "System", "Value" => "Payza (Formerly Alertpay)"), "email" => array("FriendlyName" => "Login ID", "Type" => "text", "Size" => "20"), "securitycode" => array("FriendlyName" => "Security Code", "Type" => "text", "Size" => "40"), "apipassword" => array("FriendlyName" => "API Password", "Type" => "text", "Size" => "20", "Description" => "Only required for automated refunds"), "testmode" => array("FriendlyName" => "Test Mode", "Type" => "yesno", "Description" => "Tick this to test"));
update_query("tblaccounts", array("gateway" => "payza"), array("gateway" => "alertpay"));
update_query("tblclients", array("defaultgateway" => "payza"), array("defaultgateway" => "alertpay"));
update_query("tbldomains", array("paymentmethod" => "payza"), array("paymentmethod" => "alertpay"));
update_query("tblhosting", array("paymentmethod" => "payza"), array("paymentmethod" => "alertpay"));
update_query("tblhostingaddons", array("paymentmethod" => "payza"), array("paymentmethod" => "alertpay"));
update_query("tblinvoiceitems", array("paymentmethod" => "payza"), array("paymentmethod" => "alertpay"));
update_query("tblinvoices", array("paymentmethod" => "payza"), array("paymentmethod" => "alertpay"));
update_query("tblorders", array("paymentmethod" => "payza"), array("paymentmethod" => "alertpay"));
full_query("UPDATE tblproductgroups SET disabledgateways = REPLACE(disabledgateways, 'alertpay', 'payza')");
update_query("tblpaymentgateways", array("gateway" => "payza"), array("gateway" => "alertpay", "setting" => "email"));
update_query("tblpaymentgateways", array("gateway" => "payza"), array("gateway" => "alertpay", "setting" => "securitycode"));
update_query("tblpaymentgateways", array("gateway" => "payza"), array("gateway" => "alertpay", "setting" => "apipassword"));
update_query("tblpaymentgateways", array("gateway" => "payza"), array("gateway" => "alertpay", "setting" => "testmode"));
delete_query("tblpaymentgateways", array("gateway" => "alertpay"));
return $configarray;
}