<?php

if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }




function showexp($exp_user,$exp_posts,$exp_type) {







		if (iMEMBER) { 

			$posts = $exp_posts;
			$comment = dbcount("(comment_id)", "comments", "comment_name='$exp_user'");
			$rating = dbcount("(rating_id)", "ratings", "rating_user='$exp_user'");
			
	
			$sum = ($posts+$comment+$shoutbox+$rating+$mod+$reward);
	

	if ($sum <= "1") {$rang = "0";$level = "Naujokas";}
	if ($sum >= "1") {$rang = "5";$level = "Pradinukas";}
	if ($sum >= "5") {$rang = "25";$level = "Ap?ylantis";}
	if ($sum >= "25") {$rang = "50";$level = "D Chemikas";}
	if ($sum >= "50") {$rang = "100";$level = "C Chemikas";}
	if ($sum >= "100") {$rang = "250";$level = "B Chemikas";}
	if ($sum >= "250") {$rang = "500";$level = "A Chemikas";}
	if ($sum >= "500") {$rang = "1000";$level = "Mokytojas";}
	if ($sum >= "1000") {$rang = "2000";$level = "Profesorius";}
	if ($sum >= "2000") {$rang = "4000";$level = "Vir?ininkas";}
	if ($sum >= "4000") {$rang = "10000";$level = "Vir?ininkas kvadratu";}
	$poll_posts = $rang;
	$opt_posts = ($poll_posts ? number_format(100 / $poll_posts * $sum) : 0);
	
		if ($exp_type == "1") { 
echo"<br>Lygis: <b>$level</b>
<br>Iki kito: [$opt_posts%]
<br>

	<table width='100%' border='1' class='line'><tr><th width='100%'> 
	<img src='".IMAGES."line.gif' title='Procentine linija' height='8' width='$opt_posts%' align='left' >
	</td></tr></table>

<br>Prane?imų forume: <b>$posts</b>
<br>Komentarų: <b>$comment</b>
<br>Klausimynas: <b>$reward</b>

";

		}

	}
}

?>