コード例 #1
0
ファイル: leftframe.php プロジェクト: robbat2/rats
function item($n, $type = 'v')
{
    $tbl = str_replace(' ', '', $n);
    global $sessionInfo;
    $tablePerm = admin_getpermissionstable($sessionInfo['userid'], $tbl);
    $tblstr = 'table=' . $tbl;
    $viewfile = 'view.php';
    $addfile = 'addedit.php';
    $target = 'target="main"';
    $class = 'leftnavitem';
    if ($tablePerm['view']) {
        if (is_integer(strpos($type, 'v')) || is_integer(strpos($type, 'a'))) {
            echo html_a($viewfile . '?' . $tblstr, $n, $class, $target);
        }
        if ($tablePerm['add'] && is_integer(strpos($type, 'a'))) {
            echo html_a($addfile . '?' . $tblstr, '(Add)', $class, $target);
        }
        echo '<br />' . "\n";
    }
}
コード例 #2
0
ファイル: commontable.inc.php プロジェクト: robbat2/rats
<?php

/* $Id: commontable.inc.php,v 1.7 2003/05/07 20:48:10 robbat2 Exp $ */
global $tableName;
$tableName = v('table');
$tablePerm = admin_getpermissionstable($sessionInfo['userid'], $tableName);
//check permissions
if (!$tablePerm[$perm]) {
    //show an error here
    echo "include('./gui/permissiondenied.php')";
} else {
    //ok, we are ok
    include './lib/processtable.inc.php';
}
?>