Download "admin" folder from FTP

This commit is contained in:
Roman Pyrih
2026-01-27 10:46:49 +01:00
parent 608a4a1eab
commit ff58ac80ef
110 changed files with 9528 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
<?
global $db;
ob_start();
?>
<?= \Html::input(
array(
'label' => 'Url',
'class' => 'required',
'name' => 'url',
'id' => 'url',
'value' => $this -> element['url']
)
);?>
<?= \Html::input_switch(
array(
'label' => 'Aktywny',
'name' => 'status',
'checked' => $this -> element['status'] == 1 or !$this -> element['id'] ? true : false
)
);?>
<?= \Html::input(
array(
'label' => 'Meta title',
'class' => 'title',
'name' => 'title',
'id' => 'title',
'value' => $this -> element['title']
)
);?>
<?= \Html::input(
array(
'label' => 'Meta keywords',
'class' => 'keywords',
'name' => 'keywords',
'id' => 'keywords',
'value' => $this -> element['keywords']
)
);?>
<?= \Html::input(
array(
'label' => 'Meta description',
'class' => 'description',
'name' => 'description',
'id' => 'description',
'value' => $this -> element['description']
)
);?>
<?= \Html::textarea(
array(
'label' => 'Dodatkowa treść',
'name' => 'text',
'id' => 'text',
'value' => $this ->element['text']
)
);?>
<?
$out = ob_get_clean();
$grid = new \gridEdit;
$grid -> id = 'seo-element-edit';
$grid -> gdb_opt = $gdb;
$grid -> include_plugins = true;
$grid -> title = 'Edycja elementu SEO';
$grid -> fields = [
[
'db' => 'id',
'type' => 'hidden',
'value' => $this -> element['id']
]
];
$grid -> external_code = $out;
$grid -> actions = [
'save' => [
'url' => '/admin/seo_additional/element_save/',
'back_url' => '/admin/seo_additional/main_view/'
],
'cancel' => [
'url' => '/admin/seo_additional/main_view/'
]
];
$grid -> persist_edit = true;
$grid -> id_param = 'id';
echo $grid -> draw();
?>
<script type="text/javascript">
$( function() {
$( '#text' ).ckeditor( {
toolbar : 'MyTool',
height:'350'
});
});
</script>

View File

@@ -0,0 +1,58 @@
<?php
global $gdb;
$grid = new \grid( 'pp_seo_additional' );
$grid -> gdb_opt = $gdb;
$grid -> order = [ 'column' => 'url', 'type' => 'ASC' ];
$grid -> search = [
[ 'name' => 'Url', 'db' => 'url', 'type' => 'text' ],
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
];
$grid -> columns_view = [
[
'name' => 'Lp.',
'th' => [ 'class' => 'g-lp' ],
'td' => [ 'class' => 'g-center' ],
'autoincrement' => true
],
[
'name' => 'Url',
'db' => 'url',
'php' => 'echo "<a href=\'/admin/seo_additional/element_edit/id=[id]\'>[url]</a>";',
'sort' => true
],
[
'name' => 'Title',
'db' => 'title',
'sort' => true
],
[
'name' => 'Aktywny',
'db' => 'status',
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
'sort' => true
],
[
'name' => 'Edytuj',
'action' => [ 'type' => 'edit', 'url' => '/admin/seo_additional/element_edit/id=[id]' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
'td' => [ 'class' => 'g-center' ]
],
[
'name' => 'Usuń',
'action' => [ 'type' => 'delete', 'url' => '/admin/seo_additional/element_delete/id=[id]' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
'td' => [ 'class' => 'g-center' ]
]
];
$grid -> buttons = [
[
'label' => 'Dodaj element',
'url' => '/admin/seo_additional/element_edit/',
'icon' => 'fa-plus-circle',
'class' => 'btn-success'
]
];
echo $grid -> draw();