<?php
error_reporting(0);
//spoji se na bazu

include ("admin/func/db_func.php");
$conn = db_connect();
mysql_set_charset('utf8',$conn);

$stranica = $_GET['stranica'];

include ("modules/core_func.php");


$stranica=29;
if ( $stranica )
{
	if ( is_numeric( $stranica ) )
	{
		//učitaj osnovne podatke
		$sql99 = "select * from b7_sadrzaj where id_sadrzaj='$stranica'";
		$rez99=mysql_query($sql99,$conn);
		if ( $rez99 ) $num99 = mysql_num_rows( $rez99 );
		if ( $num99 == 1 )
		{
			$row99 = mysql_fetch_array( $rez99 );
			$id_sadrzaj = $row99['id_sadrzaj'];
			$id_kategorija = $row99['id_kategorija'];
			$id_rubrika = $row99['id_rubrika'];
			$naslov = $row99['naslov'];
			$link = $row99['link'];
			$opis = $row99['opis'];
			$datum = $row99['datum'];
			$dan = $row99['dan'];
			$vidljivost = $row99['vidljivost'];
			$stylesheet = $row99['stylesheet'];
			$seo_link = $row99['seo_link'];
			$uvod_tekst = $row99['uvod_tekst'];
			$uvod_slika = $row99['uvod_slika'];
			$uvod_slika_x = $row99['uvod_slika_x'];
			$uvod_slika_y = $row99['uvod_slika_y'];
		} else 
		{
			$stranica = 12;	
		}
	} else 
	{
		$stranica = 12;
	}
} else {
	$stranica = 12;
}

if ( $stranica == 12 )
{
	//osnovne postavke
	$description = 'Državni arhiv u Vukovaru';	
	$title = 'Državni arhiv u Vukovaru';
	
} else 
{
	$description = $opis;
	$title = 'Državni arhiv u Vukovaru - '.$naslov;
}
$keywords = 'Državni, arhiv, Vukovara, Vukovar, Vukovaru, davu';
$master_page='template.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:rei="http://r-effects.com" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="description" content="<?php echo $description; ?>" />
<meta name="keywords" content="<?php echo $keywords; ?>" />
<meta name="robots" content="index,follow" />
<meta name="revisit-after" content="7 days" />


<title><?php echo $title; ?></title>

<?php include('header.php'); ?>

<link href="css/qubi1.css" rel="stylesheet" type="text/css" media="screen">
<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />  
<link href="menu_assets/styles.css" rel="stylesheet" type="text/css">  
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" /> 
   
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	$("a[rel=lightbox]").fancybox({
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'titlePosition' 	: 'over',
			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-over">Slika ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
			}
		});
	
});

$(window).load(function() {
        $('#slider').nivoSlider(
		{
		effect: 'fold', // Specify sets like: sliceDown, sliceDownLeft, sliceUp, sliceUpLeft, sliceUpDown, sliceUpDownLeft, fold, fade, random, slideInRight, slideInLeft, boxRandom, boxRain, boxRainReverse, boxRainGrow, boxRainGrowReverse
        slices: 15, // For slice animations
        boxCols: 8, // For box animations
        boxRows: 4, // For box animations
        animSpeed: 500, // Slide transition speed
        pauseTime: 3000, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: false, // Next & Prev navigation
        controlNav: false, // 1,2,3... navigation
        controlNavThumbs: false, // Use thumbnails for Control Nav
        pauseOnHover: true, // Stop animation while hovering
        manualAdvance: false, // Force manual transitions
        prevText: 'Prev', // Prev directionNav text
        nextText: 'Next', // Next directionNav text
        randomStart: true, // Start on a random slide
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){}, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded	
		});
    });

</script>
<meta http-equiv="imagetoolbar" content="no" xmlns="" />
</head>
<body>
<div id="wraper">
	<div id="kontejner">
    	<?php
		include ("1_header.php");

		include ("1_css_menu.php");
		?>
        <div id="main_content">
	        <div id="sadrzaj_wrap">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                	<tr>
                    <td valign="top" id="td_left">
                    	<?php
						include ("1_left_menu.php");
						?>
                    </td>
                    <td valign="top" id="td_right">
                    	<?php
						if ($stranica==12) {
						?>
                        <div id="Uvodna riječ">
                        <div id="sadrzaj">
                            <?php
							prikazi_sadrzaj_paragraf($conn,1);
							?>
                        </div>
                        </div>
                        
                        <br /><br />
                        
                        
                        <br /><br />
                        <div id="rad_vrijeme">
                        	<?php
							prikazi_sadrzaj_paragraf($conn,2);
							?>
                        </div>
                       
                        
                       
                        <?php
						} else {
							echo '<div id="sadrzaj">'."\n";
							prikazi_stranicu($conn, $stranica);
							echo '</div>'."\n";
						}
						?>
                        
                    </td>
                    <?php
						if ($stranica==12) {
					?>
                    <td id="td_prva_desno" valign="top">
                    
                    <?php
					prikazi_sadrzaj_paragraf($conn,28);
					?>
                    
                    
                    </td>	
                    <?
						}
					?>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
<?php include('footer.php'); ?>
</body></html>