|
From: <ara...@us...> - 2007-04-25 17:59:12
|
Revision: 125
http://svn.sourceforge.net/easybox-mod/?rev=125&view=rev
Author: aragornis
Date: 2007-04-25 10:58:20 -0700 (Wed, 25 Apr 2007)
Log Message:
-----------
-> Acc?\195?\169l?\195?\169ration de la r?\195?\169cup?\195?\169ration des informations des films sur allocin?\195?\169
-> Les bandes annonces utilis?\195?\169es sont celles de allocin?\195?\169
-> Nouvelle pr?\195?\169sentation des fiches film avec miniatures
-> Module Yahoo-Clips avec miniatures et possibilit?\195?\169 de faire des recherches directement pour trouver le clip qui vous plait
-> R?\195?\169paration d'un bug sur la gestion pr?\195?\169c?\195?\169dent/suivant
Modified Paths:
--------------
trunk/_framework/lib/get_info.php
trunk/_framework/lib/img_cr.php
trunk/_utilisateur/modules.db
trunk/module/films/fichefilm.php
trunk/module/films/fichefilm.tpl
trunk/module/films/play.php
trunk/skin/mediacenter/framework_skin.php
trunk/skin/simple/framework_skin.php
trunk/skin/simplegreen/framework_skin.php
Added Paths:
-----------
trunk/module/clips/
trunk/module/clips/clips.tpl
trunk/module/clips/icone.gif
trunk/module/clips/index1.php
trunk/module/clips/play_clip.php
trunk/ressources/icones/Clips.gif
Removed Paths:
-------------
trunk/module/allocine/cinejf.tpl
Modified: trunk/_framework/lib/get_info.php
===================================================================
--- trunk/_framework/lib/get_info.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/_framework/lib/get_info.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -32,7 +32,7 @@
$res['genre'] = $row['genre'];
$res['duree'] = $row['Duree'];
$res['anne_prod'] = $row['production'];
- $res['ba'] = $row['ba'];
+ $res['ba'] = unserialize($row['ba']);
$res['inbdd'] = true;
}elseif($rows2!="0" AND !$forced){
@@ -52,7 +52,7 @@
$res['genre'] = $row['genre'];
$res['duree'] = $row['Duree'];
$res['anne_prod'] = $row['production'];
- $res['ba'] = $row['ba'];
+ $res['ba'] = unserialize($row['ba']);
$res['inbdd'] = false;
}else{
@@ -60,7 +60,7 @@
// Recherche de l'id sur Allocin\xE9
if($pagerecherche = @file_get_contents('http://www.allocine.fr/recherche/?motcle='.urlencode($file).'&f=3&rub=1')){
//Critique presse (nouvelle notation et ancienne)
- $ereg = '<h4><a href="\/film\/fichefilm_gen_cfilm=(.{1,7}).html" class="link1">(.{1,100})<\/a><\/h4>';
+ $ereg = '<h4><a href="\/film\/fichefilm_gen_cfilm=(.{1,7}).html" class="link1">(.{1,150})<\/a><\/h4>';
preg_match_all("/$ereg/s", $pagerecherche, $valeur);
$mini = -1;
@@ -81,7 +81,7 @@
$res = "Erreur";
}
}
-
+
if($res != "Erreur"){
$res = info_allocineById($id);
}
@@ -89,7 +89,7 @@
$res['inbdd'] = false;
sqlite_query($db2, 'DELETE FROM film WHERE name LIKE \'%'.sqlite_escape_string($file).'%\' OR file LIKE \'%'.sqlite_escape_string($file).'%\'');
- sqlite_query($db2, 'INSERT INTO film VALUES(NULL, \''.sqlite_escape_string($file).'\', \''.sqlite_escape_string($res['nom']).'\', \''.sqlite_escape_string($res['synopsis']).'\', \''.sqlite_escape_string($res['image']).'\' , \''.sqlite_escape_string($res['date_sortie']).'\' , \''.sqlite_escape_string($res['realisateur']).'\' , \''.sqlite_escape_string($res['acteurs']).'\' , \''.sqlite_escape_string($res['nationalite']).'\' , \''.sqlite_escape_string($res['genre']).'\' , \''.sqlite_escape_string($res['duree']).'\' , \''.sqlite_escape_string($res['anne_prod']).'\' , \''.sqlite_escape_string($res['critique_visiteurs']).'\' , \''.sqlite_escape_string($res['critique_presse']).'\' , \''.sqlite_escape_string($res['ba']).'\')');
+ sqlite_query($db2, 'INSERT INTO film VALUES(NULL, \''.sqlite_escape_string($file).'\', \''.sqlite_escape_string($res['nom']).'\', \''.sqlite_escape_string($res['synopsis']).'\', \''.sqlite_escape_string($res['image']).'\' , \''.sqlite_escape_string($res['date_sortie']).'\' , \''.sqlite_escape_string($res['realisateur']).'\' , \''.sqlite_escape_string($res['acteurs']).'\' , \''.sqlite_escape_string($res['nationalite']).'\' , \''.sqlite_escape_string($res['genre']).'\' , \''.sqlite_escape_string($res['duree']).'\' , \''.sqlite_escape_string($res['anne_prod']).'\' , \''.sqlite_escape_string($res['critique_visiteurs']).'\' , \''.sqlite_escape_string($res['critique_presse']).'\' , \''.sqlite_escape_string(serialize($res['ba'])).'\')');
}
@@ -173,7 +173,20 @@
// R\xE9cup\xE9ration des bandes annonces
$ba=array();
- if($pagerecherche = @file_get_contents('http://www.cinemovies.fr/resultat_recherche.php?cherche='.urlencode($res['nom']))){
+ $ereg = 'var longueur(.*)<\/h4>';
+ preg_match("/$ereg/s", $filmrecherche, $valeur);
+
+ $ereg = 'cfilm='.$id.'.html"><img src="(.{1,250})" width="100" height="80" border="0" alt="(.{1,150})"><\/a><a href="\/video\/player_gen_cmedia';
+ preg_match_all("/$ereg/s", $valeur[1], $valeur);
+
+ foreach($valeur[1] as $key=>$ba){
+ $url = str_replace(array('img5.allocine.fr/acmedia/medias','.jpg','.gif'),array('mediaplayer.allocine.fr','_hd.flv','_hd.flv'),$ba);
+ if(@fclose(@fopen($url,'r'))){
+ $res['ba'][] = array('nom'=>$valeur[2][$key],'ba'=>$url,'img'=>$ba);
+ }
+ }
+
+ /*if($pagerecherche = @file_get_contents('http://www.cinemovies.fr/resultat_recherche.php?cherche='.urlencode($res['nom']))){
$ereg = '<a href="fiche_film.php\?IDfilm=(.{1,6})" class="bodyFont5"><b>(.{1,300})<\/b><\/a> ';
preg_match_all("/$ereg/s", $pagerecherche, $valeur);
@@ -191,7 +204,6 @@
break;
}
}
-
if($filmrecherche = @file_get_contents('http://www.cinemovies.fr/players/media.php?IDfilm='.$id)){
if(PHP_OS == "WIN32" || PHP_OS == "WINNT"){
@@ -219,7 +231,7 @@
foreach($ba as $bande){
$res['ba']=str_replace('Bande annonce','BA',$res['ba'].$bande[0]).','.$bande[1].','.$bande[2].';';
- }
+ }*/
RETURN $res;
}else{
RETURN "Aucun film trouv\xE9";
Modified: trunk/_framework/lib/img_cr.php
===================================================================
--- trunk/_framework/lib/img_cr.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/_framework/lib/img_cr.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -23,10 +23,10 @@
$w="93";
-$img = str_replace("\\", "/",$img);
+/*$img = str_replace("\\", "/",$img);
$img = ereg_replace("//", "/",$img);
$img = str_replace("[", "*",$img);
-$img = str_replace("]", "*",$img);
+$img = str_replace("]", "*",$img);*/
define("IMAGE_FLIP_HORIZONTAL", 1);
define("IMAGE_FLIP_VERTICAL", 2);
define("IMAGE_FLIP_BOTH", 3);
Modified: trunk/_utilisateur/modules.db
===================================================================
(Binary files differ)
Deleted: trunk/module/allocine/cinejf.tpl
===================================================================
--- trunk/module/allocine/cinejf.tpl 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/module/allocine/cinejf.tpl 2007-04-25 17:58:20 UTC (rev 125)
@@ -1,36 +0,0 @@
-{section name=films loop=$FILMS max=4 start=$MIN}
-
- {cycle name=place assign=place print=false values="1,0"}
- {if $smarty.section.films.first}
- {if $MIN==0}
- {$DESCRIPTION}
- {/if}
-
- {if $MIN!=0}
- {assign var=temp value=$MIN-4}
- {attribbouton touche="green" lien="index1.php?start=$temp"}
- <a href="index1.php?&start={$temp}"><img src="{$INTERFACE_REP}btn_vert.gif" border="0"> Pr\xE9c\xE9dent</a>
- {/if}
- <table border="0" cellpadding="2" cellspacing="0" width="500" height="360" align="center"><tr>
- {/if}
- <tr><td width="90" valign="top"><img width="90" height="120" border="0" src="{$IMG2FBX}{$FILMS[films].image|urlencode}&new_width=90&new_height=120&cache=1"></td>
- <td valign=top align=left width="410">
- {if $FILMS[films].video!= ''}
- <a onfocus='front_panel="{$FILMS[films].titre|truncate:12}";' href="playba_allocine.php?url={$FILMS[films].video|urlencode}&from_start={$MIN}">{$FILMS[films].titre|truncate:40} <img src="video.gif" border=0 width=20 height=20></a>
- {else}
- {$FILMS[films].titre|truncate:40}
- {/if}
- <br>
- <font size="1">{$FILMS[films].desc|truncate:400}</font>
- </td>
- </tr>
-{/section}
-</table>
-
-{if $MIN+$smarty.section.films.total<count($FILMS)}
- {assign var=temp value=$MIN+4}
- {attribbouton touche="blue" lien="index1.php?start=$temp"}
- <a href="index1.php?start={$temp}"><img src="{$INTERFACE_REP}btn_bleu.gif" border="0"> Suivant</a>
-
-{/if}
-
Added: trunk/module/clips/clips.tpl
===================================================================
--- trunk/module/clips/clips.tpl (rev 0)
+++ trunk/module/clips/clips.tpl 2007-04-25 17:58:20 UTC (rev 125)
@@ -0,0 +1,76 @@
+{if $SHOW!='rec'}
+ {assign var=NUM_ROW_AFFICH value=10}
+ {section name=clip loop=$CLIP max=$NUM_ROW_AFFICH start=$START}
+ {cycle name=place assign=place print=false values="4,3,2,1,0"}
+ {if $smarty.section.clip.first}
+ <table border="0" cellpadding="0" cellspacing="0" width="500" align="center"><tr>
+ {if $MIN!=0}
+ <td colspan="5" align=center>{precedent}</td></tr><tr>
+ {/if}
+ {/if}
+
+ <td width="100" height="150"><a href="play_clip.php?clipid={$CLIP[clip].id}&show={$SHOW}&min={$MIN}{if $SHOW=='tous'}&lettre={$LETTRE}{/if}"><table border="0" cellpadding="0" cellspacing="0" width="100" height="120" bgcolor="{#COULEUR_FOND1#}" abgcolor="{#COULEUR_TABLE_SELECTED#}"><tr height="80"><td width="100" height="80" valign="middle" align="center"><img width="80" height="80" border="0" src="{$IMG2FBX}{$CLIP[clip].img|urlencode}&new_width=80&new_height=80&cache=1"></td></tr><tr height="70"><td width="100" height="70" valign="middle" align=center><font size="1">{$CLIP[clip].chanteur|wordwrap:18:"<br>":true}<br>{$CLIP[clip].titre|wordwrap:18:"<br>":true}</font></td></tr></table></a></td>
+
+ {if $smarty.section.clip.iteration is div by 5 AND NOT $smarty.section.files.last}
+ </tr><tr>
+ {/if}
+
+ {if $smarty.section.clip.last}
+ {if $place >= 4}
+ <td> </td>
+ {/if}
+ {if $place >= 3}
+ <td> </td>
+ {/if}
+ {if $place >= 2}
+ <td> </td>
+ {/if}
+ {if $place >= 1}
+ <td> </td>
+ {/if}
+ </tr>
+ <tr><td colspan="5" align="center" height="25" valign="bottom">{if $MIN+$NUM_ROW_AFFICH < $TOTAL}{suivant} - {/if}{$DEB+$START} \xE0 {$FIN-10+$START} sur {$TOTAL}</td></tr>
+ </table>
+
+ {if $SHOW=='tous'}
+ <TABLE cellspacing=0 cellpading=0>
+ <TR>
+ <TD align="center" width="30"><font size="1"><A hRef="index1.php?show=tous&lettre=0"><B>0-9</B></A></FONT></TD>
+ {section name=lettres loop=$lettres}
+ {if $smarty.section.lettres.iteration==14}
+ </TR><TR>
+ {/if}
+ <TD align="center" width="26"><font size="1"><A hRef="index1.php?show=tous&lettre={$lettres[lettres].0}"><B>{$lettres[lettres].1}</B></A></FONT></TD>
+ {if $smarty.section.lettres.last}
+ <TD align="center" width="30"> </TD>
+ {/if}
+ {/section}
+ </TR>
+ </TABLE>
+ {/if}
+ {/if}
+
+ {/section}
+{else}
+
+{section name=clip loop=$CLIP max=20 start=0}
+ {if $smarty.section.clip.first}
+ <table border="0" cellpadding="0" cellspacing="0" width="400" align="center">
+ {/if}
+ {cycle name=color assign=COLOR print=false values="`$smarty.config.COULEUR_INTERFACE1`,`$smarty.config.COULEUR_INTERFACE2`"}
+
+ <tr><td width="400" bgcolor="{$COLOR}"><a href="play_clip.php?clipid={$CLIP[clip].id}&show=rec&string={$string}"><table width="400" border="0" cellpadding="0" cellspacing="0" bgcolor="{$COLOR}" abgcolor="{#COULEUR_ALINK#}"><tr><td width="400">{$CLIP[clip].chanteur} - {$CLIP[clip].titre}</td></tr></table></a></td></tr>
+
+ {if $smarty.section.clip.last}
+ </table>
+ {/if}
+{sectionelse}
+ {if $string!=''}Aucun clip trouv\xE9 pour la requ\xEAte : "{$string}".{else}Veuillez entrer votre recherche ci-dessous.{/if}
+{/section}
+
+<br>Recherche<br> <br><form name="form1" method="get" action="index1.php">
+<input name="show" type="hidden" value="rec">
+<input name="string" bgcolor="{#COULEUR_TEXTBOX#}" type="text" charset="digit|alpha|caps" value="" size="20">
+</form><br>
+La touche {literal}#{/literal} permet de changer entre les minuscules/majuscules et les chiffres.
+{/if}
Added: trunk/module/clips/icone.gif
===================================================================
(Binary files differ)
Property changes on: trunk/module/clips/icone.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/module/clips/index1.php
===================================================================
--- trunk/module/clips/index1.php (rev 0)
+++ trunk/module/clips/index1.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -0,0 +1,83 @@
+<?
+$RACINE_REP = "../../";
+require($RACINE_REP.'_framework/framework.php');
+
+ini_set('user_agent', "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)");
+$LINK['red']= page_retour_menu();
+(isset($_GET['show'])?$show=$_GET['show']:$show='hit');
+
+$MENU_ALT=array(array('lien'=>'index1.php?show=hit', 'nom'=>'Hit 100', 'selected'=>$show=='hit'),
+ array('lien'=>'index1.php?show=new', 'nom'=>'Nouveaut\xE9s', 'selected'=>$show=='new'),
+ array('lien'=>'index1.php?show=tous', 'nom'=>'Tous', 'selected'=>$show=='tous'),
+ array('lien'=>'index1.php?show=rec', 'nom'=>'Recherche', 'selected'=>$show=='rec'));
+
+
+function get_videos_id($page){
+ $contenu = str_replace("\r\n",'',@file_get_contents($page));
+ $ereg = '<table cellpadding="0"><tr><td class="listitem"><a href="http:\/\/fr.music.yahoo.com\/ar-(.{1,50})" title="(.{1,50})">(.{1,50})<\/a><\/td><\/tr><\/table><\/td><td bgcolor="(.{1,90})<td><table cellpadding="0" width="100%"><tr><td class="listheader"><a href="javascript:playLAUNCHVideo\((.{1,10})\)" class="listheader" title="(.{1,70})">(.{1,70})<\/a><\/td>(.{1,1500})photo=(.{1,150})&url';
+ preg_match_all("/$ereg/s", $contenu, $valeur);
+ foreach($valeur[2] as $key=>$val){
+ $retour[] = array('chanteur'=>$valeur[2][$key], 'titre'=>$valeur[6][$key], 'id'=>$valeur[5][$key], 'img'=>$valeur[9][$key]);
+ }
+ $ereg = '<td align="right" class="listheaderinfo">([0-9]{1,5}) - ([0-9]{1,5}) sur ([0-9]{1,5}) clips';
+ preg_match("/$ereg/s", $contenu, $valeur);
+ return(array($retour,$valeur[1],$valeur[2],$valeur[3]));
+}
+
+function get_recherche($rec){
+ $contenu = str_replace("\r\n",'',@file_get_contents('http://search.fr.music.yahoo.com/search/?p='.$rec.'&m=video'));
+ $ereg = '<td bgcolor=......><a href=javascript:playVideos\((.{1,10})\); title="(.{1,50})"><b>(.{1,50})<\/b><\/a><\/td><td bgcolor=......><a href=http:\/\/fr.music.yahoo.com\/ar-(.{1,50})><font title="(.{1,50})">(.{1,50})<\/font><\/a><\/td><td bgcolor=...... align=center class="yss_right';
+ preg_match_all("/$ereg/s", $contenu, $valeur);
+ foreach($valeur[2] as $key=>$val){
+ $retour[] = array('chanteur'=>$valeur[6][$key], 'titre'=>$valeur[2][$key], 'id'=>$valeur[1][$key]);
+ }
+ return(array($retour));
+}
+
+if($show=='hit'){
+ $url = 'http://fr.music.yahoo.com/musicvideos/lists/top.asp?';
+}elseif($show=='new'){
+ $url = 'http://fr.music.yahoo.com/musicvideos/lists/new.asp?';
+}elseif($show=='rec'){
+(isset($_GET['string'])?$string=$_GET['string']:$string='');
+}else{
+(isset($_GET['lettre'])?$lettre=$_GET['lettre']:$lettre='0');
+ $url = 'http://fr.music.yahoo.com/musicvideos/lists/byalpha.asp?l='.$lettre.'&';
+ $sup = '&lettre='.$lettre;
+}
+
+// Lancement de la gestion multipage
+start_multi('index1.php?show='.$show.$sup,10);
+
+// D\xE9termination de la page
+$page = floor($min/20)+1;
+
+if((20*($page-1))==$min){
+ $start = 0;
+}else{
+ $start = 10;
+}
+
+if($show=='rec' and $string!=''){
+ $res = get_recherche($string);
+}else{
+ $res = get_videos_id($url.'p='.$page);
+}
+
+for ($i=0; $i<26; $i++){
+ $lettres[] = array(chr(97+$i),chr(65+$i));
+}
+$smarty->assign('LETTRE',$lettre);
+$smarty->assign('string',$string);
+$smarty->assign('lettres',$lettres);
+$smarty->assign('SHOW',$show);
+$smarty->assign('TOTAL',$res[3]);
+$smarty->assign('DEB',$res[1]);
+$smarty->assign('FIN',$res[2]);
+$smarty->assign('CLIP',$res[0]);
+$smarty->assign('MIN',$min);
+$smarty->assign('START',$start);
+
+$smarty->assign('CONTENT',$smarty->fetch('clips.tpl'));
+$smarty->display('interface.tpl');
+?>
Added: trunk/module/clips/play_clip.php
===================================================================
--- trunk/module/clips/play_clip.php (rev 0)
+++ trunk/module/clips/play_clip.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -0,0 +1,53 @@
+<?php
+
+$RACINE_REP = "../../";
+require($RACINE_REP.'_framework/framework.php');
+$BACKGROUND='none';
+ini_set('user_agent', "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)");
+$id = $_REQUEST['clipid'];
+$cookies = "LYC=l_v=1&l_lv=10&l_s=u02qvvtyuzzzuu43yqt44yuyvsxrq3sr&l_lid=cmsj68&l_lc=0_1_0_0_-1&l_um=0_0_1_0_0&l_mv=110_50; playerFullVersion=10; vCodec=9; LYS=l_fh=0&l_vo=myla; MVUserInfo3=130_10; B=14ojnad32otbe&b=3&s=9j; PVL=40276897_2159649_40553920_15703100_2157949_2162142_41461546_18875473_36490724_40687675_19050971_2158320_40554555_27145900_8975431_16235274_24934257_39147034_30161054_21242329_32585395_17968017_41461543_2156756|26_13_26_13_13_13_26_13_13_26_13_13_26_13_13_13_13_26_13_13_13_13_26_13;";
+$opts = array (
+ 'http'=>array (
+ 'method' => 'GET',
+ 'header' => "Cookie: $cookies\r\n"
+ )
+);
+
+ $content = file_get_contents('http://mv.fr.music.yahoo.com/player/default.asp?cid=613&vid="'.$id.'"&sx=default.xml&ps=&bw=&fs=&tw=calmv&vo=&redirectURL=/musicvideos/',false,stream_context_create($opts));
+
+ $ereg = "var mediaHash = '(.{1,55})';";
+ preg_match("/$ereg/s", $content, $valeur);
+ $mh = $valeur[1];
+
+ $url = 'http://launchtoday.fr.launch.yahoo.com/player/medialog.asp?vid='.$id.'&bw=510&mf=1&pid=505&ps=0&p1=2&p2=21&p3=2&rpid=35&pv=10&bp=Windows%2520NT&csid=791020104&uid=1886812234&pguid=einsJELEt4VkQCKMov00bg&etid=0&uguid=3e5u3891dirro&fcv=&mh='.$mh.'&z=ms.asx';
+
+ save_variable('backToURL', dirname($_SERVER['SCRIPT_NAME']).'/index1.php?show='.$_GET['show'].'&start='.$_GET['min'].'&lettre='.$_GET['lettre'].'&string='.$_GET['string']);
+ play_fichier('type=40',$url,0,'backToURL');
+
+ $LINK['stop']=$MODULE.'films/lecture.php?control=stop';
+ $LINK['play']=$MODULE.'films/lecture.php?control=play';
+ $LINK['pause']=$MODULE.'films/lecture.php?control=pause';
+ $LINK['info']=$MODULE.'films/info.php';
+ $LINK['options']=$MODULE.'films/info.php';
+ $LINK['blue']=$MODULE.'films/lecture.php?savesignet=1';
+ $LINK['red']=$MODULE.'films/lecture.php?next_ss=1';
+ $LINK['yellow']=$MODULE.'films/info.php?module=infos';
+ $LINK['up']=$MODULE.'films/lecture.php?seek_value=plus';
+ $LINK['down']=$MODULE.'films/lecture.php?seek_value=moins';
+
+ // BDE - RequestID 1588902
+ $LINK['next']=$MODULE.'films/lecture.php?control=next';
+ $LINK['prev']=$MODULE.'films/lecture.php?control=previous';
+ $LINK['rev']=$MODULE.'films/lecture.php?seek_value=moins';
+ $LINK['fwd']=$MODULE.'films/lecture.php?seek_value=plus';
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<html>
+<head>
+<meta name="refresh" content="0;url=../films/lecture.php">
+<script language="javascript" src="/fb2ie.js">
+</script>
+</head>
+<body></body></html>
+
Modified: trunk/module/films/fichefilm.php
===================================================================
--- trunk/module/films/fichefilm.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/module/films/fichefilm.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -16,12 +16,10 @@
$film = substr(basename($signetsav[2]),0,strrpos(basename($signetsav[2]),"."));
}
}
-
- if (isset($_REQUEST['filmid']))
- {
+
+ if (isset($_REQUEST['filmid'])){
$id=$_REQUEST['filmid'];
- } else
- {
+ }else{
$id = 0;
}
@@ -29,35 +27,27 @@
save_variable('fiche_film',$film);
- if (isset($_GET['fichier']))
- {
+ if (isset($_GET['fichier'])){
$fichier = stripslashes(urldecode($_GET['fichier']));
}
- if ($film!="" or $id!=0)
- {
+ if ($film!="" or $id!=0){
$info = info_allocine($film, false,$id);
- if ($info == "Aucun film trouv\xE9")
- {
+ if ($info == "Aucun film trouv\xE9"){
$contenant = "Aucun film trouv\xE9";
- } else if ($info == "erreur")
- {
+ }elseif ($info == "erreur"){
$contenant = "Service indisponible";
- } else
- {
- if ($info['inbdd'])
- {
+ }else{
+ if ($info['inbdd']){
$expl = Array();
$explo = explode(", ",$info['realisateur']);
- foreach ($explo as $explode)
- {
+ foreach ($explo as $explode){
array_push($expl,trim($explode));
}
sort($expl);
$info['realisateur'] = '';
- foreach ($expl as $exp)
- {
+ foreach ($expl as $exp){
if ($info['realisateur']) $info['realisateur'] .= ', ';
if ($ini['explorateur']['afficher_personnes'] == 'oui')
$info['realisateur'] .= '<a href="catalogue.php?tri=perso&suiv='.urlencode($exp).'">'.$exp.'</a>';
@@ -66,14 +56,12 @@
}
$expl = Array();
$explo = explode(", ",$info['acteurs']);
- foreach ($explo as $explode)
- {
+ foreach ($explo as $explode){
array_push($expl,trim($explode));
}
sort($expl);
$info['acteurs'] = '';
- foreach ($expl as $exp)
- {
+ foreach ($expl as $exp){
if ($info['acteurs']) $info['acteurs'] .= ', ';
if ($ini['explorateur']['afficher_personnes'] == 'oui')
$info['acteurs'] .= '<a href="catalogue.php?tri=perso&suiv='.urlencode($exp).'">'.$exp.'</a>';
@@ -82,50 +70,42 @@
}
$expl = Array();
$explo = explode(", ",$info['nationalite']);
- foreach ($explo as $explode)
- {
+ foreach ($explo as $explode){
array_push($expl,trim($explode));
}
sort($expl);
$info['nationalite'] = '';
- foreach ($expl as $exp)
- {
+ foreach ($expl as $exp){
if($info['nationalite']) $info['nationalite'] .= ', ';
$info['nationalite'] .= '<a href="catalogue.php?tri=film&suiv='.urlencode($exp).'">'.$exp.'</a>';
}
$expl = Array();
$explo = explode(", ",$info['genre']);
- foreach ($explo as $explode)
- {
+ foreach ($explo as $explode){
array_push($expl,trim($explode));
}
sort($expl);
$info['genre'] = '';
- foreach ($expl as $exp)
- {
+ foreach ($expl as $exp){
if ($info['genre']) $info['genre'] .= ', ';
$info['genre'] .= '<a href="catalogue.php?tri=genre&suiv='.urlencode($exp).'">'.$exp.'</a>';
}
}
}
- $flux=explode(";",substr($info['ba'], 0, -1));
- $info['ba']=array();
-
- foreach ($flux as $flux1)
- {
- if($flux1!='') $info['ba'][]=explode(",",$flux1);
- }
-
- if (is_array($info['ba'])) array_cleanse($info['ba']);
-
- if ($disable)
- {
+ if(count($info['ba'])){
+ foreach($info['ba'] as $key=>$ba){
+ $t = explode(' - ',$ba['nom']);
+ $info['ba'][$key]['nom'] = stripslashes($t[1]);
+ }
+ }
+
+ if ($disable){
$smarty->assign('more','... <a href="info.php?getmoreinfo=1">Suite</a>');
- } else
- {
+ }else{
$smarty->assign('more','... <a href="fichefilm.php?getmoreinfo=1&film='.urlencode($film).'&fichier='.urlencode($fichier).'">Suite</a>');
- }
+ $smarty->assign('more2','fichefilm.php?getmorevideo=1&film='.urlencode($film).'&fichier='.urlencode($fichier));
+ }
$smarty->assign('ba',$info['ba']);
@@ -135,28 +115,46 @@
$smarty->assign('info',$info);
$smarty->assign('_GET',$_GET);
- if(isset($disable))
- {
- if ($_GET['getmoreinfo']==1)
- {
+ if(isset($disable)){
+ if ($_GET['getmoreinfo']==1){
$CONTENT .= '<font size=4>R\xE9sum\xE9 pour '.$film.'</font><br> <br> <br>';
$CONTENT .= strip_tags($info['synopsis']);
$CONTENT .= '<br> <br><a href="info.php">Retour</a>';
$contenant = $CONTENT;
- } else
- {
+ }else{
$contenant = $smarty->fetch('fichefilm.tpl');
}
- } else if ($_GET['getmoreinfo'])
- {
+ }elseif ($_GET['getmoreinfo']){
$CONTENT .= '<font size=4>R\xE9sum\xE9 pour '.$film.'</font><br> <br> <br>';
$CONTENT .= strip_tags($info['synopsis']);
$CONTENT .= '<br> <br><img src="{$INTERFACE_REP}btn_rouge.gif" border="0"> <a href="fichefilm.php?film='.urlencode($film).'&fichier='.urlencode($fichier).'">Retour</a>';
$LINK['red'] = 'fichefilm.php?film='.urlencode($film).'&fichier='.urlencode($fichier);
$smarty->assign('AVERTISSEMENT',$CONTENT);
$smarty->display('avertissement.tpl');
- } else
- {
+ }elseif ($_GET['getmorevideo']){
+ $CONTENT .= '<font size=4>Toutes les vid\xE9os pour '.$film.'</font><br> <br><table border="0" cellpadding="0" cellspacing="0" width="500" height="100" align="center"><tr>';
+ $i=1;
+ $c=count($info['ba']);
+ foreach($info['ba'] as $ba){
+ $CONTENT .= '<td><a href="play.php?toplay='.urlencode($ba['ba']).'&titre='.urlencode($info['nom']).'&type=ba"><table border="0" cellpadding="0" cellspacing="0" width="80" height="100" bgcolor="'.$_COULEUR['COULEUR_FOND1'].'" abgcolor="'.$_COULEUR['COULEUR_TABLE_SELECTED'].'"><tr height="65"><td width="80" height="65" valign="middle" align="center"><img src="'.$RACINE_REP.'_framework/lib/img_cr.php?local=1&formatw=75&formath=60&img='.urlencode($ba['img']).'" border="0" width="75" height="60"></td></tr><tr height="35"><td width="80" height="35" valign="middle" align="center">'.substr($ba['nom'],0,30).'</td></tr></table></a></td>';
+ if(($i%5)==0 and $i!=$c){
+ $CONTENT .= '</tr><tr>';
+ }
+ if($i==$c){
+ while(($i%5)!=0){
+ $i++;
+ $CONTENT .= '<td> </td>';
+ }
+ $CONTENT .= '</tr></table>';
+ }
+ $i++;
+ }
+
+ $CONTENT .= '<br> <br><img src="{$INTERFACE_REP}btn_rouge.gif" border="0"> <a href="fichefilm.php?film='.urlencode($film).'&fichier='.urlencode($fichier).'">Retour</a>';
+ $LINK['red'] = 'fichefilm.php?film='.urlencode($film).'&fichier='.urlencode($fichier);
+ $smarty->assign('AVERTISSEMENT',$CONTENT);
+ $smarty->display('avertissement.tpl');
+ }else{
$smarty->assign('CONTENT',$smarty->fetch('fichefilm.tpl'));
$smarty->display('interface.tpl');
}
Modified: trunk/module/films/fichefilm.tpl
===================================================================
--- trunk/module/films/fichefilm.tpl 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/module/films/fichefilm.tpl 2007-04-25 17:58:20 UTC (rev 125)
@@ -2,8 +2,8 @@
<table cellspacing=0 align="center">
<tr><td width="120" height="160"><img src="{$IMG2FBX}{$info.image|urlencode}&cache=1"></td>
<td width="369">
- <font size="4"><u>{$info.nom}</u></font>{if file_exists($fichier)!=''} - <a href="play.php?toplay={$fichier|urlencode}">Lire le film avec Easybox</a>{/if}
- <br><u>Date de sortie</u> : {$info.date_sortie|date_format:"%d/%m/%Y"}
+ <font size="4"><u>{$info.nom}</u></font>{if file_exists($fichier)!=''} - <a href="play.php?toplay={$fichier|urlencode}">Lire le film avec Easybox</a>{/if}{if $_GET.togo=='cine'}<a href="/module/seances/voirsalle.php?salle={$_GET.salle}"> - Retour \xE0 la liste des films du cin\xE9ma</a>{/if}
+ <br><u>Date de sortie</u> : {$info.date_sortie|date_format:"%d/%m/%Y"}
<br><u>R\xE9alis\xE9 par</u> {$info.realisateur}
<br><u>Avec</u> {$info.acteurs}
<br><u>Film</u> {$info.nationalite} de {$info.anne_prod}
@@ -11,16 +11,23 @@
<br><u>Notes</u> : Presse <img src="{$INTERFACE_REP}star{$info.critique_presse}.gif"> Spectateurs <img src="{$INTERFACE_REP}star{$info.critique_visiteurs}.gif">
</td><tr><td colspan="2">
<u>Synopsis</u><br>
- {$info.synopsis|strip_tags|wordwrap:60|htmlentities|truncate:650:$more}
+ {$info.synopsis|strip_tags|wordwrap:60|htmlentities|truncate:530:$more}
<br>
- {section name=ba loop=$ba}
- <a href="playba.php?toplay={$ba[ba].2}&titre={$info.nom|urlencode}"><img src="{$INTERFACE_REP}{$ba[ba].1}.gif" border=0 width=20 height=20> {$ba[ba].0}</a>
- {if !$smarty.section.ba.last} - {/if}
- {/section}
+ {if NOT $disable}
+ {section name=ba loop=$ba max=5}
+ {if $smarty.section.ba.first}
+ <table border="0" cellpadding="0" cellspacing="0" width="500" height="100" align="center"><tr>
+ {/if}
+ <td><a href="play.php?toplay={$ba[ba].ba|urlencode}&titre={$info.nom|urlencode}&type=ba"><table border="0" cellpadding="0" cellspacing="0" width="80" height="100" bgcolor="{#COULEUR_FOND1#}" abgcolor="{#COULEUR_TABLE_SELECTED#}"><tr height="65"><td width="80" height="65" valign="middle" align="center"><img src="{$RACINE_REP}_framework/lib/img_cr.php?local=1&formatw=75&formath=60&img={$ba[ba].img|urlencode}" border="0" width="75" height="60"></td></tr><tr height="35"><td width="80" height="35" valign="middle" align="center">{$ba[ba].nom|truncate:20:"":true}</td></tr></table></a></td>
+ {if $smarty.section.ba.last}
+ {if count($ba)>$smarty.section.ba.total}
+ <td><a href="{$more2}"><table border="0" cellpadding="0" cellspacing="0" width="80" height="100" bgcolor="{#COULEUR_FOND1#}" abgcolor="{#COULEUR_TABLE_SELECTED#}"><tr height="65"><td width="80" height="65" valign="middle" align="center"><img src="{$RACINE_REP}_framework/lib/img_cr.php?local=1&formatw=75&formath=60&img={'http://a69.g.akamai.net/n/69/10688/v1/img5.allocine.fr/acmedia/skin/AlloCineV5/habillage/affichettemedia.gif'|urlencode}" border="0" width="75" height="60"></td></tr><tr height="35"><td width="80" height="35" valign="middle" align="center">Plus de vid\xE9os</td></tr></table></a></td>
+ {/if}
+ </tr></table>
+ {/if}
+ {/section}
+ {/if}
- {if $_GET.togo=='cine'}
- <br><a href="/module/seances/voirsalle.php?salle={$_GET.salle}">Retour \xE0 la liste des films du cin\xE9ma</a>
- {/if}
</td></tr></table>
{elseif $disable}
<center><font size="4">Aucune information disponible pour <br><u>{$fichier}</u></font><br></font>
Modified: trunk/module/films/play.php
===================================================================
--- trunk/module/films/play.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/module/films/play.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -102,6 +102,8 @@
if($_GET['type']=='jt'){
play_fichier($playweb,$basename,0,'jt');
+}elseif($_GET['type']=='ba'){
+ play_fichier($playweb,$basename,0,'ba',$_REQUEST['titre']);
}elseif($_GET['type']=='webtv'){
play_fichier($playweb,$basename,0,'webtv');
}elseif(eregi("http://",$basename) || eregi("mms://",$basename)){
Added: trunk/ressources/icones/Clips.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ressources/icones/Clips.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/skin/mediacenter/framework_skin.php
===================================================================
--- trunk/skin/mediacenter/framework_skin.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/skin/mediacenter/framework_skin.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -64,13 +64,13 @@
}
function _multipage_prec(){
-global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min;
+global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK;
$MENU_ALT[]=array('lien'=>$_multipage_lien.'&start='.max(0,$min-$_multipage_step), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_vert.gif" border="0"> Pr\xE9c\xE9dent', 0,'front_pannel'=>'Pr\xE9c\xE9dent');
$LINK['green']=$_multipage_lien.'&start='.max(0,$min-$_multipage_step);
}
function _multipage_suiv(){
-global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min;
+global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK;
$MENU_ALT[]=array('lien'=>$_multipage_lien.'&start='.($min+$_multipage_step), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_bleu.gif" border="0"> Suivant', 0,'front_pannel'=>'Suivant');
$LINK['blue']=$_multipage_lien.'&start='.($min+$_multipage_step);
}
Modified: trunk/skin/simple/framework_skin.php
===================================================================
--- trunk/skin/simple/framework_skin.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/skin/simple/framework_skin.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -60,13 +60,13 @@
}
function _multipage_prec(){
-global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min;
+global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK;
echo '<a href="'.$_multipage_lien.'&start='.max(0,$min-$_multipage_step).'" onfocus=\'aide="Page pr\xE9c\xE9dente";\'><img src="'.$INTERFACE_REP.'btn_vert.gif" border="0"> <font size="2">Pr\xE9c\xE9dent</font></a>';
$LINK['green']=$_multipage_lien.'&start='.max(0,$min-$_multipage_step);
}
function _multipage_suiv(){
-global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min;
+global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK;
echo '<a href="'.$_multipage_lien.'&start='.($min+$_multipage_step).'" onfocus=\'aide="Page suivante";\'><img src="'.$INTERFACE_REP.'btn_bleu.gif" border="0"> <font size="2">Suivant</font></a>';
$LINK['blue']=$_multipage_lien.'&start='.($min+$_multipage_step);
}
Modified: trunk/skin/simplegreen/framework_skin.php
===================================================================
--- trunk/skin/simplegreen/framework_skin.php 2007-04-22 13:32:29 UTC (rev 124)
+++ trunk/skin/simplegreen/framework_skin.php 2007-04-25 17:58:20 UTC (rev 125)
@@ -47,6 +47,28 @@
// D\xE9finit un filtre qui fait jouer le background en tout dernier lieu, quand l'ensemble des templates de la page ont \xE9t\xE9 compil\xE9s.
$smarty->register_outputfilter("background");
+// Gestion des multipages
+$smarty->register_function('precedent', '_multipage_prec');
+$smarty->register_function('suivant', '_multipage_suiv');
+function start_multi($lien,$step){
+global $_multipage_lien, $_multipage_step, $_GET, $min, $smarty;
+ $_multipage_lien = $lien;
+ $_multipage_step = $step;
+ (isset($_GET['start'])?$min=$_GET['start']:$min=0);
+ $smarty->assign('MIN',&$min);
+}
+
+function _multipage_prec(){
+global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK;
+ $MENU_ALT[]=array('lien'=>$_multipage_lien.'&start='.max(0,$min-$_multipage_step), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_vert.gif" border="0"> Pr\xE9c\xE9dent', 0,'front_pannel'=>'Pr\xE9c\xE9dent');
+ $LINK['green']=$_multipage_lien.'&start='.max(0,$min-$_multipage_step);
+}
+
+function _multipage_suiv(){
+global $_multipage_lien, $_multipage_step, $MENU_ALT, $INTERFACE_REP, $min, $LINK;
+ $MENU_ALT[]=array('lien'=>$_multipage_lien.'&start='.($min+$_multipage_step), 'nom'=>'<img src="'.$INTERFACE_REP.'btn_bleu.gif" border="0"> Suivant', 0,'front_pannel'=>'Suivant');
+ $LINK['blue']=$_multipage_lien.'&start='.($min+$_multipage_step);
+}
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|