Example #1
0
					<?php 
if (Environment::getS("showCopyright", "1") == "1") {
    echo Environment::getS("contentCopyright", 'Copyright (C) 2007 - 2014 by <a href="http://www.Furtmeier.IT">Furtmeier Hard- und Software</a>. This program comes with ABSOLUTELY NO WARRANTY; this is free software, and you are welcome to redistribute it under certain conditions; see <a href="gpl.txt">gpl.txt</a> for details.<!--<br />Thanks to the authors of the libraries and icons used by this program. <a href="javascript:contentManager.loadFrame(\'contentRight\',\'Credits\');">View credits.</a>-->');
}
?>
				</p>
			</div>
		</div>
		<script type="text/javascript">
			$j(document).ready(function() {
				Ajax.physion = '<?php 
echo $physion;
?>
';
				<?php 
$build = Phynx::build();
if ($build) {
    echo "Ajax.build = '{$build}';\n";
}
?>
				$j(document).keydown(function(evt){
					if(!(evt.keyCode == 83 && evt.ctrlKey))
						return;
					evt.preventDefault();
					
					var element = $j(evt.target).prop("tagName").toLowerCase();
					
					if(element != "input" && element != "select" && element != "textarea")
						return;
					
					
 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}";
 }
Example #3
0
 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;
 }