//require_once ('plugins/webcalendar/config.php');
// the header that displays for the user portion of the plugin
-function webcalendar_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id;
- $params['toptab']='webcalendar';
+function webcalendar_Project_Header($params) {
+ global $DOCUMENT_ROOT,$HTML,$id;
+ $params['toptab']='webcalendar';
$params['group']=$id;
- /*
- Show horizontal links
- */
- site_project_header($params);
+ /*
+ Show horizontal links
+ */
+ site_project_header($params);
}
// the header that displays for the project portion of the plugin
function webcalendar_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id;
- $params['toptab']='webcalendar';
+ global $DOCUMENT_ROOT,$HTML,$user_id;
+ $params['toptab']='webcalendar';
$params['user']=$user_id;
- /*
- Show horizontal links
- */
- site_user_header($params);
+ /*
+ Show horizontal links
+ */
+ site_user_header($params);
}
/*
$type = getStringFromRequest('type');
$id = getStringFromRequest('id');
$pluginname = getStringFromRequest('pluginname');
-
+
if (!$type) {
exit_error("Cannot Process your request","No TYPE specified"); // you can create items in Base.tab and customize this messages
} elseif (!$id) {
exit_error("Invalid Project", "Inexistent Project");
}
if ( ! ($group->usesPlugin ( $pluginname )) ) {//check if the group has the webcalendar plugin active
- exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");
+ exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");
}
$userperm = $group->getPermission ();//we'll check if the user belongs to the group (optional)
if ( !$userperm->IsMember()) {
exit_error("Access Denied", "You are not a member of this project");
}
// other perms checks here...
- webcalendar_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
+ webcalendar_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
// DO THE STUFF FOR THE PROJECT PART HERE
echo "We are in the Project webcalendar plugin <br>";
echo "Greetings from planet " . $world; // $world comes from the config file in /etc
} elseif ($type == 'user') {
- $realuser = user_get_object($id);//
+ $realuser = user_get_object($id);//
if (!($realuser) || !($realuser->usesPlugin($pluginname))) {
exit_error("Error", "First activate the User's $pluginname plugin through Account Manteinance Page");
}
if ( (!$user) || ($user->getID() != $id)) { // if someone else tried to access the private webcalendar part of this user
exit_error("Access Denied", "You cannot access other user's personal $pluginname");
}
- webcalendar_User_Header(array('title'=>'My '.$pluginname,'pagename'=>"$pluginname",'sectionvals'=>array($realuser->getUnixName())));
+ webcalendar_User_Header(array('title'=>'My '.$pluginname,'pagename'=>"$pluginname",'sectionvals'=>array($realuser->getUnixName())));
// DO THE STUFF FOR THE USER PART HERE
echo "We are in the User webcalendar plugin <br>";
echo "Greetings from planet " . $world; // $world comes from the config file in /etc
exit_error("Invalid Project", "Inexistent Project");
}
if ( ! ($group->usesPlugin ( $pluginname )) ) {//check if the group has the webcalendar plugin active
- exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");
+ exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");
}
$userperm = $group->getPermission ();//we'll check if the user belongs to the group
if ( !$userperm->IsMember()) {
}
//only project admin can access here
if ( $userperm->isAdmin() ) {
- webcalendar_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
+ webcalendar_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
// DO THE STUFF FOR THE PROJECT ADMINISTRATION PART HERE
echo "We are in the Project webcalendar plugin <font color=\"#ff0000\">ADMINISTRATION</font> <br>";
echo "Greetings from planet " . $world; // $world comes from the config file in /etc
exit_error("Access Denied", "You are not a project Admin");
}
}
- }
-
+ }
+
*/
include_once $gfplugins.'webcalendar/www/includes/init.php';