From: <ara...@us...> - 2008-08-26 09:04:22
|
Revision: 366 http://easybox-mod.svn.sourceforge.net/easybox-mod/?rev=366&view=rev Author: aragornis Date: 2008-08-26 09:04:11 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Mise ?\195?\160 jour d'ItemListeDetaillee Nettoyage de quelques fonctions dans fonctions_partagees.inc.php Impl?\195?\169mentation de la page "Options" Ajout du .hosts pour compatibilit?\195?\169 avec vlc 0.9.0 Interdiction pour un navigateur de mettre en cache les pages du panneau de configuration Modified Paths: -------------- trunk/http/_framework/demarrage.php trunk/http/_framework/fonctions_partagees.inc.php trunk/http/_framework/framework.php trunk/http/_framework/lib/VLC.class.php trunk/http/_utilisateur/contentVLC trunk/http/_utilisateur/modules.db trunk/http/configuration/addmodule.php trunk/http/configuration/addskin.php trunk/http/configuration/configuration.php trunk/http/configuration/script.js trunk/http/http-vlc/.hosts trunk/http/http-vlc/player.html trunk/http/module/VOD/classes/Wat.class.php trunk/http/module/_menu/menu.php trunk/http/module/_options/index1.php trunk/http/skin/mediacenter/framework_skin.php trunk/http/skin/mediacenter/item_liste_detaillee.tpl trunk/http/testing.php Added Paths: ----------- trunk/http/skin/mediacenter/sources/fond600x105.png Removed Paths: ------------- trunk/http/skin/mediacenter/interface/fond600x120.gif trunk/http/skin/mediacenter/sources/fond600x120.png Modified: trunk/http/_framework/demarrage.php =================================================================== --- trunk/http/_framework/demarrage.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/_framework/demarrage.php 2008-08-26 09:04:11 UTC (rev 366) @@ -17,7 +17,7 @@ $etape = $_GET['etape']; } -if($VLC->stop and $etape==1){ +if($VLC->stop AND $etape==1){ $Background->forced = true; } @@ -52,7 +52,7 @@ $Easybox->meta('refresh', '1;url=demarrage.php?etape=3'); //V\xE9rification des bases de donn\xE9es require_once(GESTION."verif_config.php"); - @readfile('http://localhost:8081/lecteur/set_option.html'); + fclose(fopen('http://127.0.0.1:8081/lecteur/set_option.html', 'r')); //Remise \xE0 z\xE9ro des variables de session $Easybox->clean_vars(); Modified: trunk/http/_framework/fonctions_partagees.inc.php =================================================================== --- trunk/http/_framework/fonctions_partagees.inc.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/_framework/fonctions_partagees.inc.php 2008-08-26 09:04:11 UTC (rev 366) @@ -129,28 +129,11 @@ } function module_exists($nom){ - global $LISTE_MODULES; - if(count($LISTE_MODULES)<=2){ - get_module_list(); - } - return in_array($nom, $LISTE_MODULES); + $db = sqlite_open(USER.'modules.db', 0666); + $res = sqlite_query($db,'SELECT DISTINCT nom FROM modules WHERE nom="'.$nom.'"'); + return sqlite_num_rows($res); } -function get_module_list(){ - global $LISTE_MODULES; - - $db = sqlite_open(USER.'modules.db', 0666); - $res = sqlite_query($db,'SELECT DISTINCT nom FROM modules'); - - $MODULES = array(); - while($line = sqlite_fetch_object($res)){ - $MODULES[] = $line->nom; - } - sqlite_close($db); - - $LISTE_MODULES = $MODULES; -} - function get_all_module(){ $db = sqlite_open(USER.'modules.db', 0666); $res = sqlite_query($db,'SELECT * FROM modules WHERE type="Module" AND nom!="Easybox"'); @@ -163,28 +146,6 @@ return $MODULES; } -function get_installed_modules(){ - global $INTERFACE_REP; - - if($a<=1){ - $db = sqlite_open(USER.'modules.db', 0666); - $res = sqlite_query($db,'SELECT * FROM modules WHERE dependance="Alone" AND type="Module"'); - - $MODULES = array(); - while($element = sqlite_fetch_object($res)){ - if(file_exists(MODULE.$element->repertoire.'screen.gif')){ - $img = MODULE.$element->repertoire.'screen.gif'; - }else{ - $img = $INTERFACE_REP.'noimage.gif'; - } - $MODULES[] = array('nom'=>$element->nom,'version'=>$element->version,'description'=>$element->description,'id'=>$element->id, 'img'=>$img); - } - sqlite_close($db); - } - - return $MODULES; -} - function get_installed_skins(){ global $RACINE_REP,$INTERFACE_REP,$ini; Modified: trunk/http/_framework/framework.php =================================================================== --- trunk/http/_framework/framework.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/_framework/framework.php 2008-08-26 09:04:11 UTC (rev 366) @@ -1,4 +1,9 @@ <?php + +header("Expires: 0"); +header("Cache-Control: no-cache, no-store, must-revalidate"); +header("Pragma: no-cache"); + unset($val_vers); $time0 = microtime(true); @@ -139,9 +144,6 @@ require_once(BOUTON."bouton_general.php"); } -//-- R\xE9cup\xE9ration de la liste de modules - Initialise le tableau global $LISTE_MODULES -get_module_list(); - $smarty->register_modifier("strip_delimiters","strip_delimiters"); //- Libraire pour explorer les fichiers Modified: trunk/http/_framework/lib/VLC.class.php =================================================================== --- trunk/http/_framework/lib/VLC.class.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/_framework/lib/VLC.class.php 2008-08-26 09:04:11 UTC (rev 366) @@ -59,9 +59,9 @@ $ab = 128; $vb = 1024; break; - + } - + if($audio){ if($ini['multimedia']['qualiteaudio']=='AC3'){ $temp[] = 'acodec=a52,ab='.$ab.',channels=6,samplerate=44100'; @@ -70,7 +70,7 @@ } } if($video){ - $temp[] = 'vcodec=mp2v,vb='.$vb.',fps=25.,soverlay=1'; + $temp[] = 'vcodec=mp2v,vb='.$vb.',fps=25.,soverlay,scale=1'; } $this->transcodage = ':sout=#transcode{'.implode(',', $temp).'}'; } @@ -129,16 +129,19 @@ function play($id){ file_put_contents(HTTP_VLC.'player.html', '<vlc id="rpn" param1="'.$id.' vlc_play" />'); $this->launch(); + sleep(1); $this->get_variables(); } function previous(){ fclose(fopen('http://127.0.0.1:8081/lecteur/action.html?control=previous', 'r')); + sleep(1); $this->get_variables(); } function next(){ fclose(fopen('http://127.0.0.1:8081/lecteur/action.html?control=next', 'r')); + sleep(1); $this->get_variables(); } @@ -166,37 +169,37 @@ } function set_option_video($video, $pp){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=3&video='.$video.'&pp='.$pp, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=3&video='.$video.'&pp='.$pp, 'r')); $this->get_propriete_fichier(); } function set_piste_audio($piste){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=2&type2=1&var=audio-es&value='.$piste, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=2&type2=1&var=audio-es&value='.$piste, 'r')); $this->get_propriete_fichier(); } function set_piste_sstitre($piste){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=2&type2=3&var=spu-es&value='.$piste, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=2&type2=3&var=spu-es&value='.$piste, 'r')); $this->get_propriete_fichier(); } function set_couleur_sstitre($color){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=2&type2=2&color='.$color, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=2&type2=2&color='.$color, 'r')); $this->get_propriete_fichier(); } function set_taille_sstitre($taille, $marge){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=2&type2=2&size='.convert_size($taille).'&sub_margin='.$marge, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=2&type2=2&size='.convert_size($taille).'&sub_margin='.$marge, 'r')); $this->get_propriete_fichier(); } function set_chapitre($chapitre){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=2&type2=4&var=chapter&value='.$chapitre, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=2&type2=4&var=chapter&value='.$chapitre, 'r')); $this->get_propriete_fichier(); } function set_titre($titre){ - fclose(fopen('http://localhost:8081/lecteur/modif-config.html?type=2&type2=5&var=title&value='.$titre, 'r')); + fclose(fopen('http://127.0.0.1:8081/lecteur/modif-config.html?type=2&type2=5&var=title&value='.$titre, 'r')); $this->get_propriete_fichier(); } @@ -237,7 +240,7 @@ } function get_propriete_fichier(){ - eval(@file_get_contents('http://localhost:8081/lecteur/options_vlc.html')); + eval(file_get_contents('http://127.0.0.1:8081/lecteur/options_vlc.html')); } function get_variables(){ @@ -253,7 +256,7 @@ if($this->type=='photo' AND $Easybox->get_variable('info_VLC_recuperees')==1){ $contenu_html = file_get_contents(USER.'contentVLC'); }else{ - $contenu_html = @file_get_contents("http://127.0.0.1:8081/_framework/vlc/temps2.html") OR print('<center><br> <br> <br>Vlc n\'est pas lanc\xE9 ou il n\'\xE9coute pas le port 8081</center>'); + $contenu_html = file_get_contents('http://127.0.0.1:8081/_framework/vlc/temps2.html'); if($this->type=='photo'){ file_put_contents(USER.'contentVLC', $contenu_html); $Easybox->save_variable('info_VLC_recuperees', 1); @@ -329,7 +332,7 @@ function gen_html($a, $tags_encodage, $delete=true){ global $ini; if($delete){ - $output = '<vlc id="rpn" param1="vlc_stop" />'."\n".'<vlc id="rpn" param1="playlist_empty" />'."\n"; + $output = '<vlc id="rpn" param1="vlc_stop" />'."\n".'<vlc id="rpn" param1="playlist_empty" />'."\n"; } switch($ini['multimedia']['sortieordi']){ case 'all': @@ -365,9 +368,9 @@ function play_dossier_videos($fichier){ global $Easybox, $ini; - + $Easybox->save_variable('current_provenance','local'); - + $e = new Browser(dirname($fichier), ''); $e->show_audio = false; $e->show_video = true; @@ -377,7 +380,7 @@ $pl = array(); foreach($e->fichiers as $f){ - $pl[] = array('path'=>urlencode(utf8_encode($f['path'])), 'nom'=>utf8_encode($f['nom_sans_extension']), 'lire'=>(basename($fichier)==$f['nom'])); + $pl[] = array('path'=>addslashes(addslashes($f['path'])), 'nom'=>utf8_encode($f['nom_sans_extension']), 'lire'=>(basename($fichier)==$f['nom'])); if(basename($fichier)==$f['nom']){ $this->nom = $f['nom_sans_extension']; $this->duree = 0; @@ -386,7 +389,6 @@ $Easybox->save_variable('current_type','video'); } } - $this->play_tableau($pl); } @@ -408,7 +410,7 @@ $Easybox->save_variable('current_file','Background'); $Easybox->save_variable('current_type','photo'); $Easybox->save_variable('current_provenance','local'); - $this->gen_html(array(array('path'=>'fake:', 'nom'=>$path, 'lire'=>true)), ':fake-file='.addslashes(addslashes($path)).' :fake-width=720 :fake-height=576 :fake-aspect-ratio=4:3 :fake-duration=4000 '.$this->transcodage); + $this->gen_html(array(array('path'=>'fake://', 'nom'=>$path, 'lire'=>true)), ':fake-file='.addslashes(addslashes($path)).' :fake-width=720 :fake-height=576 :fake-aspect-ratio=4:3 :fake-duration=4000 '.$this->transcodage); $this->launch(); } Modified: trunk/http/_utilisateur/contentVLC =================================================================== --- trunk/http/_utilisateur/contentVLC 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/_utilisateur/contentVLC 2008-08-26 09:04:11 UTC (rev 366) @@ -30,4 +30,4 @@ -|00:00:00|fake:|00:00:00|stop|C:\Program Files\Easyboxv3\http\skin\mediacenter\background\bg.png +|00:00:00|fake://|00:00:04|playing|C:\Program Files\Easyboxv3\http\skin\mediacenter\background\bg.png Modified: trunk/http/configuration/addmodule.php =================================================================== --- trunk/http/configuration/addmodule.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/configuration/addmodule.php 2008-08-26 09:04:11 UTC (rev 366) @@ -2,8 +2,7 @@ define('USER', '../_utilisateur/'); if(isset($_GET['newmodule'])){ add_module($_GET['nom'], strtolower(str_replace(' ','',supprime_accents($_GET['nom']))).'/', 'index1.php', '1', '1', '1', '1', '1', $_GET['version'], $_GET['description'], 'Module', 'Alone', $_GET['categorie']); - get_module_list(); - + ?> <div class="titrerec titrereclarger"><div class="coin gh"> </div><div class="titre titrelarger" id="titre">Le nouveau module a bien \xE9t\xE9 ajout\xE9.</div><div class="coin dh"> </div></div><div class="res2"> <div class="item">Le module <?=$_GET['nom'];?> a bien \xE9t\xE9 ajout\xE9. Son dossier est /module/<?=strtolower(str_replace(' ','',supprime_accents($_GET['nom']))).'/';?> et la page lanc\xE9e au lancenent est /module/<?=strtolower(str_replace(' ','',supprime_accents($_GET['nom']))).'/';?>index1.php. Pour lui associer une icone, cr\xE9ez le fichier /ressources/icones/<?=str_replace(array('>',' !',' ','\xE9','\xEE','\xF4'),array('','','','e','i','o'),$_GET['nom'])?>.gif en respectant les limitations sur les fichiers images propres \xE0 la freebox.</div> Modified: trunk/http/configuration/addskin.php =================================================================== --- trunk/http/configuration/addskin.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/configuration/addskin.php 2008-08-26 09:04:11 UTC (rev 366) @@ -2,7 +2,6 @@ define('USER', '../_utilisateur/'); if(isset($_GET['newskin'])){ add_module($_GET['nom'], strtolower(str_replace(' ','',supprime_accents($_GET['nom']))).'/', '', '', '', '', '', '', $_GET['version'], $_GET['description'], 'Skin', 'Alone', ''); - get_module_list(); ?> <div class="titrerec titrereclarger"><div class="coin gh"> </div><div class="titre titrelarger" id="titre">Le nouveau module a bien \xE9t\xE9 ajout\xE9.</div><div class="coin dh"> </div></div><div class="res2"> Modified: trunk/http/configuration/configuration.php =================================================================== --- trunk/http/configuration/configuration.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/configuration/configuration.php 2008-08-26 09:04:11 UTC (rev 366) @@ -1,6 +1,7 @@ <?php -header("Cache-Control: no-cache, must-revalidate"); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Expires: 0"); +header("Cache-Control: no-cache, no-store, must-revalidate"); +header("Pragma: no-cache"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> Modified: trunk/http/configuration/script.js =================================================================== --- trunk/http/configuration/script.js 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/configuration/script.js 2008-08-26 09:04:11 UTC (rev 366) @@ -234,7 +234,7 @@ var oui = document.getElementById(idoui); var non = document.getElementById(idnon); if(oui.checked){ - set_ini(cle,entree,'oui'); + set_ini(cle,entree,'oui'); }else{ set_ini(cle,entree,'non'); } Modified: trunk/http/http-vlc/.hosts =================================================================== --- trunk/http/http-vlc/.hosts 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/http-vlc/.hosts 2008-08-26 09:04:11 UTC (rev 366) @@ -4,8 +4,8 @@ # # localhost -::1 -127.0.0.1 +#::1 +#127.0.0.1 # link-local addresses #fe80::/64 @@ -19,6 +19,6 @@ #169.254.0.0/16 # The world (uncommenting these 2 lines is not quite safe) -#::/0 -#0.0.0.0/0 +::/0 +0.0.0.0/0 Modified: trunk/http/http-vlc/player.html =================================================================== --- trunk/http/http-vlc/player.html 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/http-vlc/player.html 2008-08-26 09:04:11 UTC (rev 366) @@ -1,3 +1,3 @@ <vlc id="rpn" param1="vlc_stop" /> <vlc id="rpn" param1="playlist_empty" /> -<vlc id="rpn" param1="'fake: :fake-file=C:\\\\Program Files\\\\Easyboxv3\\\\http\\\\skin\\\\mediacenter\\\\background\\\\bg.png :fake-width=720 :fake-height=576 :fake-aspect-ratio=4:3 :fake-duration=4000 :sout=#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,vcodec=mp2v,vb=1024,fps=25.,soverlay=1}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=212.27.38.253:1234}}' 'C:\\Program Files\\Easyboxv3\\http\\skin\\mediacenter\\background\\bg.png' playlist_add vlc_play" /> +<vlc id="rpn" param1="'fake:// :fake-file=C:\\\\Program Files\\\\Easyboxv3\\\\http\\\\skin\\\\mediacenter\\\\background\\\\bg.png :fake-width=720 :fake-height=576 :fake-aspect-ratio=4:3 :fake-duration=4000 :sout=#transcode{acodec=mpga,ab=512,channels=2,samplerate=44100,vcodec=mp2v,vb=4096,fps=25.,soverlay,scale=1}:duplicate{dst=std{access=udp,mux=ts,dst=212.27.38.253:1234}}' 'C:\\Program Files\\Easyboxv3\\http\\skin\\mediacenter\\background\\bg.png' playlist_add vlc_play" /> Modified: trunk/http/module/VOD/classes/Wat.class.php =================================================================== --- trunk/http/module/VOD/classes/Wat.class.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/module/VOD/classes/Wat.class.php 2008-08-26 09:04:11 UTC (rev 366) @@ -74,7 +74,7 @@ function generer_lien_play($id){ global $VLC; - $url = 'http://localhost:8080/module/VOD/classes/player_proxy_wat.php?id='.$id; + $url = 'http://127.0.0.1:8080/module/VOD/classes/player_proxy_wat.php?id='.$id; $VLC->play_video_web($url, 'Vid\xE9o Wat'); } Modified: trunk/http/module/_menu/menu.php =================================================================== --- trunk/http/module/_menu/menu.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/module/_menu/menu.php 2008-08-26 09:04:11 UTC (rev 366) @@ -23,7 +23,7 @@ } $Easybox->meta('front_panel', 'EASYBOX'); -$Easybox->menu(MODULE.'modules/index1.php', INTERFACE_REP.'options.gif', 'Options', 'D\xE9finir les options', 4); +$Easybox->menu(MODULE.'_options/index1.php', INTERFACE_REP.'options.gif', 'Options', 'D\xE9finir les options', 4); $menu->champ_recherche = false; $menu->nb_elements = count($res); Modified: trunk/http/module/_options/index1.php =================================================================== --- trunk/http/module/_options/index1.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/module/_options/index1.php 2008-08-26 09:04:11 UTC (rev 366) @@ -3,133 +3,183 @@ require($RACINE_REP.'_framework/framework.php'); if(isset($_GET['setskinid']) and $_GET['valide']==1){ - change_skin($_GET['setskinid']); - $smarty->assign('TITRE','La skin va changer'); - $Easybox->meta('refresh', '1;url=index1.php?skinchanged=1&action='.$_GET['action']); - $smarty->assign('AVERTISSEMENT','Chargement de la nouvelle skin... Veuillez patienter quelques instants...'); - $smarty->display('avertissement.tpl'); + change_skin($_GET['setskinid']); + $smarty->assign('TITRE','La skin va changer'); + $Easybox->meta('refresh', '1;url=index1.php?skinchanged=1&action='.$_GET['action']); + $smarty->assign('AVERTISSEMENT','Chargement de la nouvelle skin... Veuillez patienter quelques instants...'); + $smarty->display('avertissement.tpl'); }elseif(isset($_GET['setskinid'])){ - $smarty->assign('TITRE','Voulez-vous vraiment changer de skin ?'); - $smarty->assign('AVERTISSEMENT','<a href="index1.php?action='.$_GET['action'].'&setskinid='.$_GET['setskinid'].'&valide=1">Oui</a> - <a href="index1.php?action='.$_GET['action'].'">Non</a>'); - $smarty->display('avertissement.tpl'); + $smarty->assign('TITRE','Voulez-vous vraiment changer de skin ?'); + $smarty->assign('AVERTISSEMENT','<a href="index1.php?action='.$_GET['action'].'&setskinid='.$_GET['setskinid'].'&valide=1">Oui</a> - <a href="index1.php?action='.$_GET['action'].'">Non</a>'); + $smarty->display('avertissement.tpl'); }else{ -if(isset($_GET['skinchanged'])){ - get_module_list(); - list_templates(); -} + if(isset($_GET['skinchanged'])){ + list_templates(); + } -$LINK['red']= $Easybox->page_retour_menu(); + $Easybox->retour(MODULE.'_menu/menu.php'); -$MENU_ALT=array(array('lien'=>'index1.php?action=mod', 'nom'=>'Modules install\xE9s', 'selected'=>$_GET['action']=='mod'), - array('lien'=>'index1.php?action=newmod', 'nom'=>'Nouv. modules', 'selected'=>$_GET['action']=='newmod'), - array('lien'=>'index1.php?action=skin', 'nom'=>'Skins install\xE9es', 'selected'=>$_GET['action']=='skin'), - array('lien'=>'index1.php?action=newskin', 'nom'=>'Nouv. skins', 'selected'=>$_GET['action']=='newskin'), - array('lien'=>'index1.php?action=options', 'nom'=>'Option', 'selected'=>$_GET['action']=='options')); -/* -(isset($_GET['min'])?$min=$_GET['min']:$min=0); -$smarty->assign('MIN',$min);*/ + $Easybox->menu('index1.php?action=mod', '', 'Modules install\xE9s', 'G\xE9rer les modules install\xE9s', 105); + $Easybox->menu('index1.php?action=newmod', '', 'Nouv. modules', 'Installer de nouveaux modules', 104); + $Easybox->menu('index1.php?action=skin', '', 'Skins install\xE9es', 'G\xE9rer les skins install\xE9s', 103); + $Easybox->menu('index1.php?action=newskin', '', 'Nouv. skins', 'Installer de nouvelles skins', 102); + $Easybox->menu('index1.php?action=options', '', 'Options', 'D\xE9finir les options d\'Easybox', 101); -if(!isset($_GET['action'])){ - $_GET['action'] = 'mod'; -} + if(!isset($_GET['action'])){ + $_GET['action'] = 'mod'; + } -//Installation d'un nouveau module -if(isset($_GET['installnewmod'])){ - $xml_file = $ini['download']['xml'].'?cat=AllModule'; - $xml3 = simplexml_load_file($xml_file); - $MOD = array(); + //Installation d'un nouveau module + if(isset($_GET['installnewmod'])){ + $xml_file = $ini['download']['xml'].'?cat=AllModule'; + $xml3 = simplexml_load_file($xml_file); + $MOD = array(); - foreach($xml3->element as $element){ - if(utf8_decode($element->nom)==urldecode($_GET['installnewmod'])){ - download_file($ini['download']['patch'].utf8_decode($element->fichier), $RACINE_REP.'module/'.strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', $element->nom); - add_module(utf8_decode($element->nom), strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', 'index1.php', '1', '1', '1', '1', '1', utf8_decode($element->version), utf8_decode($element->description), 'Module', 'Alone', get_id_of_categorie(utf8_decode($element->cat))); - add_download($element->nom); - } - //-- R\xE9initialise la liste des modules - get_module_list(); - list_templates(); - } -} + foreach($xml3->element as $element){ + if(utf8_decode($element->nom)==urldecode($_GET['installnewmod'])){ + download_file($ini['download']['patch'].utf8_decode($element->fichier), $RACINE_REP.'module/'.strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', $element->nom); + add_module(utf8_decode($element->nom), strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', 'index1.php', '1', '1', '1', '1', '1', utf8_decode($element->version), utf8_decode($element->description), 'Module', 'Alone', get_id_of_categorie(utf8_decode($element->cat))); + add_download($element->nom); + } + //-- R\xE9initialise la liste des modules + list_templates(); + } + } -// Suppression d'un module ou d'un skin -if(isset($_GET['delid'])){ - sup_module($_GET['delid']); - get_module_list(); - list_templates(); -} + // Suppression d'un module ou d'un skin + if(isset($_GET['delid'])){ + if(isset($_GET['valide'])){ + sup_module($_GET['delid']); + list_templates(); + }else{ + $smarty->assign('TITRE','Voulez-vous vraiment supprimer ce module/skin ?'); + $smarty->assign('AVERTISSEMENT','<a href="index1.php?action='.$_GET['action'].'&delid='.$_GET['delid'].'&valide=1">Oui</a> - <a href="index1.php?action='.$_GET['action'].'">Non</a>'); + $smarty->display('avertissement.tpl'); + exit(); + } + } -//Installation d'un nouveau skin -if(isset($_GET['installnewskin'])){ - $xml_file = $ini['download']['xml'].'?cat=AllSkin'; - $xml3 = simplexml_load_file($xml_file); - $MOD = array(); - - foreach($xml3->element as $element){ - if(utf8_decode($element->nom)==$_GET['installnewskin']){ - download_file($ini['download']['patch'].utf8_decode($element->fichier), $RACINE_REP.'skin/'.strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/'); - add_module(utf8_decode($element->nom), strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', '', '', '', '', '', '', utf8_decode($element->version), utf8_decode($element->description), 'Skin', 'Alone', ''); - add_download($element->nom); - } - //-- R\xE9initialise la liste des modules - get_module_list(); - list_templates(); - } -} + //Installation d'un nouveau skin + if(isset($_GET['installnewskin'])){ + $xml_file = $ini['download']['xml'].'?cat=AllSkin'; + $xml3 = simplexml_load_file($xml_file); + $MOD = array(); -switch($_GET['action']){ - case 'mod': - $MOD = get_installed_modules(); - start_multi('index1.php?action=mod',4,count($MOD)); - $smarty->assign('MOD',$MOD); - $smarty->assign('TITRE','Modules install\xE9s'); - break; - case 'newmod': - $xml_file = $ini['download']['xml'].'?cat=AllModule'; - $xml3 = simplexml_load_file($xml_file); - $MOD = array(); - - foreach($xml3->element as $elem){ - if(!module_exists(utf8_decode($elem->nom)) and utf8_decode($elem->categorie)=='Module'){ - $MOD[] = array('nom'=> utf8_decode($elem->nom),'version'=> utf8_decode($elem->version),'description'=> utf8_decode($elem->description),'auteur'=> utf8_decode($elem->auteur),'fichier'=> utf8_decode($elem->fichier),'img'=>'http://www.easybox-mod.org/modules/addon/screen/'.utf8_decode($elem->screen)); - } - } - start_multi('index1.php?action=newmod',4,count($MOD)); - $smarty->assign('MOD',$MOD); - $smarty->assign('TITRE','Modules installables'); - break; - case 'skin': - $MOD = get_installed_skins(); - start_multi('index1.php?action=skin',4,count($MOD)); - $smarty->assign('MOD',$MOD); - $smarty->assign('TITRE','Skins install\xE9es'); - break; - case 'newskin': - $xml_file = $ini['download']['xml'].'?cat=AllSkin'; - $xml3 = simplexml_load_file($xml_file); - $MOD = array(); - - foreach($xml3->element as $element){ - if(!module_exists(utf8_decode($element->nom)) and utf8_decode($element->categorie)=='Skin'){ - $MOD[] = array('nom'=>utf8_decode($element->nom),'version'=>utf8_decode($element->version),'description'=>utf8_decode($element->description),'auteur'=>utf8_decode($element->auteur),'fichier'=>utf8_decode($element->fichier),'img'=>'http://www.easybox-mod.org/modules/addon/screen/'.utf8_decode($element->screen)); - } - } - start_multi('index1.php?action=newskin',4,count($MOD)); - $smarty->assign('MOD',$MOD); - $smarty->assign('TITRE','Skins installables'); - break; - case 'options': - $smarty->assign('TITRE','Options'); - break; -} + foreach($xml3->element as $element){ + if(utf8_decode($element->nom)==$_GET['installnewskin']){ + download_file($ini['download']['patch'].utf8_decode($element->fichier), $RACINE_REP.'skin/'.strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/'); + add_module(utf8_decode($element->nom), strtolower(str_replace(' ','',supprime_accents(utf8_decode($element->nom)))).'/', '', '', '', '', '', '', utf8_decode($element->version), utf8_decode($element->description), 'Skin', 'Alone', ''); + add_download($element->nom); + } + //-- R\xE9initialise la liste des modules + list_templates(); + } + } + switch($_GET['action']){ + case 'mod': + $do = new Affichage(SKIN_LISTE_DETAILLEE); + $db = sqlite_open(USER.'modules.db', 0666); + $res = sqlite_array_query($db,'SELECT * FROM modules WHERE dependance="Alone" AND type="Module"'); + $modules = array(); + foreach($res as $e){ + if(file_exists(MODULE.$element->repertoire.'screen.gif')){ + $img = MODULE.$element->repertoire.'screen.gif'; + }else{ + $img = $INTERFACE_REP.'noimage.gif'; + } + $modules[] = new ItemListeDetaillee($e['nom'].'<br>'.$e['description'].'<br><b>Version</b> : '.$e['version'], 'index1.php?action=mod&delid='.$e['id'], $img, ''); + } + sqlite_close($db); -$smarty->assign('action',$_GET['action']); + $do->lien_recherche = 'index1.php'; + $do->ajouter_variable_a_transmettre('action',$_GET['action']); + $do->titre = 'Modules install\xE9s'; + $do->lien = 'index1.php?action=mod'; + $do->message_aucune_entree = 'Aucun module compl\xE9mentaire n\'est actuellement install\xE9.'; + $do->nb_elements = count($modules); + $do->acquerir_tableau($modules, false); + $do->afficher_interface(); -$smarty->assign('CONTENT',$smarty->fetch('modules.tpl')); -$smarty->display('interface.tpl'); + break; + case 'newmod': + $do = new Affichage(SKIN_LISTE_DETAILLEE); + $RemoteDL = new RemoteDL($ini['download']['xml'].'?cat=AllModule'); + $RemoteDL->set_cache_time(0.1); + $xml3 = $RemoteDL->simplexml_load_file(); + $modules = array(); + foreach($xml3->element as $elem){ + if(!module_exists(utf8_decode($elem->nom)) and utf8_decode($elem->categorie)=='Module'){ + $modules[] = new ItemListeDetaillee(utf8_decode($elem->nom).'<br>'.utf8_decode($elem->description).'<br><b>Auteur</b> : '.utf8_decode($elem->auteur).'<br><b>Version</b> : '.utf8_decode($elem->version), 'index1.php?installnewmod='.urlencode(utf8_decode($elem->nom)).'&action=newmod', 'http://www.easybox-freeplayer.com/modules/addon/screen/'.utf8_decode($elem->screen), ''); + } + } + + $do->lien_recherche = 'index1.php'; + $do->ajouter_variable_a_transmettre('action',$_GET['action']); + $do->titre = 'Modules disponibles'; + $do->lien = 'index1.php?action=newmod'; + $do->message_aucune_entree = 'Aucun module compl\xE9mentaire n\'est actuellement disponible.'; + $do->nb_elements = count($modules); + $do->acquerir_tableau($modules, false); + $do->afficher_interface(); + break; + case 'skin': + $do = new Affichage(SKIN_LISTE_DETAILLEE); + + $db = sqlite_open(USER.'modules.db', 0666); + $res = sqlite_array_query($db,'SELECT * FROM modules WHERE type="Skin"'); + + $skins = array(); + foreach($res as $e){ + if(file_exists(MODULE.$element->repertoire.'screen.gif')){ + $img = MODULE.$element->repertoire.'screen.gif'; + }else{ + $img = $INTERFACE_REP.'noimage.gif'; + } + $skins[] = new ItemListeDetaillee($e['nom'].'<br>'.$e['description'].'<br><b>Version</b> : '.$e['version'].'<br>'.($e['nom']==$ini['skin']['skin']?'Skin actuelle':'<a href="index1.php?action=skin&setskinid='.$e['id'].'">Activer</a>').' '.(($e['dependance']!='Easybox Core')?'<a href="index1.php?action=skin&delid='.$e['id'].'">Supprimer</a>':''), '', $img, ''); + } + sqlite_close($db); + + $do->lien_recherche = 'index1.php'; + $do->ajouter_variable_a_transmettre('action',$_GET['action']); + $do->titre = 'Skins install\xE9es'; + $do->lien = 'index1.php?action=skin'; + $do->message_aucune_entree = 'Aucune skin n\'est actuellement install\xE9e.'; + $do->nb_elements = count($skins); + $do->acquerir_tableau($skins, false); + $do->afficher_interface(); + break; + case 'newskin': + $do = new Affichage(SKIN_LISTE_DETAILLEE); + + $RemoteDL = new RemoteDL($ini['download']['xml'].'?cat=AllSkin'); + $RemoteDL->set_cache_time(0.1); + $xml3 = $RemoteDL->simplexml_load_file(); + $skins = array(); + foreach($xml3->element as $elem){ + if(!module_exists(utf8_decode($elem->nom)) and utf8_decode($elem->categorie)=='Skin'){ + $skins[] = new ItemListeDetaillee(utf8_decode($elem->nom).'<br>'.utf8_decode($elem->description).'<br><b>Auteur</b> : '.utf8_decode($elem->auteur).'<br><b>Version</b> : '.utf8_decode($elem->version), 'index1.php?installnewskin='.urlencode(utf8_decode($elem->nom)).'&action=newskin', 'http://www.easybox-freeplayer.com/modules/addon/screen/'.utf8_decode($elem->screen), ''); + } + } + + $do->lien_recherche = 'index1.php'; + $do->ajouter_variable_a_transmettre('action',$_GET['action']); + $do->titre = 'Skins disponibles'; + $do->lien = 'index1.php?action=newskin'; + $do->message_aucune_entree = 'Aucune skin compl\xE9mentaire n\'est actuellement disponible.'; + $do->nb_elements = count($skins); + $do->acquerir_tableau($skins, false); + $do->afficher_interface(); + + break; + case 'options': + $smarty->assign('CONTENT',''); + $smarty->display('interface.tpl'); + break; + } } ?> Modified: trunk/http/skin/mediacenter/framework_skin.php =================================================================== --- trunk/http/skin/mediacenter/framework_skin.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/skin/mediacenter/framework_skin.php 2008-08-26 09:04:11 UTC (rev 366) @@ -37,7 +37,7 @@ define('SKIN_LISTE_DETAILLEE', 3); define('SKIN_LISTE_DETAILLEE_NB_LIGNES', 3); define('SKIN_LISTE_DETAILLEE_COLONNE_WIDTH', 600); -define('SKIN_LISTE_DETAILLEE_LIGNE_HEIGHT', 120); +define('SKIN_LISTE_DETAILLEE_LIGNE_HEIGHT', 105); define('SKIN_LISTE_DETAILLEE_BALISE_TABLE', 'cellspacing="0" cellpadding="0" align="center"'); // Mosaique @@ -48,8 +48,6 @@ define('SKIN_MOSAIQUE_LIGNE_HEIGHT', 130); define('SKIN_MOSAIQUE_BALISE_TABLE', 'cellspacing="3" cellpadding="0" align="center"'); - - // Chargement du fichier des couleurs du skin $_COULEUR = parse_ini_file(SKIN_REP.'couleur.conf', TRUE); Modified: trunk/http/skin/mediacenter/item_liste_detaillee.tpl =================================================================== --- trunk/http/skin/mediacenter/item_liste_detaillee.tpl 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/skin/mediacenter/item_liste_detaillee.tpl 2008-08-26 09:04:11 UTC (rev 366) @@ -1,10 +1,10 @@ {if $lien}<a href="{$lien}" {$javascript}>{/if} - <table border="0" cellpadding="0" cellspacing="0" width="600" height="120" background="{$INTERFACE_REP}fond600x40.gif" once rollover> + <table border="0" cellpadding="0" cellspacing="0" width="600" height="105" background="{$INTERFACE_REP}fond600x105.gif" once rollover> <tr> - <td width="90" height="120" valign="middle" align="center"> - <img width="90" height="120" border="0" src="{$IMG2FBX}?img={$image|urlencode}&width=90&height=120&cache=1"> + <td width="100" height="105" valign="middle" align="center"> + <img width="90" height="95" border="0" src="{$IMG2FBX}?img={$image|urlencode}&width=90&height=95&cache=1"> </td> - <td width="510"> + <td width="500"> {$texte} </td> </tr> Property changes on: trunk/http/skin/mediacenter/sources/fond600x105.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/http/testing.php =================================================================== --- trunk/http/testing.php 2008-08-26 08:55:34 UTC (rev 365) +++ trunk/http/testing.php 2008-08-26 09:04:11 UTC (rev 366) @@ -252,7 +252,7 @@ $id = $_GET['id']; file_put_contents('debug.txt',''); $http = new Http(); -$http->request('http://proxy-29.deezer.com/rewrite/3TxkwS6o8fR8tUBgDQX2sEcsTXcOGy1U/c65bd73a44ae440555df65e6730c88de/27cadb8454719cc73f53d7bc036ba6e45616671fe0fb13ab2d49618a674cc57c50ae476dfdaf19645c3ec075d7ca193b3936266a99ff2c0a11f9711df8c81f65/a5924fd5ab69191ef72bb1b54b7f22cb372dd9453e84277d60b212d1ec190c99d73381edce44375774e3735c2eb9327275834491b31c872acacdd77e406bdc53/9,0,124,0/','GET','__utma=253676188.2225138453119332600.1214129550.1219416520.1219525133.108; __utmz=253676188.1214919665.4.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=deezer; __utmb=253676188.31.10.1219525133; __utmc=253676188'); +$http->request('555df65e6730c88de/27cadb8454719cc73f53d7bc036ba6e45616671fe0fb13ab2d49618a674cc57c50ae476dfdaf19645c3ec075d7ca193b3936266a99ff2c0a11f9711df8c81f65/a5924fd5ab69191ef72bb1b54b7f22cb372dd9453e84277d60b212d1ec190c99d73381edce44375774e3735c2eb9327275834491b31c872acacdd77e406bdc53/9,0,124,0/','GET','__utma=253676188.2225138453119332600.1214129550.1219416520.1219525133.108; __utmz=253676188.1214919665.4.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=deezer; __utmb=253676188.31.10.1219525133; __utmc=253676188'); print_r($http->httpHeaders); file_put_contents('debug.txt',$http->htmlContents); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |