Ejemplo n.º 1
0
 function browser()
 {
     $html .= "<h1>Serien-Browser</h1>";
     $AC = anyC::get("Serie");
     $AC->addAssocV3("status", "=", "Continuing");
     $AC->addOrderV3("status");
     $AC->addOrderV3("name");
     #$AC->setLimitV3(10);
     while ($S = $AC->getNextEntry()) {
         if ($S->A("cover") != "" and trim($S->A("coverThumb")) == "") {
             $S->changeA("coverThumb", DBImageGUI::stringifyDataS("image/png", DBImageGUI::getData($S->A("cover")), 150, 220));
             $S->saveMe(true, false);
         }
         #$ACF = anyC::get("Folge", "SerieID", $S->getID());
         #$ACF->setFieldsV3(array("COUNT(*) AS anzahl"));
         #$Folgen = $ACF->getNextEntry();
         $ACF = anyC::get("Folge", "SerieID", $S->getID());
         $ACF->addAssocV3("TIMESTAMP(airDate)", ">=", date("Y-m-d"));
         $ACF->addOrderV3("airDate", "ASC");
         $ACF->setLimitV3(1);
         #$ACF->setFieldsV3(array("TIMESTAMP(airDate) AS ts"));
         $next = $ACF->getNextEntry();
         //$imgData = DBImageGUI::resizeMax(DBImageGUI::getData($S->A("cover")), 150, 221);
         $html .= "<div style=\"vertical-align:top;display:inline-block;width:33%;margin-bottom:2%;\">\n\t\t\t\t<img style=\"float:left;margin-right:20px;width:150px;height:220px;margin-bottom:5px;\" src=\"./index.php?D=trinityDB/Serien&M=getCover&P0=" . $S->A("SerieID") . "\" />\n\t\t\t\t<div>\n\t\t\t\t\t<h2 style=\"margin-top:0px;padding-top:0px;\">" . $S->A("name") . "</h2>\n\t\t\t\t\t" . ($next != null ? "<p>Nächste Folge:<br />" . Util::CLDateParserL(strtotime($next->A("airDate"))) . "</p>" : "") . "\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     return $html;
 }
Ejemplo n.º 2
0
 public function downloadTrashExport()
 {
     $json = file_get_contents("http://www.awv-nordschwaben.de/WebService/AWVService.svc/getData/00000000-0000-0000-0000-000000001190");
     header("Content-Type: text/plain");
     header("Content-Disposition: attachment; filename=\"Tonnen.txt\"");
     #echo "<pre style=\"font-size:10px;\">";
     $data = json_decode($json);
     $zaehler = array();
     foreach ($data->calendar as $day) {
         if ($day->fr == "") {
             continue;
         }
         if ($day->dt < date("Ymd")) {
             continue;
         }
         #print_r($day);
         $tag = Util::parseDate("de_DE", substr($day->dt, 6) . "." . substr($day->dt, 4, 2) . "." . substr($day->dt, 0, 4));
         $tonnen = array();
         foreach ($day->fr as $k => $T) {
             if ($T == "PT") {
                 $tonnen[] = "3";
             }
             if ($T == "RM") {
                 $tonnen[] = "1";
             }
             if ($T == "GS") {
                 $tonnen[] = "2";
             }
             if ($T == "BT") {
                 $tonnen[] = "5";
             }
         }
         for ($i = 0; $i < 3; $i++) {
             if (!isset($tonnen[$i])) {
                 $tonnen[$i] = 0;
             }
         }
         $D = new Datum($tag);
         $D->setToMonth1st();
         if (!isset($zaehler[date("Ym", $D->time())])) {
             $zaehler[date("Ym", $D->time())] = 0;
         }
         $zaehler[date("Ym", $D->time())]++;
         echo date("Ymd", $D->time()) . "_0000|101/" . $zaehler[date("Ym", $D->time())] . "|" . implode("#", $tonnen) . "#" . Util::CLDateParserL($tag) . "\r\n";
         $name = "";
         if ($name == "") {
             continue;
         }
     }
     #echo "</pre>";
 }
Ejemplo n.º 3
0
 public function getTitle()
 {
     if ($this->ansicht == "monat") {
         return "Monat " . Util::CLMonthName(date("m", $this->current->time())) . date(" Y", $this->current->time());
     }
     if ($this->ansicht == "woche") {
         return date("W", $this->current->time()) . ". Woche " . date("Y", $this->current->time() + 6 * 24 * 3600);
     }
     if ($this->ansicht == "tag") {
         return Util::CLDateParserL($this->current->time(), "load");
     }
     if ($this->ansicht == "jahr") {
         return "Jahr " . date("Y", $this->current->time());
     }
 }
Ejemplo n.º 4
0
 public function loadDetails()
 {
     echo $this->getHTML($this->ID, "window");
     return;
     $this->setParser("TodoFromDay", "Util::nothingParser");
     $this->setParser("TodoFromTime", "Util::nothingParser");
     $this->setParser("TodoTillDay", "Util::nothingParser");
     $this->setParser("TodoTillTime", "Util::nothingParser");
     $this->loadMe();
     $head = "<div id=\"TodoDetailsHandler{$this->ID}\" class=\"backgroundColor1 cMHeader\">Detailansicht ToDo \"" . $this->A->TodoName . "\"</div>";
     try {
         $T = new mTeilnehmerGUI();
         $T->classID = $this->ID;
         $T->className = "Todo";
         $T->addAssocV3("TeilnehmerTodoID", "=", $this->ID);
         $T->addJoinV3("User", "TeilnehmerUserID", "=", "UserID");
         $T->addOrderV3("TeilnehmerTeamID");
         $table = "\n\t\t\t<table style=\"width:100%;border:0px;\">\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col />\n\t\t\t\t</colgroup>";
         $teilnehmerID = 0;
         $teilnehmerStatus = -1;
         $cu = $_SESSION["S"]->getCurrentUser()->getID();
         while ($s = $T->getNextEntry()) {
             if ($s->getA()->TeilnehmerUserID == $cu) {
                 $teilnehmerID = $s->getID();
                 $teilnehmerStatus = $s->getA()->TeilnehmerStatus;
             }
             $table .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td style=\"padding-left:0px;padding-top:0px;\">" . $s->getA()->name . "</td>\n\t\t\t\t</tr>";
         }
         $table .= "\n\t\t\t</table>";
     } catch (ClassNotFoundException $e) {
         $table = "";
     }
     $t = new HTMLTable(2, "Detailansicht ToDo \"" . $this->A->TodoName . "\"");
     $t->addColStyle(1, "text-align:right;");
     $t->addColStyle(1, "width:110px;");
     #<input class=\"multiEditInput2\" onfocus=\"oldValue = this.value;\" onblur=\"if(oldValue != this.value) saveMultiEditInput('Posten','".$t->getID()."','preis');\" value=\"$ta->preis\" id=\"preisID".$t->getID()."\" type=\"text\" onkeyup=\"updateEKs('".$t->getID()."');\" onkeydown=\"if(event.keyCode == 13) saveMultiEditInput('Posten','".$t->getID()."','preis');\"  />
     if ($teilnehmerID != 0) {
         $st = $this->getStatus();
         $o = "";
         foreach ($st as $k => $v) {
             $o .= "<option " . ($k == $this->A->TodoStatus ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
         }
         $status = "<select id=\"TodoStatusID{$this->ID}\" onchange=\"saveMultiEditInput('Todo','" . $this->getID() . "','TodoStatus');\">{$o}</select>";
     } else {
         $status = $this->getStatus($this->A->TodoStatus);
     }
     $t->addRow(array("Priorität:", $this->getPriorities($this->A->TodoPriority)));
     $t->addRow(array("Status:", $status));
     if ($teilnehmerID != 0) {
         $percent = "\n\t\t\t<select id=\"TodoPercentID{$this->ID}\" onchange=\"ToDo.onChange();\">";
         for ($i = 0; $i <= 100; $i += 5) {
             $percent .= "\n\t\t\t\t<option " . ($this->A->TodoPercent == $i ? "selected=\"selected\"" : "") . " value=\"{$i}\">{$i} %</option>";
         }
         $percent .= "\n\t\t\t</select>\n\t\t\t<input type=\"hidden\" id=\"TodoID\" value=\"{$this->ID}\" />";
         /*<input type=\"text\" readonly=\"readonly\" id=\"TodoPercentID$this->ID\" value=\"{$this->A->TodoPercent}\" style=\"width:30px;float:right;text-align:right;margin-right:13px;\" />
         			
         			<div id=\"prozentSlider$this->ID\" style=\"height:19px;width:4px;background-color:black;cursor:move;margin-bottom:-17px;\"></div>
         			<div id=\"prozentTrack$this->ID\" style=\"width:80%;height:15px;\" class=\"backgroundColor1\" />";
         		*/
     } else {
         $percent = $this->A->TodoPercent;
     }
     $t->addRow(array("Prozent:", $percent));
     if ($this->A->TodoDescription != "") {
         $t->addRow("");
         $t->addRowClass("backgroundColor0");
         $t->addRow(array("Beschreibung:", nl2br($this->A->TodoDescription)));
     }
     $t->addRow("");
     $t->addRowClass("backgroundColor0");
     $t->addRow(array("Beginn am:", Util::CLDateParserL($this->A->TodoFromDay)));
     $t->addRow(array("Fällig bis:", Util::CLDateParserL($this->A->TodoTillDay)));
     $t->addRow("");
     $t->addRowClass("backgroundColor0");
     echo $t->getHTML();
 }