���� 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/server/ |
<?php $server_id = $CORE->input['server_id'] ?? 0; if($server_id==0){ $row_check = $DB->get_colum_tb('tb_server'); $row_pos = $DB->fetch_row($DB->query("SELECT server_pos FROM tb_server ORDER BY server_pos DESC LIMIT 1 ")); }else{ $row_check = $DB->fetch_row($DB->query("SELECT * FROM tb_server WHERE server_id='$server_id' ")); } if(isset($CORE->input['submitbt'])){ $server_id = $CORE->input['server_id'] ?? 0; $f = $CORE->input['f']; $server_location = $CORE->input['server_location']; $txt_server_location = ''; foreach($server_location as $val){ $txt_server_location .= $val.'@'; } if($f['server_name']!=''){ if($server_id==0){ $arr_insert = array('server_name' => $f['server_name'], 'server_link' => $f['server_link'], 'server_location' => $txt_server_location, 'server_pos' => trim($f['server_pos']),'server_status'=>$f['server_status']); $DB->do_insert('tb_server', $arr_insert); }else{ $arr_update = array('server_name' => $f['server_name'], 'server_link' => $f['server_link'], 'server_location' => $txt_server_location, 'server_pos' => trim($f['server_pos']),'server_status'=>$f['server_status']); $DB->do_update('tb_server', $arr_update, " WHERE server_id='$server_id' "); } } close_popup('Updated!'); } include ROOT_PATH . 'include/block/header_popup.php'; ?> <div class="card"> <div class="card-header bg-success">Post server</div> <div class="card-body" style="font-size: 12px;"> <form method="post" id="form_hoan_tra" action=""> <input type="hidden" value="<?php echo $server_id;?>" name="server_id" id="server_id"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label>Server position</label> <input type="text" name="f[server_pos]" class="form-control" value="<?php if($server_id==0){ echo ($row_pos['server_pos']+1); }else { echo $row_check['server_pos']; } ?>" required> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label>Server name</label> <input type="text" name="f[server_name]" class="form-control" value="<?php echo $row_check['server_name'];?>" required> </div> </div> <div class="col-sm-12"> <div class="form-group"> <label>Server link</label> <input type="text" name="f[server_link]" class="form-control" value="<?php echo $row_check['server_link'];?>" required> </div> </div> <div class="col-sm-12"> <div class="form-group"> <label>Server location <?php /*$continent = geoip_continent_code_by_name($func->get_ip_address()); if ($continent) { echo '(This host is located in: <span class="text-success">' . $arr_continent[$continent].'</span>)'; }*/ ?></label> <select name="server_location[]" class="select2 form-control" multiple required> <?php $arr_selected = array(); if($row_check['server_location']!=''){ $arr_selected = explode('@',$row_check['server_location']); } echo get_op_continent($arr_selected); ?> </select> </div> </div> <div class="col-sm-12"> <div class="form-group"> <label>Server status</label> <select name="f[server_status]" class="form-control" required> <option value="">---</option> <option value="Active" <?php if($row_check['server_status']=='Active'){echo 'selected';}?>>Active</option> <option value="Deactive" <?php if($row_check['server_status']=='Deactive'){echo 'selected';}?>>Deactive</option> </select> </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(); ?>