当前位置: 首页>>代码示例>>PHP>>正文


PHP config::page方法代码示例

本文整理汇总了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 = "Страницу не найдено";
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:9,代码来源:main.php

示例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);
}
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:19,代码来源:addimage.php

示例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);
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:16,代码来源:blog.php

示例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);
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:31,代码来源:user.php

示例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'];
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:17,代码来源:login.php

示例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);
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:16,代码来源:ip.php

示例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);
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:13,代码来源:main.php

示例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);
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:27,代码来源:edit.php

示例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;
    }
}
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:24,代码来源:regactivate.php

示例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);
}
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:21,代码来源:add.php

示例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;
    }
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:31,代码来源:portfolio-edit.php

示例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'] = "Не верный код капчи";
}
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:16,代码来源:main.php

示例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;
}
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:31,代码来源:user-edit.php

示例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'];
开发者ID:sanjsuper,项目名称:framework_blog,代码行数:13,代码来源:article.php


注:本文中的config::page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。