mirror of
https://github.com/itflow-org/itflow
synced 2026-03-04 04:44:51 +00:00
Move roundUpToNearestMultiple function used in multiple files to functions.php
This commit is contained in:
@@ -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,11 +1,6 @@
|
|||||||
<?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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user