Web: take start and end date in account for displaying accounts

This commit is contained in:
Gregory Soutade 2018-05-01 14:53:42 +02:00
parent 2e471ecbe5
commit eddea6e37d
1 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ if (!isset($_SESSION["user"]))
echo "<input type=\"submit\" value=\"Connect\"/>\n"; echo "<input type=\"submit\" value=\"Connect\"/>\n";
echo "</form></center>\n"; echo "</form></center>\n";
echo "<br /><br />\n"; echo "<br /><br />\n";
echo "<center><a href=\"http://indefero.soutade.fr/p/kisscount\">KissCount</a> &copy; 2010-2015 Grégory Soutadé</center>\n"; echo "<center><a href=\"http://indefero.soutade.fr/p/kisscount\">KissCount</a> &copy; 2010-2018 Grégory Soutadé</center>\n";
die(); die();
} }
else else
@ -223,7 +223,7 @@ function toggleOperations(parent, operations)
<?php <?php
foreach($_SESSION["user"]->accounts as $i => $account) foreach($_SESSION["user"]->accounts as $i => $account)
{ {
if ($account["hidden"] == "1") continue; if ($account["hidden"] == "1" || $account["end"] < (date("Y-m") . "-01") || $account["start"] > (date("Y-m") . "-30")) continue;
$val = GetAccountAmount($account["id"], $_SESSION["cur_month"], $_SESSION["cur_year"]); $val = GetAccountAmount($account["id"], $_SESSION["cur_month"], $_SESSION["cur_year"]);
echo "<tr class='bordered'>"; echo "<tr class='bordered'>";
if ($account["shared"] == "1") if ($account["shared"] == "1")
@ -353,6 +353,6 @@ foreach($operations as $i => $operation)
</div> </div>
</div> </div>
<br /><br /> <br /><br />
<center><a href="http://indefero.soutade.fr/p/kisscount">KissCount</a> &copy; 2010-2014 Grégory Soutadé</center> <center><a href="http://indefero.soutade.fr/p/kisscount">KissCount</a> &copy; 2010-2018 Grégory Soutadé</center>
</body> </body>
</html> </html>