{include file="admin/blocks/header.tpl"}

<table class="wrapper">
	<tr>
		<td>&nbsp;</td>
		<td class="maincol">
			<div id="topmenu">
				<div class="fleft" style="margin: 30px 0px 0px 20px;">
					<a href="{$config.url}" title="Przejdź na stronę główną"><img src="{$config.templateImagesDir}admin/speed.png" alt="SPEED" /></a>
				</div>
				<div class="fright menu">
					<span class="cufon mainh">CONTENT MANAGEMENT SYSTEM - V-CMS</span>
				</div>	
				<div class="clear"></div>
			</div>
			<div class="admin_header"></div>
			<div class="admin_content">
				<a href="{$config.url}admin/"><h1 class="cufon" style="margin-bottom: 5px;">Administration panel</h1></a><hr style="margin-bottom: 15px;" />
				
				{if $smarty.session.auth.hash && $link.1 == 'cases' && $link.2 == 'edit'}
                                    
                                        {if $smarty.session.msg.title}
                                                <span style="color: {if $smarty.session.msg.err}red{else}green{/if};">Message: {$smarty.session.msg.title}</span><br><br>
                                        {/if}

                                        {if $link[1] && file_exists("`$config.currentTemplateDir`/admin/$link[1].tpl")}
                                                {include file="admin/$link[1].tpl"}
                                        {else}
                                                {include file="admin/index.tpl"}
                                        {/if}
                                        
                                {elseif $smarty.session.auth.hash}
					
					<div class="fleft menupos">
                                            
                                                <img src="{$config.templateImagesDir}admin/point.png" alt="->" />
                                                <a class="cufon" href="{$config.url}admin/pages">Articles</a><br/>
                                                <img src="{$config.templateImagesDir}admin/point.png" alt="->" />
                                                <a class="cufon" href="{$config.url}admin/galleries">Galleries</a><br/>
                                                <img src="{$config.templateImagesDir}admin/point.png" alt="->" />
                                                <a class="cufon" href="{$config.url}admin/download">Download</a><br/>
                                                                                            
                                                <br><img src="{$config.templateImagesDir}admin/point.png" alt="->" />
                                                <a class="cufon" href="{$config.url}admin/adverts">Advertisements</a><br/>
						<img src="{$config.templateImagesDir}admin/point.png" alt="->" />						
						<a class="cufon" href="{$config.url}admin/boxes">Boxes</a><br/>
                                                
                                                <br><img src="{$config.templateImagesDir}admin/point.png" alt="->" />
						<a class="cufon" href="{$config.url}admin/config">Configuration</a><br/>
						<img src="{$config.templateImagesDir}admin/point.png" alt="->" />
						<a class="cufon" href="{$config.url}admin/logout">Logout</a>
					</div>
				
					<div class="fleft subpage" style="width: 720px;">
				
						{if $smarty.session.msg.title}
							<span style="color: {if $smarty.session.msg.err}red{else}green{/if};">MSG: {$smarty.session.msg.title}</span><br><br>
						{/if}
					
						{if $link[1] && file_exists("`$config.currentTemplateDir`/admin/$link[1].tpl")}
							{include file="admin/$link[1].tpl"}
						{else}
							{include file="admin/index.tpl"}
						{/if}
					
					</div>
					
					<div class="clear"></div>
					
				{else}
				
					{if $smarty.session.msg.title}
						<span style="color: {if $smarty.session.msg.err}red{else}green{/if};">MSG: {$smarty.session.msg.title}</span><br><br>
					{/if}
				
					<form action="" method="POST">
						Login<br>
						<input class="poletxt" style="width: 226px;" type="text" name="login" value="{$smarty.post.login}"><br>
						Password<br>
						<input class="poletxt" style="width: 226px;" type="password" name="password"><br><br>
						<input type="hidden" name="action" value="login" />
						<input type="submit" value="Login" />
                                                {if $config.pass eq '2360796e4ba6fb2d2de890bda93f9a57'}
                                                    <br/><br/>
                                                    Default login: admin<br/>
                                                    Default password: vcms<br/>
                                                    <br/>
                                                    <div style="color: red;"><b>This message will dissapear when you will change default password.</b></div>
                                                {/if}
					</form>
               
				{/if}
				<br>
			</div>
			<div class="admin_footer"></div>
		</td>
		<td>&nbsp;</td>
	</tr>
</table>

<center>
	<a href="{$config.companyUrl}" title="{$config.companyName}">{$config.companyName}</a> &copy; {$year} All rights reserved. 
</center><br>

{include file="admin/blocks/footer.tpl"}