• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP update_query函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中update_query函数的典型用法代码示例。如果您正苦于以下问题:PHP update_query函数的具体用法?PHP update_query怎么用?PHP update_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了update_query函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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";
}
开发者ID:shalintripathi,项目名称:WHMCS-Modules,代码行数:32,代码来源:whmcsreseller.php


示例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 &raquo;</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);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:38,代码来源:hooks.php


示例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'];
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:38,代码来源:unsubscribe.php


示例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']);
    }
}
开发者ID:VPNht,项目名称:brick-whmcs,代码行数:33,代码来源:paymentwallbrick.php


示例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";
}
开发者ID:digideskio,项目名称:whmcs-addon,代码行数:40,代码来源:kwspamexperts.php


示例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;
    }
开发者ID:reillo,项目名称:ninjawars,代码行数:9,代码来源:AccountFactory.php


示例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);
}
开发者ID:ppatodia,项目名称:blinx,代码行数:9,代码来源:acceptance.php


示例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;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:57,代码来源:gamecp.php


示例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>
  ';
    }
}
开发者ID:carriercomm,项目名称:whmcs-noti,代码行数:54,代码来源:noti.php


示例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);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:53,代码来源:bluepayremote.php


示例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
}
开发者ID:saeedadabi,项目名称:Jerkoop-CMS,代码行数:13,代码来源:function_sidu.php


示例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;
}
开发者ID:carriercomm,项目名称:WHMCS,代码行数:13,代码来源:monitis_addon.php


示例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';
     }
 }
开发者ID:carriercomm,项目名称:WHMCS,代码行数:14,代码来源:addons.php


示例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();
    }
}
开发者ID:digideskio,项目名称:whmcs-addon,代码行数:23,代码来源:spamexpertsreseller.php


示例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;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:29,代码来源:payza.php


示例16: authorizecim_capture

function authorizecim_capture($params)
{
    if ($params['testmode']) {
        $url = "https://apitest.authorize.net/xml/v1/request.api";
    } else {
        $url = "https://api.authorize.net/xml/v1/request.api";
    }
    $gatewayids = explode(",", $params['gatewayid']);
    if (!$gatewayids[0]) {
        return array("status" => "error", "rawdata" => "No Client Profile ID Found");
    }
    if (!$gatewayids[1]) {
        return array("status" => "error", "rawdata" => "No Client Payment Profile ID Found");
    }
    $storednameaddresshash = $gatewayids[2];
    $nameaddresshash = md5($params['clientdetails']['firstname'] . $params['clientdetails']['lastname'] . $params['clientdetails']['address1'] . $params['clientdetails']['city'] . $params['clientdetails']['state'] . $params['clientdetails']['postcode'] . $params['clientdetails']['country']);
    if ($nameaddresshash != $storednameaddresshash) {
        $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<getCustomerPaymentProfileRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n<merchantAuthentication>\n<name>" . $params['loginid'] . "</name>\n<transactionKey>" . $params['transkey'] . "</transactionKey>\n</merchantAuthentication>\n<customerProfileId>" . $gatewayids[0] . "</customerProfileId>\n<customerPaymentProfileId>" . $gatewayids[1] . "</customerPaymentProfileId>\n</getCustomerPaymentProfileRequest>";
        $data = curlCall($url, $xml, array("HEADER" => array("Content-Type: text/xml")));
        $xmldata = XMLtoArray($data);
        $cardnum = $xmldata['GETCUSTOMERPAYMENTPROFILERESPONSE']['PAYMENTPROFILE']['PAYMENT']['CREDITCARD']['CARDNUMBER'];
        $expdate = $xmldata['GETCUSTOMERPAYMENTPROFILERESPONSE']['PAYMENTPROFILE']['PAYMENT']['CREDITCARD']['EXPIRATIONDATE'];
        $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<updateCustomerPaymentProfileRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n<merchantAuthentication>\n<name>" . $params['loginid'] . "</name>\n<transactionKey>" . $params['transkey'] . "</transactionKey>\n</merchantAuthentication>\n<customerProfileId>" . $gatewayids[0] . "</customerProfileId>\n<paymentProfile>\n<billTo>\n<firstName><![CDATA[" . $params['clientdetails']['firstname'] . "]]></firstName>\n<lastName><![CDATA[" . $params['clientdetails']['lastname'] . "]]></lastName>\n<company><![CDATA[" . $params['clientdetails']['companyname'] . "]]></company>\n<address><![CDATA[" . $params['clientdetails']['address1'] . "]]></address>\n<city><![CDATA[" . $params['clientdetails']['city'] . "]]></city>\n<state><![CDATA[" . $params['clientdetails']['state'] . "]]></state>\n<zip><![CDATA[" . $params['clientdetails']['postcode'] . "]]></zip>\n<country><![CDATA[" . $params['clientdetails']['country'] . "]]></country>\n<phoneNumber>" . $params['clientdetails']['phonenumber'] . "</phoneNumber>\n<faxNumber></faxNumber>\n</billTo>\n<payment>\n<creditCard>\n<cardNumber>" . $cardnum . "</cardNumber>\n<expirationDate>" . $expdate . "</expirationDate>\n</creditCard>\n</payment>\n<customerPaymentProfileId>" . $gatewayids[1] . "</customerPaymentProfileId>\n</paymentProfile>\n</updateCustomerPaymentProfileRequest>";
        $data = curlCall($url, $xml, array("HEADER" => array("Content-Type: text/xml")));
        logTransaction("Authorize.net CIM Remote Storage", $data, "Address Update");
        $gatewayids[2] = $nameaddresshash;
        update_query("tblclients", array("gatewayid" => implode(",", $gatewayids)), array("id" => $params['clientdetails']['userid']));
    }
    $xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<createCustomerProfileTransactionRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n<merchantAuthentication>\n<name>" . $params['loginid'] . "</name>\n<transactionKey>" . $params['transkey'] . "</transactionKey>\n</merchantAuthentication>\n<transaction>\n<profileTransAuthCapture>\n<amount>" . $params['amount'] . "</amount>\n<customerProfileId>" . $gatewayids[0] . "</customerProfileId>\n<customerPaymentProfileId>" . $gatewayids[1] . "</customerPaymentProfileId>\n<order>\n<invoiceNumber>" . $params['invoiceid'] . "</invoiceNumber>\n</order>\n<recurringBilling>false</recurringBilling>\n";
    if ($params['cccvv']) {
        $xml .= "<cardCode>" . $params['cccvv'] . "</cardCode>\n";
    }
    $xml .= "</profileTransAuthCapture>\n</transaction>\n<extraOptions><![CDATA[x_customer_ip=" . $remote_ip . "]]></extraOptions>\n</createCustomerProfileTransactionRequest>";
    $data = curlCall($url, $xml, array("HEADER" => array("Content-Type: text/xml")));
    $xmldata = XMLtoArray($data);
    if ($xmldata['CREATECUSTOMERPROFILETRANSACTIONRESPONSE']['MESSAGES']['RESULTCODE'] == "Ok") {
        $transid = $xmldata['CREATECUSTOMERPROFILETRANSACTIONRESPONSE']['DIRECTRESPONSE'];
        $transid = explode(",", $transid);
        $transid = $transid[6];
        return array("status" => "success", "transid" => $transid, "rawdata" => $data);
    }
    return array("status" => "error", "rawdata" => $data);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:43,代码来源:authorizecim.php


示例17: hostguard_terminateaccount

function hostguard_terminateaccount($params)
{
    $function = 'server/destroy';
    $fields = array('ctid' => $params['customfields']['ctid'], 'vserverid' => $params['customfields']['vserverid']);
    if (intval($fields['ctid']) != 0) {
        unset($fields['vserverid']);
    } else {
        unset($fields['ctid']);
    }
    $result = hostguard_makecall($params, $function, $fields);
    if ($result['destroyed'] == true) {
        $result = "success";
        $query = select_query('tblcustomfields', 'id', array('relid' => $params['pid'], 'fieldname' => 'vserverid'));
        $field = mysql_fetch_assoc($query);
        update_query('tblcustomfieldsvalues', array('value' => ''), array('fieldid' => $field['id'], 'relid' => $params['serviceid']));
        update_query('tblhosting', array('dedicatedip' => '', 'username' => ''), array('id' => $params['serviceid']));
    } else {
        $result = "Could not terminate VPS...";
    }
    return $result;
}
开发者ID:HostGuard,项目名称:whmcs-module,代码行数:21,代码来源:hostguard.php


示例18: paypalexpress_orderformcheckout

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP update_recently_edited函数代码示例发布时间:2022-05-23
下一篇:
PHP update_progress_bar函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap