quick minor path updates (#1968)
[openemr.git] / portal / logout.php
blob40ff5cc25add87cc4972cc74a4d68f4a687848b0
1 <?php
2 /**
4 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
5 * Copyright (C) 2011 Cassian LUP <cassi.lup@gmail.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Cassian LUP <cassi.lup@gmail.com>
20 * @author Jerry Padgett <sjpadgett@gmail.com>
21 * @link http://www.open-emr.org
24 require_once(dirname(__FILE__)."/lib/appsql.class.php");
26 //continue session
27 session_start();
28 $logit = new ApplicationTable();
29 $logit->portalLog('logout', $_SESSION['pid'], ($_SESSION['portal_username'].': '.$_SESSION['ptName'].':success'));
30 //landing page definition -- where to go after logout
31 $landingpage = "index.php?site=".$_SESSION['site_id'];
33 //log out by killing the session
34 session_destroy();
36 //redirect to pretty login/logout page
37 header('Location: '.$landingpage.'&logout');