function keepAlive() { session_set_cookie_params(0, getSessionPath()); // set path session_start(); session_write_close(); exit; }
function endSession() { //deleteAllCookies(); session_unset(); session_destroy(); $_SESSION = array(); session_write_close(); setcookie(session_name(), '', time() - 1000, getSessionPath()); setcookie(session_name(), false, time() - 1000, getSessionPath()); unset($_COOKIE[session_name()]); session_regenerate_id(true); }
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------ */ error_reporting(E_ALL); ini_set("display_errors", 1); require_once "constants.php"; require_once "functions.php"; require_once "dbConfig.php"; $loaded = dbConfig::load(); require_once "config.php"; // start session if installed if ($loaded == 3) { session_set_cookie_params(0, getSessionPath()); // set cookie path session_start(); } if (isset($_POST[POST_PARAM_FULLRESET]) && is_Numeric($_POST[POST_PARAM_FULLRESET]) || isset($_GET[POST_PARAM_FULLRESET]) && is_Numeric($_GET[POST_PARAM_FULLRESET])) { //reset session! endSession(); $param = ''; if (isset($_GET[POST_PARAM_SE]) && is_Numeric($_GET[POST_PARAM_SE])) { if ($_GET[POST_PARAM_SE] > 1) { $param = '?' . POST_PARAM_SE . '=' . $_GET[POST_PARAM_SE]; } } if (isset($_POST[POST_PARAM_SE]) && is_Numeric($_POST[POST_PARAM_SE])) { if ($_POST[POST_PARAM_SE] > 1) { $param = '?' . POST_PARAM_SE . '=' . $_POST[POST_PARAM_SE];