Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CB9TOIIIA committed Sep 13, 2016
1 parent 00c123d commit 5901af0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion myjbzoostat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<authorUrl>http://cb9t.ru</authorUrl>
<copyright></copyright>
<license></license>
<version>2.0</version>
<version>2.1</version>
<description>MyJBZooStat - это компонент статистики и менеджер системы комментирования Disqus.</description>
<creationDate>28 June 2016</creationDate>
<administration>
Expand Down
6 changes: 3 additions & 3 deletions views/articles/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function rdate($param, $time=0) {

$articlesmonth = "SELECT COUNT(id)"
." FROM " . ZOO_TABLE_ITEM
." WHERE publish_up BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
." WHERE publish_up BETWEEN '".$year."-".$month."-01 00:00:00' AND '".$year."-".$month."-31 23:59:59'";


$Arrayarticlesmonth = $app->table->tag->database->queryResultArray($articlesmonth);
Expand All @@ -119,7 +119,7 @@ function rdate($param, $time=0) {
$querysmonth
->select($db->quoteName('publish_up'))
->from($db->quoteName(ZOO_TABLE_ITEM))
->where($db->quoteName('publish_up') . ' BETWEEN "' .$monthdatetwo.'-01' . '" AND "' .$monthdatetwo.'-31"');
->where($db->quoteName('publish_up') . ' BETWEEN "' .$monthdatetwo.'-01 00:00:00' . '" AND "' .$monthdatetwo.'-31 23:59:59"');


$db->setQuery($querysmonth);
Expand Down Expand Up @@ -186,7 +186,7 @@ function rdate($param, $time=0) {

$articlesmonthtag = "SELECT id"
." FROM " . ZOO_TABLE_ITEM
." WHERE type = '".$TypeArticleorProduct."' AND publish_up BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
." WHERE type = '".$TypeArticleorProduct."' AND publish_up BETWEEN '".$year."-".$month."-01 00:00:00' AND '".$year."-".$month."-31 23:59:59'";

$Arrayarticlesmonthtag = array($app->table->tag->database->queryResultArray($articlesmonthtag));
//
Expand Down
9 changes: 4 additions & 5 deletions views/auhorsprofile/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function rdate($param, $time=0) {
$querystatmonth
->select($db->quoteName('id'))
->from($db->quoteName(ZOO_TABLE_ITEM))
->where($db->quoteName('publish_up') . ' BETWEEN "' .$monthdate.'-01' . '" AND "' .$monthdate.'-31"')
->where($db->quoteName('publish_up') . ' BETWEEN "' .$monthdate.'-01 00:00:00' . '" AND "' .$monthdate.'-31 23:59:59"')
->where($db->quoteName('created_by') . ' = ' . $db->quote($authorid));

$db->setQuery($querystatmonth);
Expand Down Expand Up @@ -373,20 +373,19 @@ function rdate($param, $time=0) {
echo '<h1>'.$bigname.'</h1>';

echo "<p class='countarticlesauthor'><big><big>Всего ".$StatOrProduct." автора: <b>".$countarticlesauthor."</big></big></b></p>";

//fix last day month
$querymonth = "SELECT id"
." FROM " . ZOO_TABLE_ITEM
." WHERE type = '".$TypeArticleorProduct."' AND publish_up BETWEEN '".$monthdate."-01' AND '".$monthdate."-31'
." WHERE type = '".$TypeArticleorProduct."' AND publish_up BETWEEN '".$monthdate."-01 00:00:00' AND '".$monthdate."-31 23:59:59'
AND created_by = '".$authorid."'";

$querymonthcount = "SELECT COUNT(id)"
." FROM " . ZOO_TABLE_ITEM
." WHERE publish_up BETWEEN '".$monthdate."-01' AND '".$monthdate."-31'
." WHERE publish_up BETWEEN '".$monthdate."-01 00:00:00' AND '".$monthdate."-31 23:59:59'
AND created_by = '".$authorid."'";

$Arrayquerymonth = array($app->table->tag->database->queryResultArray($querymonth));
$Arrayquerymonthcccooount = array_count_values($app->table->tag->database->queryResultArray($querymonthcount));

$Arrayquerymonthcountv = array_count_values($app->table->tag->database->queryResultArray($querymonth));

foreach ($Arrayquerymonthcccooount as $keymonthcountv => $novamcount) {
Expand Down
6 changes: 3 additions & 3 deletions views/orders/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function rdate($param, $time=0) {

$articlesmonth = "SELECT id"
." FROM " . ZOO_TABLE_MY_ORDERS
." WHERE created BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
." WHERE created BETWEEN '".$year."-".$month."-01 00:00:00' AND '".$year."-".$month."-31 23:59:59'";


$Arrayarticlesmonthcount = count($app->table->tag->database->queryResultArray($articlesmonth));
Expand All @@ -158,7 +158,7 @@ function rdate($param, $time=0) {
$querysmonth
->select($db->quoteName('created'))
->from($db->quoteName(ZOO_TABLE_MY_ORDERS))
->where($db->quoteName('created') . ' BETWEEN "' .$monthdatetwo.'-01' . '" AND "' .$monthdatetwo.'-31"');
->where($db->quoteName('created') . ' BETWEEN "' .$monthdatetwo.'-01 00:00:00' . '" AND "' .$monthdatetwo.'-31 23:59:59"');


$db->setQuery($querysmonth);
Expand Down Expand Up @@ -314,7 +314,7 @@ function rdate($param, $time=0) {

$totalsuminMymonthsql = "SELECT total"
." FROM " . ZOO_TABLE_MY_ORDERS
." WHERE created BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
." WHERE created BETWEEN '".$year."-".$month."-01 00:00:00' AND '".$year."-".$month."-31 23:59:59'";


$totalsuminMymonths = $app->table->tag->database->queryResultArray($totalsuminMymonthsql);
Expand Down
2 changes: 1 addition & 1 deletion views/reportauthors/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function rdate($param, $time=0) {

$queryauthorss = "SELECT COUNT(id)"
." FROM " . ZOO_TABLE_ITEM
." WHERE created_by = '".$valueid."' AND publish_up BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
." WHERE created_by = '".$valueid."' AND publish_up BETWEEN '".$year."-".$month."-01 00:00:00' AND '".$year."-".$month."-31 23:59:59'";

$idadd++;
$Arrayauthorsscount = array($app->table->tag->database->queryResultArray($queryauthorss));
Expand Down
2 changes: 1 addition & 1 deletion views/tags/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function rdate($param, $time=0) {

$querymonthids = "SELECT id"
." FROM " . ZOO_TABLE_ITEM
." WHERE publish_up BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
." WHERE publish_up BETWEEN '".$year."-".$month."-01 00:00:00' AND '".$year."-".$month."-31 23:59:59'";

$alipublish_upformat = rdate("M", strtotime("+0 seconds", strtotime($month)));
$Arrayarticlesmonth = array($app->table->tag->database->queryResultArray($querymonthids));
Expand Down

0 comments on commit 5901af0

Please sign in to comment.