source: contrib/Dms/op/op.Logout.php @ 3526

Revision 3526, 1000 bytes checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado modulos Timesheet e DMS para a comunidade.

  • Property svn:executable set to *
Line 
1<?php
2include("../inc/inc.Settings.php");
3include("../inc/inc.Utils.php");
4include("../inc/inc.DBAccess.php");
5
6//Code when running PHP as Module -----------------------------------------------------------------
7
8/*
9setcookie("mydms_logged_out", "true", 0, $settings->_httpRoot);
10header("Location: ../out/out.ViewFolder.php");
11print "Logout successful";
12*/
13
14//Code when running PHP in CGI-Mode ---------------------------------------------------------------
15
16//Delete from phpgw_mydms_Sessions
17
18$dms_session = $HTTP_COOKIE_VARS["mydms_session"];
19$dms_session = sanitizeString($dms_session);
20
21$queryStr = "DELETE FROM phpgw_mydms_Sessions WHERE id = '$dms_session'";
22if (!$db->getResult($queryStr))
23        die ("Error while removing session from phpgw_mydms_Sessions: " . $db->getErrorMsg());
24
25//Delete Cookie
26setcookie("mydms_session", $HTTP_COOKIE_VARS["mydms_session"], time()-3600, $settings->_httpRoot);
27
28//Forward to Login-page
29header("Location: ../out/out.Login.php");
30print "Logout successful";
31
32
33?>
Note: See TracBrowser for help on using the repository browser.