-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathavailability_autofill.php
44 lines (33 loc) · 1.18 KB
/
availability_autofill.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
<?php
// This script and data application were generated by AppGini 5.71
// Download AppGini for free from https://bigprof.com/appgini/download/
$currDir = dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
handle_maintenance();
header('Content-type: text/javascript; charset=' . datalist_db_encoding);
$table_perms = getTablePermissions('availability');
if(!$table_perms[0]){ die('// Access denied!'); }
$mfk = $_GET['mfk'];
$id = makeSafe($_GET['id']);
$rnd1 = intval($_GET['rnd1']); if(!$rnd1) $rnd1 = '';
if(!$mfk){
die('// No js code available!');
}
switch($mfk){
case 'route':
if(!$id){
?>
$j('#amount<?php echo $rnd1; ?>').html(' ');
<?php
break;
}
$res = sql("SELECT `routes`.`id` as 'id', `routes`.`name` as 'name', `routes`.`time` as 'time', `routes`.`amount` as 'amount' FROM `routes` WHERE `routes`.`id`='{$id}' limit 1", $eo);
$row = db_fetch_assoc($res);
?>
$j('#amount<?php echo $rnd1; ?>').html('<?php echo addslashes(str_replace(array("\r", "\n"), '', nl2br($row['amount']))); ?> ');
<?php
break;
}
?>