diff --git a/panels/mensaPlan/config.php.skel b/panels/mensaPlan/config.php.skel index 58ccd39a5b593448282980f1a64ef396db21c68d..3ff769b5d8579846eba70a1bd289e82acab3d04a 100644 --- a/panels/mensaPlan/config.php.skel +++ b/panels/mensaPlan/config.php.skel @@ -8,14 +8,6 @@ $PARSE_DAYLIST = array ( "donnerstag", "freitag" ); -$DO_SQL = true; -$DO_JSON = true; - -// SQL -$SQL_SERVER = ""; -$SQL_USER = ""; -$SQL_PW = ""; -$SQL_DB = ""; // JSON $JSON_NAME = "../../tmp/mensaPlan.json"; diff --git a/panels/mensaPlan/getJson.php b/panels/mensaPlan/getJson.php deleted file mode 100644 index 09d8f296faba3a5bb222d1aeabbf6fa8335d2762..0000000000000000000000000000000000000000 --- a/panels/mensaPlan/getJson.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -$mysqli = new mysqli ( "ovanier.de", "info_reader", "7ELZqMyUwU8MaJba", "infoscreen" ); - -if ($mysqli->connect_errno) { - printf ( "Connect failed: %s\n", $mysqli->connect_error ); - exit (); -} - -if ($result = $mysqli->query ( "SELECT * FROM City" )) { - - $result->close (); -} - -$mysqli->close (); -?> \ No newline at end of file diff --git a/panels/mensaPlan/helper.php b/panels/mensaPlan/helper.php index febc7c98017ac247760ae235a158cee8a6358f90..49327065130f31b05abf146ff8d7506493193c4b 100644 --- a/panels/mensaPlan/helper.php +++ b/panels/mensaPlan/helper.php @@ -20,26 +20,6 @@ function toJson($tage, $name, $inc_nr, $inc_original, $inc_short, $inc_art, $inc $json .= "}"; file_put_contents ( $name, $json ); } -function toSql($tage, $server, $user, $pw, $db) { - $mysqli = new mysqli ( $server, $user, $pw, $db ); - - if ($mysqli->connect_errno) { - printf ( "Connect failed: %s\n", $mysqli->connect_error ); - exit (); - } - - $stmt = mysqli_prepare ( $mysqli, "INSERT INTO gerichte (nr,originalText,shortText,rind,schwein,gefluegel,fisch,vegetarisch,vegan,kinderteller,counter,date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE originalText = ?,shortText = ?,rind = ?,schwein = ?,gefluegel = ?,fisch = ?,vegetarisch = ?,vegan = ?,kinderteller = ?, counter = ?" ); - foreach ( $tage as $tag ) { - foreach ( $tag->getGerichte () as $gericht ) { - mysqli_stmt_bind_param ( $stmt, "issiiiiiiiisssiiiiiiii", $gericht->getNr (), $gericht->getOriginalText (), $gericht->getShortText (), $gericht->isRind (), $gericht->isSchwein (), $gericht->isGefluegel (), $gericht->isFisch (), $gericht->isVegetarisch (), $gericht->isVegan (), $gericht->isKinderteller (), $gericht->getCounter (), $gericht->getDate (), $gericht->getOriginalText (), $gericht->getShortText (), $gericht->isRind (), $gericht->isSchwein (), $gericht->isGefluegel (), $gericht->isFisch (), $gericht->isVegetarisch (), $gericht->isVegan (), $gericht->isKinderteller (), $gericht->getCounter () ); - $gericht->getNr (); - $stmt->execute (); - } - } - $stmt->close (); - - $mysqli->close (); -} function parsDay($html, $day) { $tag = new TAG ( $day, substr ( $html->find ( 'a[href="#' . $day . '"]', 0 )->innertext, - 10, 10 ) ); diff --git a/panels/mensaPlan/mensaParser.php b/panels/mensaPlan/mensaParser.php index 295f169bea7382f49b65665f165141e59de6c359..9519dbfeb8c5691a3bf982d3ffd7724dc544ba3d 100644 --- a/panels/mensaPlan/mensaParser.php +++ b/panels/mensaPlan/mensaParser.php @@ -14,14 +14,7 @@ if ($html != null) { } // CREATE JSON - if ($DO_JSON) { - toJson ( $tage, $JSON_NAME, $JSON_INC_NR, $JSON_INC_ORIGINAL, $JSON_INC_SHORT, $JSON_INC_ART, $JSON_INC_KIND, $JSON_INC_STOFFE, $JSON_INC_COUNTER, $JSON_INC_DATE ); - } - - // SAVE - if ($DO_SQL) { - toSql ( $tage, $SQL_SERVER, $SQL_USER, $SQL_PW, $SQL_DB ); - } + toJson ( $tage, $JSON_NAME, $JSON_INC_NR, $JSON_INC_ORIGINAL, $JSON_INC_SHORT, $JSON_INC_ART, $JSON_INC_KIND, $JSON_INC_STOFFE, $JSON_INC_COUNTER, $JSON_INC_DATE ); } else { echo "Webseite nicht erreichbar."; } diff --git a/panels/mensaPlan/setup/gerichte.sql b/panels/mensaPlan/setup/gerichte.sql deleted file mode 100644 index b1ce28e1a46735045401df41043be49df9a19050..0000000000000000000000000000000000000000 --- a/panels/mensaPlan/setup/gerichte.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE IF NOT EXISTS `gerichte` ( -`id` int(255) NOT NULL, - `nr` int(11) NOT NULL, - `originalText` text NOT NULL, - `shortText` text NOT NULL, - `rind` tinyint(1) NOT NULL DEFAULT '0', - `schwein` tinyint(1) NOT NULL DEFAULT '0', - `gefluegel` tinyint(1) NOT NULL DEFAULT '0', - `fisch` tinyint(1) NOT NULL DEFAULT '0', - `vegetarisch` tinyint(1) NOT NULL DEFAULT '0', - `vegan` tinyint(1) NOT NULL DEFAULT '0', - `kinderteller` tinyint(1) NOT NULL DEFAULT '0', - `counter` int(11) DEFAULT '0', - `date` varchar(10) NOT NULL -) ENGINE=InnoDB AUTO_INCREMENT=162 DEFAULT CHARSET=latin1; - -ALTER TABLE `gerichte` - ADD PRIMARY KEY (`nr`,`date`), ADD UNIQUE KEY (`nr`,`date`), ADD KEY `id` (`id`); \ No newline at end of file diff --git a/panels/mensaPlan/setup/zusatzstoffe.sql b/panels/mensaPlan/setup/zusatzstoffe.sql deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/panels/topListe/getTasks.php b/panels/topListe/getTasks.php deleted file mode 100644 index dc10d563346f39f58a736ed6bf9960cb11622d4e..0000000000000000000000000000000000000000 --- a/panels/topListe/getTasks.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php - - -?> \ No newline at end of file diff --git a/panels/topListe/script.js b/panels/topListe/script.js deleted file mode 100644 index db799dcdcf59623ab0319c9219b0bb8debca1d9c..0000000000000000000000000000000000000000 --- a/panels/topListe/script.js +++ /dev/null @@ -1,39 +0,0 @@ -this.loaded = function(panel, config) { - addElement("A"); - addElement("B"); - addElement("C"); - addElement("D"); - addElement("E"); - //removeElement(3); - moveElement(3,1); -} - -var lastUpdates; - -function pull(){ - -} - -function addElement($text){ - var $li = $("<li class='ui-state-default'/>").text($text); - $("#topListSortable").append($li); - $("#topListSortable").sortable(); - $("#topListSortable").disableSelection(); - $("#topListSortable").sortable('refresh'); -} - -function moveElement($idO,$idN){ - if($idO != $idN) { - if($idO < $idN){ - $("#topListSortable li:eq("+$idO+")").insertAfter($("#topListSortable li:eq("+$idN+")")); - } else { - $("#topListSortable li:eq("+$idO+")").insertBefore($("#topListSortable li:eq("+$idN+")")); - } - $("#topListSortable").sortable('refresh'); - } -} - -function removeElement($id){ - $("#topListSortable li:eq(" + $id+")").remove(); - $("#topListSortable").sortable('refresh'); -} \ No newline at end of file diff --git a/panels/topListe/style.less b/panels/topListe/style.less deleted file mode 100644 index 8aa83bfc3490366bd70d5c75b48820fb6254923d..0000000000000000000000000000000000000000 --- a/panels/topListe/style.less +++ /dev/null @@ -1,45 +0,0 @@ -#topListe{ - position:relative; - width:100%; - height:100%; -} - -#currentTop { - background-color: #ffffff; - float:left; - position:relative; - top:0; - width: 100%; - height: 25%; -} - -#topName{ - float: left; - background-color: #ffffff; - width: 100%; - height: 25%; - font-size: 300%; - text-align: center; -} - -#topDescription{ - float: left; - background-color: #ffffff; - width: 100%; - height: 25%; - font-size: 200%; -} - -#topListAnzeige{ - float: left; - width: 100%; - height: 25%; -} - -#topListSortable { - font-weight: bold; - color: #ffffff; - list-style-type: decimal; - font-size: 200%; - float:left; -} diff --git a/panels/topListe/template.html b/panels/topListe/template.html deleted file mode 100644 index f261b32c9f4f401fbad467206dd76fa99a5c758b..0000000000000000000000000000000000000000 --- a/panels/topListe/template.html +++ /dev/null @@ -1,15 +0,0 @@ -<div id="topListe"> - <div id="currentTop"> - <div id="topName"> - TEST1 - </div> - <div id="topDescription"> - TEST2 - </div> - </div> - <div id="topListAnzeige"> - <ol id="topListSortable"> - </ol> - </div> -</div> - diff --git a/panels/topListe/tops.json b/panels/topListe/tops.json deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000