-
Notifications
You must be signed in to change notification settings - Fork 3
/
common_fin.inc.php
49 lines (41 loc) · 998 Bytes
/
common_fin.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php if (!defined("__HIDE_TEST__")) exit; /* zamezeni samostatneho vykonani */ ?>
<?
require_once "cfg/race_enums.php";
function CreateFinMailFlag(&$mflags)
{
global $g_fin_mail_flag_cnt;
global $g_fin_mail_flag;
$result = 0;
for($ii=0; $ii<$g_fin_mail_flag_cnt; $ii++)
{
if(isset($mflags[$ii]) && $mflags[$ii] == 1)
$result += $g_fin_mail_flag [$ii]['id'];
}
return $result;
}
function GetFinMailFlagDesc(&$mflags)
{
global $g_fin_mail_flag_cnt;
global $g_fin_mail_flag;
$result = '';
for($ii=0; $ii<$g_fin_mail_flag_cnt; $ii++)
{
if(($mflags & $g_fin_mail_flag[$ii]['id']) != 0)
$result .= (($result != '')?', ':'').$g_fin_mail_flag [$ii]['nm'];
}
return $result;
}
function IsFinanceTypeTblFilled()
{
global $db_conn;
@$vysledek=query_db("SELECT id FROM ".TBL_FINANCE_TYPES.' ORDER BY id');
if ($vysledek === FALSE || $vysledek == null)
{
return 0;
}
else
{
return mysqli_num_rows($vysledek);
}
}
?>