first commit
This commit is contained in:
1239
admin/css/style.css
Normal file
1239
admin/css/style.css
Normal file
File diff suppressed because it is too large
Load Diff
74
admin/index.php
Normal file
74
admin/index.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?
|
||||
if ( get_magic_quotes_gpc() )
|
||||
{
|
||||
function stripslashes_deep( $value )
|
||||
{
|
||||
$value = is_array( $value ) ? array_map( 'stripslashes_deep', $value ) : stripslashes( $value );
|
||||
return $value;
|
||||
}
|
||||
$_POST = array_map( 'stripslashes_deep', $_POST );
|
||||
$_GET = array_map( 'stripslashes_deep', $_GET );
|
||||
}
|
||||
|
||||
function __autoload_my_classes( $classname )
|
||||
{
|
||||
$q = explode( '\\' , $classname );
|
||||
$c = array_pop( $q );
|
||||
$f = '../autoload/' . implode( '/' , $q ) . '/class.' . $c . '.php';
|
||||
if ( $c == 'Savant3' )
|
||||
{
|
||||
require_once( '../autoload/Savant3.php' );
|
||||
return true;
|
||||
}
|
||||
if ( file_exists( $f ) )
|
||||
require_once( $f );
|
||||
}
|
||||
spl_autoload_register( '__autoload_my_classes' );
|
||||
|
||||
define( 'OPD_DIR' , '../autoload/' );
|
||||
require( OPD_DIR . 'opd.class.php' );
|
||||
if ( file_exists( '../files/config.php' ) )
|
||||
include '../files/config.php';
|
||||
else
|
||||
include '../config.php';
|
||||
date_default_timezone_set('Europe/Warsaw');
|
||||
|
||||
session_start();
|
||||
$db = opdClass::create(
|
||||
array(
|
||||
'dsn' => 'mysql:host=' . $database['host'] . ';dbname=' . $database['name'],
|
||||
'user' => $database['user'] ,
|
||||
'password' => $database['password'] ,
|
||||
'cache' => 'Temp/' ,
|
||||
'debugConsole' => false
|
||||
)
|
||||
);
|
||||
$db -> query('SET NAMES utf8');
|
||||
|
||||
$cache = new \FileCache;
|
||||
|
||||
if ( \System::formGet( 'del' ) == 'true' )
|
||||
{
|
||||
\System::deleteCacheAdmin();
|
||||
\System::deleteCache();
|
||||
session_destroy();
|
||||
echo '<script>document.location.href="./";</script>';
|
||||
}
|
||||
|
||||
$lang = \System::getSessionVar('lang' , true );
|
||||
if ( !$lang )
|
||||
{
|
||||
$lang = \language\FLanguage::loadLang();
|
||||
\System::setSessionVar( 'lang' , $lang , true );
|
||||
}
|
||||
|
||||
\admin\controls\Page::checkUrlParams();
|
||||
|
||||
$user = \System::getSessionVar( 'user' , true );
|
||||
if ( file_exists( '../resources/xajax/xajax_core/xajax.inc.php' ) )
|
||||
include( '../resources/xajax/xajax_core/xajax.inc.php' );
|
||||
|
||||
include( '../functions/xajax.php' );
|
||||
|
||||
echo \admin\view\Page::show();
|
||||
?>
|
||||
1
admin/temp/5/s_cache5c960ac6ac395c347fa037c186c9b80d
Normal file
1
admin/temp/5/s_cache5c960ac6ac395c347fa037c186c9b80d
Normal file
@@ -0,0 +1 @@
|
||||
YToyOntpOjA7aToxNjkzOTQzNTM3O2k6MTthOjUzOntzOjEwOiJUX1BJRVJXU1pBIjtzOjg6InBpZXJ3c3phIjtzOjEyOiJUX1BPUFJaRUROSUEiO3M6MTA6InBvcHJ6ZWRuaWEiO3M6MTA6IlRfT1NUQVROSUEiO3M6ODoib3N0YXRuaWEiO3M6MTA6IlRfTkFTVEVQTkEiO3M6OToibmFzdMSZcG5hIjtzOjQ6IlRfVUwiO3M6MzoidWwuIjtzOjU6IlRfVEVMIjtzOjQ6InRlbC4iO3M6NzoiVF9MT0dJTiI7czo1OiJsb2dpbiI7czo3OiJUX0hBU0xPIjtzOjY6Imhhc8WCbyI7czo5OiJUX1pBTE9HVUoiO3M6NzoiemFsb2d1aiI7czoxMzoiVF9SRUpFU1RSQUNKQSI7czoxMToicmVqZXN0cmFjamEiO3M6MTY6IlRfT0RaWVNLQUpfSEFTTE8iO3M6MTU6Im9kenlza2FqIGhhc8WCbyI7czoxNToiVF9QUk9TWkVfQ1pFS0FDIjtzOjE1OiJwcm9zesSZIGN6ZWthxIciO3M6OToiVF9aQU1LTklKIjtzOjc6InphbWtuaWoiO3M6ODoiVF9EUlVLVUoiO3M6NjoiZHJ1a3VqIjtzOjE0OiJUX1dZU1pVS0lXQVJLQSI7czoxMjoid3lzenVraXdhcmthIjtzOjU6IlRfTklQIjtzOjM6Ik5JUCI7czoxMjoiVF9UV09KX0VNQUlMIjtzOjExOiJ0d8OzaiBlbWFpbCI7czo3OiJUX1RFTUFUIjtzOjU6InRlbWF0IjtzOjc6IlRfVFJFU0MiO3M6NzoidHJlxZvEhyI7czo4OiJUX1dZU0xJSiI7czo3OiJ3ecWbbGlqIjtzOjI0OiJUX0JSQUtfV1NaWVNUS0lDSF9EQU5ZQ0giO3M6MzQ6IkJyYWsgd3N6eXN0a2ljaCB3eW1hZ2FueWNoIGRhbnljaC4iO3M6MjU6IlRfTklFUE9QUkFXTllfQURSRVNfRU1BSUwiO3M6MzY6IlBvZGFueSBhZHJlcyBlbWFpbCBqZXN0IG5pZXBvcHJhd255LiI7czozMToiVF9URU5fRk9STVVMQVJaX0JZTF9KVVpfV1lTTEFOWSI7czozODoiVGEgd2lhZG9tb8WbxIcgem9zdGHFgmEganXFvCB3eXPFgmFuYS4iO3M6MjQ6IlRfWkFDWkVLQUpfTUlOX1dJQURPTU9TQyI7czo0OToiWmFjemVrYWogMSBtaW4gYWJ5IHd5c8WCYcSHIGtvbGVqbsSFIHdpYWRvbW/Fm8SHLiI7czoyNzoiVF9aQVBZVEFOSUVfWk9TVEFMT19XWVNMQU5FIjtzOjQ5OiJUd29qYSB3aWFkb21vxZvEhyB6b3N0YcWCYSB3eXPFgmFuYS4gRHppxJlrdWplbXkuIjtzOjg6IlRfV1NURUNaIjtzOjY6IndzdGVjeiI7czo1OiJUX0ZBWCI7czozOiJmYXgiO3M6ODoiVF9XSUVDRUoiO3M6Nzoid2nEmWNlaiI7czoyNDoiVF9aQUtUVUFMSVpPV0FOT19FTEVNRU5UIjtzOjM4OiJXeWJyYW55IGVsZW1lbnQgem9zdGHFgiB6bW9keWZpa293YW55LiI7czozNDoiVF9CUkFLX1VaWVRLT1dOSUtBX09fVEFLSU1fTE9HSU5JRSI7czozNjoiQnJhayB1xbx5dGtvd25pa2EgbyBwb2RhbnltIGxvZ2luaWUuIjtzOjIxOiJUX05JRVBSQVdJRExPV0VfSEFTTE8iO3M6MzQ6IlBvZGFuZSBoYXPFgm8gamVzdCBuaWVwcmF3aWTFgm93ZS4iO3M6ODoiVF9TWlVLQUoiO3M6Njoic3p1a2FqIjtzOjEyOiJUX0tPTUVOVEFSWkUiO3M6MTA6ImtvbWVudGFyemUiO3M6MTg6IlRfUE9LQVpfS09NRU5UQVJaRSI7czoxNzoicG9rYcW8IGtvbWVudGFyemUiO3M6NzoiVF9BVVRPUiI7czo1OiJhdXRvciI7czo1OiJUX0tPRCI7czozOiJrb2QiO3M6OToiVF9PRFNXSUVaIjtzOjk6Im9kxZt3aWXFvCI7czoxNzoiVF9ET0RBSl9LT01FTlRBUloiO3M6MTU6ImRvZGFqIGtvbWVudGFyeiI7czoyNToiVF9LT01FTlRBUlpfWk9TVEFMX0RPREFOWSI7czozMToiVHfDs2oga29tZW50YXJ6IHpvc3RhxYIgZG9kYW55LiI7czoyNzoiVF9UUldBX1dZU1lMQU5JRV9GT1JNVUxBUlpBIjtzOjI3OiJUcndhIHd5c3nFgmFuaWUgZm9ybXVsYXJ6YS4iO3M6MTI6IlRfTkVXU0xFVFRFUiI7czoxMDoibmV3c2xldHRlciI7czoxNzoiVF9ORVdTTEVUVEVSX1RFWFQiO3M6MTMzOiJXIGNlbHUgb3RyenlteXdhbmlhIG5ham5vd3N6eWNoIGluZm9ybWFjamksIHNwZWNqYWxuaWUgcHJ6eWdvdG93YW55Y2ggb2ZlcnQgaSBwcm9tb2NqaSB6YWNoxJljYW15IGRvIHN1YnNrcnlwY2ppIG5hc3plZ28gbmV3c2xldHRlcmEuIjtzOjE3OiJUX0lNSUVfSV9OQVpXSVNLTyI7czoxNjoiSW1pxJkgaSBOYXp3aXNrbyI7czo5OiJUX1RFTEVGT04iO3M6NzoidGVsZWZvbiI7czo3OiJUX0VNQUlMIjtzOjU6ImVtYWlsIjtzOjY6IlRfREFUQSI7czo0OiJkYXRhIjtzOjEyOiJUX09EV0lFRFpJTlkiO3M6MTA6Im9kd2llZHppbnkiO3M6MTc6IlRfREFUQV9QVUJMSUtBQ0pJIjtzOjE1OiJkYXRhIHB1Ymxpa2FjamkiO3M6OToiVF9HQUxFUklBIjtzOjc6ImdhbGVyaWEiO3M6MTc6IlRfT0JTTFVHQV9LTElFTlRBIjtzOjE2OiJvYnPFgnVnYSBrbGllbnRhIjtzOjIxOiJUX0lORk9STUFDSkVfT19GSVJNSUUiO3M6MTk6ImluZm9ybWFjamUgbyBmaXJtaWUiO3M6ODoiVF9VU0xVR0kiO3M6NzoidXPFgnVnaSI7czo5OiJUX0tPTlRBS1QiO3M6Nzoia29udGFrdCI7fX0=
|
||||
5
admin/templates/adverts/adverts-edit.php
Normal file
5
admin/templates/adverts/adverts-edit.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<script type="text/javascript">
|
||||
$( document ).ready( function() {
|
||||
$( "#date_start, #date_end" ).datepicker( $.datepicker.regional[ "pl" ] );
|
||||
})
|
||||
</script>
|
||||
62
admin/templates/articles/article-draw.php
Normal file
62
admin/templates/articles/article-draw.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$( ".tabs a" ).click( function ()
|
||||
{
|
||||
$( ".tabs .active" ).removeClass( "active" );
|
||||
$( this ).addClass( "active" );
|
||||
$( ".tabs-content" ).addClass( 'nondisplay' );
|
||||
var content_show = $( this ).attr( "href" );
|
||||
$( '#' + content_show ).removeClass( 'nondisplay' );
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="edit-row">
|
||||
<div id="tabs" class="tabs-container">
|
||||
<ul class="tabs">
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $lg )
|
||||
{
|
||||
?>
|
||||
<li class="tab-li">
|
||||
<a href="lang_<?= $lg['id'];?>" class="li-tabs <? if ( !$j++ ) echo 'active';?>"><?= $lg['name'];?></a>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $lg )
|
||||
{
|
||||
?>
|
||||
<div id="lang_<?= $lg['id'];?>" class="tabs-content <? if ( $i++ ) echo 'nondisplay';?>">
|
||||
<div class="edit_line">
|
||||
<label>Tytuł:</label>
|
||||
<div class="input">
|
||||
<?= $this -> secureHTML( $lg['title'] );?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit_line">
|
||||
<label>Meta description</label>
|
||||
<div class="input">
|
||||
<?= $lg['meta_description'];?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit_line">
|
||||
<label>Meta keywords:</label>
|
||||
<div class="input">
|
||||
<?= $lg['meta_keywords'];?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit_line">
|
||||
<label>Treść:</label>
|
||||
<div class="input">
|
||||
<?= $lg['text'];?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
33
admin/templates/articles/article-edit-pages.php
Normal file
33
admin/templates/articles/article-edit-pages.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
if ( is_array( $this -> _pages ) ) foreach ( $this -> _pages as $page )
|
||||
{
|
||||
if ( $page['id_menu'] != $_SESSION['id_menu'] )
|
||||
{
|
||||
$_SESSION['id_menu'] = $page['id_menu'];
|
||||
?>
|
||||
<div style="clear: both; background: #DDDDDF; padding: 5px 10px;">--- <?= \admin\factory\Menu::getMenuName( $page['id_menu'] );?> ---</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<div <? if ( $this -> _step > 0 ) echo "style='display: none;'";?> class="article_page article_page_<?= $this -> _step;?> <?= $page['parent_id'];?>" style="float: left; width: 280px;">
|
||||
<? if ( $this -> _step == 0 ) echo ' ';?>
|
||||
<input type='checkbox' class="art_pages" name='pages[]' value='<?= $page['id'];?>' style='width: 15px; position: relative; top: 5px; float: left; margin-right: 5px;' id="page_<?= $page['id'];?>"
|
||||
<?
|
||||
if ( $page['check'] == 1 )
|
||||
echo 'checked="checked"';
|
||||
?>
|
||||
/>
|
||||
<a id="a_<?= $page['id'];?>" idk="<?= $page['id'];?>" class='select-page'>
|
||||
<?= $page['title'];?>
|
||||
</a>
|
||||
<?
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo '<i class="toggle-pages show" id="' . $page['id'] . '"></i>';
|
||||
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo \admin\view\Articles::drawArticleEditPages( $page['subpages'], $this -> _step + 1 );
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
577
admin/templates/articles/article-edit.php
Normal file
577
admin/templates/articles/article-edit.php
Normal file
@@ -0,0 +1,577 @@
|
||||
<? \System::setSessionVar( 'admin', true );?>
|
||||
<div class="edit-row">
|
||||
<form method='POST' action='./' id='formularz' enctype="multipart/form-data" name="article_edit">
|
||||
<? if ( !$this -> _article['id'] ):?>
|
||||
<input type='hidden' name='rw' value='add_new' />
|
||||
<input type='hidden' name='check' value='<?= mktime();?>' />
|
||||
<input type='hidden' id="idk" name='id' value='' />
|
||||
<? else:?>
|
||||
<input type='hidden' name='rw' value='save' />
|
||||
<input type='hidden' id="idk" name='id' value='<?= $this -> _article['id'];?>' />
|
||||
<input type="hidden" id="version" name="version" value="<?= $this -> _version;?>" />
|
||||
<? endif;?>
|
||||
<div id="slider-code">
|
||||
<ul class="pager">
|
||||
<li><a rel="0" class="pagenum" href="#"><span class="badge">1</span>Ustawienia podstawowe</a></li>
|
||||
<li><a rel="1" class="pagenum" href="#"><span class="badge">2</span>Ustawienia zaawansowane</a></li>
|
||||
<li><a rel="2" class="pagenum" href="#"><span class="badge">3</span>Wyświetlanie</a></li>
|
||||
<li><a rel="3" class="pagenum" href="#"><span class="badge">4</span>Galeria</a></li>
|
||||
<li><a rel="4" class="pagenum" href="#"><span class="badge">5</span>Pliki</a></li>
|
||||
<li><a rel="5" class="pagenum" href="#"><span class="badge">6</span>Inne</a></li>
|
||||
</ul>
|
||||
<a class="buttons prev tip" href="#" title="Wstecz">
|
||||
<img src="../../images/system/img-left.png" />
|
||||
</a>
|
||||
<div class="viewport">
|
||||
<ul class="overview">
|
||||
<li>
|
||||
<div class="slide-title">Ustawienia podstawowe</div>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<ul class="tabs">
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $language )
|
||||
{
|
||||
?>
|
||||
<li><a href="lang_<?=$language['id'];?>" class="li-tabs <? if ( !$j++ ) echo 'active';?>"><?=$language['name'];?></a></li>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $language )
|
||||
{
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$( 'textarea#text_<?= $language['id'];?>' ).ckeditor( {
|
||||
toolbar : 'MyToolbar',
|
||||
language: 'pl',
|
||||
height:'250',
|
||||
width: '900px',
|
||||
extraPlugins : 'youtube'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="lang_<?= $language['id'];?>" class="tabs-content <? if ( $i++ ) echo 'nondisplay';?>">
|
||||
|
||||
<div class="group">
|
||||
<label>Tytuł:</label>
|
||||
<div class="content">
|
||||
<input type='text' id="title_<?= $language['id'];?>" name='title_<?= $language['id'];?>' value='<?= $this -> secureHTML( $language['title'] );?>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Treść:</label>
|
||||
<div class="content">
|
||||
<textarea name='text_<?=$language['id'];?>' id='text_<?=$language['id'];?>' class='text' rows='10' cols='10'><?=$this -> eprint( $language['text'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Link seo:</label>
|
||||
<div class="content">
|
||||
<input type='text' id="seo_link_<?= $language['id'];?>" name='seo_link_<?= $language['id'];?>' value='<?= $this -> secureHTML( $language['seo_link'] );?>' />
|
||||
<a href="#" onclick="xajax_generateSeoLink( '<?= $language['id'];?>', $( title_<?= $language['id'];?> ).val() )">
|
||||
<i class="icon refresh" style="position: relative; top: 3px; margin: 0;"></i>
|
||||
generuj
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Meta description:</label>
|
||||
<div class="content">
|
||||
<textarea id="meta_description_<?= $language['id'];?>" name='meta_description_<?= $language['id'];?>' cols='60' rows='5'><?= $language['meta_description'];?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Meta keywords:</label>
|
||||
<div class="content">
|
||||
<textarea id="meta_keywords_<?= $language['id'];?>" name='meta_keywords_<?= $language['id'];?>' cols='60' rows='5'><?= $language['meta_keywords'];?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Ustawienia zaawansowane</div>
|
||||
<div class="tabs-container">
|
||||
<div class="group">
|
||||
<label>Opublikowany:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="enabled" class="enabled" id="enabled_0" value="0" <? if ( !$this -> _article['enabled'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name='enabled' class="enabled" id="enabled_1" value='1' <? if ( $this -> _article['enabled'] || !$this -> _article ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Drukuj:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="print" class="print" id="print_0" value="0" <? if ( !$this -> _article['print'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name="print" class="print" id="print_1" value="1" <? if ( $this -> _article['print'] ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Pokaż tytuł:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="show_title" class="show_title" id="show_title_0" value="0" <? if ( !$this -> _article['show_title'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name="show_title" class="show_title" id="show_title_1" value="1" <? if ( $this -> _article['show_title'] || !$this -> _article ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Podmień tytuł z menu:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="replace_menu_title" class="replace_menu_title" id="replace_menu_title_0" value="0" <? if ( !$this -> _article['replace_menu_title'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name="replace_menu_title" class="replace_menu_title" id="replace_menu_title_1" value="1" <? if ( $this -> _article['replace_menu_title'] ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Pokaż datę:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="show_date" class="show_date" id="show_date_0" value="0" <? if ( !$this -> _article['show_date'] ):?>checked='checked'<? endif?> />
|
||||
nie
|
||||
<input type="radio" name="show_date" class="show_date" id="show_date_1" value="1" <? if ( $this -> _article['show_date'] ):?>checked='checked'<? endif?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Pokaż autora:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="show_author" class="show_author" id="show_author_0" value="0" <? if ( !$this -> _article['show_author'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name="show_author" class="show_author" id="show_author_1" value="1" <? if ( $this -> _article['show_author'] ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Wersjonowanie:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="keep_archive" class="keep_archive" id="keep_archive_0" value="0" <? if ( !$this -> _article['keep_archive'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name="keep_archive" class="keep_archive" id="keep_archive_1" value="1" <? if ( $this -> _article['keep_archive'] ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Komenatrze:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="comments_enabled" class="comments_enabled" id="comments_enabled_0" value="0" <? if ( !$this -> _article['comments_enabled'] ):?>checked='checked'<? endif;?> />
|
||||
nie
|
||||
<input type="radio" name="comments_enabled" class="comments_enabled" id="comments_enabled_1" value="1" <? if ( $this -> _article['comments_enabled'] ):?>checked='checked'<? endif;?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Wyświetlanie</div>
|
||||
<div class="tabs-container">
|
||||
<div class="group">
|
||||
<select name="layout" id="layout" style="margin: 0 20px; width: 255px;">
|
||||
<option value="">---- szablon domyślny ----</option>
|
||||
<?
|
||||
if ( is_array( $this -> _layouts ) ) foreach ( $this -> _layouts as $layout )
|
||||
{
|
||||
echo '<option value="' . $layout['id'] . '" ';
|
||||
if ( $this -> _layout == $layout['id'] )
|
||||
echo 'selected="selected"';
|
||||
echo '>' . $layout['name'] . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="group" style="padding: 10px 15px; line-height: 20px;">
|
||||
<?= \admin\view\Articles::drawArticleEditPages( $this -> _pages, 0 );?>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</form>
|
||||
<li>
|
||||
<div class="slide-title">Galeria</div>
|
||||
<div class="tabs-container">
|
||||
<div class="group">
|
||||
<?
|
||||
if ( !$this -> _article['id'] )
|
||||
echo '<div style="padding: 20px;">Aby dodawać zdjęcia należy wcześniej zapisać artykuł.</div>';
|
||||
?>
|
||||
<div id="article_galeries">
|
||||
<ul id="image-list">
|
||||
<?
|
||||
$img_count = 0;
|
||||
if ( is_array( $this -> _images ) ) foreach ( $this -> _images as $img )
|
||||
{
|
||||
echo '<li id="li_' . $img['id'] . '" style="background: url( \'/resources/thumber.php?img=/' . $img['src'] . '\' ) no-repeat center;">';
|
||||
echo '<span class="sm2_delete" onClick="xajax_deleteArticleImg(' . $img['id'] . ');"></span>';
|
||||
echo '</li>';
|
||||
$img_count++;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clearfix" style="margin-bottom: 20px;"></div>
|
||||
<? if ( $this -> _article['id'] ):?>
|
||||
<div id="flash_uploader" style="height: 280px; margin: 10px;">You browser doesn't have Flash installed.</div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Pliki</div>
|
||||
<div class="tabs-container">
|
||||
<div class="group">
|
||||
<?
|
||||
if ( !$this -> _article['id'] )
|
||||
echo '<div style="padding: 20px;">Aby dodawać pliki należy wcześniej zapisać artykuł.</div>';
|
||||
?>
|
||||
<ul id="files-list">
|
||||
<?
|
||||
$file_count = 0;
|
||||
if ( is_array( $this -> _files ) ) foreach ( $this -> _files as $file )
|
||||
{
|
||||
echo '<li id="file_li_' . $file['id'] . '">';
|
||||
echo '<div class="file" id="file_id_' . $file['id'] . '">';
|
||||
echo '<span class="sm2_edit" onClick="manageFile( ' . $file['id'] . ' );"></span>';
|
||||
if ( $file['name'] != '' )
|
||||
echo $file['name'];
|
||||
else
|
||||
echo $file['file'];
|
||||
echo '</div>';
|
||||
echo '</li>';
|
||||
$file_count++;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="clearfix" style="margin-bottom: 20px;"></div>
|
||||
|
||||
<? if ( $this -> _article['id'] ):?>
|
||||
<div id="flash_uploader_files" style="height: 280px;">You browser doesn't have Flash installed.</div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Inne</div>
|
||||
<div class="tabs-container">
|
||||
<div class="group">
|
||||
<label>Miniaturka:</label>
|
||||
<div class="content">
|
||||
<? if ( $this -> _article['id'] ):?>
|
||||
<form id="send-thumbnail" action="../resources/upload-thumbnails.php?hash=22292f4756dfed68e8397e356c28b32a" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="thumbnails" accept="image/*" />
|
||||
<input type="hidden" name="article_id" value="<?= $this -> _article['id'];?>" />
|
||||
<input type="submit" value="Wyślij" class="button" style="padding: 3px 12px;" />
|
||||
</form>
|
||||
<div id="progress">
|
||||
<div id="bar"></div>
|
||||
<div id="percent">0%</div >
|
||||
</div>
|
||||
<div id="thumbnail-container">
|
||||
<? if ( $this -> _article['thumbnail'] ):?>
|
||||
<a class="delete_img_link thumbnail-delete" style="display: block;" onClick="$.prompt( 'Na pewno chcesz usunąć miniaturkę?', { title: 'Potwierdź?', submit: function(e,v,m,f) { if ( v == true ) deleteArticleThumbnail(); }, buttons: { 'tak': true, 'nie': false }, focus: 1 } );">usuń</a>
|
||||
<img src="../resources/thumber.php?img=<?= $this -> _article['thumbnail'];?>&h=150&w=150" class="thumbnail" style="border: 1px solid #E0E4E8;" />
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? else:?>
|
||||
Aby dodać miniaturkę należy wcześniej zapisać artykuł.
|
||||
<? endif;?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="buttons next tip" href="#" title="Dalej">
|
||||
<img src="../../images/system/img-right.png" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="img_bg"></div>
|
||||
<div class="img_big"></div>
|
||||
|
||||
<div class="plik_bg"></div>
|
||||
|
||||
<div class="plik_edycja">
|
||||
<div class="group">
|
||||
<label style="width: 60px;">Nazwa:</label>
|
||||
<div class="content">
|
||||
<input type="text" id="name" style="width: 350px;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label style="width: 60px;"></label>
|
||||
<div class="content">
|
||||
<a class="a-action" onClick="xajax_saveArticleFileInfo( jQuery( '#file_edit_id' ).val(), jQuery( '#name' ).val() )">zapisz</a>
|
||||
<a class="a-action" onClick="jQuery( '.plik_bg, .plik_edycja' ).hide();">anuluj</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label style="width: 60px;"></label>
|
||||
<div class="content">
|
||||
<a class="delete_img_link" onClick="xajax_deleteArticleFile( jQuery( '#file_edit_id' ).val() )">usuń</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="file_edit_id" />
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="../resources/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript" src="../resources/plupload/plupload.js"></script>
|
||||
<script type="text/javascript" src="../resources/plupload/plupload.flash.js"></script>
|
||||
<script type="text/javascript" src="../resources/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
|
||||
<script type="text/javascript" src="../resources/plupload/i18n/pl.js"></script>
|
||||
<script type="text/javascript" src="../resources/jquery/jquery.form.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var img_count = <?= $img_count;?>;
|
||||
var file_count = <?= $file_count;?>;
|
||||
<?
|
||||
if ( $this -> _article['id'] )
|
||||
{
|
||||
?>
|
||||
function deleteArticleThumbnail(){
|
||||
xajax_deleteArticleThumbnail( <?= $this -> _article['id'];?> )
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
var options = {
|
||||
beforeSend: function()
|
||||
{
|
||||
$( "#progress" ).show();
|
||||
$( "#bar" ).width( '0%' );
|
||||
$( "#message" ).html( "" );
|
||||
$( "#percent" ).html( "0%" );
|
||||
},
|
||||
uploadProgress: function(event, position, total, percentComplete)
|
||||
{
|
||||
$( "#bar" ).width( percentComplete + '%' );
|
||||
$( "#percent" ).html( percentComplete + '%' );
|
||||
},
|
||||
success: function()
|
||||
{
|
||||
$( "#bar" ).width( '100%' );
|
||||
$( "#percent" ).html( '100%' );
|
||||
},
|
||||
complete: function(response)
|
||||
{
|
||||
// $("#message").html("<font color='green'>"+response.responseText+"</font>");
|
||||
$( '#thumbnail-container' ).html( '' );
|
||||
$( '#thumbnail-container' ).html( '<a class="delete_img_link thumbnail-delete" style="display: block;" onClick="$.prompt( \'Na pewno chcesz usunąć miniaturkę?\',{ callback: deleteArticleThumbnail, buttons: { tak: true, nie: false }, focus: 1 })">usuń</a><img src="../resources/thumber.php?img=' + response.responseText + '&h=150&w=150" class="thumbnail" style="border: 1px solid #E0E4E8;" />' );
|
||||
|
||||
}
|
||||
};
|
||||
$( "#send-thumbnail" ).ajaxForm( options );
|
||||
|
||||
jQuery( '.plik_bg' ).click( function(){
|
||||
jQuery( this ).hide();
|
||||
jQuery( '.plik_edycja' ).hide();
|
||||
})
|
||||
|
||||
$("#flash_uploader").pluploadQueue({
|
||||
runtimes : 'flash',
|
||||
init : {
|
||||
Refresh: function(up) {
|
||||
$(".plupload_buttons").css("display", "inline");
|
||||
$(".plupload_upload_status").css("display", "inline");
|
||||
$(".plupload_start").addClass("plupload_disabled");
|
||||
$(".plupload_start").removeClass("plupload_disabled");
|
||||
},
|
||||
|
||||
FileUploaded: function(up, file, response) {
|
||||
data = jQuery.parseJSON(response.response);
|
||||
jQuery('#image-list').append('<li id="li_' + data.id_img + '" style="background: url( \'/resources/thumber.php?img=' + data.data_link + '\' ) no-repeat center;">'
|
||||
+ '<span class="sm2_delete" onclick="xajax_deleteArticleImg(' + data.id_img + ');"></span>'
|
||||
+ '</li>');
|
||||
img_count++;
|
||||
}
|
||||
},
|
||||
url : '../resources/upload.php?article_id=<?= $this -> _article['id'];?>&hash=22292f4756dfed68e8397e356c28b32a',
|
||||
chunk_size : '1mb',
|
||||
unique_names : true,
|
||||
filters : [
|
||||
{title : "Obrazki", extensions : "jpg,gif,png,bmp,jpeg"}
|
||||
],
|
||||
resize : {width : 1920, height : 1080, quality : 100},
|
||||
flash_swf_url : '../resources/plupload/plupload.flash.swf'
|
||||
});
|
||||
|
||||
$("#flash_uploader_files").pluploadQueue({
|
||||
runtimes : 'flash',
|
||||
init : {
|
||||
Refresh: function(up) {
|
||||
$(".plupload_buttons").css("display", "inline");
|
||||
$(".plupload_upload_status").css("display", "inline");
|
||||
$(".plupload_start").addClass("plupload_disabled");
|
||||
$(".plupload_start").removeClass("plupload_disabled");
|
||||
},
|
||||
|
||||
FileUploaded: function(up, file, response) {
|
||||
data = jQuery.parseJSON(response.response);
|
||||
jQuery('#files-list').append('<div class="file" id="file_li_' + data.id_file + '"><span class="sm2_edit" onClick="manageFile( ' + data.id_file + ' );"></span>' + data.data_link + '</div>' );
|
||||
file_count++;
|
||||
}
|
||||
},
|
||||
url : '../resources/upload_files.php?article_id=<?= $this -> _article['id'];?>&hash=22292f4756dfed68e8397e356c28b32a',
|
||||
chunk_size : '1mb',
|
||||
unique_names : false,
|
||||
filters : [
|
||||
{title : "Wszystkie pliki", extensions : "*"}
|
||||
],
|
||||
flash_swf_url : '../resources/plupload/plupload.flash.swf'
|
||||
});
|
||||
});
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
function manageFile( id )
|
||||
{
|
||||
jQuery( '.plik_edycja, .plik_bg' ).show();
|
||||
jQuery( '#file_edit_id' ).val( id );
|
||||
jQuery( '#name' ).val( '' );
|
||||
xajax_articleFileInfo( id );
|
||||
}
|
||||
ckeditor = true;
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$( '#slider-code' ).tinycarousel({
|
||||
pager: true
|
||||
});
|
||||
|
||||
$( ".tabs a" ).click( function ()
|
||||
{
|
||||
$( ".tabs .active" ).removeClass( "active" );
|
||||
$( this ).addClass( "active" );
|
||||
$( ".tabs-content" ).addClass( 'nondisplay' );
|
||||
var content_show = $( this ).attr( "href" );
|
||||
$( '#' + content_show ).removeClass( 'nondisplay' );
|
||||
return false;
|
||||
});
|
||||
|
||||
$( '.toggle-pages' ).click( function() {
|
||||
if ( $( this ).hasClass( 'show' ) )
|
||||
{
|
||||
$( this ).removeClass( 'show' ).addClass( 'hide' );
|
||||
$( '.' + $( this ).attr( 'id' ) ).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$( this ).removeClass( 'hide' ).addClass( 'show' );
|
||||
$( '.' + $( this ).attr( 'id' ) ).hide();
|
||||
}
|
||||
})
|
||||
|
||||
$( '.select-page' ).click( function() {
|
||||
var id = $( this ).attr( 'idk' );
|
||||
|
||||
if ( $( '#page_' + id ).prop( 'checked' ) )
|
||||
$( '#page_' + id ).prop( "checked", false );
|
||||
else
|
||||
$( '#page_' + id ).prop( "checked", true );
|
||||
})
|
||||
|
||||
$( '.img_bg' ).click( function(){
|
||||
$( this ).hide();
|
||||
$( '.img_big' ).hide();
|
||||
})
|
||||
|
||||
$( '#image-list li' ).hover(
|
||||
function(){
|
||||
$( this ).children( 'div' ).css( { 'display' : 'block', 'margin-top' : '-26px' });
|
||||
},
|
||||
function(){
|
||||
$( this ).children( 'div' ).hide();
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
function saveArticle()
|
||||
{
|
||||
$.prompt( 'Trwa zapisywanie...' );
|
||||
var id = $("#idk").val();
|
||||
var enabled = $( ".enabled:checked" ).val();
|
||||
var comments_enabled = $( ".comments_enabled:checked" ).val();
|
||||
var print = $( ".print:checked" ).val();
|
||||
var show_title = $( ".show_title:checked" ).val();
|
||||
var show_date = $( ".show_date:checked" ).val();
|
||||
var show_author = $( '.show_author:checked' ).val();
|
||||
var keep_archive = $( '.keep_archive:checked' ).val();
|
||||
var replace_menu = $( '.replace_menu_title:checked' ).val();
|
||||
var layout = $( '#layout' ).val();
|
||||
var pages = '';
|
||||
$('input.art_pages:checked').each(
|
||||
function() {
|
||||
if ( pages != '' )
|
||||
pages = pages + ':';
|
||||
pages = pages + $(this).val();
|
||||
}
|
||||
);
|
||||
xajax_saveArticle( id, enabled, comments_enabled, print, show_title, show_date, pages, show_author, keep_archive, layout, replace_menu );
|
||||
}
|
||||
|
||||
function saveArticleTranslation( new_article )
|
||||
{
|
||||
var id = $("#idk").val();
|
||||
var title = new Object();
|
||||
var meta_o = new Object();
|
||||
var meta_d = new Object();
|
||||
var text = new Object();
|
||||
var seo_link = new Object();
|
||||
var keep_archive = $( '.keep_archive:checked' ).val();
|
||||
var version = $( '#version' ).val();
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $language )
|
||||
{
|
||||
echo 'title["' . $language['id'] . '"] = $("#title_' . $language['id'] . '").val();' . chr( 13 ) . chr( 10 );
|
||||
echo 'meta_o["' . $language['id'] . '"] = $("#meta_description_' . $language['id'] . '").val();' . chr( 13 ) . chr( 10 );
|
||||
echo 'meta_d["' . $language['id'] . '"] = $("#meta_keywords_' . $language['id'] . '").val();' . chr( 13 ) . chr( 10 );
|
||||
echo 'text["' . $language['id'] . '"] = $("#text_' . $language['id'] . '").val();' . chr( 13 ) . chr( 10 );
|
||||
echo 'seo_link["' . $language['id'] . '"] = $("#seo_link_' . $language['id'] . '").val();' . chr( 13 ) . chr( 10 );
|
||||
}
|
||||
?>
|
||||
var count = 0;
|
||||
for ( var klucz in title) count++;
|
||||
|
||||
var i = 0;
|
||||
for ( var klucz in title)
|
||||
{
|
||||
i++;
|
||||
message = false;
|
||||
if ( i == count )
|
||||
message = true;
|
||||
xajax_saveArticleTranslation( klucz , id , title[klucz] , meta_o[klucz] , meta_d[klucz] , text[klucz] , message , keep_archive , version, seo_link[klucz], new_article );
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.ui-widget-content {
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.ui-widget-header {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
.ui-widget {
|
||||
font-family: inherit !important;
|
||||
}
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
padding: 0px !important;
|
||||
}
|
||||
</style>
|
||||
82
admin/templates/articles/article-sort.php
Normal file
82
admin/templates/articles/article-sort.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<div class="edit-row">
|
||||
<? if ( is_array( $this -> _pages ) ):?>
|
||||
<? foreach ( $this -> _pages as $page ):?>
|
||||
<div class="menu_sortable">
|
||||
<ol class="sortable" id="sortable_<?= $page['id'];?>">
|
||||
<li id="list_<?= $page['id'];?>" class="page_<?= $page['id'];?>" page="<?= $page['id'];?>">
|
||||
<div class="content">
|
||||
<span class="disclose"><span></span></span>
|
||||
Strona: <b><?= $page['title'];?></b>
|
||||
</div>
|
||||
<? if ( is_array( $page['articles'] ) ):?>
|
||||
<ol>
|
||||
<? foreach ( $page['articles'] as $article ):?>
|
||||
<li id="list_<?= $article['id'];?>" idk="<?= $article['id'];?>" page="<?= $page['id'];?>">
|
||||
<div class="content content_article">
|
||||
<span class="disclose"><span></span></span>
|
||||
<?= $article['title'];?>
|
||||
</div>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ol>
|
||||
<? endif;?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<? endforeach;?>
|
||||
<? endif;?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var page_id = 0;
|
||||
|
||||
$( document ).ready( function() {
|
||||
$('ol.sortable').nestedSortable({
|
||||
forcePlaceholderSize: true,
|
||||
handle: 'div',
|
||||
helper: 'clone',
|
||||
items: 'li',
|
||||
opacity: .6,
|
||||
placeholder: 'placeholder',
|
||||
revert: 250,
|
||||
tabSize: 25,
|
||||
tolerance: 'pointer',
|
||||
toleranceElement: '> div',
|
||||
maxLevels: 2,
|
||||
isTree: true,
|
||||
expandOnHover: 700,
|
||||
saveArticlesOrder: true
|
||||
});
|
||||
|
||||
$('.disclose').on('click', function() {
|
||||
$(this).closest('li').toggleClass('mjs-nestedSortable-collapsed').toggleClass('mjs-nestedSortable-expanded');
|
||||
});
|
||||
|
||||
$( ".content_article" ).mousedown(function(e) {
|
||||
if (e.which === 3 || e.which == 1 ) {
|
||||
page_id = $( this ).parent( 'li' ).attr( 'page' );
|
||||
}
|
||||
});
|
||||
|
||||
$( '.disclose' ).mousedown(function(e) {
|
||||
if ( e.which === 1 ) {
|
||||
xajax_savePageCookie( $( this ).parent( 'div' ).parent( 'li' ).attr( 'page' ) );
|
||||
}
|
||||
});
|
||||
|
||||
<?
|
||||
$array = unserialize( $_COOKIE[ 'savePageCookie' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.page_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
?>
|
||||
});
|
||||
|
||||
function saveArticlesOrder( ) {
|
||||
arraied = $( '#sortable_' + page_id ).nestedSortable( 'toArray', { startDepthCount: 0 } );
|
||||
$.prompt( 'Trwa zapisywanie...', { title: 'Proszę czekać' } );
|
||||
xajax_saveArticlesOrder( arraied, page_id );
|
||||
}
|
||||
</script>
|
||||
78
admin/templates/articles/article-versions.php
Normal file
78
admin/templates/articles/article-versions.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<div class="browse">
|
||||
<table class='table_browse'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class='title' style='width:15px; text-align:center;'>Lp.</td>
|
||||
<td class='title'>Tytuł</td>
|
||||
<td class='title' style='text-align:center;'>Wersja</td>
|
||||
<td class='title' style="text-align: center;">Data modyfikacji</td>
|
||||
<td class='title' style='width:15px;'></td>
|
||||
<td class='title' style='width:15px;'></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
$i = ( $this -> _bs - 1 ) * $this -> _limit + 1;
|
||||
if ( is_array( $this -> _articles ) ) foreach ( $this -> _articles as $article ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class='cell' style='text-align:center;'><?=$i;?>.</td>
|
||||
<td class='cell'><?=$article['title'];?></td>
|
||||
<td class='cell' style='text-align:center;'><?=$article['version'];?></td>
|
||||
<td class="cell" style="text-align: center;"><?=$article['date_modify'];?></td>
|
||||
<td class='cell'>
|
||||
<a href='./?rw=show&id=<?=$article['id'];?>'>
|
||||
<span class='icon show'></span>
|
||||
</a>
|
||||
</td>
|
||||
<td class='cell'>
|
||||
<a onClick="confirmArticleRestor( '<?=$article['id'];?>')">Przywróć</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form method="POST" action="./" id="article_restore">
|
||||
<input type="hidden" name="rw" value="restore">
|
||||
<input type='hidden' name='<?=base64_encode("time");?>' value='<?=base64_encode(date("Y-m-d H:i:s"));?>'>
|
||||
<input type="hidden" name="id" id="article_id" value="">
|
||||
</form>
|
||||
<script type='text/javascript'>
|
||||
function mycallbackform(v,m,f){
|
||||
if( v == true )
|
||||
$( '#article_restore' ).submit();
|
||||
}
|
||||
function confirmArticleRestor( id ) {
|
||||
$( '#article_id' ).val( id );
|
||||
$.prompt( 'Na pewno chcesz przywrócić wybrany artykuł?',{ callback: mycallbackform, buttons: { tak: true, nie: false }, focus: 1 })
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
var cssObj = {
|
||||
'display' : 'block',
|
||||
'height' : '30px',
|
||||
'line-height' : '30px',
|
||||
'color' : '#000000',
|
||||
'font-size' : '10px',
|
||||
'text-transform' : 'uppercase'
|
||||
}
|
||||
$("li.context_menu").children("a").css( cssObj );
|
||||
var cssObj2 = {
|
||||
'float' : 'left',
|
||||
'margin' : '5px 5px 0 0',
|
||||
'color' : '#000000',
|
||||
'font-size' : '10px',
|
||||
'text-transform' : 'uppercase'
|
||||
}
|
||||
$("li.context_menu").children("a").children("span.edit").css( cssObj2 );
|
||||
$("li.context_menu").children("a").children("span.delete").css( cssObj2 );
|
||||
$("li.context_menu").children("a").children("span.show").css( cssObj2 );
|
||||
$("li.context_menu").children("a").children("div.down_main").css( cssObj2 );
|
||||
$("li.context_menu").children("a").children("div.up_main").css( cssObj2 );
|
||||
});
|
||||
</script>
|
||||
74
admin/templates/data/data-browse-filtr.php
Normal file
74
admin/templates/data/data-browse-filtr.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<div class="browse">
|
||||
<div class="filtr-container">
|
||||
<form method='POST' id='db_filtr_yes' action='./'>
|
||||
<input type='hidden' name='set_db_filtr' value='yes'>
|
||||
<?
|
||||
if ( is_array ( $this -> _filtr_combo ) ) foreach ( $this -> _filtr_combo as $combo )
|
||||
{
|
||||
?>
|
||||
<div class="group">
|
||||
<label><?=ucfirst( $combo['name'] );?>:</label>
|
||||
<div class="content">
|
||||
<select name="<?= $combo['seo_name'];?>">
|
||||
<option value=''> </option>
|
||||
<?
|
||||
if ( is_array ( $combo['value'] ) ) foreach ( $combo['value'] as $key => $val )
|
||||
{
|
||||
?>
|
||||
<option value='<?=$key;?>'
|
||||
<?
|
||||
if ( isset( $combo['val'] ) && $key == $combo['val'] )
|
||||
{
|
||||
?>selected='selected'<?
|
||||
}
|
||||
?>
|
||||
><?=$val;?></option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( is_array( $this -> _filtr_text ) ) foreach ( $this -> _filtr_text as $text )
|
||||
{
|
||||
?>
|
||||
<div class="group">
|
||||
<label><?=ucfirst( $text['name'] );?>:</label>
|
||||
<div class="content">
|
||||
<input type='text' name="<?=$text['seo_name'];?>" value="<? if ( isset( $text['value'] ) ) echo $text['value'];?>">
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( is_array( $this -> _filtr_ttext ) ) foreach ( $this -> _filtr_ttext as $text )
|
||||
{
|
||||
?>
|
||||
<div class="group">
|
||||
<label><?=ucfirst( $text['name'] );?>:</label>
|
||||
<div class="content">
|
||||
<input type='text' name="<?=$text['seo_name'];?>" value="<? if ( isset( $text['value'] ) ) echo $text['value'];?>">
|
||||
<?
|
||||
if ( is_array( $text['select'] ) ) foreach ( $text['select'] as $key => $val )
|
||||
{
|
||||
?><input type='hidden' name="<?=$text['seo_name'];?>_trans[]" value="<?=htmlspecialchars( $key );?>[]<?=htmlspecialchars( $val );?>"><?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<div class="filtr-buttons">
|
||||
<a class="button button_add" onClick='$("#db_filtr_yes").submit();'>Zastosuj</a>
|
||||
<a class='button button_cancel' onClick='$("#fdb_filtr_no").submit();'>Anuluj</a>
|
||||
</div>
|
||||
</form>
|
||||
<form method='POST' id='fdb_filtr_no'>
|
||||
<input type='hidden' name='set_db_filtr' value='no'>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
79
admin/templates/data/data-browse-paging.php
Normal file
79
admin/templates/data/data-browse-paging.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<script type='text/javascript'>
|
||||
function changePage(e)
|
||||
{
|
||||
var charCode;
|
||||
if(e && e.which)
|
||||
{
|
||||
charCode = e.which;
|
||||
}
|
||||
else if(window.event)
|
||||
{
|
||||
e = window.event;
|
||||
charCode = e.keyCode;
|
||||
}
|
||||
if(charCode == 13)
|
||||
{
|
||||
var bs = $("#page_bs").val();
|
||||
bs = parseInt(bs);
|
||||
if ( isNaN(bs) )
|
||||
bs = 1;
|
||||
document.location.href='<?=$this -> _link;?>?bs='+bs;
|
||||
}
|
||||
}
|
||||
function changeNumerRows()
|
||||
{
|
||||
var num = $("#rows").val();
|
||||
num = parseInt(num);
|
||||
if ( isNaN(num) )
|
||||
num = 1;
|
||||
document.location.href='./?r='+num;
|
||||
}
|
||||
</script>
|
||||
<div id='pagin'>
|
||||
<div id="info">
|
||||
Rekordy: <?=$this -> _start;?> - <?=$this -> _end;?> z <?=$this -> _total;?>
|
||||
</div>
|
||||
<div id="pagings">
|
||||
Liczba rekordów:
|
||||
<select name='rows' onChange='changeNumerRows();' id='rows' class="select">
|
||||
<option value='5' <? if ( $this -> _limit == 5 ) echo "selected='selected'";?>>5</option>
|
||||
<option value='10' <? if ( $this -> _limit == 10 ) echo "selected='selected'";?>>10</option>
|
||||
<option value='25' <? if ( $this -> _limit == 25 ) echo "selected='selected'";?>>25</option>
|
||||
<option value='50' <? if ( $this -> _limit == 50 ) echo "selected='selected'";?>>50</option>
|
||||
<option value='100' <? if ( $this -> _limit == 100 ) echo "selected='selected'";?>>100</option>
|
||||
</select>
|
||||
<?
|
||||
if ( $this -> _bs > 1 )
|
||||
{
|
||||
?>
|
||||
<a href='<?= $this -> _link;?>?bs=1' title="pierwsza" class='arrow'><i class="icon-left-max"></i></a>
|
||||
<a href='<?= $this -> _link;?>?bs=<?= ( $this -> _bs - 1 );?>' title="poprzednia" class='arrow'><i class="icon-left"></i></a>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a class='arrow inactive'><i class="icon-left-max"></i></a>
|
||||
<a class='arrow inactive'><i class="icon-left"></i></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<input type='text' value='<?= $this -> _bs;?>' class="input-text center" id='page_bs' onKeyPress='changePage(event)'>
|
||||
<?
|
||||
if ( $this -> _bs < $this -> _ls )
|
||||
{
|
||||
?>
|
||||
<a href='<?= $this -> _link;?>?bs=<?= ( $this -> _bs + 1 );?>' title="następna" class='arrow'><i class="icon-right"></i></a>
|
||||
<a href='<?= $this -> _link;?>?bs=<?= $this -> _ls;?>' title="ostatnia" class='arrow'><i class="icon-right-max"></i></a>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a class='arrow inactive'><i class="icon-right"></i></a>
|
||||
<a class='arrow inactive'><i class="icon-right-max"></i></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
134
admin/templates/data/data-browse.php
Normal file
134
admin/templates/data/data-browse.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?
|
||||
if ( isset( $this -> _filtr ) )
|
||||
include 'templates/data/data-browse-filtr.php';
|
||||
?>
|
||||
<?= $this -> _menu;?>
|
||||
<div class="browse">
|
||||
<form method="POST" action="./" id="sort_from">
|
||||
<input type="hidden" name="s" id="s" value="" />
|
||||
</form>
|
||||
<table class='table_browse' style='min-width:500px;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?
|
||||
if ( is_array( $this -> _table_headers ) ) foreach ( $this -> _table_headers as $key => $val )
|
||||
{
|
||||
if ( $i++ == 1 && $this -> _checkbox )
|
||||
echo '<th class="title" style="width: 20px;"></th>';
|
||||
?>
|
||||
<th class='title <? if ( $val['value'] == 'Lp.' ):?>center<? endif;?>' <? if ( !$val['value'] || $val['value'] == 'Raport' || $val['value'] == 'Lp.' || $val['value'] == 'Edytuj' || $val['value'] == 'Usuń' || $val['value'] == 'Pokaż' ) echo "style='width: 30px;'";?>
|
||||
<?
|
||||
if ( $val['sort'] )
|
||||
{
|
||||
?>
|
||||
style='cursor: pointer;'
|
||||
onClick="$( '#s' ).val( '<?=$val['sort'];?>' ); $( '#sort_from' ).submit();">
|
||||
<?
|
||||
echo ucfirst( $val['value'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
?>><?=ucfirst( $val['value'] );?><?
|
||||
}
|
||||
?>
|
||||
</th>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
<?
|
||||
if ( $this -> _row_count )
|
||||
{
|
||||
?>
|
||||
<tbody>
|
||||
<?
|
||||
$i = 0;
|
||||
foreach ( $this -> _table_values as $key => $val )
|
||||
{
|
||||
?>
|
||||
<ul class="contextMenu" id="context_menu_<?= $i;?>">
|
||||
<? if ( isset( $val[ 'edytuj' ] ) ):?>
|
||||
<li id="open" class="context_menu"><?= $val[ 'edytuj' ]['value'];?></li>
|
||||
<? endif;?>
|
||||
<? if ( isset( $val [ 'pokaż' ] ) ):?>
|
||||
<li id="show" class="context_menu"><?= $val[ 'pokaż' ]['value'];?></li>
|
||||
<? endif;?>
|
||||
<? if ( isset( $val[ 'usuń' ] ) ):?>
|
||||
<li id="delete" class="context_menu"><?= $val[ 'usuń' ]['value'];?></li>
|
||||
<? endif;?>
|
||||
</ul>
|
||||
<script type='text/javascript'>
|
||||
$( document ).ready( function() {
|
||||
$( '#tr_<?= $i;?>' ).contextMenu( { menu: "context_menu_<?= $i;?>" }, function( action ) {
|
||||
if ( action != '' )
|
||||
document.location.href='.' + action;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<tr id="tr_<?=$i;?>">
|
||||
<?
|
||||
foreach ( $val as $value )
|
||||
{
|
||||
?>
|
||||
<td class='cell' style='<?=$this -> eprint( $value['style'] );?>' <?= $value['js'];?>>
|
||||
<?
|
||||
if ( $value['value'] )
|
||||
echo stripslashes( $value['value'] );
|
||||
else
|
||||
echo '-';
|
||||
?>
|
||||
</td>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td colspan='<?=count( $this -> _table_headers );?>' style='text-align:center;'>
|
||||
<div style='text-align: center; padding: 10px 0;'>Nie znaleziono żadnych wpisów.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function(){
|
||||
$("li").children("a").children("span.edit").parent('a').append( 'edytuj' );
|
||||
$("li").children("a").children("span.delete").parent('a').append( 'usuń' );
|
||||
$("li").children("a").children("span.show").parent('a').append( 'pokaż' );
|
||||
var cssObj = {
|
||||
'display' : 'block',
|
||||
'height' : '30px',
|
||||
'line-height' : '31px',
|
||||
'color' : '#000000',
|
||||
'font-size' : '10px',
|
||||
'text-transform' : 'uppercase',
|
||||
'font-family': 'Duru Sans, sans-serif'
|
||||
};
|
||||
$("li.context_menu").children("a").css( cssObj );
|
||||
var cssObj2 = {
|
||||
'float' : 'left',
|
||||
'margin' : '7px 5px 0 0',
|
||||
'color' : '#000000',
|
||||
'font-size' : '10px',
|
||||
'text-transform' : 'uppercase'
|
||||
};
|
||||
$("li.context_menu").children("a").children("span.edit").css( cssObj2 );
|
||||
$("li.context_menu").children("a").children("span.delete").css( cssObj2 );
|
||||
$("li.context_menu").children("a").children("span.show").css( cssObj2 );
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<? include 'templates/data/data-browse-paging.php'; ?>
|
||||
167
admin/templates/data/data-edit.php
Normal file
167
admin/templates/data/data-edit.php
Normal file
@@ -0,0 +1,167 @@
|
||||
<?= $this -> _menu;?>
|
||||
<div class="browse">
|
||||
<div class="edit-row">
|
||||
<form method='POST' action='<?=$this -> _form_adress;?>' id='<?=$this -> _form_id;?>' enctype='multipart/form-data'>
|
||||
<?
|
||||
if ( is_array ( $this -> _hidden_tab ) ) foreach ( $this -> _hidden_tab as $hidden )
|
||||
{
|
||||
?><input type='hidden' name='<?=$hidden['name'];?>' value='<?=$this -> secureHTML( $hidden['value'] );?>'><?
|
||||
}
|
||||
if ( $this -> _form_key && $this -> _form_val )
|
||||
{
|
||||
?><input type='hidden' name='rw' value='db_edit_save'><?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<input type='hidden' name='rw' value='db_edit_add_new'>
|
||||
<input type='hidden' name='<?=base64_encode( 'time' );?>' value='<?=base64_encode( date( 'Y-m-d H:i:s' ) );?>'>
|
||||
<?
|
||||
}
|
||||
if ( is_array ( $this -> _hidden_param_tab ) ) foreach ( $this -> _hidden_param_tab as $hidden )
|
||||
{
|
||||
?><input type='hidden' name='<?=$hidden['name'];?>' value='<?=$this -> secureHTML( $hidden['value'] );?>'><?
|
||||
}
|
||||
?>
|
||||
<?
|
||||
if ( is_array( $this -> _table_edit_tab ) ) foreach ( $this -> _table_edit_tab as $tab )
|
||||
{
|
||||
?>
|
||||
<div class="group" id='div_<?=$tab['tr_id'];?>'>
|
||||
<label <? if ( $tab['input_title'] ) echo 'class="tip" title="' . htmlspecialchars( $tab['input_title'] ) . '"';?> ><?=ucfirst( $tab['name'] );?>:</label>
|
||||
<div class="content">
|
||||
<?
|
||||
if ( $tab['type'] == 'label' )
|
||||
{
|
||||
?>
|
||||
<input type='hidden' id='<?=$tab['input_id'];?>' name='<?=$tab['input_id'];?>' value='<?=$this -> secureHTML( $tab['input_value'] );?>' <?=$tab['input_action'];?>><?=$tab['input_value'];?>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( $tab['type'] == 'text' )
|
||||
{
|
||||
?>
|
||||
<input type='text' id='<?=$tab['input_id'];?>' value='<?=$this -> secureHTML( $tab['input_value'] );?>' <?=$tab['input_action'];?> name='<?=$tab['input_id'];?>'>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( $tab['type'] == 'textarea' )
|
||||
{
|
||||
?>
|
||||
<textarea name='<?=$tab['input_id'];?>' id='<?=$tab['input_id'];?>' cols='70' rows='5'><?=stripslashes($tab['input_value']);?></textarea>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( $tab['type'] == 'radio' )
|
||||
{
|
||||
foreach ( $tab['input_value'] as $key => $val )
|
||||
{
|
||||
?>
|
||||
<input type='radio' name='<?=$tab['input_name'];?>' id="<?=$tab['input_nam'] . '_' . $val;?>" value='<?=$key;?>'
|
||||
<?
|
||||
if ( $tab['var'] == $key )
|
||||
echo 'checked';
|
||||
?>
|
||||
><?=$val;?>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
if ( $tab['type'] == 'file' )
|
||||
{
|
||||
?>
|
||||
<input type='file' id='<?=$tab['input_id'];?>' name='<?=$tab['input_id'];?>'>
|
||||
<?
|
||||
if ( $tab['input_value'] )
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#imageshow').tooltip({
|
||||
showURL: false,
|
||||
opacity: 1,
|
||||
bodyHandler: function() {
|
||||
return $('<img/>').attr('src','../<?=$tab['input_value'];?>');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div style='display:inline; margin-left:40px; margin-top:3px;' id='imageshow'>zdjęcie</div>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
if ( $tab['type'] == 'combo' )
|
||||
{
|
||||
?>
|
||||
<select name='<?=$tab['input_name'];?>' <?=$tab['input_action'];?> id='<?=$tab['input_id'];?>'>
|
||||
<?
|
||||
foreach ( $tab['input_value'] as $key => $val )
|
||||
{
|
||||
?>
|
||||
<option value='<?=$key;?>'
|
||||
<?
|
||||
if ( isset( $tab['var'] ) && $tab['var'] == $key )
|
||||
{
|
||||
?>selected<?
|
||||
}
|
||||
?>><?=$val;?>
|
||||
</option><?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( isset( $this -> _password ) )
|
||||
{
|
||||
?>
|
||||
<div class="group">
|
||||
<label>Hasło:</label>
|
||||
<div class="input">
|
||||
<input type='password' name='<?=$this -> _pass_name1;?>' id='<?=$this -> _pass_name1;?>' <?=$this -> _pass_action;?>>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<label>Hasło - powtórz:</label>
|
||||
<div class="input">
|
||||
<input type='password' name='<?=$this -> _pass_name2;?>' id='<?=$this -> _pass_name2;?>' <?=$this -> _pass_action2;?>>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
<?
|
||||
if ( isset( $this -> _file_upload ) )
|
||||
{
|
||||
|
||||
if ( is_array( $this -> _upload_tab ) ) foreach ( $this -> _upload_tab as $uplaod )
|
||||
{
|
||||
?><input type='hidden' name='<?=$uplaod['name'];?>' value='<?=$uplaod['value'];?>'><?
|
||||
}
|
||||
}
|
||||
if ( isset( $this -> _cancel_button ) )
|
||||
{
|
||||
?>
|
||||
<a href='<?=$this -> _cancel_adress;?>
|
||||
<?
|
||||
if ( $this -> _cancel_key && $this -> _cancel_val )
|
||||
{
|
||||
?>?<?=$this -> _cancel_key;?>=<?=$this -> _cancel_val;?><?
|
||||
}
|
||||
?>
|
||||
' class='button'><?=$this -> _cancel_name;?></a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
53
admin/templates/other/banner.php
Normal file
53
admin/templates/other/banner.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<div class="browse">
|
||||
<table class='table_browse' style='margin:0;'>
|
||||
<tr>
|
||||
<th class='title' style='width:15px;'>Lp.</th>
|
||||
<th class='title'>Tytuł</th>
|
||||
<th class='title'>Link</th>
|
||||
<th class='title' style='width: 25px;'>Aktywny</th>
|
||||
<th class='title' style='width: 15px;'></th>
|
||||
<th class='title' style='width: 15px;'></th>
|
||||
<th class='title' style='width: 15px;'></th>
|
||||
<th class='title' style='width: 15px;'></th>
|
||||
</tr>
|
||||
<?
|
||||
$i = 0;
|
||||
if ( is_array ( $this -> _banners ) ) foreach ( $this -> _banners as $baner )
|
||||
{
|
||||
?>
|
||||
<tr class="menu<?=$i;?>">
|
||||
<td class='cell'><?= $baner['lp'];?>.</td>
|
||||
<td class='cell'><?= $baner['title'];?></td>
|
||||
<td class='cell'><? echo mb_substr( $baner['link'] , 0 , 50 ); if ( strlen( $baner['link'] ) > 50 ) echo '...';?></td>
|
||||
<td class='cell center'><?= $baner['enabled'];?></td>
|
||||
<td class='cell'>
|
||||
<?
|
||||
if ( $baner['down'] )
|
||||
{
|
||||
?><div class='icon down_main' onClick='document.location.href="index.php?rw=down&id=<?=$baner['id'];?>";'></div><?
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='cell' style='text-align:center;'>
|
||||
<?
|
||||
if ( $baner['up'] )
|
||||
{
|
||||
?><div class='icon up_main' onClick='document.location.href="index.php?rw=up&id=<?=$baner['id'];?>";'></div><?
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='cell' style='text-align:center;'>
|
||||
<a href='./?rw=edit&id=<?=$baner['id'];?>'><span class='icon edit' style='display:block;'></span></a>
|
||||
</td>
|
||||
<td class='cell'><a onclick="$.prompt( 'Na pewno chcesz usunąć wybrany element?', { title: 'Potwierdź?', submit: function(e,v,m,f) { if ( v == true ) document.location.href='./?rw=del&id=<?= $baner['id'];?>'; }, buttons: { 'tak': true, 'nie': false }, focus: 1 } )"><span class='icon delete' style='display:block;'></span></a></td>
|
||||
</tr>
|
||||
<?
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
?><tr><td colspan='8'><div class='alert' style='text-align:center;'>Brak wyników</div></td></tr><?
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
65
admin/templates/other/filemanager.php
Normal file
65
admin/templates/other/filemanager.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../resources/elfinder/css/elfinder.min.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../resources/elfinder/css/theme.css">
|
||||
<script type="text/javascript" src="../resources/elfinder/js/elfinder.min.js"></script>
|
||||
<script type="text/javascript" src="../resources/elfinder/js/i18n/elfinder_pl.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$().ready(function() {
|
||||
var elf = $('#elfinder').elfinder({
|
||||
url : '../resources/elfinder/php/connector.php?mode=file',
|
||||
lang: 'pl'
|
||||
}).elfinder('instance');
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
#elfinder {
|
||||
background: #EBEBEB;
|
||||
}
|
||||
.ui-widget-header {
|
||||
background: #FFF;
|
||||
}
|
||||
.elfinder-button {
|
||||
background: #FFF !important;
|
||||
}
|
||||
.elfinder-cwd, .elfinder .elfinder-navbar, .std42-dialog .ui-dialog-content, .elfinder-contextmenu .elfinder-contextmenu-item span {
|
||||
font-size: 12px;
|
||||
}
|
||||
.elfinder-contextmenu-item {
|
||||
background: #FFF;
|
||||
color: #000;
|
||||
}
|
||||
.std42-dialog .ui-dialog-buttonpane button {
|
||||
border: 1px solid #767676;
|
||||
color: #000 !important;
|
||||
}
|
||||
.elfinder-cwd-view-icons .elfinder-cwd-filename {
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, .elfinder-cwd table td.ui-state-hover, .elfinder-button-menu .ui-state-hover {
|
||||
background: #2c373d;
|
||||
}
|
||||
.elfinder-cwd-filename input[type="text"] {
|
||||
border: 0px !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
.ui-helper-clearfix:after {
|
||||
clear: none !important;
|
||||
height: 30px;
|
||||
}
|
||||
#elfinder {
|
||||
height: 750px !important;
|
||||
}
|
||||
.elfinder-cwd table tr:nth-child(2n+1) {
|
||||
background: #D3D3D3;
|
||||
}
|
||||
.elfinder-cwd table tr {
|
||||
border-top: 1px solid #CCC;
|
||||
}
|
||||
.elfinder-cwd table tr td {
|
||||
padding: 5px 12px !important;
|
||||
}
|
||||
.ui-corner-all {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<div id="elfinder"></div>
|
||||
33
admin/templates/other/layout-edit-pages.php
Normal file
33
admin/templates/other/layout-edit-pages.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
if ( is_array( $this -> _pages ) ) foreach ( $this -> _pages as $page )
|
||||
{
|
||||
if ( $page['id_menu'] != $_SESSION['id_menu'] )
|
||||
{
|
||||
$_SESSION['id_menu'] = $page['id_menu'];
|
||||
?>
|
||||
<div style="clear: both; background: #DDDDDF; padding: 5px 10px;">--- <?= \admin\factory\Menu::getMenuName( $page['id_menu'] );?> ---</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<div <? if ( $this -> _step > 0 ) echo "style='display: none;'";?> class="article_page article_page_<?= $this -> _step;?> <?= $page['parent_id'];?>" style="float: left; width: 280px;">
|
||||
<? if ( $this -> _step == 0 ) echo ' ';?>
|
||||
<input type='checkbox' name='pages[]' value='<?= $page['id'];?>' style='width: 15px; position: relative; top: 5px; float: left; margin-right: 5px;' id="page_<?= $page['id'];?>"
|
||||
<?
|
||||
if ( $page['check'] == 1 )
|
||||
echo 'checked="checked"';
|
||||
?>
|
||||
/>
|
||||
<a id="a_<?= $page['id'];?>" idk="<?= $page['id'];?>" class='select-page'>
|
||||
<?= $page['title'];?>
|
||||
</a>
|
||||
<?
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo '<i class="toggle-pages show" id="' . $page['id'] . '"></i>';
|
||||
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo \admin\view\Layouts::drawLayoutEditPages( $page['subpages'], $this -> _step + 1 );
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
136
admin/templates/other/layout-edit.php
Normal file
136
admin/templates/other/layout-edit.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<div class="edit-row">
|
||||
<form method='POST' action='./' id='formularz' enctype='multipart/form-data'>
|
||||
<input type='hidden' name='rw' value='<?= $this -> _rw;?>'>
|
||||
<? if ( $this -> _rw == 'save' ):?>
|
||||
<input type='hidden' id="idk" name='id' value='<?= $this -> _layout['id'];?>'>
|
||||
<? else:?>
|
||||
<input type='hidden' name='<?= base64_encode("time");?>' value='<?= base64_encode(date("Y-m-d H:i:s"));?>'>
|
||||
<? endif;?>
|
||||
<div id="slider-code">
|
||||
<ul class="pager">
|
||||
<li><a rel="0" class="pagenum" href="#"><span class="badge">1</span>Ustawienia podstawowe</a></li>
|
||||
<li><a rel="1" class="pagenum" href="#"><span class="badge">2</span>Wyświetlanie</a></li>
|
||||
<li><a rel="2" class="pagenum" href="#"><span class="badge">3</span>CSS</a></li>
|
||||
<li><a rel="3" class="pagenum" href="#"><span class="badge">4</span>Java Script</a></li>
|
||||
</ul>
|
||||
<a class="buttons prev tip" href="#" title="Wstecz">
|
||||
<img src="../../images/system/img-left.png" />
|
||||
</a>
|
||||
<div class="viewport">
|
||||
<ul class="overview">
|
||||
<li>
|
||||
<div class="slide-title">Ustawienia podstawowe</div>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<div class="group">
|
||||
<label>Nazwa:</label>
|
||||
<div class="content">
|
||||
<input type='text' id='name' name='name' value='<?= $this -> secureHTML( $this -> _layout['name'] );?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Domyślny:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="enabled" class="enabled" id="enabled_0" value='0' <? if ( !$this -> _layout['enabled'] ) echo 'checked="checked" '; ?>>
|
||||
nie
|
||||
<input type="radio" name="enabled" class="enabled" id="enabled_1" value='1' <? if ( $this -> _layout['enabled'] || $this -> _rw == 'add' ) echo 'checked="checked" '; ?>>
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>HTML:</label>
|
||||
<div class="content">
|
||||
<textarea name='html' class="text" id="html" cols="100" rows='50' style="width: 950px; height: 250px;"><?= $this -> secureHTML( $this -> _layout['html'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Wyświetlanie</div>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<div class="group" style="padding: 20px;">
|
||||
<?= \admin\view\Layouts::drawLayoutEditPages( $this -> _pages, 0 );?>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">CSS</div>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<div class="group">
|
||||
<label>CSS:</label>
|
||||
<div class="content">
|
||||
<textarea name='css' class="text" id="css" cols="100" rows='50' style="width: 950px; height: 250px;"><?= $this -> secureHTML( $this -> _layout['css'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Java Script</div>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<div class="group">
|
||||
<label>Java Script:</label>
|
||||
<div class="content">
|
||||
<textarea name='js' class="text" id="js" cols="100" rows='50' style="width: 950px; height: 250px;"><?= $this -> secureHTML( $this -> _layout['javascript'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function saveLayout()
|
||||
{
|
||||
var id = $("#idk").val();
|
||||
var name = $("#name").val();
|
||||
var enabled = $(".enabled:checked").val();
|
||||
var html = $("#html").val();
|
||||
var css = $("#css").val();
|
||||
var js = $("#js").val();
|
||||
var pages = '';
|
||||
$('input:checkbox:checked').each(
|
||||
function() {
|
||||
if ( pages != '' )
|
||||
pages = pages + ':';
|
||||
pages = pages + $(this).val();
|
||||
}
|
||||
);
|
||||
$.prompt( 'Trwa zapisywanie...' );
|
||||
xajax_saveLayout( id , name , enabled , html , css , js , pages );
|
||||
}
|
||||
|
||||
$( document ).ready( function() {
|
||||
|
||||
$( '.toggle-pages' ).click( function() {
|
||||
if ( $( this ).hasClass( 'show' ) )
|
||||
{
|
||||
$( this ).removeClass( 'show' ).addClass( 'hide' );
|
||||
$( '.' + $( this ).attr( 'id' ) ).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$( this ).removeClass( 'hide' ).addClass( 'show' );
|
||||
$( '.' + $( this ).attr( 'id' ) ).hide();
|
||||
}
|
||||
})
|
||||
|
||||
$( '.select-page' ).click( function() {
|
||||
var id = $( this ).attr( 'idk' );
|
||||
|
||||
if ( $( '#page_' + id ).prop( 'checked' ) )
|
||||
$( '#page_' + id ).prop( "checked", false );
|
||||
else
|
||||
$( '#page_' + id ).prop( "checked", true );
|
||||
})
|
||||
|
||||
$( '#slider-code' ).tinycarousel({
|
||||
pager: true
|
||||
});
|
||||
})
|
||||
</script>
|
||||
23
admin/templates/other/login-form.php
Normal file
23
admin/templates/other/login-form.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<div id="login-form">
|
||||
<div id="title">Logowanie:</div>
|
||||
<form method="POST" action="./" id="user-login">
|
||||
<input type="hidden" name="rw" value="user_logon" />
|
||||
<input type="hidden" name="p" value="page_articles" />
|
||||
<div>
|
||||
<input type="text" name="login" placeholder="login" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="password" placeholder="hasło" name="password" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="button" onClick="$( '#user-login' ).submit();">Zaloguj</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready( function() {
|
||||
$( '#user-login input' ).keyup( function(e){
|
||||
if ( e.which == 13 )
|
||||
$( '#user-login' ).submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
177
admin/templates/other/page-main.php
Normal file
177
admin/templates/other/page-main.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<? global $user; ?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Panel Administratora</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/jq_tooltip/tooltip.css">
|
||||
<link rel="Stylesheet" type="text/css" href="../resources/jquery-ui-1.10.3.custom/css/flick/jquery-ui-1.10.4.custom.css" />
|
||||
<link rel="Stylesheet" type="text/css" href="../resources/jq_impromptu/jquery-impromptu.css">
|
||||
<link rel="Stylesheet" type="text/css" href="../resources/jquery.contextMenu/jquery.contextMenu.css">
|
||||
<link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Duru+Sans&subset=latin,latin-ext'>
|
||||
<link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,200,200italic,300,300italic,400italic,600,600italic,700,700italic,900&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css">
|
||||
<script type="text/javascript" src="../resources/jquery-ui-1.10.3.custom/js/jquery-1.8.2.min.js"></script>
|
||||
<script type="text/javascript" src="../resources/jquery-ui-1.10.3.custom/js/jquery-ui-1.8.24.custom.min.js"></script>
|
||||
<script type="text/javascript" src="../resources/jlnav-master/jquery.jlnav.js"></script>
|
||||
<script type="text/javascript" src="../resources/jquery.contextMenu/jquery.contextMenu-custom.js"></script>
|
||||
<script type="text/javascript" src="../resources/ckeditor-4.0/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="../resources/ckeditor-4.0/adapters/jquery.js"></script>
|
||||
<script type="text/javascript" src="../resources/jq_impromptu/jquery-impromptu.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="../resources/jquery/jquery.ui.datepicker-pl.js"></script>
|
||||
<script type="text/javascript" src="../resources/jquery.mjs.nestedSortable.js"></script>
|
||||
<script type="text/javascript" src="../resources/jquery/jquery.tinycarousel.min.js"></script>
|
||||
<script type="text/javascript" src="../resources/jq_tooltip/tooltip.js"></script>
|
||||
<script type="text/javascript" src="../resources/javascript.js"></script>
|
||||
<script type="text/javascript">
|
||||
String.prototype.escapeDiacritics = function()
|
||||
{
|
||||
return this.replace(/ą/g, 'a').replace(/Ą/g, 'A')
|
||||
.replace(/ć/g, 'c').replace(/Ć/g, 'C')
|
||||
.replace(/ę/g, 'e').replace(/Ę/g, 'E')
|
||||
.replace(/ł/g, 'l').replace(/Ł/g, 'L')
|
||||
.replace(/ń/g, 'n').replace(/Ń/g, 'N')
|
||||
.replace(/ó/g, 'o').replace(/Ó/g, 'O')
|
||||
.replace(/ś/g, 's').replace(/Ś/g, 'S')
|
||||
.replace(/ż/g, 'z').replace(/Ż/g, 'Z')
|
||||
.replace(/ź/g, 'z').replace(/Ź/g, 'Z');
|
||||
}
|
||||
|
||||
function urlTitleChars(text) {
|
||||
var characters = ['"', "'"];
|
||||
|
||||
for (var i = 0; i < characters.length; i++) {
|
||||
var char = String(characters[i]);
|
||||
text = text.replace(new RegExp("\\" + char, "g"), '');
|
||||
}
|
||||
text = text.toLowerCase();
|
||||
text = text.escapeDiacritics();
|
||||
return text;
|
||||
}
|
||||
|
||||
function urlTitle(text) {
|
||||
var characters = [' ', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '+', '=', '_', '{', '}', '[', ']', '|', '/', '<', '>', ',', '.', '?', '--'];
|
||||
|
||||
for (var i = 0; i < characters.length; i++) {
|
||||
var char = String(characters[i]);
|
||||
text = text.replace(new RegExp("\\" + char, "g"), '-');
|
||||
}
|
||||
text = text.toLowerCase();
|
||||
text = text.escapeDiacritics();
|
||||
return text;
|
||||
}
|
||||
</script>
|
||||
<? if ( $user && $user -> _values['admin'] ):?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$( "#main-manu-container" ).jlnav();
|
||||
});
|
||||
</script>
|
||||
<?
|
||||
global $xajax;
|
||||
$xajax -> printJavascript( '../resources/xajax/' );
|
||||
?>
|
||||
<? endif;?>
|
||||
</head>
|
||||
<body>
|
||||
<div id='page-header'>
|
||||
<a href='./' id="logo">proCMS</a>
|
||||
<? if ( $user ):?>
|
||||
<a id="logout" href="./?rw=user_logout">wyloguj</a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? if ( $user && $user -> _values['admin'] ):?>
|
||||
<div id="main-manu-container">
|
||||
<ul id="main-menu">
|
||||
<li>
|
||||
<a href="./?p=page_articles">Zawartość</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./?p=page_definition">lista stron</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=page_articles">lista artykułów</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=page_article_sort">sortowanie artykułów</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=article_archive">archiwum artykułów</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=static_containers">zawartość statyczna</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=filemanager">Pozostałe</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./?p=filemanager">manager plików</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=guest_book">księga gości</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=banner">banery</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=adverts">reklama</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=banned_email">zakazane emaile</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=banned_login">zakazane loginy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=newsletter_emails">newsletter - emaile</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=settings">Konfiguracja</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="./?p=users">użytkownicy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=admins">administratorzy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=lang">języki</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=translation">tłumaczenia</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=settings">ustawienia</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?p=layout">szablony</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/" target="_blank" id="nav-look">Podgląd</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div id="page-main">
|
||||
<?
|
||||
if ( $this -> _alert )
|
||||
{
|
||||
\System::deleteSessionVar( 'alert' );
|
||||
?>
|
||||
<div id="alert" class="alert">
|
||||
<?= $this -> _alert;?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
echo $this -> _content;
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
41
admin/templates/other/page-panel.php
Normal file
41
admin/templates/other/page-panel.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?
|
||||
if ( $this -> _back || $this -> _save || $this -> _save_ajax || $this -> _cancel || $this -> _add || $this -> _update || $this -> _delete_ajax )
|
||||
{
|
||||
?>
|
||||
<div class="action-icons">
|
||||
<? if ( $this -> _back ):?>
|
||||
<a class="button button_cancel" href="./?act=back">Wstecz</a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _save ):?>
|
||||
<a class="button button_add" href="#" onclick='$( "#<?= $this -> _id_form;?>" ).submit(); return false;'>
|
||||
<?= $this -> _save === true ? $tmp = 'Zatwierdź' : $tmp = $this -> _save;?>
|
||||
</a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _save_ajax ):?>
|
||||
<a class='button' onClick='<?= $this -> _save_ajax;?>'>Zastosuj</a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _cancel ):?>
|
||||
<a href="./" class="button button_cancel">Anuluj</a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _add ):?>
|
||||
<a href="./?rw=add" class="button button_add"><?= $this -> _add === true ? $tmp = 'Dodaj' : $tmp = $this -> _add;?></a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _update ):?>
|
||||
<a class='button' href="./?rw=update">Aktualizuj</a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _checkbox ):?>
|
||||
<a class='button button_delete' onClick='<?= $this -> _checkbox['action'];?>'><?= $this -> _checkbox['name'];?></a>
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> _delete_ajax ):?>
|
||||
<a class='button button_delete' onClick="<?= $this -> _delete_ajax;?>">Usuń wybrane</a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
168
admin/templates/other/settings.php
Normal file
168
admin/templates/other/settings.php
Normal file
@@ -0,0 +1,168 @@
|
||||
<script type="text/javascript">
|
||||
jQuery(function() {
|
||||
$( '#slider-code' ).tinycarousel({
|
||||
pager: true
|
||||
});
|
||||
$( '#info' ).ckeditor( {
|
||||
toolbar : 'Basic',
|
||||
height:'150',
|
||||
width: '520'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="edit-row">
|
||||
<form method='POST' action='./' id='formularz'>
|
||||
<input type='hidden' name='rw' value='save_settings'>
|
||||
<div id="slider-code">
|
||||
<ul class="pager">
|
||||
<li><a rel="0" class="pagenum" href="#"><span class="badge">1</span>Dane teleadresowe</a></li>
|
||||
<li><a rel="1" class="pagenum" href="#"><span class="badge">2</span>Poczta</a></li>
|
||||
<li><a rel="2" class="pagenum" href="#"><span class="badge">3</span>Pozostałe</a></li>
|
||||
</ul>
|
||||
<a class="buttons prev tip" href="#" title="Wstecz">
|
||||
<img src="../../images/system/img-left.png" />
|
||||
</a>
|
||||
<div class="viewport">
|
||||
<ul class="overview">
|
||||
<li>
|
||||
<div class="slide-title">Dane teleadresowe</div>
|
||||
<div class="group">
|
||||
<label>Nazwa firmy:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='firm_name' value='<?= $this -> _firm_name;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Ulica:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='street' value='<?= $this -> _street;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Kod pocztowy:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='postal_code' value='<?= $this -> _postal_code;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Miasto:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='city' value='<?= $this -> _city;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>NIP:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='nip' value='<?= $this -> _nip;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Numer rachunku:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='account' value='<?= $this -> _account;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Email:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='email' value='<?= $this -> _email;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Telefon:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='phone' value='<?= $this -> _phone;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Fax:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='fax' value='<?= $this -> _fax;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Osoba do kontaktu:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='person' value='<?= $this -> _person;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Dodatkowe informacje:</label>
|
||||
<div class="content">
|
||||
<textarea name="info" id="info"><?= $this -> _info;?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Formularz kontaktowy:</label>
|
||||
<div class="content">
|
||||
<select name='contact_form'>
|
||||
<option value='1' <? if ( $this -> _contact_form == 1 ) echo "selected='selected'";?>>włączony</option>
|
||||
<option value='0' <? if ( $this -> _contact_form == 0 ) echo "selected='selected'";?>>wyłączony</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Poczta</div>
|
||||
<div class="group">
|
||||
<label>Email administratora:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='admin_email' value='<?= $this -> _admin_email;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Email - host:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='email_host' value='<?= $this -> _email_host;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Email - port:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='email_port' value='<?= $this -> _email_port;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Email - login:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='email_login' value='<?= $this -> _email_login;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Email - hasło:</label>
|
||||
<div class="content">
|
||||
<input type='password' name='email_password' value='<?= $this -> _email_password;?>'>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Pozostałe</div>
|
||||
<div class="group">
|
||||
<label>Klucz Google Maps:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='google_map_key' value='<?= $this -> _google_map_key;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Facebook - link:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='facebook_url' value='<?= $this -> _facebook_url;?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Rejestracja:</label>
|
||||
<div class="content">
|
||||
<select name="register">
|
||||
<option value="0" <? if ( $this -> _register == 0 ) echo 'selected="selected"'; ?>>rejestracja zamknięta</option>
|
||||
<option value="1" <? if ( $this -> _register == 1 ) echo 'selected="selected"'; ?>>aktywacja konta przez administratora</option>
|
||||
<option value="2" <? if ( $this -> _register == 2 ) echo 'selected="selected"'; ?>>aktywacja przez email</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
42
admin/templates/pages/page-articles-list.php
Normal file
42
admin/templates/pages/page-articles-list.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="browse">
|
||||
<?
|
||||
if ( is_array( $this -> _articles ) )
|
||||
{
|
||||
?>
|
||||
<table class='table_browse'>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class='title' style='width: 15px; text-align:center;'>Lp.</td>
|
||||
<td class='title'>Tytuł</td>
|
||||
<td class='title' style="text-align: center; width: 150px;">Data modyfikacji</td>
|
||||
<td class='title' style='width: 15px;'></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
foreach ( $this -> _articles as $article )
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class='cell' style='text-align:center;'><?= ++$i;?>.</td>
|
||||
<td class='cell'><?= $article -> _values['title'];?></td>
|
||||
<td class="cell" style="text-align: center;">
|
||||
<?= date( 'Y-m-d H:i', strtotime( $article -> _values['date_modify'] ) );?>
|
||||
</td>
|
||||
<td class='cell'>
|
||||
<a href="./?page_type=page_articles&rw=edit&id=<?= $article -> _values['id'];?>">
|
||||
<span class='icon edit'></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
else
|
||||
echo '<div id="alert" class="alert" style="margin: 0px; width: 100%; border: 0px; text-align: center;">Brak przypisanych artykułów.</div>';
|
||||
?>
|
||||
</div>
|
||||
148
admin/templates/pages/page-definition.php
Normal file
148
admin/templates/pages/page-definition.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<ul id="myMenu-page" class="contextMenu">
|
||||
<li class="edit"><a href="#add_subpage">Dodaj podstronę</a></li>
|
||||
<li class="edit"><a href="#edit">Edytuj stronę</a></li>
|
||||
<li class="delete"><a href="#delete">Usuń stronę</a></li>
|
||||
<li class="edit"><a href="#show_articles">Pokaż artykuły</a></li>
|
||||
<li class="quit separator"><a href="#cancel">Anuluj</a></li>
|
||||
</ul>
|
||||
|
||||
<ul id="myMenu-menu" class="contextMenu">
|
||||
<li class="edit"><a href="#edit_menu">Edytuj menu</a></li>
|
||||
<li class="edit"><a href="#delete_menu">Usuń menu</a></li>
|
||||
<li class="edit"><a href="#add_page">Dodaj stronę</a></li>
|
||||
<li class="quit separator"><a href="#cancel">Anuluj</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="action-icons">
|
||||
<a class="button button_add" href="./?rw=add_menu">Dodaj menu</a>
|
||||
</div>
|
||||
|
||||
<div class="edit-row">
|
||||
<? if ( is_array( $this -> _menu ) ):?>
|
||||
<? foreach ( $this -> _menu as $menu ):?>
|
||||
<div class="menu_sortable">
|
||||
<ol class="sortable" id="sortable_<?= $menu['id'];?>">
|
||||
<li id="list_<?= $menu['id'];?>" class="menu_<?= $menu['id'];?>" menu="<?= $menu['id'];?>">
|
||||
<div class="context_0 content content_menu" <? if ( !$menu['enabled'] ) echo 'style="color: #cc0000;"';?>>
|
||||
<span class="disclose"><span></span></span>
|
||||
Menu: <b><?= $menu['name'];?></b>
|
||||
</div>
|
||||
<?= \admin\view\Pages::drawSubpages( \admin\factory\Pages::getPages( $menu['id'] ) );?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<? endforeach;?>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var parent_id = 0;
|
||||
var menu_id = 0;
|
||||
|
||||
$( document ).ready( function() {
|
||||
$('ol.sortable').nestedSortable({
|
||||
forcePlaceholderSize: true,
|
||||
handle: 'div',
|
||||
helper: 'clone',
|
||||
items: 'li',
|
||||
opacity: .6,
|
||||
placeholder: 'placeholder',
|
||||
revert: 250,
|
||||
tabSize: 25,
|
||||
tolerance: 'pointer',
|
||||
toleranceElement: '> div',
|
||||
maxLevels: 3,
|
||||
isTree: true,
|
||||
expandOnHover: 700,
|
||||
saveAfterDrag: true
|
||||
});
|
||||
|
||||
$('.disclose').on('click', function() {
|
||||
$(this).closest('li').toggleClass('mjs-nestedSortable-collapsed').toggleClass('mjs-nestedSortable-expanded');
|
||||
});
|
||||
|
||||
$( ".content_page, .content_menu" ).mousedown(function(e) {
|
||||
if (e.which === 3 || e.which == 1 ) {
|
||||
parent_id = $( this ).parent( 'li' ).attr( 'idk' );
|
||||
menu_id = $( this ).parent( 'li' ).attr( 'menu' );
|
||||
}
|
||||
});
|
||||
|
||||
$( '.context_0' ).contextMenu( { menu: "myMenu-menu" }, function( action ) {
|
||||
switch( action ) {
|
||||
case 'add_page':
|
||||
document.location.href='./?rw=add&parent_id=0&menu_id=' + menu_id;
|
||||
break;
|
||||
case 'edit_menu':
|
||||
document.location.href='./?rw=edit_menu&id=' + menu_id;
|
||||
break;
|
||||
case 'delete_menu':
|
||||
$.prompt( "Na pewno chcesz usunąć wybrane menu?", {
|
||||
title: "Potwierdź?",
|
||||
buttons: { "Tak": true, "Nie": false },
|
||||
submit: function(e,v,m,f){
|
||||
if ( v == true )
|
||||
document.location.href='./?rw=del_menu&id=' + menu_id;
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'cancel': break;
|
||||
}
|
||||
});
|
||||
|
||||
$( '.content_page' ).contextMenu( { menu: "myMenu-page" }, function( action ) {
|
||||
switch( action ) {
|
||||
case 'add_subpage':
|
||||
document.location.href='./?rw=add&parent_id=' + parent_id + '&menu_id=' + menu_id;
|
||||
break;
|
||||
case 'edit':
|
||||
document.location.href='./?rw=edit&id=' + parent_id + '&menu_id=' + menu_id;
|
||||
break;
|
||||
case 'show_articles':
|
||||
document.location.href='./?rw=article_list&id=' + parent_id;
|
||||
break;
|
||||
case 'delete':
|
||||
$.prompt( "Na pewno chcesz usunąć wybraną stronę?", {
|
||||
title: "Potwierdź?",
|
||||
buttons: { "Tak": true, "Nie": false },
|
||||
submit: function(e,v,m,f){
|
||||
if ( v == true )
|
||||
document.location.href='./?rw=del&id=' + parent_id;
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'cancel': break;
|
||||
}
|
||||
});
|
||||
|
||||
$( '.disclose' ).mousedown(function(e) {
|
||||
if ( e.which === 1 ) {
|
||||
if ( $( this ).parent( 'div' ).hasClass( 'content_menu' ) )
|
||||
xajax_saveMenuCookie( $( this ).parent( 'div' ).parent( 'li' ).attr( 'menu' ) );
|
||||
else
|
||||
xajax_savePagesCookie( $( this ).parent( 'div' ).parent( 'li' ).attr( 'id' ) );
|
||||
}
|
||||
});
|
||||
|
||||
<?
|
||||
$array = unserialize( $_COOKIE[ 'pages_definition' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
|
||||
$array = unserialize( $_COOKIE[ 'menu_definition' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.menu_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
?>
|
||||
});
|
||||
|
||||
function saveChanges( ) {
|
||||
arraied = $( '#sortable_' + menu_id ).nestedSortable( 'toArray', { startDepthCount: 0 } );
|
||||
$.prompt( 'Trwa zapisywanie...', { title: 'Proszę czekać' } );
|
||||
xajax_savePageOrder( arraied, menu_id );
|
||||
}
|
||||
</script>
|
||||
286
admin/templates/pages/page-edit.php
Normal file
286
admin/templates/pages/page-edit.php
Normal file
@@ -0,0 +1,286 @@
|
||||
<style type="text/css">
|
||||
.ui-widget-content {
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.ui-widget-header {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
.ui-widget {
|
||||
font-family: inherit !important;
|
||||
}
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.ui-tooltip {
|
||||
background: #FFF;
|
||||
border-radius: 0;
|
||||
border: 1px solid #D1D4D7 !important;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
color: #656565;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$( '#slider-code' ).tinycarousel({
|
||||
pager: true
|
||||
});
|
||||
|
||||
$( ".tabs a" ).click( function ()
|
||||
{
|
||||
$( ".tabs .active" ).removeClass( "active" );
|
||||
$( this ).addClass( "active" );
|
||||
$( ".tabs-content" ).addClass( 'nondisplay' );
|
||||
var content_show = $( this ).attr( "href" );
|
||||
$( '#' + content_show ).removeClass( 'nondisplay' );
|
||||
return false;
|
||||
});
|
||||
|
||||
<? if ( $this -> _rw == 'add' ):?>
|
||||
$( "#id_page_type" ).val( '2' );
|
||||
<? endif;?>
|
||||
changePageType();
|
||||
});
|
||||
|
||||
function changePageType()
|
||||
{
|
||||
var type = $("#id_page_type").val();
|
||||
if ( type == 5 || type == 6 || type == 7 || type == 8 || type == 9 || type == 10 || type == 11 )
|
||||
{
|
||||
$( '#div_article_number, #div_sort_type' ).hide();
|
||||
if ( type == 8 )
|
||||
{
|
||||
$( '#div_show_title' ).hide();
|
||||
$( '#div_link' ).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#div_link' ).hide();
|
||||
$( '#div_show_title' ).show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#div_article_number, #div_sort_type' ).show();
|
||||
$( '#div_link' ).hide();
|
||||
$( '#div_show_title' ).show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="edit-row">
|
||||
<form method='POST' id='formularz' action='./'>
|
||||
<? if ( $this -> _rw == 'edit' ):?>
|
||||
<input type='hidden' name='rw' value='save' />
|
||||
<input type='hidden' name='id' value='<?= $this -> _page['id'];?>' />
|
||||
<? else:?>
|
||||
<input type='hidden' name='rw' value='add_new' />
|
||||
<input type='hidden' name='check' value='<?= time();?>' />
|
||||
<? endif;?>
|
||||
<input type='hidden' name='o' value='<?= $this -> _order;?>' />
|
||||
<input type='hidden' name='menu_id' value='<?= $this -> _menu_id;?>' />
|
||||
<div id="slider-code">
|
||||
<ul class="pager">
|
||||
<li><a rel="0" class="pagenum" href="#"><span class="badge">1</span>Ustawienia podstawowe</a></li>
|
||||
<li><a rel="1" class="pagenum" href="#"><span class="badge">2</span>Ustawienia zaawansowane</a></li>
|
||||
</ul>
|
||||
<a class="buttons prev tip" href="#" title="Wstecz">
|
||||
<img src="../../images/system/img-left.png" />
|
||||
</a>
|
||||
<div class="viewport">
|
||||
<ul class="overview">
|
||||
<li>
|
||||
<div class="slide-title">Ustawienia podstawowe</div>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<ul class="tabs">
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $lg )
|
||||
{
|
||||
?>
|
||||
<li class="tab-li">
|
||||
<a href="lang_<?=$lg['id'];?>" class="li-tabs <? if ( !$j++ ) echo 'active';?>"><?= $lg['name'];?></a>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?
|
||||
if ( is_array( $this -> _language ) ) foreach ( $this -> _language as $lg )
|
||||
{
|
||||
?>
|
||||
<div id="lang_<?= $lg['id'];?>" class="tabs-content <? if ( $i++ ) echo 'nondisplay';?>">
|
||||
<div class="group">
|
||||
<label>Tytuł:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='title_<?= $lg['id'];?>' id='title_<?= $lg['id'];?>' value='<?= $this -> secureHTML( $lg['title'] );?>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Link SEO:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='seo_link_<?= $lg['id'];?>' id='seo_link_<?= $lg['id'];?>' value='<?= $this -> secureHTML( $lg['seo_link'] );?>' />
|
||||
<a href="#" onclick="xajax_generateSeoLink( '<?= $lg['id'];?>', $( '#title_<?= $lg['id'];?>' ).val() )">
|
||||
<i class="icon refresh" style="position: relative; top: 3px; margin: 0;"></i>
|
||||
generuj
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Meta title:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='meta_title_<?= $lg['id'];?>' id='title_<?= $lg['id'];?>' value='<?= $this -> secureHTML( $lg['meta_title'] );?>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Meta description:</label>
|
||||
<div class="content">
|
||||
<textarea name='meta_description_<?= $lg['id'];?>' cols='60' rows='5'><?= $this -> secureHTML( $lg['meta_description'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Meta keywords:</label>
|
||||
<div class="content">
|
||||
<textarea name='meta_keywords_<?= $lg['id'];?>' cols='60' rows='5'><?= $this -> secureHTML( $lg['meta_keywords'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="slide-title">Ustawienia zaawansowane</div>
|
||||
<div class="tabs-container">
|
||||
<div class="group">
|
||||
<label>Menu:</label>
|
||||
<div class="content">
|
||||
<select name='menu_id' id='menu_id'>
|
||||
<? if ( is_array( $this -> _menu ) ):?>
|
||||
<? foreach ( $this -> _menu as $menu ):?>
|
||||
<option value="<?= $menu['id'];?>" <? if ( $menu['id'] == $this -> _page['id_menu'] ):?>selected="selected"<? endif;?>><?= $menu['name'];?></option>
|
||||
<? endforeach;?>
|
||||
<? endif;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Strona nadrzędna:</label>
|
||||
<div class="content">
|
||||
<select name='parent_id' id='parent_id'>
|
||||
<option value="0">---- pozycja główna ----</option>
|
||||
<?
|
||||
echo \admin\view\Pages::drawSubpagesEdit( $this -> _pages, $this -> _parent_id, $this -> _step, $this -> _id );
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Typ strony:</label>
|
||||
<div class="content">
|
||||
<select name='page_type_id' id='id_page_type' onChange='changePageType()'>
|
||||
<?
|
||||
if ( is_array ( $this -> _page_types ) ) foreach ( $this -> _page_types as $page_type )
|
||||
{
|
||||
?>
|
||||
<option value='<?=$page_type['id'];?>' <? if ( $this -> _page['id_page_type'] == $page_type['id'] ) echo "selected='selected'"; ?>>
|
||||
<?= $page_type['name'];?>
|
||||
</option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group" id="div_sort_type">
|
||||
<label>Kolejność wyświetlania:</label>
|
||||
<div class="content">
|
||||
<select name='sort_type'>
|
||||
<?
|
||||
if ( is_array( $this -> _sort ) ) foreach ( $this -> _sort as $sort )
|
||||
{
|
||||
?>
|
||||
<option value='<?=$sort['id'];?>' <? if ( $this -> _page['id_sort_type'] == $sort['id'] ) echo "selected='selected'";?>>
|
||||
<?= $sort['name'];?>
|
||||
</option>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Szablon</label>
|
||||
<div class="content">
|
||||
<select name="layout_id">
|
||||
<option value="">---- szablon domyślny ----</option>
|
||||
<? if ( is_array( $this -> _layouts ) ): foreach ( $this -> _layouts as $layout ):?>
|
||||
<option value="<?= $layout['id'];?>" <? if ( $this -> _layout_id == $layout['id'] ):?>selected="selected"<? endif;?>><?= $layout['name'];?></option>
|
||||
<? endforeach; endif;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group" id="div_article_number">
|
||||
<label>Liczba artykułów:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='article_number' value='<?= $this -> _page['article_number'] ? $tmp = $this -> _page['article_number'] : $tmp = '2';?>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group" id="div_show_title">
|
||||
<label>Pokaż tytuł:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name='show_title' id="show_title_0" value="0" <? if ( !$this -> _page['show_title'] ) echo "checked='checked'";?> />
|
||||
nie
|
||||
<input type="radio" name="show_title" value="1" <? if ( $this -> _page['show_title'] || $this -> _rw == 'add' ) echo "checked='checked'";?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Aktywna:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="enabled" id="enabled_0" value="0" <? if ( !$this -> _page['enabled'] ) echo "checked='checked'";?> />
|
||||
nie
|
||||
<input type="radio" name="enabled" id="enabled_1" value='1' <? if ( $this -> _page['enabled'] || $this -> _rw == 'add' ) echo "checked='checked'";?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Tylko dla zalogowanych:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="only_for_logged" id="only_for_logged_0" value="0" <? if ( !$this -> _page['only_for_logged'] ) echo "checked='checked'";?> />
|
||||
nie
|
||||
<input type="radio" name="only_for_logged" id="only_for_logged_1" value='1' <? if ( $this -> _page['only_for_logged'] ) echo "checked='checked'";?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Podłącz formularz kontaktowy:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="contact_form" id="contact_form_0" value="0" <? if ( !$this -> _page['contact_form'] ) echo "checked='checked'";?> />
|
||||
nie
|
||||
<input type="radio" name="contact_form" id="contact_form_1" value='1' <? if ( $this -> _page['contact_form'] ) echo "checked='checked'";?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<div class="group" id="div_link" style="display: none;">
|
||||
<label>Link:</label>
|
||||
<div class="content">
|
||||
<input type="text" name="link" value="<?= $this -> _page['link'];?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="buttons next tip" href="#" title="Dalej">
|
||||
<img src="../../images/system/img-right.png" />
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
15
admin/templates/pages/page-subpages-edit.php
Normal file
15
admin/templates/pages/page-subpages-edit.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
if ( is_array ( $this -> _pages ) ) foreach ( $this -> _pages as $page )
|
||||
{
|
||||
if ( $this -> _this_id !== $page['id'] )
|
||||
{
|
||||
?>
|
||||
<option value='<?=$page['id'];?>' <? if ( $this -> _parent_id == $page['id'] ) echo "selected='selected'"; ?>>
|
||||
<? for ( $i = 0; $i < 3 * $this -> _step; $i++ ) echo ' '; echo $page['title'];?>
|
||||
</option>
|
||||
<?
|
||||
}
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo \admin\view\Pages::drawSubpagesEdit( $page['subpages'], $this -> _parent_id, $this -> _step + 1, $this -> _this_id );
|
||||
}
|
||||
?>
|
||||
16
admin/templates/pages/page-subpages.php
Normal file
16
admin/templates/pages/page-subpages.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<? if ( is_array( $this -> _pages ) ):?>
|
||||
<ol>
|
||||
<? foreach ( $this -> _pages as $page ):?>
|
||||
<li id="list_<?= $page['id'];?>" idk="<?= $page['id'];?>" class="list_<?= $page['id'];?>" menu="<?= $page['id_menu'];?>">
|
||||
<div class="content content_page" <? if ( !$page['enabled'] ) echo 'style="color: #cc0000;"';?>>
|
||||
<span class="disclose"><span></span></span>
|
||||
<?= $page['title'];?>
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo \admin\view\Pages::drawSubpages( $page['subpages'], $page['id'] );
|
||||
?>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ol>
|
||||
<? endif;?>
|
||||
140
admin/templates/scontainers/edit-container.php
Normal file
140
admin/templates/scontainers/edit-container.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<style type="text/css">
|
||||
.ui-widget-content {
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.ui-widget-header {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
}
|
||||
.ui-widget {
|
||||
font-family: inherit !important;
|
||||
}
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.ui-tooltip {
|
||||
background: #FFF;
|
||||
border-radius: 0;
|
||||
border: 1px solid #D1D4D7 !important;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
color: #656565;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$( '#slider-code' ).tinycarousel({
|
||||
pager: true
|
||||
});
|
||||
|
||||
$( ".tabs a" ).click( function ()
|
||||
{
|
||||
$( ".tabs .active" ).removeClass( "active" );
|
||||
$( this ).addClass( "active" );
|
||||
$( ".tabs-content" ).addClass( 'nondisplay' );
|
||||
var content_show = $( this ).attr( "href" );
|
||||
$( '#' + content_show ).removeClass( 'nondisplay' );
|
||||
return false;
|
||||
});
|
||||
|
||||
<? if ( $this -> _rw == 'add' ):?>
|
||||
$( "#id_page_type" ).val( '2' );
|
||||
<? endif;?>
|
||||
changePageType();
|
||||
});
|
||||
|
||||
function changePageType()
|
||||
{
|
||||
var type = $("#id_page_type").val();
|
||||
if ( type == 5 || type == 6 || type == 7 || type == 8 || type == 9 || type == 10 || type == 11 )
|
||||
{
|
||||
$( '#div_article_number, #div_sort_type' ).hide();
|
||||
if ( type == 8 )
|
||||
{
|
||||
$( '#div_show_title' ).hide();
|
||||
$( '#div_link' ).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#div_link' ).hide();
|
||||
$( '#div_show_title' ).show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#div_article_number, #div_sort_type' ).show();
|
||||
$( '#div_link' ).hide();
|
||||
$( '#div_show_title' ).show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="edit-row">
|
||||
<form method='POST' id='formularz' action='./'>
|
||||
<? if ( $this -> _container ):?>
|
||||
<input type='hidden' name='rw' value='save' />
|
||||
<input type='hidden' name='id' value='<?= $this -> _container['id'];?>' />
|
||||
<? else:?>
|
||||
<input type='hidden' name='rw' value='save_new' />
|
||||
<input type='hidden' name='check' value='<?= mktime();?>' />
|
||||
<? endif;?>
|
||||
<div id="tabs" class="tabs-container">
|
||||
<ul class="tabs">
|
||||
<?
|
||||
if ( is_array( $this -> _languages ) ) foreach ( $this -> _languages as $lg )
|
||||
{
|
||||
?>
|
||||
<li class="tab-li">
|
||||
<a href="lang_<?= $lg['id'];?>" class="li-tabs <? if ( !$j++ ) echo 'active';?>"><?= $lg['name'];?></a>
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="group">
|
||||
<label>Nazwa:</label>
|
||||
<div class="content">
|
||||
<input type='text' name='name' id='name' value='<?= $this -> _container['name'];?>' />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label>Aktywny:</label>
|
||||
<div class="content">
|
||||
<input type="radio" name="enabled" id="enabled_0" value="0" <? if ( !$this -> _container['enabled'] ) echo "checked='checked'";?> />
|
||||
nie
|
||||
<input type="radio" name="enabled" id="enabled_1" value='1' <? if ( $this -> _container['enabled'] ) echo "checked='checked'";?> />
|
||||
tak
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $this -> _languages ) ) foreach ( $this -> _languages as $lg )
|
||||
{
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$( 'textarea#text_<?= $lg['id'];?>' ).ckeditor( {
|
||||
toolbar : 'MyToolbar',
|
||||
height:'250',
|
||||
width: '900px',
|
||||
language: 'pl'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id="lang_<?= $lg['id'];?>" class="tabs-content <? if ( $i++ ) echo 'nondisplay';?>">
|
||||
<div class="group">
|
||||
<label>Tekst:</label>
|
||||
<div class="content">
|
||||
<textarea name='text_<?= $lg['id'];?>' id="text_<?= $lg['id'];?>" cols='60' rows='5'><?= $this -> secureHTML( $lg['content'] );?></textarea>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user