ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/netphim/code/admin/sensitive_chap/ |
<?php $sensitive_chap_id = $CORE->input['sensitive_chap_id'] ?? 0; if($sensitive_chap_id==0){ $row_check = $DB->get_colum_tb('tb_sensitive_chap'); }else{ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_sensitive_chap WHERE sensitive_chap_id='$sensitive_chap_id' ")); } if(isset($CORE->input['submitbt'])){ $sensitive_chap_id = $CORE->input['sensitive_chap_id'] ?? 0; $sensitive_chap_name = $CORE->input['sensitive_chap_name'] ?? ''; $sensitive_chap_pos = $CORE->input['sensitive_chap_pos'] ?? 0; if($sensitive_chap_name!=''){ if($sensitive_chap_id==0){ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_sensitive_chap WHERE sensitive_chap_name='$sensitive_chap_name' ")); if(!$row_check) { $arr_insert = array('sensitive_chap_name' => $sensitive_chap_name,'sensitive_chap_pos' => $sensitive_chap_pos,'sensitive_chap_time'=>time()); $DB->do_insert('tb_sensitive_chap', $arr_insert); } }else{ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_sensitive_chap WHERE sensitive_chap_name='$sensitive_chap_name',sensitive_chap_pos='$sensitive_chap_pos' AND sensitive_chap_id!='$sensitive_chap_id' ")); if(!$row_check) { $arr_update = array('sensitive_chap_name' => $sensitive_chap_name,'sensitive_chap_pos' => $sensitive_chap_pos); $DB->do_update('tb_sensitive_chap', $arr_update, " WHERE sensitive_chap_id='$sensitive_chap_id' "); } } } close_popup('Updated!'); } include ROOT_PATH . 'include/block/header_popup.php'; ?> <div class="card"> <div class="card-header">Post sensitive chap</div> <div class="card-body" style="font-size: 12px;"> <form method="post" id="form_hoan_tra" action=""> <input type="hidden" value="<?php echo $sensitive_chap_id;?>" name="sensitive_chap_id" id="sensitive_chap_id"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label>Sensitive chap title</label> <input type="text" name="sensitive_chap_name" class="form-control" value="<?php echo $row_check['sensitive_chap_name'];?>" required> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label>Sensitive position</label> <input type="text" name="sensitive_chap_pos" class="form-control" value="<?php echo $row_check['sensitive_chap_pos'];?>" required> </div> </div> </div> <input type="submit" class="submit" style="display:none;" name="submitbt"> </form> </div> <div class="card-footer"> <a class="gui_yeu_cau btn btn-danger" href="javascript:void(0);">Submit</a> <a class="dong m-l-5 btn btn-dark" href="javascript:void(0);">Close</a> </div> </div> <script> $('.gui_yeu_cau').click(function (){ $('#form_hoan_tra .submit').click(); return false; }); $('.dong').click(function (){ window.close(); }); </script> <?php include ROOT_PATH . 'include/block/footer_popup.php'; exit(); ?>