本文整理汇总了PHP中Chart::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Chart::display方法的具体用法?PHP Chart::display怎么用?PHP Chart::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chart
的用法示例。
在下文中一共展示了Chart::display方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
global $cookie;
$this->warnDomainName();
$tab = get_class();
$protocol = Tools::usingSecureMode() ? 'https' : 'http';
$isoDefault = Language::getIsoById(intval(Configuration::get('PS_LANG_DEFAULT')));
$isoUser = Language::getIsoById(intval($cookie->id_lang));
$isoCountry = Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'));
$currency = new Currency((int) Configuration::get('PS_CURRENCY_DEFAULT'));
$employee = new Employee($cookie->id_employee);
echo '<div>
<h1>' . $this->l('Dashboard') . '</h1>
<hr style="background-color: #812143;color: #812143;" />
<br />';
if (@ini_get('allow_url_fopen')) {
$upgrade = new Upgrader();
if ($update = $upgrade->checkPSVersion()) {
echo '<div class="warning warn" style="margin-bottom:30px;"><h3>' . $this->l('New PrestaShop version available') . ' : <a style="text-decoration: underline;" href="' . $update['link'] . '" target="_blank">' . $this->l('Download') . ' ' . $update['name'] . '</a> !</h3></div>';
}
} else {
echo '<p>' . $this->l('Update notification unavailable') . '</p>';
echo '<p> </p>';
echo '<p>' . $this->l('To receive PrestaShop update warnings, you need to activate the <b>allow_url_fopen</b> command in your <b>php.ini</b> config file.') . ' [<a href="http://www.php.net/manual/' . $isoUser . '/ref.filesystem.php">' . $this->l('more info') . '</a>]</p>';
echo '<p>' . $this->l('If you don\'t know how to do that, please contact your host administrator !') . '</p><br>';
}
echo '</div>';
if ($employee->bo_show_screencast) {
echo '
<div id="adminpresentation">
<iframe src="' . $protocol . '://screencasts.prestashop.com/screencast.php?iso_lang=' . Tools::strtolower($isoUser) . '" style="border:none;width:100%;height:420px;" scrolling="no"></iframe>
<div id="footer_iframe_home">
<!--<a href="#">' . $this->l('View more video tutorials') . '</a>-->
<input type="checkbox" id="screencast_dont_show_again"><label for="screencast_dont_show_again">' . $this->l('don\'t show again') . '</label>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$(\'#screencast_dont_show_again\').click(function() {
if ($(this).is(\':checked\'))
{
$.ajax({
type: \'POST\',
async: true,
url: \'ajax.php?toggleScreencast\',
success: function(data) {
$(\'#adminpresentation\').slideUp(\'slow\');
}
});
}
});
});
</script>
<div class="clear"></div><br />';
}
echo '
<div id="column_left">
<ul class="F_list clearfix">
<li id="first_block">
<h4><a href="index.php?tab=AdminCatalog&addcategory&token=' . Tools::getAdminTokenLite('AdminCatalog') . '">' . $this->l('New category') . '</a></h4>
<p>' . $this->l('Create a new category and organize your products.') . '</p>
</li>
<li id="second_block">
<h4><a href="index.php?tab=AdminCatalog&id_category=1&addproduct&token=' . Tools::getAdminTokenLite('AdminCatalog') . '">' . $this->l('New product') . '</a></h4>
<p>' . $this->l('Fill up your catalog with new articles and attributes.') . '</p>
</li>
<li id="third_block">
<h4><a href="index.php?tab=AdminStats&token=' . Tools::getAdminTokenLite('AdminStats') . '">' . $this->l('Statistics') . '</a></h4>
<p>' . $this->l('Manage your activity with a thorough analysis of your e-shop.') . '</p>
</li>
<li id="fourth_block">
<h4><a href="index.php?tab=AdminEmployees&addemployee&token=' . Tools::getAdminTokenLite('AdminEmployees') . '">' . $this->l('New employee') . '</a></h4>
<p>' . $this->l('Add a new employee account and discharge a part of your duties of shop owner.') . '</p>
</li>
</ul>
';
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT SUM(o.`total_paid_real` / o.conversion_rate) as total_sales, COUNT(*) as total_orders
FROM `' . _DB_PREFIX_ . 'orders` o
WHERE o.valid = 1
AND o.`invoice_date` BETWEEN \'' . date('Y-m') . '-01 00:00:00\' AND \'' . date('Y-m') . '-31 23:59:59\' ');
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT COUNT(`id_customer`) AS total_registrations
FROM `' . _DB_PREFIX_ . 'customer` c
WHERE c.`date_add` BETWEEN \'' . date('Y-m') . '-01 00:00:00\' AND \'' . date('Y-m') . '-31 23:59:59\'');
$result3 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT SUM(pv.`counter`) AS total_viewed
FROM `' . _DB_PREFIX_ . 'page_viewed` pv
LEFT JOIN `' . _DB_PREFIX_ . 'date_range` dr ON pv.`id_date_range` = dr.`id_date_range`
LEFT JOIN `' . _DB_PREFIX_ . 'page` p ON pv.`id_page` = p.`id_page`
LEFT JOIN `' . _DB_PREFIX_ . 'page_type` pt ON pt.`id_page_type` = p.`id_page_type`
WHERE pt.`name` = \'product.php\'
AND dr.`time_start` BETWEEN \'' . date('Y-m') . '-01 00:00:00\' AND \'' . date('Y-m') . '-31 23:59:59\'
AND dr.`time_end` BETWEEN \'' . date('Y-m') . '-01 00:00:00\' AND \'' . date('Y-m') . '-31 23:59:59\'');
$results = array_merge($result, array_merge($result2, $result3));
echo '
<div class="table_info">
<h5><a href="index.php?tab=AdminStats&token=' . Tools::getAdminTokenLite('AdminStats') . '">' . $this->l('View more') . '</a> ' . $this->l('Monthly Statistics') . ' </h5>
<table class="table_info_details">
<tr class="tr_odd">
//.........这里部分代码省略.........