query("SELECT post_id, post_title FROM system_post WHERE post_type = 'page-auto-execution' AND post_categories = 'page-auto-execution' AND post_trash = '0' LIMIT 1") ; // check if page exists if ($mysqli_page->num_rows == 0){ // insert into database $mysqli->query("INSERT INTO system_post (post_type, post_categories, post_date, post_modified, post_trash) VALUES ('page-auto-execution', 'page-auto-execution', '".TODAYDATE."', '".TODAYDATE."', '0')") ; // set page id in variable $page = $mysqli->insert_id ; // refresh page header("Location:page-auto-execution.php?page=".$page."") ; exit ; }else{ // set query as array $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ; // set page id in variable $page = $row_page['post_id'] ; } // update database // keep value in variable $timeout_hour = resetString(escapeString($_POST['timeout_hour'])) ; $timeout_minute = resetString(escapeString($_POST['timeout_minute'])) ; if (isset($type) && $type == 'edit' && $_POST['hide'] == 1){ $timeout = ($timeout_hour != '' && $timeout_minute != '' ? ($timeout_hour.':'.$timeout_minute) : '') ; // keep value in variable $page_content = resetString(escapeString($_POST['content'])) ; $array_timeout = array('old' => $row_page['post_title'], 'new' => $timeout) ; // update database $mysqli->query("UPDATE system_post SET post_title = '".$timeout."', post_modified = '".TODAYDATE."' WHERE post_id = '".$page."'") ; // refresh page header("Location:page-auto-execution.php?page=".$page."&success=1") ; exit ; } // start header here include 'requires/page_header.php' ; include 'requires/page_top.php' ; $timeout = $row_page['post_title'] ; $timeout_hour = $timeout_minute = '' ; if ($timeout != ''){ $timeout_hour = date('G', strtotime($timeout)) ; $timeout_minute = date('i', strtotime($timeout)) ; } ?>
Time For Auto Logout
Hour   Minute