本文整理汇总了PHP中config::page方法的典型用法代码示例。如果您正苦于以下问题:PHP config::page方法的具体用法?PHP config::page怎么用?PHP config::page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config
的用法示例。
在下文中一共展示了config::page方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 31.01.16
* Time: 11:03
*/
config::$page = "Страницу не найдено";
示例2: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 05.02.16
* Time: 16:21
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Добавить изображение";
if (isset($_POST['sub']) && isset($_FILES)) {
$files = $_FILES;
//print_r($files);
$file = new load($_POST['cat'], $files, $_POST['title'], $_POST['table']);
unset($file);
}
示例3: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 04.02.16
* Time: 16:14
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Редактор блога";
$db = new DB();
$res = $db->select("articles", "*");
unset($db);
示例4: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 06.02.16
* Time: 15:41
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['activate'] !== "1") {
header("Location: /main");
exit;
}
config::$page = "Профиль пользователя " . $_SESSION['user']['login'];
//Смена логина
if (isset($_POST['sub']) && $_POST['captcha'] == $_SESSION['captcha']) {
$update_login = new User();
$passwords = $update_login->check_password($_POST['password']);
if ($_POST['password'] !== $_POST['password1'] || $_SESSION['user']['password'] !== $passwords) {
$_SESSION['user_error_pass'] = "Пароли не совпадают или пароль введен не верно";
return false;
}
$login = $update_login->check_login($_POST['login']);
if ($login === false) {
$_SESSION['user_error_login'] = "Такой логин уже существует";
return false;
}
$row = array();
$row['login'] = $_POST['login'];
$row['password'] = $passwords;
$success = $update_login->update_user($row);
unset($update_login);
示例5: UserTools
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 01.02.16
* Time: 13:44
*/
$config::$menu = "login";
config::$page = "Авторизация";
if (isset($_POST['sub']) && $_POST['captcha'] == $_SESSION['captcha']) {
$login = new UserTools();
$login->login($_POST);
} elseif (isset($_POST['sub']) && $_POST['captcha'] !== $_SESSION['captcha']) {
$_SESSION['reg_error_captcha'] = "Не верный код капчи";
}
//echo $_COOKIE['auth'];
示例6: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 04.02.16
* Time: 15:57
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Статистика";
$db = new DB();
$res = $db->select("stats_ip", "*", "id_user," . $_GET['key1']);
//print_r($res);
示例7: DB
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 31.01.16
* Time: 10:29
*/
$config::$menu = "portfolio";
config::$page = "Портфолио";
$db = new DB();
$res = $db->select("portfolio", "*");
unset($db);
示例8: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 04.02.16
* Time: 17:29
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Редактировать статью";
$id_article = $_GET['key1'];
$db = new DB();
$res = $db->select("articles", "*", "id," . $id_article);
//print_r($res);
if (isset($_POST['sub'])) {
$k = "id";
$up_article = $db->update("articles", $_POST, $k, $id_article);
if ($up_article) {
$_SESSION['up_article'] = "Статья успешно обновлена";
} else {
$_SESSION['up_article'] = "Ошибка при обновлении";
}
}
unset($db);
示例9: array
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 27.01.16
* Time: 21:00
*/
config::$page = "Подтверждение кода активации";
if (isset($_GET['key1'])) {
$res = array();
$res['activate'] = 1;
$db = new DB();
$activate = $db->update("user", $res, "activ_code", $_GET['key1']);
if ($activate) {
$_SESSION['active'] = "Account Activate!";
} else {
$_SESSION['active'] = "Произошла ошибка при активации";
}
if (isset($_SESSION['active'])) {
header("Location: /reg/regactivate");
exit;
}
}
示例10: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 04.02.16
* Time: 16:28
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Добавить статью";
if (isset($_POST['sub'])) {
$db = new DB();
$success = $db->insert("articles", $_POST);
if (isset($success)) {
$_SESSION['article_success'] = "Статья успешно добавлена";
}
unset($db);
}
示例11: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 05.02.16
* Time: 11:22
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Редактировать портфолио";
$db = new DB();
$res = $db->select("portfolio", "*");
if (empty($res)) {
$_SESSION['not_image'] = "Not image";
} else {
unset($_SESSION['not_image']);
}
if (isset($_GET['key1'])) {
$success = $db->delete("portfolio", "id", $_GET['key1']);
if ($success === false) {
$_SESSION['del_error'] = "Ошибка при удалиении";
header("Location: /admin/portfolio-edit");
exit;
} else {
$_SESSION['del_error'] = "Успешно удалено";
header("Location: /admin/portfolio-edit");
exit;
}
示例12: User
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 01.02.16
* Time: 13:22
*/
config::$page = "Регистрация";
$config::$menu = "reg";
if (isset($_POST['sub']) && $_POST['captcha'] == $_SESSION['captcha']) {
$user = new User();
$user->get_user($_POST);
} elseif (isset($_POST['sub']) && !$_POST['captcha'] == $_SESSION['captcha']) {
$_SESSION['reg_error_captcha'] = "Не верный код капчи";
}
示例13: header
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 07.02.16
* Time: 15:12
*/
if (!isset($_SESSION['user']) || $_SESSION['user']['permissions'] !== "5") {
header("Location: /main");
exit;
}
config::$page = "Редактировать пользователя";
if (isset($_GET['key1'])) {
$db = new DB();
$res = $db->select("user", "*", "id," . $_GET['key1']);
}
if (isset($_POST['permissions_sub'])) {
$row = array();
$row['permissions'] = $_POST['select'];
$db->update("user", $row, "id", $_GET['key1']);
header("location: /admin/user-edit/" . $_GET['key1']);
exit;
}
if (isset($_POST['activate'])) {
$row = array();
$row['activate'] = $_POST['select_activate'];
$db->update("user", $row, "id", $_GET['key1']);
header("location: /admin/user-edit/" . $_GET['key1']);
exit;
}
示例14: DB
<?php
/**
* Created by PhpStorm.
* User: Alexandr
* Date: 07.02.16
* Time: 16:44
*/
if (isset($_GET['key1'])) {
$db = new DB();
$res = $db->select("articles", "*", "id," . $_GET['key1']);
}
config::$page = $res[0]['title'];