K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / var / www / html / sman1baleendahoppppppp / views / media /
server ip : 104.21.89.46

your ip : 172.69.6.184

H O M E


Filename/var/www/html/sman1baleendahoppppppp/views/media/albums.php
Size3.47 kb
Permissionrw-r--r--
Ownerroot : root
Create time04-May-2025 17:23
Last modified04-May-2025 17:23
Last accessed07-Jul-2025 19:30
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php defined('BASEPATH') OR exit('No direct script access allowed');?>
<?=link_tag('assets/plugins/magnific-popup/magnific-popup.css');?>
<script type="text/javascript" src="<?=base_url('assets/plugins/magnific-popup/magnific-popup.js')?>"></script>
<style type="text/css">
.images {
width: 250px;
height: 250px;
margin-right: 10px;
margin-bottom: 10px;
}
</style>
<?php $this->load->view('backend/grid_index');?>
<script type="text/javascript">
var _grid = 'ALBUMS', _form = _grid + '_FORM';
new GridBuilder( _grid , {
controller:'media/albums',
fields: [
{
header: '<input type="checkbox" class="check-all">',
renderer: function( row ) {
return CHECKBOX(row.id, 'id');
},
exclude_excel: true,
sorting: false
},
{
header: '<i class="fa fa-edit"></i>',
renderer: function( row ) {
return A(_form + '.OnEdit(' + row.id + ')', 'Edit');
},
exclude_excel: true,
sorting: false
},
{
header: '<i class="fa fa-file-image-o"></i>',
renderer: function( row ) {
return UPLOAD(_form + '.OnUpload(' + row.id + ')', 'image', 'Upload Cover Album');
},
exclude_excel: true,
sorting: false
},
{
header: '<i class="fa fa-search-plus"></i>',
renderer: function( row ) {
var cover = "'" + row.album_cover + "'";
return row.album_cover ?
'<a title="Preview Album Cover" onclick="coverPreview(' + cover + ')" href="#"><i class="fa fa-search-plus"></i></a>' : '';
},
exclude_excel: true,
sorting: false
},
{
header: '<i class="fa fa-upload"></i>',
renderer: function( row ) {
return '<a title="Upload Galeri Foto" href="'+_BASE_URL + 'media/albums/form_upload/' + row.id +'"><i class="fa fa-upload"></i></a>';
},
exclude_excel: true,
sorting: false
},
{
header: '<i class="fa fa-desktop"></i>',
renderer: function( row ) {
return '<a title="Slide Show" onclick="galleryPreview(' + row.id + ')" href="#"><i class="fa fa-desktop"></i></a>';
},
exclude_excel: true,
sorting: false
},
{ header:'Judul', renderer:'album_title' },
{ header:'Keterangan', renderer:'album_description' },
{ header:'Slug', renderer:'album_slug' }
],
resize_column: 7,
extra_buttons: '<a href="' + _BASE_URL + 'media/photos' + '" class="btn btn-sm btn-default" data-toggle="tooltip" data-placement="top" title="List Images"><i class="fa fa-picture-o"></i></a>'
});

new FormBuilder( _form , {
controller:'media/albums',
fields: [
{ label:'Judul', name:'album_title' },
{ label:'Keterangan', name:'album_description', type:'textarea' }
],
upload_action: 'cover_upload'
});

function coverPreview( image ) {
$.magnificPopup.open({
items: {
src: _BASE_URL + 'media_library/albums/' + image
},
type: 'image'
});
}

function galleryPreview( id ) {
$.post(_BASE_URL + 'media/albums/list_images', {id: id}, function( response ) {
var res = _H.StrToObject( response );
if(res.count > 0) {
$.magnificPopup.open({
items: res.items,
gallery: {
enabled: true
},
type: 'image'
});
} else {
_H.Notify('info', 'No images loaded.');
}
});
}
</script>