first commit
This commit is contained in:
49
templates/articles/article-entry.php
Normal file
49
templates/articles/article-entry.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<? global $lang;?>
|
||||
<div class="article-entry">
|
||||
<?
|
||||
if ( $main_img = $this -> article['language']['main_image'] ):
|
||||
?>
|
||||
<div class="main-image">
|
||||
<img src="<?= $main_img;?>" alt="<?= htmlspecialchars( $this -> article['language']['title'] );?>">
|
||||
</div>
|
||||
<?
|
||||
endif;
|
||||
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
|
||||
if ( $this -> article['show_title'] ):
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> article['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> article['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> article['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> article['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> article['date_modify'] . '</div>';
|
||||
|
||||
?>
|
||||
<div class="entry">
|
||||
<?
|
||||
if ( $this -> article['language']['entry'] )
|
||||
{
|
||||
echo $this -> article['language']['entry'];
|
||||
|
||||
if ( $this -> article['language']['text'] )
|
||||
$more = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this -> article['language']['text'];
|
||||
|
||||
$more = false;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<? if ( $more ):?>
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" class="more" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $lang['wiecej'];?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
19
templates/articles/article-files.php
Normal file
19
templates/articles/article-files.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<? if ( is_array( $this -> files ) ):?>
|
||||
<ul class="files">
|
||||
<? foreach ( $this -> files as $file ):?>
|
||||
<li>
|
||||
<a href="/download.php?file=<?= $file['id'];?>&hash=<?= md5( $file['src'] );?>" title="<?= $file['name'];?>" target="_blank">
|
||||
<?
|
||||
if ( $file['name'] )
|
||||
echo $file['name'];
|
||||
else
|
||||
{
|
||||
$name = explode( '/', $file['src'] );
|
||||
echo $name[ count( $name ) - 1 ];
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ul>
|
||||
<? endif;?>
|
||||
216
templates/articles/article-full.php
Normal file
216
templates/articles/article-full.php
Normal file
@@ -0,0 +1,216 @@
|
||||
<? global $lang, $lang_id;?>
|
||||
<div class="article article-<?= $this -> article['id'];?>">
|
||||
<?
|
||||
if ( $main_img = $this -> article['language']['main_image'] ):
|
||||
?>
|
||||
<div class="main-image">
|
||||
<img src="<?= $main_img;?>" alt="<?= htmlspecialchars( $this -> article['language']['title'] );?>">
|
||||
</div>
|
||||
<?
|
||||
endif;
|
||||
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
|
||||
if ( $this -> article['show_title'] )
|
||||
echo '<h3 class="article-title">' . $this -> article['language']['title'] . '</h3>';
|
||||
|
||||
if ( $this -> article['social_icons'] ):
|
||||
?>
|
||||
<div class="social-icons">
|
||||
<a class="fb" href="http://www.facebook.com/sharer.php?u=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="facebook" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-facebook.jpg" alt="facebook" />
|
||||
</a>
|
||||
<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="pinterest" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-pinterest.jpg" alt="pinterest" />
|
||||
</a>
|
||||
<a class="twitter" href="http://twitter.com/share?url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=600');return false;" title="twitter" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-twitter.jpg" alt="twitter" />
|
||||
</a>
|
||||
<a class="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=850');return false;" title="linked in" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-linkedin.jpg" alt="linkedin" />
|
||||
</a>
|
||||
<a class="gp" href="https://plus.google.com/share?url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="google+" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-google.jpg" alt="google+" />
|
||||
</a>
|
||||
</div>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> article['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> article['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> article['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> article['date_modify'] . '</div>';
|
||||
|
||||
if ( is_array( $this -> article['tags'] ) and !empty( $this -> article['tags'] ) ):
|
||||
echo '<div class="article-tags">';
|
||||
echo '<ul>';
|
||||
foreach ( $this -> article['tags'] as $tag ):
|
||||
echo '<li>';
|
||||
echo '<a href="/tag,' . \S::seo( $tag ) . '">'. $tag . '</a>';
|
||||
echo '</li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
endif;
|
||||
?>
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= $this -> article['language']['table_of_contents'];?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> article['repeat_entry'] ):?>
|
||||
<div class="entry">
|
||||
<?= $this -> article['language']['entry'];?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class="text">
|
||||
<?
|
||||
$text = $this -> article['language']['text'];
|
||||
|
||||
/* artykuł wewnątrz innego artykułu */
|
||||
preg_match_all( '/ARTYKUL:[0-9]*/', $this -> article['language']['text'], $articles_list );
|
||||
if ( is_array( $articles_list[0] ) ) foreach( $articles_list[0] as $article_tmp )
|
||||
{
|
||||
$article_tmp = explode( ':', $article_tmp );
|
||||
if ( $article_tmp[1] != $this -> article['id'] )
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full( $article_tmp[1], $lang_id ), $text );
|
||||
else
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', '', $text );
|
||||
}
|
||||
|
||||
/* galeria w innym miejscu niż na końcu */
|
||||
if ( strpos( $this -> article['language']['text'], '[GALERIA]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['images'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
$gallery = $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
$text = preg_replace('/(<p(.*)>\[GALERIA\]<\/p>|<div(.*)>\[GALERIA\]<\/div>)/', $gallery, $text );
|
||||
}
|
||||
|
||||
/* załączniki w innym miejscu niż na końcu */
|
||||
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['files'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
$files = $tpl -> render( 'articles/article-files' );
|
||||
endif;
|
||||
$text = preg_replace('/(<p(.*)>\[ZALACZNIKI\]<\/p>|<div(.*)>\[ZALACZNIKI\]<\/div>)/', $files, $text );
|
||||
}
|
||||
|
||||
/* slider */
|
||||
if ( strpos( $text, '[SLIDER]' ) !== false )
|
||||
{
|
||||
while ( strpos( $text, '[SLIDER]' ) !== false )
|
||||
{
|
||||
$text_tmp = explode( '[SLIDER]', $text );
|
||||
$before = $text_tmp[0];
|
||||
for ( $i = 1; $i < count( $text_tmp ); $i++ )
|
||||
{
|
||||
$temp = explode( '[/SLIDER]' , $text_tmp[$i] );
|
||||
$code = $temp[0];
|
||||
|
||||
ob_start();
|
||||
|
||||
$images_tmp = explode( '|', $code );
|
||||
if ( is_array( $images_tmp ) and !empty( $images_tmp ) ) foreach ( $images_tmp as $image_tmp )
|
||||
{
|
||||
$image = explode( ';', $image_tmp );
|
||||
$images[] = $image;
|
||||
}
|
||||
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> images = $images;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> i = $i;
|
||||
echo $tpl -> render( 'articles/slider' );
|
||||
|
||||
$out .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$out .= $temp[1];
|
||||
}
|
||||
$text = $before . $out;
|
||||
}
|
||||
}
|
||||
|
||||
$dom = new DomDocument('1.0', 'UTF-8');
|
||||
$dom -> loadHTML( '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $text );
|
||||
$elements = $dom -> getElementsByTagName( 'img' );
|
||||
foreach ( $elements as $element )
|
||||
{
|
||||
if ( strpos( $element -> getAttribute( 'class' ), 'zoom' ) !== false )
|
||||
{
|
||||
$element_tmp = $dom -> createElement( 'a', '' );
|
||||
$element_tmp -> setAttribute( 'href', $element -> getAttribute( 'src' ) );
|
||||
$element_tmp -> setAttribute( 'rel', 'article-' . $this -> article['id'] );
|
||||
$element_tmp -> setAttribute( 'class', 'fancybox' );
|
||||
|
||||
$element_tmp_2 = $element -> cloneNode( false );
|
||||
|
||||
$element_tmp -> appendChild( $element_tmp_2 );
|
||||
|
||||
$element -> parentNode -> replaceChild( $element_tmp, $element );
|
||||
}
|
||||
}
|
||||
|
||||
echo $dom -> saveHTML();
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
echo $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
|
||||
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> files = $this -> article['files'];
|
||||
echo $tpl -> render( 'articles/article-files' );
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<link class="footer" href="/libraries/fancyBox/jquery.fancybox.css" rel="stylesheet" type="text/css">
|
||||
<link class="footer" href="/libraries/fancyBox/helpers/jquery.fancybox-buttons.css" rel="stylesheet" type="text/css">
|
||||
<script class="footer" type="text/javascript" src="/libraries/fancyBox/jquery.fancybox.js"></script>
|
||||
<script class="footer" type="text/javascript" src="/libraries/fancyBox/helpers/jquery.fancybox-buttons.js"></script>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( document ).ready(function()
|
||||
{
|
||||
$( ".gallery a.image" ).fancybox({
|
||||
closeBtn : false,
|
||||
helpers : {
|
||||
buttons : {}
|
||||
}
|
||||
});
|
||||
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const observer = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
const id = entry.target.getAttribute('id');
|
||||
if ( entry.intersectionRatio > 0) {
|
||||
document.querySelector('.article-<?= $this -> article['id'];?> .table-of-contents li a[href$="#' + id + '"]').parentElement.classList.add('active');
|
||||
} else {
|
||||
document.querySelector('.article-<?= $this -> article['id'];?> .table-of-contents li a[href$="#' + id + '"]').parentElement.classList.remove('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
document.querySelectorAll( '.article-<?= $this -> article['id'];?> .text div[id]' ).forEach((div) => {
|
||||
observer.observe(div);
|
||||
});
|
||||
});
|
||||
<? endif;?>
|
||||
});
|
||||
</script>
|
||||
345
templates/articles/article-gallery.php
Normal file
345
templates/articles/article-gallery.php
Normal file
@@ -0,0 +1,345 @@
|
||||
<? if ( is_array( $this -> images ) ):?>
|
||||
<div class="gallery <? if ( $this -> article['pixieset'] ):?>pixieset<? endif;?>">
|
||||
<? if ( $this -> article['pixieset'] ):?>
|
||||
<div class="buttons">
|
||||
<a id="gallery-download-<?= $this -> article['id'];?>" class="btn btn-success"><?= \S::lang( 'pobierz-wszystkie' );?></a>
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
<a id="gallery-favorite-submit-<?= $this -> article['id'];?>" class="btn btn-info"><?= \S::lang( 'zatwierdz-wybrane-fotografie' );?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class="row">
|
||||
<? foreach ( $this -> images as $img ):?>
|
||||
<div class="col-xs-12 col-sm-4 col-md-3">
|
||||
<? if ( $this -> article['pixieset'] ):?>
|
||||
<div class="image" download-link="/pixieset/<?= md5( $img['id'] . $img['src'] );?>" image-id="<?= $img['id'];?>" counter="<?= (int)++$i;?>" favorite="<?= !$img['favorite'] ? '0' : '1';?>">
|
||||
<img src="<?= $img['src'];?>" alt="<?= $img['alt'];?>">
|
||||
<div class="image-options">
|
||||
<a href="/pixieset/<?= md5( $img['id'] . $img['src'] );?>" target="_blank" class="download">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
<a href="#" image-id="<?= $img['id'];?>" class="image-favorite" id="image-favorite-<?= $img['id'];?>"><i class="fa <?= !$img['favorite'] ? 'fa-heart-o' : 'fa-heart';?>"></i></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<? else:?>
|
||||
<a class="image" rel="article-<?= $this -> article['id'];?>" href="<?= $img['src'];?>" title="">
|
||||
<img src="<?= $img['src'];?>" alt="<?= $img['alt'];?>">
|
||||
</a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> article['pixieset'] ):?>
|
||||
<div class="pixieset-image-big">
|
||||
<a href="#" class="close" title="<?= \S::lang( 'zamknij' );?>">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
<div class="buttons">
|
||||
<a href="#" class="download">
|
||||
<i class="fa fa-download"></i>
|
||||
</a>
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
<a href="#" class="favorite" image-id="">
|
||||
<i class="fa fa-heart-o"></i>
|
||||
</a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<img src="#">
|
||||
<a href="#" class="next">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<a href="#" class="prev">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<script class="footer" type="text/javascript" src="/libraries/jquery/lozad.js"></script>
|
||||
<script class="footer" type="text/javascript">
|
||||
var pixieset_image = $( '.pixieset-image-big' );
|
||||
$( function()
|
||||
{
|
||||
const observer = lozad();
|
||||
observer.observe();
|
||||
|
||||
<? if ( $this -> article['pixieset'] ):?>
|
||||
$( 'body' ).on( click_event, '.gallery .image img', function()
|
||||
{
|
||||
var image_container = $( this ).parent( '.image' );
|
||||
|
||||
var src = $( this ).attr( 'data-src' );
|
||||
var download_link = image_container.attr( 'download-link' );
|
||||
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
var image_id = image_container.attr( 'image-id' );
|
||||
var favorite_status = image_container.attr( 'favorite' );
|
||||
<? endif;?>
|
||||
|
||||
pixieset_image.find( 'img' ).attr( 'src', src );
|
||||
pixieset_image.find( '.download' ).attr( 'href', download_link );
|
||||
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
pixieset_image.find( '.favorite' ).attr( 'image-id', image_id );
|
||||
if ( favorite_status === '1' )
|
||||
pixieset_image.find( '.favorite' ).children( 'i' ).removeClass( 'fa-heart-o' ).addClass( 'fa-heart' );
|
||||
else
|
||||
pixieset_image.find( '.favorite' ).children( 'i' ).removeClass( 'fa-heart' ).addClass( 'fa-heart-o' );
|
||||
<? endif;?>
|
||||
|
||||
pixieset_image.show();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '.pixieset-image-big .close', function()
|
||||
{
|
||||
pixieset_image.hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '.pixieset-image-big .prev', function()
|
||||
{
|
||||
var src = pixieset_image.find( 'img' ).attr( 'src' );
|
||||
var index = $( 'img[data-src="' + src+ '"]' ).parent( '.image' ).attr( 'counter' );
|
||||
index = parseInt( index );
|
||||
|
||||
if ( index <= 1 )
|
||||
var image_index = $( '.image[counter="<?= $i;?>"]' );
|
||||
else
|
||||
var image_index = $( '.image[counter="' + ( index - 1 ) + '"]' );
|
||||
|
||||
var image_current = image_index.children( 'img' );
|
||||
|
||||
var src = image_current.attr( 'data-src' );
|
||||
var download_link = image_index.attr( 'download-link' );
|
||||
|
||||
pixieset_image.find( '.download' ).attr( 'href', download_link );
|
||||
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
var image_id = image_index.attr( 'image-id' );
|
||||
var favorite_status = image_index.attr( 'favorite' );
|
||||
|
||||
pixieset_image.find( '.favorite' ).attr( 'image-id', image_id );
|
||||
|
||||
if ( favorite_status === '1' )
|
||||
pixieset_image.find( '.favorite' ).children( 'i' ).removeClass( 'fa-heart-o' ).addClass( 'fa-heart' );
|
||||
else
|
||||
pixieset_image.find( '.favorite' ).children( 'i' ).removeClass( 'fa-heart' ).addClass( 'fa-heart-o' );
|
||||
<? endif;?>
|
||||
|
||||
var image = $( ".pixieset-image-big img" );
|
||||
image.hide();
|
||||
image.attr( 'src', src );
|
||||
image.show();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '.pixieset-image-big .next', function()
|
||||
{
|
||||
var src = pixieset_image.find( 'img' ).attr( 'src' );
|
||||
var index = $( 'img[data-src="' + src+ '"]' ).parent( '.image' ).attr( 'counter' );
|
||||
index = parseInt( index );
|
||||
|
||||
if ( index >= <?= $i;?> )
|
||||
var image_index = $( '.image[counter="1"]' );
|
||||
else
|
||||
var image_index = $( '.image[counter="' + ( index + 1 ) + '"]' );
|
||||
|
||||
var image_current = image_index.children( 'img' );
|
||||
|
||||
var src = image_current.attr( 'data-src' );
|
||||
var download_link = image_index.attr( 'download-link' );
|
||||
|
||||
pixieset_image.find( '.download' ).attr( 'href', download_link );
|
||||
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
var image_id = image_index.attr( 'image-id' );
|
||||
var favorite_status = image_index.attr( 'favorite' );
|
||||
|
||||
pixieset_image.find( '.favorite' ).attr( 'image-id', image_id );
|
||||
|
||||
if ( favorite_status === '1' )
|
||||
pixieset_image.find( '.favorite' ).children( 'i' ).removeClass( 'fa-heart-o' ).addClass( 'fa-heart' );
|
||||
else
|
||||
pixieset_image.find( '.favorite' ).children( 'i' ).removeClass( 'fa-heart' ).addClass( 'fa-heart-o' );
|
||||
<? endif;?>
|
||||
|
||||
var image = $( ".pixieset-image-big img" );
|
||||
image.hide();
|
||||
image.attr( 'src', src );
|
||||
image.show();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '#gallery-download-<?= $this -> article['id'];?>', function()
|
||||
{
|
||||
var button = $( this );
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'pixieset_gallery_download',
|
||||
hash: '<?= md5( $this -> article['id'] . $this -> article['date_add'] );?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
button.addClass( 'disabled' ).html( '<?= \S::lang( 'zaczekaj-trwa-tworzenie-pliku' );?>' );
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
window.location = '/' + data.url;
|
||||
button.removeClass( 'disabled' ).html( '<?= \S::lang( 'pobierz-wszystkie' );?>' );
|
||||
}
|
||||
});
|
||||
});
|
||||
<? endif;?>
|
||||
|
||||
<? if ( $this -> article['pixieset'] == 2 ):?>
|
||||
$( 'body' ).on( click_event, '#gallery-favorite-submit-<?= $this -> article['id'];?>', function()
|
||||
{
|
||||
var button = $( this );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'pixieset_save_favorite_images',
|
||||
hash: '<?= md5( $this -> article['id'] . $this -> article['date_add'] );?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
button.addClass( 'disabled' );
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status === true )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( \S::lang( 'informacja' ) );?>',
|
||||
content: '<?= \S::lang( 'lista-wybranych-zdjec-zostala-zatwierdzona' );?>',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-8',
|
||||
theme: 'modern',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= \S::lang( 'zamknij' );?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
button.removeClass( 'disabled' );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '.image-favorite', function()
|
||||
{
|
||||
var button = $( this );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'pixieset_image_favorite',
|
||||
hash: '<?= md5( $this -> article['id'] . $this -> article['date_add'] );?>',
|
||||
image_id: button.attr( 'image-id' )
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
button.addClass( 'disabled' );
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status === false )
|
||||
{
|
||||
button.children( 'i' ).removeClass( 'fa-heart' ).addClass( 'fa-heart-o' );
|
||||
button.parents( '.image' ).attr( 'favorite', '0' );
|
||||
}
|
||||
else
|
||||
{
|
||||
button.children( 'i' ).removeClass( 'fa-heart-o' ).addClass( 'fa-heart' );
|
||||
button.parents( '.image' ).attr( 'favorite', '1' );
|
||||
}
|
||||
|
||||
button.removeClass( 'disabled' );
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '.pixieset-image-big .favorite', function()
|
||||
{
|
||||
var button = $( this );
|
||||
var image_id = button.attr( 'image-id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'pixieset_image_favorite',
|
||||
hash: '<?= md5( $this -> article['id'] . $this -> article['date_add'] );?>',
|
||||
image_id: image_id
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
button.addClass( 'disabled' );
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status === false )
|
||||
{
|
||||
button.children( 'i' ).removeClass( 'fa-heart' ).addClass( 'fa-heart-o' );
|
||||
$( '.image[image-id="' + image_id + '"]' ).attr( 'favorite', 0 );
|
||||
$( '.image[image-id="' + image_id + '"]' ).find( '.image-favorite' ).children( 'i' ).removeClass( 'fa-heart' ).addClass( 'fa-heart-o' );
|
||||
}
|
||||
else
|
||||
{
|
||||
button.children( 'i' ).removeClass( 'fa-heart-o' ).addClass( 'fa-heart' );
|
||||
$( '.image[image-id="' + image_id + '"]' ).attr( 'favorite', 1 );
|
||||
$( '.image[image-id="' + image_id + '"]' ).find( '.image-favorite' ).children( 'i' ).removeClass( 'fa-heart-o' ).addClass( 'fa-heart' );
|
||||
}
|
||||
|
||||
button.removeClass( 'disabled' );
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
<? endif;?>
|
||||
});
|
||||
</script>
|
||||
26
templates/articles/article-miniature.php
Normal file
26
templates/articles/article-miniature.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<? global $lang;?>
|
||||
<div class="article-miniature">
|
||||
<?
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> article['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
|
||||
if ( $this -> article['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> article['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> article['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> article['date_modify'] . '</div>';
|
||||
|
||||
if ( $img = \front\factory\Articles::get_image( $this -> article ) ):
|
||||
?>
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>>
|
||||
<div style="background: url( '/libraries/<?= $img;?>' ) no-repeat center;"></div>
|
||||
</a>
|
||||
<?
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
216
templates/articles/article.php
Normal file
216
templates/articles/article.php
Normal file
@@ -0,0 +1,216 @@
|
||||
<? global $lang, $lang_id;?>
|
||||
<div class="article article-<?= $this -> article['id'];?>">
|
||||
<?
|
||||
if ( $main_img = $this -> article['language']['main_image'] ):
|
||||
?>
|
||||
<div class="main-image">
|
||||
<img src="<?= $main_img;?>" alt="<?= htmlspecialchars( $this -> article['language']['title'] );?>">
|
||||
</div>
|
||||
<?
|
||||
endif;
|
||||
|
||||
$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
|
||||
|
||||
if ( $this -> article['show_title'] )
|
||||
echo '<h3 class="article-title">' . $this -> article['language']['title'] . '</h3>';
|
||||
|
||||
if ( $this -> article['social_icons'] ):
|
||||
?>
|
||||
<div class="social-icons">
|
||||
<a class="fb" href="http://www.facebook.com/sharer.php?u=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="facebook" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-facebook.jpg" alt="facebook" />
|
||||
</a>
|
||||
<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="pinterest" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-pinterest.jpg" alt="pinterest" />
|
||||
</a>
|
||||
<a class="twitter" href="http://twitter.com/share?url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=600');return false;" title="twitter" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-twitter.jpg" alt="twitter" />
|
||||
</a>
|
||||
<a class="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=850');return false;" title="linked in" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-linkedin.jpg" alt="linkedin" />
|
||||
</a>
|
||||
<a class="gp" href="https://plus.google.com/share?url=<?= \S::get_domain_url( $_SERVER['SERVER_NAME'] );?>/<?= $url;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" title="google+" target="_blank" rel="nofollow">
|
||||
<img src="/images/system/logo-google.jpg" alt="google+" />
|
||||
</a>
|
||||
</div>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> article['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> article['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> article['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> article['date_modify'] . '</div>';
|
||||
|
||||
if ( $this -> article['tags'] ):
|
||||
echo '<div class="article-tags">';
|
||||
echo '<ul>';
|
||||
foreach ( $this -> article['tags'] as $tag ):
|
||||
echo '<li>';
|
||||
echo '<a href="/tag,' . \S::seo( $tag ) . '">' . $tag . '</a>';
|
||||
echo '</li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
endif;
|
||||
?>
|
||||
<? if ( $this -> article['repeat_entry'] ):?>
|
||||
<div class="entry">
|
||||
<?= $this -> article['language']['entry'];?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
<div class="table-of-contents">
|
||||
<div class="title">
|
||||
<?= \S::lang( 'spis-tresci' );?>
|
||||
</div>
|
||||
<?= $this -> article['language']['table_of_contents'];?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class="text">
|
||||
<?
|
||||
$text = $this -> article['language']['text'];
|
||||
|
||||
/* artykuł wewnątrz innego artykułu */
|
||||
preg_match_all( '/ARTYKUL:[0-9]*/', $this -> article['language']['text'], $articles_list );
|
||||
if ( is_array( $articles_list[0] ) ) foreach( $articles_list[0] as $article_tmp )
|
||||
{
|
||||
$article_tmp = explode( ':', $article_tmp );
|
||||
if ( $article_tmp[1] != $this -> article['id'] )
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full( $article_tmp[1], $lang_id ), $text );
|
||||
else
|
||||
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', '', $text );
|
||||
}
|
||||
|
||||
/* galeria w innym miejscu niż na końcu */
|
||||
if ( strpos( $this -> article['language']['text'], '[GALERIA]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['images'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
$gallery = $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
$text = preg_replace('/(<p(.*)>\[GALERIA\]<\/p>|<div(.*)>\[GALERIA\]<\/div>)/', $gallery, $text );
|
||||
}
|
||||
|
||||
/* załączniki w innym miejscu niż na końcu */
|
||||
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
|
||||
{
|
||||
if ( is_array( $this -> article['files'] ) ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> files = $this -> article['files'];
|
||||
$files = $tpl -> render( 'articles/article-files' );
|
||||
endif;
|
||||
$text = preg_replace('/(<p(.*)>\[ZALACZNIKI\]<\/p>|<div(.*)>\[ZALACZNIKI\]<\/div>)/', $files, $text );
|
||||
}
|
||||
|
||||
/* slider */
|
||||
if ( strpos( $text, '[SLIDER]' ) !== false )
|
||||
{
|
||||
while ( strpos( $text, '[SLIDER]' ) !== false )
|
||||
{
|
||||
$text_tmp = explode( '[SLIDER]', $text );
|
||||
$before = $text_tmp[0];
|
||||
for ( $i = 1; $i < count( $text_tmp ); $i++ )
|
||||
{
|
||||
$temp = explode( '[/SLIDER]' , $text_tmp[$i] );
|
||||
$code = $temp[0];
|
||||
|
||||
ob_start();
|
||||
|
||||
$images_tmp = explode( '|', $code );
|
||||
if ( is_array( $images_tmp ) and !empty( $images_tmp ) ) foreach ( $images_tmp as $image_tmp )
|
||||
{
|
||||
$image = explode( ';', $image_tmp );
|
||||
$images[] = $image;
|
||||
}
|
||||
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> images = $images;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> i = $i;
|
||||
echo $tpl -> render( 'articles/slider' );
|
||||
|
||||
$out .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$out .= $temp[1];
|
||||
}
|
||||
$text = $before . $out;
|
||||
}
|
||||
}
|
||||
$dom = new DomDocument('1.0', 'UTF-8');
|
||||
$dom -> loadHTML( '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $text );
|
||||
$elements = $dom -> getElementsByTagName( 'img' );
|
||||
foreach ( $elements as $element )
|
||||
{
|
||||
if ( strpos( $element -> getAttribute( 'class' ), 'zoom' ) !== false )
|
||||
{
|
||||
$element_tmp = $dom -> createElement( 'a', '' );
|
||||
$element_tmp -> setAttribute( 'href', $element -> getAttribute( 'src' ) );
|
||||
$element_tmp -> setAttribute( 'rel', 'article-' . $this -> article['id'] );
|
||||
$element_tmp -> setAttribute( 'class', 'fancybox' );
|
||||
|
||||
$element_tmp_2 = $element -> cloneNode( false );
|
||||
|
||||
$element_tmp -> appendChild( $element_tmp_2 );
|
||||
|
||||
$element -> parentNode -> replaceChild( $element_tmp, $element );
|
||||
}
|
||||
}
|
||||
|
||||
echo $dom -> saveHTML();
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $this -> article;
|
||||
$tpl -> images = $this -> article['images'];
|
||||
echo $tpl -> render( 'articles/article-gallery' );
|
||||
endif;
|
||||
|
||||
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article_id = $this -> article['id'];
|
||||
$tpl -> files = $this -> article['files'];
|
||||
echo $tpl -> render( 'articles/article-files' );
|
||||
endif;
|
||||
?>
|
||||
<a href="javascript:history.go(-1);" class="btn btn-success"><?= $lang['wstecz'];?></a>
|
||||
</div>
|
||||
<link class="footer" href="/libraries/fancyBox/jquery.fancybox.css" rel="stylesheet" type="text/css">
|
||||
<link class="footer" href="/libraries/fancyBox/helpers/jquery.fancybox-buttons.css" rel="stylesheet" type="text/css">
|
||||
<script class="footer" type="text/javascript" src="/libraries/fancyBox/jquery.fancybox.js"></script>
|
||||
<script class="footer" type="text/javascript" src="/libraries/fancyBox/helpers/jquery.fancybox-buttons.js"></script>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( document ).ready(function()
|
||||
{
|
||||
$( ".gallery a.image" ).fancybox({
|
||||
closeBtn : false,
|
||||
helpers : {
|
||||
buttons : {}
|
||||
}
|
||||
});
|
||||
|
||||
<? if ( $this -> article['language']['table_of_contents'] ):?>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const observer = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
const id = entry.target.getAttribute('id');
|
||||
if ( entry.intersectionRatio > 0) {
|
||||
document.querySelector('.article-<?= $this -> article['id'];?> .table-of-contents li a[href$="#' + id + '"]').parentElement.classList.add('active');
|
||||
} else {
|
||||
document.querySelector('.article-<?= $this -> article['id'];?> .table-of-contents li a[href$="#' + id + '"]').parentElement.classList.remove('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
document.querySelectorAll( '.article-<?= $this -> article['id'];?> .text div[id]' ).forEach((div) => {
|
||||
observer.observe(div);
|
||||
});
|
||||
});
|
||||
<? endif;?>
|
||||
});
|
||||
</script>
|
||||
13
templates/articles/articles-entries.php
Normal file
13
templates/articles/articles-entries.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?
|
||||
if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $article )
|
||||
{
|
||||
if ( $article['password'] and !\S::get_session( 'article-' . $article['id'] . '-' . $article['password'] ) )
|
||||
echo \front\view\Articles::password_view( [ 'article' => $article ] );
|
||||
else
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> page_id = $this -> page_id;
|
||||
$tpl -> article = $article;
|
||||
echo $tpl -> render( 'articles/article-entry' );
|
||||
}
|
||||
}
|
||||
15
templates/articles/articles-list.php
Normal file
15
templates/articles/articles-list.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<? global $lang;?>
|
||||
<? if ( is_array( $this -> articles ) ): foreach( $this -> articles as $article ):?>
|
||||
<div class="article-list">
|
||||
<?
|
||||
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $article['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
if ( $this -> articles[0]['show_date_add'] )
|
||||
echo '<div class="date-add">' . ucfirst( $lang['data-dodania'] ) . ': ' . $this -> articles[0]['date_add'] . '</div>';
|
||||
?>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
7
templates/articles/articles-miniatures.php
Normal file
7
templates/articles/articles-miniatures.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $article )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $article;
|
||||
echo $tpl -> render( 'articles/article-miniature' );
|
||||
}
|
||||
43
templates/articles/map.php
Normal file
43
templates/articles/map.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?
|
||||
global $settings;
|
||||
if ( is_array( $this -> settings ) ) foreach ( $this -> settings as $row )
|
||||
{
|
||||
$data = explode( ':', $row );
|
||||
switch ( $data[0] ):
|
||||
case 'dlugosc':
|
||||
$dlugosc = $data[1];
|
||||
break;
|
||||
case 'szerokosc':
|
||||
$szerokosc = $data[1];
|
||||
break;
|
||||
case 'wysokosc_mapy':
|
||||
$wysokosc_mapy = $data[1];
|
||||
break;
|
||||
case 'szerokosc_mapy':
|
||||
$szerokosc_mapy = $data[1];
|
||||
break;
|
||||
case 'zoom':
|
||||
$zoom = $data[1];
|
||||
break;
|
||||
case 'opis':
|
||||
$opis = $data[1];
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
?>
|
||||
<div id="map-<?= $this -> map_counter;?>" style="width: <?= $szerokosc_mapy;?>; height: <?= $wysokosc_mapy;?>"></div>
|
||||
<script type="text/javascript">
|
||||
var mymap<?= $this -> map_counter;?> = L.map('map-<?= $this -> map_counter;?>', {
|
||||
center: [<?= $szerokosc;?>, <?= $dlugosc;?>],
|
||||
zoom: <?= $zoom;?>,
|
||||
scrollWheelZoom: false
|
||||
});
|
||||
var marker = L.marker([<?= $szerokosc;?>, <?= $dlugosc;?>]).addTo(mymap<?= $this -> map_counter;?>);
|
||||
<? if ( $opis ):?>
|
||||
marker.bindPopup("<?= $opis;?>").openPopup();
|
||||
<? endif;?>
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=<?= $settings['google_map_key'];?>', {
|
||||
maxZoom: 24,
|
||||
id: 'mapbox.streets'
|
||||
}).addTo(mymap<?= $this -> map_counter;?>);
|
||||
</script>
|
||||
8
templates/articles/news-list.php
Normal file
8
templates/articles/news-list.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<ul class="news-list">
|
||||
<? if ( \S::is_array_fix( $this -> articles ) ): foreach ( $this -> articles as $article ):?>
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );?>
|
||||
<li>
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $article['language']['title'];?></a>
|
||||
</li>
|
||||
<? endforeach; endif;?>
|
||||
</ul>
|
||||
75
templates/articles/news.php
Normal file
75
templates/articles/news.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<? global $lang, $config, $settings;?>
|
||||
<div id="news">
|
||||
<div id="title">Aktualności</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div id="article-main">
|
||||
<?
|
||||
$this -> articles[0]['language']['seo_link'] ? $url = $this -> articles[0]['language']['seo_link'] : $url = 'a-' . $this -> articles[0]['id'] . '-' . \S::seo( $this -> articles[0]['language']['title'] );
|
||||
|
||||
if ( $this -> articles[0]['show_title'] ):
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> articles[0]['language']['title'];?>" <? if ( $this -> articles[0]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> articles[0]['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> articles[0]['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> articles[0]['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> articles[0]['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> articles[0]['date_modify'] . '</div>';
|
||||
|
||||
?>
|
||||
<div class="entry">
|
||||
<?
|
||||
if ( $this -> articles[0]['language']['entry'] )
|
||||
{
|
||||
echo $this -> articles[0]['language']['entry'];
|
||||
|
||||
if ( $this -> articles[0]['language']['text'] )
|
||||
$more = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this -> articles[0]['language']['text'];
|
||||
|
||||
$more = false;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<? if ( $more ):?>
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" class="more" title="<?= $this -> articles[0]['language']['title'];?>" <? if ( $this -> articles[0]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $lang['wiecej'];?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<? for ( $i = 1; $i < $settings['news_limit']; $i++ ):?>
|
||||
<? if ( !empty( $this -> articles[$i] ) ):?>
|
||||
<div class="article-list">
|
||||
<?
|
||||
$this -> articles[$i]['language']['seo_link'] ? $url = $this -> articles[$i]['language']['seo_link'] : $url = 'a-' . $this -> articles[$i]['id'] . '-' . \S::seo( $this -> articles[$i]['language']['title'] );
|
||||
|
||||
if ( $this -> articles[$i]['show_title'] ):
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $this -> articles[$i]['language']['title'];?>" <? if ( $this -> articles[$i]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $this -> articles[$i]['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
endif;
|
||||
|
||||
if ( $this -> articles[$i]['show_date_add'] )
|
||||
echo '<div class="date-add">' . $lang['data-dodania'] . ': ' . $this -> articles[$i]['date_add'] . '</div>';
|
||||
|
||||
if ( $this -> articles[$i]['show_date_modify'] )
|
||||
echo '<div class="date-add">' . $lang['data-modyfikacji'] . ': ' . $this -> articles[$i]['date_modify'] . '</div>';
|
||||
|
||||
?>
|
||||
<? if ( $more ):?>
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language( \S::get_domain( $_SERVER['HTTP_HOST'] ) ) ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" class="more" title="<?= $this -> articles[$i]['language']['title'];?>" <? if ( $this -> articles[$i]['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $lang['wiecej'];?></a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endfor;?>
|
||||
</div>
|
||||
</div>
|
||||
43
templates/articles/password-view.php
Normal file
43
templates/articles/password-view.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="article-password" id="article-password-<?= $this -> article['id'];?>">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<?= \S::lang( 'ten-artykul-jest-chroniony-podaj-haslo-aby-odblokowac-zawartosc-artykulu' );?>
|
||||
<form metho="POST" id="form-<?= $this -> article['id'];?>">
|
||||
<input type="password" name="password" id="password-<?= $this -> article['id'];?>" required="required">
|
||||
<input type="submit" class="btn btn-success" id="submit-<?= $this -> article['id'];?>" value="<?= \S::lang( 'odblokuj' );?>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
$( 'body' ).on( click_event, '#submit-<?= $this -> article['id'];?>', function(e)
|
||||
{
|
||||
if ( $.trim( $( "#password-<?= $this -> article['id'];?>" ).val() ) !== '' )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
var password = $( '#password-<?= $this -> article['id'];?>' ).val();
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'article_unlock',
|
||||
password: password,
|
||||
article_id: <?= $this -> article['id'];?>
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
34
templates/articles/slider.php
Normal file
34
templates/articles/slider.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<? if ( is_array( $this -> images ) ):?>
|
||||
<div id="carousel-<?= $this -> article_id;?>-<?= $this -> i;?>" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<? for ( $i = 0; $i < count( $this -> images ); $i++ ):?>
|
||||
<li data-target="#carousel-<?= $this -> article_id;?>-<?= $this -> i;?>" data-slide-to="<?= $i;?>" class="<? if ( $i == 0 ):?>active<? endif;?>"></li>
|
||||
<? endfor;?>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<? for ( $i = 0; $i < count( $this -> images ); $i++ ):?>
|
||||
<div class="item <? if ( $i == 0 ):?>active<? endif;?>">
|
||||
<img src="<?= $this -> images[$i][0];?>" alt="<?= $this -> images[$i][3];?>">
|
||||
<? if ( $this -> images[$i][1] or $this -> images[$i][2] ):?>
|
||||
<div class="carousel-caption">
|
||||
<? if ( $this -> images[$i][1] ):?>
|
||||
<h3><?= $this -> images[$i][1];?></h3>
|
||||
<? endif;?>
|
||||
<? if ( $this -> images[$i][2] ):?>
|
||||
<p><?= $this -> images[$i][2];?></p>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? endfor;?>
|
||||
</div>
|
||||
<a class="left carousel-control" href="#carousel-<?= $this -> article_id;?>-<?= $this -> i;?>" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#carousel-<?= $this -> article_id;?>-<?= $this -> i;?>" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
<? endif;?>
|
||||
33
templates/articles/tags-cloud.php
Normal file
33
templates/articles/tags-cloud.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<div id="tags">
|
||||
<?php
|
||||
if ( is_array( $this -> tags ) ) foreach ( $this -> tags as $tag )
|
||||
if ( $max < $tag['c'] )
|
||||
$max = $tag['c'];
|
||||
|
||||
$tags = \S::shuffle_assoc( $this -> tags );
|
||||
|
||||
if ( is_array( $tags ) ):
|
||||
echo '<ul>';
|
||||
foreach ( $tags as $tag ):
|
||||
$percent = floor( ( $tag['c'] / $max ) * 100 );
|
||||
switch ( $percent )
|
||||
{
|
||||
case ( $percent < 10 ): $class = 'tag1'; break;
|
||||
case ( $percent >= 10 and $percent < 20 ): $class = 'tag2'; break;
|
||||
case ( $percent >= 20 and $percent < 30 ): $class = 'tag3'; break;
|
||||
case ( $percent >= 30 and $percent < 40 ): $class = 'tag4'; break;
|
||||
case ( $percent >= 40 and $percent < 50 ): $class = 'tag5'; break;
|
||||
case ( $percent >= 50 and $percent < 60 ): $class = 'tag6'; break;
|
||||
case ( $percent >= 60 and $percent < 70 ): $class = 'tag7'; break;
|
||||
case ( $percent >= 70 and $percent < 80 ): $class = 'tag8'; break;
|
||||
case ( $percent >= 80 and $percent < 90 ): $class = 'tag9'; break;
|
||||
case ( $percent >= 90 ): $class = 'tag10'; break;
|
||||
}
|
||||
echo '<li class="' . $class . '">';
|
||||
echo '<a href="/tag,' . \S::seo( $tag['name'] ) . '">' . $tag['name'] . '</a>';
|
||||
echo '</li>';
|
||||
endforeach;
|
||||
echo '</ul>';
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
316
templates/audit-seo/main-view.php
Normal file
316
templates/audit-seo/main-view.php
Normal file
@@ -0,0 +1,316 @@
|
||||
<?
|
||||
if ( \S::get( 'show_audit' ) )
|
||||
{
|
||||
$url = \front\factory\AuditSEO::audit( \S::get( 'audit_site' ) );
|
||||
}
|
||||
?>
|
||||
<div class="audit-result">
|
||||
<form method="POST" action="/audyt-seo/wynik">
|
||||
<input type="hidden" name="show_audit" value="1">
|
||||
<div class="form-group">
|
||||
<input type="text" name="audit_site" id="audit_site" class="form-control" value="" placeholder="adres url">
|
||||
<button type="submit">Audytuj</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-12 title">
|
||||
INFORMACJE OGÓLNE
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Domena:</span>
|
||||
<span class="value" id="audit_domain"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">IP:</span>
|
||||
<span class="value" id="audit_ip"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Lokalizacja serwera:</span>
|
||||
<span class="value" id="audit_location"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Obecność favicon:</span>
|
||||
<span class="value" id="audit_favicon"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">CMS:</span>
|
||||
<span class="value" id="audit_cms"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-12 title">
|
||||
WIDOCZNOŚĆ DLA ROBOTÓW
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Indeksowanie meta robots:</span>
|
||||
<span class="value" id="audit_meta_robots"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Indeksowanie robots.txt:</span>
|
||||
<span class="value" id="audit_robots_txt"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Przekierowanie www / bez www:</span>
|
||||
<span class="value" id="audit_redirect_www"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">SSL:</span>
|
||||
<span class="value" id="audit_https"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-12 title">
|
||||
TREŚĆ
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Meta title:</span>
|
||||
<span class="value" id="audit_meta_title"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Meta description:</span>
|
||||
<span class="value" id="audit_meta_description"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Meta keywords:</span>
|
||||
<span class="value" id="audit_meta_keywords"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Stosunek treści do kodu:</span>
|
||||
<span class="value" id="audit_code_to_text_ratio"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Ilość słów:</span>
|
||||
<span class="value" id="audit_words_count"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="subtitle bold">Nagłówki h1...h6:</div>
|
||||
<div>
|
||||
<span class="subtitle bold">H1:</span>
|
||||
<span class="value" id="audit_h1_count"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="subtitle bold">H2:</span>
|
||||
<span class="value" id="audit_h2_count"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="subtitle bold">H3:</span>
|
||||
<span class="value" id="audit_h3_count"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="subtitle bold">H4:</span>
|
||||
<span class="value" id="audit_h4_count"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="subtitle bold">H5:</span>
|
||||
<span class="value" id="audit_h5_count"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="subtitle bold">H6:</span>
|
||||
<span class="value" id="audit_h6_count"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-12 title">
|
||||
SZYBKOŚĆ STRONY
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Na komputerach:</span>
|
||||
<span class="value" id="audit_speed_computer"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="subtitle bold">Na telefonach:</span>
|
||||
<span class="value" id="audit_speed_mobile"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
<? if ( \S::get( 'show_audit' ) ):?>
|
||||
audit_data01();
|
||||
<? endif;?>
|
||||
});
|
||||
|
||||
function audit_data01()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/auditSEO/data01/',
|
||||
data:
|
||||
{
|
||||
url: '<?= $url;?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
$( '#audit_domain' ).html( data.effective_url );
|
||||
$( '#audit_ip' ).html( data.ip );
|
||||
$( '#audit_location' ).html( data.location );
|
||||
$( '#audit_favicon' ).html( data.favicon );
|
||||
$( '#audit_cms' ).html( data.cms );
|
||||
|
||||
audit_data02();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function audit_data02()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/auditSEO/data02/',
|
||||
data:
|
||||
{
|
||||
url: '<?= $url;?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
$( '#audit_meta_robots' ).html( data.meta_robots );
|
||||
$( '#audit_robots_txt' ).html( data.robots_txt );
|
||||
$( '#audit_redirect_www' ).html( data.redirect_www );
|
||||
$( '#audit_https' ).html( data.https );
|
||||
|
||||
audit_data03();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function audit_data03()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/auditSEO/data03/',
|
||||
data:
|
||||
{
|
||||
url: '<?= $url;?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
$( '#audit_meta_title' ).html( data.meta_title );
|
||||
$( '#audit_meta_description' ).html( data.meta_description );
|
||||
$( '#audit_meta_keywords' ).html( data.meta_keywords );
|
||||
$( '#audit_code_to_text_ratio' ).html( data.code_to_text_ratio );
|
||||
$( '#audit_words_count' ).html( data.words_count );
|
||||
$( '#audit_h1_count' ).html( data.h1_count );
|
||||
$( '#audit_h2_count' ).html( data.h2_count );
|
||||
$( '#audit_h3_count' ).html( data.h3_count );
|
||||
$( '#audit_h4_count' ).html( data.h4_count );
|
||||
$( '#audit_h5_count' ).html( data.h5_count );
|
||||
$( '#audit_h6_count' ).html( data.h6_count );
|
||||
|
||||
audit_data04();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function audit_data04()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/auditSEO/data04/',
|
||||
data:
|
||||
{
|
||||
url: '<?= $url;?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
$( '#audit_speed_computer' ).html( ( data.page_speed_insight_desktop.lighthouseResult.categories.performance.score * 100 ) );
|
||||
|
||||
audit_data05();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function audit_data05()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/auditSEO/data05/',
|
||||
data:
|
||||
{
|
||||
url: '<?= $url;?>'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
data = jQuery.parseJSON( response );
|
||||
$( '#audit_speed_mobile' ).html( ( data.page_speed_insight_mobile.lighthouseResult.categories.performance.score * 100 ) );
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
8
templates/banner/banners.php
Normal file
8
templates/banner/banners.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div id="banners-container">
|
||||
<? if ( is_array( $this -> banners ) ): foreach ( $this -> banners as $banner ):?>
|
||||
<div class="mini-banner" <? if ( $banner['languages']['url'] ):?>onClick="document.location.href='<?= $banner['languages']['url'];?>'; return false;"<? endif;?> <? if ( $banner['languages']['src'] ):?>style="background-image: url( '<?= $banner['languages']['src'];?>' );"<? endif;?>>
|
||||
<? if ( $banner['languages']['html'] ): echo $banner['languages']['html']; endif;?>
|
||||
<? if ( $banner['languages']['text'] ): echo $banner['languages']['text']; endif;?>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
25
templates/banner/main-banner.php
Normal file
25
templates/banner/main-banner.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<div id="banner-bg" onClick="banner_close(); return false;">
|
||||
<div id="banner" <? if ( $this -> banner['languages']['url'] ):?>onClick="document.location.href='<?= $this -> banner['languages']['url'];?>'; return false;"<? endif;?> <? if ( $this -> banner['languages']['src'] ):?>style="background-image: url( '<?= $this -> banner['src'];?>' );"<? endif;?>>
|
||||
<? if ( $this -> banner['languages']['html'] ): echo $this -> banner['languages']['html']; endif;?>
|
||||
<? if ( $this -> banner['languages']['text'] ): echo $this -> banner['languages']['text']; endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function banner_close()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: 'ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'banner_close'
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
jQuery( "#banner-bg" ).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
82
templates/inline-edit.php
Normal file
82
templates/inline-edit.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||
<script class="footer" type="text/javascript">
|
||||
$( function() {
|
||||
CKEDITOR.on( 'instanceCreated', function( event ) {
|
||||
var editor = event.editor,
|
||||
element = editor.element;
|
||||
editor.on( 'configLoaded', function () {
|
||||
editor.config.extraPlugins = 'showblocks,indent,justify,font,tableresize,find,texttransform,colorbutton,youtube,cmslinkarticle,cmslinkpage,colordialog,googlemaps,ckawesome,'
|
||||
+ 'jsplus_bootstrap_include,'
|
||||
+ 'jsplus_bootstrap_block_conf,jsplus_bootstrap_col_move_left,jsplus_bootstrap_col_move_right,jsplus_bootstrap_delete_col,jsplus_bootstrap_delete_row,'
|
||||
+ 'jsplus_bootstrap_row_move_down,jsplus_bootstrap_row_move_up,jsplus_bootstrap_show_blocks,'
|
||||
+ 'jsplus_bootstrap_templates,jsplus_bootstrap_table_new,jsplus_bootstrap_button,jsplus_bootstrap_icons,jsplus_bootstrap_badge,jsplus_bootstrap_label,'
|
||||
+ 'jsplus_bootstrap_breadcrumbs,jsplus_bootstrap_alert,'
|
||||
+ 'jsplus_bootstrap_table_conf,jsplus_bootstrap_table_row_conf,jsplus_bootstrap_table_col_conf,jsplus_bootstrap_table_cell_conf,jsplus_bootstrap_table_row_move_up,'
|
||||
+ 'jsplus_bootstrap_table_row_move_down,jsplus_bootstrap_table_col_move_left,jsplus_bootstrap_table_col_move_right,jsplus_bootstrap_table_add_row_up,jsplus_bootstrap_table_add_row_down,'
|
||||
+ 'jsplus_bootstrap_table_add_col_left,jsplus_bootstrap_table_add_col_right,jsplus_bootstrap_table_add_cell_left,jsplus_bootstrap_table_add_cell_right,jsplus_bootstrap_table_delete_col,'
|
||||
+ 'jsplus_bootstrap_table_delete_row,jsplus_bootstrap_table_delete_cell,jsplus_bootstrap_table_merge_cells,jsplus_bootstrap_table_merge_cell_right,jsplus_bootstrap_table_merge_cell_down,'
|
||||
+ 'jsplus_bootstrap_table_split_cell_hor,jsplus_bootstrap_table_split_cell_vert,bootstrapCollapse,bootstrapTab,ckawesome,copyformatting,codemirror,html5video,widget,widgetselection,clipboard,lineutils';
|
||||
editor.config.autoParagraph = false;
|
||||
editor.config.toolbar = [
|
||||
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
|
||||
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
|
||||
['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript','CopyFormatting'],
|
||||
['NumberedList', 'BulletedList', 'Indent', 'Outdent', 'CreateDiv'],
|
||||
['TextColor', 'BGColor'],
|
||||
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
||||
['Link', 'Unlink', 'cmslinkarticle', 'cmslinkpage'],
|
||||
['ckawesome', 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'Youtube'],
|
||||
['Styles', 'Format', 'Font', 'FontSize', 'ShowBlocks', 'Source', 'Maximize'],
|
||||
[
|
||||
'jsplus_bootstrap_show_blocks', 'jsplus_bootstrap_templates', 'jsplus_bootstrap_block_conf', 'jsplus_bootstrap_col_move_left', 'jsplus_bootstrap_col_move_right', 'jsplus_bootstrap_delete_col',
|
||||
'jsplus_bootstrap_delete_row', 'jsplus_bootstrap_row_move_down', 'jsplus_bootstrap_row_move_up'
|
||||
],
|
||||
['BootstrapCollapse', 'BootstrapTab'],
|
||||
[
|
||||
'jsplus_bootstrap_alert', 'jsplus_bootstrap_icons', 'jsplus_bootstrap_button', 'jsplus_bootstrap_badge', 'jsplus_bootstrap_label'
|
||||
],
|
||||
[
|
||||
'jsplus_bootstrap_table_new', 'jsplus_bootstrap_table_conf', 'jsplus_bootstrap_table_row_conf', 'jsplus_bootstrap_table_col_conf', 'jsplus_bootstrap_table_cell_conf', 'jsplus_bootstrap_table_row_move_up',
|
||||
'jsplus_bootstrap_table_row_move_down', 'jsplus_bootstrap_table_col_move_left', 'jsplus_bootstrap_table_col_move_right', 'jsplus_bootstrap_table_add_row_up', 'jsplus_bootstrap_table_add_row_down',
|
||||
'jsplus_bootstrap_table_add_col_left', 'jsplus_bootstrap_table_add_col_right', 'jsplus_bootstrap_table_add_cell_left', 'jsplus_bootstrap_table_add_cell_right', 'jsplus_bootstrap_table_delete_col',
|
||||
'jsplus_bootstrap_table_delete_row', 'jsplus_bootstrap_table_delete_cell', 'jsplus_bootstrap_table_merge_cells', 'jsplus_bootstrap_table_merge_cell_right', 'jsplus_bootstrap_table_merge_cell_down',
|
||||
'jsplus_bootstrap_table_split_cell_hor', 'jsplus_bootstrap_table_split_cell_vert'
|
||||
],
|
||||
['jsplus_bootstrap_advanced_blocks']
|
||||
];
|
||||
editor.config.jsplus_bootstrap_show_blocks_enabled_by_default = false;
|
||||
editor.on( 'blur', function( evt ) {
|
||||
|
||||
console.log(editor.getData());
|
||||
console.log(editor.name);
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'inline-edit-save',
|
||||
element_id: editor.name,
|
||||
element_value: editor.getData(),
|
||||
layout_id: <?= \S::get_session( 'layout_id' );?>,
|
||||
lang_id: '<? global $lang_id; echo $lang_id;?>',
|
||||
alltemplates: $( '#' + editor.name ).attr( 'alltemplates' )
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
//data = jQuery.parseJSON( response );
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
50
templates/menu/main-menu.php
Normal file
50
templates/menu/main-menu.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<div id="main-menu">
|
||||
<div id="menu-container-<?= $this -> menu['id'];?>">
|
||||
<?= \front\view\Menu::pages( $this -> menu['pages'], 0, $this -> current_page );?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main-menu-btn">
|
||||
<i class="fa fa-bars"></i>
|
||||
</div>
|
||||
<script class="footer" type="text/javascript">
|
||||
$(window).resize(function() {
|
||||
windowsize = $(window).width();
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '#main-menu-btn', function()
|
||||
{
|
||||
if ( windowsize <= 767 )
|
||||
{
|
||||
if ( $( this ).hasClass( 'active' ) )
|
||||
{
|
||||
$( this ).removeClass( 'active' );
|
||||
$( '#main-menu' ).removeClass( 'visible' );
|
||||
$( '#main-menu-btn i' ).addClass( 'fa-bars' ).removeClass( 'fa-times' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$( this ).addClass( 'active' );
|
||||
$( '#main-menu' ).addClass( 'visible' );
|
||||
$( '#main-menu-btn i' ).removeClass( 'fa-bars' ).addClass( 'fa-times' );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$( 'body' ).on( click_event, '#menu-container-<?= $this -> menu['id'];?> > ul > li > a', function(e)
|
||||
{
|
||||
if ( windowsize <= 767 )
|
||||
{
|
||||
if ( $( this ).parent().hasClass( 'parent' ) )
|
||||
e.preventDefault();
|
||||
|
||||
if ( !$( this ).parent().hasClass( 'active' ) )
|
||||
{
|
||||
$( '#menu-container-<?= $this -> menu['id'];?> > ul > li' ).removeClass( 'active' );
|
||||
$( this ).parent().addClass( 'active' );
|
||||
}
|
||||
else{
|
||||
$( '#menu-container-<?= $this -> menu['id'];?> > ul > li' ).removeClass( 'active' );
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
3
templates/menu/menu.php
Normal file
3
templates/menu/menu.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div id="menu-container-<?= $this -> menu['id'];?>">
|
||||
<?= \front\view\Menu::pages( $this -> menu['pages'], 0, $this -> current_page );?>
|
||||
</div>
|
||||
61
templates/menu/pages.php
Normal file
61
templates/menu/pages.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?
|
||||
if ( is_array( $this -> pages ) )
|
||||
{
|
||||
$settings = \front\factory\Settings::settings_details();
|
||||
|
||||
echo '<ul class="level-' . $this -> level . ' clear">';
|
||||
|
||||
foreach ( $this -> pages as $page )
|
||||
{
|
||||
$url = "";
|
||||
if ($settings['links_structure'])
|
||||
{
|
||||
if ($page['language']['seo_link'])
|
||||
{
|
||||
$url = '/'.\admin\factory\Pages::google_url_preview($page['id'], $page['language']['title'], $page['language']['lang_id'], 0, 0, $page['language']['seo_link']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$url = '/'. \admin\factory\Pages::google_url_preview($page['id'], $page['language']['title'], $page['language']['lang_id'], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['language']['seo_link'] ? $url = '/' . $page['language']['seo_link'] : $url = '/s-' . $page['id'] . '-' . \S::seo( $page['language']['title'] );
|
||||
}
|
||||
|
||||
if ( $page['page_type'] == 3 and $page['language']['link'] )
|
||||
$url = $page['language']['link'];
|
||||
|
||||
unset( $children );
|
||||
|
||||
if ( is_array( $page['pages'] ) ): foreach ( $page['pages'] as $page_tmp ):
|
||||
$children[] = $page_tmp['id'];
|
||||
endforeach; endif;
|
||||
|
||||
echo '<li id="link-' . $page['id'] . '" class="';
|
||||
|
||||
if ($page['id'] == $this -> current_page )
|
||||
echo ' active';
|
||||
|
||||
if( is_array( $page['pages'] ) and in_array( $this -> current_page, $children ) )
|
||||
echo ' open';
|
||||
|
||||
if ( is_array( $page['pages'] ) )
|
||||
echo ' parent';
|
||||
|
||||
echo '">';
|
||||
echo '<a href="';
|
||||
if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() and $url != '#' and $page['page_type'] != 3 )
|
||||
echo '/' . \S::get_session( 'current-lang' );
|
||||
echo $url; if ( $settings['url_version'] ) echo '/'; echo '"'; if ( $page['language']['noindex'] ) echo 'rel="nofollow"'; echo ' title="' . $page['language']['title'] . '"'; if ( is_array( $page['pages'] ) ) echo "class='menu-trigger'"; echo '>';
|
||||
echo $page['language']['title'];
|
||||
if ( is_array( $page['pages'] ) )
|
||||
echo '<i class="fa fa-caret-down"></i>';
|
||||
echo '</a>';
|
||||
echo \front\view\Menu::pages( $page['pages'], $this -> level + 1, $this -> current_page );
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
?>
|
||||
36
templates/menu/submenu.php
Normal file
36
templates/menu/submenu.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?
|
||||
global $settings;
|
||||
|
||||
if ( is_array( $this -> pages ) )
|
||||
{
|
||||
echo '<ul class="level-' . $this -> level . '" id="submenu-' . $this -> page_id . '">';
|
||||
foreach ( $this -> pages as $page )
|
||||
{
|
||||
$url = "";
|
||||
if ( $settings['links_structure'] )
|
||||
{
|
||||
if ( $page['language']['seo_link'] )
|
||||
$url = '/'.\admin\factory\Pages::google_url_preview( $page['id'], $page['language']['title'], $page['language']['lang_id'], 0, 0, $page['language']['seo_link'] );
|
||||
else
|
||||
$url = '/'. \admin\factory\Pages::google_url_preview( $page['id'], $page['language']['title'], $page['language']['lang_id'], 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
$page['language']['seo_link'] ? $url = '/' . $page['language']['seo_link'] : $url = '/s-' . $page['id'] . '-' . \S::seo( $page['language']['title'] );
|
||||
|
||||
if ( $page['page_type'] == 3 and $page['language']['link'] )
|
||||
$url = $page['language']['link'];
|
||||
|
||||
echo '<li id="link-' . $page['id'] . '" class="'; if ( $page['id'] == $this -> current_page ) echo ' active'; echo '">';
|
||||
echo '<a href="';
|
||||
if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() and $url != '#' )
|
||||
echo '/' . \S::get_session( 'current-lang' );
|
||||
echo $url . '"'; if ( $page['language']['noindex'] ) echo 'rel="nofollow"'; echo ' title="' . $page['language']['title'] . '"'; if ( is_array( $page['pages'] ) ) echo "class='menu-trigger'"; echo '>';
|
||||
echo $page['language']['title'];
|
||||
if ( is_array( $page['pages'] ) )
|
||||
echo '<i class="fa fa-chevron-down"></i>';
|
||||
echo '</a>';
|
||||
echo \front\view\Menu::submenu( $page['pages'], $this -> current_page, $this -> page_id, $this -> level + 1 );
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
170
templates/newsletter/newsletter.php
Normal file
170
templates/newsletter/newsletter.php
Normal file
@@ -0,0 +1,170 @@
|
||||
<? global $lang;?>
|
||||
<div id="newsletter">
|
||||
<form method="POST" data-toggle="validator" role="form" id="newsletter-form">
|
||||
<div class="form-group">
|
||||
<label for="newsletter-email"><?= ucfirst( $lang['email'] );?> <span class='red'>*</span>:</label>
|
||||
<input type='email' id="email" name="email" class="form-control" required />
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" id="agreement" /> <?= $lang['newsletter-zgoda'];?>
|
||||
</div>
|
||||
<div class="form-group clearfix">
|
||||
<a href="#" class="btn btn-primary" id="newsletter-signin">Zapisz się</a>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span id="first" class="bold"><?= $lang['newsletter-administrator-danych-1'];?></span> <span id="second" class="hidden"><?= $lang['newsletter-administrator-danych-2'];?></span><a href="#" id="toggle-data"><?= $lang['rozwin'];?></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
$( 'body' ).on( 'click', '#newsletter-form #toggle-data', function()
|
||||
{
|
||||
if ( $( '#newsletter-form #second' ).hasClass( 'hidden' ) )
|
||||
{
|
||||
$( '#newsletter-form #second' ).removeClass( 'hidden' );
|
||||
$( '#newsletter-form #toggle-data' ).html( '<?= $lang['zwin'];?>' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#newsletter-form #second' ).addClass( 'hidden' );
|
||||
$( '#newsletter-form #toggle-data' ).html( '<?= $lang['rozwin'];?>' );
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '#newsletter-form #newsletter-signin', function()
|
||||
{
|
||||
if ( !$( '#newsletter-form #agreement' ).is( ':checked' ) )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['blad'] );?>',
|
||||
content: '<?= $lang['newsletter-zgoda-komunikat'];?>',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 col-sm-offset-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
var email = $.trim( $( '#newsletter-form #email' ).val() );
|
||||
var token = $.trim( $( '#newsletter-form #token' ).val() );
|
||||
|
||||
if ( email === '' )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['blad'] );?>',
|
||||
content: '<?= $lang['newsletter-prosze-uzupelnic-email'];?>',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 col-sm-offset-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/newsletter/signin/',
|
||||
data:
|
||||
{
|
||||
email: email
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
alert1 = $.alert(
|
||||
{
|
||||
title: '<?= $lang['informacja'];?>',
|
||||
content: '<?= $lang['prosze-czekac'];?>',
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|60000',
|
||||
columnClass: 'col-sm-6 col-sm-offset-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
$( '.jqibox' ).remove();
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
var msg = '<?= $lang['newsletter-potwierdzenie-dodania'];?>';
|
||||
else
|
||||
var msg = '<?= $lang['newsletter-potwierdzenie-dodania-blad'];?>';
|
||||
|
||||
alert1.close();
|
||||
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= $lang['informacja'];?>',
|
||||
content: msg,
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 col-sm-offset-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
42
templates/newsletter/preview.php
Normal file
42
templates/newsletter/preview.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<? global $settings;?>
|
||||
<? if ( $this -> settings['newsletter_header'] ):?>
|
||||
<?= $this -> settings['newsletter_header'];?>
|
||||
<? endif;?>
|
||||
<div style="border-bottom: 1px solid #ccc; padding: 10px 0 0 0;">
|
||||
<? if ( is_array( $this -> template ) ):?>
|
||||
<div style="padding: 10px; background: #F1F1F1; margin-bottom: 10px">
|
||||
<?= $this -> template['text']?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( is_array( $this -> articles ) ):?>
|
||||
<? foreach ( $this -> articles as $article ):?>
|
||||
<? $article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );?>
|
||||
<div style="padding: 10px; background: #F1F1F1; margin-bottom: 10px">
|
||||
<?
|
||||
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
||||
?>
|
||||
<a href="<? if ( $settings['ssl'] ) echo 'https'; else echo 'http';?>://<?= $_SERVER['SERVER_NAME'];?>/<?= $url;?>" title="<?= $article['language']['title'];?>" style="margin-bottom: 10px; display: block; font-size: 14px; color: #5b7fb1; font-weight: 600;">
|
||||
<?= $article['language']['title'];?>
|
||||
</a>
|
||||
<div>
|
||||
<?
|
||||
if ( $article['language']['entry'] )
|
||||
echo $article['language']['entry'];
|
||||
else
|
||||
echo $article['language']['text'];
|
||||
?>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<? endforeach;?>
|
||||
<? else:?>
|
||||
<? if ( $this -> dates ):?>
|
||||
<div style="padding: 10px; background: #F1F1F1; margin-bottom: 10px; text-align: center;">
|
||||
--- brak artykułów w danym okresie ---
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? if ( $this -> settings['newsletter_footer_2'] ):?>
|
||||
<?= $this -> settings['newsletter_footer_2'];?>
|
||||
<? endif;?>
|
||||
490
templates/pages/page-edit.php
Normal file
490
templates/pages/page-edit.php
Normal file
@@ -0,0 +1,490 @@
|
||||
<script type="text/javascript">
|
||||
var link_lang = '';
|
||||
$(function ()
|
||||
{
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
google_preview('<?= $lg['id']; ?>', 0);
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
|
||||
disable_menu();
|
||||
|
||||
$('body').on('change', '#page_type', function ()
|
||||
{
|
||||
var page_type = $(this).val();
|
||||
|
||||
if (page_type == 0 || page_type == 1 || page_type == 2)
|
||||
{
|
||||
$('#articles_limit').parents('.form-group').show();
|
||||
$('#link-content').addClass('hide');
|
||||
} else if (page_type == 3)
|
||||
{
|
||||
$('#link-content').removeClass('hide');
|
||||
$('#articles_limit').parents('.form-group').hide();
|
||||
} else
|
||||
{
|
||||
$('#articles_limit').parents('.form-group').hide();
|
||||
$('#link-content').addClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
$('#settings-tabs').easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'settings-tabs'
|
||||
});
|
||||
|
||||
$('#languages-main').easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-main'
|
||||
});
|
||||
|
||||
$('#languages-seo').easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-seo'
|
||||
});
|
||||
|
||||
$('#languages-links').easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-links'
|
||||
});
|
||||
|
||||
$('#page_type').trigger('change');
|
||||
|
||||
$('body').on('click', '.mfp-close', function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
$.magnificPopup.close();
|
||||
});
|
||||
|
||||
$('body').on('click', '.url-select', function ()
|
||||
{
|
||||
$('#link_' + link_lang).val($(this).attr('url'));
|
||||
$.magnificPopup.close();
|
||||
});
|
||||
});
|
||||
|
||||
function generate_seo_links( lang, title, page_id, pid )
|
||||
{
|
||||
var default_language = '<?= \front\factory\Languages::default_language(); ?>';
|
||||
|
||||
if ( title === '' )
|
||||
return false;
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'generate_seo_link',
|
||||
title: title,
|
||||
page_id: page_id,
|
||||
lang: lang,
|
||||
pid: pid
|
||||
},
|
||||
beforeSend: function ()
|
||||
{
|
||||
$('#overlay').show();
|
||||
},
|
||||
success: function (data)
|
||||
{
|
||||
$('#overlay').hide();
|
||||
|
||||
response = jQuery.parseJSON(data);
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
{
|
||||
$('#seo_link_' + lang).val( response.seo_link );
|
||||
google_preview( lang, pid );
|
||||
}
|
||||
else
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function google_preview( lang_id, pid )
|
||||
{
|
||||
var default_language = '<?= \front\factory\Languages::default_language(); ?>';
|
||||
var title = $( '#title_' + lang_id ).val();
|
||||
var meta_title = $( '#meta_title_' + lang_id ).val();
|
||||
var seo_link = $( '#seo_link_' + lang_id ).val();
|
||||
var description = $( '#meta_description_' + lang_id ).val();
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'google_url_preview',
|
||||
title: title,
|
||||
lang_id: lang_id,
|
||||
page_id: $('#id').val(),
|
||||
pid: pid,
|
||||
seo_link: seo_link,
|
||||
default_language: default_language
|
||||
},
|
||||
success: function (data)
|
||||
{
|
||||
$( '#google-preview-' + lang_id + ' .google-url' ).html( '<?= $_SERVER['SERVER_NAME']; ?>/' + data );
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof meta_title !== "undefined" && meta_title != '')
|
||||
{
|
||||
if (meta_title.length < 65)
|
||||
$('#google-preview-' + lang_id + ' .google-title').html(meta_title);
|
||||
else if (typeof description !== "undefined")
|
||||
{
|
||||
var space = meta_title.lastIndexOf(" ", 65);
|
||||
$('#google-preview-' + lang_id + ' .google-title').html(meta_title.substring(0, space).concat('...'));
|
||||
}
|
||||
} else if (typeof title !== "undefined" && title != '')
|
||||
{
|
||||
title = title + ' ● <?= $this->settings['firm_name']; ?>';
|
||||
|
||||
if (title.length < 65)
|
||||
$('#google-preview-' + lang_id + ' .google-title').html(title);
|
||||
else if (typeof description !== "undefined")
|
||||
{
|
||||
var space = title.lastIndexOf(" ", 65);
|
||||
$('#google-preview-' + lang_id + ' .google-title').html(title.substring(0, space).concat('...'));
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof description !== "undefined" && description.length < 153)
|
||||
$('#google-preview-' + lang_id + ' .google-description').html(description);
|
||||
else if (typeof description !== "undefined")
|
||||
{
|
||||
var space = description.lastIndexOf(" ", 153);
|
||||
$('#google-preview-' + lang_id + ' .google-description').html(description.substring(0, space).concat('...'));
|
||||
}
|
||||
}
|
||||
|
||||
function pages_url_browser(lang_id)
|
||||
{
|
||||
link_lang = lang_id;
|
||||
|
||||
$.magnificPopup.open({
|
||||
removalDelay: 500,
|
||||
items: {
|
||||
src: '/admin/pages/pages_url_browser/modal=true'
|
||||
},
|
||||
type: 'ajax',
|
||||
overflowY: 'scroll'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div id="settings-tabs">
|
||||
<ul class="resp-tabs-list settings-tabs">
|
||||
<li><i class="fa fa-file"></i>Treść</li>
|
||||
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||
<li><i class="fa fa-globe"></i>SEO</li>
|
||||
</ul>
|
||||
<div class="resp-tabs-container settings-tabs">
|
||||
<div>
|
||||
<div id="languages-main">
|
||||
<ul class="resp-tabs-list languages-main">
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
<? if ($lg['status']): ?>
|
||||
<li><? if ($lg['id'] == \front\factory\Languages::default_language()) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> '; ?><?= $lg['name']; ?></a></li>
|
||||
<? endif; ?>
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-main">
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
<? if ($lg['status']): ?>
|
||||
<div>
|
||||
<?=
|
||||
\Html::input(
|
||||
array(
|
||||
'label' => 'Nazwa strony',
|
||||
'name' => 'title',
|
||||
'id' => 'title_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['title'],
|
||||
'js_key' => 'google_preview( "' . $lg['id'] . '", "' . \S::get('pid') . '" ); return false;'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 15px;">
|
||||
<?
|
||||
if (is_array($this->menus)): foreach ($this->menus as $menu):
|
||||
$menus[$menu['id']] = $menu['name'];
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
<?=
|
||||
\Html::select(
|
||||
array(
|
||||
'label' => 'Menu',
|
||||
'name' => 'menu_id',
|
||||
'values' => $menus,
|
||||
'value' => $this->page['id'] ? $this->page['menu_id'] : $this->menu_id
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::select(
|
||||
array(
|
||||
'label' => 'Typ strony',
|
||||
'name' => 'page_type',
|
||||
'id' => 'page_type',
|
||||
'values' => \admin\factory\Pages::$_page_types,
|
||||
'value' => $this->page['page_type']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div id="link-content" class="hide">
|
||||
<div id="languages-links">
|
||||
<ul class="resp-tabs-list languages-links">
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
<? if ($lg['status']): ?>
|
||||
<li><? if ($lg['id'] == \front\factory\Languages::default_language()) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> '; ?><?= $lg['name']; ?></a></li>
|
||||
<? endif; ?>
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-links">
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
<? if ($lg['status']): ?>
|
||||
<div>
|
||||
<?=
|
||||
\Html::input_icon(
|
||||
array(
|
||||
'label' => 'Link',
|
||||
'name' => 'link',
|
||||
'id' => 'link_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['link'],
|
||||
'icon_class' => 'fa fa-link',
|
||||
'icon_js' => 'pages_url_browser( "' . $lg['id'] . '");'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?=
|
||||
\Html::select(
|
||||
array(
|
||||
'label' => 'Sortowanie artykułów',
|
||||
'name' => 'sort_type',
|
||||
'id' => 'sort_type',
|
||||
'values' => \admin\factory\Pages::$_sort_types,
|
||||
'value' => $this->page['sort_type']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?
|
||||
$layouts[''] = '---- szablon ----';
|
||||
if (is_array($this->layouts)): foreach ($this->layouts as $layout):
|
||||
$layouts[$layout['id']] = $layout['name'];
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
<?=
|
||||
\Html::select(
|
||||
array(
|
||||
'label' => 'Szablon',
|
||||
'name' => 'layout_id',
|
||||
'id' => 'layout_id',
|
||||
'values' => $layouts,
|
||||
'value' => $this->page['layout_id']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::input(
|
||||
array(
|
||||
'label' => 'Liczba artykułów na stronę',
|
||||
'name' => 'articles_limit',
|
||||
'id' => 'articles_limit',
|
||||
'value' => $this->page['articles_limit'] ? $this->page['articles_limit'] : 2
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::input_switch(
|
||||
array(
|
||||
'label' => 'Pokaż tytuł',
|
||||
'name' => 'show_title',
|
||||
'checked' => $this->page['show_title'] == 1 or ! $this->page['id'] ? true : false
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::input_switch(
|
||||
array(
|
||||
'label' => 'Aktywna',
|
||||
'name' => 'status',
|
||||
'checked' => $this->page['status'] == 1 or ! $this->page['id'] ? true : false
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::input_switch(
|
||||
array(
|
||||
'label' => 'Strona startowa',
|
||||
'name' => 'start',
|
||||
'checked' => $this->page['start'] == 1 ? true : false
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<div id="languages-seo">
|
||||
<ul class="resp-tabs-list languages-seo">
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
<? if ($lg['status']): ?>
|
||||
<li><? if ($lg['id'] == \front\factory\Languages::default_language()) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> '; ?><?= $lg['name']; ?></a></li>
|
||||
<? endif; ?>
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-seo">
|
||||
<? if (is_array($this->languages)): foreach ($this->languages as $lg): ?>
|
||||
<? if ($lg['status']): ?>
|
||||
<div>
|
||||
<?=
|
||||
\Html::input_icon(
|
||||
array(
|
||||
'label' => 'Link SEO',
|
||||
'name' => 'seo_link',
|
||||
'id' => 'seo_link_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['seo_link'],
|
||||
'icon_content' => 'generuj',
|
||||
'icon_js' => 'generate_seo_links( "' . $lg['id'] . '", $( "#title_' . $lg['id'] . '" ).val(), ' . (int) $this->page['id'] . ', ' . \S::get('pid') . ' );',
|
||||
'js_key' => 'google_preview( "' . $lg['id'] . '", "' . \S::get('pid') . '" ); return false;'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::input(
|
||||
array(
|
||||
'label' => 'Tytuł strony (h1)',
|
||||
'name' => 'site_title',
|
||||
'id' => 'site_title_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['site_title']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::input(
|
||||
array(
|
||||
'label' => 'Meta title',
|
||||
'name' => 'meta_title',
|
||||
'id' => 'meta_title_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['meta_title'],
|
||||
'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::textarea(
|
||||
array(
|
||||
'label' => 'Meta description',
|
||||
'name' => 'meta_description',
|
||||
'id' => 'meta_description_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['meta_description'],
|
||||
'js_key' => 'google_preview( "' . $lg['id'] . '" ); return false;'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?=
|
||||
\Html::textarea(
|
||||
array(
|
||||
'label' => 'Meta keywords',
|
||||
'name' => 'meta_keywords',
|
||||
'id' => 'meta_keywords_' . $lg['id'],
|
||||
'value' => $this->page['languages'][$lg['id']]['meta_keywords']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div class="form-group ">
|
||||
<label class="col-lg-4 control-label">Podgląd google:</label>
|
||||
<div class="col-lg-8">
|
||||
<div id="google-preview-<?= $lg['id']; ?>">
|
||||
<div class="google-title"></div>
|
||||
<div class="google-url"></div>
|
||||
<div class="google-description"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?=
|
||||
\Html::select(
|
||||
array(
|
||||
'label' => 'Blokuj indeksację',
|
||||
'name' => "noindex",
|
||||
'id' => 'noindex_' . $lg['id'],
|
||||
'values' => array(
|
||||
0 => 'nie', 1 => 'tak'
|
||||
),
|
||||
'value' => $this->page['languages'][$lg['id']]['noindex'] == 1 ? 1 : 0
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<? endif; ?>
|
||||
<? endforeach;
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid->id = 'page-edit';
|
||||
$grid->gdb_opt = $gdb;
|
||||
$grid->include_plugins = true;
|
||||
$grid->title = 'Edycja strony';
|
||||
$grid->fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this->page['id']
|
||||
],
|
||||
[
|
||||
'db' => 'parent_id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this->page['id'] ? $this->page['parent_id'] : $this->parent_id
|
||||
]
|
||||
];
|
||||
$grid->actions = [
|
||||
'save' => ['url' => '/admin/pages/page_save/', 'back_url' => '/admin/pages/view_list/'],
|
||||
'cancel' => ['url' => '/admin/pages/view_list/']
|
||||
];
|
||||
$grid->external_code = $out;
|
||||
$grid->persist_edit = true;
|
||||
$grid->id_param = 'id';
|
||||
|
||||
echo $grid->draw();
|
||||
?>
|
||||
14
templates/scontainers/scontainer.php
Normal file
14
templates/scontainers/scontainer.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<? global $lang;?>
|
||||
<? if ( $this -> scontainer['status'] == 1 ):?>
|
||||
<div id="scontainer-<?= $this -> scontainer['id'];?>" <? if ( $this -> scontainer['src'] ):?>style="background: url('<?= $this -> scontainer['src'];?>')"<? endif;?>>
|
||||
<? if ( $this -> scontainer['show_title'] == 1 ):?>
|
||||
<div class="scontainer-title">
|
||||
<?= $this -> scontainer['languages']['title'];?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class="scontainer-content" id="scontainer-<?= $this -> scontainer['id'];?>-content" contenteditable="true">
|
||||
<? if ( $this -> scontainer['languages']['text'] ) echo $this -> scontainer['languages']['text'];?>
|
||||
<? if ( $this -> scontainer['languages']['html'] ) echo $this -> scontainer['languages']['html'];?>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
31
templates/search/search-form.php
Normal file
31
templates/search/search-form.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<? global $lang;?>
|
||||
<div id="search-form">
|
||||
<form method="POST" action="/wyszukiwarka">
|
||||
<label>Szukaj na stronie</label>
|
||||
<input type="text" name="search_txt" id="search_txt" />
|
||||
<button class="btn btn-primary">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready( function()
|
||||
{
|
||||
$( 'body' ).on( 'click', '#search-form .btn', function()
|
||||
{
|
||||
var search_txt = $( '#search_txt' ).val();
|
||||
search_txt = search_txt.trim();
|
||||
if ( search_txt.length < 3 )
|
||||
{
|
||||
$.prompt( 'Proszę wpisać co najmniej 3 znaki.', {
|
||||
title: '<?= ucfirst( $lang['blad'] );?>',
|
||||
buttons: {
|
||||
'<?= $lang['zamknij'];?>': true
|
||||
}
|
||||
} );
|
||||
return false;
|
||||
}
|
||||
$( '#search-form form' ).submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
23
templates/search/search-results.php
Normal file
23
templates/search/search-results.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<? global $lang;?>
|
||||
<div id="search-results">
|
||||
<? if ( !$this -> articles ):?>
|
||||
<div class="alert alert-danger">
|
||||
<i class="fa fa-exclamation-circle"></i>Nie znaleziono danych
|
||||
</div>
|
||||
<? else:?>
|
||||
<ul>
|
||||
<? foreach ( $this -> articles as $article ):?>
|
||||
<li>
|
||||
<?
|
||||
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
||||
?>
|
||||
<h3 class="article-title">
|
||||
<a href="/<? if ( \S::get_session( 'current-lang' ) != \front\factory\Languages::default_language() ) echo \S::get_session( 'current-lang' ) . '/';?><?= $url;?>" title="<?= $article['language']['title'];?>" <? if ( $article['language']['noindex'] ):?>rel="nofollow"<? endif;?>><?= $article['language']['title'];?></a>
|
||||
</h3>
|
||||
<?
|
||||
?>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ul>
|
||||
<? endif;?>
|
||||
</div>
|
||||
3
templates/site/alert.php
Normal file
3
templates/site/alert.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="alert <?= $this -> alert_class ? $this -> alert_class : 'alert-success';?>">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a><?= $this -> alert;?>
|
||||
</div>
|
||||
188
templates/site/calendar.php
Normal file
188
templates/site/calendar.php
Normal file
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
$date = mktime( 12, 0, 0, $this -> month, 1, $this -> year );
|
||||
$daysInMonth = date( "t", $date );
|
||||
$offset = date( "w", $date ) - 1; if ( $offset < 0 ) $offset = 6;
|
||||
$rows = 1;
|
||||
$prev_month = $this -> month - 1;
|
||||
$prev_year = $this -> year;
|
||||
|
||||
if ( $this -> month == 1 )
|
||||
{
|
||||
$prev_month = 12;
|
||||
$prev_year = $this -> year - 1;
|
||||
}
|
||||
|
||||
$next_month = $this -> month + 1;
|
||||
$next_year = $this -> year;
|
||||
|
||||
if ( $this -> month == 12 )
|
||||
{
|
||||
$next_month = 1;
|
||||
$next_year = $this -> year + 1;
|
||||
}
|
||||
|
||||
?>
|
||||
<? if ( !$this -> ajax ):?>
|
||||
<div id="calendar-container">
|
||||
<? endif;?>
|
||||
<div class='panel-heading text-center'>
|
||||
<div class='row'>
|
||||
<div class='col-md-3 col-xs-4'>
|
||||
<a class='month-prev btn btn-light btn-sm active' title="Poprzedni miesiąc" month="<?= $prev_month;?>" year="<?= $prev_year;?>">
|
||||
<span class='glyphicon glyphicon-arrow-left'></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class='col-md-6 col-xs-4'>
|
||||
<strong><?= $this -> months[ $this -> month ] . ' ' . $this -> year;?></strong>
|
||||
</div>
|
||||
<div class='col-md-3 col-xs-4 '>
|
||||
<a class='month-next btn btn-light btn-sm active' title="Następny miesiąc" month="<?= $next_month;?>" year="<?= $next_year;?>">
|
||||
<span class='glyphicon glyphicon-arrow-right'></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-bordered'>
|
||||
<tr>
|
||||
<th>Pn</th>
|
||||
<th>Wt</th>
|
||||
<th>Śr</th>
|
||||
<th>Cz</th>
|
||||
<th>Pt</th>
|
||||
<th>Sb</th>
|
||||
<th>Nd</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<? for ( $i = 1; $i <= $offset; $i++ ):?>
|
||||
<td></td>
|
||||
<? endfor;?>
|
||||
<?
|
||||
for ( $day = 1; $day <= $daysInMonth; $day++ )
|
||||
{
|
||||
if ( ( $day + $offset - 1 ) % 7 == 0 && $day != 1 )
|
||||
{
|
||||
echo "</tr><tr>";
|
||||
$rows++;
|
||||
}
|
||||
echo "<td class='";
|
||||
|
||||
if ( date( 'w', strtotime( $day . '-' . $this -> month . '-' . $this -> year ) ) == 6 )
|
||||
echo 'sb ';
|
||||
|
||||
if ( date( 'w', strtotime( $day . '-' . $this -> month . '-' . $this -> year ) ) == 0 )
|
||||
echo 'nd ';
|
||||
|
||||
$class = '';
|
||||
$out_list = '';
|
||||
|
||||
if ( is_array( $this -> articles ) ) foreach ( $this -> articles as $article )
|
||||
{
|
||||
$date_tmp = date( 'Y-m-d', strtotime( $day . '-' . $this -> month . '-' . $this -> year ) );
|
||||
|
||||
if ( $date_tmp >= $article['date_start'] and $date_tmp <= $article['date_end'] )
|
||||
{
|
||||
$class = 'event ';
|
||||
|
||||
if ( !$out_list )
|
||||
$out_list = '<ul id="events-' . $date_tmp . '">';
|
||||
|
||||
$article['language']['seo_link'] ? $url = $article['language']['seo_link'] : $url = 'a-' . $article['id'] . '-' . \S::seo( $article['language']['title'] );
|
||||
|
||||
$out_list .= '<li>';
|
||||
$out_list .= '<a href="/' . $url . '" title="' . $article['language']['title'] . '"';
|
||||
if ( $this -> article['language']['noindex'] )
|
||||
$out_list .= 'rel="nofollow"';
|
||||
$out_list .= '>' . $article['language']['title'] . '</a>';
|
||||
$out .= '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( $out_list )
|
||||
$out_list .= '</ul>';
|
||||
|
||||
$out .= $out_list;
|
||||
|
||||
echo $class;
|
||||
echo "' date='" . $date_tmp . "'>" . $day . "</td>";
|
||||
}
|
||||
while ( ($day + $offset) <= $rows * 7 )
|
||||
{
|
||||
echo "<td></td>";
|
||||
$day++;
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<?= $out;?>
|
||||
<a href="#" id="event-back">Wstecz</a>
|
||||
<? if ( !$this -> ajax ):?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready( function()
|
||||
{
|
||||
$( 'body' ).on( 'click', '.event', function()
|
||||
{
|
||||
var date = $( this ).attr( 'date' );
|
||||
$( '#calendar-container .panel-heading, #calendar-container table, #calendar-container ul' ).hide();
|
||||
$( '#events-' + date + ', #event-back' ).show();
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '#event-back', function()
|
||||
{
|
||||
var date = $( this ).attr( 'date' );
|
||||
$( '#calendar-container .panel-heading, #calendar-container table' ).show();
|
||||
$( '#calendar-container ul, #event-back' ).hide();
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.month-next.active', function()
|
||||
{
|
||||
$( '.month-next' ).removeClass( 'active' );
|
||||
$( '#calendar-container' ).addClass( 'disable' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'calendar',
|
||||
month: $( '.month-next' ).attr( 'month' ),
|
||||
year: $( '.month-next' ).attr( 'year' )
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#calendar-container' ).html( data );
|
||||
$( '.month-next' ).addClass( 'active' );
|
||||
$( '#calendar-container' ).removeClass( 'disable' );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.month-prev.active', function()
|
||||
{
|
||||
$( '.month-prev' ).removeClass( 'active' );
|
||||
$( '#calendar-container' ).addClass( 'disable' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'calendar',
|
||||
month: $( '.month-prev' ).attr( 'month' ),
|
||||
year: $( '.month-prev' ).attr( 'year' )
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#calendar-container' ).html( data );
|
||||
$( '.month-prev' ).addClass( 'active' );
|
||||
$( '#calendar-container' ).removeClass( 'disable' );
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<? endif;?>
|
||||
264
templates/site/contact.php
Normal file
264
templates/site/contact.php
Normal file
@@ -0,0 +1,264 @@
|
||||
<? global $settings, $lang, $config;?>
|
||||
<? if ( $settings['google_maps'] and $settings['firm_adress'] ):?>
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&key=<?=$settings['google_map_key']?>"></script>
|
||||
<script type="text/javascript">
|
||||
google.maps.event.addDomListener(window, 'load', init);
|
||||
function init() {
|
||||
var mapOptions = {
|
||||
zoom: 14,
|
||||
scrollwheel: false,
|
||||
styles: [{"elementType":"geometry","stylers":[{"hue":"#ff4400"},{"saturation":-68},{"lightness":-4},{"gamma":0.72}]},{"featureType":"road","elementType":"labels.icon"},{"featureType":"landscape.man_made","elementType":"geometry","stylers":[{"hue":"#0077ff"},{"gamma":3.1}]},{"featureType":"water","stylers":[{"hue":"#00ccff"},{"gamma":0.44},{"saturation":-33}]},{"featureType":"poi.park","stylers":[{"hue":"#44ff00"},{"saturation":-23}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"hue":"#007fff"},{"gamma":0.77},{"saturation":65},{"lightness":99}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"gamma":0.11},{"weight":5.6},{"saturation":99},{"hue":"#0091ff"},{"lightness":-86}]},{"featureType":"transit.line","elementType":"geometry","stylers":[{"lightness":-48},{"hue":"#ff5e00"},{"gamma":1.2},{"saturation":-23}]},{"featureType":"transit","elementType":"labels.text.stroke","stylers":[{"saturation":-64},{"hue":"#ff9100"},{"lightness":16},{"gamma":0.47},{"weight":2.7}]}]
|
||||
};
|
||||
var mapElement = document.getElementById('google-map');
|
||||
var map = new google.maps.Map(mapElement, mapOptions);
|
||||
|
||||
var geocoder = new google.maps.Geocoder();
|
||||
var address = '<?= preg_replace( '/\s+/', ' ', $settings['firm_adress'] );?>';
|
||||
geocoder.geocode({'address': address}, function(results, status) {
|
||||
if (status === google.maps.GeocoderStatus.OK) {
|
||||
map.setCenter(results[0].geometry.location);
|
||||
var marker = new google.maps.Marker({
|
||||
map: map,
|
||||
position: results[0].geometry.location
|
||||
});
|
||||
} else {
|
||||
alert('Geocode was not successful for the following reason: ' + status);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div id='google-map'></div>
|
||||
<? endif;?>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div id="contact-additional-info"><?= $settings['additional_info'];?></div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<? if ( $settings['contact_form'] ):?>
|
||||
<form class="form-horizontal" id="contact-form">
|
||||
<div id="contact-form">
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-xs-12"><?= ucfirst( $lang['email'] );?> <span class='red'>*</span>:</label>
|
||||
<div class="col-xs-12">
|
||||
<input type='text' id="email" name="email" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="phone" class="col-xs-12"><?= ucfirst( $lang['nr-telefonu'] );?> <span class='red'>*</span>:</label>
|
||||
<div class="col-xs-12">
|
||||
<input type='text' id="phone" name="phone" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-xs-12"><?= ucfirst( $lang['temat'] );?>:</label>
|
||||
<div class="col-xs-12">
|
||||
<input type='text' id="subject" name="subject" value="Zapytanie ze strony <?= preg_replace( '#^(http(s)?://)?w{3}\.#', '$1', $_SERVER['SERVER_NAME'] );?>" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="text" class="col-xs-12"><?= ucfirst( $lang['wiadomosc'] );?>:</label>
|
||||
<div class="col-xs-12">
|
||||
<textarea id="text" name="text" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12 small">
|
||||
<input type="checkbox" id="agreement" name="agreement" required="required" style="position: relative; top: 2px;" /> <?= $lang['kontakt-zgoda-checkbox'];?>
|
||||
</div>
|
||||
</div>
|
||||
<? if ( $settings['contact_form_captcha'] ):?>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12 small">
|
||||
<div class="captcha">
|
||||
<div class="check"> </div> <span>Nie jestem robotem</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<a class='btn btn-success' id="contact-form-send" onclick="send_message(); return false;"><?= $lang['wyslij'];?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<? if ( $settings['contact_form_captcha'] ):?>
|
||||
<link href="/libraries/jquery/captcha.css" rel="stylesheet" type="text/css">
|
||||
<script class="footer" type="text/javascript" src="/libraries/jquery/captcha.js"></script>
|
||||
<? endif;?>
|
||||
<script class="footer" type="text/javascript">
|
||||
<? if ( $settings['contact_form_captcha'] ):?>
|
||||
$( function()
|
||||
{
|
||||
$( '#contact-form' ).captcha();
|
||||
});
|
||||
<? endif;?>
|
||||
|
||||
function send_message()
|
||||
{
|
||||
var email = $.trim( $( '#contact-form #email' ).val() );
|
||||
var phone = $.trim( $( '#contact-form #phone' ).val() );
|
||||
var subject = $.trim( $( '#contact-form #subject' ).val() );
|
||||
var text = $.trim( $( '#contact-form #text' ).val() );
|
||||
|
||||
if ( email === '' && phone === '' )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['blad'] );?>',
|
||||
content: '<?= $lang['prosze-uzupelnic-email-i-telefon'];?>',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 offset-sm-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !$( '#contact-form #agreement' ).is( ':checked' ) )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['blad'] );?>',
|
||||
content: '<?= $lang['prosze-zaznaczyc-zgode'];?>',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 offset-sm-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
<? if ( $settings['contact_form_captcha'] ):?>
|
||||
if ( !verifyCaptcha( '#contact-form' ) )
|
||||
{
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['blad'] );?>',
|
||||
content: 'Proszę uzupełnić captchę',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 offset-sm-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
<? endif;?>
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: 'ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'contact_form',
|
||||
email: email,
|
||||
phone: phone,
|
||||
subject: subject,
|
||||
text: text
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
alert1 = $.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['informacja'] );?>',
|
||||
content: '<?= $lang['prosze-czekac'];?>',
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|60000',
|
||||
columnClass: 'col-sm-6 offset-sm-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
var msg = '<?= $lang['wiadomosc-zostala-wyslana'];?>';
|
||||
else
|
||||
var msg = '<?= $lang['wiadomosc-niezostala-wyslana'];?>';
|
||||
|
||||
alert1.close();
|
||||
|
||||
$( '#contact-formp-big #email, #contact-form-big #text' ).val( '' );
|
||||
|
||||
$.alert(
|
||||
{
|
||||
title: '<?= ucfirst( $lang['informacja'] );?>',
|
||||
content: msg,
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6 offset-sm-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
27
templates/site/contrast.php
Normal file
27
templates/site/contrast.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<div id="contrast">
|
||||
<a href="#">
|
||||
<i class="fa fa-adjust"></i>
|
||||
</a>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
$( 'body' ).on( 'click', '#contrast a', function()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'contrast'
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
34
templates/site/cookie-information.php
Normal file
34
templates/site/cookie-information.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<div id="cookie-information">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
W ramach naszej witryny stosujemy pliki cookies w celu świadczenia Państwu usług na najwyższym poziomie, w tym w sposób dostosowany do indywidualnych potrzeb.
|
||||
Korzystanie z witryny bez zmiany ustawień dotyczących cookies oznacza akceptację faktu iż będą one zamieszczane w Państwa urządzeniu końcowym.
|
||||
Możecie Państwo dokonać w każdym czasie zmiany ustawień dotyczących cookies. <a href="#" onclick="cookie_close(); return false;">[akceptuję]</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function cookie_close()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'cookie_close'
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#cookie-information' ).remove();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#cookie-information' ).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
3
templates/site/copyright.php
Normal file
3
templates/site/copyright.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div id="copyright">
|
||||
Realizacja: <a href="http://www.project-pro.pl/" title="Project-Pro">Project-Pro</a> - <a href="http://www.project-pro.pl/" title="projektowanie stron www">projektowanie stron www</a>
|
||||
</div>
|
||||
48
templates/site/facebook.php
Normal file
48
templates/site/facebook.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<div id="facebook">
|
||||
<div id="facebook-toggle"></div>
|
||||
<iframe src="//www.facebook.com/plugins/likebox.php?href=<?= urlencode( $this -> facebook_link );?>&width=292&height=558&show_faces=true&colorscheme=light&stream=true&border_color=%23FFF&header=false&appId=194295077275888" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:558px;" allowTransparency="true"></iframe>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
#facebook {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
margin-top: -277px;
|
||||
background: #FFF;
|
||||
z-index: 10;
|
||||
border: 1px solid #3B5998;
|
||||
border-left: 0px;
|
||||
width: 292px;
|
||||
height: 558px;
|
||||
left: -293px;
|
||||
-webkit-box-shadow: 1px 0px 3px 1px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 1px 0px 3px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
#facebook-toggle {
|
||||
background: url( '/images/system/facebook.jpg' ) no-repeat center;
|
||||
height: 133px;
|
||||
width: 50px;
|
||||
position: relative;
|
||||
z-index: 12;
|
||||
float: right;
|
||||
right: -50px;
|
||||
top: -1px;
|
||||
-webkit-box-shadow: 1px 0px 3px 1px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 1px 0px 3px 1px rgba(0, 0, 0, 0.3);
|
||||
cursor: pointer;
|
||||
}
|
||||
#facebook iframe {
|
||||
margin-top: -133px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
$( '#facebook-toggle' ).click( function()
|
||||
{
|
||||
if ( !$( '#facebook' ).hasClass( 'show' ) )
|
||||
$( '#facebook' ).addClass( 'show' ).animate({ left: -1 }, 1000 );
|
||||
else
|
||||
$( '#facebook' ).removeClass( 'show' ).animate({ left: -293 }, 500 );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
20
templates/site/languages.php
Normal file
20
templates/site/languages.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<? global $lang_id, $page;?>
|
||||
<div id="languages">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<? if ( is_array( $this -> languages ) ):?>
|
||||
<ul>
|
||||
<? foreach ( $this -> languages as $lg ):?>
|
||||
<li <? if ( $lang_id == $lg['id'] ) echo 'class="active"';?>>
|
||||
<a href="<?= \front\factory\Pages::lang_url( $page['id'], $lg['id'], $lg['domain'], $this -> default_domain );?>" title="Język: <?= $lg['name'];?>">
|
||||
<img src="/admin/css/lang-<?= $lg['id'];?>.jpg" alt="Język: <?= $lg['name'];?>">
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ul>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
44
templates/site/pager.php
Normal file
44
templates/site/pager.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?
|
||||
global $lang;
|
||||
|
||||
$this -> page['language']['seo_link'] ? $link = $this -> page['language']['seo_link'] : $link = 's-' . $this -> page['id'] . '-' . \S::seo( $this -> page['language']['title'] );
|
||||
?>
|
||||
<ul class="pager">
|
||||
<? if ( $this -> bs > 1 ):?>
|
||||
<li>
|
||||
<a href="/<?= $link;?>"><?= $lang['pierwsza'];?></a>
|
||||
</li>
|
||||
<li>
|
||||
<? if ( $this -> bs - 1 > 1 ):?>
|
||||
<a href="/<?= $link;?>-s-<?= $this -> bs - 1;?>"><?= $lang['poprzednia'];?></a>
|
||||
<? else:?>
|
||||
<a href="/<?= $link;?>"><?= $lang['poprzednia'];?></a>
|
||||
<? endif;?>
|
||||
</li>
|
||||
<? else:?>
|
||||
<li>
|
||||
<a href="#" class="inactive"><?= $lang['pierwsza'];?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="inactive"><?= $lang['poprzednia'];?></a>
|
||||
</li>
|
||||
<? endif;?>
|
||||
<li>
|
||||
<span><?= $this -> bs ;?> <?= $lang['z'];?> <?= $this -> ls;?></span>
|
||||
</li>
|
||||
<? if ( $this -> bs < $this -> ls ):?>
|
||||
<li>
|
||||
<a href="/<?= $link;?>-s-<?= $this -> bs + 1;?>"><?= $lang['nastepna'];?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/<?= $link;?>-s-<?= $this -> ls;?>"><?= $lang['ostatnia'];?></a>
|
||||
</li>
|
||||
<? else:?>
|
||||
<li>
|
||||
<a href="#" class="inactive"><?= $lang['nastepna'];?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="inactive"><?= $lang['ostatnia'];?></a>
|
||||
</li>
|
||||
<? endif;?>
|
||||
</ul>
|
||||
3
templates/site/title.php
Normal file
3
templates/site/title.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1 class="site-title">
|
||||
<?= $this -> title;?>
|
||||
</h1>
|
||||
4
templates/site/visit-counter.php
Normal file
4
templates/site/visit-counter.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<div id="visit-counter">
|
||||
Odwiedziło nas: <span><?= $this -> visit_counter;?></span> osób.
|
||||
</div>
|
||||
|
||||
187
templates/widgets/widget-phone.css
Normal file
187
templates/widgets/widget-phone.css
Normal file
@@ -0,0 +1,187 @@
|
||||
#widget-phone-icon {
|
||||
background: #fb6c37;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
line-height: 60px;
|
||||
border-radius: 50%;
|
||||
font-size: 34px;
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
right: 50px;
|
||||
display: none;
|
||||
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px 0px;
|
||||
}
|
||||
#widget-phone-icon i {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
#widget-phone-bg {
|
||||
background: rgba( 0, 0, 0, .5 );
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
}
|
||||
#widget-phone-box {
|
||||
width: 600px;
|
||||
height: 350px;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate( -50%, -50% );
|
||||
background: #FFF;
|
||||
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px 0px;
|
||||
z-index: 1100;
|
||||
}
|
||||
#widget-phone-box #widget-phone-alert {
|
||||
padding: 25px;
|
||||
max-width: 400px;
|
||||
margin: 50px auto;
|
||||
display: none;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
#widget-phone-box #widget-phone-alert.good {
|
||||
color: #2cbd2b;
|
||||
}
|
||||
#widget-phone-box #widget-phone-alert.bad {
|
||||
color: #cc0000;
|
||||
}
|
||||
#widget-phone-box #widget-phone-close {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
background: #e2e2e2;
|
||||
color: #0d619c;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 30px;
|
||||
}
|
||||
#widget-phone-box #widget-phone-close:hover {
|
||||
color: #fb6c37;
|
||||
}
|
||||
#widget-phone-box #widget-phone-tabs ul {
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #f8f8f8;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
}
|
||||
#widget-phone-box #widget-phone-tabs ul li {
|
||||
display: block;
|
||||
width: calc(100%/3);
|
||||
background: #f8f8f8;
|
||||
color: #000;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
border-right: 1px solid #e2e2e2;
|
||||
cursor: pointer;
|
||||
}
|
||||
#widget-phone-box #widget-phone-tabs ul li.active {
|
||||
background: #FFF;
|
||||
color: #0d619c;
|
||||
}
|
||||
#widget-phone-box #widget-phone-tabs ul li i {
|
||||
font-size: 20px;
|
||||
margin-right: 5px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content {
|
||||
padding: 25px;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .tab {
|
||||
display: none;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .tab.active {
|
||||
display: block;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content p {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-family: 'Lato';
|
||||
font-weight: 600;
|
||||
max-width: 400px;
|
||||
margin: auto;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .form-group {
|
||||
max-width: 300px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
margin-top: 30px;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .form-group i {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
color: #FFF;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
background: #0d619c;
|
||||
font-size: 20px;
|
||||
border-radius: 5px 0 0 5px;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .form-group input[type="text"] {
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 50px;
|
||||
box-shadow: none;
|
||||
border: 1px solid #e2e2e2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .form-group input[type="text"].error {
|
||||
background: #fbd4d4;
|
||||
border: 1px solid #cc0000;
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .form-group button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
height: 50px;
|
||||
border: 0;
|
||||
background: #0d619c;
|
||||
color: #fff;
|
||||
text-shadow: none;
|
||||
transition: all 0.5s ease;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
#widget-phone-box #widget-phone-box-content .form-group button:hover {
|
||||
background: #fb6c37;
|
||||
}
|
||||
@media ( max-width: 767px ) {
|
||||
#widget-phone-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transform: none;
|
||||
}
|
||||
#widget-phone-box #widget-phone-tabs ul li {
|
||||
width: 100%;
|
||||
border-right: 0;
|
||||
}
|
||||
#widget-phone-icon {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-size: 26px;
|
||||
right: 10px;
|
||||
bottom: 100px;
|
||||
}
|
||||
}
|
||||
123
templates/widgets/widget-phone.php
Normal file
123
templates/widgets/widget-phone.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<link rel="stylesheet" type="text/css" href="/templates/widgets/widget-phone.css">
|
||||
<script src="/libraries/jquery-ui/1.11.3/jquery-ui.min.js"></script>
|
||||
<a href="#" id="widget-phone-icon">
|
||||
<i class="fa fa-phone"></i>
|
||||
</a>
|
||||
<div id="widget-phone-bg">
|
||||
<div id="widget-phone-box">
|
||||
<a href="#" id="widget-phone-close">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
<div id="widget-phone-tabs">
|
||||
<ul>
|
||||
<li class="active" tab="widget-phone-now">
|
||||
<i class="fa fa-phone"></i> Zadzwoń do mnie teraz
|
||||
</li>
|
||||
<!-- <li tab="widget-phone-later">
|
||||
<i class="fa fa-clock-o"></i> Zadzwoń do mnie później
|
||||
</li>
|
||||
<li tab="widget-phone-message">
|
||||
<i class="fa fa-comments-o"></i> Zostaw wiadomość
|
||||
</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div id="widget-phone-box-content">
|
||||
<div id="widget-phone-now" class="tab active">
|
||||
<div id="widget-phone-alert">Dziękujemy za kontakt. Wkrótce oddzwonimy.</div>
|
||||
<p>Podaj swój numer telefonu a oddzwonimy do Ciebie</p>
|
||||
<div class="form-group">
|
||||
<i class="fa fa-phone"></i>
|
||||
<input type="text" class="form-control" name="widget-phone-input" id="widget-phone-input">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="button" class="btn btn-success">Zadzwoń do mnie teraz</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="widget-phone-later" class="tab">
|
||||
b
|
||||
</div>
|
||||
<div id="widget-phone-message" class="tab">
|
||||
c
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready( function()
|
||||
{
|
||||
setTimeout(function() {
|
||||
$( '#widget-phone-icon' ).show( 'fade' );
|
||||
}, 2000 );
|
||||
|
||||
$( 'body' ).on( 'click', '#widget-phone-icon', function()
|
||||
{
|
||||
$( this ).hide( 'fade' );
|
||||
$( '#widget-phone-bg' ).show( 'fade' );
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '#widget-phone-close', function()
|
||||
{
|
||||
$( '#widget-phone-bg' ).hide( 'fade' );
|
||||
$( '#widget-phone-box-content .tab.active *' ).show();
|
||||
$( '#widget-phone-box-content .tab.active #widget-phone-alert' ).hide();
|
||||
$( '#widget-phone-icon' ).show( 'fade' );
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '#widget-phone-tabs li', function()
|
||||
{
|
||||
var tab = $( this ).attr( 'tab' );
|
||||
$( '#widget-phone-box-content .tab' ).removeClass( 'active' );
|
||||
$( '#widget-phone-box-content #' + tab ).addClass( 'active' );
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '#widget-phone-now button', function()
|
||||
{
|
||||
var phone = $( '#widget-phone-now #widget-phone-input' ).val();
|
||||
if ( $.trim( phone ) == '' )
|
||||
{
|
||||
$( '#widget-phone-box' ).effect( "bounce", { direction: 'left', distance: 25, times: 2 }, 500 );
|
||||
$( '#widget-phone-now #widget-phone-input' ).addClass( 'error' ).focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: 'ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'widget-phone-now',
|
||||
phone: phone
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#widget-phone-now #widget-phone-input' ).removeClass( 'error' );
|
||||
$( '#widget-phone-now button' ).attr( 'disabled', 'disabled' );
|
||||
$( '#widget-phone-now button' ).html( 'Trwa wysyłanie...' );
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#widget-phone-now button' ).removeAttr( 'disabled' );
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
$( '.jqibox' ).remove();
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
{
|
||||
$( '#widget-phone-now *' ).hide();
|
||||
$( '#widget-phone-now #widget-phone-alert' ).show().addClass( 'good' ).html( 'Dziękujemy za kontakt. Wkrótce oddzwonimy.' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$( '#widget-phone-now *' ).hide();
|
||||
$( '#widget-phone-now #widget-phone-alert' ).show().addClass( 'bad' ).html( 'Wystąpił błąd.<br />Spróbuj ponownie.' );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user