function __construct() { parent::__construct(); $this->loadPlugin("ubiquitous", "Kalender"); $this->loadPlugin("ubiquitous", "Todo"); addClassPath(dirname(__FILE__)); $this->loggedIn = Session::currentUser() != null; }
function classes() { #registerClassPath("Seminar", Util::getRootPath()."MMDB/Seminare/Seminar.class.php"); #registerClassPath("SeminarGUI", Util::getRootPath()."MMDB/Seminare/SeminarGUI.class.php"); #registerClassPath("STeilnehmer", Util::getRootPath()."MMDB/Seminare/STeilnehmer.class.php"); registerClassPath("Bestellung", Util::getRootPath() . "ubiquitous/Bestellungen/Bestellung.class.php"); addClassPath(Util::getRootPath() . "MMDB/Seminare/"); addClassPath(Util::getRootPath() . "open3A/Adressen/"); addClassPath(Util::getRootPath() . "open3A/Kunden/"); addClassPath(Util::getRootPath() . "open3A/Auftraege/"); addClassPath(Util::getRootPath() . "open3A/Stammdaten/"); addClassPath(Util::getRootPath() . "open3A/Textbausteine/"); addClassPath(Util::getRootPath() . "open3A/Kategorien/"); addClassPath(Util::getRootPath() . "open3A/Brief/"); }
public function updateAllTables() { $apps = Applications::getList(); $apps["plugins"] = "plugins"; #$apps["plugins"] = "ubiquitous"; $currentPlugins = $_SESSION["CurrentAppPlugins"]; $return = array(); foreach ($apps as $app) { $AP = $_SESSION["CurrentAppPlugins"] = new AppPlugins($app); $AP->scanPlugins("plugins"); $p = array_flip($AP->getAllPlugins()); #Applications::i()->setActiveApplication($app); //or the autoloader won't work; yes, it does because of addClassPath later on foreach ($p as $key => $value) { if ($key == "CIs") { continue; } if ($key == "mInstallation") { continue; } $return[$value] = "Keine Collection-Klasse!"; addClassPath(Util::getRootPath() . $app . "/" . $AP->getFolderOfPlugin($key) . "/"); try { $c = new $key(); } catch (ClassNotFoundException $e) { $key2 = $key . "GUI"; try { $c = new $key2(); } catch (ClassNotFoundException $e2) { continue; } } if (!$c->checkIfMyDBFileExists()) { $return[$value] = "Keine DB-Datei!"; } else { if ($c->checkIfMyTableExists()) { $return[$value] = $c->checkMyTables(true); } else { #if(!$c->checkIfMyTableExists()) $return[$value] = $c->createMyTable(true); } } } } mUserdata::setUserdataS("DBVersion", Phynx::build(), "", -1); $_SESSION["CurrentAppPlugins"] = $currentPlugins; return $return; }
<?php #session_name("phim_".sha1(__FILE__)); define("PHYNX_NO_SESSION_RELOCATION", true); require "../../system/connect.php"; addClassPath(Util::getRootPath() . "ubiquitous/phim"); $username = filter_input(INPUT_GET, "username"); $password = sha1(filter_input(INPUT_GET, "password")); if (filter_input(INPUT_GET, "token")) { $AC = anyC::get("phimUser", "phimUserToken", filter_input(INPUT_GET, "token")); $AC->addAssocV3("phimUserActive", "=", "1"); $U = $AC->n(); if ($U != null) { $AnyUser = anyC::getFirst("User"); $Us = new Users(); $login = $Us->doLogin(array("loginUsername" => $AnyUser->A("username"), "loginSHAPassword" => $AnyUser->A("SHApassword"), "loginPWEncrypted" => 1)); $user = new User($U->A("phimUserUserID")); $user->loadMe(false); $username = $user->A("username"); $password = $user->A("SHApassword"); } } $U = new Users(); $login = $U->doLogin(array("loginUsername" => $username, "loginSHAPassword" => $password, "loginPWEncrypted" => 1, "anwendung" => "lightCRM")); if (!$login) { emoFatalError("Sorry, ich kenne dich nicht!", "Login fehlgeschlagen! Vermutlich sind die Zugangsdaten falsch.", "Login fehlgeschlagen", false); } $p = new mphimGUI(); $p->chatPopup("../");
function __construct() { addClassPath(dirname(__FILE__)); addClassPath(Util::getRootPath() . "trinityDB/JD"); }
public static function stamp($args, $die = true) { #if(strtolower($args["P0"]) == "303005f7b4") # die('{"status":"command", "action":"reload"}'); if (!isset($_SESSION["BPS"])) { $_SESSION["BPS"] = new BackgroundPluginState(); } addClassPath(Util::getRootPath() . "personalKartei/Zeiterfassung/"); addClassPath(Util::getRootPath() . "personalKartei/Personal/"); addClassPath(Util::getRootPath() . "personalKartei/ObjekteL/"); #if(file_exists(Util::getRootPath()."personalKartei/Schichten/")) # addClassPath(Util::getRootPath()."personalKartei/Schichten/"); addClassPath(Util::getRootPath() . "open3A/Kategorien/"); $CCP = new CCPage(); $CCP->loadPlugin("personalKartei", "Schichten", true); $T = anyC::getFirst("ZETerminal", "ZETerminalID", $args["P1"]); if (!$T) { if ($die) { die('{"status":"error", "message":"Unbekanntes Terminal"}'); } else { return; } } $CT = FileStorage::getFilesDir() . "ChipTrans.csv"; if ($args["P3"] and $args["P4"] > 0) { $P = new Personal($args["P4"]); if (trim($P->A("PersonalChipNummer")) == "") { $P->changeA("PersonalChipNummer", trim(strtolower($args["P0"]))); $P->saveMe(); } else { file_put_contents($CT, "{$args['P4']}:" . trim(strtolower($args["P0"])) . "\n", FILE_APPEND); } } $A = new stdClass(); $Date = new Datum(); $Date->subDay(); $Date->addDay(); $A->ChipID = trim(strtolower($args["P0"])); $A->Date = $Date->time(); $A->Time = Util::parseTime("de_DE", date("H:i", !isset($args["P5"]) ? time() : $args["P5"])); $A->Type = $args["P2"]; $A->Mode = ""; $A->TerminalID = $args["P1"]; try { $ok = ZEData::addTime($A); } catch (Exception $e) { try { $hex = str_pad(trim(strtolower(dechex($args["P0"]))), 10, "0", STR_PAD_LEFT); $A->ChipID = $hex; $ok = ZEData::addTime($A); } catch (Exception $e) { try { if (!$args["P3"]) { throw new Exception("Chip unknown", 100); } if (!file_exists($CT)) { file_put_contents($CT, ""); } $trans = file_get_contents($CT); $found = false; foreach (explode("\n", $trans) as $line) { $line = trim($line); $ex = explode(":", $line); if (trim(strtolower($ex[1])) != trim(strtolower($args["P0"]))) { continue; } $P = new Personal($ex[0]); $A->ChipID = $P->A("PersonalChipNummer"); $found = true; } if (!$found) { throw new Exception("Learn", 200); } #if(!$found) # throw new Exception ("Chip unknown", 100); $ok = ZEData::addTime($A); } catch (Exception $e) { switch ($e->getCode()) { case 100: try { $F = new Factory("ZETerminalFail"); $F->sA("ZETerminalFailTime", time()); $F->sA("ZETerminalFailData", json_encode($args)); $F->sA("ZETerminalFailZETerminalID", $args["P1"]); $F->store(); } catch (Exception $e) { } if ($die) { die('{"status":"error", "message":"Unbekannter Chip"}'); } else { return; } break; case 200: $AC = anyC::get("Personal", "isDeleted", "0"); $AC->setFieldsV3(array("CONCAT(nachname, ' ', vorname) AS name")); $AC->addAssocV3("TRIM(CONCAT(nachname, vorname))", "!=", ""); $AC->addOrderV3("nachname"); $AC->addOrderV3("vorname"); $knownPID = array(); $file = file($CT); foreach ($file as $line) { $line = trim($line); $ex = explode(":", $line); $knownPID[$ex[0]] = true; } $array = array(); while ($A = $AC->n()) { if (isset($knownPID[$A->getID()])) { continue; } $subArray = array(); foreach ($A->getA() as $key => $value) { $subArray[$key] = $value; } $array[] = $subArray; } if ($die) { die('{"status":"learn", "message":' . json_encode($array, defined("JSON_UNESCAPED_UNICODE") ? JSON_UNESCAPED_UNICODE : 0) . '}'); } else { return; } break; default: try { $F = new Factory("ZETerminalFail"); $F->sA("ZETerminalFailTime", time()); $F->sA("ZETerminalFailData", $e->getMessage()); $F->sA("ZETerminalFailZETerminalID", $args["P1"]); $F->store(); } catch (Exception $e) { } if ($die) { die('{"status":"error", "message":"' . $e->getMessage() . '"}'); } else { return; } } } } } if ($args["P2"] == "G") { $AC = anyC::get("ZEData", "ZEDataPersonalID", $ok["Personal"]->getID()); $AC->addAssocV3("ZEDataType", "=", "K"); $AC->addAssocV3("ZEDataDate + ZEDataTime", ">", time() - 3600 * 13); $AC->addAssocV3("ZEDataDate + ZEDataTime", "<", time()); $AC->addAssocV3("ZEDataIsDeleted", "=", "0"); $AC->addOrderV3("ZEDataDate + ZEDataTime", "DESC"); $AC->setLimitV3("1"); $Kommen = $AC->getNextEntry(); if ($Kommen != null) { $Gehen = $ok["ZEData"]; $T = new ZETerminal($args["P1"]); $AC2 = anyC::get("PZuO", "ObjektLID", $T->A("ZETerminalObjektLID")); $AC2->addAssocV3("PersonalID", "=", $Kommen->A("ZEDataPersonalID")); $PZuO = $AC2->n(); if ($PZuO !== null) { $worked = $Gehen->A("ZEDataDate") + $Gehen->A("ZEDataTime") - ($Kommen->A("ZEDataDate") + $Kommen->A("ZEDataTime")); $AZ = mZEArbeitsZeit::getArbeitszeiten($PZuO->getID(), time()); if (isset($AZ[0])) { $hasTo = $AZ[0]->A("ZEArbeitsZeitEnde") - $AZ[0]->A("ZEArbeitsZeitStart"); if ($worked > 0 and $worked / $hasTo > 0.9) { # AND $hasTo / $worked < 1.15){ $DE = $ok["ZEData"]; $DE->changeA("ZEDataPause", $AZ[0]->A("ZEArbeitsZeitMittag")); $DE->saveMe(false, false); } } } } } #303046a1b7 BPS::setProperty("ZEAuswertung", "objektLID", $T->A("ZETerminalObjektLID")); BPS::setProperty("ZEAuswertung", "personalID", $ok["Personal"]->getID()); BPS::setProperty("ZEAuswertung", "month", date("Ym")); #$ZEA = new ZEAuswertung($A->ChipID); #$ZEA->debug = false; #$current = $ZEA->getContent(); if ($die) { die('{"status":"OK", "message": "' . addslashes($ok["Personal"]->A("vorname") . " " . $ok["Personal"]->A("nachname")) . '", "details": ""}'); } else { return; } }
function classes() { registerClassPath("Bestellung", Util::getRootPath() . "ubiquitous/Bestellungen/Bestellung.class.php"); addClassPath(Util::getRootPath() . "MMDB/Seminare/"); }
require_once $absolutePathToPhynx . "classes/backend/File.class.php"; require_once $absolutePathToPhynx . "plugins/Files/mFile.class.php"; require_once $absolutePathToPhynx . "classes/backend/FileStorage.class.php"; require_once $absolutePathToPhynx . "classes/frontend/HTMLInput.class.php"; /*require_once $absolutePathToPhynx."trinityDB/RSSFilter/RSSFilter.class.php"; require_once $absolutePathToPhynx."trinityDB/RSSFilter/iFeedFilter.class.php"; require_once $absolutePathToPhynx."trinityDB/RSSFilter/FeedEntry.class.php"; require_once $absolutePathToPhynx."trinityDB/RSSFilter/FeedFilterSJorg.class.php"; require_once $absolutePathToPhynx."trinityDB/RSSFilter/FeedFilter1DDL.class.php"; require_once $absolutePathToPhynx."trinityDB/RSSFilter/FeedFilterRM.class.php"; require_once $absolutePathToPhynx."trinityDB/JD/JD.class.php"; require_once $absolutePathToPhynx."trinityDB/JD/JDownload.class.php";*/ addClassPath($absolutePathToPhynx . "trinityDB/Serien/"); addClassPath($absolutePathToPhynx . "trinityDB/RSSFilter/"); addClassPath($absolutePathToPhynx . "trinityDB/Incoming/"); addClassPath($absolutePathToPhynx . "trinityDB/JD/"); $RSF = new RSSFilter($_GET["RSSFilterID"]); $Adapter = $RSF->A("RSSFilterAdapter"); $Adapter = new $Adapter(); if (isset($_GET["manualMultiDL"])) { $added = ""; $ILinks = array(); $ILinks[] = new HTMLInput("manualMultiDL", "hidden", "true"); $ILinks[] = new HTMLInput("RSSFilterID", "hidden", $_GET["RSSFilterID"]); for ($i = 1; $i < 2; $i++) { $ILink = new HTMLInput("manualMultiDL{$i}", "textarea"); $ILink->id("manualMultiDL{$i}"); $ILink->style("border:1px solid grey;width:400px;padding:2px;margin-bottom:5px;height:200px;"); $ILinks[] = $ILink; if (isset($_GET["manualMultiDL{$i}"]) and $_GET["manualMultiDL{$i}"] != "") { $exLinks = explode("\n", $_GET["manualMultiDL{$i}"]);
public static function stamp($args) { #if(strtolower($args["P0"]) == "303005f7b4") # die('{"status":"command", "action":"reload"}'); if (!isset($_SESSION["BPS"])) { $_SESSION["BPS"] = new BackgroundPluginState(); } addClassPath(Util::getRootPath() . "personalKartei/Zeiterfassung/"); addClassPath(Util::getRootPath() . "personalKartei/Personal/"); addClassPath(Util::getRootPath() . "personalKartei/ObjekteL/"); addClassPath(Util::getRootPath() . "open3A/Kategorien/"); $T = anyC::getFirst("ZETerminal", "ZETerminalID", $args["P1"]); if (!$T) { die('{"status":"error", "message":"Unbekanntes Terminal"}'); } $A = new stdClass(); $Date = new Datum(); $Date->subDay(); $Date->addDay(); $A->ChipID = trim(strtolower($args["P0"])); $A->Date = $Date->time(); $A->Time = Util::parseTime("de_DE", date("H:i", time())); $A->Type = $args["P2"]; $A->Mode = ""; $A->TerminalID = $args["P1"]; try { $ok = ZEData::addTime($A); } catch (Exception $e) { try { $A->ChipID = trim(strtolower(dechex($args["P0"]))); $ok = ZEData::addTime($A); } catch (Exception $e) { switch ($e->getCode()) { case 100: die('{"status":"error", "message":"Unbekannter Chip"}'); break; default: die('{"status":"error", "message":"' . $e->getMessage() . '"}'); } } } if ($args["P2"] == "G") { $AC = anyC::get("ZEData", "ZEDataChipID", $A->ChipID); $AC->addAssocV3("ZEDataType", "=", "K"); $AC->addAssocV3("ZEDataDate + ZEDataTime", ">", time() - 3600 * 13); $AC->addOrderV3("ZEDataID", "DESC"); $AC->addAssocV3("ZEDataIsDeleted", "=", "0"); $AC->setLimitV3("1"); $D = $AC->getNextEntry(); if ($D != null) { $pause = ZEAuswertung::calcPause($D, $ok["ZEData"]); if ($pause !== null) { $DE = $ok["ZEData"]; $DE->changeA("ZEDataPause", $pause); $DE->saveMe(false, false); } } } #303046a1b7 BPS::setProperty("ZEAuswertung", "objektLID", $T->A("ZETerminalObjektLID")); BPS::setProperty("ZEAuswertung", "personalID", $ok["Personal"]->getID()); BPS::setProperty("ZEAuswertung", "month", date("Ym")); #$ZEA = new ZEAuswertung($A->ChipID); #$ZEA->debug = false; #$current = $ZEA->getContent(); die('{"status":"OK", "message": "' . addslashes($ok["Personal"]->A("vorname") . " " . $ok["Personal"]->A("nachname")) . '", "details": ""}'); #Stunden '.Util::CLMonthName(date("m")).': '.Util::formatSeconds($current["totalHours"][1], false).' }
private static function loadClasses() { addClassPath(Util::getRootPath() . "personalKartei/Zeiterfassung/"); addClassPath(Util::getRootPath() . "personalKartei/Personal/"); addClassPath(Util::getRootPath() . "personalKartei/ObjekteL/"); addClassPath(Util::getRootPath() . "open3A/Kategorien/"); }