first commit
This commit is contained in:
142
templates/articles/article-draw.php
Normal file
142
templates/articles/article-draw.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?
|
||||
global $lang;
|
||||
?>
|
||||
<div class='article_draw'>
|
||||
<? if ( $this -> _article -> _values['print'] ):?>
|
||||
<a class='print' href='print.php?art=<?= $this -> _article -> _values['id'];?>' target='_blank'>
|
||||
<img src='images/system/sico_print.png' alt='<?= $lang -> getTrans('T_DRUKUJ' );?>' style='border:0px;'>
|
||||
</a>
|
||||
<? endif;?>
|
||||
<? if ( $this -> _article -> _values['show_title'] ):?>
|
||||
<div class='article_draw_title'>
|
||||
<?= stripslashes( $this -> _article -> _values['title'] );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> _article -> _values['show_date'] ):?>
|
||||
<div class='article_draw_date'>
|
||||
<?= $lang -> getTrans( 'T_DATA_PUBLIKACJI' );?>: <?= date( 'H:i d/m/Y', strtotime( $this -> _article -> _values['date_add'] ) );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> _article -> _values['show_author'] ):?>
|
||||
<div class='article_draw_author'>
|
||||
<?
|
||||
$user = \user\FUser::getUserName( $this -> _article -> _values['author'] );
|
||||
echo $user['name'] . ' ' . $user['surname'];
|
||||
?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> _article -> _values['thumbnail'] ):?>
|
||||
<div class="article-left">
|
||||
<div class="article_img">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $this -> _article -> _values['thumbnail'];?>&h=150&w=150' ) no-repeat center;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article-right">
|
||||
<? endif;?>
|
||||
<div class='article_draw_text'><?= $this -> _article -> getModifyText();?></div>
|
||||
<? if ( is_array( $this -> _article -> _values['images'] ) ):?>
|
||||
<div class="article_gallery">
|
||||
<? foreach ( $this -> _article -> _values['images'] as $img ):?>
|
||||
<a href='<?=$img['src'];?>' class="fancybox-buttons" rel='<?= $this -> _article -> _values['id'];?>'>
|
||||
<div class="gallery_picture">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $img['src'];?>&h=200&w=200' ) no-repeat center;"></div>
|
||||
</div>
|
||||
</a>
|
||||
<? endforeach;?>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( is_array( $this -> _article -> _values['files'] ) ):?>
|
||||
<ul class="article_files">
|
||||
<? foreach ( $this -> _article -> _values['files'] as $file ):?>
|
||||
<li>
|
||||
<a href="pobierz,<?= $file['id'];?>">
|
||||
<?= $file['name'];?>
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ul>
|
||||
<? endif;?>
|
||||
<div class="clearfix"></div>
|
||||
<? if ( $this -> _article -> _values['thumbnail'] ):?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<a href="#" class="article_back" onClick="javascript:history.go(-1); return false;"><?= $lang -> getTrans( 'T_WSTECZ' );?></a>
|
||||
<div class="clearfix"></div>
|
||||
<? if ( $this -> _article -> _values['comments_enabled'] ):?>
|
||||
<div class="comments_container" id="comments_container_<?= $this -> _article -> _values['id'];?>">
|
||||
<?
|
||||
if ( is_array( $this -> _article -> _values['comments'] ) ) foreach ( $this -> _article -> _values['comments'] as $comment )
|
||||
{
|
||||
?>
|
||||
<div class="comments">
|
||||
<div class="comments_author"><?= $comment['author'];?></div>
|
||||
<div class="comments_date"><?= $comment['date_add'];?></div>
|
||||
<div class="comments_text"><?= $comment['text'];?></div>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div id="comment_form">
|
||||
<form method="POST" action="" id="comment_form_add">
|
||||
<input type="hidden" name="rw" value="add_comment" />
|
||||
<input type="hidden" name="article_id" value="<?= $this -> _article -> _values['id'];?>" />
|
||||
<input type="hidden" name="check" value="<?= mktime();?>" />
|
||||
<div class="group">
|
||||
<label><?= $lang -> getTrans( 'T_AUTOR' );?></label>
|
||||
<div class="content">
|
||||
<input type="text" name="author" id="author" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label><?= $lang -> getTrans( 'T_TRESC' );?></label>
|
||||
<div class="content">
|
||||
<textarea name="text" id="text"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label><?= $lang -> getTrans( 'T_KOD' );?></label>
|
||||
<div class="content">
|
||||
<img id="captcha" src="/resources/securimage/securimage_show.php" alt="CAPTCHA Image" />
|
||||
<input type="text" name="captcha_code" id="captcha_code" size="10" maxlength="6" />
|
||||
<a href="#" onclick="document.getElementById('captcha').src = '/resources/securimage/securimage_show.php?' + Math.random(); return false"><?= $lang -> getTrans( 'T_ODSWIEZ' );?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group">
|
||||
<label></label>
|
||||
<div class="content">
|
||||
<a href="#" class="button" onclick="sendCommentForm(); return false;"><?= $lang -> getTrans( 'T_DODAJ_KOMENTARZ' );?></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<? endif;?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function sendCommentForm()
|
||||
{
|
||||
if ( $( "#author" ).val() == '' ) {
|
||||
$( '#author' ).addClass( 'error' );
|
||||
return false;
|
||||
} else
|
||||
$( '#author' ).removeClass( 'error' );
|
||||
|
||||
if ( $( "#text" ).val() == '' ) {
|
||||
$( '#text' ).addClass( 'error' );
|
||||
return false;
|
||||
} else
|
||||
$( '#text' ).removeClass( 'error' );
|
||||
|
||||
|
||||
if ( $( "#captcha_code" ).val() == '' ) {
|
||||
$( '#captcha_code' ).addClass( 'error' );
|
||||
return false;
|
||||
} else
|
||||
$( '#captcha_code' ).removeClass( 'error' );
|
||||
|
||||
$( '#comment_form_add' ).submit();
|
||||
}
|
||||
</script>
|
||||
16
templates/articles/article-gallery.php
Normal file
16
templates/articles/article-gallery.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<div id='article_gallery_<?= $this -> _id;?>' class="art_gallery">
|
||||
<?
|
||||
if ( isset( $this -> _images ) && is_array( $this -> _images ) ) foreach ( $this -> _images as $img )
|
||||
{
|
||||
$src = trim( strip_tags( $img['src'] ) );
|
||||
?>
|
||||
<a href='<?= $src;?>' class="fancybox-buttons" rel='<?= $this -> _id;?>'>
|
||||
<div class="gallery_picture">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $src;?>&h=150&w=150' ) no-repeat center;"></div>
|
||||
</div>
|
||||
</a>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<p style="clear: both;"></p>
|
||||
</div>
|
||||
37
templates/articles/article-map.php
Normal file
37
templates/articles/article-map.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?
|
||||
if ( isset( $this -> _adress ) )
|
||||
{
|
||||
?>
|
||||
<script src='http://maps.google.com/maps?file=api&v=2&key=<?=$this -> _google_map_key;?>' type='text/javascript'></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
map_<?=$this -> _id;?> = new GMap2(document.getElementById('mapa_<?=$this -> _id;?>'));
|
||||
var geo_<?=$this -> _id;?> = new GClientGeocoder();
|
||||
var adres_<?=$this -> _id;?> = '<?=$this -> _adress;?>';
|
||||
geo_<?=$this -> _id;?>.getLatLng(adres_<?=$this -> _id;?>,function(punkt_<?=$this -> _id;?>){
|
||||
map_<?=$this -> _id;?>.setCenter(punkt_<?=$this -> _id;?>, <?=$this -> _zoom;?> );
|
||||
map_<?=$this -> _id;?>.addOverlay(new GMarker(punkt_<?=$this -> _id;?>));
|
||||
map_<?=$this -> _id;?>.panTo(punkt_<?=$this -> _id;?>);
|
||||
map_<?=$this -> _id;?>.setUIToDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div id='mapa_<?=$this -> _id;?>' style='width:<?=$this -> _width;?>px; height:<?=$this -> _height;?>px; border:1px solid black;'></div>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<script src='http://maps.google.com/maps?file=api&v=2&key=<?=$this -> _google_map_key;?>' type='text/javascript'></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
map_<?=$this -> _id;?> = new GMap2(document.getElementById('mapa_<?=$this -> _id;?>'));
|
||||
var point_<?=$this -> _id;?> = new GLatLng(<?=$this -> _x_coord;?>,<?=$this -> _y_coord;?>);
|
||||
map_<?=$this -> _id;?>.setCenter(point_<?=$this -> _id;?> , <?=$this -> _zoom;?> );
|
||||
map_<?=$this -> _id;?>.addOverlay(new GMarker(point_<?=$this -> _id;?>));
|
||||
map_<?=$this -> _id;?>.setUIToDefault();
|
||||
});
|
||||
</script>
|
||||
<div id='mapa_<?=$this -> _id;?>' style='width:<?=$this -> _width;?>px; height:<?=$this -> _height;?>px; border:1px solid black;'></div>
|
||||
<?
|
||||
}
|
||||
35
templates/articles/article-slider.php
Normal file
35
templates/articles/article-slider.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<? $rand = rand(0,10000); ?>
|
||||
<link rel='stylesheet' href='resources/jq_nivo_slider/nivo-slider.css' type='text/css' media='all' />
|
||||
<link rel='stylesheet' href='resources/jq_nivo_slider/themes/orman/orman.css' type='text/css' media='all' />
|
||||
<script type="text/javascript" src="resources/jq_nivo_slider/jquery.nivo.slider.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#article_slider_<?=$rand;?>").nivoSlider({
|
||||
animSpeed:1000,
|
||||
pauseTime:3000,
|
||||
startSlide:0,
|
||||
directionNav:true,
|
||||
directionNavHide:true,
|
||||
controlNav:true,
|
||||
controlNavThumbs:false,
|
||||
controlNavThumbsFromRel:true,
|
||||
keyboardNav:true,
|
||||
manualAdvance:false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="slider-wrapper theme-orman">
|
||||
<div id="article_slider_<?= $rand;?>" class="nivoSlider">
|
||||
<?
|
||||
if ( isset( $this -> _images ) && is_array( $this -> _images ) ) foreach ( $this -> _images as $img )
|
||||
{
|
||||
?>
|
||||
<img src='<?= $img['src'];?>' style="width: 568px;">
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div id="htmlcaption" class="nivo-html-caption">
|
||||
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
|
||||
</div>
|
||||
</div>
|
||||
38
templates/articles/articles-entry.php
Normal file
38
templates/articles/articles-entry.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?
|
||||
global $lang;
|
||||
if ( is_array( $this -> _articles ) ) foreach ( $this -> _articles as $art )
|
||||
{
|
||||
$art -> _values['seo_link'] ? $link = $art -> _values['seo_link'] : $link = 'a,' . $art -> _values['id'] . ',' . \System::seo( $art -> _values['title'] );
|
||||
?>
|
||||
<div class='article_entry'>
|
||||
<? if ( $art -> getImg() ):?>
|
||||
<div class="article_img">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $art -> getImg();?>&h=150&w=150' ) no-repeat center;"></div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['show_title'] ):?>
|
||||
<div class='article_title'>
|
||||
<a href="<?= $link;?>"><?= stripslashes( $art -> _values['title'] );?></a>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['show_date'] ):?>
|
||||
<div class='article_date'><?= date( 'H:i d/m/Y', strtotime( $art -> _values['date_add'] ) );?></div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['comments_enabled'] ):?>
|
||||
<div class="article_comments_count"><?= $lang -> getTrans( 'T_KOMENTARZE' );?>: <?= count( $art -> _values['comments'] );?></div>
|
||||
<? endif;?>
|
||||
<div class="article_entry_text">
|
||||
<?
|
||||
$text = $art -> getModifyText( true );
|
||||
|
||||
echo mb_substr( strip_tags( $text ) , 0 , 500 , 'UTF-8' );
|
||||
if ( strlen( $text ) > 500 )
|
||||
echo '...';
|
||||
?>
|
||||
</div>
|
||||
<a href="<?= $link;?>" class='article_more'><?= $lang -> getTrans( 'T_WIECEJ' );?></a>
|
||||
<p style='clear:both'></p>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
78
templates/articles/articles-full.php
Normal file
78
templates/articles/articles-full.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?
|
||||
global $lang;
|
||||
if ( is_array( $this -> _articles ) ) foreach ( $this -> _articles as $art )
|
||||
{
|
||||
$art -> _values['seo_link'] ? $link = $art -> _values['seo_link'] : $link = 'a,' . $art -> _values['id'] . ',' . \System::seo( $art -> _values['title'] );
|
||||
?>
|
||||
<div class="article_full">
|
||||
<? if ( $art -> _values['show_title'] ):?>
|
||||
<div class='article_title'>
|
||||
<?= stripslashes( $art -> _values['title'] );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['show_date'] ):?>
|
||||
<div class='article_date'>
|
||||
<?= $lang -> getTrans( 'T_DATA_PUBLIKACJI' );?>: <?= date( 'Y-m-d H:s' , strtotime( $art -> _values['date_add'] ) );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['comments_enabled'] ):?>
|
||||
<div class="article_comments_count">
|
||||
<a href="<?= $link;?>"><?= $lang -> getTrans( 'T_KOMENTARZE' );?>: <?= count( $art -> _values['comments'] );?></a>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['show_author'] ):?>
|
||||
<div class='article_draw_author'>
|
||||
<?
|
||||
$user = \user\FUser::getUserName( $art -> _values['author'] );
|
||||
echo $user['name'] . ' ' . $user['surname'];
|
||||
?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['print'] ):?>
|
||||
<a class='print' href='./print.php?art=<?= $art-> _values['id'];?>' target='_blank'>
|
||||
<img src='images/system/sico_print.png' alt='<?= $lang -> getTrans( 'T_DRUKUJ' );?>' style='border:0px;'>
|
||||
</a>
|
||||
<? endif;?>
|
||||
<? if ( $art -> _values['thumbnail'] ):?>
|
||||
<div class="article-left">
|
||||
<div class="article_img">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $art -> _values['thumbnail'];?>&h=150&w=150' ) no-repeat center;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="article-right">
|
||||
<? endif;?>
|
||||
<div class='article_text'>
|
||||
<?= $art -> getModifyText();?>
|
||||
</div>
|
||||
<? if ( is_array( $art -> _values['images'] ) ):?>
|
||||
<div class="article_gallery">
|
||||
<? foreach ( $art -> _values['images'] as $img ):?>
|
||||
<a href='<?= $img['src'];?>' class="fancybox-buttons" rel='<?= $art -> _values['id'];?>'>
|
||||
<div class="gallery_picture">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $img['src'];?>&h=100&w=100' ) no-repeat center;"></div>
|
||||
</div>
|
||||
</a>
|
||||
<? endforeach;?>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( is_array( $art -> _values['files'] ) ):?>
|
||||
<ul class="article_files">
|
||||
<? foreach ( $art -> _values['files'] as $file ):?>
|
||||
<li>
|
||||
<a href="pobierz,<?= $file['id'];?>">
|
||||
<?= $file['name'];?>
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ul>
|
||||
<? endif;?>
|
||||
<div class="clearfix"></div>
|
||||
<? if ( $art -> _values['thumbnail'] ):?>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
32
templates/articles/articles-list-static.php
Normal file
32
templates/articles/articles-list-static.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<? global $lang;?>
|
||||
<div class="title"><?= $this -> _site -> _values['title'];?></div>
|
||||
<div class="arts-list-st-container" id="arts-list-st-container-<?= $this -> _id;?>">
|
||||
<? if ( is_array( $this -> _articles ) ): foreach ( $this -> _articles as $art ):?>
|
||||
<? $art -> _values['seo_link'] ? $link = $art -> _values['seo_link'] : $link = 'a,' . $art -> _values['id'] . ',' . \System::seo( $art -> _values['title'] );?>
|
||||
<div class='article'>
|
||||
<? if ( $art -> getImg() ):?>
|
||||
<div class="article-img">
|
||||
<div style="background: url( 'resources/thumber.php?img=<?= $art -> getImg();?>&h=300&w=300' ) no-repeat center;"></div>
|
||||
</div>
|
||||
<? else:?>
|
||||
<div class="article-img">
|
||||
<div style="background: url( 'resources/thumber.php?img=/images/nosystem/no-img.jpg&h=250&w=250' ) no-repeat center;"></div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<div class='article-title'>
|
||||
<a href="<?= $link;?>"><?= ucfirst( $art -> _values['title'] );?></a>
|
||||
</div>
|
||||
<div class="article-text">
|
||||
<?
|
||||
$text = $art -> getModifyText( true );
|
||||
|
||||
echo mb_substr( strip_tags( $text ) , 0 , 250 , 'UTF-8' );
|
||||
if ( strlen( $text ) > 250 )
|
||||
echo '...';
|
||||
?>
|
||||
</div>
|
||||
<a href="<?= $link;?>" class='button'><?= $lang -> getTrans( 'T_WIECEJ' );?></a>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
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 $art )
|
||||
{
|
||||
$art -> _values['seo_link'] ? $link = $art -> _values['seo_link'] : $link = 'a,' . $art -> _values['id'] . ',' . \System::seo( $art -> _values['title'] );
|
||||
?>
|
||||
<div class='article_list' onClick='document.location.href="<?= $link;?>";'>
|
||||
<div class='article_title'><?= (++$i);?>.<a><?= ucfirst( $art -> _values['title'] );?></a></div>
|
||||
<? if ( $art -> _values['show_date'] ):?>
|
||||
<div class='article_date'><?= $lang -> getTrans( 'T_DATA_PUBLIKACJI' );?>: <?= date( 'Y-m-d H:s' , strtotime( $art -> _values['date_add'] ) );?></div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
19
templates/articles/articles-miniature.php
Normal file
19
templates/articles/articles-miniature.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<ul id="grid" class="group">
|
||||
<? if ( is_array( $this -> _articles ) ): foreach ( $this -> _articles as $art ):?>
|
||||
<?
|
||||
$art -> getImg() ? $src = "resources/thumber.php?img=" . $art -> getImg() . "&w=300&h=200&cache=false" : $src = "resources/thumber.php?img=images/system/no_img.jpg&w=250&h=250";
|
||||
|
||||
$art -> _values['seo_link'] ? $link = $art -> _values['seo_link'] : $link = 'a,' . $art -> _values['id'] . ',' . \System::seo( $art -> _values['title'] );
|
||||
?>
|
||||
<li>
|
||||
<div class="details">
|
||||
<h3><?= $art -> _values['title'];?></h3>
|
||||
<a class="more" href="<?= $link;?>">więcej</a>
|
||||
</div>
|
||||
<a class="more" href="<?= $link;?>">
|
||||
<div style="height: 200px; width: 300px; background: url( '<?= $src;?>' ) center;"></div>
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach; endif;?>
|
||||
</ul>
|
||||
<div style="clear: both;"></div>
|
||||
Reference in New Issue
Block a user