<?php
/*===================================================+
|| # HoloCMS - Website and Content Management System
|+===================================================+
|| # Copyright ? 2008 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|+===================================================+
|| # HoloCMS is provided "as is" and comes without
|| # warrenty of any kind. HoloCMS is free software!
|+===================================================*/

$allow_guests = true;


include('global.php');
include('INC/session.php');
include('INC/class.articles.php');

$pagename = "Communauté";
$pageid = "com";

include('templates/community_subheader.php');
include('templates/community_header.php');
			function stringToURL($str,$lowercase=true,$spaces=false){
		$str = trim(preg_replace('/\s\s+/',' ',preg_replace("/[^A-Za-z0-9-]/", " ", $str)));
		if($lowercase == true){ $str = strtolower($str); }
		if($spaces == true){ $str = str_replace(" ", "-", $str); }else{ str_replace(" ", "", $str); }
		return $str;
	}
		$get_archive = mysql_query("SELECT title FROM cms_news ORDER BY num DESC");

		while ($row = mysql_fetch_array($get_archive, MYSQL_NUM)) {
		$title_safe = charset_decode_utf_8(utf8_encode(HoloText(str_replace(" ", "-", $row[0]))));
		
		}
?>

<div id="container">
        <div id="content" style="position: relative" class="clearfix">
    <div id="column1" class="column">
                                        
               
                                <div class="habblet-container ">                
                                                <div class="cbb clearfix blue ">
<div class="box-tabs-container clearfix">
    <h2>Groupes</h2>
    <ul class="box-tabs">
        <li id="tab-0-1-1" class="selected"><a href="#">Groupes les + actifs</a><span class="tab-spacer"></span></li>
        <!--<li id="tab-0-1-2" class="selected"><a href="#">Sujets r&eacute;cents</a><span class="tab-spacer"></span></li>-->
    </ul>

</div>
    <div id="tab-0-1-1-content">
                <div class="progressbar"><img src="./web-gallery/images/progress_bubbles.gif" alt="" width="29" height="6" /></div>
                <a href="./habblet/proxy.php?hid=h122" class="tab-ajax"></a>
    </div>


                                        </div>
                                </div>
                                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

                         

                                        
                                <div class="habblet-container ">                
                                                <div class="cbb clearfix activehomes ">
        
                                                        <h2 class="title">Quelques <?php echo $shortname; ?>s au hasard... Clique dessus!</h2>
                                                <div id="homes-habblet-list-container" class="habblet-list-container">
        <img class="active-habbo-imagemap" src="./web-gallery/v2/images/activehomes/transparent_area.gif" width="435px" height="230px" usemap="#habbomap" />

<?php
$i = 0;
$getem = mysql_query("SELECT * FROM users ORDER BY RAND() LIMIT 18") or die(mysql_error());

while ($row = mysql_fetch_assoc($getem)) {
$i++;
$list_id = $i - 1;

if(IsUserOnline($row['id']) == true){
        $status = "online";
} else {
        $status = "offline";
}

printf("        <div id=\"active-habbo-data-%s\" class=\"active-habbo-data\">
                    <div class=\"active-habbo-data-container\">
                        <div class=\"active-name %s\">%s</div>
                       ".$shortname." cr&eacute;e le: %s
                            <p class=\"moto\">%s</p>
                    </div>
                </div>
                <input type=\"hidden\" id=\"active-habbo-url-%s\" value=\"user_profile.php?name=%s\"/>
                <input type=\"hidden\" id=\"active-habbo-image-%s\" class=\"active-habbo-image\" value=\"http://www.habbo.com/habbo-imaging/avatarimage?figure=%s&size=b&direction=4&head_direction=4&gesture=sml\n\" />", $list_id, $status, $row['username'], $row['hbirth'], charset_decode_utf_8($row['motto']), $list_id, $row['username'], $list_id, $row['look']);
}
?>



            <div id="placeholder-container">
                    <div id="active-habbo-image-placeholder-0" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-1" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-2" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-3" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-4" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-5" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-6" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-7" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-8" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-9" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-10" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-11" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-12" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-13" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-14" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-15" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-16" class="active-habbo-image-placeholder"></div>
                    <div id="active-habbo-image-placeholder-17" class="active-habbo-image-placeholder"></div>
            </div>
    </div>

    <map id="habbomap" name="habbomap">
            <area id="imagemap-area-0" shape="rect" coords="55,53,95,103" href="#" alt=""/>
            <area id="imagemap-area-1" shape="rect" coords="120,53,160,103" href="#" alt=""/>
            <area id="imagemap-area-2" shape="rect" coords="185,53,225,103" href="#" alt=""/>
            <area id="imagemap-area-3" shape="rect" coords="250,53,290,103" href="#" alt=""/>
            <area id="imagemap-area-4" shape="rect" coords="315,53,355,103" href="#" alt=""/>
            <area id="imagemap-area-5" shape="rect" coords="380,53,420,103" href="#" alt=""/>
            <area id="imagemap-area-6" shape="rect" coords="28,103,68,153" href="#" alt=""/>
            <area id="imagemap-area-7" shape="rect" coords="93,103,133,153" href="#" alt=""/>
            <area id="imagemap-area-8" shape="rect" coords="158,103,198,153" href="#" alt=""/>
            <area id="imagemap-area-9" shape="rect" coords="223,103,263,153" href="#" alt=""/>
            <area id="imagemap-area-10" shape="rect" coords="288,103,328,153" href="#" alt=""/>
            <area id="imagemap-area-11" shape="rect" coords="353,103,393,153" href="#" alt=""/>
            <area id="imagemap-area-12" shape="rect" coords="55,153,95,203" href="#" alt=""/>
            <area id="imagemap-area-13" shape="rect" coords="120,153,160,203" href="#" alt=""/>
            <area id="imagemap-area-14" shape="rect" coords="185,153,225,203" href="#" alt=""/>
            <area id="imagemap-area-15" shape="rect" coords="250,153,290,203" href="#" alt=""/>
            <area id="imagemap-area-16" shape="rect" coords="315,153,355,203" href="#" alt=""/>
            <area id="imagemap-area-17" shape="rect" coords="380,153,420,203" href="#" alt=""/>
    </map>
<script type="text/javascript">
    var activeHabbosHabblet = new ActiveHabbosHabblet();
    document.observe("dom:loaded", function() { activeHabbosHabblet.generateRandomImages(); });
</script>


                                        </div>
                                </div>
                                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

</div>
<div id="column2" class="column">
                                <div class="habblet-container ">





                                </div>
                                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

                                <div class="habblet-container ">





                                </div>
 				<script type='text/javascript'>if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<div id="column2" class="column">
				<div class="habblet-container news-promo">
                        <div class="cbb clearfix notitle ">


                        <div id="newspromo">
        <div id="topstories">
	        <div class="topstory" style="background-image: url(<?php echo $news_1_topstory_image; ?>)">
	            <h4>Derni&egrave;re infos</a></h4>
	            <h3><a href="<?php echo $path; ?>/news?view=<?php echo $news_1_link; ?>-<?php echo $news_1_seo; ?>"><?php echo stripslashes($news_1_title); ?></a></h3>
	            <p class="summary">
	            <?php echo stripslashes($news_1_snippet); ?>
	            </p>
	            <p>
	                <a href="<?php echo $path; ?>/news?view=<?php echo $news_1_link; ?>-<?php echo $news_1_seo; ?>">En savoir plus &raquo;</a>
	            </p>
	        </div>
	        <div class="topstory" style="background-image: url(<?php echo $news_2_topstory_image; ?>); display: none">
	            <h4>Derni&egrave;re infos</h4>
	            <h3><a href="<?php echo $path; ?>/news?view=<?php echo $news_2_link; ?>-<?php echo $news_2_seo; ?>"><?php echo stripslashes($news_2_title); ?></a></h3>
	            <p class="summary">
	            <?php echo stripslashes($news_2_snippet); ?>
	            </p>
	            <p>
	                <a href="<?php echo $path; ?>/news?view=<?php echo $news_2_link; ?>-<?php echo $news_2_seo; ?>">En savoir plus &raquo;</a>
	            </p>
</div>
	        <div class="topstory" style="background-image: url(<?php echo $news_3_topstory_image; ?>); display: none">
	            <h4>Derni&egrave;re infos</h4>
	            <h3><a href="<?php echo $path; ?>/news?view=<?php echo $news_3_link; ?>-<?php echo $news_3_seo; ?>"><?php echo stripslashes($news_3_title); ?></a></h3>
	            <p class="summary">
	            <?php echo stripslashes($news_3_snippet); ?>
	            </p>
	            <p>
	                <a href="<?php echo $path; ?>/news?view=<?php echo $news_3_link; ?>-<?php echo $news_3_seo; ?>">En savoir plus &raquo;</a>
	            </p>

				

</div>
<div id="topstories-nav" style="display: none"><a href="#" class="prev">&laquo;  Pr&eacute;c&eacute;dent</a><span>1</span> / 3<a href="#" class="next">Suivant &raquo; </a></div>
</div>
        <ul class="widelist">
            <li class="even">
                <a href="<?php echo $path; ?>/news?view=<?php echo $news_4_link; ?>-<?php echo $news_4_seo; ?>"><?php echo stripslashes($news_4_title); ?></a><div class="newsitem-date"><?php echo $news_4_datestr; ?></div>
            </li>
			   <li class="odd">
                <a href="<?php echo $path; ?>/news?view=<?php echo $news_5_link; ?>-<?php echo $news_5_seo; ?>"><?php echo stripslashes($news_5_title); ?></a><div class="newsitem-date"><?php echo $news_5_datestr; ?></div>
            </li>
            <li class="last"><a href="<?php echo $path; ?>/articles">Plus d'infos &raquo;</a></li>
        </ul>
 
</div>
<script type="text/javascript">
	document.observe("dom:loaded", function() { NewsPromo.init(); });
</script>



                                        </div>
                                </div>
                                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>



</div>

<script type="text/javascript">
        HabboView.add(LoginFormUI.init);
</script>

<div id="column3" class="column">
</div>

<?php

include('templates/community_footer.php');

?>