mirror of https://github.com/itflow-org/itflow
Move roundUpToNearestMultiple function used in multiple files to functions.php
This commit is contained in:
parent
91d0efbde7
commit
39a3ea89c4
|
|
@ -10,12 +10,6 @@ if ($_SESSION['user_role'] != 3) { ?>
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function roundUpToNearestMultiple($n, $increment = 1000)
|
|
||||||
{
|
|
||||||
return (int) ($increment * ceil($n / $increment));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_GET['year'])) {
|
if (isset($_GET['year'])) {
|
||||||
$year = intval($_GET['year']);
|
$year = intval($_GET['year']);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -535,4 +535,7 @@ function sendSingleEmail($config_smtp_host, $config_smtp_username, $config_smtp_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function roundUpToNearestMultiple($n, $increment = 1000)
|
||||||
|
{
|
||||||
|
return (int) ($increment * ceil($n / $increment));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
<?php include("inc_all_reports.php"); ?>
|
<?php include("inc_all_reports.php");
|
||||||
<?php
|
|
||||||
|
|
||||||
function roundUpToNearestMultiple($n, $increment = 1000)
|
|
||||||
{
|
|
||||||
return (int) ($increment * ceil($n / $increment));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_GET['year'])) {
|
if (isset($_GET['year'])) {
|
||||||
$year = intval($_GET['year']);
|
$year = intval($_GET['year']);
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,15 @@
|
||||||
<?php include("inc_all_reports.php"); ?>
|
<?php include("inc_all_reports.php"); ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
function roundUpToNearestMultiple($n, $increment = 1000)
|
|
||||||
{
|
|
||||||
return (int) ($increment * ceil($n / $increment));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_GET['year'])) {
|
if (isset($_GET['year'])) {
|
||||||
$year = intval($_GET['year']);
|
$year = intval($_GET['year']);
|
||||||
}else{
|
} else {
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['year'])) {
|
if (isset($_GET['year'])) {
|
||||||
$year = intval($_GET['year']);
|
$year = intval($_GET['year']);
|
||||||
}else{
|
} else {
|
||||||
$year = date('Y');
|
$year = date('Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue