View file functions.php

File size: 3.33Kb
<?php
// функция отпереления поддержки Реалтонов по марке и можели телефона 
function realton_supported($vendor, $model)
{
	$support_phone = array(
	'Alcatel' 		=> array ('556', '557', '715', '735i', '735', '756'),
	'LG' 			=> array ('B2000', 'M4410' ),
	'Motorola' 		=> array ('C380', 'C390', 'C650', 'E398', 'Mpx220', 'V180', 'V3', 'V300', 'V400', 'V500', 'V525', 'V535', 'V547', 'V600', 'V620', 'V635' ),
	'Nokia' 		=> array ('3220', '3230', '3300', '3650', '3660', '5140i', '6021', '6060', '6170', '6220', '6230', '6230i', '6260', '6600', '6670', '6680', '6681', '6822', '6822a', '7260', '7270', '7610', '8800', 'N70' ),
	'Pantech' 		=> array ('PG3200' ),
	'Sagem' 		=> array ('MyC5-2', 'MyV-55' ),
	'Samsung' 		=> array ('D500', 'D500e', 'E350', 'E350e', 'E530', 'E620', 'E720', 'E730', 'E760', 'X480', 'Z130' ),
	'Siemens' 		=> array ('С65', 'С75', 'СF75', 'CL75', 'CX65', 'CX70', 'CX75', 'M65', 'M75', 'S65', 'Sk65', 'SL65', 'SX1' ),
	'Sony Ericsson' => array ('J300i', 'K300i', 'K500i', 'K600i', 'K700i', 'K750i', 'P800', 'P900', 'S700i', 'T290i', 'T610', 'T630', 'Z800i')
	);

	foreach ($support_phone as $phone_vendor => $models_array)
	{
		if (strtoupper($phone_vendor) == strtoupper($vendor))
			foreach ($models_array as $phone_model)
				if (strtoupper($phone_model) == strtoupper($model))
					return true;
	}
	return false;
}
// функция отпереления поддержки ВИДЕО по марке и можели телефона 
function video_supported($vendor, $model)
{
	$support_phone = array(
	'Alcatel' 		=> array ('556', '557', '565', '756', '757', 'C651'),
	'Motorola' 		=> array ('A1000', 'A780', 'A830', 'A835', 'C975', 'E1000', 'E398', 'E680', 'V3', 'V600', 'V620', 'V635' ),
	'Nokia' 		=> array ('3220', '3230', '3650', '3660', '5140', '6101', '6170', '6230', '6230i', '6255', '6260', '6600', '6620', '6630', '6670', '6680', '6681', '6820', '7200', '7600', '7610', '7700', '9300', '9500', 'N-Gage', 'N-Gage QD', 'N70', 'N90', 'N91', 'N92' ),
	'Pantech' 		=> array ('PG3500', 'PG3600', 'PG8000' ),
	'Sharp' 		=> array ('GX-25', 'V-902' ),
	'Samsung' 		=> array ('SGH-D500', 'SGH-E720', 'SGH-i700' ),
	'SIEMENS' 		=> array ('CX65', 'CXT65', 'CXT70', 'CX75', 'S75', 'CXV65', 'M65', 'MT65', 'S65', 'S65V', 'SK65', 'SL65', 'SX1' ),
	'Sony Ericsson' => array ('F500i', 'K300', 'K300i', 'K500', 'K500i', 'K600', 'K600i', 'K600c', 'K700', 'K700i', 'K750i', 'K750', 'P800', 'P900', 'P910', 'P910i', 'S700', 'S700i', 'V800', 'W800i' )
	);

	foreach ($support_phone as $phone_vendor => $models_array)
	{
		if (strtoupper($phone_vendor) == strtoupper($vendor))
			foreach ($models_array as $phone_model)
				if (strtoupper($phone_model) == strtoupper($model))
					return true;
	}
	return false;
}
// функция определения папки с поддерживаемым контентом для бесплат игр
function free_game_group($tel_data)
{
	global $vendor, $model;
						      	 	 
	$rows = explode("\n", $tel_data);
	foreach ($rows as $row_data)
	{
		$tel_group_data = explode("::", $row_data);
		if ( strtoupper($tel_group_data[1]) == strtoupper($vendor) )
		{
			$group_models = explode(" ", $tel_group_data[2]);
			foreach ($group_models as $group_model)
			{
				if ( strtoupper($group_model) == strtoupper($model) )
					return $tel_group_data[0];
			}
		}
	}
	return false;
}
?>