<?php

require_once "admin_conn.php";
chkLogin();
$action = be("all", "action");
switch ($action) {
    case "editall":
        editall();
        break;
    case "info":
        headAdmin("电视播放源管理");
        info();
        break;
    default:
        headAdmin("电视播放源管理");
        main();
        break;
}
dispseObj();
function editall()
{
    global $db;
    $t_id = be("arr", "t_id");
    $ids = explode(",", $t_id);
    foreach ($ids as $id) {
        $tv_playfrom = be("post", "tv_playfrom" . $id);
        $tv_definition = be("post", "tv_definition" . $id);
        $tv_playurl = be("post", "tv_playurl" . $id);
        //var_dump($t_type);
        $status = be("post", "status" . $id);
        if (isN($tv_playurl)) {
示例#2
0
文件: login.php 项目: davidaq/coopdev
<?php

if (posted('username', 'password')) {
    function chkLogin()
    {
        $u = $_POST['username'];
        if (!data_exists("user/{$u}/pwd")) {
            return LANG('No such user');
        }
        $p = password($_POST['password']);
        if ($p != data_read("user/{$u}/pwd")) {
            return LANG('Password wrong');
        }
        $_SESSION[USER_SESSION] = $u;
        return false;
    }
    $result = chkLogin();
    if ($result) {
        die(tpl('login', array('errormsg' => $result)));
    } else {
        redirect($_POST['refer']);
    }
} else {
    die(tpl('login'));
}