Просмотр файла cat - skor/1/info/info_function.php

Размер файла: 24.95Kb
<?


################################################################################
#                                                                              #
#  Каталог сайтов 7wap.ru                                                      #
#  Автор - skor                                                                #
#  Email - [email protected]                                                     #
#  ICQ - 327223788                                                             #
#                                                                              #
#  Сайты:                                                                      #
#  xwap.org                                                                    #
#  2pic.org (picfon.org, xyecoc.ru, 7wap.ru)                                   #
#  wapseek.ru                                                                  #
#                                                                              #
#                                                                              #
#                                                                              #
#  Реквизиты:                                                                  #
#  R258467995540                                                               #
#  Z625573098691                                                               #
#  Яндекс 4100155569768                                                        #
#                                                                              #
#  ДАННЫЙ СКРИПТ РАСПРОСТРАНЯЕТСЯ СВОБОДНО, ТАКЖЕ РАЗРЕШАЕТСЯ ВНОСИТЬ          #
#  СВОИ ИЗМЕНЕНИЯ И ДОПОЛНЕНИЯ В КОД! ПРОДАЖА ЗАПРЕЩЕНА!                       #
#  ПРИ РАСПРОСТРАНЕНИИ ЗАПРЕЩАЕТСЯ УДАЛЯТЬ И ИЗМЕНЯТЬ ДАННУЮ ИНФОРМАЦИЮ!       #
#  ПРИ ИСПОЛЬЗОВАНИИ ИСХОДНЫХ КОДОВ ДАННОГО СКРИПТА НЕОБХОДИМО УКАЗАТЬ         #
#  АВТОРА!                                                                     #
#                                                                              #
#  Дата публикации - 28 августа 2007г.                                         #
################################################################################


# статистика по дням
function day_info($id){


			$q_cat_day = @mysql_query("SELECT * FROM `cat_stat_day` order by `i` desc;");
            $stat_day = @mysql_num_rows($q_cat_day);

           	$in_cat = $out_cat = $day = $mes = $god = array();
   			while ($data = @mysql_fetch_array($q_cat_day))
			{
				$in_cat[] = $data['in_cat'];
				$out_cat[] = $data['out_cat'];
				$day[] = $data['day'];
				$mes[] = $data['mes'];
				$god[] = $data['god'];
			}


            echo "<b>Переходы по дням</b><br/>-------<br/>";

            # моя первая wml таблица ))
			echo '<table title="тест" align="left" columns="3">';

				echo '<tr>';

					echo '<td>Дата</td>';
                    echo '<td>Пришло</td>';
                    echo '<td>Ушло</td>';

	            echo '</tr>';


	     		for($i = 0; $i < $stat_day; $i++)
				{
		            echo '<tr>';

						echo '<td>['.$day[$i].'.'.$mes[$i].'.'.$god[$i].']</td>';
	                    echo '<td align="center">'.$in_cat[$i].'</td>';
	                    echo '<td align="center">'.$out_cat[$i].'</td>';

		            echo '</tr>';

		    	}

			echo '</table>';

}




# статистика по дням
function mes_info($id){




}









# рекорды сайтов
function rekord($id){




}










# попоказам банера
function banner($id){




}










# по операторам
function opsos($id){




}










# по странам
function country($id){




}










# по моделям
function browser($id, $c, $w){

	$arr = @mysql_query("SELECT * FROM `cat_stat_browser` WHERE `id` = ".$id." LIMIT 1;");
	$i = @mysql_num_rows($arr);

		$on = $off =  array();
		$data = @mysql_fetch_array($arr);


		$summ = $data['nokia'] + $data['alcatel'] +
				$data['samsung'] + $data['benq'] +
				$data['se'] + $data['panasonic'] +
				$data['siemens'] + $data['sharp'] +
				$data['motorola'] + $data['philips'] +
				$data['lg'] + $data['opera'] +
				$data['fly'] + $data['other'] +
				$data['sagem'];


				echo "<b>Статистика по Брендам</b><br/>";

    		switch(@$w)
			{


				default:

					echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=browser&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=browser&amp;w=p\">В процентах</a><br/>";

                                echo "<u>В хитах:</u><br/>";
								echo "Nokia: ".$data['nokia']."<br/>";
								echo "Samsung: ".$data['samsung']."<br/>";
								echo "SonyEricsson: ".$data['se']."<br/>";
								echo "Siemens: ".$data['siemens']."<br/>";
								echo "Motorola: ".$data['motorola']."<br/>";
								echo "LG: ".$data['lg']."<br/>";
								echo "Fly: ".$data['fly']."<br/>";
								echo "Sagem: ".$data['sagem']."<br/>";
								echo "Alcatel: ".$data['alcatel']."<br/>";
								echo "BenQ: ".$data['benq']."<br/>";
								echo "Panasonic: ".$data['panasonic']."<br/>";
								echo "Sharp: ".$data['sharp']."<br/>";
								echo "Philips: ".$data['philips']."<br/>";
								echo "Opera: ".$data['opera']."<br/>";
								echo "Остальные: ".$data['other']."<br/>";

                break;




                case 'p':

     				echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=browser&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=browser&amp;w=\">В хитах</a><br/>";

					echo "<u>В процентах:</u><br/>";

							if($summ == 0)
							{
								echo "Nokia: 0% <br/>";
								echo "Samsung: 0% <br/>";
								echo "SonyEricsson: 0% <br/>";
								echo "Siemens: 0% <br/>";
								echo "Motorola: 0% <br/>";
								echo "LG: 0% <br/>";
								echo "Fly: 0% <br/>";
								echo "Sagem: 0% <br/>";
								echo "Alcatel: 0% <br/>";
								echo "BenQ: 0% <br/>";
								echo "Panasonic: 0% <br/>";
								echo "Sharp: 0% <br/>";
								echo "Philips: 0% <br/>";
								echo "Opera: 0% <br/>";
								echo "Остальные: 0% <br/>";
							}
							else
							{
								echo "Nokia: ";     printf("%01.2f %%<br/>",$data['nokia']/$summ*100);
								echo "Samsung: ";   printf("%01.2f %%<br/>",$data['samsung']/$summ*100);
								echo "SonyEricsson: ";        printf("%01.2f %%<br/>",$data['se']/$summ*100);
								echo "Siemens: ";   printf("%01.2f %%<br/>",$data['siemens']/$summ*100);
								echo "Motorola: ";  printf("%01.2f %%<br/>",$data['motorola']/$summ*100);
								echo "LG: ";        printf("%01.2f %%<br/>",$data['lg']/$summ*100);
								echo "Fly: ";       printf("%01.2f %%<br/>",$data['fly']/$summ*100);
								echo "Sagem: ";     printf("%01.2f %%<br/>",$data['sagem']/$summ*100);
								echo "Alcatel: ";   printf("%01.2f %%<br/>",$data['alcatel']/$summ*100);
								echo "BenQ: ";      printf("%01.2f %%<br/>",$data['benq']/$summ*100);
								echo "Panasonic: "; printf("%01.2f %%<br/>",$data['panasonic']/$summ*100);
								echo "Sharp: ";     printf("%01.2f %%<br/>",$data['sharp']/$summ*100);
								echo "Philips: ";   printf("%01.2f %%<br/>",$data['philips']/$summ*100);
								echo "Opera: ";     printf("%01.2f %%<br/>",$data['opera']/$summ*100);
								echo "Остальные: "; printf("%01.2f %%<br/>",$data['other']/$summ*100);

        					}

        		break;



        		case 'd':

        			echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=browser&amp;w=p\">В процентах</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=browser&amp;w=\">В хитах</a><br/>";

                	echo "<img src=\"../../diagramm/browser.php?v1=".$data['nokia']."&amp;v2=".$data['samsung']."&amp;v3=".$data['se']."&amp;v4=".$data['siemens']."&amp;v5=".$data['motorola']."&amp;v6=".$data['lg']."&amp;v7=".$data['fly']."&amp;v8=".$data['sagem']."&amp;v9=".$data['alcatel']."&amp;v10=".$data['benq']."&amp;v11=".$data['panasonic']."&amp;v12=".$data['sharp']."&amp;v13=".$data['philips']."&amp;v14=".$data['opera']."&amp;v15=".$data['other']."&amp;".rand(1,9999)."\" alt=\"Loading\"/><br/>";
        		    echo "<a href=\"../../diagramm/browser.php?v1=".$data['nokia']."&amp;v2=".$data['samsung']."&amp;v3=".$data['se']."&amp;v4=".$data['siemens']."&amp;v5=".$data['motorola']."&amp;v6=".$data['lg']."&amp;v7=".$data['fly']."&amp;v8=".$data['sagem']."&amp;v9=".$data['alcatel']."&amp;v10=".$data['benq']."&amp;v11=".$data['panasonic']."&amp;v12=".$data['sharp']."&amp;v13=".$data['philips']."&amp;v14=".$data['opera']."&amp;v15=".$data['other']."&amp;".rand(1,9999)."\">Скачать диаграмму</a><br/>";

        		break;

        	}


}










# разрешение дисплеев
function screen($id, $c, $w){

	$arr = @mysql_query("SELECT * FROM `cat_stat_screen` WHERE `id` = ".$id." LIMIT 1;");
	$i = @mysql_num_rows($arr);

		$on = $off =  array();
		$data = @mysql_fetch_array($arr);


				$summ = $data['352x416'] + $data['128x144'] +
				$data['320x240'] + $data['128x128'] +
				$data['240x320'] + $data['128x96'] +
				$data['208x320'] + $data['120x160'] +
				$data['208x208'] + $data['104x208'] +
				$data['176x220'] + $data['101x80'] +
				$data['176x208'] + $data['101x64'] +
				$data['132x176'] + $data['96x65'] +
				$data['130x130'] + $data['other'] +
				$data['128x160'];



                    echo "<b>Статистика по дисплеям</b><br/>";

    		switch(@$w)
			{

				default:

					echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=screen&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=screen&amp;w=p\">В процентах</a><br/>";

        			 echo "<u>В хитах:</u><br/>";

								echo "320x240: ".$data['320x240']."<br/>";
								echo "240x320: ".$data['240x320']."<br/>";
								echo "208x320: ".$data['208x320']."<br/>";
								echo "208x208: ".$data['208x208']."<br/>";
								echo "176x220: ".$data['176x220']."<br/>";
								echo "176x208: ".$data['176x208']."<br/>";
								echo "132x176: ".$data['132x176']."<br/>";
								echo "130x130: ".$data['130x130']."<br/>";
								echo "128x160: ".$data['128x160']."<br/>";
								echo "128x144: ".$data['128x144']."<br/>";
								echo "128x128: ".$data['128x128']."<br/>";
								echo "128x96: ".$data['128x96']."<br/>";
								echo "120x160: ".$data['120x160']."<br/>";
								echo "104x208: ".$data['104x208']."<br/>";
								echo "101x80: ".$data['101x80']."<br/>";
								echo "101x64: ".$data['101x64']."<br/>";
								echo "96x65: ".$data['96x65']."<br/>";
								echo "Остальные: ".$data['other']."<br/>";


				break;



                case 'p':

     				echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=screen&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=screen&amp;w=\">В хитах</a><br/>";

					echo "<u>В процентах:</u><br/>";
							if($summ == 0)
							{
								echo "320x240: 0%<br/>";
								echo "240x320: 0%<br/>";
								echo "208x320: 0%<br/>";
								echo "208x208: 0%<br/>";
								echo "176x220: 0%<br/>";
								echo "176x208: 0%<br/>";
								echo "132x176: 0%<br/>";
								echo "130x130: 0%<br/>";
								echo "128x160: 0%<br/>";
								echo "128x144: 0%<br/>";
								echo "128x128: 0%<br/>";
								echo "128x96: 0%<br/>";
								echo "120x160: 0%<br/>";
								echo "104x208: 0%<br/>";
								echo "101x80: 0%<br/>";
								echo "101x64: 0%<br/>";
								echo "96x65: 0%<br/>";
								echo "Остальные: 0%<br/>";
							}
							else
							{
								echo "320x240: ";	printf("%01.2f %%<br/>",$data['320x240']/$summ*100);
								echo "240x320: ";	printf("%01.2f %%<br/>",$data['240x320']/$summ*100);
								echo "208x320: ";	printf("%01.2f %%<br/>",$data['208x320']/$summ*100);
								echo "208x208: ";	printf("%01.2f %%<br/>",$data['208x208']/$summ*100);
								echo "176x220: ";	printf("%01.2f %%<br/>",$data['176x220']/$summ*100);
								echo "176x208: ";	printf("%01.2f %%<br/>",$data['176x208']/$summ*100);
								echo "132x176: ";	printf("%01.2f %%<br/>",$data['132x176']/$summ*100);
								echo "130x130: ";	printf("%01.2f %%<br/>",$data['130x130']/$summ*100);
								echo "128x160: ";	printf("%01.2f %%<br/>",$data['128x160']/$summ*100);
								echo "128x144: ";	printf("%01.2f %%<br/>",$data['128x144']/$summ*100);
								echo "128x128: ";	printf("%01.2f %%<br/>",$data['128x128']/$summ*100);
								echo "128x96: "; 	printf("%01.2f %%<br/>",$data['128x96']/$summ*100);
								echo "120x160: ";	printf("%01.2f %%<br/>",$data['120x160']/$summ*100);
								echo "104x208: ";	printf("%01.2f %%<br/>",$data['104x208']/$summ*100);
								echo "101x80: "; 	printf("%01.2f %%<br/>",$data['101x80']/$summ*100);
								echo "101x64: "; 	printf("%01.2f %%<br/>",$data['101x64']/$summ*100);
								echo "96x65: ";  	printf("%01.2f %%<br/>",$data['96x65']/$summ*100);
								echo "Остальные: "; printf("%01.2f %%<br/>",$data['other']/$summ*100);

        					}
        		break;


        		case 'd':

        			echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=screen&amp;w=p\">В процентах</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=screen&amp;w=\">В хитах</a><br/>";

                	echo "<img src=\"../../diagramm/screen.php?v1=".$data['320x240']."&amp;v2=".$data['208x208']."&amp;v3=".$data['176x220']."&amp;v4=".$data['176x208']."&amp;v5=".$data['128x160']."&amp;v6=".$data['128x128']."&amp;v7=".$data['101x80']."&amp;v8=".$data['other']."&amp;".rand(1,9999)."\" alt=\"Loading\"/><br/>";
        		    echo "<a href=\"../../diagramm/screen.php?v1=".$data['320x240']."&amp;v2=".$data['208x208']."&amp;v3=".$data['176x220']."&amp;v4=".$data['176x208']."&amp;v5=".$data['128x160']."&amp;v6=".$data['128x128']."&amp;v7=".$data['101x80']."&amp;v8=".$data['other']."&amp;".rand(1,9999)."\">Скачать диаграмму</a><br/>";

        		break;


        	}

}










# цвета
function color($id, $c, $w){

	$arr = @mysql_query("SELECT * FROM `cat_stat_color` WHERE `id` = ".$id." LIMIT 1;");
	$i = @mysql_num_rows($arr);

		$on = $off =  array();
		$data = @mysql_fetch_array($arr);

				$mono[] = $data['mono'];
                $_256[] = $data['256'];
                $_4096[] = $data['4096'];
                $_32k[] = $data['32k'];
                $_65k[] = $data['65k'];
                $_262k[] = $data['262k'];
                $_16777k[] = $data['16777k'];

                    echo "<b>Статистика по цветам:</b><br/>";

    		switch(@$w)
			{

				default:

					echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=color&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=color&amp;w=p\">В процентах</a><br/>";

        			 echo "<u>В хитах:</u><br/>";
					echo "Монохромный: ".$mono[0]."<br/>";
					echo "256 цветов: ".$_256[0]."<br/>";
					echo "4096 цветов: ".$_4096[0]."<br/>";
					echo "32768 цветов: ".$_32k[0]."<br/>";
					echo "65536 цветов: ".$_65k[0]."<br/>";
					echo "262 144 цветов: ".$_262k[0]."<br/>";
                    echo "16 777 216 цветов: ".$_16777k[0]."<br/>";

     			break;


     			case 'p':


     				echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=color&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=color&amp;w=\">В хитах</a><br/>";


					$summ = $mono[0] + $_256[0] + $_4096[0] + $_32k[0] + $_65k[0] + $_262k[0] + $_16777k[0];


							if($summ == 0)
							{
								echo "<u>В процентах:</u><br/>";
								echo "Монохромный: 0%<br/>";
								echo "256 цветов: 0%<br/>";
								echo "4096 цветов: 0%<br/>";
								echo "32768 цветов: 0%<br/>";
								echo "65536 цветов: 0%<br/>";
								echo "262 144 цветов: 0%<br/>";
			                    echo "16 777 216 цветов: 0%<br/>";
							}
							else
							{
								echo "<u>В процентах:</u><br/>";
								echo "Монохромный: ";
								printf("%01.2f %%<br/>",$mono[0]/$summ*100);
								echo "256 цветов: ";
								printf("%01.2f %%<br/>",$_256[0]/$summ*100);
								echo "4096 цветов: ";
								printf("%01.2f %%<br/>",$_4096[0]/$summ*100);
								echo "32768 цветов: ";
								printf("%01.2f %%<br/>",$_32k[0]/$summ*100);
								echo "65536 цветов: ";
								printf("%01.2f %%<br/>",$_65k[0]/$summ*100);
								echo "262 144 цветов: ";
								printf("%01.2f %%<br/>",$_262k[0]/$summ*100);
			                    echo "16 777 216 цветов: ";
								printf("%01.2f %%<br/>",$_16777k[0]/$summ*100);
        					}
        		break;





        		case 'd':

        			echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=color&amp;w=p\">В процентах</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=color&amp;w=\">В хитах</a><br/>";

                	echo "<img src=\"../../diagramm/color.php?v=".$mono[0]."&amp;v1=".$_256[0]."&amp;v2=".$_4096[0]."&amp;v3=".$_32k[0]."&amp;v4=".$_65k[0]."&amp;v5=".$_262k[0]."&amp;v6=".$_16777k[0]."&amp;".rand(1,9999)."\" alt=\"Loading\"/><br/>";
        		    echo "<a href=\"../../diagramm/color.php?v=".$mono[0]."&amp;v1=".$_256[0]."&amp;v2=".$_4096[0]."&amp;v3=".$_32k[0]."&amp;v4=".$_65k[0]."&amp;v5=".$_262k[0]."&amp;v6=".$_16777k[0]."&amp;".rand(1,9999)."\">Скачать диаграмму</a><br/>";

        		break;


            }



}










# камера
function camera($id, $c, $w){

	$arr = @mysql_query("SELECT * FROM `cat_stat_camera` WHERE `id` = ".$id." LIMIT 1;");
	$i = @mysql_num_rows($arr);

		$on = $off =  array();
		$data = @mysql_fetch_array($arr);

				$_31mp[] = $data['31'];		$_12mp[] = $data['12'];
				$_10mp[] = $data['10'];		$_05mp[] = $data['05'];
				$_20mp[] = $data['20'];		$_03mp[] = $data['03'];
				$_19mp[] = $data['19'];		$_01mp[] = $data['01'];
				$_13mp[] = $data['13'];     $_00mp[] = $data['00'];



    		echo "<b>Статистика по камерам:</b><br/>";

			switch(@$w)
			{

				default:
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=camera&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=camera&amp;w=p\">В процентах</a><br/>";
                    echo "В хитах:<br/>";
					echo "3.1 Mpx (2048x1536): ".$_31mp[0]."<br/>";
					echo "2.0 Mpx (1632x1224: ".$_20mp[0]."<br/>";
					echo "1.9 Mpx (1600x1200): ".$_19mp[0]."<br/>";
					echo "1.3 Mpx (1280x1024): ".$_13mp[0]."<br/>";
					echo "1.2 Mpx (1280x960): ".$_12mp[0]."<br/>";
					echo "1.0 Mpx (1152x864): ".$_10mp[0]."<br/>";
					echo "0.5 Mpx (800x600): ".$_05mp[0]."<br/>";
					echo "0.3 Mpx (640x480): ".$_03mp[0]."<br/>";
					echo "0.1 Mpx (352x288): ".$_01mp[0]."<br/>";
                    echo "Без камеры: ".$_00mp[0]."<br/>";
     			break;


     			case 'p';

     				echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=camera&amp;w=d\">Диаграмма</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=camera&amp;w=\">В хитах</a><br/>";


						$summ = $_31mp[0] + $_20mp[0] + $_19mp[0] + $_13mp[0] + $_12mp[0]
						+ $_10mp[0] + $_05mp[0] + $_03mp[0] + $_01mp[0] + $_00mp[0];


							if($summ == 0)
							{
								echo "<u>В процентах:</u><br/>";
								echo "3.1 Mpx (2048x1536): 0%<br/>";
								echo "2.0 Mpx (1632x1224: 0%<br/>";
								echo "1.9 Mpx (1600x1200): 0%<br/>";
								echo "1.3 Mpx (1280x1024): 0%<br/>";
								echo "1.2 Mpx (1280x960): 0%<br/>";
								echo "1.0 Mpx (1152x864): 0%<br/>";
								echo "0.5 Mpx (800x600): 0%<br/>";
								echo "0.3 Mpx (640x480): 0%<br/>";
								echo "0.1 Mpx (352x288): 0%<br/>";
			                    echo "Без камеры: 0%<br/>";
							}
							else
							{
								echo "<u>В процентах:</u><br/>";
								echo "3.1 Mpx (2048x1536): ";
								printf("%01.2f %%<br/>",$_31mp[0]/$summ*100);
								echo "2.0 Mpx (1632x1224: ";
								printf("%01.2f %%<br/>",$_20mp[0]/$summ*100);
								echo "1.9 Mpx (1600x1200): ";
								printf("%01.2f %%<br/>",$_19mp[0]/$summ*100);
								echo "1.3 Mpx (1280x1024): ";
								printf("%01.2f %%<br/>",$_13mp[0]/$summ*100);
								echo "1.2 Mpx (1280x960): ";
								printf("%01.2f %%<br/>",$_12mp[0]/$summ*100);
								echo "1.0 Mpx (1152x864): ";
								printf("%01.2f %%<br/>",$_10mp[0]/$summ*100);
								echo "0.5 Mpx (800x600): ";
								printf("%01.2f %%<br/>",$_05mp[0]/$summ*100);
								echo "0.3 Mpx (640x480): ";
								printf("%01.2f %%<br/>",$_03mp[0]/$summ*100);
								echo "0.1 Mpx (352x288): ";
								printf("%01.2f %%<br/>",$_01mp[0]/$summ*100);
			                    echo "Без камеры: ";
								printf("%01.2f %%<br/>",$_00mp[0]/$summ*100);
        					}

        		break;


        		case 'd':
        			echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=camera&amp;w=p\">В процентах</a><br/>";
				    echo "<a href=\"p_info.php?id=".$id."&amp;c=".$c."&amp;act=camera&amp;w=\">В хитах</a><br/>";

                	echo "<img src=\"../../diagramm/camera.php?v=".$_31mp[0]."&amp;v1=".$_20mp[0]."&amp;v2=".$_19mp[0]."&amp;v3=".$_13mp[0]."&amp;v4=".$_12mp[0]."&amp;v5=".$_10mp[0]."&amp;v6=".$_05mp[0]."&amp;v7=".$_03mp[0]."&amp;v8=".$_01mp[0]."&amp;v9=".$_00mp[0]."&amp;".rand(1,9999)."\" alt=\"Loading\"/><br/>";
        		    echo "<a href=\"../../diagramm/camera.php?v=".$_31mp[0]."&amp;v1=".$_20mp[0]."&amp;v2=".$_19mp[0]."&amp;v3=".$_13mp[0]."&amp;v4=".$_12mp[0]."&amp;v5=".$_10mp[0]."&amp;v6=".$_05mp[0]."&amp;v7=".$_03mp[0]."&amp;v8=".$_01mp[0]."&amp;v9=".$_00mp[0]."&amp;".rand(1,9999)."\">Скачать диаграмму</a><br/>";
        		break;

        	}

}












# кукисы
function cookies($id){

	$arr = @mysql_query("SELECT * FROM `cat_stat_cookies` WHERE `id` = ".$id." LIMIT 1;");
	$i = @mysql_num_rows($arr);

		$on = $off =  array();
		$data = @mysql_fetch_array($arr);

				$on[] = $data['on'];
				$off[] = $data['off'];

                   // echo "<img src=\"../../diagramm/cookies.php?v1=".$on[0]."&amp;v2=".$off[0]."\" alt=\"Loading\"/><br/>";


					echo "<b>Статистика по Cookies</b><br/>";

                    echo "<u>В хитах:</u><br/>";
					echo "Cookies вкл: ".$on[0]."<br/>";
					echo "Cookies выкл: ".$off[0]."<br/><br/>";


						$summ = $on[0] + $off[0];

							if($summ == 0)
							{
								echo "<u>В процентах:</u><br/>";
		                        echo "Cookies вкл: 0%<br/>";
								echo "Cookies выкл: 0%<br/>";
							}
							else
							{
								echo "<u>В процентах:</u><br/>";
		                        echo "Cookies вкл: ";
								printf("%01.2f %%<br/>",$on[0]/$summ*100);
								echo "Cookies выкл: ";
								printf("%01.2f %%<br/>",$off[0]/$summ*100);
        					}

}













# сжатие
function qzip($id){

	$arr = @mysql_query("SELECT * FROM `cat_stat_qzip` WHERE `id` = ".$id." LIMIT 1;");
	$i = @mysql_num_rows($arr);

		$on = $off =  array();
		$data = @mysql_fetch_array($arr);

				$on[] = $data['on'];
				$off[] = $data['off'];


                    //echo "<img src=\"../../diagramm/qzip.php?v1=".$on[0]."&amp;v2=".$off[0]."\" alt=\"Loading\"/><br/>";

                    echo "<b>Статистика по сжатию</b><br/>";

                    echo "<u>В хитах:</u><br/>";
					echo  "Сжатие вкл: ".$on[0]."<br/>";
					echo "Сжатие выкл: ".$off[0]."<br/><br/>";


						$summ = $on[0] + $off[0];

							if($summ == 0)
							{
								echo "<u>В процентах:</u><br/>";
		                        echo "Сжатие вкл: 0%<br/>";
								echo "Сжатие выкл: 0%<br/>";
							}
							else
							{
								echo "<u>В процентах:</u><br/>";
		                        echo "Сжатие вкл: ";
								printf("%01.2f %%<br/>",$on[0]/$summ*100);
								echo "Сжатие выкл: ";
								printf("%01.2f %%<br/>",$off[0]/$summ*100);
        					}




}




?>