query("SELECT a.password_id, a.content FROM app_password a LEFT JOIN app_password_translation b ON ( a.password_id = b.password_id ) WHERE a.deleted_at IS NULL AND a.password_type = 'nomination' AND b.lang = 'en'"); if ($mysqli_ck_password->num_rows > 0) { $row_ck_password = $mysqli_ck_password->fetch_array(); } if ($_SESSION['nomination_password'] == '' ){ echo ''; } if($_SESSION['nomination_password'] != $row_ck_password['content']) { unset($_SESSION['nomination_password']); echo ''; } // keep parameter in value $page = escapeString($_GET['page']) ; $page_mode = escapeString($_GET['page_mode']) ; $type = escapeString($_GET['type']) ; $search = escapeString($_GET['search']) ; $question_id = escapeString($_GET['question_id']) ; // active menu bar $active_main_menu = 'service' ; $active_sub_menu = 'form-submission-question' ; $active_menu = 'form-nomination-question-list' ; // get all branch $branch_all = [] ; $get_branch = $mysqli->query( "SELECT * FROM branch WHERE deleted_at IS NULL " . $user_branch_permission_sql_123 ) ; if ( $get_branch->num_rows > 0 ){ while ( $row_branch = $get_branch->fetch_assoc() ){ $branch_all[$row_branch['branch_id']] = $row_branch['branch_name'] ; } } // check permission if ( !permissionCheck($row_user, 'form-nomination-question-view') ){ header('Location: index.php') ; exit ; } // mode type | all list | new | edit switch( $page_mode ){ // edit nomination question case 'new' : case 'edit' : // check query exsits $submit_type = 'new' ; $mysqli_page = $mysqli->query("SELECT * FROM formnomination_question WHERE question_id = '".$question_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 ( $question_id == '' ){ $mysqli->query( "INSERT INTO formnomination_question ( created_at ) VALUES ( '".TODAYDATE."' )" ) ; $question_id = $mysqli->insert_id ; } $array_branch = [] ; foreach ( $_POST['branch'] as $k_branch => $v_branch ){ $array_branch[] = escapeString( $v_branch ) ; } // update database $mysqli->query( "UPDATE formnomination_question SET ".$image_query." branch = '/".implode('/', $array_branch)."/', nomination_type = '".escapeString($_POST['nomination_type'])."', question_type = '".escapeString($_POST['question_type'])."', sortable = '".escapeString($_POST['sortable'])."' WHERE question_id = '".$question_id."'" ) ; foreach ( $LANGS as $klang => $vlang ){ $title = escapeString( $_POST['title_'.$klang] ) ; checkLangUpdate( 'formnomination_question_translation', 'question_id', $question_id, $klang, [ 'title' => [ 'type' => 'input', 'value' => $title ], 'content' => [ 'type' => 'textarea', 'value' => escapeString( $_POST['content_'.$klang] ) ], 'questions' => [ 'type' => 'input', 'value' => escapeString( $_POST['questions_'.$klang] ) ] ] ) ; } // refresh page header("Location:app-form-nomination-question.php?page_mode=edit&question_id=".$question_id."&success=1") ; $_SESSION['system_result'] = 'success-updated' ; exit ; } if ( ( $page_mode == 'new' && !permissionCheck($row_user, 'form-nomination-question-new') ) || ( $page_mode == 'edit' && !permissionCheck($row_user, 'form-nomination-question-edit') ) ){ header('Location: app-form-nomination-question.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']) ; } ?>
[ 'type' => 'input', 'title' => $lang['title'] ], 'content' => [ 'type' => 'input', 'title' => $lang['Content'] ], 'questions' => [ 'type' => 'input', 'title' => $lang['Questions'] ] ]) ; ?>
Nomination Type
Type
Sortable
query( $mysqli_query." ORDER BY a.question_id ASC 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' ; ?>
Type
num_rows > 0){ while ( $row_page = $mysqli_page->fetch_array(MYSQLI_ASSOC) ){ // default variable $id = $row_page['question_id'] ; echo ' '; } }else{ echo ' ' ; } ?>
Nomination Type Created Date
' ; if ( permissionCheck($row_user, 'form-nomination-question-edit') ){ echo ' ' ; }else{ echo '-' ; } echo ' '.ucwords($row_page['nomination_type']).' '.ucwords($row_page['question_type']).' '.dataFilter($row_page['title']).' '.resetDateFormat($row_page['created_at']).'
'.$lang['no_data'].'