Revision 3526,
1000 bytes
checked in by afernandes, 14 years ago
(diff) |
Ticket #1416 - Disponibilizado modulos Timesheet e DMS para a comunidade.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | <?php |
---|
2 | include("../inc/inc.Settings.php"); |
---|
3 | include("../inc/inc.Utils.php"); |
---|
4 | include("../inc/inc.DBAccess.php"); |
---|
5 | |
---|
6 | //Code when running PHP as Module ----------------------------------------------------------------- |
---|
7 | |
---|
8 | /* |
---|
9 | setcookie("mydms_logged_out", "true", 0, $settings->_httpRoot); |
---|
10 | header("Location: ../out/out.ViewFolder.php"); |
---|
11 | print "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'"; |
---|
22 | if (!$db->getResult($queryStr)) |
---|
23 | die ("Error while removing session from phpgw_mydms_Sessions: " . $db->getErrorMsg()); |
---|
24 | |
---|
25 | //Delete Cookie |
---|
26 | setcookie("mydms_session", $HTTP_COOKIE_VARS["mydms_session"], time()-3600, $settings->_httpRoot); |
---|
27 | |
---|
28 | //Forward to Login-page |
---|
29 | header("Location: ../out/out.Login.php"); |
---|
30 | print "Logout successful"; |
---|
31 | |
---|
32 | |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.