Ale wiesz, że pobierając z serwera całe IP, a ukrywając je tylko w przeglądarce powodujesz, że userzy mogą podglądnąć te prawdziwe adresy IP?
Adresy IP i wszystkie dane wprowadzane są do bazy danych za pomocą formularza a następnie przetwarzane przez https://editor.datatables.net/ i wyświetlane w tabeli html, czy na serio ktoś może podejrzeć pełny adres mimo, że jest on w ten sposób ukryty ?
Tak czy siak potrzebuję pomocy z wdrożeniem kodu podanego w tym temacie tutaj:
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
"ajax": "php/table.test.php",
"table": "#test",
"fields": [ {
"label": "Name",
"name": "name",
"default": "-",
"type": "text"
},
{
"label": "ID",
"name": "ids",
"default": "-",
"type": "text"
},
{
"label": "IP",
"name": "ips",
"default": "-",
"type": "text"
},
{
"label": "Country",
"name": "country",
"default": "-",
"type": "text"
}
]
} );
// New record
$('a.editor_create').on('click', function (e) {
e.preventDefault();
editor
.title( 'Create new record' )
.buttons( { "label": "Add", "fn": function () { editor.submit() } } )
.create();
} );
// Edit record
$('#test').on('click', 'a.editor_edit', function (e) {
e.preventDefault();
editor
.title( 'Edit record' )
.buttons( { "label": "Update", "fn": function () { editor.submit() } } )
.edit( $(this).closest('tr') );
} );
// Delete a record (without asking a user for confirmation for this example)
$('#test').on('click', 'a.editor_remove', function (e) {
e.preventDefault();
editor
.message( 'Are you sure you wish to remove this record?' )
.buttons( { "label": "Delete", "fn": function () { editor.submit() } } )
.remove( $(this).closest('tr') );
} );
$('#test').DataTable( {
"paging": false,
"info": false,
"aoColumnDefs" : [ {
'bSortable' : false,
'aTargets' : [ 4 ]
} ],
ajax: "php/table.test.php",
columns: [
{ data: "name" },
{ data: "ids" },
** { data: "ips" }, //TEN SYF ODPOWIADA CHYBA ZA WYSOWETLANIE IP**
{ data: "country" },
{
data: null,
className: "center",
defaultContent: '<a href="" class="editor_edit">Edit</a> / <a href="" class="editor_remove">Delete</a>',
}
]
} );
} );