Вход Регистрация
Файл: games/index.php
Строк: 32
<?php
require ('../system/core.php');

// ************* фун-ции для игр ************* //
function cards_points($str){
    
$str=(int)$str;    
    
$points ' очков';
    if(
$str==2||$str==3||$str==4||$str==22||$str==23||$str==24|$str==32||$str==33||$str==34){$points ' очка';}
    if(
$str==21){$points ' <b>очко!!!</b>';}
    if(
$str==31){$points ' очко';}
    return 
$str.$points;
}

function 
cards_score($str){
if(
$str==1||$str==2||$str==3||$str==4){
$num 6;
}
if(
$str==5||$str==6||$str==7||$str==8){
$num 7;
}
if(
$str==9||$str==10||$str==11||$str==12){
$num 8;
}                
if(
$str==13||$str==14||$str==15||$str==16){
$num 9;
}                
if(
$str==17||$str==18||$str==19||$str==20){
$num 10;
}                
if(
$str==21||$str==22||$str==23||$str==24){
$num 2;
}                
if(
$str==25||$str==26||$str==27||$str==28){
$num 3;
}                      
if(
$str==29||$str==30||$str==31||$str==32){
$num 4;
}                      
if(
$str==33||$str==34||$str==35||$str==36){
$num 11;
}                      
return 
$num;
}

/////////////////////////////////////////////////

$switch = array(
    
'21',
    
'naperstki',
    
'kosti',
    );

if (
$act && ($f array_search($act$switch)) !== FALSE && file_exists('switch/'.$switch[$f].'.php'))
{
    require (
'switch/'.$switch[$f].'.php');
} else
{
    
$title 'Игры On-Line';
    require (
'../system/head.php');
    echo 
'<div class="title">' $title '</div>';
    
    echo 
'<div class="menudiv" href="?act=21">- 21 очко</a></div>' .
        
'<div class="menudiv" href="?act=kosti">- Кости</a></div>' .
        
'<div class="menudiv" href="?act=naperstki">- Наперстки</a></div>';
}
require_once (
'../system/footer.php');
?>
Онлайн: 0
Реклама