-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathinfobar.php
33 lines (28 loc) · 1.15 KB
/
infobar.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
<?php
$info_query = "SELECT *
FROM lasku use index (tila_index)
WHERE yhtio = '{$kukarow['yhtio']}'
AND tila = 'N'
AND alatila = 'F'
AND yhtio_toimipaikka = '{$kukarow['toimipaikka']}'";
$info_res = pupe_query($info_query);
$info_kpl = mysql_num_rows($info_res);
while ($info_row = mysql_fetch_assoc($info_res)) {
$info_query = "SELECT nimi, kuka
FROM kuka
WHERE yhtio = '{$kukarow['yhtio']}'
AND kesken = '{$info_row['tunnus']}'
AND kesken != 0
AND kuka != '{$kukarow['kuka']}'";
$info_result = pupe_query($info_query);
if (mysql_num_rows($info_result) != 0) {
$info_kpl -= 1;
}
}
if ($info_kpl > 0) {
echo "<div data-id='js_ext_til' style='text-align:right; vertical-align:top; margin-right: 60px;'>";
echo "<font class='message ok'>";
echo t("EXT-tilauksia %d kpl", "", $info_kpl);
echo "</font></div>";
echo "<script>jQuery('div[data-id=\"js_ext_til\"]').css('margin-right', (25+jQuery('a[href^=\"/Ohjeet:\"]').outerWidth()) + 'px');</script>";
}