Notes
![]() ![]() Notes - notes.io |
<%@page import="com.esds.esds.DB"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
if (session.getAttribute("id") == null) {
response.sendRedirect("exit.jsp");
}
%>
<jsp:include page='ust.jsp'>
<jsp:param name="baslik" value="Personeller"/>
<jsp:param name="icon" value="users"/>
</jsp:include>
<% DB db = new DB();
ResultSet rs = db.qWMR("select * from personeller");
%>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs/jszip-3.1.3/pdfmake-0.1.27/dt-1.10.15/b-1.4.0/b-flash-1.4.0/b-html5-1.4.0/b-print-1.4.0/r-2.1.1/sc-1.4.2/se-1.2.2/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jszip-3.1.3/pdfmake-0.1.27/dt-1.10.15/b-1.4.0/b-flash-1.4.0/b-html5-1.4.0/b-print-1.4.0/r-2.1.1/sc-1.4.2/se-1.2.2/datatables.min.js"></script>
<style type="text/css">
</style>
<table id="tbl" class="table table-bordered table-striped table-hover" style="width:100%">
<thead>
<tr>
<th class='text-center'>ID</th>
<th class='text-center'>AD</th>
<th class='text-center'>UN</th>
<th class='text-center' style="width:100px">İŞLEM</th>
</tr>
</thead>
<tbody>
<% while (rs.next()) {
String id = rs.getString(1);
String ad = rs.getString(2);
String un = rs.getString(3);
out.println("<tr>");
out.println("<td style='vertical-align:middle' align='center'>" + id + "</td>");
out.println("<td style='vertical-align:middle'align='center'>" + ad + "</td>");
out.println("<td style='vertical-align:middle' align='center'>" + un + "</td>");
%>
<td align="center">
<button rec_id="<%=id%>" rec_ad="<%=ad%>" rec_un="<%=un%>" class="btn btn-primary btn-sm btn_upd" data-toggle="modal" data-target="#updModal">
<i class="fa fa-edit "></i>
</button>
<button rec_id="<%=id%>" class="btn btn-danger btn-sm btn_sil">
<i class="fa fa-trash-o "></i>
</button>
</td>
<% out.println("</tr>");
}
%>
</tbody>
</table>
<br />
<div class="text-right">
<button data-toggle="modal" data-target="#addModal" class="btn btn-success btn-lg"><i class="fa fa-plus"></i> PERSONEL EKLE</button>
</div>
<!-- Modal -->
<form id="addForm">
<div id="addModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-sm">
<!-- Modal content-->
<div class="modal-content text-left">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Personel Ekleme</h4>
</div>
<div class="modal-body">
<b>Personel Adı</b>
<input type="text" class="form-control input" name="pad" required />
<br />
<b>Kullanıcı Adı</b>
<input type="text" class="form-control input" name="pun" required />
<br />
<b>Şifre</b>
<input type="text" class="form-control input" name="ppw" required />
<br />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success">Ekle</button>
</div>
</div>
</div>
</div>
</form>
<!-- Modal -->
<form id="updForm">
<div id="updModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-sm">
<!-- Modal content-->
<div class="modal-content text-left">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Personel Güncelleme</h4>
</div>
<div class="modal-body">
<input class="form-control" type="text" id="pid" name="pid" readonly>
<b>Personel Adı</b>
<input type="text" class="form-control input" id="pad" name="pad" required />
<br />
<b>Kullanıcı Adı</b>
<input type="text" class="form-control input" id="pun" name="pun" required />
<br />
<b>Şifre</b>
<input type="text" class="form-control input" id="ppw" name="ppw" required />
<br />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success">Güncelle</button>
</div>
</div>
</div>
</div>
</form>
<script>
$(".btn_upd").click(function ()
{
var id = $(this).attr('rec_id');
//alert('Secilen : '+id);
$("#pid").val(id);
var ad = $(this).attr('rec_ad');
//alert('Secilen : '+ad);
$("#pad").val(ad);
var un = $(this).attr('rec_un');
//alert('Secilen : '+un);
$("#pun").val(un);
});
$("#updForm").submit(function (e)
{
e.preventDefault();
var vals = $(this).serialize();
$.post("api/admin/personel/guncelle", vals, function (d, s)
{
location.reload();
});
return false;
});
$("#addForm").submit(function (e)
{
e.preventDefault();
var vals = $(this).serialize();
$.post("api/admin/personel/ekle", vals, function (d, s)
{
location.reload();
});
return false;
});
$(".btn_sil").click(function ()
{
var onay = confirm("Bu Personel Silinsin Mi ?");
if (onay)
{
var pId = $(this).attr('rec_id');
$.post("api/admin/personel/sil", {"id": pId}, function (d, s)
{
location.reload();
});
}
});
</script>
<jsp:include page='alt.jsp' />
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team