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


PHP fromMySQLDate函数代码示例

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


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

示例1: widget_activity_log

function widget_activity_log($vars)
{
    global $_ADMINLANG;
    $title = $_ADMINLANG['utilities']['activitylog'];
    $content = '';
    $patterns = $replacements = array();
    $patterns[] = '/User ID: (.*?) /';
    $patterns[] = '/Service ID: (.*?) /';
    $patterns[] = '/Domain ID: (.*?) /';
    $patterns[] = '/Invoice ID: (.*?) /';
    $patterns[] = '/Order ID: (.*?) /';
    $patterns[] = '/Transaction ID: (.*?) /';
    $replacements[] = '<a href="clientssummary.php?userid=$1">User ID: $1</a> ';
    $replacements[] = '<a href="clientshosting.php?id=$1">Service ID: $1</a> ';
    $replacements[] = '<a href="clientsdomains.php?id=$1">Domain ID: $1</a> ';
    $replacements[] = '<a href="invoices.php?action=edit&id=$1">Invoice ID: $1</a> ';
    $replacements[] = '<a href="orders.php?action=view&id=$1">Order ID: $1</a> ';
    $replacements[] = '<a href="transactions.php?action=edit&id=$1">Transaction ID: $1</a> ';
    $result = select_query("tblactivitylog", "", "", "id", "DESC", "0,10");
    while ($data = mysql_fetch_array($result)) {
        $description = $data["description"] . ' ';
        $description = whmcsHtmlspecialchars($description);
        $description = preg_replace($patterns, $replacements, $description);
        $content .= $description . '<br /><span style="font-size:11px;">&nbsp; - ' . fromMySQLDate($data["date"], true) . ' - ' . $data['user'] . ' - ' . $data['ipaddr'] . '</span><br />';
    }
    if (!$content) {
        $content = '<div align="center">No Activity Recorded Yet</div>';
    } else {
        $content .= '<div align="right"><a href="systemactivitylog.php">' . $_ADMINLANG['home']['viewall'] . ' &raquo;</a></div>';
    }
    return array('title' => $title, 'content' => $content);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:32,代码来源:activity_log.php

示例2: widget_todo_list

function widget_todo_list($vars)
{
    global $_ADMINLANG;
    $content = '<table width="100%" bgcolor="#cccccc" cellspacing="1">
<tr bgcolor=#efefef style="text-align:center;font-weight:bold;"><td>' . $_ADMINLANG['fields']['date'] . '</td><td>' . $_ADMINLANG['fields']['title'] . '/' . $_ADMINLANG['fields']['description'] . '</td><td>' . $_ADMINLANG['fields']['duedate'] . '</td><td>' . $_ADMINLANG['fields']['status'] . '</td><td width="20"></td></tr>
    ';
    $id = '';
    $result = select_query("tbltodolist", "", array("status" => array("sqltype" => "NEQ", "value" => "Completed")), "duedate", "ASC");
    while ($data = mysql_fetch_array($result)) {
        $id = $data["id"];
        $date = $data["date"];
        $title = $data["title"];
        $description = $data["description"];
        $admin = $data["admin"];
        $status = $data["status"];
        $duedate = $data["duedate"];
        $date = fromMySQLDate($date);
        $duedate = $duedate == "0000-00-00" ? '-' : fromMySQLDate($duedate);
        $bgcolor = $admin == $vars['adminid'] ? "#f5f5d7" : "#ffffff";
        $description = strlen($description) > 50 ? substr($description, 0, 50) . '...' : $description;
        $content .= '<tr bgcolor="' . $bgcolor . '" style="text-align:center;"><td>' . $date . '</td><td>' . $title . ' - ' . $description . '</td><td>' . $duedate . '</td><td>' . $status . '</td><td><a href="todolist.php?action=edit&id=' . $id . '"><img src="images/edit.gif" border="0"></a></td></tr>
';
    }
    if (!$id) {
        $content .= '<tr bgcolor="#ffffff"><td colspan="5" align="center">' . $_ADMINLANG['global']['norecordsfound'] . '</td></tr>';
    }
    $content .= '</table>
<div align="right" style="padding-top:5px;"><a href="todolist.php">' . $_ADMINLANG['home']['manage'] . ' &raquo;</a></div>';
    $title = $_ADMINLANG['todolist']['todolisttitle'];
    return array('title' => $title, 'content' => $content);
}
开发者ID:carriercomm,项目名称:whmcs-5,代码行数:31,代码来源:todo_list.php

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

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

示例5: sirportly_ticket_table

function sirportly_ticket_table($results)
{
    foreach ($results as $key => $ticket) {
        $tickets[] = array('date' => fromMySQLDate($ticket['submitted_at'], time), 'tid' => $ticket['reference'], 'subject' => $ticket['subject'], 'c' => $ticket['id'], 'lastreply' => fromMySQLDate($ticket['last_update_posted_at'], time), 'department' => $ticket['department']['name'], 'status' => "<span style='color:#{$ticket['status']['colour']}'>{$ticket['status']['name']}</span>");
    }
    return $tickets;
}
开发者ID:markbakeruk,项目名称:sirportly-whmcs,代码行数:7,代码来源:sirportly_functions.php

示例6: project_management_timesoutput

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
function project_management_timesoutput($vars, $taskid)
{
    $timesoutput = "<table width=\"95%\" bgcolor=\"#cccccc\" cellspacing=\"1\" align=\"center\" style=\"margin-top:5px;\"><tr class=\"taskholder" . $taskid . "\" bgcolor=\"#efefef\" style=\"text-align:center;font-weight:bold;\"><td align=\"center\">" . $vars['_lang']['staff'] . "</td><td>" . $vars['_lang']['starttime'] . "</td><td>" . $vars['_lang']['stoptime'] . "</td><td>" . $vars['_lang']['timespent'] . "</td><td width=\"25\"></td></tr>";
    $result2 = select_query("mod_projecttimes", "*", array("taskid" => $taskid));
    while ($timerdata = mysql_fetch_assoc($result2)) {
        $show_startresume = "false";
        $timerid = $timerdata['id'];
        $timeradmin = mysql_fetch_assoc(select_query("tbladmins", "firstname,lastname", array("id" => $timerdata['adminid'])));
        $timerstart = $timerdata['start'];
        $timerend = $timerdata['end'];
        $starttime = fromMySQLDate(date("Y-m-d H:i:s", $timerstart), 1) . ":" . date("s", $timerstart);
        $endtimerlink = $timerdata['adminid'] == $_SESSION['adminid'] || project_management_check_masteradmin() ? "<a rel=\"" . $timerid . "\" id=\"ajaxendtimertaskid" . $taskid . "\" class=\"ajaxendtimer timerlink\">" . $vars['_lang']['endtimer'] . "</a>" : $vars['_lang']['inprogress'];
        $deltimerlink = $timerdata['adminid'] == $_SESSION['adminid'] || project_management_check_masteradmin() ? "<a href=\"#\" onclick=\"deleteTimer('" . $timerid . "','" . $taskid . "');return false\"><img src=\"images/delete.gif\"></a>" : "";
        $endtime = $timerend ? fromMySQLDate(date("Y-m-d H:i:s", $timerend), 1) . ":" . date("s", $timerend) : $endtimerlink;
        $totaltime = $timerend ? project_management_sec2hms($timerend - $timerstart) : $vars['_lang']['inprogress'];
        $timesoutput .= "<tr bgcolor=\"#ffffff\" class=\"time taskholder" . $taskid . "\"><td>" . $timeradmin['firstname'] . " " . $timeradmin['lastname'] . "</td><td>" . $starttime . "</td><td id=\"ajaxendtimertaskholderid" . $timerid . "\">" . $endtime . "</td><td id=\"ajaxtimerstatusholderid" . $timerid . "\">" . $totaltime . "</td><td>" . $deltimerlink . "</td></tr>";
        if ($timerend) {
            $timecount += $timerend - $timerstart;
            $totaltimecount += $timerend - $timerstart;
            $show_startresume = "true";
            $invoicelinedesc .= " > " . $starttime . " - " . $endtime . " (" . $totaltime . " " . $vars['_lang']['hours'] . ")\r\n";
        }
    }
    if (!$timerid) {
        $timesoutput .= "<tr id=\"notasktimersexist" . $taskid . "\"><td colspan=\"6\" align=\"center\" bgcolor=\"#fff\">" . $vars['_lang']['notimesrecorded'] . "</td></tr>";
    }
    $timesoutput .= "</table>";
    $GLOBALS['timerid'] = $timerid;
    $GLOBALS['timecount'] = $timecount;
    $GLOBALS['invoicelinedesc'] = $invoicelinedesc;
    return $timesoutput;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:42,代码来源:view.php

示例7: widget_admin_activity

function widget_admin_activity($vars)
{
    global $_ADMINLANG;
    $title = $_ADMINLANG['home']['recentadminactivity'];
    $content = '<table width="75%" bgcolor="#cccccc" cellspacing="1" align="center">
<tr bgcolor="#efefef" style="text-align:center;font-weight:bold;"><td>' . $_ADMINLANG['fields']['admin'] . '</td><td>' . $_ADMINLANG['fields']['ipaddress'] . '</td><td>' . $_ADMINLANG['system']['lastaccess'] . '</td></tr>';
    $result = select_query("tbladminlog", "", "", "lastvisit", "DESC", "0,5");
    while ($data = mysql_fetch_array($result)) {
        $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td>' . $data["adminusername"] . '</a></td><td><a href="http://www.geoiptool.com/en/?IP=' . $data["ipaddress"] . '" target="_blank">' . $data["ipaddress"] . '</a></td><td>' . fromMySQLDate($data["lastvisit"], true) . '</td></tr>';
    }
    $content .= '</table>';
    return array('title' => $title, 'content' => $content);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:13,代码来源:admin_activity.php

示例8: getInvoices

 public function getInvoices($criteria = array())
 {
     global $aInt;
     global $currency;
     $query = " FROM tblinvoices INNER JOIN tblclients ON tblclients.id=tblinvoices.userid";
     $filters = $this->buildCriteria($criteria);
     $query .= count($filters) ? " WHERE " . implode(" AND ", $filters) : "";
     $result = full_query("SELECT COUNT(*)" . $query);
     $data = mysql_fetch_array($result);
     $this->getPageObj()->setNumResults($data[0]);
     $gateways = new WHMCS_Gateways();
     $orderby = $this->getPageObj()->getOrderBy();
     if ($orderby == "clientname") {
         $orderby = "firstname " . $this->getPageObj()->getSortDirection() . ",lastname " . $this->getPageObj()->getSortDirection() . ",companyname";
     }
     if ($orderby == "id") {
         $orderby = "tblinvoices.invoicenum " . $this->getPageObj()->getSortDirection() . ",tblinvoices.id";
     }
     $invoices = array();
     $query = "SELECT tblinvoices.*,tblclients.firstname,tblclients.lastname,tblclients.companyname,tblclients.groupid,tblclients.currency" . $query . " ORDER BY " . $orderby . " " . $this->getPageObj()->getSortDirection() . " LIMIT " . $this->getQueryLimit();
     $result = full_query($query);
     while ($data = mysql_fetch_array($result)) {
         $id = $data['id'];
         $invoicenum = $data['invoicenum'];
         $userid = $data['userid'];
         $date = $data['date'];
         $duedate = $data['duedate'];
         $subtotal = $data['subtotal'];
         $credit = $data['credit'];
         $total = $data['total'];
         $gateway = $data['paymentmethod'];
         $status = $data['status'];
         $firstname = $data['firstname'];
         $lastname = $data['lastname'];
         $companyname = $data['companyname'];
         $groupid = $data['groupid'];
         $currency = $data['currency'];
         $clientname = $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid);
         $paymentmethod = $gateways->getDisplayName($gateway);
         $currency = getCurrency("", $currency);
         $totalformatted = formatCurrency($credit + $total);
         $statusformatted = $this->formatStatus($status);
         $date = fromMySQLDate($date);
         $duedate = fromMySQLDate($duedate);
         if (!$invoicenum) {
             $invoicenum = $id;
         }
         $invoices[] = array("id" => $id, "invoicenum" => $invoicenum, "userid" => $userid, "clientname" => $clientname, "date" => $date, "duedate" => $duedate, "subtotal" => $subtotal, "credit" => $credit, "total" => $total, "totalformatted" => $totalformatted, "gateway" => $gateway, "paymentmethod" => $paymentmethod, "status" => $status, "statusformatted" => $statusformatted);
     }
     return $invoices;
 }
开发者ID:billyprice1,项目名称:whmcs,代码行数:51,代码来源:class.invoices.php

示例9: widget_client_activity

function widget_client_activity($vars)
{
    global $_ADMINLANG;
    $title = $_ADMINLANG['home']['recentclientactivity'];
    $content = '<table class="table table-condensed">
<tr bgcolor="#efefef" style="text-align:center;font-weight:bold;"><td>' . $_ADMINLANG['fields']['client'] . '</td><td>' . $_ADMINLANG['fields']['ipaddress'] . '</td><td>' . $_ADMINLANG['system']['lastaccess'] . '</td></tr>';
    $id = '';
    $result = select_query("tblclients", "id,firstname,lastname,ip,lastlogin", "", "lastlogin", "DESC", "0,5");
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td><a href="clientssummary.php?userid=' . $id . '">' . $data["firstname"] . ' ' . $data["lastname"] . '</a></td><td><a href="http://www.geoiptool.com/en/?IP=' . $data["ip"] . '" target="_blank">' . $data["ip"] . '</a></td><td>' . fromMySQLDate($data["lastlogin"], true) . '</td></tr>';
    }
    if (!$id) {
        $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="3">' . $_ADMINLANG['global']['norecordsfound'] . '</td></tr>';
    }
    $content .= '</table>';
    return array('title' => $title, 'content' => $content);
}
开发者ID:MarcelaGotta,项目名称:Webty,代码行数:18,代码来源:client_activity.php

示例10: widget_open_invoices

function widget_open_invoices($vars)
{
    global $_ADMINLANG, $currency;
    $title = $_ADMINLANG['home']['openinvoices'];
    if (!function_exists("getGatewaysArray")) {
        require ROOTDIR . "/includes/gatewayfunctions.php";
    }
    $gatewaysarray = getGatewaysArray();
    $content = '<table class="table table-condensed">
<tr style="background-color:#efefef;font-weight:bold;text-align:center"><td>' . $_ADMINLANG['fields']['invoicenum'] . '</td><td>' . $_ADMINLANG['fields']['clientname'] . '</td><td>' . $_ADMINLANG['fields']['invoicedate'] . '</td><td>' . $_ADMINLANG['fields']['duedate'] . '</td><td>' . $_ADMINLANG['fields']['totaldue'] . '</td><td>' . $_ADMINLANG['fields']['paymentmethod'] . '</td><td width="20"></td></tr>
';
    $id = '';
    $query = "SELECT tblinvoices.*,tblinvoices.total-COALESCE((SELECT SUM(amountin) FROM tblaccounts WHERE tblaccounts.invoiceid=tblinvoices.id),0) AS invoicebalance,tblclients.firstname,tblclients.lastname FROM tblinvoices INNER JOIN tblclients ON tblclients.id=tblinvoices.userid WHERE tblinvoices.status='Unpaid' ORDER BY duedate,date ASC LIMIT 0,5";
    $result = full_query($query);
    while ($data = mysql_fetch_array($result)) {
        $id = $data["id"];
        $invoicenum = $data["invoicenum"];
        $userid = $data["userid"];
        $firstname = $data["firstname"];
        $lastname = $data["lastname"];
        $date = $data["date"];
        $duedate = $data["duedate"];
        $total = $data["total"];
        $invoicebalance = $data["invoicebalance"];
        $paymentmethod = $data["paymentmethod"];
        $paymentmethod = $gatewaysarray[$paymentmethod];
        $date = fromMySQLDate($date);
        $duedate = fromMySQLDate($duedate);
        $currency = getCurrency($userid);
        if (!$invoicenum) {
            $invoicenum = $id;
        }
        $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td><a href="invoices.php?action=edit&id=' . $id . '">' . $invoicenum . '</a></td><td>' . $firstname . ' ' . $lastname . '</td><td>' . $date . '</td><td>' . $duedate . '</td><td>' . formatCurrency($total) . '</td><td>' . $paymentmethod . '</td><td><a href="invoices.php?action=edit&id=' . $id . '"><img src="images/edit.gif" border="0" /></a></td></tr>';
    }
    if (!$id) {
        $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="7">' . $_ADMINLANG['global']['norecordsfound'] . '</td></tr>';
    }
    $content .= '</table>
<div class="widget-footer">
    <a href="invoices.php?status=Unpaid" class="btn btn-info btn-sm">' . $_ADMINLANG['home']['viewall'] . ' &raquo;</a>
</div>';
    return array('title' => $title, 'content' => $content);
}
开发者ID:MarcelaGotta,项目名称:Webty,代码行数:43,代码来源:open_invoices.php

示例11: array

<form method="post" action="reports.php?report={$report}">
<table align="center">
<tr><td>Date From:</td><td><input type="text" name="datefrom" value="{$datefrom}" class="datepick" /></td><td width="20"></td><td>Date To:</td><td><input type="text" name="dateto" value="{$dateto}" class="datepick" /></td><td width="20"></td><td><input type="submit" value="Submit" /></tr>
</table>
</form>
EOF;
$reportdata["tableheadings"] = array("Coupon Code", "Discount Type", "Value", "Recurring", "Notes", "Usage Count", "Total Revenue");
$i = 0;
$result = select_query("tblpromotions", "", "", "code", "ASC");
while ($data = mysql_fetch_array($result)) {
    $code = $data["code"];
    $type = $data["type"];
    $value = $data["value"];
    $recurring = $data["recurring"];
    $notes = $data["notes"];
    $rowcount = $rowtotal = 0;
    $reportdata["drilldown"][$i]["tableheadings"] = array("Order ID", "Order Date", "Order Number", "Order Total", "Order Status");
    $result2 = select_query("tblorders", "", "promocode='" . db_escape_string($code) . "' AND date>='" . db_make_safe_human_date($datefrom) . "' AND date<='" . db_make_safe_human_date($dateto) . "'", "id", "ASC");
    while ($data = mysql_fetch_array($result2)) {
        $orderid = $data['id'];
        $ordernum = $data['ordernum'];
        $orderdate = $data['date'];
        $ordertotal = $data['amount'];
        $orderstatus = $data['status'];
        $rowcount++;
        $rowtotal += $ordertotal;
        $reportdata["drilldown"][$i]["tablevalues"][] = array('<a href="orders.php?action=view&id=' . $orderid . '">' . $orderid . '</a>', fromMySQLDate($orderdate), $ordernum, $ordertotal, $orderstatus);
    }
    $reportdata["tablevalues"][$i] = array($code, $type, $value, $recurring, $notes, $rowcount, format_as_currency($rowtotal));
    $i++;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:promotions_usage.php

示例12: die

use WHMCS\Input\Sanitize;
if (!defined("WHMCS")) {
    die("This file cannot be accessed directly");
}
if (!function_exists('getRegistrarsDropdownMenu')) {
    require ROOTDIR . '/includes/registrarfunctions.php';
}
$whmcs = App::self();
$reportdata["title"] = $aInt->lang('reports', 'domainRenewalEmailsTitle');
$userID = $whmcs->get_req_var('client');
$domain = $whmcs->get_req_var('domain');
$dateFrom = $whmcs->get_req_var('dateFrom') ? toMySQLDate($whmcs->get_req_var('dateFrom')) : '';
$dateTo = $whmcs->get_req_var('dateTo') ? toMySQLDate($whmcs->get_req_var('dateTo')) : '';
$formDateFrom = $dateFrom ? fromMySQLDate($dateFrom) : '';
$formDateTo = $dateTo ? fromMySQLDate($dateTo) : '';
$registrar = $whmcs->get_req_var('registrar');
$print = $whmcs->get_req_var('print');
/**
 * Replace the "None" string with the "Any" string
 */
$registrarList = str_replace($aInt->lang('global', 'none'), $aInt->lang('global', 'any'), getRegistrarsDropdownMenu($registrar));
$reportdata["description"] = $aInt->lang('reports', 'domainRenewalEmailsDescription');
$reportHeader = '';
if (!$print) {
    $reportHeader = <<<REPORT_HEADER
<form method="post" action="reports.php?report=domain_renewal_emails">
{$aInt->lang('fields', 'clientid')}: {$aInt->clientsDropDown($userID, '', 'client', true)}
{$aInt->lang('fields', 'domain')}: <input type="text" name="domain" value="{$domain}" size="30" />
{$aInt->lang('fields', 'registrar')}: {$registrarList}
{$aInt->lang('fields', 'daterange')}:
开发者ID:MarcelaGotta,项目名称:Webty,代码行数:30,代码来源:domain_renewal_emails.php

示例13: getFiles

 public function getFiles()
 {
     $where = array("userid" => $this->userid);
     if (!defined("ADMINAREA")) {
         $where['adminonly'] = "";
     }
     $files = array();
     $result = select_query("tblclientsfiles", "", $where, "title", "ASC");
     while ($data = mysql_fetch_assoc($result)) {
         $id = $data['id'];
         $title = $data['title'];
         $adminonly = $data['adminonly'];
         $filename = $data['filename'];
         $filename = substr($filename, 11);
         $date = fromMySQLDate($data['dateadded'], 0, 1);
         $files[] = array("id" => $id, "date" => $date, "title" => $title, "adminonly" => $adminonly, "filename" => $filename);
     }
     return $files;
 }
开发者ID:billyprice1,项目名称:whmcs,代码行数:19,代码来源:class.client.php

示例14: select_query

     $managetitle = $aInt->lang("addons", "editaddon");
     $result = select_query("tblhostingaddons", "", array("id" => $aid));
     $data = mysql_fetch_array($result);
     $addonid = $data['addonid'];
     $customname = $data['name'];
     $recurring = $data['recurring'];
     $setupfee = $data['setupfee'];
     $billingcycle = $data['billingcycle'];
     $status = $data['status'];
     $regdate = $data['regdate'];
     $nextduedate = $data['nextduedate'];
     $paymentmethod = $data['paymentmethod'];
     $tax = $data['tax'];
     $notes = $data['notes'];
     $regdate = fromMySQLDate($regdate);
     $nextduedate = fromMySQLDate($nextduedate);
 }
 echo "<h2>" . $managetitle . "</h2>";
 $predefaddons = array();
 $result = select_query("tbladdons", "", "", "weight` ASC,`name", "ASC");
 while ($data = mysql_fetch_array($result)) {
     $preid = $data['id'];
     $name = $data['name'];
     $predefaddons[$preid] = $name;
 }
 $tbl = new WHMCS_Table();
 $tbl->add($aInt->lang("fields", "product"), $frm->hidden("oldserviceid", $id) . $frm->dropdown("id", $servicesarr, $id), 1);
 $tbl->add($aInt->lang("fields", "regdate"), $frm->date("regdate", $regdate));
 $tbl->add($aInt->lang("fields", "setupfee"), $frm->text("setupfee", $setupfee, "10"));
 $tbl->add($aInt->lang("addons", "predefinedaddon"), $frm->dropdown("addonid", $predefaddons, $addonid, "", "", true));
 $tbl->add($aInt->lang("global", "recurring"), $frm->text("recurring", $recurring, "10") . ($aid == "add" ? " " . $frm->checkbox("defaultpricing", $aInt->lang("addons", "usedefault"), true) : ""));
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:clientsservices.php

示例15: full_query

$result = full_query($query);
while ($data = mysql_fetch_array($result)) {
    $reportvalues['tickets_staff_replies'][$data[0]] = $data[1];
}
$query = "SELECT date_format(date, '%e'),COUNT(id) FROM tblcancelrequests WHERE date LIKE '" . $year . "-" . $month . "-%' GROUP BY date_format(date, '%e') ORDER BY date ASC";
$result = full_query($query);
while ($data = mysql_fetch_array($result)) {
    $reportvalues['cancellations_new'][$data[0]] = $data[1];
}
for ($day = 1; $day <= 31; $day++) {
    $date = date("Y-m-d", mktime(0, 0, 0, $month, $day, $year));
    $daytext = date("l", mktime(0, 0, 0, $month, $day, $year));
    $neworders = isset($reportvalues['orders_active'][$day]) ? $reportvalues['orders_active'][$day] : '0';
    $newinvoices = isset($reportvalues['invoices_new'][$day]) ? $reportvalues['invoices_new'][$day] : '0';
    $paidinvoices = isset($reportvalues['invoices_paid'][$day]) ? $reportvalues['invoices_paid'][$day] : '0';
    $newtickets = isset($reportvalues['tickets_new'][$day]) ? $reportvalues['tickets_new'][$day] : '0';
    $ticketreplies = isset($reportvalues['tickets_staff_replies'][$day]) ? $reportvalues['tickets_staff_replies'][$day] : '0';
    $cancellations = isset($reportvalues['cancellations_new'][$day]) ? $reportvalues['cancellations_new'][$day] : '0';
    $reportdata["tablevalues"][] = array($daytext . ' ' . fromMySQLDate($date), $neworders, $newinvoices, $paidinvoices, $newtickets, $ticketreplies, $cancellations);
    $chartdata['rows'][] = array('c' => array(array('v' => fromMySQLDate($date)), array('v' => (int) $neworders), array('v' => (int) $newinvoices), array('v' => (int) $paidinvoices), array('v' => (int) $newtickets), array('v' => (int) $ticketreplies), array('v' => (int) $cancellations)));
}
$chartdata['cols'][] = array('label' => 'Day', 'type' => 'string');
$chartdata['cols'][] = array('label' => 'Completed Orders', 'type' => 'number');
$chartdata['cols'][] = array('label' => 'New Invoices', 'type' => 'number');
$chartdata['cols'][] = array('label' => 'Paid Invoices', 'type' => 'number');
$chartdata['cols'][] = array('label' => 'Opened Tickets', 'type' => 'number');
$chartdata['cols'][] = array('label' => 'Ticket Replies', 'type' => 'number');
$chartdata['cols'][] = array('label' => 'Cancellation Requests', 'type' => 'number');
$args = array();
$args['legendpos'] = 'right';
$reportdata["headertext"] = $chart->drawChart('Area', $chartdata, $args, '400px');
开发者ID:MarcelaGotta,项目名称:Webty,代码行数:31,代码来源:daily_performance.php


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