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

PHP ModuleGraph类代码示例

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

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



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

示例1: getEquipment

    /**
     * @return array Get list of browser "plugins" (javascript, media player, etc.)
     */
    private function getEquipment()
    {
        $sql = 'SELECT DISTINCT g.*
				FROM `' . _DB_PREFIX_ . 'connections` c 
				LEFT JOIN `' . _DB_PREFIX_ . 'guest` g ON g.`id_guest` = c.`id_guest`
				WHERE c.`date_add` BETWEEN ' . ModuleGraph::getDateBetween() . '
					' . Shop::addSqlRestriction(false, 'c');
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql);
        $calcArray = array('jsOK' => 0, 'jsKO' => 0, 'javaOK' => 0, 'javaKO' => 0, 'wmpOK' => 0, 'wmpKO' => 0, 'qtOK' => 0, 'qtKO' => 0, 'realOK' => 0, 'realKO' => 0, 'flashOK' => 0, 'flashKO' => 0, 'directorOK' => 0, 'directorKO' => 0);
        while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result)) {
            if (!$row['javascript']) {
                ++$calcArray['jsKO'];
                continue;
            }
            ++$calcArray['jsOK'];
            $row['windows_media'] ? ++$calcArray['wmpOK'] : ++$calcArray['wmpKO'];
            $row['real_player'] ? ++$calcArray['realOK'] : ++$calcArray['realKO'];
            $row['adobe_flash'] ? ++$calcArray['flashOK'] : ++$calcArray['flashKO'];
            $row['adobe_director'] ? ++$calcArray['directorOK'] : ++$calcArray['directorKO'];
            $row['sun_java'] ? ++$calcArray['javaOK'] : ++$calcArray['javaKO'];
            $row['apple_quicktime'] ? ++$calcArray['qtOK'] : ++$calcArray['qtKO'];
        }
        if (!$calcArray['jsOK']) {
            return false;
        }
        $equip = array('Windows Media Player' => $calcArray['wmpOK'] / ($calcArray['wmpOK'] + $calcArray['wmpKO']), 'Real Player' => $calcArray['realOK'] / ($calcArray['realOK'] + $calcArray['realKO']), 'Apple Quicktime' => $calcArray['qtOK'] / ($calcArray['qtOK'] + $calcArray['qtKO']), 'Sun Java' => $calcArray['javaOK'] / ($calcArray['javaOK'] + $calcArray['javaKO']), 'Adobe Flash' => $calcArray['flashOK'] / ($calcArray['flashOK'] + $calcArray['flashKO']), 'Adobe Shockwave' => $calcArray['directorOK'] / ($calcArray['directorOK'] + $calcArray['directorKO']));
        arsort($equip);
        return $equip;
    }
开发者ID:jicheng17,项目名称:vipinsg,代码行数:32,代码来源:statsequipment.php


示例2: hookAdminStatsModules

    function hookAdminStatsModules()
    {
        $result = Db::getInstance()->ExecuteS($this->_query . ModuleGraph::getDateBetween() . $this->_query2);
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        if ($result and sizeof($result)) {
            $table = '<div style="overflow-y: scroll; height: 600px;">
			<table class="table" border="0" cellspacing="0" cellspacing="0">
			<thead>
				<tr><th style="width:400px;">' . $this->l('Keywords') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Occurences') . '</th></tr>
			</thead><tbody>';
            foreach ($result as $index => $row) {
                $keyword =& $row['keyword'];
                $occurences =& $row['occurences'];
                $table .= '<tr><td>' . $keyword . '</td><td style="text-align: right">' . $occurences . '</td></tr>';
            }
            $table .= '</tbody></table></div>';
            $this->_html .= '<center>' . ModuleGraph::engine(array('type' => 'pie')) . '</center><br class="clear" />' . $table;
        } else {
            $this->_html .= '<p><strong>' . $this->l('No keyword searched for more than once found') . '</strong></p>';
        }
        $this->_html .= '</fieldset><br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Identify external search engines keywords') . '</h2>
			<p>' . $this->l('There are many ways to find a website, but one of the most common is to find it with a search engine. Identifying the most "visitor-making" keywords entered by your new visitors is really important, it allows you to see which product you have to put in front if you want more visitors and customers.') . '</p><br />
			<h3>' . $this->l('How does it work?') . '</h2>
			<p>' . $this->l('When a visitors comes to your website, the server knows its previous location. This module parses this URL and finds the keywords in it. Currently, it manages the following search engines:') . '<b> Google, AOL, Yandex, Ask, NHL, Yahoo, Baidu, Lycos, Exalead, Live, Voila</b> ' . $this->l('and') . ' <b>Altavista</b>. ' . $this->l('Soon it will be possible to add dynamically new search engine and to contribute to this module!') . '</p><br />
		</fieldset>';
        return $this->_html;
    }
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:30,代码来源:sekeywords.php


示例3: hookAdminStatsModules

    public function hookAdminStatsModules($params)
    {
        $totalVisits = $this->getTotalVisits();
        $totalGuests = $this->getTotalGuests();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p><center>
				<img src="../img/admin/down.gif" />' . $this->l('A visit correspond to the coming of an internet user on your shop. Until the end of his session, only one visit is counted.') . '
				' . $this->l('A visitor is an unknown person - who has not registered or logged on - surfing on your shop. A visitor can come and visit your shop many times.') . '
			</center></p>
			<div style="margin-top:20px"></div>
			<p>' . $this->l('Total visits:') . ' ' . $totalVisits . '</p>
			<p>' . $this->l('Total visitors:') . ' ' . $totalGuests . '</p>
			' . ($totalVisits ? ModuleGraph::engine(array('layers' => 2, 'type' => 'line', 'option' => 3)) . '<br /><br />' : '') . '
		</fieldset>
		<br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
				<h2>' . $this->l('Determine the interest of a visit') . '</h2>
				' . $this->l('Visitors\' evolution graph strongly looks like to the visits\' graph, but provides an additional information: <strong>Do your visitors come back?</strong>') . '<br />
				<ul>
					<li>' . $this->l('if this is the case, congratulations, your website is well-thought-out and undeniably pleases.') . '</li>
					<li>' . $this->l('Otherwise, the conclusion is not so simple. The problem can be esthetic or ergonomic, or else the offer not sufficient. It\'s also possible that these visitors mistakenly came here, without particular interest for your shop; this phenomenon often happens with the search engines.') . '</li>
				</ul>
				' . $this->l('This information is mostly qualitative: you have to determin the interest of a disjointed visit.') . '<br />
		</fieldset>';
        return $this->_html;
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:27,代码来源:statsvisits.php


示例4: hookAdminStatsModules

    public function hookAdminStatsModules($params)
    {
        $equipment = $this->getEquipment();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<center>
				<p><img src="../img/admin/down.gif" />' . $this->l('Determine the percentage of web browser used by your customers.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'wb')) . '<br /><br />
				<p><img src="../img/admin/down.gif" />' . $this->l('Determine the percentage of operating systems used by your customers.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'os')) . '';
        if ($equipment) {
            $this->_html .= '<table class="table space" border="0" cellspacing="0" cellpadding="0">
			<tr><th style="width: 200px">' . $this->l('Plug-ins') . '</th><th></th></tr>';
            foreach ($equipment as $name => $value) {
                $this->_html .= '<tr><td>' . $name . '</td><td>' . number_format(100 * $value, 2) . '%</td></tr>';
            }
            $this->_html .= '</table>';
        }
        $this->_html .= '
			</center>
		</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
		<h2>' . $this->l('Ensure that your website is accessible to all') . '</h2>
			<p>
				' . $this->l('When managing Websites, it is important to keep track of software used by visitors in order to be sure that the site displays the same way for everyone, and PrestaShop was built in order to be compatible with most recent Web browsers and computer operating systems (OS). However, because you may end up adding advanced features to your Website or even modify the core PrestaShop code, these additions may not be accessible by everyone. That is why it is a good idea to keep tabs on the percentage of users for each type of software before adding or changing something that only a limited number of users will be able to access.') . '
			</p><br />
			
		</fieldset>';
        return $this->_html;
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:30,代码来源:statsequipment.php


示例5: hookAdminStatsModules

    public function hookAdminStatsModules($params)
    {
        $totalRegistrations = $this->getTotalRegistrations();
        $totalBlocked = $this->getBlockedVisitors();
        $totalBuyers = $this->getFirstBuyers();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p>
				' . $this->l('Visitors who have stopped at the registering step:') . ' ' . intval($totalBlocked) . ($totalRegistrations ? ' (' . number_format(100 * $totalBlocked / ($totalRegistrations + $totalBlocked), 2) . '%)' : '') . '<br />
				' . $this->l('Visitors who have placed an order directly after the registration:') . ' ' . intval($totalBuyers) . ($totalRegistrations ? ' (' . number_format(100 * $totalBuyers / $totalRegistrations, 2) . '%)' : '') . '
			</p>
			<p>' . $this->l('Total customer accounts:') . ' ' . $totalRegistrations . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line')) . '</center>
		</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Number of customer accounts created') . '</h2>
			<p>' . $this->l('The total number of accounts created is not in itself important information. However, it is interesting to analyze the number created over time. This will indicate whether or not things are on the right track.') . '</p>
			<br /><h3>' . $this->l('How to act on the registrations\' evolution?') . '</h3>
			<p>
				' . $this->l('If you let your shop run without changing anything, the number of customer registrations should stay stable or slightly decline.') . '
				' . $this->l('A significant increase or decrease shows that there has probably been a change to your shop; therefore, you have to identify it in order to backtrack if this change makes the number of registrations decrease, or continue with it if it is advantageous.') . '<br />
				' . $this->l('Here\'s a summary of what can affect the creation of customer accounts:') . '
				<ul>
					<li>' . $this->l('An advertising campaign can attract a greater number of visitors. An increase in customer accounts which will ensue, which will depend on their \\"quality\\": well-targeted advertising can be more effective than large-scale advertising.') . '</li>
					<li>' . $this->l('Specials, sales, or contests create greater attention and curiosity, not only keeping your shop lively but also increasing its traffic. This way, you can push impulsive buyers to take the plunge.') . '</li>
					<li>' . $this->l('Design and user-friendliness are more important than ever: an ill-chosen or hard-to-follow graphical theme can turn off visitors. You have to strike the right balance between an innovative design and letting visitors move around easily. Proper spelling and clarity also inspire more customer confidence in your shop.') . '</li>
				</ul>
			</p><br />
		</fieldset>';
        return $this->_html;
    }
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:31,代码来源:statsregistrations.php


示例6: hookAdminStatsModules

    function hookAdminStatsModules()
    {
        $result = Db::getInstance()->ExecuteS($this->_query . ModuleGraph::getDateBetween() . $this->_query2);
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        $table = '<div style="overflow-y: scroll; height: 600px;">
		<table class="table" border="0" cellspacing="0" cellspacing="0">
		<thead>
			<tr>
				<th style="width:400px;">' . $this->l('keywords') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Occurences') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Results') . '</th>
			</tr>
		</thead><tbody>';
        foreach ($result as $row) {
            $table .= '<tr>
				<td>' . $row['keywords'] . '</td>
				<td style="text-align: right">' . $row['occurences'] . '</td>
				<td style="text-align: right">' . $row['total'] . '</td>
			</tr>';
        }
        $table .= '</tbody></table></div>';
        if (sizeof($result)) {
            $this->_html .= '<center>' . ModuleGraph::engine(array('type' => 'pie')) . '</center><br class="clear" />' . $table;
        } else {
            $this->_html .= '<p><strong>' . $this->l('No keywords searched more than once found.') . '</strong></p>';
        }
        $this->_html .= '</fieldset>';
        return $this->_html;
    }
开发者ID:sealence,项目名称:local,代码行数:30,代码来源:statssearch.php


示例7: hookAdminStatsModules

    public function hookAdminStatsModules($params)
    {
        $totalVisits = $this->getTotalVisits();
        $totalGuests = $this->getTotalGuests();
        if (Tools::getValue('export')) {
            $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => 3));
        }
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p><center>
				<img src="../img/admin/down.gif" />' . $this->l('A visit corresponds to an internet user coming to your shop. Until the end of their session, only one visit is counted.') . '
				' . $this->l('A visitor is an unknown person, who has not registered or logged on, surfing on your shop. A visitor can come and visit your shop many times.') . '
			</center></p>
			<div style="margin-top:20px"></div>
			<p>' . $this->l('Total visits:') . ' ' . $totalVisits . '</p>
			<p>' . $this->l('Total visitors:') . ' ' . $totalGuests . '</p>
			' . ($totalVisits ? ModuleGraph::engine(array('layers' => 2, 'type' => 'line', 'option' => 3)) . '<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>' : '') . '
			
		</fieldset>
		<br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
				<h2>' . $this->l('Determine the interest of a visit') . '</h2>
				' . $this->l('The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:') . '<br />
				<ul>
					<li>' . $this->l('If this is the case, congratulations, your website is well planned and pleasing.') . '</li>
					<li>' . $this->l('Otherwise, the conclusion is not so simple. The problem can be aesthetic or ergonomic, or else the offer is not sufficient. It is also possible that these visitors mistakenly came here without particular interest for your shop; this phenomenon often happens with the search engines.') . '</li>
				</ul>
				' . $this->l('This information is mostly qualitative: you have to determine the interest of a disjointed visit.') . '<br />
		</fieldset>';
        return $this->_html;
    }
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:31,代码来源:statsvisits.php


示例8: hookAdminStatsModules

    public function hookAdminStatsModules($params)
    {
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        if (sizeof(Customer::getCustomers())) {
            if (Tools::getValue('export')) {
                if (Tools::getValue('exportType') == 'gender') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'gender'));
                } elseif (Tools::getValue('exportType') == 'age') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'age'));
                } elseif (Tools::getValue('exportType') == 'country') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'country'));
                } elseif (Tools::getValue('exportType') == 'currency') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'currency'));
                } elseif (Tools::getValue('exportType') == 'language') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'language'));
                }
            }
            $this->_html .= '
			
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Gender distribution allows you to determine the percentage of men and women among your customers.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'gender')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=gender"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
				<br class="clear" /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Age ranges allows you to determine in which age range your customers are.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'age')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=age"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Country distribution allows you to determine in which part of the world your customers are shopping from.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'country')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=country"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Currency ranges allows you to determine which currencies your customers are using.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'currency')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=currency"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Language distribution allows you to determine the general languages your customers are using on your shop.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'language')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=language"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
			</center>';
        } else {
            $this->_html .= '<p>' . $this->l('No customers registered yet.') . '</p>';
        }
        $this->_html .= '
		</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Target your audience') . '</h2>
			<p>
				' . $this->l('In order for each message to have an impact, you need to know to whom it should be addressed.') . '
				' . $this->l('Addressing the right audience is essential for choosing the right tools to win them over.') . '
				' . $this->l('It is best to limit action to a group or groups of clients.') . '
				' . $this->l('Registered customer information allows you to accurately define the typical customer profile so that you can adapt your specials to various criteria.') . '
			</p><br />
			<p>
				' . $this->l('You should use this information to increase your sales by') . '
				<ul>
					<li class="bullet">' . $this->l('launching ad campaigns addressed to specific customers who might be interested in a particular offer at specific dates and times.') . '</li>
					<li class="bullet">' . $this->l('Contacting a group of clients by e-mail / newsletter.') . '</li>
				</ul>
			</p><br />
		</fieldset>';
        return $this->_html;
    }
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:59,代码来源:statspersonalinfos.php


示例9: getTotalGuests

    public function getTotalGuests()
    {
        $sql = 'SELECT COUNT(DISTINCT c.`id_guest`)
				FROM `' . _DB_PREFIX_ . 'connections` c
				WHERE c.`date_add` BETWEEN ' . ModuleGraph::getDateBetween() . '
					' . Shop::addSqlRestriction(false, 'c');
        return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
    }
开发者ID:carloslastresDev,项目名称:HealthyTaiwan_UsingPrestaShop,代码行数:8,代码来源:statsvisits.php


示例10: getTotals

    private function getTotals()
    {
        $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
		SELECT COUNT(*) as customers
		FROM `' . _DB_PREFIX_ . 'customer` c
		WHERE c.`newsletter_date_add` BETWEEN ' . ModuleGraph::getDateBetween());
        $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
		SELECT COUNT(*) as visitors
		FROM ' . _DB_PREFIX_ . 'newsletter n
		WHERE n.`newsletter_date_add` BETWEEN ' . ModuleGraph::getDateBetween());
        return array('customers' => $result1['customers'], 'visitors' => $result2['visitors'], 'both' => $result1['customers'] + $result2['visitors']);
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:12,代码来源:statsnewsletter.php


示例11: getFirstBuyers

    public function getFirstBuyers()
    {
        $sql = 'SELECT COUNT(DISTINCT o.`id_customer`) as buyers
				FROM `' . _DB_PREFIX_ . 'orders` o
				LEFT JOIN `' . _DB_PREFIX_ . 'guest` g ON o.id_customer = g.id_customer
				LEFT JOIN `' . _DB_PREFIX_ . 'connections` c ON c.id_guest = g.id_guest
				WHERE o.`date_add` BETWEEN ' . ModuleGraph::getDateBetween() . '
					' . Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o') . '
					AND o.valid = 1
					AND ABS(TIMEDIFF(o.date_add, c.date_add)+0) < 120000';
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
        return $result['buyers'];
    }
开发者ID:jpodracky,项目名称:dogs,代码行数:13,代码来源:statsregistrations.php


示例12: getTotalViewed

    public function getTotalViewed($id_product)
    {
        $date_between = ModuleGraph::getDateBetween();
        $sql = 'SELECT SUM(pv.`counter`) AS total
				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\'
					' . Shop::addSqlRestriction(false, 'pv') . '
					AND p.`id_object` = ' . (int) $id_product . '
					AND dr.`time_start` BETWEEN ' . $date_between . '
					AND dr.`time_end` BETWEEN ' . $date_between;
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
        return isset($result['total']) ? $result['total'] : 0;
    }
开发者ID:dev-lav,项目名称:htdocs,代码行数:16,代码来源:statsproduct.php


示例13: getTotals

    private function getTotals()
    {
        $sql = 'SELECT COUNT(*) as customers
				FROM `' . _DB_PREFIX_ . 'customer`
				WHERE 1
					' . Shop::addSqlRestriction(Shop::SHARE_CUSTOMER) . '
					AND `newsletter_date_add` BETWEEN ' . ModuleGraph::getDateBetween();
        $result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
        $sql = 'SELECT COUNT(*) as visitors
				FROM ' . _DB_PREFIX_ . 'newsletter
				WHERE 1
				   ' . Shop::addSqlRestriction() . '
					AND `newsletter_date_add` BETWEEN ' . ModuleGraph::getDateBetween();
        $result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
        return array('customers' => $result1['customers'], 'visitors' => $result2['visitors'], 'both' => $result1['customers'] + $result2['visitors']);
    }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:16,代码来源:statsnewsletter.php


示例14: hookAdminStatsModules

    public function hookAdminStatsModules()
    {
        $websites = $this->getOrigins(ModuleGraph::getDateBetween());
        if (Tools::getValue('export')) {
            if (Tools::getValue('exportType') == 'top') {
                $this->csvExport(array('type' => 'pie'));
            }
        }
        $this->_html = '<div class="blocStats"><h2 class="icon-' . $this->name . '"><span></span>' . $this->l('Origin') . '</h2>';
        if (count($websites)) {
            $this->_html .= '
			<p><img src="../img/admin/down.gif" />' . $this->l('Here we break down the 10 most popular referral websites that call customers to your e-store.') . '</p>
			<div>' . $this->engine(array('type' => 'pie')) . '</div><br />
			<p><a class="button export-csv" href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1&exportType=top"><span>' . $this->l('CSV Export') . '</span></a></p><br />
			
			<table class="table " border="0" cellspacing="0" cellspacing="0">
				<tr>
					<th style="width:400px;">' . $this->l('Origin') . '</th>
					<th style="width:50px; text-align: right">' . $this->l('Total') . '</th>
				</tr>';
            foreach ($websites as $website => $total) {
                $this->_html .= '<tr>
					<td>' . (!strstr($website, ' ') ? '<a href="' . Tools::getProtocol() . $website . '">' : '') . $website . (!strstr($website, ' ') ? '</a>' : '') . '</td><td style="text-align: right">' . $total . '</td>
				</tr>';
            }
            $this->_html .= '</table></div>';
        } else {
            $this->_html .= '<p><strong>' . $this->l('Direct links only') . '</strong></p>';
        }
        $this->_html .= '</div><br />
		<div class="blocStats"><h2 class="icon-guide"><span></span>' . $this->l('Guide') . '</h2>
		<h2>' . $this->l('What is a referral website?') . '</h2>
			<p>
				' . $this->l('When visiting a webpage, the referrer is the URL of the previous webpage from which a link was followed.') . '<br />
				' . $this->l('A referrer enables you to know which keywords visitors use in search engines when browsing for your online store.') . '<br /><br />
				' . $this->l('A referrer can be:') . '
				<ul>
					<li class="bullet">' . $this->l('Someone who posts a link to your shop.') . '</li>
					<li class="bullet">' . $this->l('A partner who has agreed to a link exchange in order to attract new customers.') . '</li>
				</ul>
			</p>
		</div>';
        return $this->_html;
    }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:44,代码来源:statsorigin.php


示例15: hookAdminStatsModules

    function hookAdminStatsModules()
    {
        $websites = $this->getOrigins(ModuleGraph::getDateBetween());
        if (Tools::getValue('export')) {
            if (Tools::getValue('exportType') == 'top') {
                $this->csvExport(array('type' => 'pie'));
            }
        }
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->l('Origin') . '</legend>';
        if (sizeof($websites)) {
            $this->_html .= '
			<center><p><img src="../img/admin/down.gif" />' . $this->l('Here is the percentage of the 10 most popular referrer websites by which visitors went through to get to your shop.') . '</p>
			' . ModuleGraph::engine(array('type' => 'pie')) . '</center>
			<p><a href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1&exportType=top"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
			<div style="overflow-y: scroll; height: 600px;">
			<center>
			<table class="table " border="0" cellspacing="0" cellspacing="0">
				<tr>
					<th style="width:400px;">' . $this->l('Origin') . '</th>
					<th style="width:50px; text-align: right">' . $this->l('Total') . '</th>
				</tr>';
            foreach ($websites as $website => $total) {
                $this->_html .= '<tr><td>' . (!strstr($website, ' ') ? '<a href="' . Tools::getProtocol() . $website . '">' : '') . $website . (!strstr($website, ' ') ? '</a>' : '') . '</td><td style="text-align: right">' . $total . '</td></tr>';
            }
            $this->_html .= '</table></center></div>';
        } else {
            $this->_html .= '<p><strong>' . $this->l('Direct links only') . '</strong></p>';
        }
        $this->_html .= '</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
		<h2>' . $this->l('What is a referrer website?') . '</h2>
			<p>
				' . $this->l('When visiting a webpage, the referrer is the URL of the previous webpage from which a link was followed.') . '<br />
				' . $this->l('A referrer enables you to know which keywords are entered by visitors in search engines when getting to your shop and allows you to optimize web promotion.') . '<br /><br />
				' . $this->l('A referrer can be:') . '
				<ul>
					<li class="bullet">' . $this->l('Someone who put a link on their website for your shop') . '</li>
					<li class="bullet">' . $this->l('A partner with whom you made a link exchange in order to bring in sales or attract new customers') . '</li>
				</ul>
			</p>
		</fieldset>';
        return $this->_html;
    }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:43,代码来源:statsorigin.php


示例16: getData

    protected function getData($layers)
    {
        $stateQuery = '';
        if (intval($this->_option)) {
            $stateQuery = 'AND (SELECT oh.id_order_state FROM `' . _DB_PREFIX_ . 'order_history` oh WHERE o.id_order = oh.id_order ORDER BY oh.date_add DESC, oh.id_order_history DESC LIMIT 1) = ' . intval($this->_option);
        }
        $this->_titles['main'] = $this->l('Percentage of orders by carrier');
        $result = Db::getInstance()->ExecuteS('
		SELECT c.name, COUNT(DISTINCT o.`id_order`) as total
		FROM `' . _DB_PREFIX_ . 'carrier` c
		LEFT JOIN `' . _DB_PREFIX_ . 'orders` o ON o.id_carrier = c.id_carrier
		WHERE o.`date_add` BETWEEN ' . ModuleGraph::getDateBetween() . '
		' . $stateQuery . '
		GROUP BY c.`id_carrier`');
        foreach ($result as $row) {
            $this->_values[] = $row['total'];
            $this->_legend[] = $row['name'];
        }
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:19,代码来源:statscarrier.php


示例17: hookAdminStatsModules

    public function hookAdminStatsModules()
    {
        if (Tools::getValue('export')) {
            $this->csvExport(array('type' => 'pie'));
        }
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query . ModuleGraph::getDateBetween() . $this->query_group_by);
        $this->html = '
		<div class="panel-heading">
			' . $this->displayName . '
		</div>';
        $table = '
		<table class="table">
			<thead>
				<tr>
					<th><span class="title_box active">' . $this->l('Keywords') . '</span></th>
					<th><span class="title_box active">' . $this->l('Occurrences') . '</span></th>
					<th><span class="title_box active">' . $this->l('Results') . '</span></th>
				</tr>
			</thead>
			<tbody>';
        foreach ($result as $row) {
            if (Tools::strlen($row['keywords']) >= Configuration::get('PS_SEARCH_MINWORDLEN')) {
                $table .= '<tr>
					<td>' . $row['keywords'] . '</td>
					<td>' . $row['occurences'] . '</td>
					<td>' . $row['total'] . '</td>
				</tr>';
            }
        }
        $table .= '
			</tbody>
		</table>';
        if (count($result)) {
            $this->html .= '<div>' . $this->engine(array('type' => 'pie')) . '</div>
							<a class="btn btn-default" href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1">
								<i class="icon-cloud-upload"></i> ' . $this->l('CSV Export') . '
							</a>' . $table;
        } else {
            $this->html .= '<p>' . $this->l('Cannot find any keywords that have been searched for more than once.') . '</p>';
        }
        return $this->html;
    }
开发者ID:jpodracky,项目名称:dogs,代码行数:42,代码来源:statssearch.php


示例18: getPages

    private function getPages()
    {
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
		SELECT http_referer, request_uri, COUNT(*) as nb
		FROM `' . _DB_PREFIX_ . 'pagenotfound` p
		WHERE p.date_add BETWEEN ' . ModuleGraph::getDateBetween() . '
		GROUP BY http_referer, request_uri');
        $pages = array();
        foreach ($result as $row) {
            $row['http_referer'] = parse_url($row['http_referer'], PHP_URL_HOST) . parse_url($row['http_referer'], PHP_URL_PATH);
            if (!isset($row['http_referer']) or empty($row['http_referer'])) {
                $row['http_referer'] = '--';
            }
            if (!isset($pages[$row['request_uri']])) {
                $pages[$row['request_uri']] = array('nb' => 0);
            }
            $pages[$row['request_uri']][$row['http_referer']] = $row['nb'];
            $pages[$row['request_uri']]['nb'] += $row['nb'];
        }
        uasort($pages, 'pnfSort');
        return $pages;
    }
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:22,代码来源:pagesnotfound.php


示例19: hookAdminStatsModules

    public function hookAdminStatsModules()
    {
        $websites = $this->getOrigins(ModuleGraph::getDateBetween());
        if (Tools::getValue('export')) {
            if (Tools::getValue('exportType') == 'top') {
                $this->csvExport(array('type' => 'pie'));
            }
        }
        $this->_html = '<div class="panel-heading">' . $this->l('Origin') . '</div>';
        if (count($websites)) {
            $this->_html .= '
			<div class="alert alert-info">
				' . $this->l('In the tab, we break down the 10 most popular referral websites that bring customers to your online store.') . '
			</div>
			<h4>' . $this->l('Guide') . '</h4>
			<div class="alert alert-warning">
				<h4>' . $this->l('What is a referral website?') . '</h4>
				<p>
					' . $this->l('The referrer is the URL of the previous webpage from which a link was followed by the visitor.') . '<br />
					' . $this->l('A referrer also enables you to know which keywords visitors use in search engines when browsing for your online store.') . '<br /><br />
					' . $this->l('A referrer can be:') . '
				</p>
				<ul>
					<li>' . $this->l('Someone who posts a link to your shop.') . '</li> 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP ModuleHandler类代码示例发布时间:2022-05-23
下一篇:
PHP ModuleFrontController类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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