当前位置: 首页>>代码示例>>PHP>>正文


PHP anyC::getFirst方法代码示例

本文整理汇总了PHP中anyC::getFirst方法的典型用法代码示例。如果您正苦于以下问题:PHP anyC::getFirst方法的具体用法?PHP anyC::getFirst怎么用?PHP anyC::getFirst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在anyC的用法示例。


在下文中一共展示了anyC::getFirst方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: go

function go($message)
{
    $S = anyC::getFirst("Websocket", "WebsocketUseFor", "fheME");
    $realm = $S->A("WebsocketRealm");
    spl_autoload_unregister("phynxAutoloader");
    require Util::getRootPath() . 'PWS/Thruway/vendor/autoload.php';
    if (!class_exists("ClientPhimAuthenticator", false)) {
        Thruway\Logging\Logger::set(new Psr\Log\NullLogger());
        class ClientPhimAuthenticator implements Thruway\Authentication\ClientAuthenticationInterface
        {
            private $authID;
            private $key;
            private $realm;
            function __construct($realm, $authID, $key)
            {
                $this->authID = $authID;
                $this->key = $key;
                $this->realm = $realm;
            }
            public function getAuthId()
            {
                return $this->authID;
            }
            public function setAuthId($authid)
            {
            }
            public function getAuthMethods()
            {
                return ["phimAuth_" . $this->realm];
            }
            public function getAuthenticateFromChallenge(Thruway\Message\ChallengeMessage $msg)
            {
                return new \Thruway\Message\AuthenticateMessage($this->key);
            }
        }
    }
    $connection = new \Thruway\Connection(["realm" => $realm, "url" => "ws" . ($S->A("WebsocketSecure") ? "s" : "") . "://" . $S->A("WebsocketServer") . ":" . $S->A("WebsocketServerPort") . "/"]);
    $client = $connection->getClient();
    $client->addClientAuthenticator(new ClientPhimAuthenticator($realm, "phimUser", $S->A("WebsocketToken")));
    $connection->on('open', function (\Thruway\ClientSession $session) use($connection, $message) {
        $session->publish('it.furtmeier.fheme', [json_encode($message, JSON_UNESCAPED_UNICODE)], [], ["acknowledge" => true])->then(function () use($connection) {
            $connection->close();
        }, function ($connection) {
            $connection->close();
        });
    });
    $connection->open();
    #spl_autoload_unregister(array("ThruwayLoader", "alienClassLoader"));
    #spl_autoload_register("phynxAutoloader");
}
开发者ID:nemiah,项目名称:fheME,代码行数:50,代码来源:websocket.php

示例2: newMe

 function newMe($checkUserData = true, $output = false)
 {
     $S = anyC::getFirst("poolSteuerung", "poolSteuerungTyp", $this->A("poolSteuerungTyp"));
     if ($S !== null) {
         Red::errorD("Jeder Steuerungstyp darf maximal einmal angelegt werden.");
     }
     return parent::newMe($checkUserData, $output);
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:8,代码来源:poolSteuerung.class.php

示例3: getServer

 public function getServer()
 {
     try {
         $S = anyC::getFirst("Websocket");
     } catch (Exception $e) {
         die("nil");
     }
     if ($S == null) {
         die("nil");
     }
     echo $S->A("WebsocketServer") . ":" . $S->A("WebsocketServerPort");
 }
开发者ID:nemiah,项目名称:fheME,代码行数:12,代码来源:mWebsocketGUI.class.php

示例4: backgroundDelete

 function backgroundDelete($DeviceID)
 {
     $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID);
     $d = json_decode($O->A("fheOverviewDesktop"));
     unset($d->background);
     $O->changeA("fheOverviewDesktop", json_encode($d));
     $O->saveMe();
     echo OnEvent::script("\$j('#wrapper').css('background-image', '');");
 }
开发者ID:nemiah,项目名称:fheME,代码行数:9,代码来源:mfheOverviewGUI.class.php

示例5: handleForm

 function handleForm($valuesAssocArray)
 {
     $this->classes();
     switch ($valuesAssocArray["action"]) {
         case "register":
             $F = new Factory("Adresse");
             $F->sA("firma", $valuesAssocArray["firma"]);
             $F->sA("strasse", $valuesAssocArray["strasse"]);
             $F->sA("nr", $valuesAssocArray["nr"]);
             $F->sA("plz", $valuesAssocArray["plz"]);
             $F->sA("ort", $valuesAssocArray["ort"]);
             $F->sA("email", $valuesAssocArray["userEmail"]);
             //from email
             $F->sA("tel", $valuesAssocArray["tel"]);
             $AdresseID = $F->store(false, false);
             $K = new Kunden();
             $Kappendix = $K->createKundeToAdresse($AdresseID, false, true);
             $Kappendix->changeA("KappendixKontonummer", $valuesAssocArray["kontonummer"]);
             $Kappendix->changeA("KappendixBLZ", $valuesAssocArray["blz"]);
             $Kappendix->changeA("KappendixSameKontoinhaber", "1");
             $KappendixID = $Kappendix->newMe(false);
             $token = sha1($AdresseID . $KappendixID . microtime());
             $F = new Factory("PDFixUser");
             $F->sA("PDFixUserAdresseID", $AdresseID);
             $F->sA("PDFixUserKappendixID", $KappendixID);
             $F->sA("PDFixUserPDFixUserDBID", "0");
             $F->sA("PDFixUserIsActive", "0");
             $F->sA("PDFixUserVorNachname", $valuesAssocArray["userVorNachname"]);
             $F->sA("PDFixUserUsername", $valuesAssocArray["userUsername"]);
             $F->sA("PDFixUserPassword", $valuesAssocArray["userPassword"]);
             $F->sA("PDFixUserEmail", $valuesAssocArray["userEmail"]);
             $F->sA("PDFixUserRate", $valuesAssocArray["zahlungsweise"]);
             $F->sA("PDFixUserRegisteredDate", time());
             $F->sA("PDFixUserToken", $token);
             $F->store(false, false);
             $mail = new htmlMimeMail5();
             $mail->setFrom("info@pdfix.de");
             $mail->setSubject(utf8_decode("PDFix Registrierung ihres Mitarbeiters " . $valuesAssocArray["userVorNachname"]));
             $mail->setText(utf8_decode("Sehr geehrte Damen und Herren,\n \nSie selbst oder Ihr Mitarbeiter/Ihre Mitarbeiterin \n" . $valuesAssocArray["userVorNachname"] . " hat sich soeben bei www.pdfix.de angemeldet. \n \nDer Account wurde angelegt.\n \nIm Anhang finden Sie unsere AGB und den Softwarelizenzvertrag.\nMit der Aktivierung des Accounts werden die AGB und Nutzungsbedingungen\nannerkannt.\n\nSobald die Abbuchungserklärung bei uns eingegangen ist,\nwird der Account innerhalb 24 Std. freigeschalten und\n\"pdfix\" kann dann genutzt werden.\n \nWenn Sie die Kosten übernehmen, dann klicken Sie auf\n\n\nnachstehenden Aktivierungslink.\n\nhttp://" . $_SERVER["HTTP_HOST"] . "" . str_replace("/ubiquitous/CustomerPage/index.php", "/ubiquitous/CustomerPage/?CC=RegistrationPDFix&activate={$token}", $_SERVER["SCRIPT_NAME"]) . "\n \n\nAnsonsten klären Sie bitte die Kostenübernahme mit Ihrem Mitarbeiter ab.\n\n \nMit freundlichen Grüßen\n \nM. Tischler\nGeschäftsführer\nETS-SÜD UG (haftungsbeschränkt)\nDR. Michael Samer Ring 2a\n86609 Donauwörth\nAG Augsburg\nHRB 26204\ninfo@pdfix.de"));
             /*
             Zum Download von pdfix besuchen Sie bitte
             http://www.meine-smn.de und klicken auf \"Login\"
             
             melden Sie sich an mit:
             
             Benutzername: ".$valuesAssocArray["userUsername"]."
             Passwort: ".$valuesAssocArray["userPassword"]."
             
             Bestätigen Sie jeweils am Ende der Seiten die AGB´s und Lizenzbedingungen und
             laden \"pdfix\" down.
             
             Sobald die Abbuchungserklärung bei uns eingegangen ist,
             wird der Account innerhalb 24 Std. freigeschalten,und
             \"pdfix\" kann dann genutzt werden.
             */
             #$mail->setTextCharset("UTF-8");
             #$mail->addAttachment(new fileAttachment(Util::getRootPath()."open3A/PDFix/abbuchungserkl.pdf", "application/pdf"));
             $mail->addAttachment(new fileAttachment(Util::getRootPath() . "../download/Agbs.pdf", "application/pdf"));
             $mail->addAttachment(new fileAttachment(Util::getRootPath() . "../download/Softwarelizenzvertrag.pdf", "application/pdf"));
             if (!$mail->send(array($valuesAssocArray["userEmail"]))) {
                 //from email
                 Red::errorD("Die E-Mail konnte nicht verschickt werden, bitte versuchen Sie es erneut!");
             }
             break;
         case "activate":
             $PU = anyC::getFirst("PDFixUser", "PDFixUserToken", $valuesAssocArray["token"]);
             $PU->changeA("PDFixUserActivatedDate", time());
             $PU->changeA("PDFixUserIsActive", "1");
             $PU->changeA("PDFixUserRate", $valuesAssocArray["zahlungsweise"]);
             $PU->saveMe();
             $mail = new htmlMimeMail5();
             $mail->setFrom("info@pdfix.de");
             $mail->setSubject(utf8_decode("PDFix Registrierung ihres Mitarbeiters " . $valuesAssocArray["userVorNachname"]));
             $mail->setText(utf8_decode("Sehr geehrte Damen und Herren,\n \nIhr Account wurde soeben angelegt.\n \nBenutzername: " . $PU->A("PDFixUserUsername") . "\nPasswort: " . $PU->A("PDFixUserPassword") . "\n \nSobald die Abbuchungserklärung bei uns eingegangen ist,\nwird der Account innerhalb 24 Std. freigeschalten und\n\"pdfix\" kann dann genutzt werden.\n\t\n\nMit freundlichen Grüßen\n \nM. Tischler\nGeschäftsführer\nETS-SÜD UG (haftungsbeschränkt)\nDR. Michael Samer Ring 2a\n86609 Donauwörth\nAG Augsburg\nHRB 26204\ninfo@pdfix.de"));
             /*
             Zum Download von pdfix besuchen Sie bitte
             http://www.meine-smn.de und klicken auf \"Login\"
             
             melden Sie sich an mit:
             
             Bestätigen Sie jeweils am Ende der Seiten die AGB´s und Lizenzbedingungen und
             laden \"pdfix\" down.
             */
             #$mail->setTextCharset("UTF-8");
             if (!$mail->send(array($PU->A("PDFixUserEmail")))) {
                 Red::errorD("Die E-Mail konnte nicht verschickt werden, bitte versuchen Sie es erneut!");
             }
             $Adresse = new Adresse($PU->A("PDFixUserAdresseID"));
             $mail = new htmlMimeMail5();
             $mail->setFrom("info@pdfix.de");
             $mail->setSubject("PDFix Aktivierung");
             $mail->setText(utf8_decode("\nFirma: " . $Adresse->A("firma") . "\nBenutzername: " . $PU->A("PDFixUserUsername") . ""));
             #$mail->setTextCharset("UTF-8");
             if (!$mail->send(array("info@pdfix.de"))) {
                 Red::errorD("Die E-Mail konnte nicht verschickt werden, bitte versuchen Sie es erneut!");
             }
             break;
     }
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:99,代码来源:CCRegistrationPDFix.class.php

示例6: go

 private function go($message, $to)
 {
     $S = anyC::getFirst("Websocket", "WebsocketUseFor", "phim");
     $realm = $S->A("WebsocketRealm");
     spl_autoload_unregister("phynxAutoloader");
     require Util::getRootPath() . 'PWS/Thruway/vendor/autoload.php';
     require_once __DIR__ . '/ClientPhimAuthenticator.php';
     Thruway\Logging\Logger::set(new Psr\Log\NullLogger());
     $connection = new \Thruway\Connection(["realm" => $realm, "url" => "ws" . ($S->A("WebsocketSecure") ? "s" : "") . "://" . $S->A("WebsocketServer") . ":" . $S->A("WebsocketServerPort") . "/"]);
     $client = $connection->getClient();
     $client->addClientAuthenticator(new ClientPhimAuthenticator($realm, "phimUser", $S->A("WebsocketToken")));
     $connection->on('open', function (\Thruway\ClientSession $session) use($connection, $message, $to) {
         $session->publish('it.furtmeier.phim_' . $to, [json_encode($message, JSON_UNESCAPED_UNICODE)], [], ["acknowledge" => true])->then(function () use($connection) {
             $connection->close();
         }, function ($connection) {
             $connection->close();
         });
     });
     $connection->open();
     /*$client = new Thruway\Peer\Client($realm);
     		$client->addClientAuthenticator(new ClientPhimAuthenticator($realm, "phimUser", $S->A("WebsocketToken")));
     		
     		$client->addTransportProvider(new Thruway\Transport\PawlTransportProvider("ws".($S->A("WebsocketSecure") ? "s" : "")."://".$S->A("WebsocketServer").":".$S->A("WebsocketServerPort")."/"));
     
     		$client->on('open', function (Thruway\ClientSession $session) use ($message, $to) {
     
     			$session->publish('it.furtmeier.phim_'.$to, [json_encode($message, JSON_UNESCAPED_UNICODE)], [], ["acknowledge" => true])->then(
     				function () {
     					echo "Publish Acknowledged!\n";
     					die();
     				},
     				function ($error) {
     					// publish failed
     					echo "Publish Error {$error}\n";
     				}
     			);
     
     			//$session->close();
     		});
     
     
     		$client->start();*/
 }
开发者ID:nemiah,项目名称:fheME,代码行数:43,代码来源:phimGUI.class.php

示例7: download

 public function download($link, $logLink = null, $logFilename = "", Serie $Serie = null)
 {
     if (strpos($link, "linksafe.")) {
         $newLocation = get_headers($link, 1);
         $links = $newLocation["Location"];
         $link = null;
         if (is_array($links)) {
             foreach ($links as $k => $l) {
                 if (stripos($l, "https") === 0) {
                     $link = $links[$k];
                 }
             }
             if ($link == null) {
                 $link = $links[0];
             }
         } else {
             $link = $links;
         }
     }
     if (strpos($link, "safeurl.")) {
         $newLocation = get_headers($link, 1);
         if (isset($newLocation["Location"])) {
             $link = $newLocation["Location"][0];
         } else {
             $contentWithLink = file_get_contents($link);
             preg_match_all("/(https:\\/\\/rapidshare[a-zA-Z0-9\\.\\-\\/_#+\\|!]*)/", $contentWithLink, $links);
             $links = array_unique($links[1]);
             $link = $links[0];
             $ex = explode("|", $link);
             $ex[0] = str_replace("/#!download", "/files/", $ex[0]);
             $link = $ex[0] . $ex[2] . "/" . $ex[3];
         }
     }
     if (strpos($link, "canhaz.")) {
         $newLocation = get_headers($link, 1);
         $link = $newLocation["Location"];
         $contentWithLink = file_get_contents($link);
         preg_match_all("/(http:\\/\\/rapidshare[a-zA-Z0-9\\.\\-\\/_#+]*)/", $contentWithLink, $links);
         $links = array_unique($links[1]);
         $link = $links[0];
     }
     $linkOld = $link;
     if ($this->A("JDLinkParser") != "") {
         $C = $this->A("JDLinkParser");
         $C = new $C();
         $link = $C->parse($link, $this->A("JDLinkParserUser"), $this->A("JDLinkParserPassword"));
     }
     if ($this->A("JDDLType") == "4") {
         if ($logFilename == "") {
             $info = get_headers($link, 1);
             if ($info !== false) {
                 preg_match("/filename=\"(.*)\"/ismU", $info["Content-Disposition"], $matches);
                 if (isset($matches[1])) {
                     $logFilename = $matches[1];
                 }
             }
         }
         if ($logFilename == "") {
             $logFilename = basename($link);
         }
         $DL = anyC::getFirst("Incoming", "IncomingUseForDownloads", "1");
         $size = $this->filesize($link);
         if ($size < 10 * 1024 * 1024) {
             throw new Exception("File size too small");
         }
         $id = $this->logDownload($logLink, $linkOld, $logFilename, $size, $Serie, true);
         file_put_contents($this->A("JDWgetFilesDir") . "/{$id}.temp", "-o wgetDL_" . str_pad($id, 5, "0", STR_PAD_LEFT) . ".log -O " . rtrim($DL->A("IncomingDir"), "/") . "/" . str_replace(" ", ".", basename($logFilename)) . "." . Util::ext($link) . " {$link}");
         rename($this->A("JDWgetFilesDir") . "/{$id}.temp", $this->A("JDWgetFilesDir") . "/{$id}.dl");
         chmod($this->A("JDWgetFilesDir") . "/{$id}.dl", 0666);
         return true;
     }
     if ($this->A("JDDLType") == "0") {
         Util::PostToHost($this->A("JDHost"), $this->A("JDPort"), "/link_adder.tmpl", "none", "do=Add&addlinks=" . urlencode($link), $this->A("JDUser"), $this->A("JDPassword"));
     }
     if ($this->A("JDDLType") == "1") {
         $xml = Util::PostToHost($this->A("JDHost"), $this->A("JDPort"), "/cgi-bin/Qdownload/DS_Login.cgi", "none", "user=" . $this->A("JDUser") . "&pwd=" . urlencode(base64_encode($this->A("JDPassword"))) . "&admin=1");
         $xml = new SimpleXMLElement(substr($xml, strpos($xml, "<?xml ")));
         $data = Util::PostToHost($this->A("JDHost"), $this->A("JDPort"), "/cgi-bin/Qdownload/DS_Task_Option.cgi", "none", "url=" . urlencode($link) . "&todo=add_rs&type=http_ftp&acc_id=1&user=&pwd=&sid=" . $xml->authSid . "&ver=2.0");
         $xml = new SimpleXMLElement(substr($data, strpos($data, "<?xml ")));
         if ($xml->Result . "" == "success") {
             $this->logDownload($logLink, $link, $logFilename, 0, $Serie);
         }
     }
     if ($this->A("JDDLType") == "2") {
         $content = file_get_contents("http://" . $this->A("JDHost") . ":" . $this->A("JDPort") . "/action/add/links/grabber0/start1/{$link}");
         if (strpos($content, "Link(s) added. (\"{$link}\"") !== false and $logLink != null) {
             $this->logDownload($logLink, $link, $logFilename, 0, $Serie);
         }
     }
     if ($this->A("JDDLType") == "3") {
         $GLOBALS['THRIFT_ROOT'] = Util::getRootPath() . "ubiquitous/Thrift";
         require_once $GLOBALS['THRIFT_ROOT'] . '/Thrift.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TTransport.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TSocket.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/protocol/TBinaryProtocol.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TFramedTransport.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/transport/TBufferedTransport.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/packages/pyload/Pyload.php';
         require_once $GLOBALS['THRIFT_ROOT'] . '/packages/pyload/pyload_types.php';
         $transport = new TSocket($this->A("JDHost"), $this->A("JDPort") * 1);
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:trinityDB,代码行数:101,代码来源:JD.class.php

示例8: getCalendarDetails

 public static function getCalendarDetails($className, $classId)
 {
     $calendar = new Kalender();
     $ids = preg_split("/:/", $classId);
     $server = anyC::getFirst("xCal", "xCalID", $ids[0]);
     $xmlBuffer = xCalUtil::getSimpleXmlByXCal($server->A("xCalCache"));
     foreach ($xmlBuffer->vcalendar->vevent as $event) {
         if ((string) $event->uid != $ids[1]) {
             continue;
         }
         // Konvertierung der Zeitstempel
         $match = array();
         preg_match("/^(\\d{4})(\\d{2})(\\d{2})T(\\d{2})(\\d{2})(\\d{2})Z\$/", (string) $event->dtstart, $match);
         $startTimestamp = gmmktime($match[4], $match[5], $match[6], $match[2], $match[3], $match[1]);
         $match = array();
         preg_match("/^(\\d{4})(\\d{2})(\\d{2})T(\\d{2})(\\d{2})(\\d{2})Z\$/", (string) $event->dtend, $match);
         $endTimestamp = gmmktime($match[4], $match[5], $match[6], $match[2], $match[3], $match[1]);
         $calendarEvent = new KalenderEvent("mxCalGUI", $server->A("xCalID") . ":" . (string) $event->uid, $calendar->formatDay($startTimestamp), $calendar->formatTime($startTimestamp), (string) $event->summary);
         $description = preg_replace("/\n|\r/", "<br>", (string) $event->description);
         $calendarEvent->summary($description);
         return $calendarEvent;
     }
 }
开发者ID:nemiah,项目名称:fheME,代码行数:23,代码来源:mxCalGUI.class.php

示例9: define

<?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("../");
开发者ID:nemiah,项目名称:fheME,代码行数:29,代码来源:phim.php

示例10: define

<?php

define("PHYNX_NO_SESSION_RELOCATION", true);
require "../../system/connect.php";
addClassPath(Util::getRootPath() . "ubiquitous/phim");
$T = mUserdata::getGlobalSettingValue("phimServerToken");
if (!$T) {
    die("<phynx><phim><token>unknown</token></phim></phynx>");
}
if ($T !== filter_input(INPUT_GET, "token")) {
    die("<phynx><phim><token>unknown</token></phim></phynx>");
}
$U = anyC::getFirst("phimUser", "phimUserSystemName", str_replace("\\", "/", filter_input(INPUT_GET, "user")));
if ($U == null) {
    $F = new Factory("phimUser");
    $F->sA("phimUserSystemName", str_replace("\\", "/", filter_input(INPUT_GET, "user")));
    $F->store();
    die("<phynx><phim><token>unknown</token></phim></phynx>");
}
echo "<phynx><phim><token>" . $U->A("phimUserToken") . "</token></phim></phynx>";
开发者ID:nemiah,项目名称:fheME,代码行数:20,代码来源:provisioning.php

示例11: getLangCurrencyFactor

 public static function getLangCurrencyFactor($language)
 {
     if (!Session::isPluginLoaded("mSprache")) {
         return 1;
     }
     $Sprache = anyC::getFirst("Sprache", "SpracheIdentifier", $language);
     $faktor = 1;
     if ($Sprache != null) {
         $faktor = $Sprache->A("SpracheWaehrungFaktor") * 1;
     }
     if ($Sprache == null) {
         $Sprache = anyC::getFirst("Sprache", "CONCAT(SpracheIdentifier, '_', SpracheWaehrung) ", $language);
         if ($Sprache != null) {
             $faktor = $Sprache->A("SpracheWaehrungFaktor") * 1;
         }
     }
     return $faktor;
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:18,代码来源:Util.class.php

示例12: stamp

 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();
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:poolPi,代码行数:101,代码来源:CCTimeTerminal.class.php

示例13: chatPopup

    public function chatPopup($root = "")
    {
        $S = anyC::getFirst("Websocket", "WebsocketUseFor", "phim");
        $I = new HTMLInput("newMessage");
        $I->style("width:100%;background-color:white;");
        $I->onEnter("phimChat.send();");
        $IC = new HTMLInput("channel", "hidden", "0");
        $IC->id("channel");
        $B = new Button("Neue Nachricht", "star", "iconic");
        $B->style("color:orange;float:right;margin-top:-3px;");
        $B->className("newMessage");
        $BOn = new Button("Online", "{$root}../ubiquitous/phim/userOnline.png", "icon");
        $BOn->style("float:left;display:none;margin-right:3px;margin-top:-2px;");
        $BOn->className("online");
        $BOff = new Button("Offline", "{$root}../ubiquitous/phim/userOffline.png", "icon");
        $BOff->style("float:left;margin-right:3px;margin-top:-2px;");
        $BOff->className("offline");
        $AC = anyC::get("phimUserHidden");
        $hidden = array();
        while ($h = $AC->n()) {
            $hidden[$h->A("phimUserHiddenUserID")] = true;
        }
        $Users = Users::getUsersArray();
        $L = new HTMLList();
        $L->setListID("userList");
        $L->addListStyle("overflow:auto;box-sizing:border-box;");
        $L->noDots();
        $L->addItem($B . "Alle");
        $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText0').show(); phimChat.scroll('chatText0'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('0');");
        $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
        $L->addItemClass("backgroundColor0");
        $L->setItemID("user0");
        $content = "";
        $AC = anyC::get("phim");
        $AC->addAssocV3("phimToUserID", "=", "0");
        $AC->addAssocV3("phimphimGruppeID", "=", "0");
        $AC->addOrderV3("phimID", "DESC");
        $AC->setLimitV3(50);
        while ($M = $AC->n()) {
            $content = "<div><span class=\"username\">" . (isset($Users[$M->A("phimFromUserID")]) ? $Users[$M->A("phimFromUserID")] : "Unbekannt") . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
        }
        $chatAll = "<div class=\"chatWindow\" id=\"chatText0\">{$content}</div>";
        $AC = anyC::get("phimGruppe");
        $AC->addAssocV3("INSTR(phimGruppeMembers, ';" . Session::currentUser()->getID() . ";')", ">", "0");
        $groups = array();
        $chatGroups = "";
        while ($G = $AC->n()) {
            $L->addItem($B . $G->A("phimGruppeName"));
            $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatTextg" . $G->getID() . "').show(); phimChat.scroll('chatTextg" . $G->getID() . "'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('g" . $G->getID() . "');");
            $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
            #$L->addItemClass("backgroundColor0");
            $L->setItemID("groupg" . $G->getID());
            $content = "";
            $ACS = anyC::get("phim");
            $ACS->addAssocV3("phimToUserID", "=", "0");
            $ACS->addAssocV3("phimphimGruppeID", "=", $G->getID());
            $ACS->addOrderV3("phimID", "DESC");
            $ACS->setLimitV3(50);
            while ($M = $ACS->n()) {
                $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
            }
            $groups[] = $G->getID();
            $chatGroups .= "<div class=\"chatWindow\" style=\"display:none;\" id=\"chatTextg" . $G->getID() . "\">{$content}</div>";
        }
        asort($Users);
        $chatUsers = "";
        foreach ($Users as $ID => $U) {
            if ($ID == Session::currentUser()->getID()) {
                continue;
            }
            if (isset($hidden[$ID])) {
                continue;
            }
            $unread = false;
            $content = "";
            $AC = anyC::get("phim");
            $AC->addAssocV3("phimFromUserID", "=", Session::currentUser()->getID(), "AND", "1");
            $AC->addAssocV3("phimToUserID", "=", $ID, "AND", "1");
            $AC->addAssocV3("phimFromUserID", "=", $ID, "OR", "2");
            $AC->addAssocV3("phimToUserID", "=", Session::currentUser()->getID(), "AND", "2");
            $AC->addOrderV3("phimID", "DESC");
            $AC->setLimitV3(50);
            while ($M = $AC->n()) {
                $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
                if (!$M->A("phimRead") and $M->A("phimToUserID") == Session::currentUser()->getID()) {
                    $unread = true;
                }
            }
            $L->addItem($BOn . $BOff . $B . $U);
            $L->addItemEvent("onclick", OnEvent::rme("phim", "setRead", $ID) . "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText{$ID}').show(); phimChat.scroll('chatText{$ID}'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0');\$j('#channel').val('{$ID}');");
            $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
            $L->setItemID("user{$ID}");
            if ($unread) {
                $L->addItemClass("highlight");
            }
            $chatUsers .= "<div style=\"display:none;\" class=\"chatWindow\" id=\"chatText{$ID}\">{$content}</div>";
        }
        $content = "<div style=\"width:68%;display:inline-block;vertical-align:top;\">\n\t\t\t\t{$chatAll}\n\t\t\t\t{$chatUsers}\n\t\t\t\t{$chatGroups}\n\t\t\t\t<div>{$I}</div>\n\t\t\t</div><div style=\"width:32%;display:inline-block;vertical-align:top;\">{$L}{$IC}</div>";
        $rp = str_replace("interface/rme.php", "", $_SERVER["SCRIPT_NAME"]);
        if (strpos($_SERVER["SCRIPT_NAME"], "phim.php") !== false) {
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:fheME,代码行数:101,代码来源:mphimGUI.class.php

示例14: getLangCurrencyFactor

 public static function getLangCurrencyFactor($language)
 {
     if (!Session::isPluginLoaded("mSprache")) {
         return 1;
     }
     $Sprache = anyC::getFirst("Sprache", "SpracheIdentifier", $language);
     if ($Sprache == null) {
         return 1;
     }
     return $Sprache->A("SpracheWaehrungFaktor") * 1;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:11,代码来源:Util.class.php

示例15: stamp

 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).'
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:68,代码来源:CCTimeTerminal.class.php


注:本文中的anyC::getFirst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。