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


PHP full_query函数代码示例

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


在下文中一共展示了full_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";
}
开发者ID:shalintripathi,项目名称:WHMCS-Modules,代码行数:32,代码来源:whmcsreseller.php

示例2: vpsnet_ConfigOptions

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
function vpsnet_ConfigOptions()
{
    if (!mysql_num_rows(full_query("SHOW TABLES LIKE 'mod_vpsnet'"))) {
        $query = "CREATE TABLE `mod_vpsnet` (`relid` INTEGER UNSIGNED NOT NULL,`setting` VARCHAR(45) NOT NULL,`value` VARCHAR(45) NOT NULL,PRIMARY KEY (`relid`,`setting`));";
        full_query($query);
    }
    $creds = vpsnet_GetCredentials();
    if (!$creds['id']) {
        return array("Error" => array("Type" => "x", "Description" => "No VPS.Net Server Config found in Setup > Servers"));
    }
    $verifyauth = vpsnet_call($params, "", "", "GET", "profile");
    if ($verifyauth['success'] != "1") {
        foreach ($verifyauth['errors'] as $errormsg) {
            $verifyautherror .= $errormsg;
        }
        if ($verifyautherror) {
            return array("Error" => array("Type" => "x", "Description" => $verifyautherror));
        }
        return array("Error" => array("Type" => "FailedAuth", "Description" => "Unable to authenticate with Username and Access Hash. Please check Server Config found in Setup > Servers"));
    }
    $resources = vpsnet_call($params, $action, $id, $reqtype = "", $type = "available_clouds");
    $cloudtemplate = ",";
    foreach ($resources['response'] as $resource) {
        $cloudid = $resource['cloud']['id'];
        $cloudlabel = $resource['cloud']['label'];
        foreach ($resource['cloud']['system_templates'] as $system_template) {
            $templateid = $system_template['id'];
            $templatelabel = $system_template['label'];
            $cloudtemplate .= "" . $cloudid . "+" . $templateid . "|" . $cloudlabel . ":" . $templatelabel . ",";
        }
    }
    $cloudtemplate = substr($cloudtemplate, 0, 0 - 1);
    $configarray = array("Number of Nodes" => array("Type" => "text", "Size" => "5"), "Cloud/Template" => array("Type" => "dropdown", "Options" => $cloudtemplate), "Enable Backups" => array("Type" => "yesno", "Description" => "Tick to enable backups"), "Rsync Backups" => array("Type" => "yesno", "Description" => "Tick to enable"), "R1Soft Backups" => array("Type" => "yesno", "Description" => "Tick to enable"), "" => array("Type" => "x", "Description" => ""));
    return $configarray;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:45,代码来源:vpsnet.php

示例3: onlinenic_getConfigArray

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 * */
function onlinenic_getConfigArray()
{
    $query = "CREATE TABLE IF NOT EXISTS `mod_onlinenic` (`id` int(10) NOT NULL auto_increment,`domain` VARCHAR(255) NOT NULL,`lockstatus` BOOL NOT NULL DEFAULT '0',PRIMARY KEY  (`id`),KEY `domainid` (`domain`))";
    $result = full_query($query);
    $configarray = array("FriendlyName" => array("Type" => "System", "Value" => "OnlineNIC"), "Username" => array("Type" => "text", "Size" => "20", "Description" => "Onlinenic ID"), "Password" => array("Type" => "password", "Size" => "20", "Description" => "Password"), "TestMode" => array("Type" => "yesno"), "SyncNextDueDate" => array("Type" => "yesno", "Description", "Tick this box if you want the expiry date sync script to update the expiry and next due dates (cron must be configured)"));
    return $configarray;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:17,代码来源:onlinenic.php

示例4: getAvailableGateways

 public function getAvailableGateways($invoiceid = "")
 {
     $validgateways = array();
     $result = full_query("SELECT DISTINCT gateway, (SELECT value FROM tblpaymentgateways g2 WHERE g1.gateway=g2.gateway AND setting='name' LIMIT 1) AS `name`, (SELECT `order` FROM tblpaymentgateways g2 WHERE g1.gateway=g2.gateway AND setting='name' LIMIT 1) AS `order` FROM `tblpaymentgateways` g1 WHERE setting='visible' AND value='on' ORDER BY `order` ASC");
     while ($data = mysql_fetch_array($result)) {
         $validgateways[$data[0]] = $data[1];
     }
     if ($invoiceid) {
         $disabledgateways = array();
         $result = select_query("tblinvoiceitems", "", array("type" => "Hosting", "invoiceid" => $invoiceid));
         while ($data = mysql_fetch_assoc($result)) {
             $relid = $data['relid'];
             if ($relid) {
                 $result2 = full_query("SELECT pg.disabledgateways AS disabled FROM tblhosting h LEFT JOIN tblproducts p on h.packageid = p.id LEFT JOIN tblproductgroups pg on p.gid = pg.id where h.id = " . (int) $relid);
                 $data2 = mysql_fetch_assoc($result2);
                 $gateways = explode(",", $data2['disabled']);
                 foreach ($gateways as $gateway) {
                     if (array_key_exists($gateway, $validgateways)) {
                         unset($validgateways[$gateway]);
                         continue;
                     }
                 }
             }
         }
     }
     return $validgateways;
 }
开发者ID:billyprice1,项目名称:whmcs,代码行数:27,代码来源:class.gateways.php

示例5: getClients

 public function getClients($criteria = array())
 {
     $filters = $this->buildCriteria($criteria);
     $where = count($filters) ? " WHERE " . implode(" AND ", $filters) : "";
     $result = full_query("SELECT COUNT(*) FROM tbldomains t " . $where);
     $data = mysql_fetch_array($result);
     $this->getPageObj()->setNumResults($data[0]);
     $clients = array();
     $query = "\n\t\t\tSELECT \tt.*, i.subtotal, i.tax, i.status, o.nameservers, o.transfersecret,\n    \t\t\tm.domain AS coza_domain, m.id_doc_storage_name, m.id_doc_type, m.le_doc_storage_name, \n    \t\t\tm.le_doc_type, m.su_doc_storage_name, m.su_doc_type, m.domain_approval_date, m.domain_status\n    \t\tFROM tbldomains t \n    \t\tLEFT JOIN mod_domaincloudregistrar m ON t.domain = m.domain \n    \t\tLEFT JOIN tblorders o ON t.orderid = o.id\n            LEFT JOIN tblinvoices i ON o.invoiceid = i.id" . $where . " ORDER BY " . $this->getPageObj()->getOrderBy() . " " . $this->getPageObj()->getSortDirection() . " LIMIT " . $this->getQueryLimit();
     $result = full_query($query);
     while ($data = mysql_fetch_array($result)) {
         $id = $data['id'];
         $userid = $data['userid'];
         $domain = $data['domain'];
         $id_doc_storage_name = $data['id_doc_storage_name'];
         $le_doc_storage_name = $data['le_doc_storage_name'];
         $su_doc_storage_name = $data['su_doc_storage_name'];
         $registrationdate = $data['registrationdate'];
         $domain_approval_date = $data['domain_approval_date'];
         $status = $data['status'];
         $domain_status = $data['domain_status'];
         $clients[] = array("id" => $id, "userid" => $userid, "domain" => $domain, "id_doc_storage_name" => $id_doc_storage_name, "le_doc_storage_name" => $le_doc_storage_name, "su_doc_storage_name" => $su_doc_storage_name, "registrationdate" => $registrationdate, "domain_approval_date" => $domain_approval_date, "domain_status" => $domain_status, "status" => $status);
     }
     return $clients;
 }
开发者ID:nightkidz,项目名称:whmcs-reseller-modules,代码行数:25,代码来源:DomainDocuments.php

示例6: purchaseorder_get_custom_fields

function purchaseorder_get_custom_fields()
{
    $options = '';
    $request = full_query("SELECT GROUP_CONCAT(fieldname) FROM tblcustomfields where type='client' GROUP BY type");
    $values = mysql_fetch_array($request);
    return $values[0];
}
开发者ID:carriercomm,项目名称:whmcs-purchaseorder,代码行数:7,代码来源:purchaseorder.php

示例7: getClients

 public function getClients($criteria = array())
 {
     global $disable_clients_list_services_summary;
     $clientgroups = $this->getGroups();
     $filters = $this->buildCriteria($criteria);
     $where = count($filters) ? " WHERE " . implode(" AND ", $filters) : "";
     $customfieldjoin = $this->customfieldsfilter ? " INNER JOIN tblcustomfieldsvalues ON tblcustomfieldsvalues.relid=tblclients.id" : "";
     $result = full_query("SELECT COUNT(*) FROM tblclients" . $customfieldjoin . $where);
     $data = mysql_fetch_array($result);
     $this->getPageObj()->setNumResults($data[0]);
     $clients = array();
     $query = "SELECT id,firstname,lastname,companyname,email,datecreated,groupid,status FROM tblclients" . $customfieldjoin . $where . " ORDER BY " . $this->getPageObj()->getOrderBy() . " " . $this->getPageObj()->getSortDirection() . " LIMIT " . $this->getQueryLimit();
     $result = full_query($query);
     while ($data = mysql_fetch_array($result)) {
         $id = $data['id'];
         $firstname = $data['firstname'];
         $lastname = $data['lastname'];
         $companyname = $data['companyname'];
         $email = $data['email'];
         $datecreated = $data['datecreated'];
         $groupid = $data['groupid'];
         $status = $data['status'];
         $datecreated = fromMySQLDate($datecreated);
         $groupcolor = isset($clientgroups[$groupid]['colour']) ? $clientgroups[$groupid]['colour'] . "\"" : "";
         $services = $totalservices = "-";
         if (!$disable_clients_list_services_summary) {
             $result2 = full_query("SELECT (SELECT COUNT(*) FROM tblhosting WHERE userid=tblclients.id AND domainstatus IN ('Active','Suspended'))+(SELECT COUNT(*) FROM tblhostingaddons WHERE hostingid IN (SELECT id FROM tblhosting WHERE userid=tblclients.id) AND status IN ('Active','Suspended'))+(SELECT COUNT(*) FROM tbldomains WHERE userid=tblclients.id AND status IN ('Active')) AS services,(SELECT COUNT(*) FROM tblhosting WHERE userid=tblclients.id)+(SELECT COUNT(*) FROM tblhostingaddons WHERE hostingid IN (SELECT id FROM tblhosting WHERE userid=tblclients.id))+(SELECT COUNT(*) FROM tbldomains WHERE userid=tblclients.id) AS totalservices FROM tblclients WHERE tblclients.id=" . (int) $id . " LIMIT 1");
             $data = mysql_fetch_array($result2);
             $services = $data['services'];
             $totalservices = $data['totalservices'];
         }
         $clients[] = array("id" => $id, "firstname" => $firstname, "lastname" => $lastname, "companyname" => $companyname, "groupid" => $groupid, "groupcolor" => $groupcolor, "email" => $email, "services" => $services, "totalservices" => $totalservices, "datecreated" => $datecreated, "status" => $status);
     }
     return $clients;
 }
开发者ID:billyprice1,项目名称:whmcs,代码行数:35,代码来源:class.clients.php

示例8: adminipwhitelist_activate

function adminipwhitelist_activate()
{
    $query = array();
    $query[0] = "CREATE TABLE `tbladminwhitelist` (\r\n\t\t\t`id` int(11) NOT NULL auto_increment,\r\n\t\t\t`label` varchar(64) NOT NULL,\r\n\t\t\t`ip` varchar(16) NOT NULL,\r\n\t\t\t`timestamp` datetime NOT NULL,\r\n\t\t\tPRIMARY KEY  (`id`));";
    foreach ($query as $q) {
        $r = full_query($q);
    }
}
开发者ID:shalintripathi,项目名称:WHMCS-Modules,代码行数:8,代码来源:adminipwhitelist.php

示例9: pushover_deactivate

function pushover_deactivate()
{
    # Remove Custom DB Table
    $query = "DROP TABLE `mod_pushover`";
    $result = full_query($query);
    # Return Result
    return array('status' => 'success', 'description' => 'WHMCS Pushover Notifications Deactivated.');
}
开发者ID:eunarede,项目名称:whmcs-pushover,代码行数:8,代码来源:pushover.php

示例10: licensing_deactivate

function licensing_deactivate()
{
    $query = "DROP TABLE `mod_licensing`";
    full_query($query);
    $query = "DROP TABLE `mod_licensinglog`";
    full_query($query);
    $query = "DROP TABLE `mod_licensingbans`";
    full_query($query);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:9,代码来源:licensing.php

示例11: mailchimp_activate

function mailchimp_activate()
{
    $query = array();
    $query[0] = "CREATE TABLE `tblmailchimpconf` (\r\n\t\t\t`id` int(11) NOT NULL auto_increment,\r\n\t\t\t`name` varchar(32) NOT NULL,\r\n\t\t\t`value` varchar(1024) default NULL,\r\n\t\t\tPRIMARY KEY  (`id`));";
    $query[1] = "INSERT INTO `tblmailchimpconf` (`id`, `name`, `value`) VALUES\r\n\t\t\t(1, 'apikey', NULL),\r\n\t\t\t(3, 'clientfield', NULL)";
    foreach ($query as $q) {
        $r = full_query($q);
    }
}
开发者ID:shalintripathi,项目名称:WHMCS-Modules,代码行数:9,代码来源:mailchimp.php

示例12: hook_licensing_addon_log_prune

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 * */
function hook_licensing_addon_log_prune($vars)
{
    $logprune = get_query_val("tbladdonmodules", "value", array("module" => "licensing", "setting" => "logprune"));
    if (is_numeric($logprune)) {
        full_query("DELETE FROM mod_licensinglog WHERE datetime<='" . date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - $logprune, date("Y"))) . "'");
    }
    full_query("DELETE FROM mod_licensing WHERE serviceid NOT IN (SELECT id FROM tblhosting)");
    full_query("OPTIMIZE TABLE mod_licensinglog");
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:19,代码来源:hooks.php

示例13: mcs_deactivate

function mcs_deactivate()
{
    # Remove Custom DB Table
    $query = "DROP TABLE `tblmcsapikey`";
    $result = full_query($query);
    # Return Result
    return array('status' => 'success', 'description' => 'If successful, you can return a message to show the user here');
    return array('status' => 'error', 'description' => 'If an error occurs you can return an error message for display here');
    return array('status' => 'info', 'description' => 'If you want to give an info message to a user you can return it here');
}
开发者ID:MCSDevTeam,项目名称:MCS-Server-Module,代码行数:10,代码来源:mcs.php

示例14: websitepanel_sync_upgrade

/**
 * Returns the WebsitePanel Sync configuration options
 *
 * @param $vars array WHMCS parameters
 * @access public
 * @return array
 */
function websitepanel_sync_upgrade($vars)
{
    // Module version
    $version = $vars['version'];
    // Remove the WebsitePanel credentials
    if ($version < 1.2) {
        full_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'websitepanel_sync' AND `setting` = 'username'");
        full_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'websitepanel_sync' AND `setting` = 'password'");
    }
}
开发者ID:lfrauseo,项目名称:Websitepanel,代码行数:17,代码来源:websitepanel_sync.php

示例15: customercreatedby_deactivate

function customercreatedby_deactivate()
{
    # Remove Custom DB Table
    $query = "ALTER TABLE `tblclients` DROP `created_by_admin_id`";
    $result = full_query($query);
    # Return Result
    return array('status' => 'success', 'description' => 'Successfully deactivated this add-on');
    return array('status' => 'error', 'description' => 'Something went wrong!');
    return array('status' => 'info', 'description' => 'Removing this addon');
}
开发者ID:previewict,项目名称:whmcs_customercreatedby_addon,代码行数:10,代码来源:customercreatedby.php


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