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

PHP get_query_vals函数代码示例

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

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



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

示例1: hook_project_management_adminticketinfo

function hook_project_management_adminticketinfo($vars)
{
    global $aInt;
    global $jscode;
    global $jquerycode;
    $ticketid = $vars['ticketid'];
    $ticketdata = get_query_vals("tbltickets", "userid,title,tid", array("id" => $ticketid));
    $tid = $ticketdata['tid'];
    require ROOTDIR . "/modules/addons/project_management/project_management.php";
    $projectrows = "";
    $result = select_query("mod_project", "mod_project.*,(SELECT CONCAT(firstname,' ',lastname) FROM tbladmins WHERE id=mod_project.adminid) AS adminname", "ticketids LIKE '%" . mysql_real_escape_string($tid) . "%'");
    while ($data = mysql_fetch_array($result)) {
        $timerid = get_query_val("mod_projecttimes", "id", array("projectid" => $data['id'], "end" => "", "adminid" => $_SESSION['adminid']), "start", "DESC");
        $timetrackinglink = $timerid ? "<a href=\"#\" onclick=\"projectendtimer('" . $data['id'] . "');return false\"><img src=\"../modules/addons/project_management/images/notimes.png\" align=\"absmiddle\" border=\"0\" /> Stop Tracking Time</a>" : "<a href=\"#\" onclick=\"projectstarttimer('" . $data['id'] . "');return false\"><img src=\"../modules/addons/project_management/images/starttimer.png\" align=\"absmiddle\" border=\"0\" /> Start Tracking Time</a>";
        $projectrows .= "<tr><td><a href=\"addonmodules.php?module=project_management&m=view&projectid=" . $data['id'] . "\">" . $data['id'] . "</a></td><td><a href=\"addonmodules.php?module=project_management&m=view&projectid=" . $data['id'] . "\">" . $data['title'] . "</a> <span id=\"projecttimercontrol" . $data['id'] . "\" class=\"tickettimer\">" . $timetrackinglink . "</span></td><td>" . $data['adminname'] . "</td><td>" . fromMySQLDate($data['created']) . "</td><td>" . fromMySQLDate($data['duedate']) . "</td><td>" . fromMySQLDate($data['lastmodified']) . "</td><td>" . $data['status'] . "</td></tr>";
    }
    $code = "<link href=\"../modules/addons/project_management/css/style.css\" rel=\"stylesheet\" type=\"text/css\" />\n\n<div id=\"projectscont\" style=\"margin:0 0 10px 0;padding:5px;border:2px dashed #e0e0e0;background-color:#fff;-moz-border-radius: 6px;-webkit-border-radius: 6px;-o-border-radius: 6px;border-radius: 6px;" . ($projectrows ? "" : "display:none;") . "\">\n\n<h2 style=\"margin:0 0 5px 0;text-align:center;background-color:#f2f2f2;-moz-border-radius: 6px;-webkit-border-radius: 6px;-o-border-radius: 6px;border-radius: 6px;\">Projects</h2>\n\n<div class=\"tablebg\" style=\"padding:0 20px;\">\n<table class=\"datatable\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\" id=\"ticketprojectstbl\">\n<tr><th>Project ID</th><th>Title</th><th>Assigned To</th><th>Created</th><th>Due Date</th><th>Last Updated</th><th>Status</th></tr>\n" . $projectrows . "\n</table>\n</div>\n\n</div>\n\n";
    if (project_management_checkperm("Create New Projects")) {
        $code .= "<span style=\"float:right;padding:0 50px 15px 0;\"><a href=\"#\" onclick=\"createnewproject();return false\" class=\"create\"><img src=\"images/icons/add.png\" align=\"top\" border=\"0\" /> <b>Create New Project</b></a></span>";
    }
    $code .= "\n<script>\n\$(document).on(\"keyup\",\"#cpclientname\",function () {\n\tvar ticketuseridsearchlength = \$(\"#cpclientname\").val().length;\n\tif (ticketuseridsearchlength>2) {\n\t\$.post(\"search.php\", { ticketclientsearch: 1, value: \$(\"#cpclientname\").val() },\n\t    function(data){\n            if (data) {\n                \$(\"#cpticketclientsearchresults\").html(data.replace(\"searchselectclient(\",\"projectsearchselectclient(\"));\n                \$(\"#cpticketclientsearchresults\").slideDown(\"slow\");\n                \$(\"#cpclientsearchcancel\").fadeIn();\n            }\n        });\n\t}\n});\nfunction projectsearchselectclient(userid,name,email) {\n    \$(\"#cpclientname\").val(name);\n    \$(\"#cpuserid\").val(userid);\n    \$(\"#cpclientsearchcancel\").fadeOut();\n\t\$(\"#cpticketclientsearchresults\").slideUp(\"slow\");\n}\n\nfunction createnewproject() {\n\t\$(\"#popupcreatenew\").show();\n\t\$(\"#popupstarttimer\").hide();\n\t\$(\"#popupendtimer\").hide();\n\t\$(\"#createnewcont\").slideDown();\n}\nfunction createproject() {\n\tinputs = \$(\"#ajaxcreateprojectform\").serializeArray();\n\t\$.post(\"addonmodules.php?module=project_management&createproj=1&ajax=1\", { input : inputs },\n\t\tfunction (data) {\n\t\t\tif(data == \"0\"){\n\t\t\t\talert(\"You do not have permission to create project\");\n\t\t\t} else {\n\t\t\t\t\$(\"#createnewcont\").slideUp();\n                \$(\"#ticketprojectstbl\").append(data);\n\t\t\t\t\$(\"#projectscont\").slideDown();\n\t\t\t}\n\t\t});\n}\n\nfunction projectstarttimer(projectid) {\n    \$(\"#ajaxstarttimerformprojectid\").val(projectid);\n\t\$(\"#popupcreatenew\").hide();\n\t\$(\"#popupstarttimer\").show();\n\t\$(\"#popupendtimer\").hide();\n\t\$(\"#createnewcont\").slideDown();\n}\n\nfunction projectendtimer(projectid) {\n\t\$(\"#popupcreatenew\").hide();\n\t\$(\"#popupstarttimer\").hide();\n\t\$(\"#popupendtimer\").show();\n\t\$(\"#createnewcont\").slideDown();\n}\n\nfunction projectstarttimersubmit() {\n\t\$.post(\"addonmodules.php?module=project_management&m=view\", \"a=hookstarttimer&\"+\$(\"#ajaxstarttimerform\").serialize(),\n\t\tfunction (data) {\n\t\t\tif(data == \"0\"){\n\t\t\t\talert(\"Could not start timer.\");\n\t\t\t} else {\n\t\t\t\t\$(\"#createnewcont\").slideUp();\n                var projid = \$(\"#ajaxstarttimerformprojectid\").val();\n\t\t\t\t\$(\"#projecttimercontrol\"+projid).html(\"<a href=\"//\" onclick=\"projectendtimer('\"+projid+\"');return false\"><img src=\"../modules/addons/project_management/images/notimes.png\" align=\"absmiddle\" border=\"0\" /> Stop Tracking Time</a>\");\n\t\$(\"#activetimers\").html(data);\n\t\t\t}\n\t\t});\n}\nfunction projectendtimersubmit(projectid,timerid) {\n\t\$.post(\"addonmodules.php?module=project_management&m=view\", \"a=hookendtimer&timerid=\"+timerid+\"&ticketnum=" . $tid . "\",\n\t\tfunction (data) {\n\t\t\tif (data == \"0\") {\n\t\t\t\talert(\"Could not stop timer.\");\n\t\t\t} else {\n\t\t\t\t\$(\"#createnewcont\").slideUp();\n\t\t\t\t\$(\"#projecttimercontrol\"+projectid).html(\"<a href=\"//\" onclick=\"projectstarttimer('\"+projectid+\"');return false\"><img src=\"../modules/addons/project_management/images/starttimer.png\" align=\"absmiddle\" border=\"0\" /> Start Tracking Time</a>\");\n\t\t\$(\"#activetimers\").html(data);\n\t\t\t}\n\t\t});\n}\n\nfunction projectpopupcancel() {\n\t\$(\"#createnewcont\").slideUp();\n}\n\n</script>\n\n<div class=\"projectmanagement\">\n\n<div id=\"createnewcont\" style=\"display:none;\">\n\n<div class=\"createnewcont2\">\n\n<div class=\"createnewproject\" id=\"popupcreatenew\" style=\"display:none\">\n<div class=\"title\">Create New Project</div>\n<form id=\"ajaxcreateprojectform\">\n<div class=\"label\">Title</div>\n<input type=\"text\" name=\"title\" class=\"title\" />\n<div class=\"float\">\n<div class=\"label\">Created</div>\n<input type=\"text\" name=\"created\" class=\"datepick\" value=\"" . getTodaysDate() . "\" />\n</div>\n<div class=\"float\">\n<div class=\"label\">Due Date</div>\n<input type=\"text\" name=\"duedate\" class=\"datepick\" value=\"" . getTodaysDate() . "\" />\n</div>\n<div class=\"float\">\n<div class=\"label\">Assigned To</div>\n<select class=\"title\" name=\"adminid\">";
    $code .= "<option value=\"0\">None</option>";
    $result = select_query("tbladmins", "id,firstname,lastname", "", "firstname` ASC,`lastname", "ASC");
    while ($data = mysql_fetch_array($result)) {
        $aid = $data['id'];
        $adminfirstname = $data['firstname'];
        $adminlastname = $data['lastname'];
        $code .= "<option value=\"" . $aid . "\"";
        if ($aid == $adminid) {
            $code .= " selected";
        }
        $code .= ">" . $adminfirstname . " " . $adminlastname . "</option>";
    }
    $code .= "</select>\n</div>\n<div class=\"float\">\n<div class=\"label\">Ticket #</div>\n<input type=\"text\" name=\"ticketnum\" class=\"ticketnum\" value=\"" . $tid . "\" />\n</div>\n<div class=\"clear\"></div>\n<div class=\"float\">\n<div class=\"label\">Associated Client</div>\n<input type=\"hidden\" name=\"userid\" id=\"cpuserid\" /><input type=\"text\" id=\"cpclientname\" value=\"" . $clientname . "\" class=\"title\" onfocus=\"if(this.value=='" . addslashes($clientname) . "')this.value=''\" /> <img src=\"images/icons/delete.png\" alt=\"" . $vars['_lang']['cancel'] . "\" align=\"right\" id=\"clientsearchcancel\" height=\"16\" width=\"16\"><div id=\"cpticketclientsearchresults\" style=\"z-index:2000;\"></div>\n</div>\n<br /><br />\n<div align=\"center\"><input type=\"button\" value=\"Create\" onclick=\"createproject()\" class=\"create\" /> <input type=\"button\" value=\"Cancel\" class=\"create\" onclick=\"projectpopupcancel();return false\" /></div>\n</form>\n</div>\n\n<div class=\"createnewproject\" id=\"popupstarttimer\" style=\"display:none\">\n<div class=\"title\">Start Time Tracking</div>\n<form id=\"ajaxstarttimerform\">\n<input type=\"hidden\" id=\"ajaxstarttimerformprojectid\" name=\"projectid\">\n<input type=\"hidden\" name=\"ticketnum\" value=\"" . $tid . "\" />\n<div class=\"label\">Select Existing Task</div>\n<select class=\"title\" style=\"min-width:450px\" name=\"taskid\">";
    $code .= "<option value=\"\">Choose one...</option>";
    $result = select_query("mod_projecttasks", "mod_project.title, mod_projecttasks.id, mod_projecttasks.projectid, mod_projecttasks.task", array("mod_project.ticketids" => array("sqltype" => "LIKE", "value" => (int) $tid)), "", "", "", "mod_project ON mod_projecttasks.projectid=mod_project.id", "", "", "", "mod_project ON mod_projecttasks.projectid=mod_project.id");
    while ($data = mysql_fetch_array($result)) {
        $code .= "<option value=\"" . $data['id'] . "\"";
        $code .= ">" . $data['projectid'] . " - " . $data['title'] . " - " . $data['task'] . "</option>";
    }
    $code .= "</select><br />\n<div class=\"label\">Or Create New Task</div>\n<input type=\"text\" name=\"title\" class=\"title\" />\n<br />\n<div align=\"center\"><input type=\"button\" value=\"Start\" onclick=\"projectstarttimersubmit();return false\" class=\"create\" /> <input type=\"button\" value=\"Cancel\" class=\"create\" onclick=\"projectpopupcancel();return false\" /></div>\n</form>\n</div>\n</div>\n\n<div class=\"createnewproject\" id=\"popupendtimer\" style=\"display:none\">\n<div class=\"title\">Stop Time Tracking</div>\n<form id=\"ajaxendtimerform\">\n<input type=\"hidden\" id=\"ajaxendtimerformprojectid\" name=\"projectid\">\n<br />\n<b>Active Timers</b>:<br /><br />\n<div id=\"activetimers\">\n";
    $result = select_query("mod_projecttimes", "mod_projecttimes.id, mod_projecttimes.projectid, mod_project.title, mod_projecttimes.taskid, mod_projecttasks.task, mod_projecttimes.start", array("mod_projecttimes.adminid" => $_SESSION['adminid'], "mod_projecttimes.end" => "", "mod_project.ticketids" => array("sqltype" => "LIKE", "value" => (int) $tid)), "", "", "", "mod_projecttasks ON mod_projecttimes.taskid=mod_projecttasks.id INNER JOIN mod_project ON mod_projecttimes.projectid=mod_project.id");
    while ($data = mysql_fetch_array($result)) {
        $code .= "<div class=\"stoptimer" . $data['id'] . "\" style=\"padding-bottom:10px;\"><em>" . $data['title'] . " - Project ID " . $data['projectid'] . "</em><br />&nbsp;&raquo; " . $data['task'] . "<br />Started at " . fromMySQLDate(date("Y-m-d H:i:s", $data['start']), 1) . ":" . date("s", $data['start']) . " - <a href=\"#\" onclick=\"projectendtimersubmit('" . $data['projectid'] . "','" . $data['id'] . "');return false\"><strong>Stop Timer</strong></a></div>";
    }
    $code .= "\n</div>\n<br />\n<div align=\"center\"><input type=\"button\" value=\"Cancel\" class=\"create\" onclick=\"projectpopupcancel();return false\" /></div>\n</form>\n</div>\n\n</div>\n\n</div>\n\n";
    return $code;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:48,代码来源:hooks.php


示例2: chartdata_income

function chartdata_income()
{
    global $currency;
    $currency = getCurrency();
    $chartdata = array();
    $chartdata['cols'][] = array('label' => 'Day', 'type' => 'string');
    $chartdata['cols'][] = array('label' => 'Income', 'type' => 'number');
    $chartdata['cols'][] = array('label' => 'Expenditure/Refunds', 'type' => 'number');
    for ($i = 14; $i >= 0; $i--) {
        $date = mktime(0, 0, 0, date("m"), date("d") - $i, date("Y"));
        $data = get_query_vals("tblaccounts", "SUM(amountin/rate),SUM(amountout/rate)", "date LIKE '" . date("Y-m-d", $date) . "%'");
        if (!$data[0]) {
            $data[0] = 0;
        }
        if (!$data[1]) {
            $data[1] = 0;
        }
        $chartdata['rows'][] = array('c' => array(array('v' => date("dS", $date)), array('v' => (int) $data[0], 'f' => formatCurrency($data[0])), array('v' => (int) $data[1], 'f' => formatCurrency($data[1]))));
    }
    return $chartdata;
}
开发者ID:MarcelaGotta,项目名称:Webty,代码行数:21,代码来源:income_overview.php


示例3: widget_system_overview

function widget_system_overview($vars)
{
    global $whmcs, $_ADMINLANG;
    $title = $_ADMINLANG['home']['sysoverview'];
    if ($whmcs->get_req_var('getsystemoverview')) {
        $activeclients = get_query_val("tblclients", "COUNT(id)", "status='Active'");
        $totalclients = get_query_val("tblclients", "COUNT(id)", "");
        $clientsactive = $activeclients == 0 || $totalclients == 0 ? '0' : round($activeclients / $totalclients * 100, 0);
        $activeservices = get_query_val("tblhosting", "COUNT(id)", "domainstatus='Active'");
        $totalservices = get_query_val("tblhosting", "COUNT(id)", "");
        $servicesactive = $activeservices == 0 || $totalservices == 0 ? '0' : round($activeservices / $totalservices * 100, 0);
        $unpaidinvoices = get_query_val("tblinvoices", "COUNT(id)", "status='Unpaid'");
        $overdueinvoices = get_query_val("tblinvoices", "COUNT(id)", "status='Unpaid' AND duedate<'" . date("Ymd") . "'");
        $overduestatus = $overdueinvoices == 0 || $unpaidinvoices == 0 ? '0' : round($overdueinvoices / $unpaidinvoices * 100, 0);
        echo '
<table width="100%">
<tr>
    <td width="150">Clients</td>
    <td>
    <div class="percentbar">
    <div class="active" style="width:' . $clientsactive . '%">' . $clientsactive . '% Active</div>
    </div>
    </td>
    <td class="totals">' . $totalclients . '</td>
</tr>
<tr>
    <td>Services</td>
    <td>
    <div class="percentbar">
    <div class="active" style="width:' . $servicesactive . '%">' . $servicesactive . '% Active</div>
    </div>
    </td>
    <td class="totals">' . $totalservices . '</td>
</tr>
<tr>
    <td>Unpaid Invoices</td>
    <td>
    <div class="percentbar">
    <div class="overdue" style="width:' . $overduestatus . '%">' . $overduestatus . '% Overdue</div>
    </div>
    </td>
    <td class="totals">' . $unpaidinvoices . '</td>
</tr>
</table>
';
        exit;
    }
    $adminusername = get_query_val("tbladmins", "username", array("id" => $vars['adminid']));
    $lastlogin = get_query_vals("tbladminlog", "lastvisit,ipaddress", array("adminusername" => $adminusername), "lastvisit", "DESC", "1,1");
    $lastlogindate = $lastlogin[0] ? fromMySQLDate($lastlogin[0], true) : '(None Recorded)';
    $lastloginip = $lastlogin[1] ? $lastlogin[1] : '-';
    $content = '
<style>
#systemoverviewstats {
    display: none;
}
#systemoverviewstats div.percentbar {
    width: 100%;
    height: 24px;
    border: 1px solid #ccc;
    background-color: #efefef;
}
#systemoverviewstats div.percentbar div.active {
    height: 24px;
    line-height: 24px;
    background-color: #84B429;
    color: #fff;
    font-weight: bold;
    text-align: center;
    overflow: hidden;
}
#systemoverviewstats div.percentbar div.overdue {
    height: 24px;
    line-height: 24px;
    background-color: #cc0000;
    color: #fff;
    font-weight: bold;
    text-align: center;
}
#systemoverviewstats td {
    text-align: center;
    font-weight: bold;
    height: 35px;
}
.lastlogin {
    margin-bottom:5px;
    padding:3px;
    text-align: center;
}
</style>

<div id="systemoverviewstats">' . $vars['loading'] . '</div>

<div class="lastlogin">' . $_ADMINLANG['home']['lastlogin'] . ': <strong>' . $lastlogindate . '</strong> ' . $_ADMINLANG['home']['lastloginip'] . ' <strong>' . $lastloginip . '</strong></div>

';
    $statusfilter = array();
    $result = select_query("tblticketstatuses", "title", array("showawaiting" => "1"));
    while ($data = mysql_fetch_array($result)) {
        $statusfilter[] = $data[0];
//.........这里部分代码省略.........
开发者ID:billyprice1,项目名称:whmcs,代码行数:101,代码来源:system_overview.php


示例4: getTLDPriceList

function getTLDPriceList($tld, $display = "", $renewpricing = "", $userid = "")
{
    global $currency;
    if ($renewpricing == "renew") {
        $renewpricing = true;
    }
    $currency_id = $currency['id'];
    $result = select_query("tbldomainpricing", "id", array("extension" => $tld));
    $data = mysql_fetch_array($result);
    $id = $data['id'];
    if (!$userid && isset($_SESSION['uid'])) {
        $userid = $_SESSION['uid'];
    }
    $clientgroupid = $userid ? get_query_val("tblclients", "groupid", array("id" => $userid)) : "0";
    $checkfields = array("msetupfee", "qsetupfee", "ssetupfee", "asetupfee", "bsetupfee", "monthly", "quarterly", "semiannually", "annually", "biennially");
    if (!$renewpricing || $renewpricing === "transfer") {
        $data = get_query_vals("tblpricing", "", array("type" => "domainregister", "currency" => $currency_id, "relid" => $id, "tsetupfee" => $clientgroupid));
        if (!$data) {
            $data = get_query_vals("tblpricing", "", array("type" => "domainregister", "currency" => $currency_id, "relid" => $id, "tsetupfee" => "0"));
        }
        foreach ($checkfields as $k => $v) {
            $register[$k + 1] = $data[$v];
        }
        $data = get_query_vals("tblpricing", "", array("type" => "domaintransfer", "currency" => $currency_id, "relid" => $id, "tsetupfee" => $clientgroupid));
        if (!$data) {
            $data = get_query_vals("tblpricing", "", array("type" => "domaintransfer", "currency" => $currency_id, "relid" => $id, "tsetupfee" => "0"));
        }
        foreach ($checkfields as $k => $v) {
            $transfer[$k + 1] = $data[$v];
        }
    }
    if (!$renewpricing || $renewpricing !== "transfer") {
        $data = get_query_vals("tblpricing", "", array("type" => "domainrenew", "currency" => $currency_id, "relid" => $id, "tsetupfee" => $clientgroupid));
        if (!$data) {
            $data = get_query_vals("tblpricing", "", array("type" => "domainrenew", "currency" => $currency_id, "relid" => $id, "tsetupfee" => "0"));
        }
        foreach ($checkfields as $k => $v) {
            $renew[$k + 1] = $data[$v];
        }
    }
    $tldpricing = array();
    $years = 1;
    while ($years <= 10) {
        if ($renewpricing === "transfer") {
            if (0 < $register[$years] && 0 <= $transfer[$years]) {
                if ($display) {
                    $transfer[$years] = formatCurrency($transfer[$years]);
                }
                $tldpricing[$years]['transfer'] = $transfer[$years];
            }
        } else {
            if ($renewpricing) {
                if (0 < $renew[$years]) {
                    if ($display) {
                        $renew[$years] = formatCurrency($renew[$years]);
                    }
                    $tldpricing[$years]['renew'] = $renew[$years];
                }
            } else {
                if (0 < $register[$years]) {
                    if ($display) {
                        $register[$years] = formatCurrency($register[$years]);
                    }
                    $tldpricing[$years]['register'] = $register[$years];
                    if (0 <= $transfer[$years]) {
                        if ($display) {
                            $transfer[$years] = formatCurrency($transfer[$years]);
                        }
                        $tldpricing[$years]['transfer'] = $transfer[$years];
                    }
                    if (0 < $renew[$years]) {
                        if ($display) {
                            $renew[$years] = formatCurrency($renew[$years]);
                        }
                        $tldpricing[$years]['renew'] = $renew[$years];
                    }
                }
            }
        }
        $years += 1;
    }
    return $tldpricing;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:83,代码来源:domainfunctions.php


示例5: infoBox

    }
}
if ($whmcs->get_req_var("success")) {
    infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc"));
}
$regdate = fromMySQLDate($regdate);
$nextduedate = fromMySQLDate($nextduedate);
$overidesuspenduntil = fromMySQLDate($overidesuspenduntil);
if ($disklimit == "0") {
    $disklimit = $aInt->lang("global", "unlimited");
}
if ($bwlimit == "0") {
    $bwlimit = $aInt->lang("global", "unlimited");
}
$currency = getCurrency($userid);
$data = get_query_vals("tblcancelrequests", "id,type,reason", array("relid" => $id), "id", "DESC");
$cancelid = $data['id'];
$canceltype = $data['type'];
$autoterminatereason = $data['reason'];
$autoterminateendcycle = false;
if ($canceltype == "End of Billing Period") {
    $autoterminateendcycle = $cancelid ? true : false;
}
if (!$server) {
    $server = get_query_val("tblservers", "id", array("type" => $module, "active" => "1"));
    if ($server) {
        update_query("tblhosting", array("server" => $server), array("id" => $id));
    }
}
$jscode = "function doDeleteAddon(id) {\nif (confirm(\"" . $aInt->lang("addons", "areyousuredelete", 1) . "\")) {\nwindow.location='" . $PHP_SELF . "?userid=" . $userid . "&id=" . $id . "&action=deladdon&aid='+id+'" . generate_token("link") . "';\n}}\nfunction runModuleCommand(cmd,custom) {\n    \$(\"#mod\"+cmd).dialog(\"close\");\n\n    \$(\"#modcmdbtns\").css(\"filter\",\"alpha(opacity=20)\");\n    \$(\"#modcmdbtns\").css(\"-moz-opacity\",\"0.2\");\n    \$(\"#modcmdbtns\").css(\"-khtml-opacity\",\"0.2\");\n    \$(\"#modcmdbtns\").css(\"opacity\",\"0.2\");\n    var position = \$(\"#modcmdbtns\").position();\n\n    \$(\"#modcmdworking\").css(\"position\",\"absolute\");\n    \$(\"#modcmdworking\").css(\"top\",position.top);\n    \$(\"#modcmdworking\").css(\"left\",position.left);\n    \$(\"#modcmdworking\").css(\"padding\",\"9px 50px 0\");\n    \$(\"#modcmdworking\").fadeIn();\n\n    var reqstr = \"userid=" . $userid . "&id=" . $id . "&modop=\"+cmd+\"" . generate_token("link") . "\";\n    if (custom) reqstr += \"&ac=\"+custom;\n    else if (cmd==\"suspend\") reqstr += \"&suspreason=\"+encodeURIComponent(\$(\"#suspreason\").val())+\"&suspemail=\"+\$(\"#suspemail\").is(\":checked\");\n\n    \$.post(\"clientsservices.php\", reqstr,\n    function(data){\n        if (data.substr(0,9)==\"redirect|\") {\n            window.location = data.substr(9);\n        } else {\n            \$(\"#servicecontent\").html(data);\n        }\n    });\n\n}\n";
$aInt->jscode = $jscode;
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:clientsservices.php


示例6: generateClientPW

    }
    if ($supportemails) {
        $supportemails = 1;
    }
    if ($affiliateemails) {
        $affiliateemails = 1;
    }
    if ($contactid == "addnew") {
        if ($password && $password != $aInt->lang("fields", "password")) {
            $array['password'] = generateClientPW($password);
        }
        $contactid = addContact($userid, $firstname, $lastname, $companyname, $email, $address1, $address2, $city, $state, $postcode, $country, $phonenumber, $password, $permissions, $generalemails, $productemails, $domainemails, $invoiceemails, $supportemails);
        logActivity("Added Contact - User ID: " . $userid . " - Contact ID: " . $contactid);
    } else {
        logActivity("Contact Modified - User ID: " . $userid . " - Contact ID: " . $contactid);
        $oldcontactdata = get_query_vals("tblcontacts", "", array("userid" => $_SESSION['uid'], "id" => $id));
        if ($permissions) {
            $permissions = implode(",", $permissions);
        }
        $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;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:clientscontacts.php


示例7: generate_token

    echo "<form method=\"post\" id=\"duplicatetldform\" action=\"" . $_SERVER['PHP_SELF'] . "\">" . generate_token("form") . "<table><tr><td>Existing TLD:</td><td><input type=\"hidden\" name=\"action\" value=\"duplicatetld\" /><select name=\"tld\">" . $tldoptions . "</select></td></tr><tr><td>New TLD:</td><td><input type=\"text\" name=\"newtld\" size=\"6\" /></td></tr></table></form>";
    exit;
}
if ($action == "duplicatetld") {
    check_token("WHMCS.admin.default");
    $newtld = trim($newtld);
    if (substr($newtld, 0, 1) != ".") {
        $newtld = "." . $newtld;
    }
    if (!$tld || !$newtld) {
        redir("errormessage=" . $aInt->lang("domains", "sourcenewtldempty"));
    }
    if (get_query_val("tbldomainpricing", "id", array("extension" => $newtld))) {
        redir("errormessage=" . str_replace("%s", $newtld, $aInt->lang("domains", "extensionalreadyexist")));
    }
    $tlddata = get_query_vals("tbldomainpricing", "id,dnsmanagement, emailforwarding, idprotection, eppcode, autoreg", array("extension" => $tld));
    $relid = $tlddata['id'];
    $newtlddata = array();
    $newtlddata['extension'] = $newtld;
    $newtlddata['dnsmanagement'] = $tlddata['dnsmanagement'];
    $newtlddata['emailforwarding'] = $tlddata['emailforwarding'];
    $newtlddata['idprotection'] = $tlddata['idprotection'];
    $newtlddata['eppcode'] = $tlddata['eppcode'];
    $newtlddata['autoreg'] = $tlddata['autoreg'];
    $newtlddata['order'] = get_query_val("tbldomainpricing", "MAX(`order`)", "") + 1;
    $newrelid = insert_query("tbldomainpricing", $newtlddata);
    $regpricingresult = select_query("tblpricing", "*", array("relid" => $relid, "type" => "domainregister"));
    while ($regpricingdata = mysql_fetch_assoc($regpricingresult)) {
        unset($regpricingdata['id']);
        $regpricingdata['relid'] = $newrelid;
        insert_query("tblpricing", $regpricingdata);
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:configdomains.php


示例8: error_reporting

 **/
require "../init.php";
error_reporting(0);
if (!function_exists("getimagesize")) {
    exit("You need to recompile with the GD library included in PHP for this feature to be able to function");
}
$filename = "";
if ($tid) {
    $data = get_query_vals("tbltickets", "userid,attachment", array("id" => $tid));
    $userid = $data[0];
    $attachments = $data[1];
    $attachments = explode("|", $attachments);
    $filename = $attachments_dir . $attachments[$i];
}
if ($rid) {
    $data = get_query_vals("tblticketreplies", "tid,attachment", array("id" => $rid));
    $ticketid = $data[0];
    $attachments = $data[1];
    $attachments = explode("|", $attachments);
    $filename = $attachments_dir . $attachments[$i];
    $userid = get_query_val("tbltickets", "userid", array("id" => $ticketid));
}
if ($_SESSION['uid'] != $userid && !$_SESSION['adminid']) {
    $filename = ROOTDIR . "/images/nothumbnail.gif";
}
if (!$filename) {
    $filename = ROOTDIR . "/images/nothumbnail.gif";
}
$size = getimagesize($filename);
switch ($size['mime']) {
    case "image/jpeg":
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:thumbnail.php


示例9: exit

 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
if (!defined("WHMCS")) {
    exit("This file cannot be accessed directly");
}
if (!function_exists("applyCredit")) {
    require ROOTDIR . "/includes/invoicefunctions.php";
}
$data = get_query_vals("tblinvoices", "id,userid,credit,total,status", array("id" => $invoiceid));
$invoiceid = $data['id'];
if (!$invoiceid) {
    $apiresults = array("result" => "error", "message" => "Invoice ID Not Found");
    return null;
}
$userid = $data['userid'];
$credit = $data['credit'];
$total = $data['total'];
$status = $data['status'];
$amountpaid = get_query_val("tblaccounts", "SUM(amountin)-SUM(amountout)", array("invoiceid" => $invoiceid));
$balance = round($total - $amountpaid, 2);
$amount = $amount == "full" ? $balance : round($amount, 2);
$totalcredit = get_query_val("tblclients", "credit", array("id" => $userid));
if ($status != "Unpaid") {
    $apiresults = array("result" => "error", "message" => "Invoice Not in Unpaid Status");
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:applycredit.php


示例10: get_query_vals

 echo "\"><input type=\"text\" name=\"removecredit\" value=\"0.00\" size=\"8\"";
 if ($credit == "0.00") {
     echo " disabled";
 }
 echo "> <input type=\"submit\" value=\"";
 echo $aInt->lang("global", "go");
 echo "\" class=\"btn";
 if ($credit == "0.00") {
     echo " disabled";
 }
 echo "\"";
 if ($credit == "0.00") {
     echo " disabled";
 }
 echo "></form></td></tr>\n</table>\n</form>\n\n  </div>\n</div>\n<div id=\"tab4box\" class=\"tabbox\">\n  <div id=\"tab_content\">\n";
 $numtrans = get_query_vals("tblaccounts", "COUNT(id)", array("invoiceid" => $id, "amountin" => array("sqltype" => ">", "value" => "0")), "date` ASC,`id", "ASC");
 $notransactions = $numtrans[0] == "0" ? true : false;
 echo "<form method=\"post\" action=\"";
 echo $PHP_SELF;
 echo "\">\n<input type=\"hidden\" name=\"action\" value=\"edit\">\n<input type=\"hidden\" name=\"id\" value=\"";
 echo $id;
 echo "\">\n<input type=\"hidden\" name=\"sub\" value=\"refund\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"20%\" class=\"fieldlabel\">";
 echo $aInt->lang("invoices", "transactions");
 echo "</td><td class=\"fieldarea\">";
 echo "<s";
 echo "elect name=\"transid\">";
 $result = select_query("tblaccounts", "", array("invoiceid" => $id, "amountin" => array("sqltype" => ">", "value" => "0")), "date` ASC,`id", "ASC");
 while ($data = mysql_fetch_array($result)) {
     $trans_id = $data['id'];
     $trans_date = $data['date'];
     $trans_amountin = $data['amountin'];
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:invoices.php


示例11: validate_client_auth

 private function validate_client_auth()
 {
     $haship = $this->get_config("DisableSessionIPCheck") ? "" : $this->get_user_ip();
     if (defined("CLIENTAREA") && !isset($_SESSION['uid']) && isset($_COOKIE['WHMCSUser'])) {
         $cookiedata = explode(":", $_COOKIE['WHMCSUser']);
         if (is_numeric($cookiedata[0])) {
             $data = get_query_vals("tblclients", "id,password", array("id" => (int) $cookiedata[0]));
             $loginhash = sha1($data['id'] . $data['password'] . $haship . substr(sha1($this->get_hash()), 0, 20));
             $cookiehashcompare = sha1($loginhash . $this->get_hash());
             if ($cookiedata[1] == $cookiehashcompare) {
                 $_SESSION['uid'] = $data['id'];
                 $_SESSION['upw'] = $loginhash;
                 $_SESSION['tkval'] = substr(sha1(rand(1000, 9999) . time()), 0, 12);
             }
         }
     }
     if (isset($_SESSION['uid'])) {
         if (!is_numeric($_SESSION['uid'])) {
             session_unset();
             session_destroy();
         } else {
             if (!isset($_SESSION['adminid'])) {
                 $result = select_query("tblclients", "password", array("id" => $_SESSION['uid']));
                 $data = mysql_fetch_array($result);
                 $cid = "";
                 if (isset($_SESSION['cid']) && is_numeric($_SESSION['cid'])) {
                     $cid = $_SESSION['cid'];
                     $result = select_query("tblcontacts", "password", array("id" => $_SESSION['cid']));
                     $data = mysql_fetch_array($result);
                 }
                 if ($_SESSION['upw'] != sha1($_SESSION['uid'] . $cid . $data['password'] . $haship . substr(sha1($this->get_hash()), 0, 20))) {
                     session_unset();
                     session_destroy();
                 }
             }
         }
         if (isset($_SESSION['currency'])) {
             unset($_SESSION['currency']);
         }
     }
 }
开发者ID:billyprice1,项目名称:whmcs,代码行数:41,代码来源:class.init.php


示例12: resellerclubssl_AdminServicesTabFields

function resellerclubssl_AdminServicesTabFields($params)
{
    $data = get_query_vals("tblsslorders", "", array("serviceid" => $params['serviceid']));
    $id = $data['id'];
    $orderid = $data['orderid'];
    $serviceid = $data['serviceid'];
    $remoteid = $data['remoteid'];
    $module = $data['module'];
    $certtype = $data['certtype'];
    $domain = $data['domain'];
    $provisiondate = $data['provisiondate'];
    $completiondate = $data['completiondate'];
    $expirydate = $data['expirydate'];
    $status = $data['status'];
    if (!$id) {
        $remoteid = "-";
        $status = "Not Yet Provisioned";
    }
    $fieldsarray = array("ResellerClub Order ID" => $remoteid, "SSL Configuration Status" => $status);
    return $fieldsarray;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:21,代码来源:resellerclubssl.php


示例13: array

$templatevars['licenseinfo'] = array("registeredname" => $licensing->getKeyData("registeredname"), "productname" => $licensing->getKeyData("productname"), "expires" => $licensing->getExpiryDate(), "currentversion" => $CONFIG['Version'], "latestversion" => $licensing->getKeyData("latestversion"));
if ($licensing->getKeyData("productname") == "15 Day Free Trial") {
    $templatevars['freetrial'] = true;
}
$templatevars['infobox'] = $infobox;
$query = "SELECT COUNT(*) FROM tblpaymentgateways WHERE setting='type' AND value='CC'";
$result = full_query($query);
$data = mysql_fetch_array($result);
if ($data[0]) {
    $templatevars['showattemptccbutton'] = true;
}
if ($CONFIG['MaintenanceMode']) {
    $templatevars['maintenancemode'] = true;
}
$jquerycode = "\$(\".homecolumn\").sortable({\n\thandle : '.widget-header',\n    connectWith: ['.homecolumn'],\n    stop: function() { saveHomeWidgets(); }\n});\n\$(\".homewidget\").find(\".widget-header\").prepend(\"<span class='ui-icon ui-icon-minusthick'></span>\");\nresHomeWidgets();\n\$(\".widget-header .ui-icon\").click(function() {\n    \$(this).toggleClass(\"ui-icon-minusthick\").toggleClass(\"ui-icon-plusthick\");\n\t\$(this).parents(\".homewidget:first\").find(\".widget-content\").toggle();\n    saveHomeWidgets();\n});\n";
$data = get_query_vals("tbladmins", "tbladmins.homewidgets,tbladminroles.widgets", array("tbladmins.id" => $_SESSION['adminid']), "", "", "", "tbladminroles ON tbladminroles.id=tbladmins.roleid");
$homewidgets = $data['homewidgets'];
$allowedwidgets = $data['widgets'];
if (!$homewidgets) {
    $homewidgets = "getting_started:true,system_overview:true,income_overview:true,client_activity:true,admin_activity:true,activity_log:true|my_notes:true,orders_overview:true,sysinfo:true,whmcs_news:true,network_status:true,todo_list:true,income_forecast:true,open_invoices:true";
}
$homewidgets = explode("|", $homewidgets);
$homewidgetscol1 = explode(",", $homewidgets[0]);
foreach ($homewidgetscol1 as $k => $v) {
    $v = explode(":", $v);
    if (!$v[0]) {
        unset($homewidgetscol1[$k]);
        continue;
    }
}
$homewidgetscol1 = implode(",", $homewidgetscol1);
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:index.php


示例14: paypal_addon_output


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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