Example #1
0
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF    					    /
// ANY KIND, either express or implied. See the License for the specific language governing 					    /
// permissions and limitations under the License. See accompanying LICENSE file.						    /
// 																    /
// $Author:shawcs@yahoo-inc.com  $Date: 30-Jan-2012										    /
//																    /
//+---------------------------------------------------------------------------------------------------------------------------------+
define('OPS_APP_HOME_DIR', dirname(__FILE__));
require_once 'assist/prepend.php';
require_once 'assist/lib/model/calendarConfig.php';
session_start();
$auth = $_SESSION['auth'];
$settings = parse_ini_file('conf/setting.ini', true);
$dbh = Connection::cal_ro();
$obj = new calendarConfig();
$TMG = $obj->isMember($auth->username, $dbh, $settings['manager_group']);
if (!$TMG) {
    header("Location: calendar.php");
} else {
    $action = $_GET['action'];
    //include 'header.php';
    ?>
<html>
  <head>
    <title>Opensource Calendar</title>
	<link href="css/panchang.css" rel="stylesheet" type="text/css" />
	<link href="css/dashboard.css" rel="stylesheet" type="text/css" />
	<link href="css/buttons.css" rel="stylesheet" type="text/css" />
	<link href="css/toolbar.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="js/panchang.js"></script>
	<script type="text/javascript" src="js/jquery.js"></script>
Example #2
0
 function checkUserPermission($admingrp)
 {
     $auth = $_SESSION['auth'];
     $dbh = Connection::cal_ro();
     $obj = new calendarConfig();
     $TMG = $obj->isMember($auth->username, $dbh, $admingrp);
     if (!$TMG) {
         return 0;
     }
     return 1;
 }