PHP Classes

File: uploady/logic/pageLogic.php

Recommend this page to a friend!
  Packages of Faris AL-Otabi   Uploady PHP Upload File to MySQL   uploady/logic/pageLogic.php   Download  
File: uploady/logic/pageLogic.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Uploady PHP Upload File to MySQL
Store file upload details in a MySQL database
Author: By
Last change: Update of uploady/logic/pageLogic.php
Date: 2 years ago
Size: 570 bytes
 

Contents

Class file image Download
<?php

$pages = new Uploady\Page($db, $localization);

if (!isset($_GET['s'])) {
    $utils->redirect($utils->siteUrl("/"));
}

if (!$pages->isExist($utils->sanitize($_GET['s']))) {
    $utils->redirect($utils->siteUrl("/"));
}

$page_content = $pages->get($utils->sanitize($_GET['s']), $_SESSION['language']);

if ($page_content == false) {
    $page_content = json_decode(json_encode([
        'title' => $lang["general"]['page_not_found'],
        'content' => $lang["general"]['page_not_found_content']
    ]));
}

$page = $_GET['s'];
$title = $page_content->title;