com web/doc-editor: Fix Year ; add others auth service: scripts/utils/static_stats.php
| From: | Yannick Torres | Date: | Wed, 06 Aug 2014 21:22:10 +0000 |
| Subject: | com web/doc-editor: Fix Year ; add others auth service: scripts/utils/static_stats.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-12708@lists.php.net to get a copy of this message | ||
Commit: e401ecaa1f30d5d5311b3a368fa1047b14957e52
Author: Yannick Torrès <yannick.torres@gmail.com> Wed, 6 Aug 2014 23:22:10 +0200
Parents: bcff1bf5e91baf50be3061a12d53acea1b93d25c
Branches: master
Link: http://git.php.net/?p=web/doc-editor.git;a=commitdiff;h=e401ecaa1f30d5d5311b3a368fa1047b14957e52
Log:
Fix Year ; add others auth service
Changed paths:
M scripts/utils/static_stats.php
Diff:
diff --git a/scripts/utils/static_stats.php b/scripts/utils/static_stats.php
index 9f60499..7db2eda 100644
--- a/scripts/utils/static_stats.php
+++ b/scripts/utils/static_stats.php
@@ -2,26 +2,26 @@
require_once dirname(__FILE__) . '/../../php/DBConnection.php';
-
$nowDate = new DateTime();
$year = ( isset($_GET['d']) ) ? $_GET['d'] :
$nowDate->format('Y');
$db = DBConnection::getInstance();
-
-
$s = "select * from staticValue WHERE type='info' and
YEAR(
date)='".$year."'";
$r = $db->query($s, array());
-
$info = array(
"nbCon"=> array(
"total" => 0,
"authService" => array(
"VCS" => 0,
"google" => 0,
- "facebook" => 0
+ "facebook" => 0,
+ "github" => 0,
+ "instagram" => 0,
+ "stackoverflow" => 0,
+ "linkedin" => 0
)
),
"byMonth"=>Array()
@@ -84,7 +84,17 @@ while( $a = $r->fetch_object()) {
}
echo "<h1 style=\"text-align: center\">Year :
".$year."</h1>";
-echo '<div id="top"><a href="?d=2010">2010</a> - <a
href="?d=2011">2011</a> - <a
href="?d=2012">2012</a></div>';
+echo '<div id="top">';
+
+for( $i=2010; $i <= $nowDate->format('Y'); $i++ ) {
+
+ echo '<a href="?d='.$i.'">'.$i.'</a>';
+ if( $i != $nowDate->format('Y') ) echo ' - ';
+}
+
+//<a href="?d=2010">2010</a> - <a
href="?d=2011">2011</a> - <a href="?d=2012">2012</a>
+
+echo '</div>';
echo "<h1>All language</h1>";
echo "<table border=1>";
echo "<tr>";
@@ -175,7 +185,17 @@ echo "<tr>";
echo "</tr>";
-echo "</table>(Nb connexion per auth Service : Google =>
".$info["nbCon"]["authService"]["google"]."; Facebook =>
".$info["nbCon"]["authService"]["facebook"]."; VCS =>
".$info["nbCon"]["authService"]["VCS"].")<br>";
+echo "</table>(Nb connexion per auth Service :
+
+Google => ".$info["nbCon"]["authService"]["google"].";
+Facebook =>
".$info["nbCon"]["authService"]["facebook"].";
+Github => ".$info["nbCon"]["authService"]["github"].";
+Instagram =>
".$info["nbCon"]["authService"]["instagram"].";
+Stackoverflow =>
".$info["nbCon"]["authService"]["stackoverflow"].";
+Linkedin =>
".$info["nbCon"]["authService"]["linkedin"].";
+VCS => ".$info["nbCon"]["authService"]["VCS"].";
+
+)<br>";
while( list($lang, $v) = each($availableLang)) {