You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
729 B
31 lines
729 B
<?php
|
|
require_once('../ajax_asm.php');
|
|
ob_start();
|
|
$UID = intval( $CUser->Data['id'] );
|
|
$ACCESS = intval( $CUser->Data['access'] );
|
|
if( $UID > 1 ){
|
|
$Data = array();
|
|
$QS = "SELECT * FROM `metro_stations`";
|
|
$Result = $DATABASE->Query( $QS, false );
|
|
if( count( $Result ) ){
|
|
$Data['status']='ok';
|
|
$Data['stations'] = array();
|
|
foreach( $Result as $R ) {
|
|
$CS['id'] = $R['id'];
|
|
$CS['x'] = $R['x'];
|
|
$CS['y'] = $R['y'];
|
|
$CS['status'] = 0;
|
|
$Data['stations'][] = $CS;
|
|
};
|
|
} else {
|
|
$Data['status']='ok';
|
|
$Data['stations'] = '[]';
|
|
};
|
|
$Data['messages'] = ob_get_clean();
|
|
echo json_encode( $Data );
|
|
} else {
|
|
header('location: /');
|
|
};
|
|
|
|
|
|
?>
|