当前位置: 首页>>代码示例>>PHP>>正文


PHP delete_query函数代码示例

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


在下文中一共展示了delete_query函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update_gateway_fee2

function update_gateway_fee2($vars)
{
    $paymentmethod = $vars['paymentmethod'];
    delete_query("tblinvoiceitems", "invoiceid='" . $vars[invoiceid] . "' and notes='gateway_fees'");
    $result = select_query("tbladdonmodules", "setting,value", "setting='fee_2_" . $vars['paymentmethod'] . "' or setting='fee_1_" . $vars[paymentmethod] . "'");
    while ($data = mysql_fetch_array($result)) {
        $params[$data[0]] = $data[1];
    }
    $fee1 = $params['fee_1_' . $paymentmethod];
    $fee2 = $params['fee_2_' . $paymentmethod];
    $total = InvoiceTotal($vars['invoiceid']);
    if ($total > 0) {
        $amountdue = $fee1 + $total * $fee2 / 100;
        if ($fee1 > 0 & $fee2 > 0) {
            $d = $fee1 . '+' . $fee2 . "%";
        } elseif ($fee2 > 0) {
            $d = $fee2 . "%";
        } elseif ($fee1 > 0) {
            $d = $fee1;
        }
    }
    if ($d) {
        insert_query("tblinvoiceitems", array("userid" => $_SESSION['uid'], "invoiceid" => $vars[invoiceid], "type" => "Fee", "notes" => "gateway_fees", "description" => getGatewayName2($vars['paymentmethod']) . " Fees ({$d})", "amount" => $amountdue, "taxed" => "0", "duedate" => "now()", "paymentmethod" => $vars[paymentmethod]));
    }
    updateInvoiceTotal($vars[invoiceid]);
}
开发者ID:yashodhank,项目名称:WHMCS-Gateway-Fees,代码行数:26,代码来源:hooks.php

示例2: update_gateway_fee2

function update_gateway_fee2($vars)
{
    $invoice = mysql_fetch_row(mysql_query("SELECT `userid` FROM `tblinvoices` WHERE `id`='" . $vars[invoiceid] . "'"));
    $user = mysql_fetch_row(mysql_query("SELECT `currency` FROM `tblclients` WHERE `id`='" . $invoice[0] . "'"));
    $currency = mysql_fetch_row(mysql_query("SELECT `code` FROM `tblcurrencies` WHERE `id`='" . $user[0] . "'"));
    $paymentmethod = $vars['paymentmethod'];
    delete_query("tblinvoiceitems", "invoiceid='" . $vars[invoiceid] . "' and notes='gateway_fees'");
    $result = select_query("tbladdonmodules", "setting,value", "setting='fee_2_" . $vars['paymentmethod'] . '_' . $currency[0] . "' or setting='fee_1_" . $vars[paymentmethod] . '_' . $currency[0] . "'");
    while ($data = mysql_fetch_array($result)) {
        $params[$data['setting']] = $data['value'];
    }
    $fee1 = $params['fee_1_' . $paymentmethod . '_' . $currency[0]];
    $fee2 = $params['fee_2_' . $paymentmethod . '_' . $currency[0]];
    $total = InvoiceTotal($vars['invoiceid']);
    if ($total > 0) {
        $amountdue = $fee1 + $total * $fee2 / 100;
        if ($fee1 > 0 & $fee2 > 0) {
            $d = $fee1 . '+' . $fee2 . "%";
        } elseif ($fee2 > 0) {
            $d = $fee2 . "%";
        } elseif ($fee1 > 0) {
            $d = $fee1;
        }
    }
    if ($d) {
        insert_query("tblinvoiceitems", array("userid" => $_SESSION['uid'], "invoiceid" => $vars[invoiceid], "type" => "Fee", "notes" => "gateway_fees", "description" => getGatewayName2($vars['paymentmethod']) . " комиссия ({$d}) в " . $currency[0], "amount" => $amountdue, "taxed" => "0", "duedate" => "now()", "paymentmethod" => $vars[paymentmethod]));
    }
    updateInvoiceTotal($vars[invoiceid]);
}
开发者ID:dead23angel,项目名称:WHMCS-Gateway-Fees,代码行数:29,代码来源:hooks.php

示例3: deletePreDefCat

function deletePreDefCat($catid)
{
    $result = select_query("tblticketpredefinedcats", "", array("parentid" => $catid));
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        delete_query("tblticketpredefinedreplies", array("catid" => $id));
        delete_query("tblticketpredefinedcats", array("id" => $id));
        deletePreDefCat($id);
    }
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:10,代码来源:supportticketpredefinedreplies.php

示例4: request_delete

function request_delete($index, $id)
{
    $sql = delete_query($index, $id);
    $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

示例5: 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

示例6: twilio_output

function twilio_output($vars)
{
    $modulelink = $vars['modulelink'];
    global $attachments_dir;
    if (isset($_POST)) {
        switch ($_POST['_a']) {
            case "modconfig":
                $POST = $_POST;
                unset($POST['token']);
                unset($POST['_a']);
                foreach ($POST as $keyname => $value) {
                    $currentval = get_query_val('mod_twilio_config', 'val', 'setting="' . $keyname . '"');
                    if ($currentval != $value) {
                        update_query('mod_twilio_config', array('val' => $value), array('setting' => $keyname));
                    }
                }
                $msg = 'The configuration settings have been successfully saved.';
                break;
            case "modnumbers":
                foreach ($_POST['numberid'] as $nid) {
                    $number = $_POST['number'][$nid];
                    $order = $_POST['order'][$nid];
                    $timeout = $_POST['timeout'][$nid];
                    $delete = $_POST['delete'][$nid];
                    if ($nid != 'NEW') {
                        if ($delete == '1') {
                            delete_query('mod_twilio_numbers', array('id' => $nid));
                        } else {
                            update_query('mod_twilio_numbers', array('number' => $number, 'timeout' => $timeout, 'order' => $order), array('id' => $nid));
                        }
                    } else {
                        if ($number != '') {
                            insert_query('mod_twilio_numbers', array('number' => $number, 'timeout' => $timeout, 'order' => $order));
                        }
                    }
                }
                $msg = 'Your numbers have been successfully modified.';
                break;
            case "uploadaudio":
                if (isset($_FILES)) {
                    $destdir = $attachments_dir . '/twilio';
                    if (!file_exists($destdir)) {
                        mkdir($destdir);
                    }
                    foreach ($_FILES as $keyname => $val) {
                        if ($val['name'] != '') {
                            $curerr = 0;
                            // Check file size
                            if ((int) $val['size'] > 2048000) {
                                $error .= '<br />' . $val['name'] . ' is too large.';
                                $curerr = 1;
                                // Check file type
                            } elseif ($val['type'] != 'audio/mp3' && $val['type'] != 'audio/mpeg') {
                                $error .= '<br />' . $val['name'] . ' is not a valid MP3 file.';
                                $curerr = 1;
                            } else {
                                // File is good
                                $file = $destdir . '/' . $keyname . '.mp3';
                                if (file_exists($file)) {
                                    unlink($file);
                                }
                                if (move_uploaded_file($val['tmp_name'], $file)) {
                                    update_query('mod_twilio_config', array('val' => $file), array('setting' => $keyname));
                                } else {
                                    $error .= '<br />There was an error uploading ' . $val['name'] . '. Please check your error logs.';
                                    $curerr = 1;
                                }
                            }
                            if (!$curerr) {
                                $msg .= '<br />' . $val['name'] . ' has been successfully uploaded.';
                            }
                        }
                    }
                }
                break;
        }
    }
    // Get configured numbers
    $numbers = array();
    $d = select_query('mod_twilio_numbers', '*', array(), 'order', 'ASC');
    while ($res = mysql_fetch_assoc($d)) {
        $numbers[] = array('id' => $res['id'], 'number' => $res['number'], 'timeout' => $res['timeout'], 'order' => $res['order']);
    }
    // Get config values
    $config = array();
    $d = select_query('mod_twilio_config', '*', array());
    while ($res = mysql_fetch_assoc($d)) {
        $setting = $res['setting'];
        $value = $res['val'];
        $config[$setting] = $value;
    }
    // Return to last page
    if (isset($_REQUEST['last'])) {
        $last = $_REQUEST['last'];
    } else {
        $last = '0';
    }
    // Get server.js daemon status
    $timeout = '5.00';
    if ($fp = fsockopen($_SERVER['HTTP_HOST'], $config['client_port'], $errno, $errstr, (double) $timeout)) {
//.........这里部分代码省略.........
开发者ID:shalintripathi,项目名称:WHMCS-Modules,代码行数:101,代码来源:twilio.php

示例7: mediacp_TerminateAccount

function mediacp_TerminateAccount($params)
{
    global $debug;
    $PortBaseArray = explode(":", $params['domain']);
    $PortBase = $PortBaseArray['1'];
    $api['args']['auth'] = $params['configoption1'];
    $api['path'] = $params['configoption2'];
    $api['rpc'] = "admin.service_remove";
    $api['args']['unique_id'] = trim($PortBase);
    $return = mediacp_api($api);
    if ($return['status'] != "success" && $return['error'] != "Could not locate service") {
        return $return['error'];
    }
    delete_query("tblcustomfieldsvalues", array("relid" => (int) $params['serviceid']));
    update_query("tblhosting", array("domain" => $params['domain'] . ":terminated"), array("id" => (int) $params['serviceid']));
    return "success";
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:17,代码来源:mediacp.php

示例8: insert_query

        $validationerror = true;
    } else {
        if ($countrytype == "any") {
            $country = "";
        }
        if ($statetype == "any") {
            $state = "";
        }
        insert_query("tbltax", array("level" => $level, "name" => $name, "state" => $state, "country" => $country, "taxrate" => $taxrate));
        redir();
        exit;
    }
}
if ($action == "delete") {
    check_token("WHMCS.admin.default");
    delete_query("tbltax", array("id" => $id));
    redir();
    exit;
}
$result = select_query("tblconfiguration", "", "");
while ($data = mysql_fetch_array($result)) {
    $setting = $data['setting'];
    $value = $data['value'];
    $CONFIG["" . $setting] = "" . $value;
}
if ($saved) {
    infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc"));
}
echo $infobox;
$aInt->deleteJSConfirm("doDelete", "taxconfig", "delsuretaxrule", "?action=delete&id=");
echo "\n";
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:configtax.php

示例9: exit

if (!defined("WHMCS")) {
    exit("This file cannot be accessed directly");
}
if (!function_exists("pdfInvoice")) {
    require ROOTDIR . "/includes/invoicefunctions.php";
}
if ($_POST['custommessage']) {
    delete_query("tblemailtemplates", array("name" => "Mass Mail Template"));
    insert_query("tblemailtemplates", array("type" => $_POST['customtype'], "name" => "Mass Mail Template", "subject" => html_entity_decode($_POST['customsubject']), "message" => html_entity_decode($_POST['custommessage'])));
    $messagename = "Mass Mail Template";
} else {
    $messagename = $_POST['messagename'];
}
$result = select_query("tblemailtemplates", "COUNT(*)", array("name" => $messagename));
$data = mysql_fetch_array($result);
if (!$data[0]) {
    $apiresults = array("result" => "error", "message" => "Email Template not found");
    return null;
}
if (isset($customvars)) {
    if (!is_array($customvars)) {
        $customvars = unserialize(base64_decode($customvars));
    }
} else {
    $customvars = array();
}
sendMessage($messagename, $_POST['id'], $customvars);
if ($_POST['customtext']) {
    delete_query("tblemailtemplates", array("name" => "Mass Mail Template"));
}
$apiresults = array("result" => "success");
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:sendemail.php

示例10: nominet_ReleaseDomain

function nominet_ReleaseDomain($params)
{
    $nominet = WHMCS_Nominet::init($params);
    if ($nominet->connectAndLogin()) {
        $transfertag = $params['transfertag'];
        $xml = "  <command>\n\t        <update>\n\t\t<r:release\n\t\txmlns:r=\"http://www.nominet.org.uk/epp/xml/std-release-1.0\"\n\t\txsi:schemaLocation=\"http://www.nominet.org.uk/epp/xml/std-release-1.0\n\t\tstd-release-1.0.xsd\">\n\t\t<r:domainName>" . $nominet->getDomain() . ("</r:domainName>\n\t\t<r:registrarTag>" . $transfertag . "</r:registrarTag>\n\t\t</r:release>\n\t\t</update>\n               <clTRID>ABC-12345</clTRID>\n              </command>\n            </epp>");
        $success = $nominet->call($xml);
        if ($success) {
            if ($nominet->isErrorCode()) {
                return array("error" => $nominet->getErrorDesc());
            }
            if ($params['DeleteOnTransfer']) {
                delete_query("tbldomains", array("id" => $params['domainid']));
                return null;
            }
            update_query("tbldomains", array("status" => "Cancelled"), array("id" => $params['domainid']));
            return null;
        }
        return array("error" => $nominet->getLastError());
    }
    return array("error" => $nominet->getLastError());
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:22,代码来源:nominet.php

示例11: update_query

        update_query("tblclients", array("credit" => "+=" . $amountin), array("id" => (int) $userid));
    }
    redir("userid=" . $userid);
    exit;
}
if ($sub == "save") {
    check_token("WHMCS.admin.default");
    update_query("tblaccounts", array("gateway" => $paymentmethod, "date" => toMySQLDate($date), "description" => $description, "amountin" => $amountin, "fees" => $fees, "amountout" => $amountout, "transid" => $transid, "invoiceid" => $invoiceid), array("id" => $id));
    logActivity("Modified Transaction (User ID: " . $userid . " - Transaction ID: " . $id . ")");
    redir("userid=" . $userid);
    exit;
}
if ($sub == "delete") {
    check_token("WHMCS.admin.default");
    checkPermission("Delete Transaction");
    delete_query("tblaccounts", array("id" => $ide));
    logActivity("Deleted Transaction (ID: " . $ide . " - User ID: " . $userid . ")");
    redir("userid=" . $userid);
    exit;
}
ob_start();
if ($action == "") {
    $aInt->deleteJSConfirm("doDelete", "transactions", "deletesure", "clientstransactions.php?userid=" . $userid . "&sub=delete&ide=");
    $currency = getCurrency($userid);
    if ($error == "invalidinvid") {
        infoBox("Check Invoice ID", "The Invoice ID you entered could not be found", "error");
    } else {
        if ($error == "wronguser") {
            infoBox("Check Invoice ID", "The Invoice ID you entered to assign this payment to belongs to a different client", "error");
        }
    }
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:clientstransactions.php

示例12: disableAutoRenew

function disableAutoRenew($domainid)
{
    update_query("tbldomains", array("donotrenew" => "on"), array("id" => $domainid));
    $domainname = get_query_val("tbldomains", "domain", array("id" => $domainid));
    if ($_SESSION['adminid']) {
        logActivity("Admin Disabled Domain Auto Renew - Domain ID: " . $domainid . " - Domain: " . $domainname);
    } else {
        logActivity("Client Disabled Domain Auto Renew - Domain ID: " . $domainid . " - Domain: " . $domainname);
    }
    $result = select_query("tblinvoiceitems", "tblinvoiceitems.id,tblinvoiceitems.invoiceid", array("type" => "Domain", "relid" => $domainid, "status" => "Unpaid", "tblinvoices.userid" => $_SESSION['uid']), "", "", "", "tblinvoices ON tblinvoices.id=tblinvoiceitems.invoiceid");
    while ($data = mysql_fetch_array($result)) {
        $itemid = $data['id'];
        $invoiceid = $data['invoiceid'];
        $result2 = select_query("tblinvoiceitems", "COUNT(*)", array("invoiceid" => $invoiceid));
        $data = mysql_fetch_array($result2);
        $itemcount = $data[0];
        $otheritemcount = 0;
        if (1 < $itemcount) {
            $otheritemcount = get_query_val("tblinvoiceitems", "COUNT(*)", "invoiceid=" . (int) $invoiceid . (" AND id!=" . $itemid . " AND type NOT IN ('PromoHosting','PromoDomain','GroupDiscount')"));
        }
        if ($itemcount == 1 || $otheritemcount == 0) {
            update_query("tblinvoices", array("status" => "Cancelled"), array("id" => $invoiceid));
            logActivity("Cancelled Previous Domain Renewal Invoice - Invoice ID: " . $invoiceid . " - Domain: " . $domainname);
            run_hook("InvoiceCancelled", array("invoiceid" => $invoiceid));
        }
        delete_query("tblinvoiceitems", array("id" => $itemid));
        updateInvoiceTotal($invoiceid);
        logActivity("Removed Previous Domain Renewal Line Item - Invoice ID: " . $invoiceid . " - Domain: " . $domainname);
    }
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:30,代码来源:domainfunctions.php

示例13: select_query

$result = select_query("tblgatewaylog", "data", array("gateway" => "WPIECHODATA" . $invoiceid));
$data = mysql_fetch_array($result);
$echoData = $data['data'];
$result = select_query("tblgatewaylog", "data", array("gateway" => "WPICPDATA" . $invoiceid));
$data = mysql_fetch_array($result);
$cvv = $data['data'];
if (!$echoData) {
    logTransaction("WorldPay Invisible XML Callback", $_REQUEST, "echoData Not Found");
    echo "An Error Occurred. Please Contact Support.";
    exit;
} else {
    logTransaction("WorldPay Invisible XML Callback", $_REQUEST, "Received");
}
delete_query("tblgatewaylog", array("gateway" => "WPIECHODATA" . $invoiceid));
delete_query("tblgatewaylog", array("gateway" => "WPIORDERCODE" . $invoiceid));
delete_query("tblgatewaylog", array("gateway" => "WPICPDATA" . $invoiceid));
getCCVariables($invoiceid);
if ($params['cardtype'] == "American Express") {
    $merchantCode = $params['merchantcodeamex'];
} else {
    $merchantCode = $params['merchantcode1'];
}
$password = $params['merchantpw'];
$instId = $params['instid'];
$cookiestore = $params['cookiestore'];
$orderDescription = "Invoice #" . $params['invoiceid'];
$orderAmount = $params['amount'] * 100;
$raworderAmount = $params['amount'];
$invoiceID = $params['invoiceid'];
$orderShopperEmail = $params['clientdetails']['email'];
$orderShopperID = $params['clientdetails']['userid'];
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:worldpayinvisiblexml.php

示例14: select_query

    echo ">" . $user . "</option>";
}
echo "</select></td></tr>\n<tr><td class=\"fieldlabel\">";
echo $aInt->lang("fields", "description");
echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"description\" value=\"";
echo $description;
echo "\" size=\"80\"></td><td class=\"fieldlabel\">";
echo $aInt->lang("fields", "ipaddress");
echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"ipaddress\" value=\"";
echo $ipaddress;
echo "\" size=\"20\"></td></tr>\n</table>\n\n<img src=\"images/spacer.gif\" height=\"10\" width=\"1\"><br>\n<div align=\"center\"><input type=\"submit\" value=\"";
echo $aInt->lang("system", "filterlog");
echo "\" class=\"button\"></div>\n\n</form>\n\n  </div>\n</div>\n\n<br />\n\n";
$result = select_query("tblactivitylog", "", "userid=0", "id", "DESC", $CONFIG['ActivityLimit'] . ",9999");
while ($data = mysql_fetch_array($result)) {
    delete_query("tblactivitylog", array("id" => $data['id']));
}
$aInt->sortableTableInit("date");
$where = "";
if ($date) {
    $where .= " AND date>'" . toMySQLDate($date) . "' AND date<='" . toMySQLDate($date) . "235959'";
}
if ($username) {
    $where .= " AND user='" . db_escape_string($username) . "'";
}
if ($description) {
    $where .= " AND description LIKE '%" . db_escape_string($description) . "%'";
}
if ($ipaddress) {
    $where .= " AND ipaddr='" . db_escape_string($ipaddress) . "'";
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:systemactivitylog.php

示例15: array

        }
        $table = "tblcontacts";
        $array = array("firstname" => $firstname, "lastname" => $lastname, "companyname" => $companyname, "email" => $email, "address1" => $address1, "address2" => $address2, "city" => $city, "state" => $state, "postcode" => $postcode, "country" => $country, "phonenumber" => $phonenumber, "subaccount" => $subaccount, "permissions" => $permissions, "domainemails" => $domainemails, "generalemails" => $generalemails, "invoiceemails" => $invoiceemails, "productemails" => $productemails, "supportemails" => $supportemails, "affiliateemails" => $affiliateemails);
        if ($password && $password != $aInt->lang("fields", "entertochange")) {
            $array['password'] = generateClientPW($password);
        }
        $where = array("id" => $contactid);
        update_query($table, $array, $where);
        run_hook("ContactEdit", array_merge(array("userid" => $userid, "contactid" => $contactid, "olddata" => $oldcontactdata), $array));
    }
    redir("userid=" . $userid . "&contactid=" . $contactid);
    exit;
}
if ($action == "delete") {
    check_token("WHMCS.admin.default");
    delete_query("tblcontacts", array("id" => $contactid, "userid" => $userid));
    update_query("tblclients", array("billingcid" => ""), array("id" => $userid, "billingcid" => $contactid));
    run_hook("ContactDelete", array("userid" => $userid, "contactid" => $contactid));
    redir("userid=" . $userid);
    exit;
}
ob_start();
if ($error) {
    infoBox($aInt->lang("global", "validationerror"), $error);
    echo $infobox;
}
echo "\n<form action=\"";
echo $_SERVER['PHP_SELF'];
echo "\" method=\"get\">\n<input type=\"hidden\" name=\"userid\" value=\"";
echo $userid;
echo "\">\n";
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:clientscontacts.php


注:本文中的delete_query函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。