<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="cyb_topstats" active="1">
<title>Cyb - إحصائيات المنتدى المتقدمة</title>
<description>Cyb - إحصائيات المنتدى المتقدمة</description>
<version>6.5</version>
<url>http://www.algdeer.net/forum/showthread_1205.html</url>
<versioncheckurl><![CDATA[]]></versioncheckurl>

<codes>
	<code version="5.6">
		<installcode><![CDATA[$db->hide_errors();
		$vbulletin->db->query_write("ALTER TABLE `" . TABLE_PREFIX . "user` ADD showcybstats TINYINT( 1 ) DEFAULT '1' NOT NULL");

		$cyb_ind_b = false;
		$cyb_check_indexes = $vbulletin->db->query_read("SHOW INDEX FROM " . TABLE_PREFIX . "user");
		while ($cyb_found_indexes = $vbulletin->db->fetch_array($cyb_check_indexes))
		{
			if ($cyb_found_indexes['Key_name'] == 'post_thanks_thanked_times')
			{
				$cyb_ind_b = true;
			}
		}
		if (mysql_query("SELECT post_thanks_thanked_times FROM " . TABLE_PREFIX . "user LIMIT 0") AND !$cyb_ind_b)
		{
			$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD INDEX (post_thanks_thanked_times)");
		}
		$db->show_errors();]]></installcode>
		<uninstallcode><![CDATA[$db->hide_errors();
		$vbulletin->db->query_write("ALTER TABLE " . TABLE_PREFIX . "user DROP showcybstats");
		$db->show_errors();]]></uninstallcode>
	</code>
</codes>

<plugins>
	<plugin active="1" product="vbulletin">
		<title><![CDATA[Cybernetec's Hacks Template Group]]></title>
		<hookname>template_groups</hookname>
		<phpcode>$only['cyb_'] = 'Cybernetec';
		</phpcode>
	</plugin>
	<plugin active="1" product="cyb_topstats">
		<title><![CDATA[Cyb - Advanced Forum Statistics - CT]]></title>
		<hookname>cache_templates</hookname>
		<phpcode><![CDATA[
		if ($vbulletin->options['cybtopstats_enable_global'])
		{
			$globaltemplates = array_merge($globaltemplates, array('cyb_topstats_stats', 'cyb_topstats_newposts', 'cyb_topstats_latestnews', 'cyb_topstats_mostviewed', 'cyb_topstats_hottest', 'cyb_topstats_topforums', 'cyb_topstats_classads', 'cyb_topstats_blogs', 'cyb_topstats_groupposts', 'cyb_topstats_member', 'cyb_topstats_poster', 'cyb_topstats_starter', 'cyb_topstats_referrer', 'cyb_topstats_reputation', 'cyb_topstats_thanks', 'cyb_topstats_infractions', 'cyb_topstats_visitors', 'cyb_topstats_groups', 'cyb_topstats_donations', 'cyb_topstats_php', 'cyb_topstats_stats_srow'));
		}]]></phpcode>
	</plugin>
	<plugin active="1" product="cyb_topstats">
		<title><![CDATA[Cyb - Advanced Forum Statistics - MN]]></title>
		<hookname>parse_templates</hookname>
		<phpcode><![CDATA[
		$cybtopstats_prelocs = '';
		if ($vbulletin->options['cybtopstats_vbacmps_loc']!=0)
		{		
			$cybtopstats_prelocs .= 'adv_index,';
		}	
		if ($vbulletin->options['cybtopstats_add_loc']!='')
		{
			$cybtopstats_prelocs .= 'misc,';
		}
		else
		{
			$cybtopstats_prelocs .= 'misc';
		}
		eval('$cybtopstats_locs = in_array(THIS_SCRIPT, array(' . $cybtopstats_prelocs . $vbulletin->options['cybtopstats_add_loc'] . '));');

		if ($vbulletin->options['cybtopstats_enable_global'] AND !is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['cybtopstats_excl_groups'])) AND !isset($_POST['fromquickreply']))
		{
			if ($vbulletin->userinfo['userid'])
			{
				if ($vbulletin->userinfo['showcybstats']=='1')
				{
					$cybstats_show = true;
				}
				else
				{
					$cybstats_show = false;
				}

				if (!$cybstats_show)
				{
					$cyb_topstats_turnonlink = '<a href="'.$vbulletin->options['bburl'].'/misc.php?'.$session['sessionurl'].'do=enablestats" rel="nofollow">'.$vbphrase['cyb_afs_turnon_stats'].'</a>';					
					$cyb_topstats_turnonlink_nb = '<tr><td class="vbmenu_option">'.$cyb_topstats_turnonlink.'</td></tr>';
					$vbulletin->templatecache['navbar'] = str_replace('$vbphrase[miscellaneous]</td></tr>', '$vbphrase[miscellaneous]</td></tr>$cyb_topstats_turnonlink_nb', $vbulletin->templatecache['navbar']);
				}
			}
			else
			{
				$cybstats_show = true;
			}
		}

		if ($cybstats_show AND ((($vbulletin->options['cybtopstats_window_loc']!='0') AND (THIS_SCRIPT == "index")) OR in_array(THIS_SCRIPT, array($cybtopstats_locs))))
		{
			$db->hide_errors();
			global $vbulletin;

			$cybstats_latestnews_enabled = false;
			$cybstats_mostviewedthreads_enabled = false;
			$cybstats_hottestthreads_enabled = false;
			$cybstats_hottestforums_enabled = false;
			$cybstats_classifiedads_enabled = false;
			$cybstats_latestblogs_enabled = false;
			$cybstats_groupposts_enabled = false;
			$cybstats_newestmembers_enabled = false;
			$cybstats_posters_enabled = false;
			$cybstats_threadstarters_enabled = false;
			$cybstats_referrers_enabled = false;
			$cybstats_reputations_enabled = false;
			$cybstats_thanked_enabled = false;
			$cybstats_infractions_enabled = false;
			$cybstats_visitors_enabled = false;
			$cybstats_groups_enabled = false;
			$cybstats_donations_enabled = false;
			$cybstats_f_enabled = '';
			$cybstats_u_enabled = '';

			$cybstats_latestposts_enabled = true;
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'latestposts_l'))
			{
				$cybstats_latestposts_pos = 1;
			}
			else
			{
				$cybstats_latestposts_pos = 2;
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'latestnews') AND ($vbulletin->options['cybtopstats_latestnews_newsforumid']!=''))
			{
				$cybstats_latestnews_enabled = true;
				$cybstats_f_enabled .= ',latestnews';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'mostviewedthreads'))
			{
				$cybstats_mostviewedthreads_enabled = true;
				$cybstats_f_enabled .= ',mostviewedthreads';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'hottestthreads'))
			{
				$cybstats_hottestthreads_enabled = true;
				$cybstats_f_enabled .= ',hottestthreads';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'hottestforums'))
			{
				$cybstats_hottestforums_enabled = true;
				$cybstats_f_enabled .= ',hottestforums';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'classifiedads') AND ($vbulletin->options['cybtopstats_classads_forums']!=''))
			{
				$cybstats_classifiedads_enabled = true;
				$cybstats_f_enabled .= ',classifiedads';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'latestblogs'))
			{
				$cybstats_latestblogs_enabled = true;
				$cybstats_f_enabled .= ',latestblogs';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'groupposts'))
			{
				$cybstats_groupposts_enabled = true;
				$cybstats_f_enabled .= ',groupposts';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'newestmembers'))
			{
				$cybstats_newestmembers_enabled = true;
				$cybstats_u_enabled .= ',newestmembers';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'posters'))
			{
				$cybstats_posters_enabled = true;
				$cybstats_u_enabled .= ',posters';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'threadstarters'))
			{
				$cybstats_threadstarters_enabled = true;
				$cybstats_u_enabled .= ',threadstarters';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'referrers'))
			{
				$cybstats_referrers_enabled = true;
				$cybstats_u_enabled .= ',referrers';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'reputations'))
			{
				$cybstats_reputations_enabled = true;
				$cybstats_u_enabled .= ',reputations';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'thanked') AND $vbulletin->options['post_thanks_on_off'])
			{
				$cybstats_thanked_enabled = true;
				$cybstats_u_enabled .= ',thanked';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'infractions'))
			{
				$cybstats_infractions_enabled = true;
				$cybstats_u_enabled .= ',infractions';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'visitors'))
			{
				$cybstats_visitors_enabled = true;
				$cybstats_u_enabled .= ',visitors';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'groups'))
			{
				$cybstats_groups_enabled = true;
				$cybstats_u_enabled .= ',groups';
			}
			if (strstr($vbulletin->options['cybtopstats_enable_items'], 'donations') AND $vbulletin->options['cybpaypal_enable'] AND is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['cybpaypal_canseelist'])))
			{
				$cybstats_donations_enabled = true;
				$cybstats_u_enabled .= ',donations';
			}
			$cybstats_f_enabled = substr($cybstats_f_enabled, 1);
			$cybstats_u_enabled = substr($cybstats_u_enabled, 1);

			if ($vbulletin->options['cybtopstats_switch_fdef']=='random')
			{
				if (strstr($cybstats_f_enabled, ','))
				{
					$cybtopstats_enabled_fitems = explode(",",$cybstats_f_enabled);
					$cybtopstats_renabled_fitem = array_rand($cybtopstats_enabled_fitems,2);
					$cybtopstats_init_fstat = $cybtopstats_enabled_fitems[$cybtopstats_renabled_fitem[0]];
				}
				else
				{
					$cybtopstats_init_fstat = $cybstats_f_enabled;
				}
			}
			else if (strstr($cybstats_f_enabled, $vbulletin->options['cybtopstats_switch_fdef']))
			{
				$cybtopstats_init_fstat = $vbulletin->options['cybtopstats_switch_fdef'];
			}
			if (!$cybtopstats_init_fstat)
			{
				$cybtopstats_init_fstat = "badadmin";
				
			}

			if ($vbulletin->options['cybtopstats_switch_udef']=='random')
			{
				if (strstr($cybstats_u_enabled, ','))
				{
					$cybtopstats_enabled_uitems = explode(",",$cybstats_u_enabled);
					$cybtopstats_renabled_uitem = array_rand($cybtopstats_enabled_uitems,2);
					$cybtopstats_init_ustat = $cybtopstats_enabled_uitems[$cybtopstats_renabled_uitem[0]];
				}
				else
				{
					$cybtopstats_init_ustat = $cybstats_u_enabled;
				}
			}
			else if (strstr($cybstats_u_enabled, $vbulletin->options['cybtopstats_switch_udef']))
			{
				$cybtopstats_init_ustat = $vbulletin->options['cybtopstats_switch_udef'];
			}
			if (!$cybtopstats_init_ustat)
			{
				$cybtopstats_init_ustat = "badadmin";
			}

			$cybstats_latestposts_tcenabled = false;
			$cybstats_latestnews_tcenabled = false;
			$cybstats_mostviewedthreads_tcenabled = false;
			$cybstats_hottestthreads_tcenabled = false;
			$cybstats_hottestforums_tcenabled = false;
			$cybstats_classifiedads_tcenabled = false;
			$cybstats_latestblogs_tcenabled = false;
			$cybstats_newestmembers_tcenabled = false;
			$cybstats_posters_tcenabled = false;
			$cybstats_threadstarters_tcenabled = false;
			$cybstats_referrers_tcenabled = false;
			$cybstats_reputations_tcenabled = false;
			$cybstats_thanked_tcenabled = false;
			$cybstats_infractions_tcenabled = false;
			if ($vbulletin->options['cybtopstats_timecut']>0)
			{
				$cybtopstats_timecut_start = TIMENOW - ($vbulletin->options['cybtopstats_timecut'] * 86400);
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_latestposts'))
				{
					$cybstats_latestposts_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_lastpost = "AND thread.lastpost > $cybtopstats_timecut_start";
				}			
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_latestnews'))
				{
					$cybstats_latestnews_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_latestnews = "AND dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_mostviewedthreads'))
				{
					$cybstats_mostviewedthreads_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_mostviewed = "AND dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_hottestthreads'))
				{
					$cybstats_hottestthreads_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_hottest = "AND dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_hottestforums'))
				{
					$cybstats_hottestforums_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_topforums = "AND post.dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_classifiedads'))
				{
					$cybstats_classifiedads_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_classads = "AND dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_latestblogs'))
				{
					$cybstats_latestblogs_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_blogs = "AND dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_newestmembers'))
				{
					$cybstats_newestmembers_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_newmem = "AND joindate > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_posters'))
				{
					$cybstats_posters_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_toppost = "AND post.dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_threadstarters'))
				{
					$cybstats_threadstarters_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_topstarters = "AND thread.dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_referrers'))
				{
					$cybstats_referrers_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_topreferrers = "AND refs.joindate > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_reputations'))
				{
					$cybstats_reputations_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_rep = "AND reputation.dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_thanked'))
				{
					$cybstats_thanked_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_thx = "AND post.dateline > $cybtopstats_timecut_start";
				}
				if (strstr($vbulletin->options['cybtopstats_enable_timecut'], 'tc_infractions'))
				{
					$cybstats_infractions_tcenabled = "(".construct_phrase($vbphrase['cybstats_last_x_days'], $vbulletin->options['cybtopstats_timecut']).")";
					$cybtopstats_timecut_infractions = "AND infraction.dateline > $cybtopstats_timecut_start";
				}
			}

			if ($vbulletin->options['cybtopstats_swap_class'])
			{
				$cybstats_alt1 = "alt2";
				$cybstats_alt2 = "alt1";
			}
			else
			{
				$cybstats_alt1 = "alt1";
				$cybstats_alt2 = "alt2";
			}

			$cybstatsforumperms = array();
			foreach($vbulletin->forumcache AS $cybtsforum)
			{
				$cybstatsforumperms[$cybtsforum["forumid"]] = fetch_permissions($cybtsforum['forumid']);
				if ((!($cybstatsforumperms[$cybtsforum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canview'])) OR (!($cybtsforum['options'] & $vbulletin->bf_misc_forumoptions['active']) AND !$vbulletin->options['showprivateforums'] AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))))
				{
					$cybexclfids .= ','.$cybtsforum['forumid'];
				}
			}
			if ($vbulletin->options['cybtopstats_excl_forums']!='')
			{
				$cybexclfids .= ','.$vbulletin->options['cybtopstats_excl_forums'];
			}
			$cybexclfids = substr($cybexclfids, 1);
			if ($cybexclfids!='')
			{
				$cybexclforums_lastposts = "AND thread.forumid NOT IN($cybexclfids)";
				$cybexclforums_topforums = "AND thread.forumid NOT IN($cybexclfids)";
				$cybexclforums = "AND forumid NOT IN($cybexclfids)";
			}
			unset($cybtsforum);

			if ($vbulletin->options['cybtopstats_excl_groups_listing']!='')
			{
				$cybexclgids = ','.$vbulletin->options['cybtopstats_excl_groups_listing'];
			}			
			$cybexclgids = substr($cybexclgids, 1);
			if ($cybexclgids!='')
			{
				$cybexclgroups_user = "AND user.usergroupid NOT IN ($cybexclgids)";
				$cybexclgroups = "AND usergroupid NOT IN ($cybexclgids)";
			}			

			if ($_REQUEST['do'] == 'cybstats')
			{
				$resultsnr = $vbulletin->input->clean_gpc('r', 'resultsnr', TYPE_UINT);

				$cyb_rnr_options = explode(',', $vbulletin->options['cybtopstats_amount_more']);
				foreach ($cyb_rnr_options AS $cyb_rnr_option)
				{
					eval('$resultsnrsw .= " <option value=\"'.$cyb_rnr_option.'\" " . iif($resultsnr==$cyb_rnr_option," selected=\"selected\"","").">'.$cyb_rnr_option.'</option> ";');
				}

				if ($resultsnr < 1)
				{
					$resultsnr = intval($vbulletin->options['cybtopstats_amount_more']);
				}
			}
			else
			{
				$resultsnr = intval($vbulletin->options['cybtopstats_amount_main']);
				if ($resultsnr < 1)
				{
					$resultsnr = intval($vbulletin->options['cybtopstats_amount_more']);
				}
			}

			$cybtopstats_temptable = '<table cellpadding="'.$vbulletin->options['cybtopstats_cellpadding'].'" cellspacing="0" border="0" width="100%" align="center"><tr><td class="smallfont">'.$vbphrase['cybstats_loading'].'</td></tr>'.str_repeat('<tr><td class="smallfont">&nbsp;</td></tr>', $resultsnr-1).'</table>';

			if ($vbulletin->options['cybtopstats_layout']==1)
			{
				eval('$cybstats_srow .= "' . $vbulletin->templatecache['cyb_topstats_stats_srow'] . '";');	
			}

			$trimthreadtitle = $vbulletin->options['cybtopstats_trim_titles_thread'];
			if ($trimthreadtitle <= 0)
			{
				$trimthreadtitle = $vbulletin->options['lastthreadchars'];
			}
			if ($trimthreadtitle == 1)
			{
				$trimthreadtitle = 300;
			}
			$trimusername = $vbulletin->options['cybtopstats_trim_username'];
			$trimforumtitles = $vbulletin->options['cybtopstats_trim_titles_forum'];	

			$newpostprefix = '<img border="0" alt="'.$vbphrase['new'].'" src="'.$vbulletin->options['cybtopstats_prefix_new'].'" />';
			$oldpostprefix = '<img border="0" alt="'.$vbphrase['old'].'" src="'.$vbulletin->options['cybtopstats_prefix_old'].'" />';
			$cyb_afs_bpar = array("<strong>","</strong>","<b>","</b>", "font-weight: bold", "font-weight:bold");

			if (!is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['cybtopstats_cant_viewmore'])))
			{
				$canviewmore = true;
			}
			else
			{
				$canviewmore = false;
			}

			switch ($vbulletin->options['cybtopstats_window_loc'])
			{
				case 0: $cyb_topstats_sr1 = ''; break;
				case 1: $cyb_topstats_sr1 = '$navbar'; break;
				case 2:	$cyb_topstats_sr1 = '<!-- main -->'; break;
				case 3: $cyb_topstats_sr1 = '<!-- what\'s going on box -->'; break;
				case 4:	$cyb_topstats_sr1 = '<!-- end what\'s going on box -->'; break;
			}

			eval('$cybtopstats .= "' . $vbulletin->templatecache['cyb_topstats_stats'] . '";');
			if ($vbulletin->options['cybtopstats_window_loc']!='0')
			{
				$vbulletin->templatecache['FORUMHOME'] = str_replace($cyb_topstats_sr1, $cyb_topstats_sr1.'$cybtopstats', $vbulletin->templatecache['FORUMHOME']);
			}

			$vba_options['portal_outputglobals'] .= "\r\ncybtopstats";
			switch ($vbulletin->options['cybtopstats_vbacmps_loc'])
			{
				case 0: $cyb_topstats_srp1 = ''; break;
				case 1: $cyb_topstats_srp1 = '$navbar'; break;
				case 2:	$cyb_topstats_srp1 = '$home[centerblocks]'; break;
				case 3: $cyb_topstats_srp1 = '$home[centerblocks]'; break;
				case 4:	$cyb_topstats_srp1 = '$footer'; break;
			}
			if (($vbulletin->options['cybtopstats_vbacmps_loc']==1) OR ($vbulletin->options['cybtopstats_vbacmps_loc']==3))
			{
				$vbulletin->templatecache['adv_portal'] = str_replace($cyb_topstats_srp1, $cyb_topstats_srp1.'$cybtopstats', $vbulletin->templatecache['adv_portal']);
			}
			if (($vbulletin->options['cybtopstats_vbacmps_loc']==2) OR ($vbulletin->options['cybtopstats_vbacmps_loc']==4))
			{
				$vbulletin->templatecache['adv_portal'] = str_replace($cyb_topstats_srp1, '$cybtopstats'.$cyb_topstats_srp1, $vbulletin->templatecache['adv_portal']);
			}
			$db->show_errors();
		}]]></phpcode>
	</plugin>
	<plugin active="1" product="cyb_topstats">
		<title><![CDATA[Cyb - Advanced Forum Statistics - CS]]></title>
		<hookname>admin_options_processing</hookname>
		<phpcode><![CDATA[
		if (is_array($settings['cybtopstats_enable_items']))
		{
			$settings['cybtopstats_enable_items'] = implode(',', $settings['cybtopstats_enable_items']);
		}
		if (is_array($settings['cybtopstats_enable_timecut']))
		{
			$settings['cybtopstats_enable_timecut'] = implode(',', $settings['cybtopstats_enable_timecut']);
		}
		if (($settings['cybtopstats_refresh_interval']>0) AND ($settings['cybtopstats_refresh_interval']<10))
		{
			$settings['cybtopstats_refresh_interval'] = 10;
		}]]></phpcode>
	</plugin>
	<plugin active="1" product="cyb_topstats">
		<title><![CDATA[Cyb - Advanced Forum Statistics - FH]]></title>
		<hookname>misc_start</hookname>
		<phpcode><![CDATA[
		if ($vbulletin->options['cybtopstats_enable_global'] AND !is_member_of($vbulletin->userinfo, split(',', $vbulletin->options['cybtopstats_excl_groups'])))
		{
			$resultsnr = $vbulletin->input->clean_gpc('r', 'resultsnr', TYPE_UINT);
			if ($resultsnr < 1)
			{
				$resultsnr = intval($vbulletin->options['cybtopstats_amount_more']);
			}
			if ($vbulletin->options['cybtopstats_layout']==1)
			{
				$resultsnr_lp = $resultsnr;
			}
			else
			{
				$resultsnr_lp = ($resultsnr * 2) + 1;
			}

			if ($_REQUEST['do'] == 'cybstats')
			{
				$cybafs_sectok = $vbulletin->userinfo['securitytoken'];
				if (!$cybafs_sectok)
				{
					$cybafs_sectok = 'none';
				}

				require_once('./global.php');
				construct_forum_jump();
				$navbits = construct_navbits(array('' => $vbphrase['cyb_top_stats']));
				eval('$navbar = "' . fetch_template('navbar') . '";');
				eval('print_output("' . fetch_template('cyb_topstats_php') . '");');
			}

			if (($_REQUEST['do'] == 'enablestats') AND $vbulletin->userinfo['userid'])
			{
				$db->hide_errors();
				$vbulletin->db->query_write(" UPDATE " . TABLE_PREFIX . "user SET showcybstats = '1' WHERE userid = " . $vbulletin->userinfo['userid'] . " ");
				exec_header_redirect($vbulletin->options['forumhome'].'.php#cyb_stats');
				$db->show_errors();
			}

			if (($_REQUEST['do'] == 'disablestats') AND $vbulletin->userinfo['userid'])
			{		
				$db->hide_errors();
				$vbulletin->db->query_write(" UPDATE " . TABLE_PREFIX . "user SET showcybstats = '0' WHERE userid = " . $vbulletin->userinfo['userid'] . " ");
				$db->show_errors();
				$cyb_topstats_disabled_note = construct_phrase($vbphrase[cyb_topstats_disabled_note], $vbphrase['cyb_afs_turnon_stats'], $vbphrase['quick_links']);
				$vbulletin->url = $vbulletin->options['bburl'];
				eval(print_standard_redirect($cyb_topstats_disabled_note,0,1));
			}

			if (($_REQUEST['show']=='latestposts') AND $cybstats_latestposts_enabled)
			{
				$db->hide_errors();
				$get_stats_newposts = $vbulletin->db->query_read("
					SELECT thread.threadid, thread.title, thread.lastpost, thread.lastpostid, thread.forumid, thread.lastposter, thread.dateline, thread.views, thread.replycount, thread.visible, thread.open, user.username, user.userid, user.usergroupid, user.displaygroupid
					FROM " . TABLE_PREFIX . "thread AS thread
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.username = thread.lastposter)
					WHERE NOT ISNULL(thread.threadid) AND thread.visible = '1' AND thread.open!='10' $cybexclforums_lastposts $cybtopstats_timecut_lastpost
					ORDER BY lastpost DESC
					LIMIT 0, $resultsnr_lp
				");
				while ($get_new_posts = $db->fetch_array($get_stats_newposts))
				{
					$cybstats_rnr += 1;
					$get_new_posts[views] = vb_number_format($get_new_posts[views]);
					$get_new_posts[replycount] = vb_number_format($get_new_posts[replycount]);
					$get_new_posts[fullthreadtitle] = strip_tags($get_new_posts[title]);
					if ($trimthreadtitle > 0)
					{
						$get_new_posts[titletrimmed] = fetch_trimmed_title($get_new_posts[fullthreadtitle], $trimthreadtitle);
					}
					else
					{
						$get_new_posts[titletrimmed] = $get_new_posts[fullthreadtitle];
					}

					if ($get_new_posts[lastpost] > $vbulletin->userinfo['lastvisit'])
					{
						$get_new_posts[newpost] = true;
					}

					$get_new_posts[fullusername] = strip_tags($get_new_posts[username]);
					if ($trimusername > 0)
					{
						$get_new_posts[username] = fetch_trimmed_title($get_new_posts[fullusername], $trimusername);
					}
					else
					{
						$get_new_posts[username] = $get_new_posts[fullusername];
					}
					$get_new_posts[musername] = fetch_musername($get_new_posts);

					$get_new_posts_forumtitle = strip_tags($vbulletin->forumcache["$get_new_posts[forumid]"]['title_clean']);
					$get_new_posts[fullforumtitle] = strip_tags($get_new_posts_forumtitle);
					if ($trimforumtitles > 0)
					{
						$get_new_posts[forumtitle] = fetch_trimmed_title($get_new_posts[fullforumtitle], $trimforumtitles);
					}
					else
					{
						$get_new_posts[forumtitle] = $get_new_posts[fullforumtitle];
					}

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$get_new_posts[musername] = str_replace($cyb_afs_bpar, "", $get_new_posts[musername]); 
					}

					switch ($vbulletin->options['cybtopstats_lastpost_arrowlink'])
					{
						case 0: $cybtopstats_arrowlink = ''; break;
						case 1: $cybtopstats_arrowlink = '<a href="'.$vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'t='.$get_new_posts['threadid'].'" style="text-decoration:none;font-family:Arial;" title="'.$get_new_posts['fullthreadtitle'].'">&#9650;</a>'; break;
						case 2: $cybtopstats_arrowlink = '<a href="'.$vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'p='.$get_new_posts['lastpostid'].'#post'.$get_new_posts['lastpostid'].'" style="text-decoration:none;font-family:Arial;" title="'.construct_phrase($vbphrase['cybstats_jump_to_post_in_x'], $get_new_posts['title']).'">&#9660;</a>'; break;
						case 3: $cybtopstats_arrowlink = '<a href="'.$vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'goto=newpost&amp;t='.$get_new_posts['threadid'].'" style="text-decoration:none;font-family:Arial;" title="'.construct_phrase($vbphrase['cyb_jump_to_unread_post_in_x'], $get_new_posts['title']).'">&#9658;</a>'; break;
						default: $cybtopstats_arrowlink = '<a href="'.$vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'goto=newpost&amp;t='.$get_new_posts['threadid'].'" style="text-decoration:none;font-family:Arial;" title="'.construct_phrase($vbphrase['cyb_jump_to_unread_post_in_x'], $get_new_posts['title']).'">&#9658;</a>'; break;
					}

					switch ($vbulletin->options['cybtopstats_lastpost_titlelink'])
					{
						case 1: $cybtopstats_titlelink = $vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'t='.$get_new_posts['threadid']; break;
						case 2: $cybtopstats_titlelink = $vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'p='.$get_new_posts['lastpostid'].'#post'.$get_new_posts['lastpostid']; break;
						case 3: $cybtopstats_titlelink = $vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'goto=newpost&amp;t='.$get_new_posts['threadid']; break;
						default: $cybtopstats_titlelink = $vbulletin->options['bburl'].'/showthread.php?'.$session['sessionurl'].'t='.$get_new_posts['threadid']; break;
					}

					$get_new_postdate = vbdate($vbulletin->options['cybtopstats_date_format'], $get_new_posts[lastpost]);
					$get_new_posttime = vbdate($vbulletin->options['cybtopstats_time_format'], $get_new_posts[lastpost]);
					eval('$cybtopstats_newposts .= "' . $vbulletin->templatecache['cyb_topstats_newposts'] . '";');
				}
				$cybtopstats_newposts_colspan = "3";
				if ($vbulletin->options['cybtopstats_lastpost_dateline'])
				{
					$cybtopstats_newposts_colspan += 1;
				}
				if ($vbulletin->options['cybtopstats_lastpost_forums'])
				{
					$cybtopstats_newposts_colspan += 1;
				}
				if ($vbulletin->options['cybtopstats_lastpost_vrcount'])
				{
					$cybtopstats_newposts_colspan += 2;
				}
				if ($vbulletin->db->num_rows($get_stats_newposts) < $resultsnr_lp)
				{
					$cybtopstats_newposts .= str_repeat('<tr valign="top"><td class="smallfont" colspan="'.$cybtopstats_newposts_colspan.'" align="center">&nbsp;</td></tr>', $resultsnr_lp - $vbulletin->db->num_rows($get_stats_newposts));
				}
				unset($get_stats_newposts, $get_new_posts);
				print_output($cybtopstats_newposts);
				$db->show_errors();
				if (!$cybtopstats_newposts)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="'.$cybtopstats_newposts_colspan.'" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='latestnews') AND $cybstats_latestnews_enabled)
			{
				$db->hide_errors();
				$get_stats_latestnews = $vbulletin->db->query_read("
					SELECT threadid, title, forumid, dateline, lastpost, visible, open
					FROM " . TABLE_PREFIX . "thread AS thread
					WHERE NOT ISNULL(threadid) AND forumid IN (".$vbulletin->options['cybtopstats_latestnews_newsforumid'].") AND visible = '1' AND open!='10' $cybtopstats_timecut_latestnews
					ORDER BY dateline DESC
					LIMIT 0, $resultsnr
				");
				while ($get_latest_news = $db->fetch_array($get_stats_latestnews))
				{
					$cybstats_rnr += 1;
					$get_latest_news[fullthreadtitle] = strip_tags($get_latest_news[title]);
					if ($trimthreadtitle > 0)
					{
						$get_latest_news[titletrimmed] = fetch_trimmed_title($get_latest_news[fullthreadtitle], $trimthreadtitle);
					}
					else
					{
						$get_latest_news[titletrimmed] = $get_latest_news[fullthreadtitle];
					}
					if ($get_latest_news[lastpost] > $vbulletin->userinfo['lastvisit'])
					{
						$get_latest_news[newpost] = true;
					}
					$get_news_postdate = vbdate($vbulletin->options['cybtopstats_date_format'], $get_latest_news[dateline]);
					eval('$cybtopstats_latestnews .= "' . $vbulletin->templatecache['cyb_topstats_latestnews'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_latestnews) < $resultsnr)
				{
					$cybtopstats_latestnews .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_latestnews));
				}
				unset($get_stats_latestnews, $get_latest_news);
				print_output($cybtopstats_latestnews);
				$db->show_errors();
				if (!$cybtopstats_latestnews)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='mostviewedthreads') AND $cybstats_mostviewedthreads_enabled)
			{
				$db->hide_errors();
				$get_stats_mostviewed = $vbulletin->db->query_read("
					SELECT threadid, title, forumid, views, dateline, visible, open
					FROM " . TABLE_PREFIX . "thread AS thread
					WHERE NOT ISNULL(threadid) AND visible = '1' AND views > '0' AND open!='10' $cybexclforums $cybtopstats_timecut_mostviewed
					ORDER BY views DESC
					LIMIT 0, $resultsnr
				");
				while ($get_most_viewed = $db->fetch_array($get_stats_mostviewed))
				{
					$cybstats_rnr += 1;
					$get_most_viewed[views] = vb_number_format($get_most_viewed[views]);
					$get_most_viewed[fullthreadtitle] = strip_tags($get_most_viewed[title]);
					if ($trimthreadtitle > 0)
					{
						$get_most_viewed[titletrimmed] = fetch_trimmed_title($get_most_viewed[fullthreadtitle], $trimthreadtitle);
					}
					else
					{
						$get_most_viewed[titletrimmed] = $get_most_viewed[fullthreadtitle];
					}

					if ($get_most_viewed[lastpost] > $vbulletin->userinfo['lastvisit'])
					{
						$get_most_viewed[newpost] = true;
					}
					eval('$cybtopstats_mostviewed .= "' . $vbulletin->templatecache['cyb_topstats_mostviewed'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_mostviewed) < $resultsnr)
				{
					$cybtopstats_mostviewed .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_mostviewed));
				}
				unset($get_stats_mostviewed, $get_most_viewed);
				print_output($cybtopstats_mostviewed);
				$db->show_errors();
				if (!$cybtopstats_mostviewed)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='hottestthreads') AND $cybstats_hottestthreads_enabled)
			{
				$db->hide_errors();
				$get_stats_hottest = $vbulletin->db->query_read("
					SELECT threadid, title, lastpost, forumid, replycount, dateline, visible, open
					FROM " . TABLE_PREFIX . "thread AS thread
					WHERE NOT ISNULL(threadid) AND visible = '1' AND replycount > '0' AND open!='10' $cybexclforums $cybtopstats_timecut_hottest
					ORDER BY replycount DESC
					LIMIT 0, $resultsnr
				");
				while ($get_hottest_threads = $db->fetch_array($get_stats_hottest))
				{
					$cybstats_rnr += 1;
					$get_hottest_threads[replycount] = vb_number_format($get_hottest_threads[replycount]);
					$get_hottest_threads[fullthreadtitle] = strip_tags($get_hottest_threads[title]);
					if ($trimthreadtitle > 0)
					{
						$get_hottest_threads[titletrimmed] = fetch_trimmed_title($get_hottest_threads[fullthreadtitle], $trimthreadtitle);
					}
					else
					{
						$get_hottest_threads[titletrimmed] = $get_hottest_threads[fullthreadtitle];
					}

					if ($get_hottest_threads[lastpost] > $vbulletin->userinfo['lastvisit'])
					{
						$get_hottest_threads[newpost] = true;
					}
					eval('$cybtopstats_hottest .= "' . $vbulletin->templatecache['cyb_topstats_hottest'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_hottest) < $resultsnr)
				{
					$cybtopstats_hottest .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_hottest));
				}
				unset($get_stats_hottest, $get_hottest_threads);
				print_output($cybtopstats_hottest);
				$db->show_errors();
				if (!$cybtopstats_hottest)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='hottestforums') AND $cybstats_hottestforums_enabled)
			{
				$db->hide_errors();
				if ($cybstats_hottestforums_tcenabled)
				{
					$get_stats_topforums = $vbulletin->db->query_read("
						SELECT COUNT(post.postid) AS replycount, forum.forumid, forum.title_clean
						FROM " . TABLE_PREFIX . "post AS post
						LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
						LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (thread.forumid = forum.forumid)
						WHERE post.visible='1' AND thread.visible='1' AND (forum.options & 4096) $cybexclforums_topforums $cybtopstats_timecut_topforums
						GROUP BY thread.forumid
						ORDER BY replycount DESC
						LIMIT 0, $resultsnr
					");
				}
				else
				{
					$get_stats_topforums = $vbulletin->db->query_read("
						SELECT forumid, title_clean, replycount
						FROM " . TABLE_PREFIX . "forum AS forum
						WHERE replycount > '0' $cybexclforums
						ORDER BY replycount DESC
						LIMIT 0, $resultsnr
					");
				}
				while ($get_topforums = $db->fetch_array($get_stats_topforums))
				{
					$cybstats_rnr += 1;
					$get_topforums[replycount] = vb_number_format($get_topforums[replycount]);
					$get_topforums[fullforumtitle] = strip_tags($get_topforums[title_clean]);
					if ($trimforumtitles > 0)
					{
						$get_topforums[titletrimmed] = fetch_trimmed_title($get_topforums[fullforumtitle], $trimforumtitles);
					}
					else
					{
						$get_topforums[titletrimmed] = $get_topforums[fullforumtitle];
					}
					eval('$cybtopstats_topforums .= "' . $vbulletin->templatecache['cyb_topstats_topforums'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_topforums) < $resultsnr)
				{
					$cybtopstats_topforums .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_topforums));
				}
				unset($get_stats_topforums, $get_topforums);
				print_output($cybtopstats_topforums);
				$db->show_errors();
				if (!$cybtopstats_topforums)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='classifiedads') AND $cybstats_classifiedads_enabled)
			{
				$db->hide_errors();
				$get_stats_classads = $vbulletin->db->query_read("
					SELECT threadid, title, lastpost, forumid, dateline, visible, open
					FROM " . TABLE_PREFIX . "thread AS thread
					WHERE NOT ISNULL(threadid) AND forumid IN (".$vbulletin->options['cybtopstats_classads_forums'].") AND visible = '1' AND open!='10' $cybtopstats_timecut_classads
					ORDER BY dateline DESC
					LIMIT 0, $resultsnr
				");
				while ($get_latest_classads = $db->fetch_array($get_stats_classads))
				{
					$cybstats_rnr += 1;
					$get_latest_classads[fullthreadtitle] = strip_tags($get_latest_classads[title]);
					if ($trimthreadtitle > 0)
					{
						$get_latest_classads[titletrimmed] = fetch_trimmed_title($get_latest_classads[fullthreadtitle], $trimthreadtitle);
					}
					else
					{
						$get_latest_classads[titletrimmed] = $get_latest_classads[fullthreadtitle];
					}
	
					$get_latest_classads_forumtitle = strip_tags($vbulletin->forumcache["$get_latest_classads[forumid]"]['title_clean']);
					$get_latest_classads[fullforumtitle] = strip_tags($get_latest_classads_forumtitle);
					if ($trimforumtitles > 0)
					{
						$get_latest_classads[forumtitle] = fetch_trimmed_title($get_latest_classads[fullforumtitle], $trimforumtitles);
					}
					else
					{
						$get_latest_classads[forumtitle] = $get_latest_classads[fullforumtitle];
					}

					if ($get_latest_classads[lastpost] > $vbulletin->userinfo['lastvisit'])
					{
						$get_latest_classads[newpost] = true;
					}
					eval('$cybtopstats_classads .= "' . $vbulletin->templatecache['cyb_topstats_classads'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_classads) < $resultsnr)
				{
					$cybtopstats_classads .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_classads));
				}
				unset($get_latest_classads, $get_latest_classads);
				print_output($cybtopstats_classads);
				$db->show_errors();
				if (!$cybtopstats_classads)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='latestblogs') AND $cybstats_latestblogs_enabled)
			{
				$db->hide_errors();
				$get_stats_blogs = $vbulletin->db->query_read("
					SELECT blog.blogid, blog.title, blog.comments_visible, blog.userid, user.username, user.usergroupid, user.displaygroupid, blog.dateline
					FROM " . TABLE_PREFIX . "blog AS blog
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (blog.userid = user.userid)
					WHERE state = 'visible' $cybtopstats_timecut_blogs
					ORDER BY dateline DESC
					LIMIT 0, $resultsnr
				");
				while ($get_latest_blogs = $db->fetch_array($get_stats_blogs))
				{
					$cybstats_rnr += 1;
					$get_latest_blogs[comments_visible] = vb_number_format($get_latest_blogs[comments_visible]);
					$get_latest_blogs[fullblogtitle] = strip_tags($get_latest_blogs[title]);
					if ($trimthreadtitle > 0)
					{
						$get_latest_blogs[titletrimmed] = fetch_trimmed_title($get_latest_blogs[fullblogtitle], $trimthreadtitle);
					}
					else
					{
						$get_latest_blogs[titletrimmed] = $get_latest_blogs[fullblogtitle];
					}

					$get_latest_blogs[fullusername] = strip_tags($get_latest_blogs[username]);
					if ($trimusername > 0)
					{
						$get_latest_blogs[username] = fetch_trimmed_title($get_latest_blogs[fullusername], $trimusername);
					}
					else
					{
						$get_latest_blogs[username] = $get_latest_blogs[fullusername];
					}
					$get_latest_blogs[musername] = fetch_musername($get_latest_blogs);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$get_latest_blogs[musername] = str_replace($cyb_afs_bpar, "", $get_latest_blogs[musername]);
					}

					if ($get_latest_blogs[dateline] > $vbulletin->userinfo['lastvisit'])
					{
						$get_latest_blogs[newpost] = true;
					}
					eval('$cybtopstats_blogs .= "' . $vbulletin->templatecache['cyb_topstats_blogs'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_blogs) < $resultsnr)
				{
					$cybtopstats_blogs .= str_repeat('<tr valign="top"><td class="smallfont" colspan="4" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_blogs));
				}
				unset($get_stats_blogs, $get_latest_blogs);
				print_output($cybtopstats_blogs);
				$db->show_errors();
				if (!$cybtopstats_blogs)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="4" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='groupposts') AND $cybstats_groupposts_enabled)
			{
				$db->hide_errors();
				$get_stats_groupdisc = $vbulletin->db->query_read("
					SELECT discussion.discussionid, discussion.lastpost, discussion.lastpostid, discussion.groupid, groupmessage.title, socialgroup.name
					FROM " . TABLE_PREFIX . "discussion AS discussion
					LEFT JOIN " . TABLE_PREFIX . "groupmessage AS groupmessage ON (groupmessage.discussionid = discussion.discussionid)
					LEFT JOIN " . TABLE_PREFIX . "socialgroup AS socialgroup ON (socialgroup.groupid = discussion.groupid)
					WHERE groupmessage.state = 'visible'
					GROUP BY discussionid
					ORDER BY lastpost DESC
					LIMIT 0, $resultsnr
				");
				while ($get_latest_groupdisc = $db->fetch_array($get_stats_groupdisc))
				{
					$cybstats_rnr += 1;
					$get_latest_groupdisc[fullthreadtitle] = strip_tags($get_latest_groupdisc[title]);
					if ($trimthreadtitle > 0)
					{
						$get_latest_groupdisc[titletrimmed] = fetch_trimmed_title($get_latest_groupdisc[fullthreadtitle], $trimthreadtitle);
					}
					else
					{
						$get_latest_groupdisc[titletrimmed] = $get_latest_groupdisc[fullthreadtitle];
					}

					$get_latest_groupdisc[fullgroupname] = strip_tags($get_latest_groupdisc[name]);
					if ($trimforumtitles > 0)
					{
						$get_latest_groupdisc[nametrimmed] = fetch_trimmed_title($get_latest_groupdisc[fullgroupname], $trimforumtitles);
					}
					else
					{
						$get_latest_groupdisc[nametrimmed] = $get_latest_groupdisc[fullgroupname];
					}

					if ($get_latest_groupdisc[lastpost] > $vbulletin->userinfo['lastvisit'])
					{
						$get_latest_groupdisc[newpost] = true;
					}

					$get_latest_groupdisc_time = vbdate($vbulletin->options['cybtopstats_time_format'], $get_latest_groupdisc[lastpost]);
					eval('$cybtopstats_groupposts .= "' . $vbulletin->templatecache['cyb_topstats_groupposts'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_groupdisc) < $resultsnr)
				{
					$cybtopstats_groupposts .= str_repeat('<tr valign="top"><td class="smallfont" colspan="4" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_groupdisc));
				}
				unset($get_stats_groupdisc, $get_latest_groupdisc);
				print_output($cybtopstats_groupposts);
				$db->show_errors();
				if (!$cybtopstats_groupposts)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="4" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='newestmembers') AND $cybstats_newestmembers_enabled)
			{
				$db->hide_errors();
				$get_stats_newmem = $vbulletin->db->query_read("
					SELECT userid, usergroupid, displaygroupid, username, joindate, posts
					FROM " . TABLE_PREFIX . "user AS user
					WHERE userid > '0' $cybexclgroups $cybtopstats_timecut_newmem
					ORDER BY joindate DESC
					LIMIT 0, $resultsnr
				");
				while ($get_new_mem = $db->fetch_array($get_stats_newmem))
				{
					$cybstats_rnr += 1;
					$get_new_mem[posts] = vb_number_format($get_new_mem[posts]);
					$get_new_mem[fullusername] = strip_tags($get_new_mem[username]);
					if ($trimusername > 0)
					{
						$get_new_mem[username] = fetch_trimmed_title($get_new_mem[fullusername], $trimusername);
					}
					else
					{
						$get_new_mem[username] = $get_new_mem[fullusername];
					}
					$get_new_mem[musername] = fetch_musername($get_new_mem);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$get_new_mem[musername] = str_replace($cyb_afs_bpar, "", $get_new_mem[musername]);
					}
					if ($get_new_mem[joindate] > $vbulletin->userinfo['lastvisit'])
					{
						$get_new_mem[newuser] = true;
					}
					$cybmemberjoined = vbdate($vbulletin->options['cybtopstats_date_format'], $get_new_mem['joindate']);
					eval('$cybtopstats_members .= "' . $vbulletin->templatecache['cyb_topstats_member'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_newmem) < $resultsnr)
				{
					$cybtopstats_members .= str_repeat('<tr valign="top"><td class="smallfont" colspan="4" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_newmem));
				}
				unset($get_stats_newmem, $get_new_mem);
				print_output($cybtopstats_members);
				$db->show_errors();
				if (!$cybtopstats_members)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="4" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='posters') AND $cybstats_posters_enabled)
			{
				$db->hide_errors();
				if ($cybstats_posters_tcenabled)
				{
					$get_stats_posters = $vbulletin->db->query_read("
						SELECT COUNT(post.postid) AS posts, post.userid, post.dateline, user.usergroupid, user.displaygroupid, user.username
						FROM " . TABLE_PREFIX . "post AS post
						LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
						LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)
						LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
						WHERE user.userid > 0 AND posts > 0 AND post.visible= 1 AND (forum.options & 4096) $cybexclgroups $cybtopstats_timecut_toppost
						GROUP BY post.userid
						ORDER BY posts DESC
						LIMIT 0, $resultsnr
					");
				}
				else
				{
					$get_stats_posters = $vbulletin->db->query_read("
						SELECT userid, usergroupid, displaygroupid, username, posts
						FROM " . TABLE_PREFIX . "user AS user
						WHERE posts > '0' $cybexclgroups
						ORDER BY posts DESC
						LIMIT 0, $resultsnr
					");
				}
				while ($getstats_poster = $db->fetch_array($get_stats_posters))
				{
					$cybstats_rnr += 1;
					$getstats_poster[posts] = vb_number_format($getstats_poster[posts]);
					$getstats_poster[fullusername] = strip_tags($getstats_poster[username]);
					if ($trimusername > 0)
					{
						$getstats_poster[username] = fetch_trimmed_title($getstats_poster[fullusername], $trimusername);
					}
					else
					{
						$getstats_poster[username] = $getstats_poster[fullusername];
					}
					$getstats_poster[musername] = fetch_musername($getstats_poster);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_poster[musername] = str_replace($cyb_afs_bpar, "", $getstats_poster[musername]);
					}
					eval('$cybtopstats_posters .= "' . $vbulletin->templatecache['cyb_topstats_poster'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_posters) < $resultsnr)
				{
					$cybtopstats_posters .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_posters));
				}
				unset($get_stats_posters, $getstats_poster);
				print_output($cybtopstats_posters);
				$db->show_errors();
				if (!$cybtopstats_posters)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='threadstarters') AND $cybstats_threadstarters_enabled)
			{
				$db->hide_errors();
				$get_stats_starters = $vbulletin->db->query_read("
					SELECT COUNT(thread.threadid) AS threads, thread.postuserid, thread.dateline, user.userid, user.usergroupid, user.displaygroupid, user.username
					FROM " . TABLE_PREFIX . "thread AS thread
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (thread.postuserid = user.userid)
					LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
					WHERE thread.visible='1' AND (forum.options & 4096) AND user.userid > 0 $cybexclgroups_user $cybtopstats_timecut_topstarters
					GROUP BY thread.postuserid
					ORDER BY threads DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_starter = $db->fetch_array($get_stats_starters))
				{
					$cybstats_rnr += 1;
					$getstats_starter[threads] = vb_number_format($getstats_starter[threads]);
					$getstats_starter[fullusername] = strip_tags($getstats_starter[username]);
					if ($trimusername > 0)
					{
						$getstats_starter[username] = fetch_trimmed_title($getstats_starter[fullusername], $trimusername);
					}
					else
					{
						$getstats_starter[username] = $getstats_starter[fullusername];
					}
					$getstats_starter[musername] = fetch_musername($getstats_starter);
					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_starter[musername] = str_replace($cyb_afs_bpar, "", $getstats_starter[musername]);
					}
					eval('$cybtopstats_starters .= "' . $vbulletin->templatecache['cyb_topstats_starter'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_starters) < $resultsnr)
				{
					$cybtopstats_starters .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_starters));
				}
				unset($get_stats_starters, $getstats_starter);
				print_output($cybtopstats_starters);
				$db->show_errors();
				if (!$cybtopstats_starters)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='referrers') AND $cybstats_referrers_enabled)
			{
				$db->hide_errors();
				$get_stats_referrers = $vbulletin->db->query_read("
					SELECT COUNT(*) AS refnumber, user.username, user.userid, user.usergroupid, user.displaygroupid, user.referrerid, refs.joindate
					FROM " . TABLE_PREFIX . "user AS refs
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (refs.referrerid = user.userid)
					WHERE refs.referrerid > 0 AND user.userid > 0 $cybexclgroups_user $cybtopstats_timecut_topreferrers
					GROUP BY refs.referrerid
					ORDER BY refnumber DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_referrer = $db->fetch_array($get_stats_referrers))
				{
					$cybstats_rnr += 1;
					$getstats_referrer[refnumber] = vb_number_format($getstats_referrer[refnumber]);
					$getstats_referrer[fullusername] = strip_tags($getstats_referrer[username]);
					if ($trimusername > 0)
					{
						$getstats_referrer[username] = fetch_trimmed_title($getstats_referrer[fullusername], $trimusername);
					}
					else
					{
						$getstats_referrer[username] = $getstats_referrer[fullusername];
					}
					$getstats_referrer[musername] = fetch_musername($getstats_referrer);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_referrer[musername] = str_replace($cyb_afs_bpar, "", $getstats_referrer[musername]);
					}
					eval('$cybtopstats_referrers .= "' . $vbulletin->templatecache['cyb_topstats_referrer'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_referrers) < $resultsnr)
				{
					$cybtopstats_referrers .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_referrers));
				}
				unset($get_stats_referrers, $getstats_referrer);
				print_output($cybtopstats_referrers);
				$db->show_errors();
				if (!$cybtopstats_referrers)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='reputations') AND $cybstats_reputations_enabled)
			{
				$db->hide_errors();
				require_once(DIR . '/includes/functions_reputation.php');
				$get_stats_reputation = $vbulletin->db->query_read("
					SELECT COUNT(reputation.reputationid) AS clicks, reputation.userid, user.usergroupid, user.displaygroupid, user.username, user.reputation
					FROM " . TABLE_PREFIX . "reputation AS reputation
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (reputation.userid = user.userid)
					WHERE user.userid > 0 AND reputation.reputation > 0 $cybexclgroups $cybtopstats_timecut_rep
					GROUP BY reputation.userid
					ORDER BY user.reputation DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_rep = $db->fetch_array($get_stats_reputation))
				{
					$cybstats_rnr += 1;
					$getstats_rep[clicks] = vb_number_format($getstats_rep[clicks]);
					$getstats_rep[fullusername] = strip_tags($getstats_rep[username]);
					if ($trimusername > 0)
					{
						$getstats_rep[username] = fetch_trimmed_title($getstats_rep[fullusername], $trimusername);
					}
					else
					{
						$getstats_rep[username] = $getstats_rep[fullusername];
					}
					$getstats_rep[musername] = fetch_musername($getstats_rep);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_rep[musername] = str_replace($cyb_afs_bpar, "", $getstats_rep[musername]);
					}

					$user = fetch_userinfo($getstats_rep['userid']);
					$perms = fetch_permissions(0, $user['userid'], $user);
					$getstats_rep[reppower] = fetch_reppower($user, $perms);

					eval('$cybtopstats_reputation .= "' . $vbulletin->templatecache['cyb_topstats_reputation'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_reputation) < $resultsnr)
				{
					$cybtopstats_reputation .= str_repeat('<tr valign="top"><td class="smallfont" colspan="5" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_reputation));
				}
				unset($get_stats_reputation, $getstats_rep);
				print_output($cybtopstats_reputation);
				$db->show_errors();
				if (!$cybtopstats_reputation)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="5" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='thanked') AND $cybstats_thanked_enabled)
			{
				$db->hide_errors();
				if ($cybstats_thanked_tcenabled)
				{
					$get_stats_thanks = $vbulletin->db->query_read("
						SELECT SUM(post.post_thanks_amount) AS post_thanks_thanked_times, post.userid, user.username, user.usergroupid, user.displaygroupid
						FROM " . TABLE_PREFIX . "post AS post
						LEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)
						WHERE post_thanks_amount > 0 AND user.userid > 0 $cybexclgroups $cybtopstats_timecut_thx
						GROUP BY post.userid
						ORDER BY post_thanks_thanked_times DESC
						LIMIT 0, $resultsnr
					");
				}
				else
				{
					$get_stats_thanks = $vbulletin->db->query_read("
						SELECT userid, usergroupid, displaygroupid, username, posts, post_thanks_thanked_times
						FROM " . TABLE_PREFIX . "user AS user
						WHERE post_thanks_thanked_times > '0' $cybexclgroups
						ORDER BY post_thanks_thanked_times DESC
						LIMIT 0, $resultsnr
					");
				}
				while ($getstats_thx = $db->fetch_array($get_stats_thanks))
				{
					$cybstats_rnr += 1;
					$getstats_thx[post_thanks_thanked_times] = vb_number_format($getstats_thx[post_thanks_thanked_times]);
					$getstats_thx[fullusername] = strip_tags($getstats_thx[username]);
					if ($trimusername > 0)
					{
						$getstats_thx[username] = fetch_trimmed_title($getstats_thx[fullusername], $trimusername);
					}
					else
					{
						$getstats_thx[username] = $getstats_thx[fullusername];
					}
					$getstats_thx[musername] = fetch_musername($getstats_thx);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_thx[musername] = str_replace($cyb_afs_bpar, "", $getstats_thx[musername]);
					}
					eval('$cybtopstats_thanks .= "' . $vbulletin->templatecache['cyb_topstats_thanks'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_thanks) < $resultsnr)
				{
					$cybtopstats_thanks .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_thanks));
				}
				unset($get_stats_thanks, $getstats_thx);
				print_output($cybtopstats_thanks);
				$db->show_errors();
				if (!$cybtopstats_thanks)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='infractions') AND $cybstats_infractions_enabled)
			{
				$db->hide_errors();
				$get_stats_infractions = $vbulletin->db->query_read("
					SELECT COUNT(infraction.infractionid) AS infs, SUM(infraction.points) AS infpoints, user.userid, user.username, user.usergroupid, user.displaygroupid
					FROM " . TABLE_PREFIX . "infraction AS infraction
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (infraction.userid = user.userid)
					WHERE user.userid > 0 AND infraction.points > 0 $cybexclgroups_user $cybtopstats_timecut_infractions
					GROUP BY user.userid
					ORDER BY infpoints DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_infraction = $db->fetch_array($get_stats_infractions))
				{
					$cybstats_rnr += 1;
					$getstats_infraction[infs] = vb_number_format($getstats_infraction[infs]);
					$getstats_infraction[fullusername] = strip_tags($getstats_infraction[username]);
					if ($trimusername > 0)
					{
						$getstats_infraction[username] = fetch_trimmed_title($getstats_infraction[fullusername], $trimusername);
					}
					else
					{
						$getstats_infraction[username] = $getstats_infraction[fullusername];
					}
					$getstats_infraction[musername] = fetch_musername($getstats_infraction);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_infraction[musername] = str_replace($cyb_afs_bpar, "", $getstats_infraction[musername]);
					}
					eval('$cybtopstats_infractions .= "' . $vbulletin->templatecache['cyb_topstats_infractions'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_infractions) < $resultsnr)
				{
					$cybtopstats_infractions .= str_repeat('<tr valign="top"><td class="smallfont" colspan="4" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_infractions));
				}
				unset($get_stats_infractions, $getstats_infraction);
				print_output($cybtopstats_infractions);
				$db->show_errors();
				if (!$cybtopstats_infractions)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="4" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='visitors') AND $cybstats_visitors_enabled)
			{
				$db->hide_errors();
				$get_stats_visitors = $vbulletin->db->query_read("
					SELECT userid, username, usergroupid, displaygroupid, profilevisits
					FROM " . TABLE_PREFIX . "user AS user
					WHERE userid > 0 AND profilevisits > 0 $cybexclgroups
					ORDER BY profilevisits DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_visitor = $db->fetch_array($get_stats_visitors))
				{
					$cybstats_rnr += 1;
					$getstats_visitor[profilevisits] = vb_number_format($getstats_visitor[profilevisits]);
					$getstats_visitor[fullusername] = strip_tags($getstats_visitor[username]);
					if ($trimusername > 0)
					{
						$getstats_visitor[username] = fetch_trimmed_title($getstats_visitor[fullusername], $trimusername);
					}
					else
					{
						$getstats_visitor[username] = $getstats_visitor[fullusername];
					}
					$getstats_visitor[musername] = fetch_musername($getstats_visitor);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_visitor[musername] = str_replace($cyb_afs_bpar, "", $getstats_visitor[musername]);
					}
					eval('$cybtopstats_visitors .= "' . $vbulletin->templatecache['cyb_topstats_visitors'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_visitors) < $resultsnr)
				{
					$cybtopstats_visitors .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_visitors));
				}
				unset($get_stats_visitors, $getstats_visitor);
				print_output($cybtopstats_visitors);
				$db->show_errors();
				if (!$cybtopstats_visitors)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='groups') AND $cybstats_groups_enabled)
			{
				$db->hide_errors();
				$get_stats_groups = $vbulletin->db->query_read("
					SELECT socialgroup.groupid, socialgroup.name, socialgroup.creatoruserid, socialgroup.dateline, user.username, user.usergroupid, user.displaygroupid
					FROM " . TABLE_PREFIX . "socialgroup AS socialgroup
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (socialgroup.creatoruserid = user.userid)
					WHERE creatoruserid > 0
					ORDER BY groupid DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_group = $db->fetch_array($get_stats_groups))
				{
					$cybstats_rnr += 1;
					$getstats_group[fullgrouptitle] = strip_tags($getstats_group[name]);
					if ($trimforumtitles > 0)
					{
						$getstats_group[titletrimmed] = fetch_trimmed_title($getstats_group[fullgrouptitle], $trimforumtitles);
					}
					else
					{
						$getstats_group[titletrimmed] = $getstats_group[fullgrouptitle];
					}
					$getstats_group[fullusername] = strip_tags($getstats_group[username]);
					if ($trimusername > 0)
					{
						$getstats_group[username] = fetch_trimmed_title($getstats_group[fullusername], $trimusername);
					}
					else
					{
						$getstats_group[username] = $getstats_group[fullusername];
					}
					$getstats_group[musername] = fetch_musername($getstats_group);

					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_group[musername] = str_replace($cyb_afs_bpar, "", $getstats_group[musername]);
					}
					if ($getstats_group[dateline] > $vbulletin->userinfo['lastvisit'])
					{
						$getstats_group[newpost] = true;
					}
					$getstats_group_date = vbdate($vbulletin->options['cybtopstats_date_format'], $getstats_group[dateline]);					
					eval('$cybtopstats_groups .= "' . $vbulletin->templatecache['cyb_topstats_groups'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_groups) < $resultsnr)
				{
					$cybtopstats_groups .= str_repeat('<tr valign="top"><td class="smallfont" colspan="4" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_groups));
				}
				unset($get_stats_groups, $getstats_group);
				print_output($cybtopstats_groups);
				$db->show_errors();
				if (!$cybtopstats_groups)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="4" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if (($_REQUEST['show']=='donations') AND $cybstats_donations_enabled)
			{
				$db->hide_errors();
				$get_stats_donations = $vbulletin->db->query_read("
					SELECT cybppdonate.id, cybppdonate.userid, cybppdonate.dateline, cybppdonate.confirmed, user.username, user.usergroupid, user.displaygroupid
					FROM " . TABLE_PREFIX . "cybppdonate AS cybppdonate
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (cybppdonate.userid = user.userid)
					WHERE confirmed = 1
					ORDER BY id DESC
					LIMIT 0, $resultsnr
				");
				while ($getstats_donation = $db->fetch_array($get_stats_donations))
				{
					$cybstats_rnr += 1;
					$getstats_donation[fullusername] = strip_tags($getstats_donation[username]);
					if ($trimusername > 0)
					{
						$getstats_donation[username] = fetch_trimmed_title($getstats_donation[fullusername], $trimusername);
					}
					else
					{
						$getstats_donation[username] = $getstats_donation[fullusername];
					}
					$getstats_donation[musername] = fetch_musername($getstats_donation);
					if ($vbulletin->options['cybtopstats_bold_remove'])
					{
						$getstats_donation[musername] = str_replace($cyb_afs_bpar, "", $getstats_donation[musername]);
					}
					$getstats_donation_date = vbdate($vbulletin->options['cybtopstats_date_format'], $getstats_donation[dateline]);					
					eval('$cybtopstats_donations .= "' . $vbulletin->templatecache['cyb_topstats_donations'] . '";');
				}
				if ($vbulletin->db->num_rows($get_stats_donations) < $resultsnr)
				{
					$cybtopstats_donations .= str_repeat('<tr valign="top"><td class="smallfont" colspan="3" align="center">&nbsp;</td></tr>', $resultsnr - $vbulletin->db->num_rows($get_stats_donations));
				}
				unset($get_stats_donations, $getstats_donation);
				print_output($cybtopstats_donations);
				$db->show_errors();
				if (!$cybtopstats_donations)
				{
					print_output('<tr valign="top"><td class="smallfont" colspan="3" align="center">'.$vbphrase['cybstats_nodata'].'</td></tr>');
				}
				exit;
			}

			if ($_REQUEST['show']=='badadmin')
			{
				print_output('<tr valign="top"><td class="smallfont" align="center" nowrap="nowrap">'.$vbphrase['cybstats_badadmin'].'</td></tr>'.str_repeat('<tr><td class="smallfont">&nbsp;</td></tr>', $resultsnr-1));
				exit;
			}
		}]]></phpcode>
	</plugin>
</plugins>

<templates>
	<template name="cyb_topstats_stats" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
		<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
		<thead>
			<tr valign="top">
				<td class="tcat" align="$stylevar[left]" <if condition="($vboptions[cybtopstats_layout]==1)">colspan="3"<else />colspan="2"</if>><a name="cyb_stats" style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('cyb_fh_stats')"><img id="collapseimg_cyb_fh_stats" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_cyb_fh_stats].gif" alt="" border="0" /></a><span id="cybstatsoptions_o"><phrase 1="$resultsnr">$vbphrase[cyb_top_x_stats]</phrase> <if condition="(($canviewmore AND ($_REQUEST['do']!='cybstats')) OR ($bbuserinfo[userid] AND $cybstats_show))"><script language="Javascript" type="text/javascript"> vbmenu_register("cybstatsoptions_o"); </script></if></span>
					<if condition="(($canviewmore AND ($_REQUEST['do']!='cybstats')) OR ($bbuserinfo[userid] AND $cybstats_show))">
						<div class="vbmenu_popup" id="cybstatsoptions_o_menu" style="display:none">
							<table cellpadding="4" cellspacing="1" border="0">
								<tr valign="top">
									<td class="thead">$vbphrase[options]</td>
								</tr>
								<if condition="($canviewmore AND ($_REQUEST['do']!='cybstats'))">
								<tr valign="top">
									<td class="vbmenu_option"><a href="$vboptions[bburl]/misc.php?$session[sessionurl]do=cybstats" rel="nofollow">$vbphrase[cyb_afs_more_stats]</a></td>
								</tr>
								</if>
								<if condition="($bbuserinfo[userid] AND $cybstats_show)">
								<tr valign="top">
									<td class="vbmenu_option"><a href="$vboptions[bburl]/misc.php?$session[sessionurl]do=disablestats" rel="nofollow">$vbphrase[cyb_afs_turnoff_stats]</a></td>
								</tr>
								</if>
							</table>
						</div>
					</if>
				</td>
			</tr>
		</thead>
		<tbody id="collapseobj_cyb_fh_stats" style="$vbcollapse[collapseobj_cyb_fh_stats]">
		<if condition="($vboptions[cybtopstats_layout]==1)">
		$cybstats_srow
		<else />
			<tr valign="top">
				<if condition="($cybstats_latestposts_pos==1)">
				<td class="thead" align="$stylevar[left]" width="50%"><if condition="$bbuserinfo[userid]"><span id="cybtopstats_lprel_area" style="float:$stylevar[right]"><a href="javascript:void(0);" onclick="Cas_getLPStats('reload');" rel="nofollow">$vbphrase[reload]</a></span></if>$vbphrase[cyb_latest_posts]</td>
				</if>
				<td class="thead" align="$stylevar[left]" width="25%" nowrap="nowrap"><span id="cybstatsoptions_u"><span id="cybtopstats_rtitle_area">$vbphrase[cybstats_loading]</span><if condition="$bbuserinfo[userid]"> <script language="Javascript" type="text/javascript"> vbmenu_register("cybstatsoptions_u"); </script></if></span>
					<if condition="$bbuserinfo[userid]">
						<div class="vbmenu_popup" id="cybstatsoptions_u_menu" style="display:none">
							<table cellpadding="4" cellspacing="1" border="0">
								<tr valign="top">
									<td class="thead">$vbphrase[cyb_top_userstats]</td>
								</tr>
								<if condition="$cybstats_newestmembers_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'newestmembers');" rel="nofollow">$vbphrase[cyb_newest_members]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_posters_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'posters');" rel="nofollow">$vbphrase[cyb_top_posters]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_threadstarters_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'threadstarters');" rel="nofollow">$vbphrase[cyb_top_starters]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_referrers_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'referrers');" rel="nofollow">$vbphrase[cyb_top_referrers]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_reputations_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'reputations');" rel="nofollow">$vbphrase[cyb_top_reputation]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_thanked_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'thanked');" rel="nofollow">$vbphrase[cyb_thanked_members]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_infractions_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'infractions');" rel="nofollow">$vbphrase[cyb_top_infractions]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_visitors_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'visitors');" rel="nofollow">$vbphrase[cyb_top_visitors]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_groups_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'groups');" rel="nofollow">$vbphrase[cyb_latest_groups]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_donations_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'donations');" rel="nofollow">$vbphrase[cyb_latest_donations]</a></td>
								</tr>
								</if>
							</table>
						</div>
					</if>
				</td>
				<if condition="($cybstats_latestposts_pos==2)">
				<td class="thead" align="$stylevar[left]" width="50%"><if condition="$bbuserinfo[userid]"><span id="cybtopstats_lprel_area" style="float:$stylevar[right]"><a href="javascript:void(0);" onclick="Cas_getLPStats('reload');" rel="nofollow">$vbphrase[reload]</a></span></if>$vbphrase[cyb_latest_posts]</td>
				</if>
			</tr>
			<tr valign="top">
				<if condition="($cybstats_latestposts_pos==1)">
				<td class="$cybstats_alt2" width="50%" id="cybstats_lpdiv" style="padding:0px;margin:0px;border-width:0px;" rowspan="3"><span class="smallfont">$vbphrase[cybstats_loading]</span></td>
				</if>
				<td class="$cybstats_alt2" width="25%" id="cybstats_udiv" style="padding:0px;margin:0px;border-width:0px;">$cybtopstats_temptable</td>
				<if condition="($cybstats_latestposts_pos==2)">
				<td class="$cybstats_alt2" width="50%" id="cybstats_lpdiv" style="padding:0px;margin:0px;border-width:0px;" rowspan="3"><span class="smallfont">$vbphrase[cybstats_loading]</span></td>
				</if>
			</tr>
			<tr valign="top">
				<td class="thead" align="$stylevar[left]" width="25%" nowrap="nowrap"><span id="cybstatsoptions_f"><span id="cybtopstats_ltitle_area">$vbphrase[cybstats_loading]</span><if condition="$bbuserinfo[userid]"> <script language="Javascript" type="text/javascript"> vbmenu_register("cybstatsoptions_f"); </script></if></span>
					<if condition="$bbuserinfo[userid]">
						<div class="vbmenu_popup" id="cybstatsoptions_f_menu" style="display:none">
							<table cellpadding="4" cellspacing="1" border="0">
								<tr valign="top">
									<td class="thead">$vbphrase[cyb_top_forumstats]</td>
								</tr>
								<if condition="$cybstats_latestnews_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('latestnews', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_news]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_mostviewedthreads_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('mostviewedthreads', 'onlyf');" rel="nofollow">$vbphrase[cyb_most_viewed]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_hottestthreads_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('hottestthreads', 'onlyf');" rel="nofollow">$vbphrase[cyb_hottest_threads]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_hottestforums_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('hottestforums', 'onlyf');" rel="nofollow">$vbphrase[cyb_top_forums]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_classifiedads_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('classifiedads', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_classads]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_latestblogs_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('latestblogs', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_blogs]</a></td>
								</tr>
								</if>
								<if condition="$cybstats_groupposts_enabled">
								<tr valign="top">
									<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('groupposts', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_groupposts]</a></td>
								</tr>
								</if>
							</table>
						</div>
					</if>
				</td>
			</tr>
			<tr valign="top">
				<td class="$cybstats_alt2" width="25%" id="cybstats_fdiv" style="padding:0px;margin:0px;border-width:0px;">$cybtopstats_temptable</td>
			</tr>
		</if>
		</tbody>
		<if condition="($bbuserinfo[userid] AND ($vboptions[cybtopstats_refresh_interval]>0))">
		<tfoot>
			<tr>
				<td class="tfoot" <if condition="($vboptions[cybtopstats_layout]==1)">colspan="3"<else />colspan="2"</if>><span id="cyb_stats_status" class="smallfont"> </span></td>
			</tr>
		</tfoot>
		</if>
	</table>

	<script language="JavaScript" type="text/javascript">
	<!--
		<if condition="($bbuserinfo[userid] AND ($vboptions[cybtopstats_refresh_interval]>0))">
		Cas_ResetLoad = null;
		</if>

		function Cas_getLPStats(rel)
		{
			<if condition="($bbuserinfo[userid] AND ($vboptions[cybtopstats_refresh_interval]>0))">
			document.getElementById("cyb_stats_status").innerHTML = "$vbphrase[cybstats_loading]";
			clearTimeout(Cas_ResetLoad);
			</if>
			
			if (rel=='reload')
			{
				document.getElementById("cybtopstats_lprel_area").style.display = "none";
			}

			Cas_AFStats_LP = new vB_AJAX_Handler(true);
			Cas_AFStats_LP.onreadystatechange(Cas_updateStatsLP);
			Cas_AFStats_LP.send('$vboptions[bburl]/misc.php?show=latestposts&resultsnr=$resultsnr');
		}

		function Cas_updateStatsLP()
		{
			if (Cas_AFStats_LP)
			{
				if (Cas_AFStats_LP.handler.readyState == 4 && Cas_AFStats_LP.handler.status == 200 && Cas_AFStats_LP.handler.responseText)
				{
					Cas_AFStats_LPDiv = fetch_object('cybstats_lpdiv');
					Cas_AFStats_LPDiv.innerHTML = '<table cellpadding="$vboptions[cybtopstats_cellpadding]" cellspacing="0" border="0" width="100%" align="center">' + Cas_AFStats_LP.handler.responseText + '</table>';
				}
			}
			<if condition="($bbuserinfo[userid] AND ($vboptions[cybtopstats_refresh_interval]>0))">
			document.getElementById("cyb_stats_status").innerHTML = "$vbphrase[cybstats_loading_interval]: $vboptions[cybtopstats_refresh_interval]s";
			</if>
			setTimeout('document.getElementById("cybtopstats_lprel_area").style.display = "inline";', ($vboptions[cybtopstats_reload_interval] * 1000));
		}

		function Cas_getStats(statid, secstat)
		{
			<if condition="($bbuserinfo[userid] AND ($vboptions[cybtopstats_refresh_interval]>0))">
			document.getElementById("cyb_stats_status").innerHTML = "$vbphrase[cybstats_loading]";
			clearTimeout(Cas_ResetLoad);
			</if>

			if (statid!='onlyu')
			{
				Cas_AFStats_F = new vB_AJAX_Handler(true);
				Cas_AFStats_F.cybcurr_f = statid;
				Cas_AFStats_F.onreadystatechange(Cas_updateStats);
				switch(statid)
				{
					case 'latestnews': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=latestnews&resultsnr=$resultsnr'); break;
					case 'mostviewedthreads': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=mostviewedthreads&resultsnr=$resultsnr'); break;
					case 'hottestthreads': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=hottestthreads&resultsnr=$resultsnr'); break;
					case 'hottestforums': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=hottestforums&resultsnr=$resultsnr'); break;
					case 'classifiedads': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=classifiedads&resultsnr=$resultsnr'); break;
					case 'latestblogs': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=latestblogs&resultsnr=$resultsnr'); break;
					case 'groupposts': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=groupposts&resultsnr=$resultsnr'); break;
					case 'badadmin': Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=badadmin'); break;
					default: Cas_AFStats_F.send('$vboptions[bburl]/misc.php?show=hottestforums&resultsnr=$resultsnr'); break;
				}
			}

			if (secstat!='onlyf')
			{
				Cas_AFStats_U = new vB_AJAX_Handler(true);
				Cas_AFStats_U.cybcurr_u = secstat;
				Cas_AFStats_U.onreadystatechange(Cas_updateStats);
				switch(secstat)
				{
					case 'newestmembers': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=newestmembers&resultsnr=$resultsnr'); break;
					case 'posters': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=posters&resultsnr=$resultsnr'); break;
					case 'threadstarters': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=threadstarters&resultsnr=$resultsnr'); break;
					case 'referrers': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=referrers&resultsnr=$resultsnr'); break;
					case 'reputations': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=reputations&resultsnr=$resultsnr'); break;
					case 'thanked': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=thanked&resultsnr=$resultsnr'); break;
					case 'infractions': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=infractions&resultsnr=$resultsnr'); break;
					case 'visitors': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=visitors&resultsnr=$resultsnr'); break;
					case 'groups': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=groups&resultsnr=$resultsnr'); break;
					case 'donations': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=donations&resultsnr=$resultsnr'); break;
					case 'badadmin': Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=badadmin'); break;
					default: Cas_AFStats_U.send('$vboptions[bburl]/misc.php?show=newestmembers&resultsnr=$resultsnr'); break;
				}
			}
		}

		function Cas_updateStats()
		{
			if (Cas_AFStats_F)
			{
				if (Cas_AFStats_F.handler.readyState == 4 && Cas_AFStats_F.handler.status == 200 && Cas_AFStats_F.handler.responseText)
				{
					Cas_AFStats_FDiv = fetch_object('cybstats_fdiv');
					cybcurr_f = Cas_AFStats_F.cybcurr_f;
					cybtarea_f = document.getElementById("cybtopstats_ltitle_area");
					switch(cybcurr_f)
					{
						case 'latestnews': cybtarea_f.innerHTML = "$vbphrase[cyb_latest_news] $cybstats_latestnews_tcenabled"; break;
						case 'mostviewedthreads': cybtarea_f.innerHTML = "$vbphrase[cyb_most_viewed] $cybstats_mostviewedthreads_tcenabled"; break;
						case 'hottestthreads': cybtarea_f.innerHTML = "$vbphrase[cyb_hottest_threads] $cybstats_hottestthreads_tcenabled"; break;
						case 'hottestforums': cybtarea_f.innerHTML = "$vbphrase[cyb_top_forums] $cybstats_hottestforums_tcenabled"; break;
						case 'classifiedads': cybtarea_f.innerHTML = "$vbphrase[cyb_latest_classads] $cybstats_classifiedads_tcenabled"; break;
						case 'latestblogs': cybtarea_f.innerHTML = "$vbphrase[cyb_latest_blogs] $cybstats_latestblogs_tcenabled"; break;
						case 'groupposts': cybtarea_f.innerHTML = "$vbphrase[cyb_latest_groupposts]"; break;
						case 'badadmin': cybtarea_f.innerHTML = "$vbphrase[cyb_top_forumstats]"; break;
						default: cybtarea_f.innerHTML = "$vbphrase[cyb_top_forums] $cybstats_hottestforums_tcenabled"; break;
					}
					Cas_AFStats_FDiv.innerHTML = '<table cellpadding="$vboptions[cybtopstats_cellpadding]" cellspacing="0" border="0" width="100%" align="center">' + Cas_AFStats_F.handler.responseText + '</table>';
				}
			}
	
			if (Cas_AFStats_U)
			{
				if (Cas_AFStats_U.handler.readyState == 4 && Cas_AFStats_U.handler.status == 200 && Cas_AFStats_U.handler.responseText)
				{
					Cas_AFStats_UDiv = fetch_object('cybstats_udiv');
					cybcurr_u = Cas_AFStats_U.cybcurr_u;
					cybtarea_u = document.getElementById("cybtopstats_rtitle_area");
					switch(cybcurr_u)
					{
						case 'newestmembers': cybtarea_u.innerHTML = "$vbphrase[cyb_newest_members] $cybstats_newestmembers_tcenabled"; break;
						case 'posters': cybtarea_u.innerHTML = "$vbphrase[cyb_top_posters] $cybstats_posters_tcenabled"; break;
						case 'threadstarters': cybtarea_u.innerHTML = "$vbphrase[cyb_top_starters] $cybstats_threadstarters_tcenabled"; break;
						case 'referrers': cybtarea_u.innerHTML = "$vbphrase[cyb_top_referrers] $cybstats_referrers_tcenabled"; break;
						case 'reputations': cybtarea_u.innerHTML = "$vbphrase[cyb_top_reputation] $cybstats_reputations_tcenabled"; break;
						case 'thanked': cybtarea_u.innerHTML = "$vbphrase[cyb_thanked_members] $cybstats_thanked_tcenabled"; break;
						case 'infractions': cybtarea_u.innerHTML = "$vbphrase[cyb_top_infractions] $cybstats_infractions_tcenabled"; break;
						case 'visitors': cybtarea_u.innerHTML = "$vbphrase[cyb_top_visitors]"; break;
						case 'groups': cybtarea_u.innerHTML = "$vbphrase[cyb_latest_groups]"; break;
						case 'donations': cybtarea_u.innerHTML = "$vbphrase[cyb_latest_donations]"; break;
						case 'badadmin': cybtarea_u.innerHTML = "$vbphrase[cyb_top_userstats]"; break;
						default: cybtarea_u.innerHTML = "$vbphrase[cyb_newest_members] $cybstats_newestmembers_tcenabled"; break;
					}
					
					Cas_AFStats_UDiv.innerHTML = '<table cellpadding="$vboptions[cybtopstats_cellpadding]" cellspacing="0" border="0" width="100%" align="center">' + Cas_AFStats_U.handler.responseText + '</table>';
				}
			}
			<if condition="($bbuserinfo[userid] AND ($vboptions[cybtopstats_refresh_interval]>0))">
			document.getElementById("cyb_stats_status").innerHTML = "$vbphrase[cybstats_loading_interval]: $vboptions[cybtopstats_refresh_interval]s";
			Cas_ResetLoad = setTimeout('Cas_getStats(cybcurr_f, cybcurr_u);Cas_getLPStats();', ($vboptions[cybtopstats_refresh_interval] * 1000));
			</if>
		}
		Cas_getLPStats("startup");
		Cas_getStats("$cybtopstats_init_fstat", "$cybtopstats_init_ustat");
	-->
	</script>
	<br />]]></template>
	<template name="cyb_topstats_stats_srow" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
		<tr valign="top">
			<if condition="($cybstats_latestposts_pos==1)">
			<td class="thead" align="$stylevar[left]" width="50%"><if condition="$bbuserinfo[userid]"><span id="cybtopstats_lprel_area" style="float:$stylevar[right]"><a href="javascript:void(0);" onclick="Cas_getLPStats('reload');" rel="nofollow">$vbphrase[reload]</a></span></if>$vbphrase[cyb_latest_posts]</td>
			</if>
			<td class="thead" align="$stylevar[left]" width="25%" nowrap="nowrap"><span id="cybstatsoptions_u"><span id="cybtopstats_rtitle_area">$vbphrase[cybstats_loading]</span><if condition="$bbuserinfo[userid]"> <script language="Javascript" type="text/javascript"> vbmenu_register("cybstatsoptions_u"); </script></if></span>
				<if condition="$bbuserinfo[userid]">
					<div class="vbmenu_popup" id="cybstatsoptions_u_menu" style="display:none">
						<table cellpadding="4" cellspacing="1" border="0">
							<tr valign="top">
								<td class="thead">$vbphrase[cyb_top_userstats]</td>
							</tr>
							<if condition="$cybstats_newestmembers_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'newestmembers');" rel="nofollow">$vbphrase[cyb_newest_members]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_posters_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'posters');" rel="nofollow">$vbphrase[cyb_top_posters]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_threadstarters_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'threadstarters');" rel="nofollow">$vbphrase[cyb_top_starters]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_referrers_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'referrers');" rel="nofollow">$vbphrase[cyb_top_referrers]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_reputations_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'reputations');" rel="nofollow">$vbphrase[cyb_top_reputation]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_thanked_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'thanked');" rel="nofollow">$vbphrase[cyb_thanked_members]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_infractions_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'infractions');" rel="nofollow">$vbphrase[cyb_top_infractions]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_visitors_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'visitors');" rel="nofollow">$vbphrase[cyb_top_visitors]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_groups_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'groups');" rel="nofollow">$vbphrase[cyb_latest_groups]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_donations_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('onlyu', 'donations');" rel="nofollow">$vbphrase[cyb_latest_donations]</a></td>
							</tr>
							</if>
						</table>
					</div>
				</if>
			</td>
			<td class="thead" align="$stylevar[left]" width="25%" nowrap="nowrap"><span id="cybstatsoptions_f"><span id="cybtopstats_ltitle_area">$vbphrase[cybstats_loading]</span><if condition="$bbuserinfo[userid]"> <script language="Javascript" type="text/javascript"> vbmenu_register("cybstatsoptions_f"); </script></if></span>
				<if condition="$bbuserinfo[userid]">
					<div class="vbmenu_popup" id="cybstatsoptions_f_menu" style="display:none">
						<table cellpadding="4" cellspacing="1" border="0">
							<tr valign="top">
								<td class="thead">$vbphrase[cyb_top_forumstats]</td>
							</tr>
							<if condition="$cybstats_latestnews_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('latestnews', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_news]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_mostviewedthreads_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('mostviewedthreads', 'onlyf');" rel="nofollow">$vbphrase[cyb_most_viewed]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_hottestthreads_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('hottestthreads', 'onlyf');" rel="nofollow">$vbphrase[cyb_hottest_threads]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_hottestforums_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('hottestforums', 'onlyf');" rel="nofollow">$vbphrase[cyb_top_forums]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_classifiedads_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('classifiedads', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_classads]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_latestblogs_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('latestblogs', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_blogs]</a></td>
							</tr>
							</if>
							<if condition="$cybstats_groupposts_enabled">
							<tr valign="top">
								<td class="vbmenu_option"><a href="javascript:void(0);" onclick="Cas_getStats('groupposts', 'onlyf');" rel="nofollow">$vbphrase[cyb_latest_groupposts]</a></td>
							</tr>
							</if>
						</table>
					</div>
				</if>
			</td>
			<if condition="($cybstats_latestposts_pos==2)">
			<td class="thead" align="$stylevar[left]" width="50%"><if condition="$bbuserinfo[userid]"><span id="cybtopstats_lprel_area" style="float:$stylevar[right]"><a href="javascript:void(0);" onclick="Cas_getLPStats('reload');" rel="nofollow">$vbphrase[reload]</a></span></if>$vbphrase[cyb_latest_posts]</td>
			</if>
		</tr>
		<tr valign="top">
			<if condition="($cybstats_latestposts_pos==1)">
			<td class="$cybstats_alt2" width="50%" id="cybstats_lpdiv" style="padding:0px;margin:0px;border-width:0px;" rowspan="3"><span class="smallfont">$vbphrase[cybstats_loading]</span></td>
			</if>
			<td class="$cybstats_alt2" width="25%" id="cybstats_udiv" style="padding:0px;margin:0px;border-width:0px;">$cybtopstats_temptable</td>
			<td class="$cybstats_alt2" width="25%" id="cybstats_fdiv" style="padding:0px;margin:0px;border-width:0px;">$cybtopstats_temptable</td>
			<if condition="($cybstats_latestposts_pos==2)">
			<td class="$cybstats_alt2" width="50%" id="cybstats_lpdiv" style="padding:0px;margin:0px;border-width:0px;" rowspan="3"><span class="smallfont">$vbphrase[cybstats_loading]</span></td>
			</if>
		</tr>]]></template>
	<template name="cyb_topstats_newposts" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center" valign="middle"><if condition="$get_new_posts[newpost]">$newpostprefix<else />$oldpostprefix</if></td>		
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$get_new_posts[fullthreadtitle]"><a href="$cybtopstats_titlelink">$get_new_posts[titletrimmed]</a></td>
 		<if condition="$vboptions[cybtopstats_lastpost_vrcount]">
			<td align="$stylevar[right]" width="1%" class="smallfont" title="$vbphrase[views]/$vbphrase[replies]" style="border-top:0px;border-bottom:0px;border-left:0px;border-right:1px;border-color:$stylevar[time_fgcolor];border-style:dashed;"><span class="time">&nbsp;$get_new_posts[views]</span></td>
			<td align="$stylevar[left]" width="1%" class="smallfont" title="$vbphrase[views]/$vbphrase[replies]" style="border:0px;"><span class="time">$get_new_posts[replycount]&nbsp;</span></td>
		</if>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont"><if condition="!$get_new_posts[musername]"><span style="cursor:pointer;">$vbphrase[n_a]</span><else /><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$get_new_posts[userid]" title="$vbphrase[posted_by] <if condition="!$get_new_posts[musername]">$vbphrase[guest]<else />$get_new_posts[fullusername]</if>">$get_new_posts[musername]</a></if>&nbsp;&nbsp;$cybtopstats_arrowlink</td>
		<if condition="$vboptions[cybtopstats_lastpost_dateline]">
		<td align="center" nowrap="nowrap" class="smallfont" title="$vbphrase[date]/$vbphrase[time]"><if condition="$get_new_posts[newpost]">$get_new_postdate, $get_new_posttime<else /><span class="time">$get_new_postdate, $get_new_posttime</span></if></td>
		</if>
		<if condition="$vboptions[cybtopstats_lastpost_forums]">
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$get_new_posts[fullforumtitle]"><a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$get_new_posts[forumid]">$get_new_posts[forumtitle]</a>&nbsp;</td>
		</if>
	</tr>
	]]></template>
	<template name="cyb_topstats_latestnews" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont"><if condition="$get_latest_news[newpost]">$newpostprefix<else />$oldpostprefix</if>&nbsp;<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$get_latest_news[threadid]" title="$get_latest_news[fullthreadtitle]">$get_latest_news[titletrimmed]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[date]"><if condition="$get_latest_news[newpost]">$get_news_postdate<else /><span class="time">$get_news_postdate</span></if></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_mostviewed" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont"><if condition="$get_most_viewed[newpost]">$newpostprefix<else />$oldpostprefix</if>&nbsp;<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$get_most_viewed[threadid]" title="$get_most_viewed[fullthreadtitle]">$get_most_viewed[titletrimmed]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[views]">$get_most_viewed[views]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_hottest" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont"><if condition="$get_hottest_threads[newpost]">$newpostprefix<else />$oldpostprefix</if>&nbsp;<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$get_hottest_threads[threadid]" title="$get_hottest_threads[fullthreadtitle]">$get_hottest_threads[titletrimmed]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[replies]">$get_hottest_threads[replycount]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_topforums" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$get_topforums[fullforumtitle]"><a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$get_topforums[forumid]">$get_topforums[titletrimmed]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[posts]">$get_topforums[replycount]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_classads" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont"><if condition="$get_latest_classads[newpost]">$newpostprefix<else />$oldpostprefix</if>&nbsp;<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$get_latest_classads[threadid]" title="$get_latest_classads[fullthreadtitle]">$get_latest_classads[titletrimmed]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$get_latest_classads[fullforumtitle]"><a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$get_latest_classads[forumid]">$get_latest_classads[forumtitle]</a></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_blogs" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont"><if condition="$get_latest_blogs[newpost]">$newpostprefix<else />$oldpostprefix</if>&nbsp;<a href="$vboptions[bburl]/blog.php?$session[sessionurl]b=$get_latest_blogs[blogid]" title="$get_latest_blogs[fullblogtitle]">$get_latest_blogs[titletrimmed]</a></td>
		<td align="$stylevar[left]" nowrap="nowrap" class="smallfont" title="$get_latest_blogs[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$get_latest_blogs[userid]">$get_latest_blogs[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[cybstats_comments]">$get_latest_blogs[comments_visible]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_groupposts" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont"><if condition="$get_latest_groupdisc[newpost]">$newpostprefix<else />$oldpostprefix</if>&nbsp;<a href="$vboptions[bburl]/group.php?$session[sessionurl]do=discuss&gmid=$get_latest_groupdisc[lastpostid]#gmessage$get_latest_groupdisc[lastpostid]" title="<phrase 1="$get_latest_groupdisc[fullthreadtitle]">$vbphrase[cybstats_discussion_x]</phrase>">$get_latest_groupdisc[titletrimmed]</a></td>
		<td align="$stylevar[left]" nowrap="nowrap" class="smallfont" title="$vbphrase[time]"><span class="time">$get_latest_groupdisc_time</span></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="<phrase 1="$get_latest_groupdisc[fullgroupname]">$vbphrase[cybstats_group_x]</phrase>"><a href="$vboptions[bburl]/group.php?$session[sessionurl]groupid=$get_latest_groupdisc[groupid]">$get_latest_groupdisc[nametrimmed]</a></td>
	</tr>
	]]></template>	
	<template name="cyb_topstats_member" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$get_new_mem[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$get_new_mem[userid]">$get_new_mem[musername]</a></td>
		<td align="$stylevar[left]" nowrap="nowrap" class="smallfont" title="$vbphrase[join_date]"><if condition="$get_new_mem[newuser]">$cybmemberjoined<else /><span class="time">$cybmemberjoined</span></if></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[posts]"><if condition="($get_new_mem[posts]>0)"><a href="$vboptions[bburl]/search.php?do=finduser&u=$get_new_mem[userid]"><if condition="$get_new_mem[newuser]">$get_new_mem[posts]<else /><span class="time">$get_new_mem[posts]</span></if></a><else /><if condition="$get_new_mem[newuser]">$get_new_mem[posts]<else /><span class="time">$get_new_mem[posts]</span></if></if></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_poster" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_poster[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_poster[userid]">$getstats_poster[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[posts]"><a href="$vboptions[bburl]/search.php?do=finduser&u=$getstats_poster[userid]">$getstats_poster[posts]</a></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_starter" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_starter[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_starter[userid]">$getstats_starter[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[threads]""><a href="$vboptions[bburl]/search.php?do=finduser&u=$getstats_starter[userid]&starteronly=1">$getstats_starter[threads]</a></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_referrer" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_referrer[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_referrer[userid]">$getstats_referrer[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[cyb_referrals]">$getstats_referrer[refnumber]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_reputation" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_rep[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_rep[userid]">$getstats_rep[musername]</a></td>
		<td align="center" nowrap="nowrap" class="smallfont" title="$vbphrase[cyb_reputations_clicks]/$vbphrase[cyb_reputations_level_power]">$getstats_rep[clicks]</td>
		<td align="center" nowrap="nowrap" class="smallfont" title="$vbphrase[cyb_reputations_clicks]/$vbphrase[cyb_reputations_level_power]">$getstats_rep[reputation]</td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[cyb_reputations_clicks]/$vbphrase[cyb_reputations_level_power]">$getstats_rep[reppower]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_thanks" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_thx[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_thx[userid]">$getstats_thx[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[post_thanks_total_thanks]"><a href="$vboptions[bburl]/post_thanks.php?do=findthanks&u=$getstats_thx[userid]">$getstats_thx[post_thanks_thanked_times]</a></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_infractions" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_infraction[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_infraction[userid]">$getstats_infraction[musername]</a></td>
		<td align="center" nowrap="nowrap" class="smallfont" title="$vbphrase[cyb_infractions_and_points]">$getstats_infraction[infs]</td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[cyb_infractions_and_points]">$getstats_infraction[infpoints]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_visitors" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_visitor[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_visitor[userid]">$getstats_visitor[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[cybstats_profile_visits]">$getstats_visitor[profilevisits]</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_groups" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_group[fullgrouptitle]"><a href="$vboptions[bburl]/group.php?$session[sessionurl]groupid=$getstats_group[groupid]">$getstats_group[titletrimmed]</a></td>
		<td align="$stylevar[left]" nowrap="nowrap" class="smallfont" title="$vbphrase[date]"><if condition="$getstats_group[newpost]">$getstats_group_date<else /><span class="time">$getstats_group_date</span></if></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="<phrase 1="$getstats_group[fullusername]">$vbphrase[cybstats_group_createdby]</phrase>"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_group[userid]">$getstats_group[musername]</a></td>
	</tr>
	]]></template>
	<template name="cyb_topstats_donations" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
	<tr class="$cybstats_alt1" valign="top" onmouseover="this.className='$cybstats_alt2'" onmouseout="this.className='$cybstats_alt1'">
		<td class="$cybstats_alt2" width="1%" align="center"><span class="smallfont">$cybstats_rnr</span></td>
		<td align="$stylevar[left]" width="50%" nowrap="nowrap" class="smallfont" title="$getstats_donation[fullusername]"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$getstats_donation[userid]">$getstats_donation[musername]</a></td>
		<td align="$stylevar[right]" nowrap="nowrap" class="smallfont" title="$vbphrase[date]">$getstats_donation_date</td>
	</tr>
	]]></template>
	<template name="cyb_topstats_php" templatetype="template" date="1233615565" username="Cybernetec" version="6.5"><![CDATA[
		$stylevar[htmldoctype]
		<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
		<head>
		<title>$vboptions[bbtitle] - <phrase 1="$resultsnr">$vbphrase[cyb_top_x_stats]</phrase></title>
		$headinclude
		</head>
		<body>
		$header
		$navbar
		<table class="tborder" width="100%" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0">
			<tr valign="top" class="alt1">
				<if condition="$canviewmore">
					<td align="$stylevar[left]" width="100%">
						<form action="" id="cybstatsresnum" name="cybstatsresnum" method="post"><input type="hidden" name="securitytoken" value="$cybafs_sectok" /><div class="smallfont">
						<phrase 1='<br /><select id="resultsnr" name="resultsnr" tabindex="1" onchange="cybstatsresnum.submit();">$resultsnrsw</select>'>$vbphrase[cyb_afs_show_x_results]</phrase>&nbsp;<input type="submit" class="button" value="$vbphrase[cyb_afs_results_update]" accesskey="s" /></div>
						</form>
					</td>
				<else />
					<td width="100%" align="center">$vbphrase[cybstats_nopermissions]</td>
				</if>
				<td align="center">$forumjump</td>
			</tr>
		</table>
		<if condition="$canviewmore"><br />$cybtopstats</if>
		<br />
		$footer
		</body>
		</html>
	]]></template>
</templates>

<phrases>
	<phrasetype name="GLOBAL" fieldname="global">
		<phrase name="cyb_top_x_stats"><![CDATA[أعلى {1} إحصائيات]]></phrase>
		<phrase name="cyb_top_stats"><![CDATA[أعلى الإحصائيات]]></phrase>
		<phrase name="cyb_top_userstats"><![CDATA[إحصائيات الأعضاء]]></phrase>
		<phrase name="cyb_top_forumstats"><![CDATA[إحصائيات الأقسام]]></phrase>
		<phrase name="cyb_latest_news"><![CDATA[آخر أخبار المنتدى]]></phrase>
		<phrase name="cyb_newest_members"><![CDATA[الأعضاء الجدد]]></phrase>
		<phrase name="cyb_joined"><![CDATA[تاريخ الانضمام]]></phrase>
		<phrase name="cyb_top_posters"><![CDATA[أعلى المشاركين]]></phrase>
		<phrase name="cyb_top_starters"><![CDATA[أعلى كتاب المواضيع]]></phrase>
		<phrase name="cyb_top_referrers"><![CDATA[أعلى الداعين]]></phrase>
		<phrase name="cyb_referrals"><![CDATA[الدعوات]]></phrase>
		<phrase name="cyb_most_viewed"><![CDATA[أكثر المواضيع مشاهدة]]></phrase>
		<phrase name="cyb_hottest_threads"><![CDATA[المواضيع الساخنة]]></phrase>
		<phrase name="cyb_top_reputation"><![CDATA[الأعلى سمعة]]></phrase>
		<phrase name="cyb_reputations"><![CDATA[التقييم]]></phrase>
		<phrase name="cyb_reputations_clicks"><![CDATA[الضغطات]]></phrase>
		<phrase name="cyb_reputations_level_power"><![CDATA[مستوى/قوة التقييم]]></phrase>
		<phrase name="cyb_thanked_members"><![CDATA[الأعلى شكراً]]></phrase>
		<phrase name="cyb_thanked_times"><![CDATA[مرات الشكر]]></phrase>
		<phrase name="cyb_top_forums"><![CDATA[أكثر الأقسام شعبية]]></phrase>
		<phrase name="cyb_top_infractions"><![CDATA[أعلى المخالفين]]></phrase>
		<phrase name="cyb_infractions_and_points"><![CDATA[المخالفات/نقاط المخالفة]]></phrase>
		<phrase name="cyb_top_visitors"><![CDATA[زيارات الملف الشخصي]]></phrase>
		<phrase name="cybstats_profile_visits"><![CDATA[عدد الزيارات]]></phrase>
		<phrase name="cyb_latest_groups"><![CDATA[آخر مجموعات الأعضاء]]></phrase>
		<phrase name="cybstats_group_createdby"><![CDATA[أنشأت بواسطة {1}]]></phrase>
		<phrase name="cyb_latest_donations"><![CDATA[آخر التبرعات]]></phrase>
		<phrase name="cyb_latest_classads"><![CDATA[آخر الإعلانات]]></phrase>
		<phrase name="cyb_latest_blogs"><![CDATA[آخر المدوّنات]]></phrase>
		<phrase name="cyb_latest_groupposts"><![CDATA[آخر مشاركات المجموعات]]></phrase>
		<phrase name="cybstats_discussion_x"><![CDATA[النقاشات: {1}]]></phrase>
		<phrase name="cybstats_group_x"><![CDATA[المجموعة: {1}]]></phrase>
		<phrase name="cybstats_comments"><![CDATA[التعليقات]]></phrase>
		<phrase name="cybstats_ad"><![CDATA[الإعلانات]]></phrase>
		<phrase name="cyb_latest_posts"><![CDATA[آخر المشاركات]]></phrase>
		<phrase name="cybstats_last_x_days"><![CDATA[لآخر {1} يوم]]></phrase>
		<phrase name="cyb_afs_turnoff_stats"><![CDATA[إغلاق الإحصائيات المتقدمة]]></phrase>
		<phrase name="cyb_afs_turnon_stats"><![CDATA[تفعيل الإحصائيات المتقدمة]]></phrase>
		<phrase name="cybstats_nopermissions"><![CDATA[أنت لا تملك الصلاحية لمشاهدة هذه الصفحة.]]></phrase>
		<phrase name="cyb_afs_more_stats"><![CDATA[المزيد من النتائج]]></phrase>
		<phrase name="cyb_jump_to_unread_post_in_x"><![CDATA[شاهد أول مشاركة غير مقروءة في '{1}']]></phrase>
		<phrase name="cyb_afs_show_x_results"><![CDATA[النتائج للمشاهدة: {1}]]></phrase>
		<phrase name="cyb_afs_results_update"><![CDATA[تحديث]]></phrase>
		<phrase name="cybstats_jump_to_post_in_x"><![CDATA[شاهد آخر مشاركة في '{1}']]></phrase>
		<phrase name="new"><![CDATA[جديد]]></phrase>
		<phrase name="cyb_layout_onerow"><![CDATA[صف واحد]]></phrase>
		<phrase name="cyb_layout_tworows"><![CDATA[صفين]]></phrase>
		<phrase name="cybstats_loading"><![CDATA[جاري تحميل البيانات...]]></phrase>
		<phrase name="cybstats_loading_interval"><![CDATA[التحديث التلقائي]]></phrase>
		<phrase name="cybstats_put_bellow_navbar"><![CDATA[أسفل النافبار]]></phrase>
		<phrase name="cybstats_put_above_forums"><![CDATA[فوق الأقسام]]></phrase>
		<phrase name="cybstats_put_below_forums"><![CDATA[أسفل الأقسام]]></phrase>
		<phrase name="cybstats_put_below_wol"><![CDATA[أسفل "إحصائيات المنتدى"]]></phrase>
		<phrase name="cybstats_put_above_center"><![CDATA[أعلى القسم في الوسط]]></phrase>
		<phrase name="cybstats_put_below_center"><![CDATA[أسفل القسم في الوسط]]></phrase>
		<phrase name="cybstats_put_below_all"><![CDATA[فوق الفوتر]]></phrase>
		<phrase name="cybstats_mainbox_noauto"><![CDATA[وضعه بشكل يدوي]]></phrase>
		<phrase name="cybstats_nodata"><![CDATA[لا يمكن استخراج الإحصائيات من قاعدة البيانات.]]></phrase>
		<phrase name="cybstats_random"><![CDATA[عشوائي]]></phrase>
		<phrase name="cybstats_left"><![CDATA[يسار]]></phrase>
		<phrase name="cybstats_right"><![CDATA[يمين]]></phrase>
		<phrase name="cybstats_thread_start"><![CDATA[بدأ الموضوع]]></phrase>
		<phrase name="cybstats_last_post"><![CDATA[آخر مشاركة]]></phrase>
		<phrase name="cybstats_first_unread_post"><![CDATA[أول مشاركة غير مقروءة]]></phrase>
		<phrase name="cybstats_disable"><![CDATA[تعطيل]]></phrase>
		<phrase name="cybstats_badadmin"><![CDATA[خطأ: تأكد من خيارات البدأ]]></phrase>
		<phrase name="cyb_topstats_disabled_note"><![CDATA[<center>أعلى الإحصائيات تم تعطيلها بنجاح.<br /><br />لإعادة فتحها استعمل الخيار "{1}" الموجود في قائمة "{2}".</center>]]></phrase>
	</phrasetype>
	<phrasetype name="vBulletin Settings" fieldname="vbsettings">
		<phrase name="settinggroup_cybtopstats"><![CDATA[Cyb - إحصائيات المنتدى المتقدمة]]></phrase>
		<phrase name="setting_cybtopstats_enable_global_title"><![CDATA[الخيارات الرئيسية]]></phrase>
		<phrase name="setting_cybtopstats_enable_global_desc"><![CDATA[تفعيل المنتج]]></phrase>
		<phrase name="setting_cybtopstats_enable_items_desc"><![CDATA[تفعيل/تعطيل الإحصائيات]]></phrase>
		<phrase name="setting_cybtopstats_switch_fdef_desc"><![CDATA[إحصائية القسم التي ترغب ظهورها عند تحميل الصفحة]]></phrase>
		<phrase name="setting_cybtopstats_switch_udef_desc"><![CDATA[إحصائية الأعضاء التي ترغب ظهورها عند تحميل الصفحة]]></phrase>
		<phrase name="setting_cybtopstats_refresh_interval_desc"><![CDATA[التحديث التلقائي للإحصائيات بالثواني (أقل عدد 10، صفر للتعطيل)<br />ملاحظة هامة: هذا قد يرفع الضغط على السيرفر]]></phrase>
		<phrase name="setting_cybtopstats_reload_interval_desc"><![CDATA[بين كل كم فترة يستطيع الأعضاء إعادة تحديث الإحصائية يدوياً (العدد بالثاوني)]]></phrase>
		<phrase name="setting_cybtopstats_amount_main_desc"><![CDATA[عدد النتائج التي تريد إظهارها لإحصائيات المنتدى]]></phrase>
		<phrase name="setting_cybtopstats_amount_more_desc"><![CDATA[عدد النتائج لإظهارها في <a href="../misc.php?do=cybstats" target="_blank">صفحة المزيد من النتائج</a><br />(ضع الأعداد التي تريد وافصل بينها بفاصلة انجليزية)]]></phrase>
		<phrase name="setting_cybtopstats_window_loc_desc"><![CDATA[صندوق الإحصائيات في الصفحة الرئيسية]]></phrase>
		<phrase name="setting_cybtopstats_vbacmps_loc_desc"><![CDATA[صندوق الإحصائيات في الفي بي أدفانس]]></phrase>
		<phrase name="setting_cybtopstats_add_loc_desc"><![CDATA[الإحصائيات في قالب خاص (اختياري)<br /><br />Note: اقرأ الملف Info.txt للحصول على توضيحات بشأن هذا الخيار]]></phrase>

		<phrase name="setting_cybtopstats_latestnews_newsforumid_title"><![CDATA[تفاصيل الإحصائيات]]></phrase>
		<phrase name="setting_cybtopstats_latestnews_newsforumid_desc"><![CDATA[آخر أخبار المنتدى (ضع أرقام الأقسام وافصل بينها بفاصلة)]]></phrase>
		<phrase name="setting_cybtopstats_classads_forums_desc"><![CDATA[آخر الإعلانات (ضع أرقام الأقسام وافصل بينها بفاصلة)]]></phrase>
		<phrase name="setting_cybtopstats_lastpost_dateline_desc"><![CDATA['آخر المشاركات' - أظهر وقت المشاركة]]></phrase>
		<phrase name="setting_cybtopstats_lastpost_vrcount_desc"><![CDATA['آخر المشاركات' - أظهر عدد المشاهدات/المشاركات]]></phrase>
		<phrase name="setting_cybtopstats_lastpost_forums_desc"><![CDATA['آخر المشاركات' - أظهر اسم القسم]]></phrase>
		<phrase name="setting_cybtopstats_lastpost_titlelink_desc"><![CDATA['آخر المشاركات' - رابط العنوان]]></phrase>
		<phrase name="setting_cybtopstats_lastpost_arrowlink_desc"><![CDATA['آخر المشاركات' - رابط السهم]]></phrase>
	
		<phrase name="setting_cybtopstats_excl_forums_title"><![CDATA[الصلاحيات]]></phrase>
		<phrase name="setting_cybtopstats_excl_forums_desc"><![CDATA[الأقسام المستثاه من الإحصائيات (ضع الأرقام وافصل بينها بفاصلة)]]></phrase>
		<phrase name="setting_cybtopstats_excl_groups_desc"><![CDATA[مجموعات الأعضاء التي لن تستطيع مشاهدة الإحصائيات (ضع الأرقام وافصل بينها بفاصلة)]]></phrase>
		<phrase name="setting_cybtopstats_cant_viewmore_desc"><![CDATA[مجموعات الأعضاء التي لن تسطيع مشاهدة  <a href="../misc.php?do=cybstats" target="_blank">المزيد من النتائج</a>]]></phrase>		
		<phrase name="setting_cybtopstats_excl_groups_listing_desc"><![CDATA[مجموعات الأعضاء المستثناه من الإحصائية (ضع الأرقام وافصل بينها بفاصلة)]]></phrase>

		<phrase name="setting_cybtopstats_layout_title"><![CDATA[إعدادات الهيئة]]></phrase>
		<phrase name="setting_cybtopstats_layout_desc"><![CDATA[الشكل العام]]></phrase>
		<phrase name="setting_cybtopstats_date_format_desc"><![CDATA[صيغة التاريخ<br />بعض التعديلات بحاجة لـ "%" لتضاف قبل كل عامل في الصيغة]]></phrase>
		<phrase name="setting_cybtopstats_time_format_desc"><![CDATA[صيغة الوقت<br />بعض التعديلات بحاجة لـ "%" لتضاف قبل كل عامل في الصيغة]]></phrase>	
		<phrase name="setting_cybtopstats_prefix_new_desc"><![CDATA[أيقونة الموضوع الجديد]]></phrase>
		<phrase name="setting_cybtopstats_prefix_old_desc"><![CDATA[أيقونة الموضوع القديم]]></phrase>
		<phrase name="setting_cybtopstats_bold_remove_desc"><![CDATA[إزالة التغميق (bold) من أسماء الأعضاء في الإحصائية]]></phrase>
		<phrase name="setting_cybtopstats_trim_titles_thread_desc"><![CDATA[تقصير عناوين المواضيع/المدوّنات (0 - الأقسام الإفتراضية , 1 - تعطيل تقصير العناوين)]]></phrase>
		<phrase name="setting_cybtopstats_trim_titles_forum_desc"><![CDATA[تقصير أسماء المجموعات الإجتماعية والأقسام (صفر للتعطيل)]]></phrase>
		<phrase name="setting_cybtopstats_trim_username_desc"><![CDATA[تقصير أسماء الأعضاء (صفر للتعطيل)]]></phrase>
		<phrase name="setting_cybtopstats_swap_class_desc"><![CDATA[الألوان المتناوبية بين الجداول]]></phrase>
		<phrase name="setting_cybtopstats_cellpadding_desc"><![CDATA[المسافة بين الصفوف (بالبكسل)]]></phrase>

		<phrase name="setting_cybtopstats_timecut_title"><![CDATA[قطع الوقت]]></phrase>
		<phrase name="setting_cybtopstats_timecut_desc"><![CDATA[احسب الإحصائيات منذ × يوم فقط - ضع × (صفر للتعطيل)<br />ملاحظة: هذا قد يزيد وقت التحميل قليلاً]]></phrase>
		<phrase name="setting_cybtopstats_enable_timecut_desc"><![CDATA[اختر الإحصائيات لتفعيل قطع الوقت عليها]]></phrase>
	</phrasetype>
</phrases>

<options>
	<settinggroup name="cybtopstats" displayorder="65535">
		<setting varname="cybtopstats_enable_global" displayorder="5">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_enable_items" displayorder="10">
			<datatype>free</datatype>
			<optioncode><![CDATA[
<table width=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td width=\"50%\" class=\"smallfont\">
	$vbphrase[cyb_top_forumstats]
</td>
<td width=\"50%\" class=\"smallfont\">
	$vbphrase[cyb_top_userstats]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"latestnews\" id=\"cb_latestnews\" " . iif(strpos($setting[value], 'latestnews') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_news]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"newestmembers\" id=\"cb_newestmembers\" " . iif(strpos($setting[value], 'newestmembers') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_newest_members]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"mostviewedthreads\" id=\"cb_mostviewedthreads\" " . iif(strpos($setting[value], 'mostviewedthreads') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_most_viewed]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"posters\" id=\"cb_posters\" " . iif(strpos($setting[value], 'posters') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_posters]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"hottestthreads\" id=\"cb_hottestthreads\" " . iif(strpos($setting[value], 'hottestthreads') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_hottest_threads]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"threadstarters\" id=\"cb_threadstarters\" " . iif(strpos($setting[value], 'threadstarters') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_starters]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"hottestforums\" id=\"cb_hottestforums\" " . iif(strpos($setting[value], 'hottestforums') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_forums]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"referrers\" id=\"cb_referrers\" " . iif(strpos($setting[value], 'referrers') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_referrers]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"classifiedads\" id=\"cb_classifiedads\" " . iif(strpos($setting[value], 'classifiedads') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_classads]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"reputations\" id=\"cb_reputations\" " . iif(strpos($setting[value], 'reputations') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_reputation]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"latestblogs\" id=\"cb_latestblogs\" " . iif(strpos($setting[value], 'latestblogs') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_blogs]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"thanked\" id=\"cb_thanked\" " . iif(strpos($setting[value], 'thanked') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_thanked_members]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"groupposts\" id=\"cb_groupposts\" " . iif(strpos($setting[value], 'groupposts') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_groupposts]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"infractions\" id=\"cb_infractions\" " . iif(strpos($setting[value], 'infractions') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_infractions]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	&nbsp;
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"visitors\" id=\"cb_visitors\" " . iif(strpos($setting[value], 'visitors') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_visitors]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"radio\" name=\"setting[$setting[varname]][]\" value=\"latestposts_l\" id=\"cb_latestposts_l\" " . iif(strpos($setting[value], 'latestposts_l') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " /> <input type=\"radio\" name=\"setting[$setting[varname]][]\" value=\"latestposts_r\" id=\"cb_latestposts_r\" " . iif(strpos($setting[value], 'latestposts_r') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_posts] ($vbphrase[cybstats_left]/$vbphrase[cybstats_right])
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"groups\" id=\"cb_groups\" " . iif(strpos($setting[value], 'groups') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_groups]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	&nbsp
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"donations\" id=\"cb_donations\" " . iif(strpos($setting[value], 'donations') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_donations]
	<input type=\"hidden\" name=\"setting[$setting[varname]][]\" value=\"-1\" />
</td>
</tr>
</table>]]></optioncode>
			<defaultvalue>latestposts_r,mostviewedthreads,hottestthreads,hottestforums,newestmembers,posters,threadstarters,referrers,reputations,infractions,visitors,-1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_switch_fdef" displayorder="15">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
random|cybstats_random
latestnews|cyb_latest_news
mostviewedthreads|cyb_most_viewed
hottestthreads|cyb_hottest_threads
hottestforums|cyb_top_forums
classifiedads|cyb_latest_classads
latestblogs|cyb_latest_blogs
groupposts|cyb_latest_groupposts]]></optioncode>
			<defaultvalue>hottestforums</defaultvalue>
		</setting>
		<setting varname="cybtopstats_switch_udef" displayorder="20">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
random|cybstats_random
newestmembers|cyb_newest_members
posters|cyb_top_posters
threadstarters|cyb_top_starters
referrers|cyb_top_referrers
reputations|cyb_top_reputation
thanked|cyb_thanked_members
infractions|cyb_top_infractions
visitors|cyb_top_visitors
groups|cyb_latest_groups
donations|cyb_latest_donations]]></optioncode>
			<defaultvalue>posters</defaultvalue>
		</setting>
		<setting varname="cybtopstats_refresh_interval" displayorder="25">
			<datatype>number</datatype>
			<defaultvalue>0</defaultvalue>
		</setting>
		<setting varname="cybtopstats_reload_interval" displayorder="30">
			<datatype>number</datatype>
			<defaultvalue>30</defaultvalue>
		</setting>
		<setting varname="cybtopstats_amount_main" displayorder="35">
			<datatype>number</datatype>
			<defaultvalue>5</defaultvalue>
		</setting>
		<setting varname="cybtopstats_amount_more" displayorder="40">
			<datatype>free</datatype>
			<defaultvalue>5,10,20,30,50,100,200</defaultvalue>
		</setting>
		<setting varname="cybtopstats_window_loc" displayorder="45">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
0|cybstats_mainbox_noauto
1|cybstats_put_bellow_navbar
2|cybstats_put_above_forums
3|cybstats_put_below_forums
4|cybstats_put_below_wol]]></optioncode>
			<defaultvalue>3</defaultvalue>
		</setting>
		<setting varname="cybtopstats_vbacmps_loc" displayorder="50">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
0|cybstats_mainbox_noauto
1|cybstats_put_bellow_navbar
2|cybstats_put_above_center
3|cybstats_put_below_center
4|cybstats_put_below_all]]></optioncode>
			<defaultvalue>0</defaultvalue>
		</setting>
		<setting varname="cybtopstats_add_loc" displayorder="55">
			<datatype>free</datatype>
			<defaultvalue></defaultvalue>
		</setting>

		<setting varname="cybtopstats_latestnews_newsforumid" displayorder="60">
			<datatype>free</datatype>
			<defaultvalue></defaultvalue>
		</setting>	
		<setting varname="cybtopstats_classads_forums" displayorder="65">
			<datatype>free</datatype>
			<defaultvalue></defaultvalue>
		</setting>
		<setting varname="cybtopstats_lastpost_dateline" displayorder="70">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_lastpost_vrcount" displayorder="75">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_lastpost_forums" displayorder="80">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_lastpost_titlelink" displayorder="85">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
1|cybstats_thread_start
2|cybstats_last_post
3|cybstats_first_unread_post]]></optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_lastpost_arrowlink" displayorder="90">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
0|cybstats_disable
1|cybstats_thread_start
2|cybstats_last_post
3|cybstats_first_unread_post]]></optioncode>
			<defaultvalue>3</defaultvalue>
		</setting>
		<setting varname="cybtopstats_excl_forums" displayorder="95">
			<datatype>free</datatype>
			<defaultvalue></defaultvalue>
		</setting>
		<setting varname="cybtopstats_excl_groups" displayorder="100">
			<datatype>free</datatype>
			<defaultvalue></defaultvalue>
		</setting>
		<setting varname="cybtopstats_cant_viewmore" displayorder="105">
			<datatype>free</datatype>
			<defaultvalue>1,8</defaultvalue>
		</setting>
		<setting varname="cybtopstats_excl_groups_listing" displayorder="110">
			<datatype>free</datatype>
			<defaultvalue></defaultvalue>
		</setting>

		<setting varname="cybtopstats_layout" displayorder="115">
			<datatype>free</datatype>
			<optioncode><![CDATA[select:piped
1|cyb_layout_onerow
2|cyb_layout_tworows]]></optioncode>
			<defaultvalue>2</defaultvalue>
		</setting>
		<setting varname="cybtopstats_date_format" displayorder="120">
			<datatype>free</datatype>
			<defaultvalue><![CDATA[d-m]]></defaultvalue>
		</setting>
		<setting varname="cybtopstats_time_format" displayorder="125">
			<datatype>free</datatype>
			<defaultvalue><![CDATA[H:i]]></defaultvalue>
		</setting>
		<setting varname="cybtopstats_prefix_new" displayorder="130">
			<datatype>free</datatype>
			<defaultvalue><![CDATA[images/statusicon/post_new.gif]]></defaultvalue>
		</setting>
		<setting varname="cybtopstats_prefix_old" displayorder="135">
			<datatype>free</datatype>
			<defaultvalue><![CDATA[images/statusicon/post_old.gif]]></defaultvalue>
		</setting>
		<setting varname="cybtopstats_bold_remove" displayorder="140">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>1</defaultvalue>
		</setting>
		<setting varname="cybtopstats_trim_titles_thread" displayorder="145">
			<datatype>number</datatype>
			<defaultvalue>40</defaultvalue>
		</setting>
		<setting varname="cybtopstats_trim_titles_forum" displayorder="150">
			<datatype>number</datatype>
			<defaultvalue>40</defaultvalue>
		</setting>
		<setting varname="cybtopstats_trim_username" displayorder="155">
			<datatype>number</datatype>
			<defaultvalue>20</defaultvalue>
		</setting>
		<setting varname="cybtopstats_swap_class" displayorder="160">
			<datatype>free</datatype>
			<optioncode>yesno</optioncode>
			<defaultvalue>0</defaultvalue>
		</setting>
		<setting varname="cybtopstats_cellpadding" displayorder="165">
			<datatype>number</datatype>
			<defaultvalue>2</defaultvalue>
		</setting>

		<setting varname="cybtopstats_timecut" displayorder="170">
			<datatype>number</datatype>
			<defaultvalue>0</defaultvalue>
		</setting>
		<setting varname="cybtopstats_enable_timecut" displayorder="175">
			<datatype>free</datatype>
			<optioncode><![CDATA[
<table width=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td width=\"50%\" class=\"smallfont\">
	$vbphrase[cyb_top_forumstats]
</td>
<td width=\"50%\" class=\"smallfont\">
	$vbphrase[cyb_top_userstats]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_latestposts\" value=\"cb_tc_latestposts\" " . iif(strpos($setting[value], 'tc_latestposts') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_posts]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_newestmembers\" value=\"cb_tc_newestmembers\" " . iif(strpos($setting[value], 'tc_newestmembers') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_newest_members]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_latestnews\" value=\"cb_tc_latestnews\" " . iif(strpos($setting[value], 'tc_latestnews') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_news]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_posters\" value=\"cb_tc_posters\" " . iif(strpos($setting[value], 'tc_posters') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_posters]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_mostviewedthreads\" value=\"cb_tc_mostviewedthreads\" " . iif(strpos($setting[value], 'tc_mostviewedthreads') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_most_viewed]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_threadstarters\" value=\"cb_tc_threadstarters\" " . iif(strpos($setting[value], 'tc_threadstarters') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_starters]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_hottestthreads\" value=\"cb_tc_hottestthreads\" " . iif(strpos($setting[value], 'tc_hottestthreads') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_hottest_threads]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_referrers\" value=\"cb_tc_referrers\" " . iif(strpos($setting[value], 'tc_referrers') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_referrers]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_hottestforums\" value=\"cb_tc_hottestforums\" " . iif(strpos($setting[value], 'tc_hottestforums') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_forums]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_reputations\" value=\"cb_tc_reputations\" " . iif(strpos($setting[value], 'tc_reputations') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_reputation]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_classifiedads\" value=\"cb_tc_classifiedads\" " . iif(strpos($setting[value], 'tc_classifiedads') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_classads]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_thanked\" value=\"cb_tc_thanked\" " . iif(strpos($setting[value], 'tc_thanked') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_thanked_members]
</td>
</tr>
<tr>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_latestblogs\" value=\"cb_tc_latestblogs\" " . iif(strpos($setting[value], 'tc_latestblogs') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_latest_blogs]
</td>
<td class=\"smallfont\">
	<input type=\"checkbox\" name=\"setting[$setting[varname]][]\" value=\"tc_infractions\" value=\"cb_tc_infractions\" " . iif(strpos($setting[value], 'tc_infractions') !== false, ' checked="checked"') . iif($vbulletin->debug, " title=\"name=&quot;setting[$setting[varname]]&quot;\"") . " />$vbphrase[cyb_top_infractions]
	<input type=\"hidden\" name=\"setting[$setting[varname]][]\" value=\"-1\" />
</td>
</tr>
</table>]]></optioncode>
			<defaultvalue>newestmembers,posters,threadstarters,referrers,reputations,infractions,mostviewedthreads,hottestthreads,hottestforums,latestposts,-1</defaultvalue>
		</setting>
	</settinggroup>
</options>
</product>