<?php
$language = explode("/", $_SERVER['REQUEST_URI']);
$language = $language[1];
if($language == "ru") {
$_SESSION['lang'] = "2";
$_SESSION['lang_file'] = "lang_russian";
} else {
$_SESSION['lang'] = "2";
$_SESSION['lang_file'] = "lang_ukrainian";
}
require_once(SYSTEM_DIR . "languages/".$_SESSION['lang_file']."/lang_main.php");
?>
RewriteBase /
RewriteRule ^$ /index.php?mode=index
RewriteRule ^index.php$ /index.php?mode=index
function select_video($id, $lang){
db_connect();
$query = "SELECT `video`.*, (SELECT count(c.`id`) FROM `comments` c WHERE c.`note_id` = `video`.`title_url` AND c.`lang` = '{$lang}') comments_count
FROM `video`
WHERE `video` .`id` > (SELECT v.`id` FROM `video` v WHERE v.`id` < {$id} ORDER BY v.`id` DESC LIMIT 1) AND `video`.`lang` = '{$lang}'
ORDER BY `video` .`id` ASC
LIMIT 3";
$res = mysql_query($query);
for($i=0; $row = mysql_fetch_array($res); $i++){
$result[$i] = $row;
}
return $result;
}
$ratio = $width / $height;
if($width > $height) {
$width = 280;
$height = round( $width / $ratio );
}else{
$height = 260;
$width = round( $height * $ratio );
}
$('.open_popup_Mac, .open_popup_iPhone, .open_popup_iPhone_price, .open_popup_iPad, .open_popup_iPad_price, .open_popup_delivery_more, .open_popup_enter_form, .open_popup_delivery').click(function(){
var action = $(this).attr('.class').replace('open_', '');
$('.' + action).fadeIn(0);
$('.' + action).animate({top:"0", bottom:"0"}, 400);
$('header').animate({top:"-60px"}, 400);
});