|
From: <ara...@us...> - 2007-03-03 21:43:13
|
Revision: 87
http://svn.sourceforge.net/easybox-mod/?rev=87&view=rev
Author: aragornis
Date: 2007-03-03 13:43:07 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Module guidetv remis en ?\195?\169tat et superok maintenant
Correction de journaux de tf1 (on prend bien ceux de 2007 ^^)
Correction sur le multiposte
Correction de la zik sur diaporama
Modified Paths:
--------------
trunk/module/diaporama/index1.php
trunk/module/guidetv/guidetv.tpl
trunk/module/guidetv/tvprogram.php
trunk/module/jt/flux.xml
trunk/module/multiposte/enregistrement.tpl
trunk/module/multiposte/index1.php
Modified: trunk/module/diaporama/index1.php
===================================================================
--- trunk/module/diaporama/index1.php 2007-02-25 10:13:33 UTC (rev 86)
+++ trunk/module/diaporama/index1.php 2007-03-03 21:43:07 UTC (rev 87)
@@ -5,7 +5,6 @@
$FORCED = 1;
}
-
$extension = $ini['explorateur']['ext_photo'];
$ext_ok = explode(",",$extension);
$ext = $ext_ok;
@@ -193,13 +192,11 @@
save_variable('photomin', $min);
-
if(isset($aff)){
if ($_GET['start_play']=='oui') {
- $smarty->assign('start_play','non');
+ save_variable('playing_audio', 'oui');
-
if($pisteaudio=='TV'){
$play = 'type=1';
}elseif($pisteaudio=='PC'){
@@ -235,6 +232,12 @@
save_variable('num_playlist', get_variable('num_playlist')+1);
}elseif($_GET['start_play']=='non'){
$file1 = file_get_contents("http://127.0.0.1:8081/lecteur/action.html?control=stop");
+ save_variable('playing_audio', 'non');
+}
+
+if(get_variable('playing_audio')=='oui'){
+ $smarty->assign('start_play','non');
+}else{
$smarty->assign('start_play','oui');
}
Modified: trunk/module/guidetv/guidetv.tpl
===================================================================
--- trunk/module/guidetv/guidetv.tpl 2007-02-25 10:13:33 UTC (rev 86)
+++ trunk/module/guidetv/guidetv.tpl 2007-03-03 21:43:07 UTC (rev 87)
@@ -1,8 +1,8 @@
{if isset($EMISSION)}
<table border="0" cellpadding="2" cellspacing="0">
- <tr><td colspan="2">De {$EMISSION.debut|date_format:"%H:%M"} \xE0 {$EMISSION.fin|date_format:"%H:%M"}, le {$cboDate|date_format:"%A %e %B %Y"} sur {$cboCateg}</td></tr>
- <tr><td>{if $EMISSION.icone}<img src="{$IMG2FBX}{$EMISSION.icone|urlencode}&cache=1">{else} {/if}</td>
- <td width="369">
+ <tr><td colspan="2">De {$EMISSION.debut|date_format:"%H:%M"} \xE0 {$EMISSION.fin|date_format:"%H:%M"}, le {$EMISSION.debut|date_format:"%A %e %B %Y"} sur {$chaine.nom}</td></tr>
+ <tr><td>{if $EMISSION.icone!='http://static.digitalmondadori.fr/gtv/visu'}<img src="{$IMG2FBX}{$EMISSION.icone|urlencode}&cache=1">{else}<img src="{$INTERFACE_REP}noimage.gif">{/if}</td>
+ <td width="369">
<font size="4">{$EMISSION.titre}</font>{if $EMISSION.note!=''} <img src="{$INTERFACE_REP}star{$EMISSION.note}.gif">{/if}<br>
{if $info_chaine.id!='inc'}
{assign var=tempo value=$info_chaine.id|cat:"|"|cat:$info_chaine.nom|cat:"|"|cat:$info_chaine.num}
@@ -10,13 +10,11 @@
{assign var=tempi value=$EMISSION.debut-600}
{assign var=temps value=$EMISSION.fin+600}
{attribbouton touche="rec" lien=$MODULE|cat:"multiposte/add.php?etape=4&chaine=$tempo&debtime=$tempi&endtime=$temps"}
- <a href="{$MODULE}multiposte/add.php?etape=4&chaine={$info_chaine.id|cat:"|"|cat:$info_chaine.nom|cat:"|"|cat:$info_chaine.num|urlencode}&debtime={$EMISSION.debut-600}&endtime={$EMISSION.fin+600}">Enregistrer avec Easybox</a><br>
+ <a href="{$MODULE}multiposte/add.php?etape=4&chaine={$chaine.id|cat:"|"|cat:$chaine.nom|cat:"|"|cat:$chaine.num|urlencode}&debtime={$EMISSION.debut-600}&endtime={$EMISSION.fin+600}">Enregistrer avec Easybox</a><br>
{/if}
- {if $EMISSION.soustitre}(<font size="1">{$EMISSION.soustitre}</font>)<br>{/if}
<i>{$EMISSION.categorie|ucfirst}
{if $EMISSION.realisateur} - R\xE9alis\xE9 par {$EMISSION.realisateur}{/if}
{if $EMISSION.presentateur} - Pr\xE9sent\xE9 par {$EMISSION.presentateur}{/if}
- {if $EMISSION.acteur} - Avec {$EMISSION.acteur}{/if}
</i><br>
{if $EMISSION.duree}<i>Dur\xE9e : {$EMISSION.duree}min</i>{/if}
</td><tr><td colspan="2">
@@ -26,34 +24,39 @@
<table><tr><td align=left>
{if $MIN!=0}
{assign var=temp value=$MIN-16}
- {attribbouton touche="green" lien="tvprogram.php?cboDate=$cboDate&cboCateg=$cboCateg&min=$temp"}
- <a href="tvprogram.php?cboDate={$cboDate}&cboCateg={$cboCateg}&min={$temp}"><img src="{$INTERFACE_REP}btn_vert.gif" border="0"> Pr\xE9c\xE9dent</a><br>
+ {assign var=temp2 value=$chaine.id}
+ {attribbouton touche="green" lien="tvprogram.php?jour=$jour&chaine=$temp2&min=$temp"}
+ <a href="tvprogram.php?jour={$jour}&chaine={$chaine.id}&min={$temp}"><img src="{$INTERFACE_REP}btn_vert.gif" border="0"> Pr\xE9c\xE9dent</a><br>
{/if}
{section name=emiss loop=$EMISSIONS max=16 start=$MIN}
- <a href="tvprogram.php?cboDate={$cboDate}&cboCateg={$cboCateg}&min={$MIN}&indic_name={$EMISSIONS[emiss].specialid}">{$EMISSIONS[emiss].debut|date_format:"%H:%M"} - {$EMISSIONS[emiss].titre}</a><br>
+ {if $EMISSIONS[emiss].fin >= time()}
+ <a href="tvprogram.php?jour={$jour}&chaine={$chaine.id}&min={$MIN}&emission={$EMISSIONS[emiss].fiche}&debut={$EMISSIONS[emiss].debut}&fin={$EMISSIONS[emiss].fin}">{$EMISSIONS[emiss].debut|date_format:"%H:%M"} - {$EMISSIONS[emiss].titre}</a><br>
+ {else}
+ {$EMISSIONS[emiss].debut|date_format:"%H:%M"} - {$EMISSIONS[emiss].titre}<br>
+ {/if}
{/section}
{if $MIN+$smarty.section.emiss.total < count($EMISSIONS)}
{assign var=temp value=$MIN+16}
- {attribbouton touche="blue" lien="tvprogram.php?cboDate=$cboDate&cboCateg=$cboCateg&min=$temp"}
- <a href="tvprogram.php?cboDate={$cboDate}&cboCateg={$cboCateg}&min={$temp}"><img src="{$INTERFACE_REP}btn_bleu.gif" border="0"> Suivant</a>
+ {assign var=temp2 value=$chaine.id}
+ {attribbouton touche="blue" lien="tvprogram.php?jour=$jour&chaine=$temp2&min=$temp"}
+ <a href="tvprogram.php?jour={$jour}&chaine={$chaine.id}&min={$temp}"><img src="{$INTERFACE_REP}btn_bleu.gif" border="0"> Suivant</a>
{/if}
</td></tr></table>
{else}
- {attribbouton touche="red" lien="index1.php"}
{if $MIN!=0}
{assign var=temp value=$MIN-20}
- {attribbouton touche="green" lien="tvprogram.php?min=$temp"}
- <a href="tvprogram.php?min={$temp}"><img src="{$INTERFACE_REP}btn_vert.gif" border="0"> Pr\xE9c\xE9dent</a>
+ {attribbouton touche="green" lien="tvprogram.php?min=$temp&jour=$jour"}
+ <a href="tvprogram.php?min={$temp}&jour={$jour}"><img src="{$INTERFACE_REP}btn_vert.gif" border="0"> Pr\xE9c\xE9dent</a>
{/if}
- {section name=chaine loop=$CHAINE max=20 start=$MIN}
+ {section name=chaine loop=$CHAINES max=20 start=$MIN}
{if $smarty.section.chaine.first}
<table width="480" height="400" border="0" cellpadding="0" cellspacing="0"><tr>
{/if}
- <td width="96" height="80"><a href="tvprogram.php?cboDate={$DATE}&cboCateg={$CHAINE[chaine].nom|urlencode}"><table border="0" cellpadding="0" cellspacing="0" width="96" height="80" bgcolor="{#COULEUR_FOND1#}" abgcolor="{#COULEUR_TABLE_SELECTED#}"><tr height="40"><td align=center width="96" height="40" valign="middle"><img width="36" height="36" border="0" src="{$CHAINE_REP}{$CHAINE[chaine].ico}"></td></tr><tr height="40"><td align=center width="96" height="40"><font size="1">{$CHAINE[chaine].nom}</font></td></tr></table></a></td>
+ <td width="96" height="80"><a href="tvprogram.php?jour={$jour}&chaine={$CHAINES[chaine].id}"><table border="0" cellpadding="0" cellspacing="0" width="96" height="80" bgcolor="{#COULEUR_FOND1#}" abgcolor="{#COULEUR_TABLE_SELECTED#}"><tr height="40"><td align=center width="96" height="40" valign="middle"><img width="36" height="36" border="0" src="{$CHAINE_REP}{$CHAINES[chaine].ico}"></td></tr><tr height="40"><td align=center width="96" height="40"><font size="1">{$CHAINES[chaine].nom}</font></td></tr></table></a></td>
{if $smarty.section.chaine.iteration is div by 5 AND NOT $smarty.section.chaine.last}
</tr><tr>
{/if}
@@ -62,9 +65,9 @@
{/if}
{/section}
- {if $MIN+$smarty.section.chaine.total < count($CHAINE)}
+ {if $MIN+$smarty.section.chaine.total < count($CHAINES)}
{assign var=temp value=$MIN+20}
- {attribbouton touche="blue" lien="tvprogram.php?min=$temp"}
- <a href="tvprogram.php?min={$temp}"><img src="{$INTERFACE_REP}btn_bleu.gif" border="0"> Suivant</a>
+ {attribbouton touche="blue" lien="tvprogram.php?min=$temp&jour=$jour"}
+ <a href="tvprogram.php?min={$temp}&jour={$jour}"><img src="{$INTERFACE_REP}btn_bleu.gif" border="0"> Suivant</a>
{/if}
{/if}
Modified: trunk/module/guidetv/tvprogram.php
===================================================================
--- trunk/module/guidetv/tvprogram.php 2007-02-25 10:13:33 UTC (rev 86)
+++ trunk/module/guidetv/tvprogram.php 2007-03-03 21:43:07 UTC (rev 87)
@@ -1,293 +1,161 @@
<?php
$RACINE_REP = "../../";
require($RACINE_REP.'_framework/framework.php');
+setlocale(LC_TIME, 'french');
+(isset($_GET['min']))?$min=$_GET['min']:$min=0;
+(isset($_GET['jour'])&&$_GET['jour'])?$jour=$_GET['jour']:$jour=2;
-if(isset($_GET['min'])){
- $min = $_GET['min'];
-}else{
- $min = 0;
+ $contenu_xml = file_get_contents('listechainetelepoche.txt');
+ $ereg = '"(.{1,3})" = "(.{1,30})"\[end\]';
+ preg_match_all("/$ereg/s", $contenu_xml, $valeur);
+
+function multiarray_search($arrayVet, $campo, $valor){
+ while(isset($arrayVet[key($arrayVet)])){
+ if($arrayVet[key($arrayVet)][$campo] == $valor){
+ return key($arrayVet);
+ }
+ next($arrayVet);
+ }
+ return -1;
}
-if(filemtime('epg.xml')+86400<time()){
-$value = file_get_contents('http://easybobox.free.fr/epg.xml');
-file_put_contents('epg.xml', $value);
+foreach($valeur[1] as $key => $val){
+ $cat = explode('|',$valeur[2][$key]);
+ $ico = $cat[1];
+ if(eregi("France 3",$cat[1])){
+ $ico = "France 3";
+ }elseif(eregi("nantes",$cat[1])){
+ $ico = "Telenantes_Nantes 7";
+ }
+ $CHAINES[] = array('id'=>intval($valeur[1][$key]), 'num'=>$cat[2], 'nom'=>utf8_decode($cat[1]), 'ico'=>trim(str_replace(array('>',' !',' ','\xE9','\xEE','\xF4'),array('','','','e','i','o'),$ico)).'.gif');
}
-
- $contenu = @file_get_contents ($USER.'multiposte.m3u');
- $ereg = '#EXTINF:0,(.{1,3}) - (.{1,40})rtsp:\/\/mafreebox.freebox.fr\/freeboxtv\/s?t?r?e?a?m?\??i?d?=?(.{1,3})';
- preg_match_all("/$ereg/s", $contenu, $valeur);
+
+if(isset($_GET['chaine'])){
+ $chaine=$_GET['chaine'];
+ // R\xE9cup\xE9ration du canal et n\xB0 chaine freebox
+ $key = multiarray_search($CHAINES, 'id', $chaine);
+ $chaine = $CHAINES[$key];
+}
+
+function infos_emissions($id,$debut,$fin){
+ if($id!=''){
+ $infos = true;
+ $contenu_html = file_get_contents ('http://telepoche.guidetele.com/fiche/emi_'.$id);
+ $ereg = "<span class=\"noir11\">(.{1,1000})<\/span><br \/>";
+ preg_match("/$ereg/s",$contenu_html, $content);
-function search_chan($chan){
-global $USER, $valeur;
- if($chan=='tf1' OR $chan=='canalplus'){
- $CHAINE=array('id'=>'inc', 'nom'=>$chan, 'num'=>'inc', 'ico'=>$chan.'.gif');
- }else{
- $id=0;
- $chgmt=intval(abs(count($valeur[1]) / 2));
-
- foreach($valeur[2] as $key => $value){
+ $ereg = '<td width="343" class="ro15">(.{1,50})<\/td>';
+ preg_match("/$ereg/s",$contenu_html, $titre);
- $ico = utf8_decode($valeur[2][$key]);
- if (eregi("France 3",$valeur[2][$key])){
- $ico = "France 3";
- }elseif (eregi("nantes",$valeur[2][$key])){
- $ico = "Telenantes_Nantes 7";
- }
-
- if(eregi($chan,str_replace(' ','',trim(utf8_decode($valeur[2][$key]))))){
- $CHAINE=array('id'=>trim($valeur[1][$key]), 'nom'=>trim(utf8_decode($valeur[2][$key])), 'num'=>trim($valeur[3][$key]), 'ico'=>trim(str_replace(array('>',' !',' ','\xE9','\xEE','\xF4'),array('','','','e','i','o'),$ico)).'.gif');
- }
- }
- }
-return $CHAINE;
+ $ereg = "<span class=\"noir11\">Pr\xE9sentateur<\/span><span class=\"noir11r\"> : (.{1,30})<\/span><br \/>";
+ preg_match("/$ereg/s",$contenu_html, $presentateur);
+
+ $ereg = '<td width="200" valign="top"><img src="(.{1,100})"><\/td>';
+ preg_match("/$ereg/s",$contenu_html, $icone);
+
+ $ereg = "<img src='\/img\/(.)e.gif' height='10' width='22'>";
+ preg_match("/$ereg/s",$contenu_html, $note);
+
+ $ereg = '<span class="noir11">Réalisateur<\/span><span class="noir11r"> : (.{1,40})<\/span><br \/>';
+ preg_match("/$ereg/s",$contenu_html, $realisateur);
+
+ $ereg = '<span class="noir11">(.{1,75})<\/span><br\/>';
+ preg_match("/$ereg/s",$contenu_html, $categorie);
+
+ $ereg = '<span class="noir11">HISTOIRE<\/span> <span class="noir11r">: (.{1,300})<\/span><\/p>';
+ preg_match("/$ereg/s",$contenu_html, $histoire1);
+
+ $ereg = '<span class="noir11">RESUME<\/span> <span class="noir11r">: (.{1,600})<\/span><\/p>';
+ preg_match("/$ereg/s",$contenu_html, $histoire2);
+
+ $ereg = '<span class="noir11">AVIS<\/span> <span class="noir11r">: (.{1,600})<\/span><\/p>';
+ preg_match("/$ereg/s",$contenu_html, $histoire3);
+
+ $ereg = '<span class="noir11r">Nationalit\xE9 : (.{1,75})<\/span><br>';
+ preg_match("/$ereg/s",$contenu_html, $nationalite);
+ }else{
+ $infos = false;
+ }
+ $EMISSION=array('debut'=>$debut,
+ 'fin'=>$fin,
+ 'titre'=>$titre[1],
+ 'description'=>strip_tags($histoire1[1]).'<br> <br>'.strip_tags($histoire2[1]).'<br> <br>'.strip_tags($histoire3[1]),
+ 'categorie'=>$categorie[1],
+ 'realisateur'=>$realisateur[1],
+ 'duree'=>floatval(date('i',($fin-$debut)))+60*(floatval(date('G',($fin-$debut)))-1),
+ 'nationalite'=>$nationalite[1],
+ 'note'=>$note[1],
+ 'icone'=>'http://static.digitalmondadori.fr/gtv/visu'.str_replace('/c_img','',$icone[1]),
+ 'presentateur'=>$presentateur[1],
+ 'infos'=>$infos);
+ RETURN $EMISSION;
}
+function programme_chaine($chaine, $jour){
- include "class.phxmltvparser.php";
- include "class.collection.php";
- include_once "phxpconfig.php";
+ $contenu_html = file_get_contents('http://telepoche.guidetele.com/gtvnew/journee?openagent&c='.$chaine['id'].'&d='.$jour.'&h=0');
+ $ereg = "showmenu\('(.{1,3})h(.{1,3})-(.{1,3})h(.{1,3})<br> (.{1,40})<br> Showview : (.{1,8})','(.{1,100})'\)\" onMouseout=\"hidemenu\(\)\" onclick=\"(.{1,80})\"";
+ preg_match_all("/$ereg/s", utf8_encode($contenu_html), $valeurs);
+ $tmp = array_unique($valeurs[7]);
-/* function getLink($prgItem)
- {
- $title = $prgItem->title;
- $title = eregi_replace('\xE4', 'ae', $title);
- $title = eregi_replace('\xF6', 'oe', $title);
- $title = eregi_replace('\xFC', 'ue', $title);
- $title = eregi_replace('\xEE', 'ss', $title);
+ foreach($tmp as $key => $value){
+
+ $ereg = "fiche\('(.{1,8})'\);";
+ unset($val);
+ preg_match("/$ereg/s",$valeurs[8][$key], $val);
+
+ $debut = mktime($valeurs[1][$key],$valeurs[2][$key],0,date('m'),date('d')+($jour-2),date('Y'));
+ $fin = mktime($valeurs[3][$key],$valeurs[4][$key],0,date('m'),date('d')+($jour-2),date('Y'));
- $title = ucwords($title); //ucase first letter
-
- $title = eregi_replace("[^a-z0-9_]","",$title); //strip all special chars
-
- $paras = '&chan=' . $prgItem->channel;
- $paras .= '&date=' . $prgItem->date;
- $paras .= '&start=' . htmlspecialchars($prgItem->formatStartTime());
- $paras .= '&stop=' . htmlspecialchars($prgItem->formatStopTime());
- $paras .= '&title=' . $title;
-
- $call = '<A class="prg_title" href="' . PRG_CALL . $paras . '" name="record" target="blank">' . $prgItem->title . '</A>';
-
- return($call);
- }
-
-
- // view ordered by channel
-
- function dump($prgObj, $date, $catFilter)
- {
- echo '<div class="prg_date">' . substr($date,6,2) . '.' . substr($date,4,2) . '</div>';
-
-
- echo "<table>";
-
- foreach ($prgObj->arrData as $channel => $arrItems) {
- echo "<tr>";
-
- echo '<td class="prg_channel">';
- echo "$channel<br>";
- echo "</td>";
-
- foreach ($arrItems as $start => $item) {
- if(strlen($catFilter) > 0)
- $hit = eregi($catFilter, $item->category);
- else
- $hit = true;
-
-
- if($hit)
- {
- echo '<td class="prg_cell">';
-
- $title = $item->title;
- $title = eregi_replace('\xE4', 'ae', $title);
- $title = eregi_replace('\xF6', 'oe', $title);
- $title = eregi_replace('\xFC', 'ue', $title);
- $title = eregi_replace('\xEE', 'ss', $title);
-
- $title =ucwords($title); //ucase first letter
-
- $title = eregi_replace("[^a-z0-9_]","",$title); //strip all special characters
-
- $paras = '&chan=' . $channel;
- $paras .= '&date=' . $item->date;
- $paras .= '&start=' . htmlspecialchars($item->formatStartTime());
- $paras .= '&stop=' . htmlspecialchars($item->formatStopTime());
- $paras .= '&title=' . $title;
-
- $call = '<A class="prg_title" href="neu.php?action=show' . $paras . '" name="record" target="blank">' . $item->title . '</A>';
-
- echo $call . "<br>";
- echo '<div class="prg_subtitle">' . $item->subtitle . '</div>';
- echo '<div class="prg_extra_data">';
- echo $item->formatStartTime() . "-" . $item->formatStopTime() . "<br>";
- echo $item->category ;
- echo '</div>';
-
- echo '<div class="prg_desc">';
- echo $item->desc;
- echo '</div>';
-
- echo "</td>";
- }
- }
-
- echo "</tr>";
-
-
- }
-
- echo "</table>";
- }
-
-*/
-
-
-//===================================================================================================================================================
-//--- main function ---
-//===================================================================================================================================================
-
- $xml = xml_parser_create();
- $xtvp = new PHxmltvParser;
-
- //$xtvp->setDate($date);
-
- xml_set_object($xml, $xtvp);
- xml_set_element_handler($xml, 'start_element', 'end_element');
- xml_set_character_data_handler($xml, 'character_data');
- xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, false);
-
-// $file = "../programm.xml";
-// $file = "test.xml";
- //$file="http://www.tuyaux-turf.com/divers/TVguide.xml";
- $file="epg.xml";
- $fp = fopen($file, 'r') or die("unable to open file!");
-
- while($data = fread($fp, 4096)) {
- xml_parse($xml, $data, feof($fp)) or die("unable to parse data!");
- }
-
- fclose($fp);
-
- xml_parser_free($xml);
-
- //------------------------
- $PrgDataObj = $xtvp->getPrgDataObj();
- //dump($PrgDataObj, $date, $catFilter);
-
- $channels = new collection;
- $dates = new collection;
- $categories = new collection;
-
- //echo "$PrgDataObj->idxMax<br>";
- $prgitem = $PrgDataObj->getFirst();
-
- while(!is_null($prgitem)) {
- $channels->add($prgitem->channel);
- $dates->add($prgitem->date);
- $categories->add($prgitem->category);
-
- $prgitem = $PrgDataObj->getNext();
- }
-
- $channels->sort();
- $dates->sort();
- $categories->sort();
- $PrgDataObj->orderByDateTime();
-
- $firstdate = $dates->getFirst();
-
- if(isset($_GET['cboDate']) AND isset($_GET['cboCateg'])){
- $dat = $dates->getFirst();
- while(!is_null($dat)) {
- if($dat == $_GET['cboDate'] || $_GET['cboDate'] == OPT_ALL){
- $prgitem = $PrgDataObj->getFirst();
- while(!is_null($prgitem)) {
- if($prgitem->date == $dat && ($prgitem->channel == $_GET['cboCateg'] || $_GET['cboCateg'] == OPT_ALL)) {
- $EMISSIONS[] = array('debut'=>$prgitem->start, 'fin'=>$prgitem->stop, 'titre'=>utf8_decode($prgitem->title), 'specialid'=>md5(utf8_decode($prgitem->title).$prgitem->start.$prgitem->stop.$prgitem->channel));
- }
- if(md5(utf8_decode($prgitem->title).$prgitem->start.$prgitem->stop.$prgitem->channel) == $_GET['indic_name']){
- $EMISSION=array('debut'=>$prgitem->start,
- 'fin'=>$prgitem->stop,
- 'titre'=>utf8_decode($prgitem->title),
- 'soustitre'=>utf8_decode($prgitem->subtitle),
- 'description'=>utf8_decode($prgitem->desc),
- 'categorie'=>utf8_decode($prgitem->category),
- 'episode'=>utf8_decode($prgitem->episode),
- 'realisateur'=>utf8_decode($prgitem->director),
- 'duree'=>utf8_decode($prgitem->lenght),
- 'acteur'=>utf8_decode($prgitem->acteur),
- 'note'=>utf8_decode($prgitem->note),
- 'icone'=>utf8_decode($prgitem->icon),
- 'presentateur'=>utf8_decode($prgitem->presentateur));
- }
- $prgitem = $PrgDataObj->getNext();
-
- }
- }
- $dat = $dates->getNext();
- }
-
- }else{
- $categ = $channels->getFirst();
- while(!is_null($categ)) {
- $info_chaine = search_chan($categ);
- $CHAINES[]=array('nom'=>$categ, 'indicatif'=>$categ, 'ico'=>$info_chaine['ico'], 'recordable'=>true);
- $categ = $channels->getNext();
- }
- }
-
- // Cr\xE9e la liste des jours disponibles
- $dat = $dates->getFirst();
- while(!is_null($dat)) {
- $DATES[]=$dat;
- $dat = $dates->getNext();
- }
-
- // Fonction permettant de transformer les dates comme il faut
- function rebuild_date($date){
- $year = substr($date, 0, 4);
- $month = substr($date, 4, 2);
- $day = substr($date, 6, 2);
- return($day.'/'.$month.'/'.$year);
+ if($debut<mktime(4,0,0,date('m'),date('d')+($jour-2),date('Y')) AND $key>=(count($tmp)/2)){
+ $debut = mktime($valeurs[1][$key],$valeurs[2][$key],0,date('m'),date('d')+($jour-1),date('Y'));
+ $fin = mktime($valeurs[3][$key],$valeurs[4][$key],0,date('m'),date('d')+($jour-1),date('Y'));
+ }elseif($fin<=mktime(4,0,0,date('m'),date('d')+($jour-2),date('Y')) AND $key>=(count($tmp)/2)){
+ $fin = mktime($valeurs[3][$key],$valeurs[4][$key],0,date('m'),date('d')+($jour-1),date('Y'));
}
-
- $smarty->assign('cboDate',$_GET['cboDate']);
- $smarty->assign('cboCateg',$_GET['cboCateg']);
- $smarty->assign('MIN',$_GET['min']);
-
- if(isset($EMISSION)){
- $info_chaine = search_chan($_GET['cboCateg']);
- $smarty->assign('info_chaine',$info_chaine);
- $LINK['red'] = 'tvprogram.php?cboDate='.$_GET['cboDate'].'&cboCateg='.urlencode($_GET['cboCateg']).'&min='.$min;
- $smarty->assign('TITRE','Programme t\xE9l\xE9 - '.urldecode($_GET['cboCateg']).' - '.date('d/m/Y', $_GET['cboDate']));
- $smarty->assign('EMISSION',$EMISSION);
- $smarty->assign('CONTENT',$smarty->fetch('guidetv.tpl'));
+ $EMISSION[] = array('debut'=>$debut,
+ 'fin'=>$fin,
+ 'titre'=>utf8_decode($valeurs[7][$key]),
+ 'fiche'=>$val[1]);
+ }
+RETURN $EMISSION;
+}
- }elseif(isset($EMISSIONS)) {
+$smarty->assign('jour',$jour);
+$smarty->assign('chaine',$chaine);
+$smarty->assign('CHAINES',$CHAINES);
+$smarty->assign('MIN',$min);
+
+ if(isset($_GET['emission'])){
- $info_chaine = search_chan($_GET['cboCateg']);
- $smarty->assign('info_chaine',$info_chaine);
+ $LINK['red'] = 'tvprogram.php?jour='.$jour.'&chaine='.$chaine['id'].'&min='.$min;
+ $smarty->assign('TITRE','Programme t\xE9l\xE9 - '.$chaine['nom'].' - '.strftime("%A",mktime(0,0,0,date('m'),date('d')+($jour-1),date('Y'))).' '.date("d",mktime(0,0,0,date('m'),date('d')+($jour-1),date('Y'))));
+ $smarty->assign('EMISSION',infos_emissions($_GET['emission'],$_GET['debut'],$_GET['fin']));
+ $smarty->assign('CONTENT',$smarty->fetch('guidetv.tpl'));
+
+ }elseif(isset($chaine)){
$LINK['red'] = 'tvprogram.php';
+ $info_chaine = '&chaine='.$chaine['id'];
- foreach($DATES as $dat_new){
- $MENU_ALT[] = array('lien'=>'tvprogram.php?cboDate='.$dat_new.'&cboCateg='.$_GET['cboCateg'], 'nom'=>date('d/m/Y', $dat_new), 'selected'=>$dat_new==$_GET['cboDate']);
- }
-
- $year = substr($_GET['cboDate'], 0, 4);
- $month = substr($_GET['cboDate'], 4, 2);
- $day = substr($_GET['cboDate'], 6, 2);
- $smarty->assign('TITRE','Programme t\xE9l\xE9 - '.$_GET['cboCateg'].' - '.date('d/m/Y', $_GET['cboDate']));
- $smarty->assign('EMISSIONS',$EMISSIONS);
+ $smarty->assign('TITRE','Programme t\xE9l\xE9 - '.$chaine['nom'].' - '.strftime("%A",mktime(0,0,0,date('m'),date('d')+($jour-1),date('Y'))).' '.date("d",mktime(0,0,0,date('m'),date('d')+($jour-1),date('Y'))));
+ $smarty->assign('EMISSIONS',programme_chaine($chaine,$jour));
$smarty->assign('CONTENT',$smarty->fetch('guidetv.tpl'));
+
}else{
-
- $smarty->assign('DATE',$firstdate);
- $smarty->assign('CHAINE',$CHAINES);
+ $LINK['red'] = page_retour_menu();
$smarty->assign('CONTENT',$smarty->fetch('guidetv.tpl'));
}
+
+
+$MENU_ALT[] = array('lien'=>'tvprogram.php?jour=2'.$info_chaine, 'nom'=>'Aujourd\'hui', 'selected'=>$date==2);
+$MENU_ALT[] = array('lien'=>'tvprogram.php?jour=3'.$info_chaine, 'nom'=>'Demain', 'selected'=>$date==3);
+for($i = 4; $i <= 7 ;$i++){
+ $MENU_ALT[] = array('lien'=>'tvprogram.php?jour='.$i.$info_chaine, 'nom'=>ucfirst(strftime("%a",mktime(0,0,0,date('m'),date('d')+($i-2),date('Y')))).' '.date("d",mktime(0,0,0,date('m'),date('d')+($i-1),date('Y'))), 'selected'=>$date==$i);
+}
+
$smarty->display('interface.tpl');
?>
Modified: trunk/module/jt/flux.xml
===================================================================
--- trunk/module/jt/flux.xml 2007-02-25 10:13:33 UTC (rev 86)
+++ trunk/module/jt/flux.xml 2007-03-03 21:43:07 UTC (rev 87)
@@ -2,8 +2,8 @@
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<chaine name="TF1">
- <flux name="Journal de 13h" jours="0,1,2,3,4,5,6" heure="15" datetype="dm">http://viptf1.yacast.net/tf1jt/jt20d##2006.asf</flux>
- <flux name="Journal de 20h" jours="0,1,2,3,4,5,6" heure="21" datetype="dm">http://viptf1.yacast.net/tf1jt/jt20d##2006.asf</flux>
+ <flux name="Journal de 13h" jours="0,1,2,3,4,5,6" heure="15" datetype="dm">http://viptf1.yacast.net/tf1jt/jt20d##2007.asf</flux>
+ <flux name="Journal de 20h" jours="0,1,2,3,4,5,6" heure="21" datetype="dm">http://viptf1.yacast.net/tf1jt/jt20d##2007.asf</flux>
</chaine>
<chaine name="France 2">
<flux name="Journal de 8h" jours="1,2,3,4,5,6" heure="9" datetype="Ymd">mms://sdmc.contents.edgestreams.net/horsgv/regions/siege/infos/f2/8h/HD_8h_##.wmv</flux>
Modified: trunk/module/multiposte/enregistrement.tpl
===================================================================
--- trunk/module/multiposte/enregistrement.tpl 2007-02-25 10:13:33 UTC (rev 86)
+++ trunk/module/multiposte/enregistrement.tpl 2007-03-03 21:43:07 UTC (rev 87)
@@ -21,7 +21,7 @@
<tr height="20">
<td align=center width="20" height="20" align="center" valign="middle">
{if $ENREGISTREMENT[enregistrement].statut == 'En attente'}
- <img src="{$INTERFACE_REP}cancelled.gif" border="0" width="20" height="20">
+ <img src="{$INTERFACE_REP}delete.gif" border="0" width="20" height="20">
{else}
<img src="{$INTERFACE_REP}finished.gif" border="0" width="20" height="20">
{/if}
@@ -34,7 +34,7 @@
<table width="20" height="20" border="0" cellpadding="0" cellspacing="0" bgcolor="{$COLOR}" abgcolor="{#COULEUR_ALINK#}">
<tr height="20">
<td align=center width="20" height="20" align="center" valign="middle">
- <img src="{$INTERFACE_REP}encours.gif" border="0" width="20" height="20">
+ <img src="{$INTERFACE_REP}delete.gif" border="0" width="20" height="20">
</td>
</tr>
</table>
Modified: trunk/module/multiposte/index1.php
===================================================================
--- trunk/module/multiposte/index1.php 2007-02-25 10:13:33 UTC (rev 86)
+++ trunk/module/multiposte/index1.php 2007-03-03 21:43:07 UTC (rev 87)
@@ -13,26 +13,20 @@
switch($module){
case 'suppr' : //arr\xEAt d'un enregistrement en cours
- if(isset($_GET['id'])){
- $db = sqlite_open('../../_utilisateur/records.db', 0666);
- $requete='SELECT * from records WHERE id='.$_GET['id'];
- $result = sqlite_query($db,$requete);
- $result = sqlite_fetch_array($result);
+ if(isset($_GET['id'])){
+ if(isset($_GET['valide'])){
- $at=exec('at '.$result['task'].' /delete');
- $at.=exec('at '.$result['taskend'].' /delete');
-
-
- $requete='UPDATE records SET statut=\'Enregistr\xE9\' WHERE id='.$_GET['id'];
- $result = sqlite_query($db,$requete);
- sqlite_close($db);
- $file1 = @file_get_contents("http://127.0.0.1:8082/lecteur/action.html?control=shutdown");
-
- $META['refresh']= '2;url=index1.php?module=see';
-
- $smarty->assign('AVERTISSEMENT',"Enregistrement interrompu");
- $smarty->display('avertissement.tpl');
- }
+ $file1 = @file_get_contents('http://localhost:8080/lecteur/stop_rec.php?id='.$_GET['id']);
+
+ $META['refresh']= '2;url=index1.php?module=see';
+
+ $smarty->assign('AVERTISSEMENT',"Enregistrement interrompu");
+ $smarty->display('avertissement.tpl');
+ }else{
+ $smarty->assign('AVERTISSEMENT','Vous allez supprimer un enregistrement en cours. L\'enregistrement sera interrompu mais la partie d\xE9j\xE0 enregistr\xE9e sera conserv\xE9e. Voulez-vous confirmer ?<br> <br><a href="index1.php?module=suppr&valide=1">Oui</a> - <a href="index1.php">Non</a>');
+ $smarty->display('avertissement.tpl');
+ }
+ }
break;
case 'delete':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|