0) { executa("INSERT INTO `vizita` (`day`,`id_movie`,`ip`) VALUES ('".date('Y-m-d')."',".(int)$movie['id_movie'].",'".getIp()."')",NULL,false); executa("UPDATE movies SET `views`=`views`+1 WHERE id_movie=".(int)$movie['id_movie']." "); } $have_tag = $movie['title']; $titlu = stripslashes($movie['title']); $descriere = stripslashes($movie['descriere']); $key_words = implode(",",explode(" ",$titlu)); $seo_key = 'movie'; $rpl_seo1[] = "%name_el%"; $rpl_seo2[] = $movie['title']; $rpl_seo1[] = "%name_eng%"; $rpl_seo2[] = $movie['title_en']; $rpl_seo1[] = "%name_video_tag%"; $rpl_seo2[] = $movie['tag']; $rpl_seo1[] = "%descr%"; $rpl_seo2[] = $movie['descr']; $rpl_seo1[] = "%descr_eng%"; $rpl_seo2[] = $movie['descr_en']; $rpl_seo1[] = "%keys%"; $rpl_seo2[] = $key_words; $rpl_seo1[] = "%keys_video_tag%"; $rpl_seo2[] = str_replace(", ,",",",implode(",",explode(" ",$movie['tag']))); $rpl_seo1[] = "%keys_descr%"; $rpl_seo2[] = str_replace(", ,",",",implode(",",explode(" ",$movie['descr']))); $rpl_seo1[] = "%keys_descr_eng%"; $rpl_seo2[] = str_replace(", ,",",",implode(",",explode(" ",$movie['descr_en']))); break; case 'tag': $text = strtolower(str_replace('-'," ",$text)); // $tag = prima_linie("SELECT * FROM `search_tags` WHERE `text` = '".mysql_escape_string($text)."' "); $have_tag = $text; $titlu = $text; if (is_numeric($_GET['page'])) $titlu .= " Pagina ".$_GET['page']; $key_words = str_replace(", ,",",",implode(",",explode(" ",$titlu))); $seo_key = 'tag'; $rpl_seo1[] = "%name_el%"; $rpl_seo2[] = $text; $rpl_seo1[] = "%keys%"; $rpl_seo2[] = $key_words; break; default: $seo_key = 'index'; if (is_numeric($_GET['page'])) { $seo_key = 'pages'; $rpl_seo1[] = "%page%"; $rpl_seo2[] = $_GET['page']; } break; } ob_start(); switch($_GET['action']) { case 'movie': if((int)$movie['id_movie']>0) { $ord = array(); foreach($SETARI['ord_video'] as $key => $pos) if((int)$pos>0){ $ord[$pos][] = $key; } ksort($ord); foreach($ord as $pos => $keys) foreach($keys as $key) { include_once('parts/'.$key.'.php'); echo '
'; } } else { echo '

'.$lang['not_found'].'

'; echo '

'.$lang['not_found_info'].'

'; } break; case 'tag': $ord = array(); foreach($SETARI['ord_tag'] as $key => $pos) if((int)$pos>0){ $ord[$pos][] = $key; } ksort($ord); foreach($ord as $pos => $keys) foreach($keys as $key) { include_once('parts/'.$key.'.php'); echo '
'; } break; default: $ord = array(); foreach($SETARI['ord_index'] as $key => $pos) if((int)$pos>0){ $ord[$pos][] = $key; } ksort($ord); foreach($ord as $pos => $keys) foreach($keys as $key) { include_once('parts/'.$key.'.php'); echo '
'; } if (is_numeric($_GET['page'])) { $words_title = array(); $words_descr = array(); $words_keywd = array(); foreach($seo_ttls as $value) { $wrds = explode(" ",$value); foreach($wrds as $wr) if(strlen($wr) >= 4 && !in_array($wr,$words_title) && count($words_title) < 10) { $words_title[] = $wr; break; } foreach($wrds as $wr) if(strlen($wr) >= 3 && !in_array($wr,$words_descr) && count($words_descr) < 10) { $words_descr[] = $wr; } foreach($wrds as $wr) if(strlen($wr) >= 3 && !in_array($wr,$words_keywd) && count($words_keywd) < 20) { $words_keywd[] = $wr; } } $rpl_seo1[] = "%generate_keywords4_10%"; $rpl_seo2[] = implode(" ,",$words_title); $rpl_seo1[] = "%generate_keywords3_10%"; $rpl_seo2[] = implode(" ,",$words_descr); $rpl_seo1[] = "%generate_keywords3_20%"; $rpl_seo2[] = implode(" ,",$words_keywd); } break; } $content_page = ob_get_contents(); ob_end_clean(); $titlu = str_replace($rpl_seo1,$rpl_seo2,$SETARI['seo_title'][$seo_key]); $descriere = str_replace($rpl_seo1,$rpl_seo2,$SETARI['seo_descr'][$seo_key]); $key_words = str_replace($rpl_seo1,$rpl_seo2,$SETARI['seo_keys'][$seo_key]); include ("parts/all_header.php"); echo $content_page; include ("parts/all_bottom.php");