<?php
function t1(){
	echo '<div class="text">';
}

function t2(){
	echo '</div>';
}

function counters($count=null,$count2=null){
	$res= '';
	if ($count!=0){
		 $res .= ' ('.$count;
		 if ($count2!=0) $res .= '/'.$count2;
		 $res .= ')';
    }
    return $res;
}

function a($href,$text,$icon,$count=null,$count2=null){
	global $set;
	global $gets;
	echo '<a class="link" href="'.$href.$gets.'">';
	if ($icon != 'none'){
		if($set['images'] == 'on') echo '<img src="/images/icons/'.$icon.'.png" class="icon" alt=""> ';
		else echo '» ';
	}
	echo $text;
	if ($count!=0){
		 echo ' ('.$count;
		 if ($count2!=0) echo '/'.$count2;
		 echo ')';
    }
	echo '</a>';
}

function knopka($href,$text){
	return '<a href="'.$href.'"><small>'.$text.'</small></a>';
}


function a1($href){
	global $gets;
	echo '<a class="link" href="'.$href.$gets.'">';
}

function a2(){
	echo '</a>';
}

function t($text){
	echo '<div class="text">'.$text.'</div>';
}

function c($text){
	echo '<div class="text"><center>'.$text.'</center></div>';
}

function m($text){
	echo '<div class="mess">'.$text.'</div>';
}

function p($text){
	echo '<div class="text"><center><small>'.$text.'</small></center></div>';
}

function e($text){
	echo '<div class="error">'.$text.'</div>';
}

function err(){
	global $err;
	if (isset($err)){
		if (is_array($err)){
			echo '<div class="error">';
			foreach ($err as $key=>$value) echo $value.'<br/>';
			echo '</div>';
		}
		else echo '<div class="error">'.$err.'</div>';
	}
}
?>