first commit
This commit is contained in:
48
templates_user/articles/article-entry.php
Normal file
48
templates_user/articles/article-entry.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<? global $lang;?>
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="article-entry article-entry-<?= $this -> article['id'];?>">
|
||||
<?
|
||||
$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="article-image">
|
||||
<img src="<?= \front\factory\Articles::get_image( $this -> article );?>" alt="<?= $this -> article['language']['title'];?>">
|
||||
</div>
|
||||
<div class="entry">
|
||||
<?
|
||||
if ( $this -> article['language']['entry'] )
|
||||
{
|
||||
$content = $this -> article['language']['entry'];
|
||||
|
||||
$content = preg_replace( "/<img[^>]+\>/i", "", $content );
|
||||
$content = preg_replace( "/<p[^>]*?>/", "", $content );
|
||||
$content = preg_replace( "/[\n\r]/", " ", $content );
|
||||
$content = mb_substr( $content, 0, 100, 'UTF-8' );
|
||||
echo $content;
|
||||
|
||||
if ( $this -> article['language']['text'] )
|
||||
$more = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this -> article['language']['text'];
|
||||
|
||||
$more = false;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<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="btn btn-primary btn-more" title="<?= $this -> article['language']['title'];?>" <? if ( $this -> article['language']['noindex'] ):?>rel="nofollow"<? endif;?>>
|
||||
<span><?= $lang['wiecej'];?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
183
templates_user/articles/article-full.php
Normal file
183
templates_user/articles/article-full.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<? global $lang, $lang_id;?>
|
||||
<div class="article article-<?= $this -> article['id'];?>">
|
||||
<?
|
||||
$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"><i class="fa fa-calendar"></i> ' . date( 'Y-m-d', strtotime( $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['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 : {}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
182
templates_user/articles/article.php
Normal file
182
templates_user/articles/article.php
Normal file
@@ -0,0 +1,182 @@
|
||||
<? global $lang, $lang_id;?>
|
||||
<div class="article article-<?= $this -> article['id'];?>">
|
||||
<?
|
||||
$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;?>
|
||||
<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-more btn-primary"><?= $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 : {}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
16
templates_user/articles/articles-entries.php
Normal file
16
templates_user/articles/articles-entries.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="row centeralign">
|
||||
<?
|
||||
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' );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
32
templates_user/banner/banners.php
Normal file
32
templates_user/banner/banners.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="banners-container">
|
||||
<? if ( is_array( $this -> banners ) ): foreach ( $this -> banners as $banner ):?>
|
||||
<div id="banner-<?= $banner[ 'id' ];?>" <? 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;?>>
|
||||
<div class="content cre-animate" data-animation="fade-in" data-speed="1000" data-delay="0" data-offset="100%" data-easing="ease">
|
||||
<?
|
||||
if ( $banner[ 'languages' ][ 'html' ] ):
|
||||
echo $banner[ 'languages' ][ 'html' ];
|
||||
endif;
|
||||
?>
|
||||
<?
|
||||
if ( $banner[ 'languages' ][ 'text' ] ):
|
||||
echo $banner[ 'languages' ][ 'text' ];
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<? endforeach;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<link class="footer" rel="stylesheet" type="text/css" href="/plugins/bxslider/jquery.bxslider.css">
|
||||
<script class="footer" type="text/javascript" src="/plugins/bxslider/jquery.bxslider.js"></script>
|
||||
<script class="footer" type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('.banners-container').bxSlider({
|
||||
pager: true,
|
||||
touchEnabled: false,
|
||||
auto: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
25
templates_user/banner/main-banner.php
Normal file
25
templates_user/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>
|
||||
204
templates_user/site/contact.php
Normal file
204
templates_user/site/contact.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<? global $settings, $lang, $config;?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div id="contact-additional-info"><?= $settings['additional_info'];?></div>
|
||||
</div>
|
||||
<div class="col-md-6 contact-form">
|
||||
<? if ( $settings['contact_form'] ):?>
|
||||
<h4>Formularz do kontaktu z KOB-CRANE MONTAŻE</h4>
|
||||
<p>Wypełniając poniższy formularz, możecie Państwo w łatwy sposób skontaktować się z KOB-CRANE MONTAŻE. Chętnie służymy fachową poradą. Wystarczy po prostu wysłać formularz z zapytaniem!</p>
|
||||
<form class="form-horizontal" id="contact-form">
|
||||
<div id="contact-form">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-xs-12">Imię:</label>
|
||||
<div class="col-xs-12">
|
||||
<input type='text' id="name" name="name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="surname" class="col-xs-12">Nazwisko:</label>
|
||||
<div class="col-xs-12">
|
||||
<input type='text' id="surname" name="surname" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firm" class="col-xs-12">Nazwa firmy:</label>
|
||||
<div class="col-xs-12">
|
||||
<input type='text' id="firm" name="firm" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="emai" class="col-xs-12">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="emai" class="col-xs-12">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">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">Wiadomość:</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 red">
|
||||
* wpis wymagany
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<p class="text-muted">Informujemy, że podane przez Państwa dane osobowe będą przetwarzane w celu realizacji zapytania w celach archiwizacyjnych przez KOB-CRANE MONTAŻE Sp. z o.o. z siedzibą przy ul. Jana Wiktora 9, 36-100 KOLBUSZOWA, jako administratora danych. Podanie danych jest dobrowolne, lecz niezbędne w celu nawiązania kontaktu. Przysługuje Państwu prawo dostępu do treści swoich danych oraz ich poprawiania.</p>
|
||||
<p>Wyrażam zgodę: <input type="radio" checked="checked" name="zgoda1" /> tak <input type="radio" name="zdoga1"> nie</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<p class="text-muted">Wyrażam zgodę na przetwarzanie moich danych osobowych przez KOB-CRANE MONTAŻE Sp. z o.o. w celu realizacji działań marketingowych własnych produktów i usług.</p>
|
||||
<p>Wyrażam zgodę: <input type="radio" checked="checked" name="zgoda2" /> tak <input type="radio" name="zdoga2"> nie</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<p class="text-muted">Wyrażam zgodę na przesyłanie informacji handlowych drogą elektroniczną przez KOB-CRANE MONTAŻE Sp. z o.o.</p>
|
||||
<p>Wyrażam zgodę: <input type="radio" checked="checked" name="zgoda3" /> tak <input type="radio" name="zdoga3"> nie</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<a class='btn btn-info' id="contact-form-send" onclick="send_message(); return false;"><?= $lang['wyslij'];?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
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() );
|
||||
var name = $.trim( $( '#contact-form #name' ).val() );
|
||||
var surname = $.trim( $( '#contact-form #surname' ).val() );
|
||||
var firm = $.trim( $( '#contact-form #firm' ).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 col-sm-offset-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/',
|
||||
data:
|
||||
{
|
||||
a: 'contact_form_send',
|
||||
email: email,
|
||||
phone: phone,
|
||||
subject: subject,
|
||||
text: text,
|
||||
name: name,
|
||||
surname: surname,
|
||||
firm: firm
|
||||
},
|
||||
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 col-sm-offset-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 col-sm-offset-3',
|
||||
buttons:
|
||||
{
|
||||
confirm:
|
||||
{
|
||||
text: '<?= $lang['zamknij'];?>',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
34
templates_user/site/cookie-information.php
Normal file
34
templates_user/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> <a href="/ochrona-danych">[więcej informacji]</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>
|
||||
44
templates_user/site/pager.php
Normal file
44
templates_user/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;?>"><i class="fa fa-fast-backward"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<? if ( $this -> bs - 1 > 1 ):?>
|
||||
<a href="/<?= $link;?>-s-<?= $this -> bs - 1;?>"><i class="fa fa-backward"></i></a>
|
||||
<? else:?>
|
||||
<a href="/<?= $link;?>"><i class="fa fa-backward"></i></a>
|
||||
<? endif;?>
|
||||
</li>
|
||||
<? else:?>
|
||||
<li>
|
||||
<a href="#" class="inactive"><i class="fa fa-fast-backward"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="inactive"><i class="fa fa-backward"></i></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;?>"><i class="fa fa-forward"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/<?= $link;?>-s-<?= $this -> ls;?>"><i class="fa fa-fast-forward"></i></a>
|
||||
</li>
|
||||
<? else:?>
|
||||
<li>
|
||||
<a href="#" class="inactive"><i class="fa fa-forward"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="inactive"><i class="fa fa-fast-forward"></i></a>
|
||||
</li>
|
||||
<? endif;?>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user