diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..2a03212 --- /dev/null +++ b/src/index.html @@ -0,0 +1,76 @@ + + +
+ + + +Načítám ...
+ +Načítám ...
+ + + diff --git a/src/osvobdoch_local_vars.php b/src/osvobdoch_local_vars.php new file mode 100644 index 0000000..5d70ec6 --- /dev/null +++ b/src/osvobdoch_local_vars.php @@ -0,0 +1,6 @@ + + diff --git a/src/osvobdoch_vars.php b/src/osvobdoch_vars.php new file mode 100644 index 0000000..45fd530 --- /dev/null +++ b/src/osvobdoch_vars.php @@ -0,0 +1,5 @@ + + diff --git a/src/pruchod.php b/src/pruchod.php new file mode 100644 index 0000000..193dbb3 --- /dev/null +++ b/src/pruchod.php @@ -0,0 +1,77 @@ +direction == "P") { + if( !in_array($pozadavek->name, $at_school)) { + $at_school[] = $pozadavek->name; + } else { + echo $pozadavek->name." už je ve škole"; + return; + } +} else { + //if student is already at school, remove him from the list + if( in_array($pozadavek->name, $at_school)) { + $key = array_search($pozadavek->name, $at_school); + unset($at_school[$key]); + } else { + echo $pozadavek->name." není ve škole"; + return; + } +} + + +$pruchod = array( + "PkUzivatel" => $pozadavek->id, + "TypUzivatele" => "P", + "Datum" => date("Y-m-d"), + "Cas" => date("H:i:s"), + "Smer" => $pozadavek->direction, + "Hlavni" => $pozadavek->main, + "BranaId" => "ENTRANCE", + "CteckaId" => "CAM1", + "Poznamka" => "" +); +$payload = json_encode($pruchod)."