Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 216.73.216.44
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
werneckbh /
qr-code /
src /
QR_Code /
Types /
Delete
Unzip
Name
Size
Permission
Date
Action
vCard
[ DIR ]
drwxr-xr-x
2018-02-04 09:00
QR_CalendarEvent.php
3.35
KB
-rw-r--r--
2018-02-04 09:00
QR_EmailMessage.php
1.07
KB
-rw-r--r--
2018-02-04 09:00
QR_Phone.php
751
B
-rw-r--r--
2018-02-04 09:00
QR_Sms.php
861
B
-rw-r--r--
2018-02-04 09:00
QR_Text.php
678
B
-rw-r--r--
2018-02-04 09:00
QR_Url.php
800
B
-rw-r--r--
2018-02-04 09:00
QR_VCard.php
2.91
KB
-rw-r--r--
2018-02-04 09:00
QR_WiFi.php
1.33
KB
-rw-r--r--
2018-02-04 09:00
QR_meCard.php
1.1
KB
-rw-r--r--
2018-02-04 09:00
Save
Rename
<?php namespace QR_Code\Types; use QR_Code\Contracts\CodeType; use QR_Code\Exceptions\EmptyEventSummaryException; use QR_Code\Exceptions\InvalidEventDateException; use QR_Code\Util\AbstractGenerator; /** * Class QR_CalendarEvent * * QR Code Generator for PHP is distributed under MIT * Copyright (C) 2018 Bruno Vaula Werneck <brunovaulawerneck at gmail dot com> * * @package QR_Code\Types */ class QR_CalendarEvent extends AbstractGenerator implements CodeType { const DATETIME_FORMAT = 'Ymd\THis\Z'; protected $dateTimeStart; protected $dateTimeEnd; protected $summary; protected $description; protected $location; /** * QR_CalendarEvent constructor. * @param \DateTime $dateTimeStart * @param \DateTime $dateTimeEnd * @param string $summary * @param string $description * @param string $location * @throws \QR_Code\Exceptions\EmptyEventSummaryException * @throws \QR_Code\Exceptions\InvalidEventDateException */ public function __construct(\DateTime $dateTimeStart, \DateTime $dateTimeEnd, string $summary, string $description = '', string $location = '') { $this->validate($dateTimeStart, $dateTimeEnd, $summary); $this->dateTimeStart = $dateTimeStart; $this->dateTimeEnd = $dateTimeEnd; $this->summary = $summary; $this->description = $description; $this->location = $location; } /** * @param \DateTime $start * @param \DateTime $end * @return bool */ protected function validateDateTimeEnd (\DateTime $start, \DateTime $end) : bool { return $end > $start; } /** * @param string $summary * @return bool */ protected function validateSummary (string $summary) : bool { return trim($summary) !== ''; } /** * @param \DateTime $start * @param \DateTime $end * @param string $summary * @throws \QR_Code\Exceptions\EmptyEventSummaryException * @throws \QR_Code\Exceptions\InvalidEventDateException */ protected function validate (\DateTime $start, \DateTime $end, string $summary) : void { if ($this->validateDateTimeEnd($start, $end) === false) { throw new InvalidEventDateException('Event end date and time must be higher than Event start'); } if ($this->validateSummary($summary) === false) { throw new EmptyEventSummaryException('Event Summary cannot be empty'); } } /** * Get Formatted QR Code String * * @return string */ public function getCodeString() : string { $response = "BEGIN:VCALENDAR\n"; $response .= "VERSION:1.0\n"; $response .= "BEGIN:VEVENT\n"; $response .= "DTSTART:" . $this->dateTimeStart->format(self::DATETIME_FORMAT) . "\n"; $response .= "DTEND:" . $this->dateTimeEnd->format(self::DATETIME_FORMAT) . "\n"; $response .= "SUMMARY:{$this->summary}\n"; if ($this->description) { $response .= "DESCRIPTION:{$this->description}\n"; } if ($this->location) { $response .= "LOCATION:{$this->location}\n"; } $response .= "END:VEVENT\n"; $response .= "END:VCALENDAR"; return $response; } }