query("SELECT * FROM setting_point WHERE point_id = '".$point_id."' LIMIT 1"); if ($mysqli_page->num_rows > 0){ // keep query value in array $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ; $submit_type = 'edit' ; } // update database if ( isset($type) && ( $type == 'new' || $type == 'edit' ) && $_POST['hide'] == 1 ){ // keep value in variable $page_title = escapeString($_POST['title']) ; $page_title = ($page_title != '' ? $page_title : 'No Title') ; if ( $point_id == '' ){ $mysqli->query( "INSERT INTO setting_point ( created_at ) VALUES ( '".TODAYDATE."' )" ) ; $point_id = $mysqli->insert_id ; } // update database $mysqli->query( "UPDATE setting_point SET point_title = '".escapeString($_POST['point_title'])."', point_description = '".escapeString($_POST['point_description'])."', point_from = '".escapeString($_POST['point_from'])."', point_type = '".escapeString($_POST['point_type'])."', difficulty = '".escapeString($_POST['difficulty'])."', point_value = '".escapeString($_POST['point_value'])."' WHERE point_id = '".$point_id."'" ) ; // refresh page header("Location:app-point.php?page_mode=edit&point_id=".$point_id."&success=1") ; $_SESSION['system_result'] = 'success-updated' ; exit ; } if ( ( $page_mode == 'new' && !permissionCheck($row_user, 'app-point-new') ) || ( $page_mode == 'edit' && !permissionCheck($row_user, 'app-point-edit') ) ){ header('Location: app-point.php') ; exit ; } // start header here include 'requires/page_header.php'; include 'requires/page_top.php'; ?>
'.$lang['Thank you details has been updated'].'
' ; break ; } unset($_SESSION['system_result']) ; } ?>
Title
Description
From
Type
Difficulty
Point
query( $mysqli_query." ORDER BY a.point_id DESC LIMIT $start_from, " . LIMIT ) ; // load pagination $page_pagination = nextPrevious($product_page, LIMIT, $search_url, $mysqli_query) ; // start header here include 'requires/page_header.php' ; include 'requires/page_top.php' ; ?>
search
listing
num_rows > 0){ while ( $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ){ echo ' '; } }else{ echo ' ' ; } ?>
Action Title Description From Type Difficulty Point Created Date
' ; if ( permissionCheck($row_user, 'app-point-edit') ){ echo ' ' ; }else{ echo '-' ; } echo ' '.dataFilter($row_page['point_title']).' '.dataFilter($row_page['point_description']).' '.ucwords($row_page['point_from']).' '.ucwords($row_page['point_type']).' '.ucwords($row_page['difficulty']).' '.dataFilter($row_page['point_value']).' '.resetDateFormat($row_page['created_at']).'
'.$lang['no_data'].'