diff --git a/classes/CDN.php b/classes/CDN.php new file mode 100644 index 0000000..b316d2e --- /dev/null +++ b/classes/CDN.php @@ -0,0 +1,75 @@ +config = $config; + $this->bucket = $config['aws']['s3']['bucket']; + + $credentials = new Credentials( + $config['aws']['s3']['access_key'], + $config['aws']['s3']['secret_key'] + ); + + $this->s3Client = new S3Client([ + 'version' => 'latest', + 'region' => $config['aws']['s3']['region'], + 'endpoint' => $config['aws']['s3']['host'], + 'credentials' => $credentials, + 'use_path_style_endpoint' => true, + 'profile' => null, + 'use_aws_shared_config_files' => false, + ]); + } + + public function uploadFile(string $localPath, string $remotePath, string $mimeType, string $acl = 'private') + { + try { + $result = $this->s3Client->putObject([ + 'Bucket' => $this->bucket, + 'Key' => $remotePath, + 'SourceFile' => $localPath, + 'ACL' => $acl, + 'ContentType' => $mimeType, + ]); + return $result; + } catch (\Exception $e) { + throw new \Exception("Error uploading file to CDN: " . $e->getMessage()); + } + } + + public function renameFile(string $oldRemotePath, string $newRemotePath) + { + // S3 does not support renaming directly. Copy then delete. + try { + $this->s3Client->copyObject([ + 'Bucket' => $this->bucket, + 'CopySource' => "{$this->bucket}/{$oldRemotePath}", + 'Key' => $newRemotePath, + ]); + + $this->s3Client->deleteObject([ + 'Bucket' => $this->bucket, + 'Key' => $oldRemotePath, + ]); + } catch (\Exception $e) { + throw new \Exception("Error renaming file on CDN: " . $e->getMessage()); + } + } + + public function clearCache(string $remotePath) + { + // If using CloudFront or another CDN in front of S3, implement invalidation logic here. + // This might involve calling the CloudFront API to invalidate the specific path. + } +} diff --git a/classes/Email.php b/classes/Email.php new file mode 100644 index 0000000..67c2411 --- /dev/null +++ b/classes/Email.php @@ -0,0 +1,73 @@ +config = $config; + $this->sesClient = new SesClient([ + 'version' => 'latest', + 'region' => $config['aws']['ses']['region'], + 'credentials' => [ + 'key' => $config['aws']['ses']['access_key'], + 'secret' => $config['aws']['ses']['secret_key'] + ] + ]); + } + + /** + * Generic method to send an email. + * + * @param string $recipientEmail + * @param string $subject + * @param string $bodyText + * @throws Exception if email sending fails. + */ + public function sendEmail(string $recipientEmail, string $subject, string $bodyText): void { + $senderEmail = $this->config['aws']['ses']['sender_email']; + try { + $this->sesClient->sendEmail([ + 'Destination' => ['ToAddresses' => [$recipientEmail]], + 'ReplyToAddresses' => [$senderEmail], + 'Source' => $senderEmail, + 'Message' => [ + 'Body' => [ + 'Text' => [ + 'Charset' => 'UTF-8', + 'Data' => $bodyText, + ], + ], + 'Subject' => [ + 'Charset' => 'UTF-8', + 'Data' => $subject, + ], + ], + ]); + } catch (AwsException $e) { + throw new Exception("Failed to send email: " . $e->getAwsErrorMessage()); + } + } + + /** + * Helper method to send a verification email. + * + * @param string $recipientEmail + * @param string $verificationCode + * @throws Exception if email sending fails. + */ + public function sendVerificationEmail(string $recipientEmail, string $verificationCode): void { + $subject = "Verify Your Email Address"; + $verificationLink = $this->config['app']['url'] . "/verify_email.php?code={$verificationCode}"; + $bodyText = "Please verify your email address by clicking the link below or by entering the code in your profile:\n\n"; + $bodyText .= "{$verificationLink}\n\nYour verification code is: {$verificationCode}\nThis code will expire in 15 minutes."; + $this->sendEmail($recipientEmail, $subject, $bodyText); + } +} diff --git a/classes/HeaderMeta.php b/classes/HeaderMeta.php index 14c7cbb..2efddd1 100644 --- a/classes/HeaderMeta.php +++ b/classes/HeaderMeta.php @@ -26,29 +26,29 @@ class HeaderMeta $this->config = $config; // detect if it is DJMixHosting\Mix, DJMixHosting\Genre, DJMixHosting\Mixshow, or DJMixHosting\DJ in $object if ($object instanceof Mix) { - $djs = $object->get_djs(); + $djs = $object->getDJs(); $djList = ""; foreach ($djs as $dj) { $djList .= $dj->getName() . ", "; } $djList = rtrim($djList, ", "); - $genres = $object->get_genres(); + $genres = $object->getGenres(); $genreNames = ""; $genreList = rtrim($genreNames, ", "); - $this->set_ogTitle($object->get_name()); - $this->set_ogDescription($object->get_description()); - $this->set_ogUrl($object->get_page_url()); - $this->set_ogImage($object->get_cover()); + $this->set_ogTitle($object->getName()); + $this->set_ogDescription($object->getDescription()); + $this->set_ogUrl($object->getPageUrl()); + $this->set_ogImage($object->getCover()); $this->set_ogType("music.song"); - $this->set_ogDurationSeconds($object->get_seconds()); + $this->set_ogDurationSeconds($object->getSeconds()); $this->set_ogMusician($djList); - $this->set_ogAudio($object->get_download_url()); + $this->set_ogAudio($object->getDownloadUrl()); $this->set_ogKeywords($genreList); - $this->set_ogCanonical($object->get_page_url()); + $this->set_ogCanonical($object->getPageUrl()); $this->set_ogRobot("index, follow"); $this->set_ogNoindex(""); } diff --git a/classes/Mix.php b/classes/Mix.php index 95fece0..2d00702 100644 --- a/classes/Mix.php +++ b/classes/Mix.php @@ -2,343 +2,277 @@ namespace DJMixHosting; +use DateTime; +use Exception; + class Mix { - - private $id = -1; - private $enabled = false; - private $name = ""; - private $slug = ""; - private $db = null; - private $description = ""; - private $cover = ""; - private $url = ""; - private $seconds = 0; - private $download_only = true; - private $djs = []; - private $genres = []; - private $recorded; - private $downloads = 0; - private $created; - private $updated; - private $playcount = 0; + private int $id = -1; + private bool $enabled = false; + private string $name = ""; + private string $slug = ""; + private $db; + private string $description = ""; + private string $cover = ""; + private string $url = ""; + private int $seconds = 0; + private bool $download_only = true; + private array $djs = []; + private array $genres = []; + private ?string $recorded = null; + private int $downloads = 0; + private ?string $created = null; + private ?string $updated = null; + private int $playcount = 0; private $tracklist = []; - private $loadDJs = true; - private $related_mixes = []; - private $duration = []; - private $mixshow = []; + private bool $loadDJs = true; + private array $related_mixes = []; + private array $duration = []; + private array $mixshow = []; - - public function __construct($value, $db, $loadDJs = true) + /** + * Construct a Mix object using either an ID or slug. + * + * @param mixed $value The mix identifier (ID or slug). + * @param mixed $db Database connection. + * @param bool $loadDJs Whether to load DJ objects. + */ + public function __construct($value, $db, bool $loadDJs = true) { $this->db = $db; - - // echo the type of value + $this->loadDJs = $loadDJs; if (ctype_digit((string)$value)) { $this->id = (int)$value; - return $this->load_by_id(); - + $loaded = $this->loadById(); } else { $this->slug = $value; - return $this->load_by_slug(); + $loaded = $this->loadBySlug(); + } + + if (!$loaded) { + throw new Exception("Mix not found."); } } - private function load_by_id(): bool + /** + * Loads mix data by its ID. + */ + private function loadById(): bool { - $mix = $this->get_mix_by_id(); - if ($mix && $mix['title'] != "") { - return $this->build_mix($mix); - } else { - return false; + $mix = $this->getMixById(); + if ($mix && !empty($mix['title'])) { + return $this->buildMix($mix); } + return false; } - private function get_mix_by_id() + /** + * Loads mix data by its slug. + */ + private function loadBySlug(): bool { - // Check if current user is admin - $isAdmin = (isset($_SESSION['user']) && isset($_SESSION['user']['role']) && $_SESSION['user']['role'] === 'admin'); - - if ($isAdmin) { - $stmt = $this->db->prepare("SELECT * FROM mix WHERE id = ?"); - } else { - // Only return approved mixes (pending = 0) for non-admins - $stmt = $this->db->prepare("SELECT * FROM mix WHERE id = ? AND pending = 0"); + $mix = $this->getMixBySlug(); + if ($mix && !empty($mix['title'])) { + return $this->buildMix($mix); } + return false; + } + + /** + * Retrieve mix data by ID. + */ + private function getMixById(): ?array + { + // If the current user is admin, show all mixes; + // Otherwise, only return mixes with pending = 0. + $isAdmin = isset($_SESSION['user']) && + isset($_SESSION['user']['role']) && + $_SESSION['user']['role'] === 'admin'; + $query = $isAdmin + ? "SELECT * FROM mix WHERE id = ?" + : "SELECT * FROM mix WHERE id = ? AND pending = 0"; + + $stmt = $this->db->prepare($query); $stmt->bind_param("i", $this->id); $stmt->execute(); $result = $stmt->get_result(); $mix = $result->fetch_assoc(); $stmt->close(); - return $mix; + return $mix ?: null; } + /** - * @param $mix - * @return true + * Retrieve mix data by slug. */ - private function build_mix($mix): bool + private function getMixBySlug(): ?array { - $this->id = $mix['id']; - $this->name = $mix['title']; - $this->slug = $mix['slug']; - $this->description = $mix['description']; - $this->cover = $this->legacyFix($mix['cover']); - $this->url = $this->legacyFix($mix['url']); - $this->seconds = $mix['seconds']; - $this->duration = $this->configure_duration(); - $this->download_only = $mix['mediaplayer']; - $this->recorded = $mix['recorded']; - $this->created = $mix['created']; - $this->updated = $mix['lastupdated']; - $this->enabled = $mix['pending']; + $isAdmin = isset($_SESSION['user']) && + isset($_SESSION['user']['role']) && + $_SESSION['user']['role'] === 'admin'; + $query = $isAdmin + ? "SELECT * FROM mix WHERE slug = ?" + : "SELECT * FROM mix WHERE slug = ? AND pending = 0"; + + $stmt = $this->db->prepare($query); + $stmt->bind_param("s", $this->slug); + $stmt->execute(); + $result = $stmt->get_result(); + $mix = $result->fetch_assoc(); + $stmt->close(); + return $mix ?: null; + } + + /** + * Build the mix object from database data. + */ + private function buildMix(array $mix): bool + { + $this->id = (int)$mix['id']; + $this->name = $mix['title'] ?? ""; + $this->slug = $mix['slug'] ?? ""; + $this->description = $mix['description'] ?? ""; + $this->cover = $this->legacyFix($mix['cover'] ?? ""); + $this->url = $this->legacyFix($mix['url'] ?? ""); + $this->seconds = (int)($mix['seconds'] ?? 0); + $this->duration = $this->configureDuration(); + $this->download_only = (bool)($mix['mediaplayer'] ?? true); + $this->recorded = $mix['recorded'] ?? null; + $this->created = $mix['created'] ?? null; + $this->updated = $mix['lastupdated'] ?? null; + $this->enabled = (bool)($mix['pending'] ?? false); + if ($this->loadDJs) { require_once 'DJ.php'; $this->djs[] = new DJ($mix['dj1'], $this->db); - if ($mix['dj2'] != null) { + if (!empty($mix['dj2'])) { $this->djs[] = new DJ($mix['dj2'], $this->db); } - if ($mix['dj3'] != null) { + if (!empty($mix['dj3'])) { $this->djs[] = new DJ($mix['dj3'], $this->db); } - $this->djs = array_filter($this->djs); } - $this->load_mix_meta(); - $this->tracklist = $this->evaluate_tracklist(); + $this->loadMixMeta(); + $this->tracklist = $this->evaluateTracklist(); return true; } - private function legacyFix(mixed $item) + /** + * Fix legacy URL paths. + */ + private function legacyFix(string $item): string { if (str_starts_with($item, "/djs/")) { return "https://cdn.utahsdjs.com" . substr($item, 4); - } else { - return $item; } + return $item; } - private function configure_duration(): array + /** + * Configure a formatted duration based on seconds. + */ + private function configureDuration(): array { $seconds = $this->seconds; $hours = floor($seconds / 3600); $minutes = floor(($seconds / 60) % 60); - $seconds = $seconds % 60; - - // for 't', we need to show it as 01:02:03 - if ($hours < 10) { - $hours0 = "0" . $hours; - } else { - $hours0 = $hours; - } - if ($minutes < 10) { - $minutes0 = "0" . $minutes; - } else { - $minutes0 = $minutes; - } - if ($seconds < 10) { - $seconds0 = "0" . $seconds; - } else { - $seconds0 = $seconds; - } - - // if hours is 0, we don't need to show it - $time = $hours > 0 ? $hours0 . ":" . $minutes0 . ":" . $seconds0 : $minutes0 . ":" . $seconds0; - - return ['h' => $hours, 'm' => $minutes, 's' => $seconds, 't' => $time, 'S' => $this->seconds]; + $secs = $seconds % 60; + $time = ($hours > 0) + ? sprintf("%02d:%02d:%02d", $hours, $minutes, $secs) + : sprintf("%02d:%02d", $minutes, $secs); + return [ + 'h' => $hours, + 'm' => $minutes, + 's' => $secs, + 't' => $time, + 'S' => $this->seconds + ]; } - private function load_mix_meta(): void + /** + * Load mix meta data. + */ + private function loadMixMeta(): void { - $stmt = $this->db->prepare("SELECT attribute,value FROM mix_meta WHERE mix_id = ?"); + $stmt = $this->db->prepare("SELECT attribute, value FROM mix_meta WHERE mix_id = ?"); $stmt->bind_param("i", $this->id); $stmt->execute(); $result = $stmt->get_result(); $meta = $result->fetch_all(MYSQLI_ASSOC); $stmt->close(); - foreach ($meta as $key => $value) { - if ($value['attribute'] == "genre") { - $this->genres[] = $value['value']; - unset($meta[$key]); + foreach ($meta as $entry) { + switch ($entry['attribute']) { + case "genre": + $this->genres[] = $entry['value']; + break; + case "related": + $this->related_mixes[] = $entry['value']; + break; + case "playcount": + $this->playcount = (int)$entry['value']; + break; + case "downloads": + $this->downloads = (int)$entry['value']; + break; + case "tracklist": + $this->tracklist = $entry['value']; + break; + case "mixshow": + $this->mixshow[] = $entry['value']; + break; + default: + // Handle additional meta attributes if needed. + break; } - if ($value['attribute'] == "related") { - $this->related_mixes[] = $value['value']; - unset($meta[$key]); - } - if ($value['attribute'] == "playcount") { - $this->playcount = $value['value']; - unset($meta[$key]); - } - if ($value['attribute'] == "downloads") { - $this->downloads = $value['value']; - unset($meta[$key]); - } - if ($value['attribute'] == "tracklist") { - $this->tracklist = $value['value']; - unset($meta[$key]); - } - if ($value['attribute'] == "mixshow") { - $this->mixshow[] = $value['value']; - unset($meta[$key]); - } - } - } - private function evaluate_tracklist() + /** + * Evaluate the tracklist data. + */ + private function evaluateTracklist() { if (empty($this->tracklist)) { return []; - } else { - // if the first item in the array is also an array, then return it - if (is_array($this->tracklist)) { - return $this->tracklist; - } else { - return explode("\n", (string)$this->tracklist); - } } - - } - - private function load_by_slug(): bool - { - $mix = $this->get_mix_by_slug(); - if ($mix) { - if ($mix['title'] != "") { - return $this->build_mix($mix); - } else { - return false; - } - } else { - return false; + if (is_array($this->tracklist)) { + return $this->tracklist; } + return explode("\n", (string)$this->tracklist); } + // Getter methods for mix properties. - private function get_mix_by_slug() + public function getId(): int { return $this->id; } + public function getName(): string { return $this->name; } + public function getSlug(): string { return $this->slug; } + public function getDescription(): string { return $this->description; } + public function getCover(): string { return $this->cover; } + public function getUrl(): string { return $this->url; } + public function getSeconds(): int { return $this->seconds; } + public function isDownloadOnly(): bool { return $this->download_only; } + public function getDJs(): array { return $this->djs; } + public function getGenres(): array { return $this->genres; } + public function getRecorded(): ?string { return $this->recorded; } + public function getDownloads(): int { return $this->downloads; } + public function getCreated(): ?string { return $this->created; } + public function getUpdated(): ?string { return $this->updated; } + public function getPlaycount(): int { return $this->playcount; } + public function getTracklist(): array { return $this->evaluateTracklist(); } + public function getRelatedMixes(): array { return $this->related_mixes; } + public function getDuration(): array { return $this->duration; } + public function getMixshow(): array { return $this->mixshow; } + + public function getDownloadUrl(): string { - // Check if current user is admin - $isAdmin = (isset($_SESSION['user']) && isset($_SESSION['user']['role']) && $_SESSION['user']['role'] === 'admin'); - - if ($isAdmin) { - $stmt = $this->db->prepare("SELECT * FROM mix WHERE slug = ?"); - } else { - $stmt = $this->db->prepare("SELECT * FROM mix WHERE slug = ? AND pending = 0"); - } - $stmt->bind_param("s", $this->slug); - $stmt->execute(); - $result = $stmt->get_result(); - $mix = $result->fetch_assoc(); - $stmt->close(); - return $mix; + return "https://beta.utahsdjs.com/mix/{$this->slug}/download"; } - public function get_recorded() + public function getPageUrl(): string { - return $this->recorded; + return "https://beta.utahsdjs.com/mix/{$this->slug}"; } - - public function get_created() - { - return $this->created; - } - - public function get_updated() - { - return $this->updated; - } - - public function get_img() - { - return $this->cover; - } - - public function get_djs() - { - return $this->djs; - } - - public function get_description() - { - return $this->description; - } - - public function get_tracklist(): array - { - return $this->tracklist; - } - - public function get_genres() - { - return $this->genres; - } - - public function get_seconds(): int - { - return $this->seconds; - } - - public function is_download_only(): bool - { - return $this->download_only; - } - - public function get_url(): string - { - return $this->url; - } - - public function get_cover() - { - return $this->cover; - } - - public function get_downloads(): int - { - return $this->downloads; - } - - public function get_plays(): int - { - return $this->playcount; - } - - public function get_id(): int - { - return $this->id; - } - - public function get_name(): string - { - return $this->name; - } - - public function get_slug(): string - { - return $this->slug; - } - - public function get_duration(): array - { - return $this->duration; - } - - public function get_mixshow(): array - { - return $this->mixshow; - } - - public function get_download_url() - { - return "https://beta.utahsdjs.com/mix/" . "$this->slug" . "/download"; - } - - public function get_page_url() - { - return "https://beta.utahsdjs.com/mix/" . "$this->slug"; - } - } diff --git a/classes/SessionManager.php b/classes/SessionManager.php new file mode 100644 index 0000000..d1f6a52 --- /dev/null +++ b/classes/SessionManager.php @@ -0,0 +1,39 @@ +file = $file; - $this->file_name = $file['name']; - $this->file_size = $file['size']; - $this->file_tmp = $file['tmp_name']; - $this->file_type = $file['type']; $this->config = $config; - $ext = explode('.', $file['name']); - $this->file_ext = strtolower(end($ext)); + $this->uploadDir = rtrim($config['uploads']['tmp_path'], '/') . '/'; $this->uuid = uniqid(); - + $this->fileExt = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION)); } - private function check_file_size(): bool + public function validate(): bool { - if ($this->file_size > $this->config['uploads']['max_file_size']){ - $this->errors[] = "File size is too large"; - return false; + if ($this->file['error'] !== UPLOAD_ERR_OK) { + $this->errors[] = "File upload error."; } - return true; - } - - private function check_file_extension(): bool - { - if (!in_array($this->file_ext, $this->extensions)){ - $this->errors[] = "Invalid file extension"; - return false; + if ($this->file['size'] > $this->config['uploads']['max_file_size']) { + $this->errors[] = "File is too large."; } - return true; - } - - private function check_file_exists(): bool - { - if (file_exists($this->upload_dir . $this->file_name)){ - $this->errors[] = "File already exists"; - return false; + if (!in_array($this->fileExt, $this->config['uploads']['allowed_file_types'])) { + $this->errors[] = "File type not allowed."; } - return true; + if (!in_array($this->file['type'], $this->config['uploads']['allowed_mime_type'])) { + $this->errors[] = "MIME type not allowed."; + } + return empty($this->errors); } - private function move_file(): bool + public function getErrors(): array { - if (move_uploaded_file($this->file_tmp, $this->upload_dir . $this->uuid)){ - $this->file_path = $this->upload_dir . $this->uuid; + return $this->errors; + } + + public function moveFile(): bool + { + $destination = $this->uploadDir . $this->uuid . "." . $this->fileExt; + if (move_uploaded_file($this->file['tmp_name'], $destination)) { + $this->localPath = $destination; return true; } + $this->errors[] = "Failed to move uploaded file."; return false; } - public function dump_all() + public function process(): array { - $array = array( - "file" => $this->file, - "file_name" => $this->file_name, - "file_size" => $this->file_size, - "file_tmp" => $this->file_tmp, - "file_type" => $this->file_type, - "file_ext" => $this->file_ext, - "file_path" => $this->file_path, - "extensions" => $this->extensions, - "upload_dir" => $this->upload_dir, - "errors" => $this->errors, - "ok" => $this->ok, - "uuid" => $this->uuid - ); + // Assuming moveFile() has been called + $uploadTask = [ + 'original_name' => $this->file['name'], + 'local_path' => $this->localPath, + 'size' => $this->file['size'], + 'ext' => $this->fileExt, + ]; + + if ($this->fileExt === "mp3") { + $escapedFile = escapeshellarg($this->localPath); + $artist = trim(shell_exec("eyed3 --query='%a%' $escapedFile")); + $title = trim(shell_exec("eyed3 --query='%t%' $escapedFile")); + $duration = trim(shell_exec("mp3info -p \"%S\" $escapedFile")); + + $uploadTask['file_type'] = 'mp3'; + $uploadTask['metadata'] = [ + 'artist' => $artist, + 'title' => $title, + 'duration' => $duration, + ]; + $uploadTask['mediaplayer'] = 0; + } elseif ($this->fileExt === "zip") { + $zip = new \ZipArchive; + if ($zip->open($this->localPath) === true) { + $totalDuration = 0; + $tracklist = []; + for ($i = 0; $i < $zip->numFiles; $i++) { + $entryName = $zip->getNameIndex($i); + $entryExt = strtolower(pathinfo($entryName, PATHINFO_EXTENSION)); + if ($entryExt === "mp3") { + $tempDir = $this->uploadDir . uniqid('zip_'); + mkdir($tempDir); + $tempFilePath = $tempDir . '/' . basename($entryName); + $zip->extractTo($tempDir, $entryName); + $escapedFile = escapeshellarg($tempFilePath); + $title = trim(shell_exec("eyed3 --query='%t%' $escapedFile")); + $duration = trim(shell_exec("mp3info -p \"%S\" $escapedFile")); + $tracklist[] = $title ?: basename($entryName); + $totalDuration += (int)$duration; + unlink($tempFilePath); + rmdir($tempDir); + } + } + $zip->close(); + $uploadTask['file_type'] = 'zip'; + $uploadTask['metadata'] = [ + 'tracklist' => $tracklist, + 'total_duration' => $totalDuration, + ]; + $uploadTask['mediaplayer'] = 1; + } else { + $this->errors[] = "Failed to open ZIP file."; + } + } else { + $this->errors[] = "Unsupported file type."; + } + + return $uploadTask; } + public function uploadToCDN(CDN $cdn): string + { + // Create a remote path – e.g., under a temp folder with a unique name + $remotePath = "temp/mixes/" . uniqid() . "_" . basename($this->localPath); + $mimeType = ($this->fileExt === 'mp3') ? 'audio/mpeg' : 'application/zip'; + + $cdn->uploadFile($this->localPath, $remotePath, $mimeType); + return $remotePath; + } } diff --git a/classes/User.php b/classes/User.php index 67343b0..048d621 100644 --- a/classes/User.php +++ b/classes/User.php @@ -2,13 +2,19 @@ namespace DJMixHosting; +use DateTime; +use Exception; use Random\RandomException; +use Aws\Ses\SesClient; +use Aws\Exception\AwsException; -Class User{ +class User { private $db; private $id; private $username; + private $firstName; + private $lastName; private $email; private $location; private $bio; @@ -16,42 +22,83 @@ Class User{ private $updated; private $verified; private $role; - private $img; + + private $img = ""; private $api_key; - public function __construct($db){ + public function __construct($db, $id = null) { $this->db = $db; + if ($id) { + $this->loadUserById($id); + } } /** - * @throws RandomException + * Load user data from the database by id. */ - public function newUser($username, $password, $email){ - if ($this->check_existing_user($username, $email)){ - throw new RandomException("User already exists"); + private function loadUserById($id) { + $stmt = $this->db->prepare("SELECT * FROM users WHERE id = ?"); + $stmt->bind_param("i", $id); + $stmt->execute(); + $user_data = $stmt->get_result()->fetch_assoc(); + $stmt->close(); + + if ($user_data) { + $this->id = $user_data['id']; + $this->username = $user_data['username']; + $this->firstName = $user_data['firstName']; + $this->lastName = $user_data['lastName']; + $this->email = $user_data['email']; + $this->verified = $user_data['emailVerified']; + $this->img = $user_data['img']; + $this->api_key = $user_data['apiKey']; + $this->created = $user_data['created']; + $this->updated = $user_data['lastupdated']; + $this->role = $user_data['isAdmin'] ? 'admin' : 'user'; + + // These fields are not in your table; assign defaults or remove them. + $this->location = ""; + $this->bio = ""; + } + } + + /** + * Register a new user. + * + * @throws RandomException if the user already exists. + */ + public function newUser(string $username, string $password, string $email, string $firstName, string $lastName): int { + if ($this->check_existing_user($username, $email)) { + throw new \Random\RandomException("User already exists"); } $this->username = $username; $this->email = $email; - $password2 = password_hash($password, PASSWORD_DEFAULT); - $this->password = $password2; + $this->firstName = $firstName; + $this->lastName = $lastName; + $password_hashed = password_hash($password, PASSWORD_DEFAULT); - $this->location = ""; - $this->bio = ""; - $this->created = date('Y-m-d H:i:s'); - $this->updated = date('Y-m-d H:i:s'); - $this->verified = 0; - $this->role = "user"; - $this->img = ""; - $this->api_key = bin2hex(random_bytes(32)); + // Set default values for optional fields. + $this->location = ""; + $this->bio = ""; + $this->created = date('Y-m-d H:i:s'); + $this->updated = date('Y-m-d H:i:s'); + $this->verified = 0; + $this->role = "user"; + $this->img = ""; + $this->api_key = bin2hex(random_bytes(32)); - $stmt = $this->db->prepare("INSERT INTO users (username, password, email, img) VALUES (?, ?, ?, ?)"); - $stmt->bind_param("ssss", $this->username, $this->password, $this->email, $this->img); + $stmt = $this->db->prepare("INSERT INTO users (username, password, email, firstName, lastName, img, emailVerified) VALUES (?, ?, ?, ?, ?, '', 0)"); + $stmt->bind_param("sssss", $this->username, $password_hashed, $this->email, $this->firstName, $this->lastName); $stmt->execute(); + $userId = $stmt->insert_id; $stmt->close(); + $this->id = $userId; + return $userId; } - private function check_existing_user($username, $email){ + + private function check_existing_user($username, $email) { $stmt = $this->db->prepare("SELECT * FROM users WHERE username = ? OR email = ?"); $stmt->bind_param("ss", $username, $email); $stmt->execute(); @@ -61,8 +108,13 @@ Class User{ return $user; } - public function login($email, $password) - { + /** + * Login a user by email and password. + * + * Returns the user data array if successful. In case of failure, + * a string error message is returned. + */ + public function login($email, $password) { // Retrieve user record by email $stmt = $this->db->prepare("SELECT * FROM users WHERE email = ?"); $stmt->bind_param("s", $email); @@ -78,10 +130,10 @@ Class User{ $attempt_data = $stmt->get_result()->fetch_assoc(); $stmt->close(); - $current_time = new \DateTime(); + $current_time = new DateTime(); if ($attempt_data && !empty($attempt_data['lockout_until'])) { - $lockout_until = new \DateTime($attempt_data['lockout_until']); + $lockout_until = new DateTime($attempt_data['lockout_until']); if ($current_time < $lockout_until) { return "Account locked until " . $lockout_until->format('Y-m-d H:i:s') . ". Please try again later."; } @@ -95,15 +147,10 @@ Class User{ // Verify the password using password_verify if (password_verify($password, $user_data['password'])) { - // Successful login – clear login attempts and set session variables + // Successful login – clear login attempts. $this->resetLoginAttempts($email); - $_SESSION['user'] = [ - 'id' => $user_data['id'], - 'email' => $user_data['email'], - 'username' => $user_data['username'], - 'role' => $user_data['isAdmin'] ? 'admin' : 'user' - ]; - return true; + // Return the user data for further session handling + return $user_data; } else { $attempts = $this->updateFailedAttempt($email); return "Invalid email or password. Attempt $attempts of 3."; @@ -115,8 +162,7 @@ Class User{ * If attempts reach 3, set a lockout that doubles each time. * Returns the current number of attempts. */ - private function updateFailedAttempt($email) - { + private function updateFailedAttempt($email) { // Check for an existing record $stmt = $this->db->prepare("SELECT * FROM login_attempts WHERE email = ?"); $stmt->bind_param("s", $email); @@ -124,7 +170,7 @@ Class User{ $record = $stmt->get_result()->fetch_assoc(); $stmt->close(); - $current_time = new \DateTime(); + $current_time = new DateTime(); if ($record) { $attempts = $record['attempts'] + 1; @@ -165,13 +211,186 @@ Class User{ /** * Reset the login_attempts record for the given email. */ - private function resetLoginAttempts($email) - { + private function resetLoginAttempts($email) { $stmt = $this->db->prepare("DELETE FROM login_attempts WHERE email = ?"); $stmt->bind_param("s", $email); $stmt->execute(); $stmt->close(); } + /** + * Update the user's email address. + * + * @param string $newEmail + * @param array $config Configuration array for AWS SES and app settings. + * @return string Success message. + * @throws \Exception on validation or email-sending failure. + */ + public function updateEmail(string $newEmail, array $config): string { + $newEmail = filter_var($newEmail, FILTER_VALIDATE_EMAIL); + if (!$newEmail) { + throw new \Exception("Invalid email format."); + } -} \ No newline at end of file + // Update email and mark as unverified. + $stmt = $this->db->prepare("UPDATE users SET email = ?, emailVerified = 0 WHERE id = ?"); + $stmt->bind_param("si", $newEmail, $this->id); + $stmt->execute(); + $stmt->close(); + + // Generate verification code and expiry (15 minutes from now) + $verification_code = bin2hex(random_bytes(16)); + $expires_at = date("Y-m-d H:i:s", strtotime("+15 minutes")); + + // Store the verification record. + $stmt = $this->db->prepare("REPLACE INTO email_verifications (user_id, email, verification_code, expires_at) VALUES (?, ?, ?, ?)"); + $stmt->bind_param("isss", $this->id, $newEmail, $verification_code, $expires_at); + $stmt->execute(); + $stmt->close(); + + // Use the new Email class to send the verification email. + $emailObj = new Email($config); + $emailObj->sendVerificationEmail($newEmail, $verification_code); + + // Update the class properties. + $this->email = $newEmail; + $this->verified = 0; + return "Email updated. A verification email has been sent to your new address."; + } + + public function updateName($firstName, $lastName) { + // Update the user's name. + $stmt = $this->db->prepare("UPDATE users SET firstName = ?, lastName = ? WHERE id = ?"); + $stmt->bind_param("ssi", $firstName, $lastName, $this->id); + if (!$stmt->execute()) { + $stmt->close(); + throw new Exception("Failed to update name. Please try again."); + } + $stmt->close(); + + // Optionally update class properties. + $this->firstName = $firstName; + $this->lastName = $lastName; + return "Name updated successfully."; + } + + public function updatePassword($currentPassword, $newPassword, $confirmPassword) { + // Retrieve the current password hash. + $stmt = $this->db->prepare("SELECT password FROM users WHERE id = ?"); + $stmt->bind_param("i", $this->id); + $stmt->execute(); + $userData = $stmt->get_result()->fetch_assoc(); + $stmt->close(); + + if (!$userData || !password_verify($currentPassword, $userData['password'])) { + throw new Exception("Current password is incorrect."); + } + + if ($newPassword !== $confirmPassword) { + throw new Exception("New password and confirmation do not match."); + } + + // Validate the new password. + $pattern = '/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,32}$/'; + if (!preg_match($pattern, $newPassword)) { + throw new Exception("New password must be 8-32 characters and include at least one uppercase letter, one lowercase letter, one number, and one symbol."); + } + + $hashed_new_password = password_hash($newPassword, PASSWORD_DEFAULT); + $stmt = $this->db->prepare("UPDATE users SET password = ? WHERE id = ?"); + $stmt->bind_param("si", $hashed_new_password, $this->id); + if (!$stmt->execute()) { + $stmt->close(); + throw new Exception("Failed to update password. Please try again."); + } + $stmt->close(); + return "Password updated successfully."; + } + + public function updateUsername($newUsername) { + // Validate username format. + if (!preg_match('/^[a-zA-Z0-9_]{3,25}$/', $newUsername)) { + throw new Exception("Invalid username format."); + } + + // Check if the new username already exists for another user. + $stmt = $this->db->prepare("SELECT id FROM users WHERE username = ? AND id != ?"); + $stmt->bind_param("si", $newUsername, $this->id); + $stmt->execute(); + $result = $stmt->get_result(); + if ($result->num_rows > 0) { + $stmt->close(); + throw new Exception("Username already taken."); + } + $stmt->close(); + + // Update the username. + $stmt = $this->db->prepare("UPDATE users SET username = ? WHERE id = ?"); + $stmt->bind_param("si", $newUsername, $this->id); + $stmt->execute(); + $stmt->close(); + + $this->username = $newUsername; + return "Username updated successfully."; + } + + /** + * Verify the user's email using the provided verification code. + * + * @param string $verification_code The code submitted by the user. + * @return string Success message. + * @throws \Exception If the code is invalid or expired. + */ + public function verifyEmail(string $verification_code): string { + // Look up the verification record for this user and code + $stmt = $this->db->prepare("SELECT * FROM email_verifications WHERE user_id = ? AND verification_code = ?"); + $stmt->bind_param("is", $this->id, $verification_code); + $stmt->execute(); + $result = $stmt->get_result(); + $record = $result->fetch_assoc(); + $stmt->close(); + + if (!$record) { + throw new \Exception("Invalid verification code."); + } + + // Check if the verification code has expired + $current_time = new \DateTime(); + $expires_at = new \DateTime($record['expires_at']); + if ($current_time > $expires_at) { + throw new \Exception("Verification code has expired. Please request a new one."); + } + + // Update the user's record to mark the email as verified + $stmt = $this->db->prepare("UPDATE users SET emailVerified = 1 WHERE id = ?"); + $stmt->bind_param("i", $this->id); + $stmt->execute(); + $stmt->close(); + + // Remove the verification record to clean up + $stmt = $this->db->prepare("DELETE FROM email_verifications WHERE user_id = ?"); + $stmt->bind_param("i", $this->id); + $stmt->execute(); + $stmt->close(); + + // Update the object property + $this->verified = 1; + + return "Email verified successfully."; + } + + // Getter methods + public function getId() { return $this->id; } + public function getUsername() { return $this->username; } + public function getFirstName() { return $this->firstName; } + public function getLastName() { return $this->lastName; } + public function getEmail() { return $this->email; } + public function getLocation() { return $this->location; } + public function getBio() { return $this->bio; } + public function getCreated() { return $this->created; } + public function getUpdated() { return $this->updated; } + public function getVerified() { return $this->verified; } + public function getRole() { return $this->role; } + public function getImg() { return $this->img; } + public function getApiKey() { return $this->api_key; } +} diff --git a/composer.json b/composer.json index 7b6d363..97366ec 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "utahsdjs/utahsdjs2025", "description": "description", "minimum-stability": "dev", - "version": "0.0.1", + "version": "0.0.16", "license": "proprietary", "authors": [ { @@ -11,12 +11,13 @@ } ], "require": { - "php": ">=8.2.0", - "yosymfony/toml": "*", - "ext-mysqli": "*", + "aws/aws-sdk-php": ">=3.339.15", "ext-curl": "*", - "phpunit/phpunit": ">8.5.1.0", - "aws/aws-sdk-php": "*" + "ext-mysqli": "*", + "php": ">=8.2.0", + "phpunit/phpunit": ">=11", + "yosymfony/toml": "*", + "ext-zip": "*" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index c561621..5e74b18 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,566 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c891b4f6d2749c8df8c478b2acaf7679", + "content-hash": "adb0fe283e0b70b4602662fb7ea5bce8", "packages": [ + { + "name": "aws/aws-crt-php", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/d71d9906c7bb63a28295447ba12e74723bd3730e", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35||^5.6.3||^9.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality." + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "https://github.com/awslabs/aws-crt-php", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.7" + }, + "time": "2024-10-18T22:15:13+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.339.15", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "46ef2d3734ba8358966af80e4ac181633bd03692" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/46ef2d3734ba8358966af80e4ac181633bd03692", + "reference": "46ef2d3734ba8358966af80e4ac181633bd03692", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.2.3", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/promises": "^2.0", + "guzzlehttp/psr7": "^2.4.5", + "mtdowling/jmespath.php": "^2.8.0", + "php": ">=8.1", + "psr/http-message": "^2.0" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "composer/composer": "^2.7.8", + "dms/phpunit-arraysubset-asserts": "^0.4.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", + "psr/cache": "^2.0 || ^3.0", + "psr/simple-cache": "^2.0 || ^3.0", + "sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0", + "symfony/filesystem": "^v6.4.0 || ^v7.1.0", + "yoast/phpunit-polyfills": "^2.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Aws\\": "src/" + }, + "exclude-from-classmap": [ + "src/data/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "support": { + "forum": "https://github.com/aws/aws-sdk-php/discussions", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.339.15" + }, + "time": "2025-02-17T19:07:50+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.9.x-dev", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "41f5ce75250c5c3af5a4bb2410143ddfede8127c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41f5ce75250c5c3af5a4bb2410143ddfede8127c", + "reference": "41f5ce75250c5c3af5a4bb2410143ddfede8127c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "default-branch": true, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.9" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2025-02-03T10:53:14+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "90c5be4a7c8374e8079c06232b07eb6e5cbbfdf3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/90c5be4a7c8374e8079c06232b07eb6e5cbbfdf3", + "reference": "90c5be4a7c8374e8079c06232b07eb6e5cbbfdf3", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "default-branch": true, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2025-02-03T10:48:03+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.7.x-dev", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "ca06f23f35cf0b70a6f56d3d95c51bbc1062fade" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/ca06f23f35cf0b70a6f56d3d95c51bbc1062fade", + "reference": "ca06f23f35cf0b70a6f56d3d95c51bbc1062fade", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "default-branch": true, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.7" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2025-02-03T10:49:42+00:00" + }, + { + "name": "mtdowling/jmespath.php", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" + }, + "default-branch": true, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "files": [ + "src/JmesPath.php" + ], + "psr-4": { + "JmesPath\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0" + }, + "time": "2024-09-04T18:46:31+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "2f5294676c802a62b0549f6bc8983f14294ce369" + "reference": "024473a478be9df5fdaca2c793f2232fe788e414" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/2f5294676c802a62b0549f6bc8983f14294ce369", - "reference": "2f5294676c802a62b0549f6bc8983f14294ce369", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", + "reference": "024473a478be9df5fdaca2c793f2232fe788e414", "shasum": "" }, "require": { @@ -57,7 +603,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" }, "funding": [ { @@ -65,20 +611,20 @@ "type": "tidelift" } ], - "time": "2024-02-10T11:10:03+00:00" + "time": "2025-02-12T12:17:51+00:00" }, { "name": "nikic/php-parser", - "version": "dev-master", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c5ee33df86c06b3278c670f64273b1ba768a0744" + "reference": "447a020a1f875a434d62f2a401f53b82a396e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c5ee33df86c06b3278c670f64273b1ba768a0744", - "reference": "c5ee33df86c06b3278c670f64273b1ba768a0744", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", + "reference": "447a020a1f875a434d62f2a401f53b82a396e494", "shasum": "" }, "require": { @@ -91,7 +637,6 @@ "ircmaxell/php-yacc": "^0.0.7", "phpunit/phpunit": "^9.0" }, - "default-branch": true, "bin": [ "bin/php-parse" ], @@ -122,9 +667,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/master" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" }, - "time": "2024-04-19T12:04:10+00:00" + "time": "2024-12-30T11:07:19+00:00" }, { "name": "phar-io/manifest", @@ -247,45 +792,44 @@ }, { "name": "phpunit/php-code-coverage", - "version": "dev-main", + "version": "11.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cafa435d750d52e5e7c9c671341483d12d260c45" + "reference": "532c90222daa08133040389059739a3fb23ff726" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cafa435d750d52e5e7c9c671341483d12d260c45", - "reference": "cafa435d750d52e5e7c9c671341483d12d260c45", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/532c90222daa08133040389059739a3fb23ff726", + "reference": "532c90222daa08133040389059739a3fb23ff726", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.0", + "nikic/php-parser": "^5.4.0", "php": ">=8.2", - "phpunit/php-file-iterator": "^5.0", - "phpunit/php-text-template": "^4.0", - "sebastian/code-unit-reverse-lookup": "^4.0", - "sebastian/complexity": "^4.0", - "sebastian/environment": "^7.0", - "sebastian/lines-of-code": "^3.0", - "sebastian/version": "^5.0", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-text-template": "^4.0.1", + "sebastian/code-unit-reverse-lookup": "^4.0.1", + "sebastian/complexity": "^4.0.1", + "sebastian/environment": "^7.2.0", + "sebastian/lines-of-code": "^3.0.1", + "sebastian/version": "^5.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.5.2" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "11.0-dev" + "dev-main": "11.0.x-dev" } }, "autoload": { @@ -314,7 +858,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/main" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0" }, "funding": [ { @@ -322,33 +866,32 @@ "type": "github" } ], - "time": "2024-03-22T13:49:53+00:00" + "time": "2025-02-08T08:59:40+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "dev-main", + "version": "5.1.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "17bc6a26ceb3b67795b077c30f64eb34ac567940" + "reference": "81c1a3b5618745429a4cddb617811b1a67844756" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/17bc6a26ceb3b67795b077c30f64eb34ac567940", - "reference": "17bc6a26ceb3b67795b077c30f64eb34ac567940", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/81c1a3b5618745429a4cddb617811b1a67844756", + "reference": "81c1a3b5618745429a4cddb617811b1a67844756", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -376,7 +919,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/main" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1" }, "funding": [ { @@ -384,20 +927,20 @@ "type": "github" } ], - "time": "2024-03-22T13:50:31+00:00" + "time": "2025-01-15T13:38:51+00:00" }, { "name": "phpunit/php-invoker", - "version": "dev-main", + "version": "5.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "ae870f44c9f8c65db178de7dcb206117669d85c8" + "reference": "4bb10b0973f1ae03c455703cbce4b945a2823eb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/ae870f44c9f8c65db178de7dcb206117669d85c8", - "reference": "ae870f44c9f8c65db178de7dcb206117669d85c8", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/4bb10b0973f1ae03c455703cbce4b945a2823eb1", + "reference": "4bb10b0973f1ae03c455703cbce4b945a2823eb1", "shasum": "" }, "require": { @@ -405,12 +948,11 @@ }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-pcntl": "*" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -441,7 +983,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/main" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0" }, "funding": [ { @@ -449,29 +991,28 @@ "type": "github" } ], - "time": "2024-03-22T13:51:25+00:00" + "time": "2025-01-16T08:01:27+00:00" }, { "name": "phpunit/php-text-template", - "version": "dev-main", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "12a457719941dff82067d119e39767cb3d63f515" + "reference": "824e778d57ef78e2746ee5455a3ed5919b6dde83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/12a457719941dff82067d119e39767cb3d63f515", - "reference": "12a457719941dff82067d119e39767cb3d63f515", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/824e778d57ef78e2746ee5455a3ed5919b6dde83", + "reference": "824e778d57ef78e2746ee5455a3ed5919b6dde83", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -502,7 +1043,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/main" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0" }, "funding": [ { @@ -510,29 +1051,28 @@ "type": "github" } ], - "time": "2024-03-22T13:51:58+00:00" + "time": "2025-01-16T08:06:04+00:00" }, { "name": "phpunit/php-timer", - "version": "dev-main", + "version": "7.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e8331ed6a4f21053ac7ba41f337ed5ef447c6378" + "reference": "9abd4039e4c05215137c49b6e81ba248aeaafcd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e8331ed6a4f21053ac7ba41f337ed5ef447c6378", - "reference": "e8331ed6a4f21053ac7ba41f337ed5ef447c6378", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/9abd4039e4c05215137c49b6e81ba248aeaafcd4", + "reference": "9abd4039e4c05215137c49b6e81ba248aeaafcd4", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -563,7 +1103,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/main" + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0" }, "funding": [ { @@ -571,20 +1111,20 @@ "type": "github" } ], - "time": "2024-03-22T13:52:26+00:00" + "time": "2025-01-16T08:08:47+00:00" }, { "name": "phpunit/phpunit", - "version": "dev-main", + "version": "11.5.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "450ca7684a02adb4eed46c4e9f64ef57fc7ac57b" + "reference": "c9bd61aab12f0fc5e82ecfe621ff518a1d1f1049" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/450ca7684a02adb4eed46c4e9f64ef57fc7ac57b", - "reference": "450ca7684a02adb4eed46c4e9f64ef57fc7ac57b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c9bd61aab12f0fc5e82ecfe621ff518a1d1f1049", + "reference": "c9bd61aab12f0fc5e82ecfe621ff518a1d1f1049", "shasum": "" }, "require": { @@ -594,37 +1134,37 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", + "myclabs/deep-copy": "^1.12.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", "php": ">=8.2", - "phpunit/php-code-coverage": "^11.0", - "phpunit/php-file-iterator": "^5.0", - "phpunit/php-invoker": "^5.0", - "phpunit/php-text-template": "^4.0", - "phpunit/php-timer": "^7.0", - "sebastian/cli-parser": "^3.0", - "sebastian/code-unit": "^3.0", - "sebastian/comparator": "^6.0", - "sebastian/diff": "^6.0", - "sebastian/environment": "^7.0", - "sebastian/exporter": "^6.0", - "sebastian/global-state": "^7.0", - "sebastian/object-enumerator": "^6.0", - "sebastian/type": "^5.0", - "sebastian/version": "^5.0" + "phpunit/php-code-coverage": "^11.0.8", + "phpunit/php-file-iterator": "^5.1.0", + "phpunit/php-invoker": "^5.0.1", + "phpunit/php-text-template": "^4.0.1", + "phpunit/php-timer": "^7.0.1", + "sebastian/cli-parser": "^3.0.2", + "sebastian/code-unit": "^3.0.2", + "sebastian/comparator": "^6.3.0", + "sebastian/diff": "^6.0.2", + "sebastian/environment": "^7.2.0", + "sebastian/exporter": "^6.3.0", + "sebastian/global-state": "^7.0.2", + "sebastian/object-enumerator": "^6.0.1", + "sebastian/type": "^5.1.0", + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" }, - "default-branch": true, "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-main": "11.2-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -656,7 +1196,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/main" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.8" }, "funding": [ { @@ -672,29 +1212,234 @@ "type": "tidelift" } ], - "time": "2024-05-14T14:32:54+00:00" + "time": "2025-02-18T06:26:59+00:00" }, { - "name": "sebastian/cli-parser", - "version": "dev-main", + "name": "psr/http-client", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "47c93ee55891788203dcb8efefa5abe46472266b" + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/47c93ee55891788203dcb8efefa5abe46472266b", - "reference": "47c93ee55891788203dcb8efefa5abe46472266b", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "3.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "02c40090ebd250b0147747dc93e9ed81fcab0bbb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/02c40090ebd250b0147747dc93e9ed81fcab0bbb", + "reference": "02c40090ebd250b0147747dc93e9ed81fcab0bbb", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -722,7 +1467,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/main" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0" }, "funding": [ { @@ -730,7 +1475,7 @@ "type": "github" } ], - "time": "2024-04-04T08:53:05+00:00" + "time": "2025-01-16T08:11:18+00:00" }, { "name": "sebastian/code-unit", @@ -738,19 +1483,19 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "2a4919d2c7eb2e17379ea1e878fc8c176042ecf4" + "reference": "1f56f951e080c0353ee13ed8e5a8e900b9e7a6b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/2a4919d2c7eb2e17379ea1e878fc8c176042ecf4", - "reference": "2a4919d2c7eb2e17379ea1e878fc8c176042ecf4", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1f56f951e080c0353ee13ed8e5a8e900b9e7a6b7", + "reference": "1f56f951e080c0353ee13ed8e5a8e900b9e7a6b7", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.5" }, "default-branch": true, "type": "library", @@ -788,7 +1533,7 @@ "type": "github" } ], - "time": "2024-04-03T07:55:50+00:00" + "time": "2025-01-01T09:30:51+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -796,19 +1541,19 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1a47d8a852f23d8320d5f401384260bea8b0b90b" + "reference": "1b040bebc0fc06a6e6f65cd3079de9ba0dbfaef1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1a47d8a852f23d8320d5f401384260bea8b0b90b", - "reference": "1a47d8a852f23d8320d5f401384260bea8b0b90b", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1b040bebc0fc06a6e6f65cd3079de9ba0dbfaef1", + "reference": "1b040bebc0fc06a6e6f65cd3079de9ba0dbfaef1", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, "default-branch": true, "type": "library", @@ -845,20 +1590,20 @@ "type": "github" } ], - "time": "2024-03-22T13:41:37+00:00" + "time": "2025-01-01T09:31:42+00:00" }, { "name": "sebastian/comparator", - "version": "dev-main", + "version": "6.3.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "332f4a7ab51027ff603d1d8802e67dd76d055690" + "reference": "cbcaecfa4ab41974fccd3f7798870cf47221c477" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/332f4a7ab51027ff603d1d8802e67dd76d055690", - "reference": "332f4a7ab51027ff603d1d8802e67dd76d055690", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/cbcaecfa4ab41974fccd3f7798870cf47221c477", + "reference": "cbcaecfa4ab41974fccd3f7798870cf47221c477", "shasum": "" }, "require": { @@ -869,13 +1614,15 @@ "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.4" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -915,7 +1662,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/main" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.3" }, "funding": [ { @@ -923,20 +1670,20 @@ "type": "github" } ], - "time": "2024-03-22T13:42:26+00:00" + "time": "2025-01-16T08:17:12+00:00" }, { "name": "sebastian/complexity", - "version": "dev-main", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "6046d9b01615fd134232aaca1324390f89f5532c" + "reference": "217eb6229de259b43e2ff3dd82ef3a759f31af9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/6046d9b01615fd134232aaca1324390f89f5532c", - "reference": "6046d9b01615fd134232aaca1324390f89f5532c", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/217eb6229de259b43e2ff3dd82ef3a759f31af9d", + "reference": "217eb6229de259b43e2ff3dd82ef3a759f31af9d", "shasum": "" }, "require": { @@ -944,9 +1691,8 @@ "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -974,7 +1720,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/main" + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0" }, "funding": [ { @@ -982,30 +1728,29 @@ "type": "github" } ], - "time": "2024-03-22T13:42:56+00:00" + "time": "2025-01-16T08:18:27+00:00" }, { "name": "sebastian/diff", - "version": "dev-main", + "version": "6.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "367ce918f5d43d068889655f9720e2baf3325d62" + "reference": "689a62c19e700d71d8d1a82550cb4f090744dcb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/367ce918f5d43d068889655f9720e2baf3325d62", - "reference": "367ce918f5d43d068889655f9720e2baf3325d62", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/689a62c19e700d71d8d1a82550cb4f090744dcb0", + "reference": "689a62c19e700d71d8d1a82550cb4f090744dcb0", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0", + "phpunit/phpunit": "^11.3", "symfony/process": "^4.2 || ^5" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1042,7 +1787,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/main" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0" }, "funding": [ { @@ -1050,32 +1795,31 @@ "type": "github" } ], - "time": "2024-03-22T13:44:09+00:00" + "time": "2025-01-16T08:21:04+00:00" }, { "name": "sebastian/environment", - "version": "dev-main", + "version": "7.2.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "ff8e9b0dc10315e13f3a7951eec6b227e66997e7" + "reference": "3af4c9f584519cbb3667b5e9b3b14baa0047ecab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/ff8e9b0dc10315e13f3a7951eec6b227e66997e7", - "reference": "ff8e9b0dc10315e13f3a7951eec6b227e66997e7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/3af4c9f584519cbb3667b5e9b3b14baa0047ecab", + "reference": "3af4c9f584519cbb3667b5e9b3b14baa0047ecab", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-posix": "*" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1107,7 +1851,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/main" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2" }, "funding": [ { @@ -1115,20 +1859,20 @@ "type": "github" } ], - "time": "2024-03-23T13:07:37+00:00" + "time": "2025-01-16T08:26:24+00:00" }, { "name": "sebastian/exporter", - "version": "dev-main", + "version": "6.3.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "b9c7cad904c5c2596beb29ceb8fb794be3edc539" + "reference": "20a3d69003af1cd933e9b6d1c584e948885a29e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/b9c7cad904c5c2596beb29ceb8fb794be3edc539", - "reference": "b9c7cad904c5c2596beb29ceb8fb794be3edc539", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/20a3d69003af1cd933e9b6d1c584e948885a29e1", + "reference": "20a3d69003af1cd933e9b6d1c584e948885a29e1", "shasum": "" }, "require": { @@ -1137,13 +1881,12 @@ "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "6.3-dev" } }, "autoload": { @@ -1186,7 +1929,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/main" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3" }, "funding": [ { @@ -1194,20 +1937,20 @@ "type": "github" } ], - "time": "2024-04-04T06:31:26+00:00" + "time": "2025-01-16T08:30:07+00:00" }, { "name": "sebastian/global-state", - "version": "dev-main", + "version": "7.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "8e38c9f37278523a7484c1f11830a4e323d3b179" + "reference": "5a559a8b70050ae2b8ee4a431232c8115ea91b2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/8e38c9f37278523a7484c1f11830a4e323d3b179", - "reference": "8e38c9f37278523a7484c1f11830a4e323d3b179", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/5a559a8b70050ae2b8ee4a431232c8115ea91b2b", + "reference": "5a559a8b70050ae2b8ee4a431232c8115ea91b2b", "shasum": "" }, "require": { @@ -1217,9 +1960,8 @@ }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1249,7 +1991,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/main" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0" }, "funding": [ { @@ -1257,20 +1999,20 @@ "type": "github" } ], - "time": "2024-03-22T13:46:11+00:00" + "time": "2025-01-16T09:14:35+00:00" }, { "name": "sebastian/lines-of-code", - "version": "dev-main", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "b60275143e48815ee6a3673f0227676774bca056" + "reference": "7ec7f9171e26ecb441dbdb0224ff994a133b60c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/b60275143e48815ee6a3673f0227676774bca056", - "reference": "b60275143e48815ee6a3673f0227676774bca056", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/7ec7f9171e26ecb441dbdb0224ff994a133b60c7", + "reference": "7ec7f9171e26ecb441dbdb0224ff994a133b60c7", "shasum": "" }, "require": { @@ -1278,9 +2020,8 @@ "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1308,7 +2049,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/main" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0" }, "funding": [ { @@ -1316,20 +2057,20 @@ "type": "github" } ], - "time": "2024-03-22T13:46:58+00:00" + "time": "2025-01-16T08:35:07+00:00" }, { "name": "sebastian/object-enumerator", - "version": "dev-main", + "version": "6.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "ab4ee4ea2987e495c755b5ace9aaa913124e1df7" + "reference": "2b74f801fe98397762d67edf28c0c803b901ea6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ab4ee4ea2987e495c755b5ace9aaa913124e1df7", - "reference": "ab4ee4ea2987e495c755b5ace9aaa913124e1df7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/2b74f801fe98397762d67edf28c0c803b901ea6a", + "reference": "2b74f801fe98397762d67edf28c0c803b901ea6a", "shasum": "" }, "require": { @@ -1338,9 +2079,8 @@ "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1367,7 +2107,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/main" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0" }, "funding": [ { @@ -1375,29 +2115,28 @@ "type": "github" } ], - "time": "2024-03-22T13:47:32+00:00" + "time": "2025-01-16T08:37:16+00:00" }, { "name": "sebastian/object-reflector", - "version": "dev-main", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "ab3861c3fc853c753d9822e139e0d8be4fe364e5" + "reference": "7b3bcff19539050ca8ea314b185755f82fba7d92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/ab3861c3fc853c753d9822e139e0d8be4fe364e5", - "reference": "ab3861c3fc853c753d9822e139e0d8be4fe364e5", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7b3bcff19539050ca8ea314b185755f82fba7d92", + "reference": "7b3bcff19539050ca8ea314b185755f82fba7d92", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1424,7 +2163,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/main" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0" }, "funding": [ { @@ -1432,29 +2171,28 @@ "type": "github" } ], - "time": "2024-03-22T13:48:42+00:00" + "time": "2025-01-16T08:39:28+00:00" }, { "name": "sebastian/recursion-context", - "version": "dev-main", + "version": "6.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "396fdbbdb95420649b3d0c4766b992da686c22fc" + "reference": "535fb763bca97d0f5beb4cc327f4b76a7c281010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/396fdbbdb95420649b3d0c4766b992da686c22fc", - "reference": "396fdbbdb95420649b3d0c4766b992da686c22fc", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/535fb763bca97d0f5beb4cc327f4b76a7c281010", + "reference": "535fb763bca97d0f5beb4cc327f4b76a7c281010", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1489,7 +2227,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/main" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0" }, "funding": [ { @@ -1497,33 +2235,32 @@ "type": "github" } ], - "time": "2024-03-29T09:41:38+00:00" + "time": "2025-01-16T08:41:27+00:00" }, { "name": "sebastian/type", - "version": "dev-main", + "version": "5.1.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fa5a3eb73ada9ec9c2014399287147e1b4a18db7" + "reference": "89b125dbf292f30de4698e7f38efabaa85c56dbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fa5a3eb73ada9ec9c2014399287147e1b4a18db7", - "reference": "fa5a3eb73ada9ec9c2014399287147e1b4a18db7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/89b125dbf292f30de4698e7f38efabaa85c56dbf", + "reference": "89b125dbf292f30de4698e7f38efabaa85c56dbf", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -1547,7 +2284,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/main" + "source": "https://github.com/sebastianbergmann/type/tree/5.1" }, "funding": [ { @@ -1555,26 +2292,25 @@ "type": "github" } ], - "time": "2024-03-22T13:53:47+00:00" + "time": "2025-01-16T08:43:37+00:00" }, { "name": "sebastian/version", - "version": "dev-main", + "version": "5.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "975de64e70a76a46e743bac6e3210c6953068323" + "reference": "39b2cc232db6ec9bcfcdc94b73b0579151503d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/975de64e70a76a46e743bac6e3210c6953068323", - "reference": "975de64e70a76a46e743bac6e3210c6953068323", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/39b2cc232db6ec9bcfcdc94b73b0579151503d18", + "reference": "39b2cc232db6ec9bcfcdc94b73b0579151503d18", "shasum": "" }, "require": { "php": ">=8.2" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1602,7 +2338,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/main" + "source": "https://github.com/sebastianbergmann/version/tree/5.0" }, "funding": [ { @@ -1610,7 +2346,209 @@ "type": "github" } ], - "time": "2024-03-22T13:54:56+00:00" + "time": "2025-01-16T08:45:51+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/main" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "default-branch": true, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/1.x" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" }, { "name": "theseer/tokenizer", @@ -1778,7 +2716,7 @@ "packages-dev": [], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -1786,6 +2724,6 @@ "ext-mysqli": "*", "ext-curl": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/composer.phar b/composer.phar index 53f8b81..4fa5122 100644 Binary files a/composer.phar and b/composer.phar differ diff --git a/contact.php b/contact.php index ea161dd..42f0cfc 100644 --- a/contact.php +++ b/contact.php @@ -1,69 +1,128 @@ send_message("Name: $name\nEmail: $email\nMessage: $message"); + $result = $telegram->send_message("Name: $name\nEmail: $email\nIP Address: $ipAddress\nMessage: $message"); } $title = $locale['contactus']; require_once 'includes/header.php'; -if ($_POST) { - if ($result['ok']) { - echo ''; - } else { - echo ''; - } -} ?> -
-
-
-
- -
+ + + + +
+ -
-
-
-
-

-

For any inquiries, please complete the form below.

-
+
+ + + +
+
+ +
+
+ + +
+ +
+
+

+

We'd love to hear from you. Send us a message and we'll respond as soon as possible.

-
-
-
-
+
+ +
+ +
+
+

Send us a Message

+ +
- +
-
+
- +
-
+
- +
- +
- + + diff --git a/dj.php b/dj.php index d1b1854..2969b61 100644 --- a/dj.php +++ b/dj.php @@ -151,7 +151,7 @@ require_once 'includes/header.php'; foreach ($mixes as $mix) { $output = new Mix($mix['slug'], $db); - $genres = $output->get_genres(); + $genres = $output->getGenres(); $genrelist = []; foreach ($genres as $genre) { @@ -164,8 +164,8 @@ require_once 'includes/header.php'; // Column for mix name and link echo ''; // End column @@ -185,7 +185,7 @@ require_once 'includes/header.php'; // Column for duration echo '
'; echo '

'; - $duration = $output->get_duration(); + $duration = $output->getDuration(); echo $duration['t']; echo '

'; echo '
'; // End column @@ -194,9 +194,9 @@ require_once 'includes/header.php'; echo '
'; echo '

'; // date format should just be year - $date = $output->get_recorded(); + $date = $output->getRecorded(); if (is_null($date) || empty(trim($date))) { - $date = $output->get_created(); + $date = $output->getCreated(); } echo date('Y', strtotime($date)); diff --git a/includes/footer.php b/includes/footer.php index 42e2cb1..324c93d 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,20 +1,33 @@ -

+
+ - \ No newline at end of file + diff --git a/includes/globals.php b/includes/globals.php index bb88f91..305e08f 100644 --- a/includes/globals.php +++ b/includes/globals.php @@ -4,24 +4,21 @@ require_once 'vendor/autoload.php'; use Yosymfony\Toml\Toml; +use DJMixHosting\SessionManager; $config = Toml::ParseFile('includes/config.toml'); require_once 'functions/i18n.php'; -require_once 'includes/sessions.php'; +// Instead of including sessions.php, start the session via SessionManager: +SessionManager::start(); + require_once 'includes/lang_loader.php'; - $mixshowsPages = ["/mixshows", "/mixshows/", "/mixshows.php"]; - $djsPages = ["/djs", "/djs/", "/djs.php"]; - $genrePages = ["/genres", "/genres/", "/genres.php"]; - $mixPages = ["/mix", "/mix/", "/mix.php"]; - $specialStyle = array_merge($mixshowsPages, $djsPages, $genrePages); - /** * @param int $count * @param mixed $dj @@ -51,7 +48,6 @@ function social_line($social, $value): string $icon = ""; $url = ""; $color = "#000000"; - switch ($social) { case "facebook": $icon = "fa-brands fa-facebook"; @@ -107,26 +103,22 @@ function social_line($social, $value): string $name = "Website"; break; } - return " -
  • - -

    $value -

    -
  • "; +
  • + +

    $value

    +
  • "; } function box_line($title, $value): string { - return "
    -
    -
    -

    $title

    -
    -
    -

    $value

    -
    -
    "; - -} \ No newline at end of file +
    +
    +

    $title

    +
    +
    +

    $value

    +
    +
    "; +} diff --git a/includes/header-meta.php b/includes/header-meta.php index 9e16884..7654117 100644 --- a/includes/header-meta.php +++ b/includes/header-meta.php @@ -18,4 +18,3 @@ if (isset($mix)) { echo $meta; } } - diff --git a/includes/header.php b/includes/header.php index dcdf6a0..100ffb0 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,11 +1,14 @@ - - + + + - diff --git a/includes/sessions.php b/includes/sessions.php deleted file mode 100644 index 843a24e..0000000 --- a/includes/sessions.php +++ /dev/null @@ -1,8 +0,0 @@ - "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/ar-SA/messages.php b/locale/ar-SA/messages.php index 97e6de5..ea2aba4 100644 --- a/locale/ar-SA/messages.php +++ b/locale/ar-SA/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'مرحبا بكم في موقعنا على الإنترنت!', 'description' => 'هذا وصف بالإنكليزية.', - 'desc' => 'Description', + 'desc' => 'الوصف', 'userProfile' => "الملف الشخصي للمستخدم", 'user' => 'المستخدم', 'home' => 'المنزل', @@ -14,17 +14,17 @@ return [ 'login' => 'تسجيل الدخول', 'message' => 'رسالة', 'follow' => 'اتبع', - 'djs' => 'DJs', + 'djs' => 'دي جي', "djNotFound" => "تعذر تحميل DJ; إما لم يتم العثور على DJ أو هذا DJ خاص.", "notfound" => "لم يتم العثور على الصفحة", "genre" => "النوع", - "genres" => "Genres", + "genres" => "أنواع الموسيقى", "genreNotFound" => "لا يمكن تحميل النوع الجيد؛ إما لم يتم العثور على هذا النوع، أو كان فارغا، أو هذا النوع خاص.", "mix-count" => "عدد المزيج", "mixes" => "خلط", "mix" => "خليط", "mixNotFound" => "تعذر تحميل المزيج ؛ إما لم يتم العثور على المزيج ، أو كان فارغا، أو هذا المزيج خاص.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "تعذر تحميل الخليط؛ إما لم يتم العثور على الخليط، أو كان فارغاً، أو هذا الخليط خاص.", "mixName" => "اسم المزيج", "mixDescription" => "وصف المزيج", "mixLength" => "مزيج الطول", @@ -54,18 +54,23 @@ return [ "plays" => "مشغلات", "play" => "تشغيل", "contactus" => "اتصل بنا", - "allrightsreserved" => "جميع الحقوق محفوظة.format@@0", - "mixshows" => "Mixshows", - "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "allrightsreserved" => "جميع الحقوق محفوظة.", + "mixshows" => "المزج", + "mixshow" => "عرض ميكس", + "mixshowName" => "اسم المزج", + "share" => "مشاركة", + "sahrethismix" => "شارك هذا المزيج", + "sharethismixshow" => "شارك هذا المزيج", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "السنة", + "sharetotwitter" => "شارك إلى X (تويتر سابقاً)", + "sharetofb" => "مشاركة على Facebook", + "sharetoig" => "مشاركة على Instagram", + "copyurl" => "نسخ الرابط", + "urlcopiedtoclipboard" => "تم نسخ عنوان URL إلى الحافظة", + "failedtocopyurl" => "فشل في نسخ الرابط", + "name" => "الاسم", + "username" => "اسم المستخدم", + "logout" => "تسجيل الخروج", + "upload" => "تحميل", ]; \ No newline at end of file diff --git a/locale/ca-ES/messages.php b/locale/ca-ES/messages.php index afd1a35..8f5993b 100644 --- a/locale/ca-ES/messages.php +++ b/locale/ca-ES/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/cs-CZ/messages.php b/locale/cs-CZ/messages.php index 16a70ba..8c91f7d 100644 --- a/locale/cs-CZ/messages.php +++ b/locale/cs-CZ/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Vítejte na našich webových stránkách!', 'description' => 'To je popis v angličtině.', - 'desc' => 'Description', + 'desc' => 'L 343, 22.12.2009, s. 1).', 'userProfile' => "Profil uživatele", 'user' => 'Uživatel', 'home' => 'Domů', @@ -24,7 +24,7 @@ return [ "mixes" => "Směsi", "mix" => "Míchat", "mixNotFound" => "Nelze načíst mix; buď směs nebyla nalezena, byla prázdná, nebo je tato směs soukromá.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Nelze načíst mixshow; buď mixshow nebyl nalezen, byl prázdný, nebo je tento mixshow soukromý.", "mixName" => "Směsný název", "mixDescription" => "Smíchat popis", "mixLength" => "Míchat délku", @@ -55,17 +55,22 @@ return [ "play" => "Hrát", "contactus" => "Kontaktujte nás", "allrightsreserved" => "Všechna práva vyhrazena.", - "mixshows" => "Mixshows", + "mixshows" => "Směšovače", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Název Mixshow", + "share" => "Sdílet", + "sahrethismix" => "Sdílet tuto skladbu", + "sharethismixshow" => "Sdílet tento mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Rok", + "sharetotwitter" => "Sdílet na X (dříve Twitter)", + "sharetofb" => "Sdílet na Facebook", + "sharetoig" => "Sdílet na Instagramu", + "copyurl" => "Kopírovat URL", + "urlcopiedtoclipboard" => "URL zkopírováno do schránky", + "failedtocopyurl" => "Kopírování URL se nezdařilo", + "name" => "Název", + "username" => "Uživatelské jméno", + "logout" => "Odhlásit se", + "upload" => "Nahrát", ]; \ No newline at end of file diff --git a/locale/da-DK/messages.php b/locale/da-DK/messages.php index 2812713..3676dc8 100644 --- a/locale/da-DK/messages.php +++ b/locale/da-DK/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Velkommen til vores hjemmeside!', 'description' => 'Dette er en beskrivelse på engelsk.', - 'desc' => 'Description', + 'desc' => 'Varebeskrivelse', 'userProfile' => "Bruger Profil", 'user' => 'Bruger', 'home' => 'Hjem', @@ -24,7 +24,7 @@ return [ "mixes" => "Blandinger", "mix" => "Bland", "mixNotFound" => "Kunne ikke indlæse mix. Enten blev blandingen ikke fundet, var tom, eller også er dette miks privat.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Kunne ikke indlæse mixshow; enten blev mixshowet ikke fundet, var tomt, eller dette mixshow er privat.", "mixName" => "Mix Navn", "mixDescription" => "Bland Beskrivelse", "mixLength" => "Bland Længde", @@ -57,15 +57,20 @@ return [ "allrightsreserved" => "Alle rettigheder forbeholdt.", "mixshows" => "Mixshows", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Mixshow Navn", + "share" => "Del", + "sahrethismix" => "Del dette mix", + "sharethismixshow" => "Del dette mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "År", + "sharetotwitter" => "Del til X (tidligere Twitter)", + "sharetofb" => "Del på Facebook", + "sharetoig" => "Del på Instagram", + "copyurl" => "Kopiér URL", + "urlcopiedtoclipboard" => "URL kopieret til udklipsholder", + "failedtocopyurl" => "Kopiering af URL mislykkedes", + "name" => "Navn", + "username" => "Brugernavn", + "logout" => "Log Ud", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/de-DE/messages.php b/locale/de-DE/messages.php index be2a138..a7bb1e6 100644 --- a/locale/de-DE/messages.php +++ b/locale/de-DE/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Willkommen auf unserer Website!', 'description' => 'Dies ist eine Beschreibung auf Englisch.', - 'desc' => 'Description', + 'desc' => 'Beschreibung', 'userProfile' => "Benutzerprofil", 'user' => 'Benutzer', 'home' => 'Zuhause', @@ -24,7 +24,7 @@ return [ "mixes" => "Mischungen", "mix" => "Mix", "mixNotFound" => "Mix konnte nicht geladen werden; entweder wurde der Mix nicht gefunden, war leer oder dieser Mix ist privat.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Mixshow konnte nicht geladen werden; entweder wurde die Mixshow nicht gefunden, war leer oder diese Mixshow ist privat.", "mixName" => "Mix-Name", "mixDescription" => "Mix-Beschreibung", "mixLength" => "Mix-Länge", @@ -55,17 +55,22 @@ return [ "play" => "Abspielen", "contactus" => "Kontaktiere uns", "allrightsreserved" => "Alle Rechte vorbehalten.", - "mixshows" => "Mixshows", + "mixshows" => "Mix-Shows", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Mix-Show-Name", + "share" => "Teilen", + "sahrethismix" => "Diesen Mix teilen", + "sharethismixshow" => "Diese Mixshow teilen", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Jahr", + "sharetotwitter" => "Auf X teilen (ehemals Twitter)", + "sharetofb" => "Auf Facebook teilen", + "sharetoig" => "Auf Instagram teilen", + "copyurl" => "URL kopieren", + "urlcopiedtoclipboard" => "URL in Zwischenablage kopiert", + "failedtocopyurl" => "Fehler beim Kopieren der URL", + "name" => "Name", + "username" => "Benutzername", + "logout" => "Abmelden", + "upload" => "Hochladen", ]; \ No newline at end of file diff --git a/locale/el-GR/messages.php b/locale/el-GR/messages.php index 5a810ee..25231de 100644 --- a/locale/el-GR/messages.php +++ b/locale/el-GR/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Καλώς ήλθατε στην ιστοσελίδα μας!', 'description' => 'Αυτή είναι μια περιγραφή στα αγγλικά.', - 'desc' => 'Description', + 'desc' => 'Περιγραφή', 'userProfile' => "Προφίλ Χρήστη", 'user' => 'Χρήστης', 'home' => 'Αρχική', @@ -24,7 +24,7 @@ return [ "mixes" => "Μείγματα", "mix" => "Μείγμα", "mixNotFound" => "Δεν ήταν δυνατή η φόρτωση του μείγματος. Είτε το μείγμα δεν βρέθηκε, ήταν άδειο, είτε αυτό το μίγμα είναι ιδιωτικό.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Δεν ήταν δυνατή η φόρτωση του mixshow. Είτε το mixshow δεν βρέθηκε, ήταν άδειο, είτε αυτό το mixshow είναι ιδιωτικό.", "mixName" => "Όνομα Μεικτού", "mixDescription" => "Περιγραφή Μεικτού", "mixLength" => "Μήκος Μείγματος", @@ -55,17 +55,22 @@ return [ "play" => "Αναπαραγωγή", "contactus" => "Επικοινωνήστε Μαζί Μας", "allrightsreserved" => "Με επιφύλαξη παντός δικαιώματος.", - "mixshows" => "Mixshows", + "mixshows" => "Μείγματα", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Όνομα Mixshow", + "share" => "Κοινοποίηση", + "sahrethismix" => "Μοιραστείτε αυτό το μίγμα", + "sharethismixshow" => "Μοιραστείτε αυτό το μίγμα", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Έτος", + "sharetotwitter" => "Μοιραστείτε στο X (πρώην Twitter)", + "sharetofb" => "Κοινοποίηση στο Facebook", + "sharetoig" => "Κοινοποίηση στο Instagram", + "copyurl" => "Αντιγραφή URL", + "urlcopiedtoclipboard" => "Το URL αντιγράφηκε στο πρόχειρο", + "failedtocopyurl" => "Αποτυχία αντιγραφής URL", + "name" => "Όνομα", + "username" => "Όνομα Χρήστη", + "logout" => "Αποσύνδεση", + "upload" => "Ανέβασμα", ]; \ No newline at end of file diff --git a/locale/en-US/messages.php b/locale/en-US/messages.php index 2804409..9f3209e 100644 --- a/locale/en-US/messages.php +++ b/locale/en-US/messages.php @@ -71,4 +71,17 @@ return [ "failedtocopyurl" => "Failed to copy URL", "name" => "Name", "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", + "loginToVerifyEmail" => "You must be logged in to verify your email.", + "loginToUploadMix" => "You must be logged in to upload a mix.", + "verificationCodeRequired" => "Verification code is required.", + "recordedDate" => "Recorded Date", + "noUploadedFileFound" => "No uploaded file found. Please upload a mix file.", + "mixTitleRequired" => "Mix title is required.", + "errorUploadCDN" => "Error uploading file to CDN: ", + "errorSavingMixDB" => "Error saving mix to database.", + "uploadedPendingApproval" => "Mix uploaded successfully and is pending approval.", + "uploadHeader1" => "Upload your mix to Utah's DJs" + ]; \ No newline at end of file diff --git a/locale/es-ES/messages.php b/locale/es-ES/messages.php index 2d7fece..338c9fb 100644 --- a/locale/es-ES/messages.php +++ b/locale/es-ES/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => '¡Bienvenido a nuestro sitio web!', 'description' => 'This is a description in Spanish.', - 'desc' => 'Description', + 'desc' => 'Descripción', 'userProfile' => "Perfil de usuario", 'user' => 'Usuario', 'home' => 'Inicio', @@ -24,7 +24,7 @@ return [ "mixes" => "Mezclas", "mix" => "Mezcla", "mixNotFound" => "No se pudo cargar la mezcla; o bien la mezcla no fue encontrada, estaba vacía, o esta mezcla es privada.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "No se pudo cargar mixshow; o bien el mixshow no fue encontrado, estaba vacío, o este mixshow es privado.", "mixName" => "Mezclar nombre", "mixDescription" => "Mezclar descripción", "mixLength" => "Mezclar longitud", @@ -57,15 +57,20 @@ return [ "allrightsreserved" => "Todos los derechos reservados.", "mixshows" => "Mixshows", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Nombre de Mixshow", + "share" => "Compartir", + "sahrethismix" => "Compartir esta mezcla", + "sharethismixshow" => "Compartir este mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Año", + "sharetotwitter" => "Compartir en X (anteriormente Twitter)", + "sharetofb" => "Compartir en Facebook", + "sharetoig" => "Compartir en Instagram", + "copyurl" => "Copiar URL", + "urlcopiedtoclipboard" => "URL copiada al portapapeles", + "failedtocopyurl" => "Error al copiar la URL", + "name" => "Nombre", + "username" => "Usuario", + "logout" => "Cerrar sesión", + "upload" => "Subir", ]; \ No newline at end of file diff --git a/locale/fi-FI/messages.php b/locale/fi-FI/messages.php index c77402a..0c4b838 100644 --- a/locale/fi-FI/messages.php +++ b/locale/fi-FI/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Tervetuloa sivustollemme!', 'description' => 'Tämä on englanninkielinen kuvaus.', - 'desc' => 'Description', + 'desc' => 'Kuvaus', 'userProfile' => "Käyttäjän Profiili", 'user' => 'Käyttäjä', 'home' => 'Koti', @@ -24,7 +24,7 @@ return [ "mixes" => "Sekoitukset", "mix" => "Sekoita", "mixNotFound" => "Sekoitusta ei voitu ladata. Sekoitus ei löytynyt, se oli tyhjä, tai tämä sekoitus on yksityinen.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Sekoitusnäyttöä ei voitu ladata. Sekoitusnäyttöä ei löytynyt, se oli tyhjä, tai tämä mixshow on yksityinen.", "mixName" => "Sekoita Nimi", "mixDescription" => "Sekoita Kuvaus", "mixLength" => "Sekoita Pituus", @@ -57,15 +57,20 @@ return [ "allrightsreserved" => "Kaikki oikeudet pidätetään.", "mixshows" => "Mixshows", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Mixshow Nimi", + "share" => "Jaa", + "sahrethismix" => "Jaa tämä sekoitus", + "sharethismixshow" => "Jaa tämä mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Vuosi", + "sharetotwitter" => "Jaa kohtaan X (entinen Twitter)", + "sharetofb" => "Jaa Facebookiin", + "sharetoig" => "Jaa Instagramiin", + "copyurl" => "Kopioi URL", + "urlcopiedtoclipboard" => "URL kopioitu leikepöydälle", + "failedtocopyurl" => "URL-osoitteen kopiointi epäonnistui", + "name" => "Nimi", + "username" => "Käyttäjätunnus", + "logout" => "Kirjaudu Ulos", + "upload" => "Lähetä", ]; \ No newline at end of file diff --git a/locale/fil-PH/messages.php b/locale/fil-PH/messages.php index 1454cd5..8f1dca7 100644 --- a/locale/fil-PH/messages.php +++ b/locale/fil-PH/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/fr-FR/messages.php b/locale/fr-FR/messages.php index 97d8903..b399a35 100644 --- a/locale/fr-FR/messages.php +++ b/locale/fr-FR/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Bienvenue sur notre site Web!', 'description' => 'Ceci est une description en français.', - 'desc' => 'Description', + 'desc' => 'Libellé', 'userProfile' => "Profil de l'utilisateur", 'user' => 'Utilisateur', 'home' => 'Domicile', @@ -24,7 +24,7 @@ return [ "mixes" => "Mixes", "mix" => "Mélanger", "mixNotFound" => "Impossible de charger le mixage; soit le mixage n'a pas été trouvé, soit le mixage est vide, soit ce mixage est privé.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Impossible de charger le mixshow ; soit le mixshow n'a pas été trouvé, soit le mixshow est vide, soit ce mixshow est privé.", "mixName" => "Nom du mixage", "mixDescription" => "Description du mixage", "mixLength" => "Longueur du mixage", @@ -57,15 +57,20 @@ return [ "allrightsreserved" => "Tous droits réservés.", "mixshows" => "Mixshows", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", - "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "mixshowName" => "Nom du Mixshow", + "share" => "Partager", + "sahrethismix" => "Partager ce mix", + "sharethismixshow" => "Partager ce mixshow", + "rss" => "Flux RSS", + "year" => "Année", + "sharetotwitter" => "Partager vers X (anciennement Twitter)", + "sharetofb" => "Partager sur Facebook", + "sharetoig" => "Partager sur Instagram", + "copyurl" => "Copier l'URL", + "urlcopiedtoclipboard" => "URL copiée dans le presse-papiers", + "failedtocopyurl" => "Échec de la copie de l'URL", + "name" => "Nom", + "username" => "Nom d'utilisateur", + "logout" => "Déconnexion", + "upload" => "Charger", ]; \ No newline at end of file diff --git a/locale/he-IL/messages.php b/locale/he-IL/messages.php index afd1a35..8f5993b 100644 --- a/locale/he-IL/messages.php +++ b/locale/he-IL/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/hu-HU/messages.php b/locale/hu-HU/messages.php index afd1a35..8f5993b 100644 --- a/locale/hu-HU/messages.php +++ b/locale/hu-HU/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/it-IT/messages.php b/locale/it-IT/messages.php index c11c992..a6e131c 100644 --- a/locale/it-IT/messages.php +++ b/locale/it-IT/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Benvenuto nel nostro sito Web!', 'description' => 'Questa è una descrizione in inglese.', - 'desc' => 'Description', + 'desc' => 'Descrizione', 'userProfile' => "Profilo Utente", 'user' => 'Utente', 'home' => 'Home', @@ -24,7 +24,7 @@ return [ "mixes" => "Miscele", "mix" => "Miscela", "mixNotFound" => "Impossibile caricare il mix; o il mix non è stato trovato, è vuoto, o questo mix è privato.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Impossibile caricare mixshow; o il mixshow non è stato trovato, è stato vuoto, o questo mixshow è privato.", "mixName" => "Nome Mix", "mixDescription" => "Descrizione Mix", "mixLength" => "Miscela Lunghezza", @@ -55,17 +55,22 @@ return [ "play" => "Gioca", "contactus" => "Contattaci", "allrightsreserved" => "Tutti i diritti riservati.", - "mixshows" => "Mixshows", + "mixshows" => "Mixshow", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Nome Mixshow", + "share" => "Condividi", + "sahrethismix" => "Condividi questo mix", + "sharethismixshow" => "Condividi questo mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Anno", + "sharetotwitter" => "Condividi su X (ex Twitter)", + "sharetofb" => "Condividi su Facebook", + "sharetoig" => "Condividi su Instagram", + "copyurl" => "Copia URL", + "urlcopiedtoclipboard" => "URL copiato negli appunti", + "failedtocopyurl" => "Impossibile copiare l'URL", + "name" => "Nome", + "username" => "Username", + "logout" => "Esci", + "upload" => "Carica", ]; \ No newline at end of file diff --git a/locale/ja-JP/messages.php b/locale/ja-JP/messages.php index e46ddc9..557ea71 100644 --- a/locale/ja-JP/messages.php +++ b/locale/ja-JP/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => '私たちのウェブサイトへようこそ!', 'description' => 'これは英語の説明です。', - 'desc' => 'Description', + 'desc' => '説明', 'userProfile' => "ユーザープロフィール", 'user' => 'ユーザー', 'home' => 'ホーム', @@ -24,7 +24,7 @@ return [ "mixes" => "ミックス", "mix" => "ミックス", "mixNotFound" => "ミックスをロードできませんでした。ミックスが見つかりませんでした。空であるか、このミックスがプライベートです。", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "mixshowをロードできませんでした。mixshowが見つかりませんでした。空か、このmixshowはプライベートです。", "mixName" => "ミックス名", "mixDescription" => "ミックスの説明", "mixLength" => "ミックス長さ", @@ -55,17 +55,22 @@ return [ "play" => "再生", "contactus" => "お問い合わせ", "allrightsreserved" => "All rights reserved.", - "mixshows" => "Mixshows", + "mixshows" => "ミックスショー", "mixshow" => "Mixshow", "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "share" => "共有", + "sahrethismix" => "このミックスを共有", + "sharethismixshow" => "このミックスショーを共有", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "年", + "sharetotwitter" => "X(旧 Twitter)で共有", + "sharetofb" => "Facebookで共有", + "sharetoig" => "Instagramで共有", + "copyurl" => "URLをコピー", + "urlcopiedtoclipboard" => "URL をクリップボードにコピーしました", + "failedtocopyurl" => "URLのコピーに失敗しました", + "name" => "名前", + "username" => "ユーザー名", + "logout" => "ログアウト", + "upload" => "アップロード", ]; \ No newline at end of file diff --git a/locale/ko-KR/messages.php b/locale/ko-KR/messages.php index afd1a35..8f5993b 100644 --- a/locale/ko-KR/messages.php +++ b/locale/ko-KR/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/nl-NL/messages.php b/locale/nl-NL/messages.php index a597340..0f8beaf 100644 --- a/locale/nl-NL/messages.php +++ b/locale/nl-NL/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Welkom op onze Website!', 'description' => 'Dit is een beschrijving in het Engels.', - 'desc' => 'Description', + 'desc' => 'Beschrijving', 'userProfile' => "Gebruikers Profiel", 'user' => 'Gebruiker', 'home' => 'Startpagina', @@ -24,7 +24,7 @@ return [ "mixes" => "Mixen", "mix" => "Mengen", "mixNotFound" => "Kon mixen niet laden; of de mix is niet gevonden, was leeg, of deze mix is privé.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Kon mixshow niet laden; of de mixshow is niet gevonden, was leeg, of deze mixshow is privé.", "mixName" => "Mix Naam", "mixDescription" => "Beschrijving mixen", "mixLength" => "Mix Lengte", @@ -55,17 +55,22 @@ return [ "play" => "Afspelen", "contactus" => "Contacteer ons", "allrightsreserved" => "Alle rechten voorbehouden.format@@0", - "mixshows" => "Mixshows", + "mixshows" => "Mixseries", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Mixshow Naam", + "share" => "Delen", + "sahrethismix" => "Deel deze mix", + "sharethismixshow" => "Deel deze mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "jaar", + "sharetotwitter" => "Deel met X (voorheen Twitter)", + "sharetofb" => "Delen op Facebook", + "sharetoig" => "Delen op Instagram", + "copyurl" => "URL kopiëren", + "urlcopiedtoclipboard" => "URL gekopieerd naar klembord", + "failedtocopyurl" => "Kopiëren van URL mislukt", + "name" => "naam", + "username" => "Gebruikersnaam", + "logout" => "Afmelden", + "upload" => "Uploaden", ]; \ No newline at end of file diff --git a/locale/no-NO/messages.php b/locale/no-NO/messages.php index a10aa1f..924c895 100644 --- a/locale/no-NO/messages.php +++ b/locale/no-NO/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Velkommen til vår hjemmeside!', 'description' => 'Dette er en beskrivelse på engelsk.', - 'desc' => 'Description', + 'desc' => 'Beskrivelse', 'userProfile' => "Bruker profil", 'user' => 'Bruker', 'home' => 'Hjem', @@ -24,7 +24,7 @@ return [ "mixes" => "Mixes", "mix" => "Bland", "mixNotFound" => "Kunne ikke laste blanding, verken var blandingen tom, eller så var denne blandingen privat.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Kan ikke laste mixshow; verken ble ikke funnet, var tom, eller denne blandingen er privat.", "mixName" => "Blandet navn", "mixDescription" => "Bland beskrivelse", "mixLength" => "Blandet lengde", @@ -57,15 +57,20 @@ return [ "allrightsreserved" => "Med enerett.", "mixshows" => "Mixshows", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Mixshow navn", + "share" => "Del", + "sahrethismix" => "Del denne blandingen", + "sharethismixshow" => "Del denne blandingen", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "År", + "sharetotwitter" => "Del til X (tidligere Twitter)", + "sharetofb" => "Del på Facebook", + "sharetoig" => "Del på Instagram", + "copyurl" => "Kopier URL", + "urlcopiedtoclipboard" => "URL kopiert til utklippstavlen", + "failedtocopyurl" => "Klarte ikke å kopiere URL", + "name" => "Navn", + "username" => "Brukernavn", + "logout" => "Logg", + "upload" => "Last opp", ]; \ No newline at end of file diff --git a/locale/pl-PL/messages.php b/locale/pl-PL/messages.php index d7d7bec..a972519 100644 --- a/locale/pl-PL/messages.php +++ b/locale/pl-PL/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Witamy na naszej stronie internetowej!', 'description' => 'To jest opis w języku angielskim.', - 'desc' => 'Description', + 'desc' => 'Opis', 'userProfile' => "Profil użytkownika", 'user' => 'Użytkownik', 'home' => 'Strona główna', @@ -24,7 +24,7 @@ return [ "mixes" => "Mixy", "mix" => "Mieszanina", "mixNotFound" => "Nie można załadować miksy; albo mieszanina nie została znaleziona, była pusta lub ta miksy jest prywatna.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Nie można załadować mixshow; albo mixshow nie został znaleziony, był pusty, albo mixshow jest prywatny.", "mixName" => "Nazwa mixu", "mixDescription" => "Opis mieszaniny", "mixLength" => "Długość mieszania", @@ -55,17 +55,22 @@ return [ "play" => "Odtwórz", "contactus" => "Skontaktuj się z nami", "allrightsreserved" => "Wszystkie prawa zastrzeżone.", - "mixshows" => "Mixshows", + "mixshows" => "Mieszanki", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Nazwa Mixshow", + "share" => "Udostępnij", + "sahrethismix" => "Udostępnij ten koszyk", + "sharethismixshow" => "Udostępnij ten mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "W związku z tym Komisja stwierdza, że środek 1 stanowi pomoc państwa w rozumieniu art. 107 ust. 1 Traktatu.", + "sharetotwitter" => "Udostępnij do X (dawniej Twitter)", + "sharetofb" => "Udostępnij na Facebooku", + "sharetoig" => "Udostępnij na Instagramie", + "copyurl" => "Kopiuj adres URL", + "urlcopiedtoclipboard" => "Adres URL skopiowany do schowka", + "failedtocopyurl" => "Nie udało się skopiować adresu URL", + "name" => "Nazwisko", + "username" => "Nazwa użytkownika", + "logout" => "Wyloguj się", + "upload" => "Prześlij", ]; \ No newline at end of file diff --git a/locale/pt-BR/messages.php b/locale/pt-BR/messages.php index eee6746..aa7b943 100644 --- a/locale/pt-BR/messages.php +++ b/locale/pt-BR/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Bem-vindo ao nosso site!', 'description' => 'Esta é uma descrição em inglês.', - 'desc' => 'Description', + 'desc' => 'Descrição:', 'userProfile' => "Informações do Perfil", 'user' => 'Usuário', 'home' => 'Residencial', @@ -24,7 +24,7 @@ return [ "mixes" => "Misturar", "mix" => "Mistura", "mixNotFound" => "Não foi possível carregar o mix; ou a mistura não foi encontrada, estava vazia, ou esta mistura é privada.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Não foi possível carregar o mixshow; ou o mixshow não foi encontrado, estava vazio ou este mixshow é privado.", "mixName" => "Nome do mix", "mixDescription" => "Descrição Misto", "mixLength" => "Comprimento Misturado", @@ -55,17 +55,22 @@ return [ "play" => "Reproduzir", "contactus" => "Entre em contato", "allrightsreserved" => "Todos os direitos reservados.", - "mixshows" => "Mixshows", + "mixshows" => "Misturas", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", - "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "mixshowName" => "Nome do Mixshow", + "share" => "Compartilhar", + "sahrethismix" => "Compartilhe esta mistura", + "sharethismixshow" => "Compartilhar este mixshow", + "rss" => "Resposta", + "year" => "ano", + "sharetotwitter" => "Compartilhar para X (antigo Twitter)", + "sharetofb" => "Compartilhar no Facebook", + "sharetoig" => "Compartilhar com o Instagram", + "copyurl" => "Copiar URL", + "urlcopiedtoclipboard" => "URL copiado para área de transferência", + "failedtocopyurl" => "Falha ao copiar URL", + "name" => "Nome:", + "username" => "Usuário:", + "logout" => "Desconectar", + "upload" => "Transferir", ]; \ No newline at end of file diff --git a/locale/pt-PT/messages.php b/locale/pt-PT/messages.php index eee6746..aa7b943 100644 --- a/locale/pt-PT/messages.php +++ b/locale/pt-PT/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Bem-vindo ao nosso site!', 'description' => 'Esta é uma descrição em inglês.', - 'desc' => 'Description', + 'desc' => 'Descrição:', 'userProfile' => "Informações do Perfil", 'user' => 'Usuário', 'home' => 'Residencial', @@ -24,7 +24,7 @@ return [ "mixes" => "Misturar", "mix" => "Mistura", "mixNotFound" => "Não foi possível carregar o mix; ou a mistura não foi encontrada, estava vazia, ou esta mistura é privada.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Não foi possível carregar o mixshow; ou o mixshow não foi encontrado, estava vazio ou este mixshow é privado.", "mixName" => "Nome do mix", "mixDescription" => "Descrição Misto", "mixLength" => "Comprimento Misturado", @@ -55,17 +55,22 @@ return [ "play" => "Reproduzir", "contactus" => "Entre em contato", "allrightsreserved" => "Todos os direitos reservados.", - "mixshows" => "Mixshows", + "mixshows" => "Misturas", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", - "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "mixshowName" => "Nome do Mixshow", + "share" => "Compartilhar", + "sahrethismix" => "Compartilhe esta mistura", + "sharethismixshow" => "Compartilhar este mixshow", + "rss" => "Resposta", + "year" => "ano", + "sharetotwitter" => "Compartilhar para X (antigo Twitter)", + "sharetofb" => "Compartilhar no Facebook", + "sharetoig" => "Compartilhar com o Instagram", + "copyurl" => "Copiar URL", + "urlcopiedtoclipboard" => "URL copiado para área de transferência", + "failedtocopyurl" => "Falha ao copiar URL", + "name" => "Nome:", + "username" => "Usuário:", + "logout" => "Desconectar", + "upload" => "Transferir", ]; \ No newline at end of file diff --git a/locale/ro-RO/messages.php b/locale/ro-RO/messages.php index 705c1b7..10c467f 100644 --- a/locale/ro-RO/messages.php +++ b/locale/ro-RO/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Bun venit pe site-ul nostru!', 'description' => 'Aceasta este o descriere în engleză.', - 'desc' => 'Description', + 'desc' => 'Descriere', 'userProfile' => "Profil utilizator", 'user' => 'Utilizator', 'home' => 'Acasă', @@ -24,7 +24,7 @@ return [ "mixes" => "Mixuri", "mix" => "Amestecă", "mixNotFound" => "Nu s-a putut încărca mixul; fie mixul nu a fost găsit, a fost gol, fie acest mix este privat.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Nu s-a putut încărca mixshow-ul; fie emisiunea mixtă nu a fost găsită, a fost goală, fie acest spectacol mixt este privat.", "mixName" => "Nume mix", "mixDescription" => "Descriere mixtă", "mixLength" => "Amestecă lungimea", @@ -55,17 +55,22 @@ return [ "play" => "Redare", "contactus" => "Contactează-ne", "allrightsreserved" => "Toate drepturile rezervate.", - "mixshows" => "Mixshows", + "mixshows" => "Amestec", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Nume Mixshow", + "share" => "Distribuie", + "sahrethismix" => "Distribuie acest mix", + "sharethismixshow" => "Distribuie acest spectacol mixt", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "An", + "sharetotwitter" => "Distribuie pe X (anterior Twitter)", + "sharetofb" => "Distribuie pe Facebook", + "sharetoig" => "Distribuie pe Instagram", + "copyurl" => "Copiază URL-ul", + "urlcopiedtoclipboard" => "URL copiat în clipboard", + "failedtocopyurl" => "Copierea adresei URL a eșuat", + "name" => "Nume", + "username" => "Nume", + "logout" => "Deconectare", + "upload" => "Incarca", ]; \ No newline at end of file diff --git a/locale/ru-RU/messages.php b/locale/ru-RU/messages.php index 66d98b3..43e7885 100644 --- a/locale/ru-RU/messages.php +++ b/locale/ru-RU/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Добро пожаловать на наш сайт!', 'description' => 'Это описание на английском языке.', - 'desc' => 'Description', + 'desc' => 'Описание', 'userProfile' => "Профиль пользователя", 'user' => 'Пользователь', 'home' => 'Домашний', @@ -24,7 +24,7 @@ return [ "mixes" => "Миксы", "mix" => "Микс", "mixNotFound" => "Не удалось загрузить смесь; либо смесь не найдена, либо эта смесь является приватной.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Не удалось загрузить mixshow; либо mixshow не найден, либо эта mixshow является приватной.", "mixName" => "Название микса", "mixDescription" => "Описание смеси", "mixLength" => "Длина микса", @@ -55,17 +55,22 @@ return [ "play" => "Играть", "contactus" => "Свяжитесь с нами", "allrightsreserved" => "Все права защищены.", - "mixshows" => "Mixshows", + "mixshows" => "Смешанные шоу", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", - "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "mixshowName" => "Название Mixshow", + "share" => "Поделиться", + "sahrethismix" => "Поделиться этой смесью", + "sharethismixshow" => "Поделиться этой смесительной шоу", + "rss" => "RSS-лента", + "year" => "Год", + "sharetotwitter" => "Поделиться с X (ранее Twitter)", + "sharetofb" => "Поделиться на Facebook", + "sharetoig" => "Поделиться в Instagram", + "copyurl" => "Копировать URL", + "urlcopiedtoclipboard" => "URL скопирован в буфер обмена", + "failedtocopyurl" => "Не удалось скопировать URL", + "name" => "Наименование", + "username" => "Имя пользователя", + "logout" => "Выйти", + "upload" => "Выгрузить", ]; \ No newline at end of file diff --git a/locale/sr-SP/messages.php b/locale/sr-SP/messages.php index afd1a35..8f5993b 100644 --- a/locale/sr-SP/messages.php +++ b/locale/sr-SP/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/sv-SE/messages.php b/locale/sv-SE/messages.php index 93ff57a..624c66c 100644 --- a/locale/sv-SE/messages.php +++ b/locale/sv-SE/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Välkommen till vår webbplats!', 'description' => 'Detta är en beskrivning på engelska.', - 'desc' => 'Description', + 'desc' => 'Beskrivning', 'userProfile' => "Användarprofil", 'user' => 'Användare', 'home' => 'Hem', @@ -24,7 +24,7 @@ return [ "mixes" => "Blandningar", "mix" => "Blanda", "mixNotFound" => "Kunde inte ladda mix; antingen hittades blandningen inte, var tom, eller denna blandning är privat.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Kunde inte ladda mixshow; antingen hittades inte mixshowen, var tom, eller så är denna mixshow privat.", "mixName" => "Blanda namn", "mixDescription" => "Blanda beskrivning", "mixLength" => "Blanda längd", @@ -55,17 +55,22 @@ return [ "play" => "Spela", "contactus" => "Kontakta oss", "allrightsreserved" => "Alla rättigheter reserverade.", - "mixshows" => "Mixshows", + "mixshows" => "Blandningsserier", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Mixseriens namn", + "share" => "Dela", + "sahrethismix" => "Dela denna mix", + "sharethismixshow" => "Dela denna mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "År", + "sharetotwitter" => "Dela till X (tidigare Twitter)", + "sharetofb" => "Dela på Facebook", + "sharetoig" => "Dela på Instagram", + "copyurl" => "Kopiera URL", + "urlcopiedtoclipboard" => "URL kopierad till urklipp", + "failedtocopyurl" => "Kunde inte kopiera URL", + "name" => "Namn", + "username" => "Användarnamn", + "logout" => "Utloggning", + "upload" => "Ladda upp", ]; \ No newline at end of file diff --git a/locale/tr-TR/messages.php b/locale/tr-TR/messages.php index afd1a35..8f5993b 100644 --- a/locale/tr-TR/messages.php +++ b/locale/tr-TR/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/uk-UA/messages.php b/locale/uk-UA/messages.php index c91115e..0291688 100644 --- a/locale/uk-UA/messages.php +++ b/locale/uk-UA/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => 'Ласкаво просимо на наш сайт!', 'description' => 'Це опис англійською.', - 'desc' => 'Description', + 'desc' => 'Опис', 'userProfile' => "Профіль користувача", 'user' => 'Користувач', 'home' => 'Домашній екран', @@ -24,7 +24,7 @@ return [ "mixes" => "Змішати", "mix" => "Змішати", "mixNotFound" => "Не вдалось завантажити мікс; або суміш не знайдена, була порожня, або ця суміш приватна.", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "Не вдалося завантажити шоу, або не знайдене змішування, було порожнім, або це змішання є приватним.", "mixName" => "Змішане ім'я", "mixDescription" => "Змішати опис", "mixLength" => "Довжина мікса", @@ -55,17 +55,22 @@ return [ "play" => "Відтворити", "contactus" => "Зв’язатись з нами", "allrightsreserved" => "Усі права захищені.", - "mixshows" => "Mixshows", + "mixshows" => "Змішані серіали", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "Змішане ім'я", + "share" => "Поділитись", + "sahrethismix" => "Поділитися цим мікшуванням", + "sharethismixshow" => "Поділитися цим мікшалом", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "Рік", + "sharetotwitter" => "Поділитись до X (раніше Twitter)", + "sharetofb" => "Поділитись у Facebook", + "sharetoig" => "Поділитися в Instagram", + "copyurl" => "Копіювати посилання", + "urlcopiedtoclipboard" => "URL скопійовано до буферу обміну", + "failedtocopyurl" => "Не вдалося скопіювати URL-адресу", + "name" => "Ім'я", + "username" => "Ім'я користувача", + "logout" => "Вихід із системи", + "upload" => "Вивантажити", ]; \ No newline at end of file diff --git a/locale/vi-VN/messages.php b/locale/vi-VN/messages.php index afd1a35..8f5993b 100644 --- a/locale/vi-VN/messages.php +++ b/locale/vi-VN/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/locale/zh-CN/messages.php b/locale/zh-CN/messages.php index dee6d81..bc363b7 100644 --- a/locale/zh-CN/messages.php +++ b/locale/zh-CN/messages.php @@ -2,7 +2,7 @@ return [ 'welcome' => '欢迎来到我们的网站!', 'description' => '这是英文描述。', - 'desc' => 'Description', + 'desc' => '描述', 'userProfile' => "用户资料", 'user' => '用户', 'home' => '首页', @@ -24,7 +24,7 @@ return [ "mixes" => "混音器", "mix" => "混音器", "mixNotFound" => "无法加载混合物;混合物未找到, 为空, 或者这种混合是私有的。", - "mixshowNotFound" => "Could not load mixshow; either the mixshow wasn't found, was empty, or this mixshow is private.", + "mixshowNotFound" => "无法加载mixshow;要么找不到mixshow,要么是空的,要么这个mixshow是私有的。", "mixName" => "混合名称", "mixDescription" => "混合描述", "mixLength" => "混合长度", @@ -55,17 +55,22 @@ return [ "play" => "播放", "contactus" => "联系我们", "allrightsreserved" => "版权所有。", - "mixshows" => "Mixshows", + "mixshows" => "混合显示", "mixshow" => "Mixshow", - "mixshowName" => "Mixshow Name", - "share" => "Share", - "sahrethismix" => "Share this mix", - "sharethismixshow" => "Share this mixshow", + "mixshowName" => "混合节目名称", + "share" => "分享", + "sahrethismix" => "分享这个组合", + "sharethismixshow" => "分享此 mixshow", "rss" => "RSS", - "year" => "Year", - "sharetotwitter" => "Share to X (formerly Twitter)", - "sharetofb" => "Share to Facebook", - "sharetoig" => "Share to Instagram", - "copyurl" => "Copy URL", - + "year" => "年份", + "sharetotwitter" => "分享到 X (旧的 Twitter)", + "sharetofb" => "分享到 Facebook", + "sharetoig" => "分享到 Instagram", + "copyurl" => "复制 URL", + "urlcopiedtoclipboard" => "URL 已复制到剪贴板", + "failedtocopyurl" => "无法复制 URL", + "name" => "名称", + "username" => "用户名", + "logout" => "注销", + "upload" => "上传", ]; \ No newline at end of file diff --git a/locale/zh-TW/messages.php b/locale/zh-TW/messages.php index afd1a35..8f5993b 100644 --- a/locale/zh-TW/messages.php +++ b/locale/zh-TW/messages.php @@ -67,5 +67,10 @@ return [ "sharetofb" => "Share to Facebook", "sharetoig" => "Share to Instagram", "copyurl" => "Copy URL", - + "urlcopiedtoclipboard" => "URL copied to clipboard", + "failedtocopyurl" => "Failed to copy URL", + "name" => "Name", + "username" => "Username", + "logout" => "Logout", + "upload" => "Upload", ]; \ No newline at end of file diff --git a/login.php b/login.php index abcd515..a372820 100644 --- a/login.php +++ b/login.php @@ -1,15 +1,16 @@ login($email, $password); - if ($result === true) { - // Successful login, redirect to profile page + + // If login() returns an array, the login was successful. + if (is_array($result)) { + SessionManager::setUser([ + 'id' => $result['id'], + 'email' => $result['email'], + 'username' => $result['username'], + 'firstName' => $result['firstName'], + 'lastName' => $result['lastName'], + 'role' => $result['isAdmin'] ? 'admin' : 'user' + ]); header("Location: profile.php"); exit; } else { - // Set error message from login method (includes lockout messages) + // Login failed; $result contains an error message. $_SESSION['error'] = $result; } } } } + require_once 'includes/header.php'; +if (isset($_SESSION['error'])) { + echo ''; + unset($_SESSION['error']); +} + ?> +