From 4e96e3855f09a43617c5fe40d8c04b5d472d94a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 17 Jan 2012 14:03:46 +0000 Subject: [PATCH] =?UTF-8?q?-=20Infoscreens=20k=C3=B6nnen=20getrennten=20Co?= =?UTF-8?q?ntent=20anzeigen=20-=20Berechtigungen=20f=C3=BCr=20DMS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/infoterminal/infoscreen.php | 194 ++- cms/dms.php | 16 + cms/tinymce_dms.php | 15 +- include/dms.class.php | 218 +++ include/infoscreen.class.php | 166 +++ system/FH-Complete.txp | 2450 +++++++++++++++++++++++++++---- system/checksystem.php | 92 ++ 7 files changed, 2826 insertions(+), 325 deletions(-) create mode 100755 include/infoscreen.class.php diff --git a/cis/infoterminal/infoscreen.php b/cis/infoterminal/infoscreen.php index d781cc515..1824f38b6 100644 --- a/cis/infoterminal/infoscreen.php +++ b/cis/infoterminal/infoscreen.php @@ -22,91 +22,139 @@ require_once('../../config/cis.config.inc.php'); require_once('../../include/news.class.php'); require_once('../../include/content.class.php'); +require_once('../../include/infoscreen.class.php'); header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past -?> + +echo ' -NEWS +Infoscreen + - - - - -
  - - - - - - - -
 News
 
-
- '; - $news = new news(); - $news->getnews(MAXNEWSALTER,0,null, false, null, MAXNEWS); - $zaehler=0; - foreach ($news->result as $row) - { - $lang='German'; - $content = new content(); - $content->getContent($row->content_id, $lang, null, null, false); - - $xml_inhalt = new DOMDocument(); - if($content->content!='') - { - $xml_inhalt->loadXML($content->content); - } +$ip = $_SERVER["REMOTE_ADDR"]; +$infoscreen = new infoscreen(); +$i=0; +if($infoscreen->getInfoscreen($ip)) +{ + $infoscreen_id = $infoscreen->infoscreen_id; + $infoscreen->getScreenContent($infoscreen_id); + foreach($infoscreen->result as $row) + { + $i++; + $content[$i] = $row->content_id; + } + //echo "screen: $infoscreen_id"; + //echo "ip: ".$ip; +} + +$zuf = rand(0,$i); +//echo 'zuf:'.$zuf.' i:'.$i.'
'; +//var_dump($content); +//echo 'show content:'.$content[$zuf].' - '.$zuf; +if($zuf!=0) +{ + echo '