ÿØÿà 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/truyentranh/code/admin/author/ |
<?php $author_id = $CORE->input['author_id'] ?? 0; if($author_id==0){ $row_check = $DB->get_colum_tb('tb_author'); }else{ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_author WHERE author_id='$author_id' ")); } if(isset($CORE->input['submitbt'])){ $author_id = $CORE->input['author_id'] ?? 0; $author_name = $CORE->input['author_name'] ?? ''; $fname = $func->format_string($author_name); if($author_name!=''){ if($author_id==0){ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_author WHERE author_fname='$fname' ")); if(!$row_check) { $arr_insert = array('author_name' => $author_name, 'author_fname' => $fname); $DB->do_insert('tb_author', $arr_insert); } }else{ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_author WHERE author_fname='$fname' AND author_id!='$author_id' ")); if(!$row_check) { $arr_update = array('author_name' => $author_name); $DB->do_update('tb_author', $arr_update, " WHERE author_id='$author_id' "); } } } close_popup('Updated!'); } include ROOT_PATH . 'include/block/header_popup.php'; ?> <div class="card"> <div class="card-header">Post author</div> <div class="card-body" style="font-size: 12px;"> <form method="post" id="form_hoan_tra" action=""> <input type="hidden" value="<?php echo $author_id;?>" name="author_id" id="author_id"> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <label>Author name</label> <input type="text" name="author_name" class="form-control" value="<?php echo $row_check['author_name'];?>" 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(); ?>