|
From: <ara...@us...> - 2007-03-04 08:05:34
|
Revision: 90
http://svn.sourceforge.net/easybox-mod/?rev=90&view=rev
Author: aragornis
Date: 2007-03-04 00:05:32 -0800 (Sun, 04 Mar 2007)
Log Message:
-----------
re
Removed Paths:
-------------
trunk/module/guidetv/class.collection.php
trunk/module/guidetv/class.phxmltvparser.php
trunk/module/guidetv/class.prgdata.php
trunk/module/guidetv/class.prgitem.php
trunk/module/guidetv/phxpconfig.php
Deleted: trunk/module/guidetv/class.collection.php
===================================================================
--- trunk/module/guidetv/class.collection.php 2007-03-04 08:04:56 UTC (rev 89)
+++ trunk/module/guidetv/class.collection.php 2007-03-04 08:05:32 UTC (rev 90)
@@ -1,56 +0,0 @@
-<?php
-
- class collection
- {
- var $idxMax;
- var $idxAct;
- var $arrData;
-
-
- function collection()
- {
- $this->arrData = array();
- $this->idxMax = -1;
- $this->idxAct = 0;
- }
-
- function getFirst()
- {
- $this->idxAct = 0;
-
- if ($this->idxAct <= $this->idxMax)
- return($this->arrData[$this->idxAct]);
- else
- return(NULL);
- }
-
- function getNext()
- {
- $this->idxAct++;
-
- if ($this->idxAct <= $this->idxMax)
- return($this->arrData[$this->idxAct]);
- else
- return(NULL);
- }
-
-
- function add($data)
- {
- if(!is_null($data)) {
- if(array_search($data, $this->arrData) === FALSE) {
- //echo "($data)<br>";
- $this->idxMax++;
-
- $this->arrData[$this->idxMax] = $data;
- }
- }
- }
-
- function sort($sOption = SORT_STRING)
- {
- sort($this->arrData, $sOption);
- }
-
-}
-?>
\ No newline at end of file
Deleted: trunk/module/guidetv/class.phxmltvparser.php
===================================================================
--- trunk/module/guidetv/class.phxmltvparser.php 2007-03-04 08:04:56 UTC (rev 89)
+++ trunk/module/guidetv/class.phxmltvparser.php 2007-03-04 08:05:32 UTC (rev 90)
@@ -1,172 +0,0 @@
-<?php
-include "class.prgdata.php";
-include_once "phxpconfig.php";
-
-class PHxmltvParser
-{
- var $prgs;
- var $tag;
- var $attr;
- var $wntdDate;
- var $start;
- var $date;
-
-
- function PHxmltvParser()
- {
- $this->prgs = new prgdata;
- }
-
- function getPrgDataObj()
- {
- return($this->prgs);
- }
-
- function setDate($strVal) {
- $this->wntdDate = $strVal;
- }
-
- function getTime($strDateTime)
- {
- return(mktime(substr($strDateTime, 8, 2), substr($strDateTime, 10, 2), 0, substr($strDateTime, 4, 2), substr($strDateTime, 6, 2), substr($strDateTime, 0, 4)));
- }
-
- function getDate($strDateTime)
- {
- return(mktime(0, 0, 0, substr($strDateTime, 4, 2), substr($strDateTime, 6, 2), substr($strDateTime, 0, 4)));
- }
-
- function isDateWanted($date) {
- if(isset($this->wntdDate)) {
- if($date == $this->wntdDate)
- return(true);
- else
- return(false);
- }
- else {
- return(true);
- }
- }
-
-
-//--------------------------------------------------------------------------------------------------------------------------------------
-//--- the parser --------
-
-
- function start_element($parser, $tag, $attributes)
- {
- $this->tag = $tag;
-
- switch($tag) {
- case "programme":
- $this->start = $this->getTime($attributes['start']);
- $this->date = $this->getDate($attributes['start']);
-
- if($this->isDateWanted($this->date)) {
- $channel = getChanName($attributes['channel']);
-
- $this->prgs->addPrgData($channel, $this->date, $this->start, $this->getTime($attributes['stop']));
- }
- break;
-
- case "title":
- $this->attr = $attributes;
- break;
-
- case "sub-title":
- $this->attr = $attributes;
- break;
-
- case "category":
- $this->attr = $attributes;
- break;
-
- case "desc":
- $this->desc = $attributes;
- break;
-
- case "icon":
- $this->prgs->setIcone($attributes['src']);
- break;
-
- case "star-rating":
- $this->starrating = true;
- break;
- }
- }
-
-
-
- function end_element($parser, $tag)
- {
-
- switch($tag) {
- case "star-rating":
- $this->starrating = false;
- break;
- }
-
- }
-
-
-
- function character_data($parser, $data)
- {
-
-// echo '++' . $this->tag.'++' . $data.'<BR>';
- if($this->isDateWanted($this->date)) {
- if(strlen(trim($data)) > 0) {
-
- switch($this->tag) {
- case "title":
- $this->prgs->setTitle($data);
- break;
-
- case "sub-title":
- $this->prgs->setSubTitle($data);
- break;
-
- case "category":
- $this->prgs->setCategory($data);
- break;
-
- case "desc":
- $this->prgs->setDesc($data);
- break;
-
- case "episode-num":
- $this->prgs->setEpisode($data);
- break;
-
- case "director":
- $this->prgs->setDirector($data);
- break;
-
- case "actor":
- $this->prgs->setActor($data);
- break;
-
- case "length":
- $this->prgs->setLenght($data);
- break;
-
- case "presenter":
- $this->prgs->setPresentateur($data);
- break;
-
- case "value":
- if($this->starrating){
- $this->prgs->setNote($data);
- }
- break;
-
- }
- }
- }
- }
-
-//--- End Parser -----------
-//--------------------------------------------------------------------------------------------------------------------------------------
-
-}
-?>
Deleted: trunk/module/guidetv/class.prgdata.php
===================================================================
--- trunk/module/guidetv/class.prgdata.php 2007-03-04 08:04:56 UTC (rev 89)
+++ trunk/module/guidetv/class.prgdata.php 2007-03-04 08:05:32 UTC (rev 90)
@@ -1,138 +0,0 @@
-<?php
- include("class.prgitem.php");
-
- class prgdata
- {
- var $idxMax;
- var $idxAct;
- var $arrData;
- var $actItem;
-
-
-
- function prgdata()
- {
- $this->arrData = array();
- $this->idxMax = -1;
- $this->idxAct = 0;
- }
-
- function getFirst()
- {
- $this->idxAct = 0;
-
- if ($this->idxAct <= $this->idxMax)
- return($this->arrData[$this->idxAct]);
- else
- return(NULL);
- }
-
- function getNext()
- {
- $this->idxAct++;
-
- if ($this->idxAct <= $this->idxMax)
- return($this->arrData[$this->idxAct]);
- else
- return(NULL);
- }
-
-
- function addPrgData($channel, $date, $start, $stop)
- {
- $this->idxMax++;
-
- $this->arrData[$this->idxMax] = new prgitem;
-
- $this->actItem = &$this->arrData[$this->idxMax];
-
- $this->actItem->channel = $channel;
- $this->actItem->start = $start;
- $this->actItem->stop = $stop;
- $this->actItem->date = $date;
- }
-
-
-
- function setTitle($value)
- {
- $this->actItem->title .= $value;
- }
-
- function setSubTitle($value)
- {
- $this->actItem->subtitle .= $value;
- }
-
-
- function setDesc($value)
- {
- $ereg = 'Presse<\/a> <img src="http:\/\/a69.g.akamai.net\/n\/69\/10688\/v1\/img5.allocine.fr\/acmedia\/skin\/allocinev5\/icone\/etoile_(.{1,3}).gif" border="0" title="';
- preg_match("/$ereg/s", $filmrecherche, $valeur);
-
- $this->actItem->desc .= ereg_replace('{(.*)}', '', $value);
- }
-
- function setCategory($value)
- {
- if($this->actItem->category!='' AND !in_array(strtolower(utf8_decode($value{0})),array('\xE9','\xEE','\xF4','\xE0','\xF9','\xE8','\xE7','\xEA','\xEE','\xFB'))){$this->actItem->category .= ', ';}
- $this->actItem->category .= $value;
- }
-
- function setEpisode($value)
- {
- $this->actItem->episode .= $value;
- }
-
- function setDirector($value)
- {
- if($this->actItem->director!='' AND !in_array(strtolower(utf8_decode($value{0})),array('\xE9','\xEE','\xF4','\xE0','\xF9','\xE8','\xE7','\xEA','\xEE','\xFB'))){$this->actItem->director .= ', ';}
- $this->actItem->director .= $value;
- }
-
- function setLenght($value)
- {
- $this->actItem->lenght = $value;
- }
-
- function setPresentateur($value)
- {
- if($this->actItem->presentateur!='' AND !in_array(strtolower(utf8_decode($value{0})),array('\xE9','\xEE','\xF4','\xE0','\xF9','\xE8','\xE7','\xEA','\xEE','\xFB'))){$this->actItem->presentateur .= ', ';}
- $this->actItem->presentateur .= $value;
- }
-
- function setActor($value)
- {
- if($this->actItem->acteur!='' AND !in_array(strtolower(utf8_decode($value{0})),array('\xE9','\xEE','\xF4','\xE0','\xF9','\xE8','\xE7','\xEA','\xEE','\xFB'))){$this->actItem->acteur .= ', ';}
- $this->actItem->acteur .= $value;
-
- }
-
- function setNote($value)
- {
- $note = explode('/', $value);
- $this->actItem->note = $note[0];
-
- }
-
- function setIcone($value)
- {
- if(!eregi('telepoche.guidetele.com', $value)){
- $this->actItem->icon = $value; }
-
- }
-
- function cmpDateTime($a, $b)
- {
- if (($a->date . $a->start) == ($b->date . $b->start)) {
- return 0;
- }
- return (($a->date . $a->start) < ($b->date . $b->start)) ? -1 : 1;
- }
-
- function orderByDateTime()
- {
- usort($this->arrData, array("prgdata", "cmpDateTime"));
- }
-}
-?>
Deleted: trunk/module/guidetv/class.prgitem.php
===================================================================
--- trunk/module/guidetv/class.prgitem.php 2007-03-04 08:04:56 UTC (rev 89)
+++ trunk/module/guidetv/class.prgitem.php 2007-03-04 08:05:32 UTC (rev 90)
@@ -1,41 +0,0 @@
-<?php
-
-class prgitem
-{
- var $channel;
- var $date;
- var $start;
- var $stop;
- var $title;
- var $subtitle;
- var $desc;
- var $category;
- var $episode;
- var $director;
- var $lenght;
- var $presentateur;
- var $acteur;
- var $note;
- var $icon;
-
- function formatStartTime()
- {
- return(substr($this->start, 0, 2) . ":" . substr($this->start, 2, 2));
- }
-
- function formatStopTime()
- {
- return(substr($this->stop, 0, 2) . ":" . substr($this->stop, 2, 2));
- }
-
- function formatDate($date)
- {
- if(!isset($date))
- $date = $this->date;
-
- return(substr($date, 6, 2) . "." . substr($date, 4, 2) . "." . substr($date, 0, 4));
- }
-
-}
-
-?>
Deleted: trunk/module/guidetv/phxpconfig.php
===================================================================
--- trunk/module/guidetv/phxpconfig.php 2007-03-04 08:04:56 UTC (rev 89)
+++ trunk/module/guidetv/phxpconfig.php 2007-03-04 08:05:32 UTC (rev 90)
@@ -1,195 +0,0 @@
-<?php
- define(PHXP_VERSION, "0.1"); //version information
- define(OPT_ALL, "--- Tous ---"); //combo item to select ALL results
- define(EPISODE, "Episode"); //label for episode
- define(CPT_SEARCH_BTN, "Chercher"); //caption for search button
- define(PRG_CALL, "../neu.php?action=show"); //which script should be called if you click on a title
- define(PARSER_LANG, "fr"); //some tags have a lang attribute, set this to your prefered language
-
-
-//this function translates channel ids to channel names
- function getChanName($id)
- {
- switch($id) {
- case "C3sat.de":
- $name = "3Sat";
- break;
-
- case "ard.de":
- $name = "ARD";
- break;
-
- case "arte-tv.com":
- $name = "arte";
- break;
-
- case "C3.br-online.de":
- $name = "BR";
- break;
-
- case "kabel1.de":
- $name = "Kabel1";
- break;
-
- case "mtv.de":
- $name = "MTV";
- break;
-
- case "mtv2.de":
- $name = "MTV2";
- break;
-
- case "n24.de":
- $name = "N24";
- break;
-
- case "ndr.de":
- $name = "N3";
- break;
-
- case "C2.orf.at":
- $name = "ORF2";
- break;
-
- case "phoenix.de":
- $name = "Phoenix";
- break;
-
- case "prosieben.de":
- $name = "Pro7";
- break;
-
- case "rtl.de":
- $name = "RTL";
- break;
-
- case "rtl2.de":
- $name = "RTL2";
- break;
-
- case "sat1.de":
- $name = "Sat1";
- break;
-
- case "superrtl.de":
- $name = "SuperRTL";
- break;
-
- case "tvm.de":
- $name = "TVM";
- break;
-
- case "viva.tv":
- $name = "VIVA";
- break;
-
- case "vivaplus.tv":
- $name = "VIVAPLUS";
- break;
-
- case "vox.de":
- $name = "VOX";
- break;
-
- case "wdr.de":
- $name = "WDR";
- break;
-
- case "zdf.de":
- $name = "ZDF";
- break;
-
-//--- these are for test.xml only
- case "bbc2.bbc.co.uk":
- $name = "bbc2";
- break;
-
- case "channel4.com":
- $name = "channel4";
- break;
-//---------------------------------
-
- case "C1.telepoche.com":
- $name = "tf1";
- break;
- case "C10.telepoche.com":
- $name = "tv5";
- break;
- case "C121.telepoche.com":
- $name = "euronews";
- break;
- case "C162.telepoche.com":
- $name = "bloomberg";
- break;
- case "C167.telepoche.com":
- $name = "direct8";
- break;
- case "C168.telepoche.com":
- $name = "nt1";
- break;
- case "C169.telepoche.com":
- $name = "nrj12";
- break;
- case "C170.telepoche.com":
- $name = "parlement";
- break;
- case "C193.telepoche.com":
- $name = "europe2";
- break;
- case "C194.telepoche.com":
- $name = "bfm";
- break;
- case "C195.telepoche.com":
- $name = "gulli";
- break;
- case "C2.telepoche.com":
- $name = "france2";
- break;
- case "C28.telepoche.com":
- $name = "france4";
- break;
- case "C3.telepoche.com":
- $name = "france3";
- break;
- case "C31.telepoche.com":
- $name = "mtv";
- break;
- case "C38.telepoche.com":
- $name = "w9";
- break;
- case "C4.telepoche.com":
- $name = "canalplus";
- break;
- case "C40.telepoche.com":
- $name = "ab1";
- break;
- case "C5.telepoche.com":
- $name = "arte";
- break;
- case "C6.telepoche.com":
- $name = "m6";
- break;
- case "C7.telepoche.com":
- $name = "france5";
- break;
- case "C8.telepoche.com":
- $name = "rtl9";
- break;
- case "C98.telepoche.com":
- $name = "moteurs";
- break;
- default:
- echo $id;
- $name = "!! unknown !!";
- break;
-
-
-
-
-
- }
-
- return($name);
- }
-
-?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|