PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/source/gl/power.php

http://prosporous.googlecode.com/
PHP | 67 lines | 56 code | 0 blank | 11 comment | 29 complexity | a3d14fbb8b946b09dac3c3dc7e38647d MD5 | raw file
 1<?php
 2/* * ??????UTF-8???.
 3 * Created on 2010-5-29
 4 *
 5 * @author EXT <isrn@qq.com>
 6 *
 7 */
 8function getright($tid, $right) {
 9    global $_SESSION;
10    if ($_SESSION['rcg'] == 'A') {
11        return 1;
12    } else {
13        return $_SESSION['rcg'][$right][$tid];
14    }
15}
16switch ($_SERVER['PHP_SELF']) {
17    case Sf(HTLJ, $_SERVER['PHP_SELF']): {
18            iniJs('ext');
19            Tr($jsstr, 'showjs');
20            if ($_SESSION['logined'] != '1') {
21                $xajax = new xajax("./ajax/xajax_suo.php");
22                $xajax->configure('javascript URI', Js_path . "/Plug-in/xajax/");
23                $xajax->registerFunction("loadsuo");
24                Tr(Sys::Gv(), 'site_config');
25                $Tp->assign('ajax', $xajax->getJavascript());
26                Ts('login' . $_SESSION['HTLG'] . '.html');
27                exit;
28            }
29            if ($_SERVER['HTTP_REFERER'] == '' && !Sf('index.php', $_SERVER['PHP_SELF'])) {
30//                if(($_GET['mid']==''||$_GET['from']!='b') && !Sf('treedata.php',$_SERVER['PHP_SELF'])) {
31//                    Ja('??????');
32                exit;
33            }
34            if ($_SESSION['rcg'] != 'A') {
35                $tzurl = '/' . HTLJ . 'error.htm';
36                if (Sf('show1/l.php', $_SERVER['PHP_SELF'])) {
37                    if (!$_SESSION['rcg']['r'][$_REQUEST['tid']] && $_GET['op'] == 'list') {
38                        Ja('??????', $tzurl);
39                        exit;
40                    }
41                }
42                if (Sf('show1/i.php', $_SERVER['PHP_SELF'])) {
43                    if ($_GET['op'] == 'add' && !$_GET['id'] && !$_SESSION['rcg']['c'][$_REQUEST['tid']]) {
44                        //print_r($_SESSION['rcg']);
45                        Ja('??????', $tzurl);
46                        exit;
47                    }
48                }
49                if (Sf('show1/i.php', $_SERVER['PHP_SELF'])) {
50                    if ($_GET['op'] == 'add' && $_GET['id'] && !$_SESSION['rcg']['u'][$_REQUEST['tid']]) {
51                        //print_r($_SESSION['rcg']);
52                        Ja('??????', $tzurl);
53                        exit;
54                    }
55                }
56                if (Sf('show1/l.php', $_SERVER['PHP_SELF'])) {
57                    if ($_REQUEST['op'] == 'del' && !$_SESSION['rcg']['d'][$_REQUEST['tid']]) {
58                        //print_r($_SESSION['rcg']);
59                        Ja('??????', $tzurl);
60                        exit;
61                    }
62                }
63            }
64            break;
65        }
66}
67?>