init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
38
scripts/ajax/free_car.php
Normal file
38
scripts/ajax/free_car.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
//error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$mon=(int)$_POST['monat'];
|
||||
//--------------------
|
||||
$p_auto = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$_POST['tag']."' AND monat='".$mon."'AND jahr='".$_POST['jahr']."'");
|
||||
//--------------------- freie Fahrzeuge Nachts
|
||||
$key=0;
|
||||
// nachts
|
||||
$tempcar = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE aktiv=1 and besitz<3 ORDER BY typ,kz");
|
||||
while($row = $tempcar->fetch_assoc()) {
|
||||
$tliste = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$_POST['tag']."' AND monat='".$_POST['monat']."'AND jahr='".$_POST['jahr']."' and auto='".$row['id']."' and typ in (3,4,5,17)");
|
||||
|
||||
if($tliste['num_rows'] == 0) {
|
||||
//$ta_id= array_search($row['id'], array_column($tliste, 'auto'));
|
||||
//if (!is_numeric($ta_id)) {
|
||||
$pa_id= array_search($row['id'], array_column($p_auto, 'fid'));
|
||||
if (!is_numeric($pa_id)) {
|
||||
$seite[$key]['car']= $row['kz'];
|
||||
$seite[$key]['info']= $row['hersteller']." ".$row['name'];
|
||||
$seite[$key]['typ']= $row['typ'];
|
||||
//echo $seite['info'][$key];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//echo json_encode($seite);
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$template->assign('data',$seite);
|
||||
$template->assign('content', 'tpl/ajax/free_car.tpl');
|
||||
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue