Example #1
0
 public function saveMe($checkUserData = true, $output = false)
 {
     if ($this->A("SystemType") == "ip") {
         $data = "\nhostname\nclientid\npersistent\noption rapid_commit\n\noption domain_name_servers, domain_name, domain_search, host_name\noption classless_static_routes\noption ntp_servers\nrequire dhcp_server_identifier\n\nslaac private\n\nnohook lookup-hostname\n\ninterface eth0\nstatic ip_address=" . $this->A("SystemSetting1") . "/24\nstatic routers=" . $this->A("SystemSetting3") . "\nstatic domain_name_servers=" . $this->A("SystemSetting4") . "\n";
         echo shell_exec("echo '{$data}' | sudo tee /etc/dhcpcd.conf 2>&1");
     }
     parent::saveMe($checkUserData, $output);
 }
Example #2
0
 function saveMe($checkUserData = true, $output = false)
 {
     $AC = anyC::get("poolSteuerung", "poolSteuerungTyp", $this->A("poolSteuerungTyp"));
     $AC->addAssocV3("poolSteuerungID", "!=", $this->getID());
     $S = $AC->n();
     if ($S !== null) {
         Red::errorD("Jeder Steuerungstyp darf maximal einmal angelegt werden.");
     }
     return parent::saveMe($checkUserData, $output);
 }
Example #3
0
 function saveMe($checkUserData = true, $output = false)
 {
     parent::saveMe($checkUserData, false);
     $_SESSION["DBData"] = $_SESSION["S"]->getDBData();
     if (PHYNX_MAIN_STORAGE == "MySQL") {
         $DB = new DBStorage();
     } else {
         $DB = new DBStorageU();
     }
     Red::messageSaved();
 }
Example #4
0
 function saveMe($checkUserData = true, $output = false)
 {
     $O = new Einkaufszettel($this->getID());
     if ($O->A("EinkaufszettelBought") == "0" and $this->A("EinkaufszettelBought") == "1") {
         $this->changeA("EinkaufszettelBoughtTime", $this->hasParsers ? Util::CLDateTimeParser(time()) : time());
     }
     if ($O->A("EinkaufszettelBought") == "1" and $this->A("EinkaufszettelBought") == "0") {
         $this->changeA("EinkaufszettelBoughtTime", "");
     }
     parent::saveMe($checkUserData, $output);
 }
Example #5
0
 function saveMe($checkUserData = true, $output = false)
 {
     if ($this->A("ContentImage") != "") {
         $path = Util::getRootPath() . "specifics/" . $this->A("ContentImage");
         $image = new Imagick($path);
         $imageSmall = Util::getRootPath() . "specifics/" . str_replace(basename($this->A("ContentImage")), "small/" . basename($this->A("ContentImage")), $this->A("ContentImage"));
         $imageBig = Util::getRootPath() . "specifics/" . str_replace(basename($this->A("ContentImage")), "big/" . basename($this->A("ContentImage")), $this->A("ContentImage"));
         $image->resizeImage(0, 550, Imagick::FILTER_LANCZOS, 1);
         if (!$image->writeImage($imageBig)) {
             Red::alertD("Das große Vorschaubild kann nicht erstellt werden!");
         }
         $image->resizeImage(150, 0, Imagick::FILTER_LANCZOS, 1);
         if (!$image->writeImage($imageSmall)) {
             Red::alertD("Das kleine Vorschaubild kann nicht erstellt werden!");
         }
         $image->destroy();
     }
     parent::saveMe($checkUserData, $output);
 }
Example #6
0
 function saveMe($checkUserData = true, $output = true)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     $ps = mUserdata::getPluginSpecificData("Adressen");
     if (isset($ps["pluginSpecificCanUse1xAdresse"]) and $this->A->AuftragID == -1) {
         die("Speichern nicht möglich!");
     }
     $this->changeA("lastChange", time());
     if ($this->A("AuftragID") != -1 and ($this->A("type") == "auftragsAdresse" or $this->A("type") == "default")) {
         $Auftrag = new Auftrag($this->A("AuftragID"));
         $Auftrag->updateAdressID($this->getID());
     }
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     return Aspect::joinPoint("after", $this, __METHOD__, parent::saveMe($checkUserData, $output));
     // </editor-fold>
 }
Example #7
0
 public function saveMe($checkUserData = true, $output = false, $update = true)
 {
     $old = new Todo($this->getID());
     $old->loadMe();
     #$fromDay = date("Y-m-d", Util::CLDateParser($this->A("TodoFromDay"), "store"));
     #$fromTime = Util::formatTime("de_DE", Util::CLTimeParser($this->A("TodoFromTime"), "store"));
     #die($this->getID());
     if ($update) {
         $this->changeA("TodoLastChange", time());
         $this->changeA("TodoReminded", "0");
     }
     #$name = $this->getOwnerObject()->getCalendarTitle();
     if ($this->A("TodoAllDay")) {
         $this->changeA("TodoFromTime", Util::CLTimeParser(0));
         $this->changeA("TodoTillTime", Util::CLTimeParser(0));
     }
     if ($this->A("TodoRepeatWeekOfMonth") > 0 and $this->A("TodoRepeatWeekOfMonth") != 127) {
         $D = new Datum($this->hasParsers ? Util::CLDateParser($this->A("TodoFromDay"), "store") : $this->A("TodoFromDay"));
         $nthDay = $D->getNthDayOfMonth();
         if ($nthDay > 4) {
             $nthDay = 4;
         }
         $this->changeA("TodoRepeatWeekOfMonth", $nthDay);
     }
     if ($this->A("TodoClass") != "" and $this->A("TodoClass") != "Kalender" and $this->A("TodoName") == "") {
         $this->changeA("TodoName", $this->getOwnerObject()->getCalendarTitle());
     }
     if (Session::isPluginLoaded("mAufgabe") and ($this->A("TodoType") == 3 or $this->A("TodoType") == 4 or $this->A("TodoType") == 5) and $this->A("TodoUserID") > 0) {
         $F = new Factory("Aufgabe");
         $F->sA("AufgabeByClass", "Todo");
         $F->sA("AufgabeByClassID", $this->getID());
         $E = $F->exists(true);
         if (!$E) {
             $F->sA("AufgabeUserID", $this->A("TodoUserID"));
             $F->sA("AufgabeText", "Bericht für Termin '" . $this->A("TodoName") . "' eintragen");
             $F->sA("AufgabeCreated", time());
             if ($this->A("TodoDoneTime") > 0) {
                 $F->sA("AufgabeStatus", "5");
                 $F->sA("AufgabeDone", time());
             }
             if ($this->hasParsers) {
                 $F->sA("AufgabeUntil", Util::CLDateParser($this->A("TodoFromDay"), "store"));
                 $F->sA("AufgabeUhrzeitVon", Util::CLTimeParser($this->A("TodoTillTime"), "store"));
             } else {
                 $F->sA("AufgabeUntil", $this->A("TodoFromDay"));
                 $F->sA("AufgabeUhrzeitVon", $this->A("TodoTillTime"));
             }
             $F->store();
         } else {
             $E->changeA("AufgabeText", "Bericht für Termin '" . $this->A("TodoName") . "' eintragen");
             if ($this->hasParsers) {
                 $E->changeA("AufgabeUntil", Util::CLDateParser($this->A("TodoFromDay"), "store"));
                 $E->changeA("AufgabeUhrzeitVon", Util::CLTimeParser($this->A("TodoTillTime"), "store"));
             } else {
                 $E->changeA("AufgabeUntil", $this->A("TodoFromDay"));
                 $E->changeA("AufgabeUhrzeitVon", $this->A("TodoTillTime"));
             }
             if ($this->A("TodoDoneTime") > 0) {
                 $E->changeA("AufgabeStatus", "5");
                 $E->changeA("AufgabeDone", time());
             }
             $E->saveMe();
         }
     }
     parent::saveMe($checkUserData, false);
     if (Session::isPluginLoaded("mGoogle") and $this->updateGoogle) {
         $KE = mTodoGUI::getCalendarDetails("Todo", $this->getID());
         if ($this->A("TodoUserID") == Session::currentUser()->getID()) {
             if ($old->A("TodoUserID") == $this->A("TodoUserID")) {
                 Google::calendarUpdateEvent(mTodoGUI::getCalendarDetails("Todo", $this->getID()));
             } else {
                 Google::calendarDeleteEvent($KE);
                 #"Todo", $this->getID());
                 Google::calendarCreateEvent($KE);
             }
         } else {
             Google::calendarDeleteEvent($KE);
             #"Todo", $this->getID());
             Google::calendarCreateEvent($KE, $this->A("TodoUserID"));
         }
     }
 }