當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。