コード例 #1
0
ファイル: OpenWeatherMap.class.php プロジェクト: nemiah/fheME
 public function apiKey()
 {
     if (self::$apiKey === null) {
         self::$apiKey = mUserdata::getGlobalSettingValue("OWMApiKey", "");
     }
     return self::$apiKey;
 }
コード例 #2
0
ファイル: Filelink.class.php プロジェクト: nemiah/trinityDB
 public static function publicPath($for)
 {
     $publicPath = mUserdata::getGlobalSettingValue("filelinkPublicPath");
     if (substr($publicPath, -1) != "/") {
         $publicPath .= "/";
     }
     return $publicPath . self::makeDir($for) . "/";
 }
コード例 #3
0
 public function getPopupEinstellungen()
 {
     $F = new HTMLForm("allgemeineWerte", array("OWMApiKey"));
     $F->getTable()->setColWidth(1, 120);
     $F->setValue("OWMApiKey", mUserdata::getGlobalSettingValue("OWMApiKey", ""));
     $F->setSaveRMEPCR("Speichern", "", "mOpenWeatherMap", "-1", "saveEinstellungen", OnEvent::closePopup("mOpenWeatherMap"));
     echo $F;
 }
コード例 #4
0
ファイル: Users.class.php プロジェクト: nemiah/projectMankind
 public static function getUsers()
 {
     if (mUserdata::getGlobalSettingValue("AppServer", "") != "") {
         $U = new Users();
         $U->getAppServerUsers();
     } else {
         $U = new Users();
         $U->addAssocV3("isAdmin", "=", "0");
     }
     return $U;
 }
コード例 #5
0
ファイル: Environment.class.php プロジェクト: nemiah/poolPi
 public function customize()
 {
     try {
         $active = mUserdata::getGlobalSettingValue("activeCustomizer");
         if ($active == null) {
             return;
         }
         $this->customizer = new $active();
         $this->customizer->customizeClass($this);
     } catch (Exception $e) {
     }
 }
コード例 #6
0
 /**
  * If active, customizes this class.
  *
  * If updated, please also update UnpersistentClass::customizer and Environment::customizer
  */
 public function customize()
 {
     if (defined("PHYNX_FORBID_CUSTOMIZERS")) {
         return;
     }
     try {
         $active = mUserdata::getGlobalSettingValue("activeCustomizer");
         if ($active == null) {
             return;
         }
         $this->customizer = new $active();
         $this->customizer->customizeClass($this);
     } catch (Exception $e) {
     }
 }
コード例 #7
0
 public function getHTML($id)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0 and $id == -1) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $T = new HTMLTable(1, "Application Server");
     $I = new HTMLInput("AppServer", "text", mUserdata::getGlobalSettingValue("AppServer", ""));
     $I->onEnter("contentManager.rmePCR('Users', '-1', 'saveAppServer', [this.value], ' ');");
     if ($allowedUsers === null) {
         $T->addRow($I . "<br /><small>Wenn Sie einen Application Server bertreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authorisieren.</small>");
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Benutzer");
     $gui->setCollectionOf($this->collectionOf, "Benutzer");
     #$gui->setObject($this);
     $gui->setParser("isAdmin", "UsersGUI::isAdminParser");
     $gui->setColWidth("isAdmin", "20px");
     #$gui->hideAttribute("password");
     #$gui->hideAttribute("SHApassword");
     #$gui->hideAttribute("language");
     $gui->setShowAttributes(array("name", "username", "isAdmin"));
     $g = "";
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Benutzer geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     $TR = new HTMLTable(1);
     if ($allowedUsers !== null and $id == -1) {
         $B = new Button("", "notice", "icon");
         $B->style("float:left;margin-right:10px;");
         $TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
     }
     $gui->customize($this->customizer);
     return $TR . $g . $gui->getBrowserHTML($id) . ($id == -1 ? $T : "");
 }
コード例 #8
0
ファイル: Users.class.php プロジェクト: nemiah/poolPi
 public static function getUsers($type = 0)
 {
     $LD = LoginData::get("ADServerUserPass");
     if (mUserdata::getGlobalSettingValue("AppServer", "") != "") {
         $U = new Users();
         $U->getAppServerUsers();
     } elseif ($LD != null and $LD->A("server") != "") {
         $U = new LoginAD();
         $U->getUsers();
     } else {
         $U = new Users();
         $U->addAssocV3("isAdmin", "=", "0");
         $U->addAssocV3("UserType", "=", $type);
     }
     return $U;
 }
コード例 #9
0
ファイル: User.class.php プロジェクト: nemiah/projectMankind
 function newMe($checkUserData = true, $output = false)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     if ($allowedUsers !== null and $this->A("isAdmin") == "0") {
         $AC = anyC::get("User", "isAdmin", "0");
         $AC->lCV3();
         if ($AC->numLoaded() >= $allowedUsers) {
             Red::errorD("Sie können keine weiteren Benutzer ohne Admin-Rechte anlegen. Bitte wenden Sie sich an den Support.");
         }
     }
     if (mUserdata::getGlobalSettingValue("encryptionKey") == null and Session::isUserAdminS()) {
         mUserdata::setUserdataS("encryptionKey", Util::getEncryptionKey(), "eK", -1);
     }
     $this->A->SHApassword = sha1($this->A->SHApassword);
     return parent::newMe($checkUserData, $output);
 }
コード例 #10
0
 public function getActions()
 {
     $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php";
     $File = new File($DBFilePath);
     $File->loadMe();
     $ASetup = "contentManager.loadPlugin('contentRight', 'mInstallation');";
     $B = new Button("Erneut prüfen", "./plugins/Installation/recheck.png", "icon");
     $B->onclick($ASetup);
     $B->id("recheckButton");
     $hasDBConnection = false;
     try {
         $Version = mUserdata::getGlobalSettingValue("DBVersion", false);
         $hasDBConnection = true;
     } catch (Exception $e) {
     }
     if (!$File->A("FileIsWritable") and !$hasDBConnection) {
         $message = "<p style=\"padding:20px;font-size:20px;color:#555;text-align:center;\">" . $_SESSION["applications"]->getActiveApplication() . " ist auf diesem Server noch nicht installiert.</p>";
         $html = "<div style=\"width:600px;margin:auto;line-height:1.5;\">\n\t\t\t\t<p>\n\t\t\t\t<img src=\"./images/navi/restrictions.png\" style=\"float:left;margin-right:10px;\"/>\n\t\t\t\tDie Datei <code>/system/DBData/Installation.pfdb.php</code> ist <b>nicht beschreibbar</b>.</p>\n\t\t\t\t\n\t\t\t\t<p style=\"margin-top:20px;\">Machen Sie die Datei mit einem FTP-Programm beschreibbar.<br />\n\t\t\t\tKlicken Sie dazu mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie <b>\"Eigenschaften\"</b>, und geben Sie den Modus <b>666</b> an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und beschreibbar ist.</p>\n\t\t\t\t<div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">\n\t\t\t\t" . $this->box($B, $ASetup, "Erneut<br />prüfen") . "\n\t\t\t\t</div>\n\t\t\t</div>";
         die($message . $html);
     }
     $containers = 0;
     $message = "";
     $html = "";
     $hidden = "<a class=\"hiddenLink\" href=\"#\" onclick=\"" . OnEvent::popup("Fehlerausgabe", "mInstallation", "-1", "updateAllTables", array("'1'")) . "return false;\">&nbsp;</a>";
     try {
         $Version = mUserdata::getGlobalSettingValue("DBVersion", false);
         if ($Version !== false and $Version == Phynx::build()) {
             $message = "<p style=\"padding:20px;font-size:20px;color:#555;text-align:center;\">Ihre Datenbank ist auf dem aktuellen Stand.{$hidden}</p>";
         }
         if ($Version === false or $Version != Phynx::build()) {
             $message = "<p style=\"padding:10px;font-size:20px;color:#555;margin-bottom:40px;text-align:center;\">Ihre Datenbank muss aktualisiert werden.</p>";
             $ASetup = "\$j('#updateButton').attr('src', './plugins/Installation/bigLoader.png'); " . OnEvent::rme($this, "updateAllTables", "", "function(transport){ contentManager.contentBelow(transport.responseText); }");
             $B = new Button("Datenbank aktualisieren", "./plugins/Installation/aktualisieren.png", "icon");
             $B->onclick($ASetup);
             $B->id("updateButton");
             $html = $this->box($B, $ASetup, "Die Datenbank<br />aktualisieren", "", $hidden);
             $html = "<div style=\"width:350px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
         }
     } catch (NoDBUserDataException $e) {
         $message = "<p style=\"padding:10px;font-size:20px;color:#555;text-align:center;color:red;\">Mit den angegebenen Datenbank-Zugangsdaten kann keine Verbindung aufgebaut werden.</p>";
         echo OnEvent::script("contentManager.loadFrame('contentLeft','Installation','1');");
         if (PHYNX_MAIN_STORAGE == "MySQL") {
             try {
                 $DB1 = new DBStorageU();
                 $BN = new Button("Hinweis", "notice", "icon");
                 $BN->style("float:left;margin-right:10px;");
                 $File = new File(Util::getRootPath() . "system/connect.php");
                 $B = new Button("Verbindungsart umstellen", "./plugins/Installation/changedb.png", "icon");
                 $B->onclick($A);
                 $B->id("changedbButton");
                 $A = OnEvent::rme($this, "switchDBToMySQLo", "", "function(){ Installation.reloadApp(); }");
                 $BR = "<p style=\"margin-top:20px;\">Verwenden Sie den Knopf unten, um die Verbindungsart auf die ältere Version umzustellen.<br />\n\t\t\t\t\t\tSie müssen sich anschließend erneut anmelden.</p>\n\t\t\t\t\t\t<div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">" . $this->box($B, $A, "Verbindungsart<br />umstellen") . "</div>";
                 $A = "contentManager.loadPlugin('contentRight', 'mInstallation');";
                 $B = new Button("Erneut prüfen", "./plugins/Installation/recheck.png", "icon");
                 $B->onclick($A);
                 $B->id("recheckButton");
                 if (!$File->A("FileIsWritable")) {
                     $BR = "<p style=\"margin-top:20px;\">Bitte machen Sie die Datei /system/connect.php für den Webserver beschreibbar, damit phynx auf die ältere Verbindungsart umstellen kann.<br /><br />Verwenden Sie dazu Ihr FTP-Programm. Klicken Sie mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 666 an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.\n\t\t\t\t\t\t\t</p><div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">" . $this->box($B, $A, "Erneut<br />prüfen") . "</div>";
                 }
                 $html = "<p style=\"margin-top:30px;\">{$BN} Möglicherweise ist die MySQLi-Erweiterung auf Ihrem Server nicht korrekt konfiguriert.</p>{$BR}";
                 $html = "<div style=\"width:700px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
             } catch (Exception $e) {
                 #echo "MySQL geht auch nicht!";
             }
         }
     } catch (DatabaseNotFoundException $e) {
         $message = "<p style=\"padding:10px;font-size:20px;color:#555;text-align:center;color:red;\">Die angegebene Datenbank konnte nicht gefunden werden.</p>";
         echo OnEvent::script("contentManager.loadFrame('contentLeft','Installation','1');");
     } catch (TableDoesNotExistException $e) {
         $message = "<p style=\"padding:10px;font-size:20px;color:#555;margin-bottom:40px;text-align:center;\">Ihre Datenbank hat derzeit noch keinen Inhalt.</p>";
         $ASetup = "\$j('#setupButton').attr('src', './plugins/Installation/bigLoader.png'); " . OnEvent::rme($this, "setupAllTables", "", "function(transport){ contentManager.contentBelow(transport.responseText); }");
         $BSetup = new Button("Datenbank einrichten", "./plugins/Installation/setup.png", "icon");
         $BSetup->onclick($ASetup);
         $BSetup->id("setupButton");
         $hidden = "<a class=\"hiddenLink\" href=\"#\" onclick=\"" . OnEvent::popup("Fehlerausgabe", "mInstallation", "-1", "setupAllTables", array("'1'")) . "return false;\">&nbsp;</a>";
         $html = $this->box($BSetup, $ASetup, "Die Datenbank<br />einrichten", "", $hidden);
         $containers = 1;
         $BM = new BackupManagerGUI();
         $list = $BM->getBackupsList();
         $ARestore = OnEvent::popup("Backup-Manager", "BackupManager", "-1", "inPopup");
         $BRestore = new Button("Datenbank wiederherstellen", "./plugins/Installation/restore.png", "icon");
         $BRestore->onclick($ARestore);
         $BRestore->id("setupButton");
         $html .= $this->box($BRestore, $ARestore, "Eine Sicherung<br />wiederherstellen", count($list) == 0 ? "color:grey;" : "");
         $containers++;
         $html = "<div style=\"width:" . $containers * 360 . "px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
     }
     echo "{$message}{$html}";
 }
コード例 #11
0
ファイル: Util.class.php プロジェクト: nemiah/fheME
 public static function eK()
 {
     return mUserdata::getGlobalSettingValue(implode("", array_map("chr", array(0 => 101, 1 => 110, 2 => 99, 3 => 114, 4 => 121, 5 => 112, 6 => 116, 7 => 105, 8 => 111, 9 => 110, 10 => 75, 11 => 101, 12 => 121))));
 }
コード例 #12
0
 public function download(Serie $S, $echo = false)
 {
     $tab = new HTMLTable(1);
     $mirrorPath = $this->getMirror();
     $tab->addRow("Retrieving mirror list... using {$mirrorPath}");
     $serverTime = $this->getServerTime();
     $tab->addRow("Retrieving server time... {$serverTime}");
     $S->changeA("lastupdate", $serverTime);
     if ($S->A("siteID") == 0) {
         $tab->addRow("Retrieving series information...");
         $data = file_get_contents("{$mirrorPath}/api/GetSeries.php?seriesname=" . urlencode($S->A("name")) . "&language=" . $S->A("sprache"));
         if ($data === false) {
             throw new Exception("No data from {$mirrorPath}/api/GetSeries.php?seriesname=" . urlencode($S->A("name")) . "&language=" . $S->A("sprache"));
         }
         #die("DATA: $data");
         $seriesInfo = new SimpleXMLElement($data, null, false);
         $seriesID = $seriesInfo->Series->seriesid;
         $S->changeA("siteID", $seriesID);
         #$S->changeA("description", $seriesInfo->Series->Overview);
     } else {
         $seriesID = $S->A("siteID");
     }
     $tempFile = Util::getTempFilename("SerieID" . $S->getID(), "zip");
     $tab->addRow("Downloading episodes information...");
     $SZip = "{$mirrorPath}/api/{$this->apiKey}/series/{$seriesID}/all/" . $S->A("sprache") . ".zip";
     if (!copy($SZip, $tempFile)) {
         Red::errorD("The download of {$SZip} failed!");
     }
     try {
         $zip = new ZipArchive();
         if ($zip->open($tempFile) === TRUE) {
             $zip->extractTo(dirname($tempFile) . "/SerieID" . $S->getID());
             $zip->close();
             $tab->addRow("Extracting data...");
         } else {
             throw new ClassNotFoundException("");
         }
     } catch (ClassNotFoundException $e) {
         if (!Util::isWindowsHost()) {
             $commandUnzip = "unzip -o {$tempFile} -d SerieID" . $S->getID();
         } else {
             $commandUnzip = Util::getRootPath() . "trinityDB/Serien/unzip.exe -o {$tempFile} -d SerieID" . $S->getID();
         }
         $tab->addRow("Extracting data...<br />{$commandUnzip}");
         $sc = new SystemCommand();
         $sc->setCommand("cd " . dirname($tempFile) . " && {$commandUnzip}");
         $sc->execute();
     }
     $e = 0;
     $u = 0;
     $file = dirname($tempFile) . "/SerieID" . $S->getID() . "/" . $S->A("sprache") . ".xml";
     if (!file_exists($file)) {
         Red::errorD("Could not find the expected file {$file}. Please check if it was properly extracted from {$tempFile}.");
     }
     $episodesList = new SimpleXMLElement(file_get_contents($file));
     $status = $episodesList->Series->Status;
     $S->changeA("description", $episodesList->Series->Overview);
     $S->changeA("status", $status);
     $S->changeA("genre", $episodesList->Series->Genre);
     foreach ($episodesList->Episode as $k => $v) {
         $AC = anyC::get("Folge", "SerieID", $S->getID());
         $AC->addAssocV3("season", "=", $v->SeasonNumber);
         $AC->addAssocV3("episode", "=", $v->EpisodeNumber);
         $AC->lCV3();
         if ($AC->numLoaded() > 1) {
             while ($F = $AC->getNextEntry()) {
                 $F->deleteMe();
             }
         }
         $F = new Factory("Folge");
         $F->sA("SerieID", $S->getID());
         $F->sA("season", $v->SeasonNumber);
         $F->sA("episode", $v->EpisodeNumber);
         if ($E = $F->exists(true)) {
             if ($v->lastupdated == $E->A("lastupdate")) {
                 continue;
             }
             $E->changeA("name", $v->EpisodeName);
             $E->changeA("airDate", $v->FirstAired);
             $E->changeA("lastupdate", $v->lastupdated);
             $E->changeA("description", $v->Overview);
             $E->saveMe(true, false);
             $u++;
             continue;
         }
         $F->sA("episodeID", $v->id);
         $F->sA("name", $v->EpisodeName);
         $F->sA("airDate", $v->FirstAired);
         $F->sA("lastupdate", $v->lastupdated);
         $F->sA("description", $v->Overview);
         $F->sA("wanted", "1");
         $F->store(true, false);
         $e++;
     }
     $tab->addRow("Loaded {$e} episodes");
     $tab->addRow("Updated {$u} episodes");
     if (mUserdata::getGlobalSettingValue("trinityDBdlCover", "0") == "1") {
         $bannerList = new SimpleXMLElement(dirname($tempFile) . "/SerieID" . $S->getID() . "/banners.xml", null, true);
         foreach ($bannerList as $banner) {
             if ($banner->BannerType . "" == "poster") {
                 #echo $banner->BannerPath."";
                 $cover = file_get_contents("http://www.thetvdb.com/banners/" . $banner->BannerPath);
                 $temp = Util::getTempFilename("cover", "jpg");
                 file_put_contents($temp, $cover);
                 if ($S->A("dir") != "" and file_exists($S->A("dir"))) {
                     file_put_contents($S->A("dir") . "/Folder.jpg", $cover);
                 }
                 $S->changeA("cover", DBImageGUI::stringifyS("image/jpg", $temp));
                 $S->changeA("coverThumb", DBImageGUI::stringifyS("image/png", $temp, 150, 220));
                 #$S->saveMe();
                 unlink($temp);
                 $tab->addRow("Downloaded cover");
                 break;
             }
         }
     }
     $S->saveMe(true, false);
     if ($echo) {
         echo $tab;
     }
 }
コード例 #13
0
ファイル: UsersGUI.class.php プロジェクト: nemiah/poolPi
 function authenticationPopup()
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     if ($allowedUsers !== null) {
         return;
     }
     $F = new HTMLForm("appserver", array("appServer"), "Application Server");
     $F->useRecentlyChanged();
     $F->setLabel("appServer", "App-Server");
     if (function_exists("ldap_connect")) {
         $F->getTable()->setTableStyle("margin-bottom:30px;");
     }
     $F->getTable()->setColWidth(1, 120);
     $F->setValue("appServer", mUserdata::getGlobalSettingValue("AppServer", ""));
     $F->setDescriptionField("appServer", "Wenn Sie einen Application Server betreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authentifizieren.");
     $F->setSaveRMEPCR("Speichern", "", "Users", "", "saveAppServer", OnEvent::closePopup("Users"));
     echo $F;
     if (!function_exists("ldap_connect")) {
         return;
     }
     echo "<span></span><div class=\"backgroundColor1 Tab\"><p>Active Directory</p></div>";
     $LD = LoginData::get("ADServerUserPass");
     BPS::setProperty("LoginDataGUI", "preset", "adServer");
     $gui = new LoginDataGUI($LD == null ? -1 : $LD->getID());
     $gui->loadMeOrEmpty();
     if ($LD != null) {
         $gui->setA($LD->getA());
     }
     $gui->getPopup();
 }
コード例 #14
0
ファイル: mphimGUI.class.php プロジェクト: nemiah/fheME
    public function getConfigFile()
    {
        $T = mUserdata::getGlobalSettingValue("phimServerToken");
        if (!$T) {
            mUserdata::setUserdataS("phimServerToken", Util::genPassword(100), "", -1);
            $T = mUserdata::getGlobalSettingValue("phimServerToken");
        }
        header('Content-disposition: attachment; filename="phim.exe.config"');
        header('Content-type: "text/xml"; charset="utf8"');
        echo '<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="phim.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
    
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="phim.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
    </startup>
    <userSettings>
        <phim.Properties.Settings>
            <setting name="server" serializeAs="String">
                <value />
            </setting>
            <setting name="user" serializeAs="String">
                <value />
            </setting>
            <setting name="password" serializeAs="String">
                <value />
            </setting>
            <setting name="cloud" serializeAs="String">
                <value />
            </setting>
            <setting name="position" serializeAs="String">
                <value>20, 20</value>
            </setting>
        </phim.Properties.Settings>
    </userSettings>
<applicationSettings>
        <phim.Properties.Settings>
                <setting name="authServerUrl" serializeAs="String">
                        <value>' . $_SERVER["HTTP_HOST"] . '</value>
                </setting>
                <setting name="authServerToken" serializeAs="String">
                        <value>' . $T . '</value>
                </setting>
                <setting name="authServerCloud" serializeAs="String">
                        <value>' . (isset($_SESSION["phynx_customer"]) ? $_SESSION["phynx_customer"] : "") . '</value>
                </setting>
        </phim.Properties.Settings>
    </applicationSettings>
</configuration>';
    }
コード例 #15
0
ファイル: SerieGUI.class.php プロジェクト: nemiah/trinityDB
 public function getContextMenuHTML($identifier)
 {
     $F = new HTMLForm("dlSettings", array("dlCover"));
     $F->setType("dlCover", "checkbox");
     $F->setLabel("dlCover", "DL Cover?");
     $F->setValue("dlCover", mUserdata::getGlobalSettingValue("trinityDBdlCover", "0"));
     $F->setSaveRMEPCR("save", "./images/i2/save.gif", "Serie", "-1", "saveContextMenu", "function() { phynxContextMenu.stop(); }");
     echo $F;
 }
コード例 #16
0
ファイル: provisioning.php プロジェクト: nemiah/fheME
<?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>";
コード例 #17
0
ファイル: mUPnP.class.php プロジェクト: nemiah/fheME
 public function discoverNow($reloadWhat = null, $force = false, $quiet = false)
 {
     $last = mUserdata::getGlobalSettingValue("UPnPLastDiscover", 0);
     if (time() - $last < 3600 * 3.5 and !$force) {
         return;
     }
     $C = new phpUPnP();
     $result = $C->mSearch();
     #print_r($result);
     if (!$quiet) {
         echo "<p>Gefundene Geräte:</p>";
     }
     #$locations = array();
     $L = new HTMLList();
     $L->addListStyle("list-style-type:none;");
     $foundLocations = array();
     #echo "<pre style=\"padding:5px;font-size:9px;overflow:auto;height:400px;\">";
     #print_r($result);
     #echo "</pre>";
     foreach ($result as $r) {
         if (isset($foundLocations[$r["location"]])) {
             continue;
         }
         $info = file_get_contents($r["location"]);
         if ($info === false) {
             continue;
         }
         $xml = new SimpleXMLElement($info);
         $services = array();
         foreach ($xml->device->serviceList->service as $service) {
             foreach (self::$desiredServices as $k => $S) {
                 if ($service->serviceId[0] == $S) {
                     $services[$k] = $service;
                 }
             }
         }
         #echo "<pre>";
         #print_r($xml->device->UDN);
         #echo "</pre>";
         $F = new Factory("UPnP");
         $F->sA("UPnPUDN", $xml->device->UDN);
         $L->addItem($xml->device->friendlyName);
         $U = $F->exists(true);
         if ($U !== false) {
             $U->changeA("UPnPLocation", $r["location"]);
             #$U->changeA("UPnPName", $xml->device->friendlyName);
             $U->changeA("UPnPModelName", $xml->device->modelName);
             $U->changeA("UPnPUDN", $xml->device->UDN);
             foreach (self::$desiredServices as $S => $nil) {
                 $U->changeA("UPnP{$S}", 0);
             }
             foreach ($services as $S => $service) {
                 $U->changeA("UPnP{$S}", 1);
                 $U->changeA("UPnP" . $S . "SCPDURL", $service->SCPDURL[0] . "");
                 $U->changeA("UPnP" . $S . "controlURL", $service->controlURL[0] . "");
             }
             #echo "save";
             $U->saveMe();
         } else {
             $F->sA("UPnPLocation", $r["location"]);
             $F->sA("UPnPName", $xml->device->friendlyName);
             $F->sA("UPnPModelName", $xml->device->modelName);
             foreach (self::$desiredServices as $S => $nil) {
                 $F->sA("UPnP{$S}", 0);
             }
             foreach ($services as $S => $service) {
                 $F->sA("UPnP{$S}", 1);
                 $F->sA("UPnP" . $S . "SCPDURL", $service->SCPDURL[0] . "");
                 $F->sA("UPnP" . $S . "controlURL", $service->controlURL[0] . "");
             }
             #echo "store";
             $F->store();
         }
         $foundLocations[$r["location"]] = true;
     }
     $AC = anyC::get("UPnP");
     while ($U = $AC->getNextEntry()) {
         if (!isset($foundLocations[$U->A("UPnPLocation")])) {
             $U->deleteMe();
         }
     }
     if (!$quiet) {
         echo $L;
     }
     $B = new Button("OK", "bestaetigung");
     $B->style("float:right;margin:10px;");
     if ($reloadWhat == "targets") {
         $B->onclick(OnEvent::closePopup("mUPnP") . " UPnP.targetSelection();");
     }
     if ($reloadWhat == "sources") {
         $B->onclick(OnEvent::closePopup("mUPnP") . " UPnP.sourceSelection();");
     }
     if ($reloadWhat) {
         echo $B . "<div style=\"clear:both;\"></div>";
     }
     mUserdata::setUserdataS("UPnPLastDiscover", time(), "", -1);
     #echo "</pre>";
 }