コード例 #1
0
 function __construct($ID)
 {
     if (strpos($ID, "loadBanner") !== false) {
         $image = "http://" . BPS::getProperty("NewSeriesGUI", "loadBanner");
         $content = file_get_contents($image);
         $this->A = new stdClass();
         $this->A->Banner = "image/jpg:::" . strlen($content) . ":::" . base64_encode(addslashes($content));
         #echo $this->A->Banner;
         BPS::unsetProperty("NewSeriesGUI", "loadBanner");
         return;
     }
     parent::__construct($ID);
 }
コード例 #2
0
 public static function getCallbacks($forPlugin, $selector = "general")
 {
     if (is_object($forPlugin) and $forPlugin instanceof PersistentObject) {
         $forPlugin = $forPlugin->getClearClass();
     }
     if (is_object($forPlugin) and !$forPlugin instanceof PersistentObject) {
         $forPlugin = get_class($forPlugin);
     }
     $used = BPS::getProperty("R" . $forPlugin . "S" . $selector, "callbacks", null);
     $used = str_replace("###DP###", ":", $used);
     if ($used == null) {
         return null;
     }
     return explode("%%", $used);
 }
コード例 #3
0
ファイル: Registry.class.php プロジェクト: nemiah/poolPi
 public static function getCallbacks($forPlugin, $selector = "general", $skip = array())
 {
     if (is_object($forPlugin) and $forPlugin instanceof PersistentObject) {
         $forPlugin = $forPlugin->getClearClass();
     }
     if (is_object($forPlugin) and !$forPlugin instanceof PersistentObject) {
         $forPlugin = get_class($forPlugin);
     }
     $used = BPS::getProperty("R" . $forPlugin . "S" . $selector, "callbacks", null);
     $used = str_replace("###DP###", ":", $used);
     if ($used == null) {
         return null;
     }
     $u = explode("%%", $used);
     foreach ($skip as $s) {
         foreach ($u as $k => $e) {
             if (strpos($e, $s . "::") === 0) {
                 unset($u[$k]);
             }
         }
     }
     return $u;
 }
コード例 #4
0
 function getHTML($id)
 {
     #$showHelp = true;
     if ($this->collector == null) {
         $this->lCV3($id);
     }
     $singularLanguageClass = $this->loadLanguageClass("Installation");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : "";
     if ($id == -1) {
         echo OnEvent::script(OnEvent::rme($this, "getActions", "", "function(transport){ contentManager.contentBelow(transport.responseText); }"));
     }
     $hasDBConnection = false;
     try {
         mUserdata::getGlobalSettingValue("DBVersion", false);
         $hasDBConnection = true;
     } catch (Exception $e) {
     }
     $g = "";
     $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php";
     $writable = new HTMLTable(1);
     $File = new File($DBFilePath);
     $File->loadMe();
     if (!$File->A("FileIsWritable") and !$hasDBConnection) {
         return;
     }
     if (!$File->A("FileIsWritable")) {
         $writable->addRow("<img src=\"./images/navi/restrictions.png\" style=\"float:left;margin-right:10px;\"/>Die Datei " . $DBFilePath . " ist nicht beschreibbar, Änderungen können nicht gespeichert werden.<br /><br />Machen Sie die Datei mit einem FTP-Programm beschreibbar. Klicken Sie dazu 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.");
         $g .= $writable->getHTML();
     }
     $gui = new HTMLGUI();
     $gui->setName("Datenbank-Zugangsdaten");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setCollectionOf($this->collectionOf, "Datenbank-Zugangsdaten");
     $gui->hideAttribute("password");
     $gui->hideAttribute("httpHost");
     $gui->hideAttribute("InstallationID");
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Datenbank-Zugangsdaten geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     if (!Session::isPluginLoaded("multiInstall")) {
         $gui->setIsDisplayMode(true);
         $gui->setEditInDisplayMode(true, "contentLeft");
     }
     #try {
     $g .= $gui->getBrowserHTML($id);
     #} catch (Exception $e){
     #	$t->addRow(array("Etwas stimmt nicht, eine ".get_class($e)." wurde abgefangen!"));
     #	$t->addRow(array("<span style=\"font-size:8px;\">".nl2br(str_replace("#","\n#", $e->getTraceAsString()))."</span>"));
     #}
     /*	$help = "
     	<script type=\"text/javascript\">
     		contentManager.rmePCR('mInstallation','','getHelp','true','if(checkResponse(transport)) { Popup.create(\'123\', \'Installation\', \'Hilfe\'); Popup.update(transport, \'123\', \'Installation\'); }');
     	</script>";*/
     $ST = new HTMLSideTable("left");
     try {
         #$MailServer = LoginData::get("MailServerUserPass");
         #$MailServerID = $MailServer == null ? -1 : $MailServer->getID();
         $BMail = $ST->addButton("Mail-Server", "./plugins/Installation/serverMail.png");
         #$BMail->popup("edit", "Mail-Server", "LoginData", $MailServerID, "getPopup", "", "LoginDataGUI;preset:mailServer");
         $BMail->popup("edit", "Mail-Server", "mInstallation", -1, "manageMailservers");
         $BTestMail = $ST->addButton("Mailversand\ntesten", "mail");
         $BTestMail->popup("mailTest", "Mailversand testen", "mInstallation", "-1", "testMailGUI");
         if (Session::isPluginLoaded("mJabber")) {
             $JabberServer = LoginData::get("JabberServerUserPass");
             $JabberServerID = $JabberServer == null ? -1 : $JabberServer->getID();
             $BJabber = $ST->addButton("Jabber-Server", "./plugins/Installation/serverMail.png");
             $BJabber->popup("edit", "Jabber-Server", "LoginData", $JabberServerID, "getPopup", "", "LoginDataGUI;preset:jabberServer");
         }
         $BackupButton = $ST->addButton("Daten-\nsicherungen", "disk");
         $BackupButton->onclick("contentManager.loadFrame('contentLeft','BackupManager');");
     } catch (Exception $e) {
     }
     return $ST . $g;
     #.$t->getHTML();
     $t = new HTMLTable(1);
     try {
         $user = new User(1);
         $user->loadMe();
     } catch (DatabaseNotSelectedException $e) {
         if (BPS::getProperty("mInstallationGUI", "showErrorText", false)) {
             $t->addRow(isset($text["noDatabase"]) ? $text["noDatabase"] : "Es wurde kein korrekter Datenbankname angegeben.<br /><br />Bitte geben Sie eine existierende Datenbank an, sie wird nicht automatisch erzeugt.");
             $t->addRowClass("backgroundColor0");
             $t->addRowStyle("color:red;");
         }
         return $g . $t->getHTML();
         #.$help;
     } catch (NoDBUserDataException $e) {
         if (BPS::getProperty("mInstallationGUI", "showErrorText", false)) {
             $t->addRow(isset($text["wrongData"]) ? $text["wrongData"] : "Mit den angegebenen Datenbank-Zugangsdaten kann keine Verbindung aufgebaut werden.<br /><br />Wenn sie korrekt sind, werden hier weitere Möglichkeiten angezeigt angezeigt.");
             $t->addRowClass("backgroundColor0");
             $t->addRowStyle("color:red;");
         }
         if (PHYNX_MAIN_STORAGE == "MySQL") {
             try {
                 $DB1 = new DBStorageU();
                 $B = new Button("Hinweis", "notice", "icon");
                 $B->style("float:left;margin-right:10px;");
                 $File = new File(Util::getRootPath() . "system/connect.php");
                 $BR = new Button("DB-Verbindung\numstellen", "lieferschein");
                 $BR->style("float:right;margin-left:10px;");
                 $BR->rmePCR("mInstallation", "-1", "switchDBToMySQLo", "", "Installation.reloadApp();");
                 $BR = "Verwenden Sie den nebenstehenden Knopf, um die Verbindungsart auf die ältere Version umzustellen.<br />{$BR} Sie müssen sich anschließend erneut anmelden.";
                 $BReload = new Button("Ansicht\naktualisieren", "refresh");
                 $BReload->onclick("contentManager.emptyFrame('contentLeft'); contentManager.loadFrame('contentRight', 'mInstallation', -1, 0, 'mInstallationGUI;-');Popup.closeNonPersistent();");
                 $BReload->style("float:right;margin:10px;");
                 if (!$File->A("FileIsWritable")) {
                     $BR = "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.{$BReload}";
                 }
                 $t->addRow(array("{$B} <b>Möglicherweise ist die MySQLi-Erweiterung auf Ihrem Server nicht korrekt konfiguriert.</b><br /><br />{$BR}"));
                 $t->addRowClass("backgroundColor0");
             } catch (Exception $e) {
                 #echo "MySQL geht auch nicht!";
             }
         }
         return $g . $t->getHTML();
         #.$help;
     } catch (TableDoesNotExistException $e) {
     } catch (StorageException $e) {
     }
     /*$help = "
     	<script type=\"text/javascript\">
     		rme('mInstallation','','getHelp','false','if(checkResponse(transport)) { Popup.create(\'123\', \'Installation\', \'Hilfe\'); Popup.update(transport, \'123\', \'Installation\'); }');
     	</script>";*/
     /*if(false AND $id == -1) {
     			$BackupTab = new HTMLTable(1);
     
     			$BackupButton = new Button("Backup-\nManager","disk");
     			$BackupButton->style("float:right;");
     			$BackupButton->onclick("contentManager.loadFrame('contentLeft','BackupManager');");
     
     			$BackupTab->addRow($BackupButton);
     
     			$BUT = new Button((isset($text["alle Tabellen aktualisieren"]) ? $text["alle Tabellen aktualisieren"] : "alle Tabellen\naktualisieren"), "update");
     			$BUT->rmePCR("mInstallation", "", "updateAllTables", "", "$('contentLeft').update(transport.responseText);");
     
     			$g .= "
     	<div style=\"height:30px;\"></div>
     	$BackupTab
     	<div class=\"Tab backgroundColor1\"><p>Plugins</p></div>
     	<table>
     		<colgroup>
     			<col style=\"width:100px;\" class=\"backgroundColor2\" />
     			<col class=\"backgroundColor3\" />
     		</colgroup>
     		<tr>
     			<td colspan=\"3\">
     				<span style=\"float:right;\">".Installation::getReloadButton()."</span>
     				$BUT
     			</td>
     		</tr>
     		<tr>
     			<td style=\"background-color:white;\"></td>
     		</tr>";
     
     			$p = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     			
     			
     			foreach($p as $key => $value){
     				try {
     					if(method_exists($_SESSION["CurrentAppPlugins"], "isPluginGeneric") AND $_SESSION["CurrentAppPlugins"]->isPluginGeneric($key)){
     						$c = new mGenericGUI('', $key);
     					} else {
     						$c = new $key();
     					}
     				} catch (ClassNotFoundException $e){
     					$key2 = $key."GUI";
     					
     					try {
     						$c = new $key2();
     					} catch (ClassNotFoundException $e2){
     						continue;
     					}
     				}
     				if($key == "CIs") continue;
     				
     
     				if($c->checkIfMyTableExists() AND $c->checkIfMyDBFileExists()) $showHelp = false;
     
     				if(!$c->checkIfMyDBFileExists())
     					continue;
     
     				$g .= "
     		<tr>
     			<td style=\"font-weight:bold;text-align:right;\">".($value != -1 ? $value : $key )."</td>
     			<td>".(!$c->checkIfMyTableExists() ? ($c->checkIfMyDBFileExists() ? "<input type=\"button\" value=\"".(isset($text["Tabelle anlegen"]) ? $text["Tabelle anlegen"] : "Tabelle anlegen")."\" onclick=\"installTable('$key');\" />" : "keine DB-Info-Datei" ) : ($c->checkIfMyDBFileExists() ? "<input type=\"button\" onclick=\"checkFields('$key');\" value=\"Tabellenupdate\" style=\"float:right;width:140px;\" />".(isset($text["Tabelle existiert"]) ? $text["Tabelle existiert"] : "Tabelle existiert") : (isset($text["keine DB-Info-Datei"]) ? $text["keine DB-Info-Datei"] : "keine DB-Info-Datei"))."")."</td>
     		</tr>";
     			}
     
     			$g .= "
     	</table>";
     		}*/
     #$showHelp = false;
     #if(!$showHelp)
     #	$help = OnEvent::script(OnEvent::closePopup("123", "Installation"));
     return $ST . $g;
     #.$help;
 }
コード例 #5
0
ファイル: CRMHTMLGUI.class.php プロジェクト: nemiah/trinityDB
 public function getEditHTML()
 {
     if (BPS::getProperty($this->className . "GUI", "edit") == "ok") {
         return $this->getEditTableHTML();
     }
     ################################################################################
     if ($this->name == null) {
         $this->name = $this->className;
     }
     if ($this->attributes == null) {
         $this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
     }
     $widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
     if ($widths == null) {
         $widths = array(700, 132, 218);
     }
     $tab = new HTMLTable(2);
     $tab->setTableStyle("width:{$widths['0']}px;margin-left:10px;");
     $tab->setColWidth(1, "50%");
     $tab->setColWidth(2, "50%");
     $A = $this->object->getA();
     $TSub = new HTMLTable(2);
     $TSub->setColWidth(1, 120);
     $TSub->setColClass(1, "");
     $TSub->setColClass(2, "");
     $TC = clone $TSub;
     $row = array();
     foreach ($this->attributes as $k => $v) {
         if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
             continue;
         }
         if (isset($this->parsers[$v])) {
             $A->{$v} = $this->invokeParser($this->parsers[$v], $A->{$v}, $this->object);
         }
         if (isset($this->types[$v]) and $this->types[$v] == "select") {
             if (isset($this->options[$v]) and isset($this->options[$v][$A->{$v}])) {
                 $A->{$v} = $this->options[$v][$A->{$v}];
             }
         }
         if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
             if ($k > 0) {
                 $row[] = $TC;
             }
             if ($this->forceNewRow[$v]) {
                 $row[] = "";
                 $tab->addRow($row);
                 $tab->addRowClass("backgroundColor0");
                 $tab->addRowStyle("vertical-align:top;");
                 $row = array();
             }
             if (count($row) == 2) {
                 $tab->addRow($row);
                 $tab->addRowClass("backgroundColor0");
                 $tab->addRowStyle("vertical-align:top;");
                 $row = array();
             }
             $TC = clone $TSub;
             if (trim($this->spaces[$v]) != "") {
                 $TC->addRow(array($this->spaces[$v]));
                 $TC->addRowClass("backgroundColor2");
                 $TC->addRowColspan(1, 2);
             }
         }
         if ($A->{$v} != "") {
             $B = "";
             if (isset($this->fieldButtons[$v])) {
                 $B = $this->fieldButtons[$v];
                 $B->style("float:right;");
             }
             $TC->addLV($this->labels($v) . ":", $B . nl2br($A->{$v}));
             $TC->addRowStyle("vertical-align:top;");
         }
         /*
         			$label = isset($this->labels[$v]) ? $this->labels[$v] : $v;
         
         			$row[] = "<label>".($label != "" ? ucfirst($label).":" : "")."</label>";
         
         
         
         			$row[] = nl2br($A->$v);*/
         /*if(count($row) == 4){
         			$tab->addRow($row);
         			$row = array();
         		}*/
     }
     $row[] = $TC;
     if (count($row) == 1) {
         $row[] = "";
     }
     if (count($row) == 2) {
         $tab->addRow($row);
         $tab->addRowClass("backgroundColor0");
         $tab->addRowStyle("vertical-align:top;");
     }
     $BE = new Button("Eintrag\nbearbeiten", "edit");
     $BE->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionEdit));
     $BE->style("float:left;margin-left:10px;");
     $BD = new Button("Eintrag\nlöschen", "trash");
     $BD->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionDelete));
     $BD->style("float:left;margin-left:10px;");
     $options = "<div style=\"width:{$widths['0']}px;\">" . $BE . $BD . implode("", $this->topButtons) . "</div><div style=\"clear:left;height:10px;width:{$widths['0']}px;\"></div>";
     $appended = "";
     if (count($this->appended) > 0) {
         foreach ($this->appended as $k => $v) {
             $appended .= $v->getHTML();
         }
     }
     $prepended = "";
     if (count($this->prepended) > 0) {
         foreach ($this->prepended as $k => $v) {
             $prepended .= $v->getHTML();
         }
     }
     /*
     		if(count($this->CRMGUIappendedElements) > 0)
     			foreach($this->CRMGUIappendedElements as $k => $v)
     				$appended .= $v->getHTML();*/
     return $options . $prepended . $tab . $appended;
 }
コード例 #6
0
ファイル: mUPnPGUI.class.php プロジェクト: nemiah/fheME
 public function popupRadio()
 {
     $AC = anyC::get("UPnP");
     $AC->addAssocV3("UPnPAVTransport", "=", "1");
     $I = new HTMLInput("radioSelection", "select", BPS::getProperty("mUPnPGUI", "lastStation", "0"));
     $I->setOptions($AC, "UPnPName", "Abspielgerät auswählen");
     echo $I;
     $AC = anyC::get("UPnPRadioStation");
     $I = new HTMLInput("radioStation", "select", BPS::getProperty("mUPnPGUI", "lastStation", "0"));
     $I->setOptions($AC, "UPnPRadioStationName", "Sender auswählen");
     echo $I;
     $B = new Button("Play", "play", "touch");
     $B->rmePCR("mUPnP", "-1", "playRadio", array("\$j('select[name=radioSelection]').val()", "\$j('select[name=radioStation]').val()"));
     $B->style("display:inline-block;width:30%;");
     echo $B;
     $B = new Button("Stop", "stop", "touch");
     $B->rmePCR("mUPnP", "-1", "stopRadio", array("\$j('select[name=radioSelection]').val()", "\$j('select[name=radioStation]').val()"));
     $B->style("display:inline-block;width:30%;");
     echo $B;
 }
コード例 #7
0
ファイル: HTMLGUIX.class.php プロジェクト: nemiah/fheME
 function getForm()
 {
     if ($this->form != null) {
         return $this->form;
     }
     if ($this->formID == null) {
         $this->formID = "edit" . get_class($this->object);
     }
     $F = new HTMLForm($this->formID == null ? "edit" . get_class($this->object) : $this->formID, $this->attributes == null ? $this->object : $this->attributes, strpos($this->displayMode, "popup") === false ? $this->operationsButton() . $this->name : null);
     $F->getTable()->setColWidth(1, 120);
     $F->getTable()->addTableClass("contentEdit");
     $ID = $this->object->getID();
     if (BPS::getProperty("HTMLGUI", "insertAsNew", false)) {
         $ID = -1;
         BPS::unsetProperty("HTMLGUI", "insertAsNew");
     }
     if ($this->showSave) {
         $F->setSaveClass(get_class($this->object), $ID, $this->functionEntrySave, $this->name);
     }
     $F->isEditable($this->showInputs);
     foreach ($this->object->getA() as $n => $v) {
         $F->setValue($n, $v);
         $F->setLabel($n, str_replace($this->object->getClearClass(), "", $n));
     }
     foreach ($this->types as $n => $l) {
         $F->setType($n, $l, null, isset($this->options[$n]) ? $this->options[$n] : null);
     }
     foreach ($this->labels as $n => $l) {
         $F->setLabel($n, T::_($l));
     }
     foreach ($this->placeholders as $n => $l) {
         $F->setPlaceholder($n, $l);
     }
     foreach ($this->descriptionsField as $n => $l) {
         $F->setDescriptionField($n, T::_($l));
     }
     foreach ($this->parsers as $n => $l) {
         $F->setType($n, "parser", null, array($l, $this->object));
     }
     foreach ($this->spaces as $n => $l) {
         $F->insertSpaceAbove($n, T::_($l));
     }
     foreach ($this->fieldButtons as $n => $B) {
         $F->addFieldButton($n, $B);
     }
     foreach ($this->fieldEvents as $k => $v) {
         $F->addJSEvent($v[0], $v[1], $v[2]);
     }
     foreach ($this->hiddenLines as $n) {
         $F->inputLineStyle($n, "display:none;");
     }
     foreach ($this->inputStyles as $k => $n) {
         $F->setInputStyle($k, $n);
     }
     foreach ($this->autocomplete as $k => $a) {
         $F->setAutoComplete($k, $a[0], $a[1], $a[2]);
     }
     $this->form = $F;
     return $F;
 }
コード例 #8
0
ファイル: showPDF.php プロジェクト: nemiah/trinityDB
 *  (at your option) any later version.
 *  phynx is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  2007 - 2013, Rainer Furtmeier - Rainer@Furtmeier.IT
 */
require "../classes/backend/BackgroundPluginState.class.php";
require "../classes/toolbox/BPS.class.php";
require "../classes/toolbox/Util.class.php";
session_name("phynx_" . sha1(str_replace("" . DIRECTORY_SEPARATOR . "interface" . DIRECTORY_SEPARATOR . "showPDF.php", "" . DIRECTORY_SEPARATOR . "system" . DIRECTORY_SEPARATOR . "connect.php", __FILE__)));
session_start();
if (!isset($_SESSION["BPS"])) {
    die(Util::getBasicHTMLError("Ihre Sitzung ist nicht bekannt. Bitte loggen Sie sich ein.", "Sitzung unbekannt"));
}
$_SESSION["BPS"]->setActualClass("showPDF");
$f = $_SESSION["BPS"]->getACProperty("filename");
if ($f == "") {
    die("No filename set!");
}
header('Content-Type: application/pdf');
header('Content-Length: ' . filesize($f));
header("Content-Disposition: inline; filename=\"" . basename($f) . "\"");
readfile($f);
if (BPS::getProperty("showPDF", "delete", true)) {
    unlink($f);
}
exit;
コード例 #9
0
ファイル: mFileGUI.class.php プロジェクト: nemiah/trinityDB
 public function rightCol($return = false)
 {
     $useDir = realpath(FileStorage::getFilesDir());
     $path = BPS::getProperty("mFileGUI", "path", false);
     if ($path) {
         $path = preg_replace("/^([A-Z])%/", "\\1:", $path);
         if (strpos($path, realpath(FileStorage::getFilesDir())) === 0) {
             $useDir = $path;
         }
     }
     $writable = is_writable($useDir);
     $readable = is_readable($useDir);
     $this->setDir($useDir);
     $this->loadMultiPageMode(-1, 0, 10000);
     $showPath = str_replace(realpath(FileStorage::getFilesDir()), "", $useDir);
     $BH = new Button("Root", "home", "iconicL");
     $BH->onclick($this->pather(FileStorage::getFilesDir()));
     $BH->style("float:left;");
     $way = realpath(FileStorage::getFilesDir());
     $bread = "<div style=\"vertical-align:top;display:inline-block;border-right:1px solid #aaa;\" class=\"isFolder\" data-path=\"{$way}\">{$BH}&nbsp;</div>";
     foreach (explode(DIRECTORY_SEPARATOR, $showPath) as $k => $v) {
         if ($k == 0) {
             continue;
         }
         $way .= DIRECTORY_SEPARATOR . "{$v}";
         $bread .= "<div class=\"selectionRow isFolder\" data-path=\"{$way}\" onclick=\"" . $this->pather($way) . "\" style=\"padding:8px;cursor:pointer;border-right:1px solid #aaa;color:#555;vertical-align:top;display:inline-block;padding-left:20px;padding-right:20px;border-bottom:0px;\">{$v}</div>";
     }
     $I = new HTMLInput("upload", "file", null, array("path" => $way, "class" => "File"));
     $I->style("width:250px;");
     $I->onchange($this->pather($way));
     $IN = new HTMLInput("newDir", "text");
     $IN->placeholder("Neues Verzeichnis");
     $IN->style("width:250px;margin-right:20px;");
     $IN->onEnter(OnEvent::rme($this, "makeDir", array("'{$way}'", "\$j(this).val()"), "function(){ " . $this->pather($way) . " }"));
     $ISA = new HTMLInput("selectAll", "checkbox");
     $ISA->onchange("console.log(\$j(this).prop('checked')); \$j('.selectFile').prop('checked', \$j(this).prop('checked'));");
     if (!$writable or !$readable) {
         $I = "";
         $IN = "";
     }
     $html = "\n\t\t\t<div style=\"background-color:#F7F7F7;border-bottom:1px solid #ddd;\">\n\t\t\t\t{$bread}\n\t\t\t\t<div style=\"display:inline-block;margin-top:2px;float:right;\">{$IN}</div>\n\t\t\t\t<div style=\"display:inline-block;margin-top:1px;float:right;\">{$I}</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div id=\"filesFrame\" style=\"overflow:auto;\">\n\t\t\t<form id=\"dlFiles\">\n\t\t\t<div style=\"border-bottom:1px solid #ddd;color:#777;\">\n\t\t\t\t<div style=\"display:inline-block;float:right;padding:5px;\">\n\t\t\t\t\tGröße\n\t\t\t\t\t<div style=\"display:inline-block;width:64px;\">&nbsp;</div>\n\t\t\t\t</div>\n\t\t\t\t<!--<div style=\"display:inline-block;width:57px;float:left;padding-left:5px;\">{$ISA}</div>-->\n\t\t\t\t<div style=\"display:inline-block;width:26px;float:left;padding-left:5px;\">&nbsp;</div>\n\t\t\t\t<div style=\"padding:5px;\">Dateiname</div>\n\t\t\t</div>";
     if (!$readable) {
         $html .= "<div style=\"padding:5px;\" class=\"highlight\">Das Verzeichnis <code>{$useDir}</code> ist nicht lesbar.</div>";
         return $html;
     }
     if (!$writable) {
         $html .= "<div style=\"padding:5px;\" class=\"highlight\">Das Verzeichnis {$useDir} ist nicht beschreibbar.<br />\n\t\t\t\tEs können keine Unterverzeichnisse angelegt oder Dateien hochgeladen werden.<br />\n\t\t\t\tBitte machen Sie das Verzeichnis mit <code>chmod 777 " . basename($useDir) . "</code> durch den Webserver beschreibbar.</div>";
     }
     $i = 0;
     while ($F = $this->getNextEntry()) {
         if ($F->A("FileName") == "." or $F->A("FileName") == "..") {
             continue;
         }
         $ext = Util::ext($F->A("FileName"));
         $B = "";
         if ($F->A("FileIsDir")) {
             $B = new Button("Verzeichnis öffnen", "./plugins/Files/icons/folder.png", "icon");
             $B->style("margin-right:5px;margin-top:2px;");
         } elseif (!$F->A("FileIsDir") and file_exists(dirname(__FILE__) . "/icons/file_extension_{$ext}.png")) {
             $B = new Button("", "./plugins/Files/icons/file_extension_{$ext}.png", "icon");
             $B->style("margin-right:5px;margin-top:2px;");
         } elseif (!$F->A("FileIsDir") and !file_exists(dirname(__FILE__) . "/icons/file_extension_{$ext}.png")) {
             $B = new Button("", "./plugins/Files/icons/file_extension_unknown.png", "icon");
             $B->style("margin-right:5px;margin-top:2px;");
         }
         $BDL = new Button("Datei herunterladen", "download", "iconic");
         $BDL->style("margin-right:10px;");
         $BDL->windowRme("File", $F->getID(), "download");
         $size = "<div style=\"display:inline-block;margin-right:20px;color:grey;width:60px;text-align:right;\"></div>";
         if ($F->A("FileIsDir")) {
             $onclick = $this->pather($F->getID());
             $BDL = "";
         } else {
             $onclick = OnEvent::popup("Vorschau", "File", $F->getID(), "previewWindow", "", "", "{width:600, hPosition: 'center'}");
             $size = "<div style=\"display:inline-block;margin-right:20px;color:grey;width:60px;text-align:right;\">" . Util::formatByte($F->A("FileSize")) . "</div>";
         }
         $onRename = OnEvent::rme($F, "rename", array("\$j('input[name=renameFile{$i}]').val()"), "function(t){ \$j('.fileName{$i}').html(t.responseText); \$j('#default{$i}').show(); \$j('#rename{$i}').hide(); }");
         $BD = new Button("Element löschen", "trash_stroke", "iconic");
         #$BD->style("float:right;");
         $BD->onclick("deleteClass('File','" . $F->getID() . "', function() { " . $this->pather(realpath(dirname($F->getID()))) . " },'Element wirklich löschen?');");
         $BR = new Button("Element umbenennen", "pen_alt2", "iconic");
         $BR->style("margin-right:10px;");
         $BR->onclick("\$j('.fileDefault').show(); \$j('.fileRename, #default{$i}').hide(); \$j('#rename{$i}').show();");
         $IR = new HTMLInput("renameFile{$i}", "text", $F->A("FileName"));
         $IR->style("width:350px;");
         $IR->onEnter($onRename);
         $BC = new Button("Umbenennen abbrechen", "x", "iconic");
         $BC->onclick("\$j('#default{$i}').show(); \$j('#rename{$i}').hide();");
         $BC->style("margin-left:10px;");
         $BO = new Button("Umbenennen abschließen", "check", "iconic");
         $BO->onclick($onRename);
         $BO->style("margin-left:10px;");
         $IC = new HTMLInput("select{$i}", "checkbox");
         $IC->setClass("selectFile");
         $IC->style("margin-top:2px;margin-right:10px;display:none;");
         $html .= "\n\t\t\t<div data-path=\"" . $F->getID() . "\" class=\"selectionRow " . ($F->A("FileIsDir") ? "isFolder" : "") . "\" style=\"\">\n\t\t\t\t<div class=\"selectionRowHeightSetter\" style=\"display:inline-block;float:left;\">{$IC}{$B}</div>\n\t\t\t\t<div class=\"selectionRowHeightSetter\" style=\"display:inline-block;float:right;\">{$BDL}{$BR}{$size}{$BD}</div>\n\t\t\t\t\t\n\t\t\t\t<div id=\"rename{$i}\" class=\"fileRename selectionRowHeightSetter\" style=\"display:none;margin-bottom:-3px;\">{$IR}{$BC}{$BO}</div>\n\t\t\t\t<div id=\"default{$i}\" class=\"selectionRowHeightSetter fileDefault\" onclick=\"" . $onclick . "\" style=\"padding:5px;padding-top:9px;cursor:pointer;\">\n\t\t\t\t\t<span class=\"fileName{$i}\">" . str_replace(".{$ext}", "<span style=\"color:grey;\">.{$ext}</span>", $F->A("FileName")) . "</span>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>";
         $i++;
     }
     $html .= "</form></div>" . OnEvent::script("\n\$j('.selectionRow').draggable({\n\trevert: true,\n\thelper: function(v){\n\t\tvar newE = \$j(v.target).closest('.selectionRow').clone();\n\t\tnewE.css('width', '400px').css('opacity', '0.7').addClass('selectionRow');\n\t\tnewE.find('.iconic').remove();\n\t\treturn newE;\n\t}/*,\n\tstart: function (event, ui) {\n\t\t \$j(ui.helper).css('margin-left', event.clientX - \$j(event.target).offset().left + 10);\n\t\t \$j(ui.helper).css('margin-top', event.clientY - \$j(event.target).offset().top + 10);\n\t }*/\n});\n\n\$j('.isFolder').droppable({\n\thoverClass: 'highlight',\n\taccept: '.selectionRow',\n\ttolerance: 'pointer',\n\tdrop: function(event, ui) {\n\t\tvar newE = ui.helper.clone();\n\t\tui.helper.remove();\n\t\t" . OnEvent::rme($this, "moveFile", array("\$j(ui.draggable).data('path')", "\$j(this).data('path')"), "function(){ \n\t\t\t\$j(ui.draggable).fadeOut(400, function(){ \$j(this).remove(); }); \n\t\t\t\$j('body').append(newE);\n\t\t\t\$j(newE).fadeOut(400, function(){ \$j(this).remove(); }); \n\t\t}") . "\n\t}\n});\n");
     if (!$return) {
         echo $html;
     } else {
         return $html;
     }
 }
コード例 #10
0
ファイル: mphimGUI.class.php プロジェクト: nemiah/fheME
 public function getHTML($id, $page)
 {
     $TID = BPS::getProperty("mphimGUI", "with", 0);
     if ($TID[0] != "g") {
         $this->addAssocV3("phimFromUserID", "=", Session::currentUser()->getID(), "AND", "1");
         $this->addAssocV3("phimToUserID", "=", $TID, "AND", "1");
         $this->addAssocV3("phimphimGruppeID", "=", "0", "AND", "1");
         $this->addAssocV3("phimFromUserID", "=", $TID, "OR", "2");
         $this->addAssocV3("phimToUserID", "=", Session::currentUser()->getID(), "AND", "2");
         $this->addAssocV3("phimphimGruppeID", "=", "0", "AND", "2");
     } else {
         $this->addAssocV3("phimphimGruppeID", "=", str_replace("g", "", $TID));
     }
     #$this->addJoinV3("User", $field1)
     #$this->addOrderV3("phimToUserID", "DESC");
     #$this->addOrderV3($order)
     $this->addOrderV3("phimTime", "DESC");
     $this->addOrderV3("phimID", "DESC");
     $this->setFieldsV3(array("phimRead", "phimFromUserID", "phimMessage", "DATE_FORMAT(FROM_UNIXTIME(phimTime), '%Y-%m-%d') AS grouper"));
     $this->loadMultiPageMode($id, $page, 0);
     $gui = new HTMLGUIX($this);
     $gui->version("mphim");
     $gui->colWidth("phimRead", 20);
     $gui->name("phim");
     $gui->displayGroup("grouper", "mphimGUI::parserDG");
     $gui->options(true, true, false);
     $gui->parser("phimRead", "parserRead");
     $gui->parser("phimFromUserID", "parserFrom");
     $gui->attributes(array("phimRead", "phimFromUserID", "phimMessage"));
     $B = $gui->addSideButton("Gruppen", "./ubiquitous/phim/group.png");
     $B->loadPlugin("contentRight", "mphimGruppe");
     $B = $gui->addSideButton("System-\nBenutzer", "./ubiquitous/phim/phimUser.png");
     $B->loadPlugin("contentRight", "mphimUser");
     $B = $gui->addSideButton("Benutzer\nausblenden", "./ubiquitous/phim/hidden.png");
     $B->loadPlugin("contentRight", "mphimUserHidden");
     $B = $gui->addSideButton("phim\nanzeigen", "new");
     $B->onclick("windowWithRme('mphim', -1, 'chatPopup', [], '', 'window', {height: 300, width:550, left: \$j.jStorage.get('phimX', 20), top: \$j.jStorage.get('phimY', 20), name: 'phim', scroll: false});");
     $B = $gui->addSideButton("Config-Datei", "new");
     $B->windowRme("mphim", "-1", "getConfigFile");
     $users = self::$users = Users::getUsersArray("Alle", true);
     $T = new HTMLTable(1, "Konversation mit");
     $T->setTableStyle("width:100%");
     $T->weight("light");
     $T->useForSelection(false);
     foreach ($users as $ID => $U) {
         $T->addRow(array($U));
         $T->addRowEvent("click", OnEvent::frame("contentRight", "mphim", "-1", 0, "", "mphimGUI;with:{$ID}"));
         if ($ID . "" === $TID . "") {
             $T->addRowClass("highlight");
         }
     }
     $AC = anyC::get("phimGruppe");
     $AC->addAssocV3("INSTR(phimGruppeMembers, ';" . Session::currentUser()->getID() . ";')", ">", "0");
     $TG = new HTMLTable(1, "Gruppen");
     $TG->setTableStyle("width:100%");
     $TG->weight("light");
     $TG->useForSelection(false);
     while ($G = $AC->n()) {
         $TG->addRow(array($G->A("phimGruppeName")));
         $TG->addRowEvent("click", OnEvent::frame("contentRight", "mphim", "-1", 0, "", "mphimGUI;with:g" . $G->getID()));
         if ("g" . $G->getID() === $TID . "") {
             $TG->addRowClass("highlight");
         }
     }
     $gui->addSideRow($T);
     $gui->addSideRow($TG);
     return $gui->getBrowserHTML($id);
 }
コード例 #11
0
 public static function adviceAboveList()
 {
     $bps = BPS::getAllProperties("FileManagerGUI");
     #
     $bps["path"] = str_replace('\\', "/", preg_replace("/^([A-Z]):/", "\\1%", $bps["path"]));
     #print_r($bps);
     $mF = new mFileGUI();
     return $mF->getUploadForm($bps["path"], BPS::getProperty("FileManagerGUI", "reloadFunction", "contentManager.reloadFrame('contentLeft');"), false, "width:100%;");
 }
コード例 #12
0
ファイル: TodoGUI.class.php プロジェクト: nemiah/fheME
 function getHTML($id)
 {
     // <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>
     $this->loadMeOrEmpty();
     $bps = $this->getMyBPSData();
     $allowed = array();
     $ACS = anyC::get("Userdata", "name", "shareCalendarTo" . Session::currentUser()->getID());
     $ACS->addAssocV3("name", "=", "shareCalendarTo0", "OR");
     while ($Share = $ACS->getNextEntry()) {
         $allowed[$Share->A("UserID")] = $Share->A("wert");
     }
     if ($id == -1) {
         $this->A->TodoTillDay = Util::CLDateParser(time() + 7 * 24 * 3600);
         $this->A->TodoTillTime = Util::CLTimeParser(10 * 3600);
         $this->A->TodoFromDay = Util::CLDateParser(time() + 7 * 24 * 3600);
         $this->A->TodoFromTime = Util::CLTimeParser(9 * 3600);
         $this->A->TodoType = "2";
         if ($bps != -1 and isset($bps["TodoTillDay"])) {
             $this->A->TodoTillDay = $bps["TodoTillDay"];
             $this->A->TodoFromDay = $bps["TodoTillDay"];
             BPS::unsetProperty("TodoGUI", "TodoTillDay");
         }
         if ($bps != -1 and isset($bps["TodoFromTime"])) {
             $this->A->TodoFromTime = Util::CLTimeParser($bps["TodoFromTime"] * 3600);
             $this->A->TodoTillTime = Util::CLTimeParser(($bps["TodoFromTime"] + 1) * 3600);
             BPS::unsetProperty("TodoGUI", "TodoFromTime");
         }
         if ($bps != -1 and isset($bps["TodoDescription"])) {
             $this->A->TodoDescription = $bps["TodoDescription"];
             BPS::unsetProperty("TodoGUI", "TodoDescription");
         }
         if ($bps != -1 and isset($bps["TodoLocation"])) {
             $this->A->TodoLocation = $bps["TodoLocation"];
             BPS::unsetProperty("TodoGUI", "TodoLocation");
         }
         if ($bps != -1 and isset($bps["TodoName"])) {
             $this->A->TodoName = $bps["TodoName"];
             BPS::unsetProperty("TodoGUI", "TodoName");
         }
         $for = BPS::getProperty("mKalenderGUI", "KID", Session::currentUser()->getID());
         if ($for != Session::currentUser()->getID() and strpos($allowed[$for], "create") === false) {
             $for = Session::currentUser()->getID();
         }
         $this->A->TodoUserID = $for;
         $this->A->TodoClass = BPS::getProperty("mTodoGUI", "ownerClass");
         $this->A->TodoClassID = BPS::getProperty("mTodoGUI", "ownerClassID");
     }
     $gui = $this->GUI;
     $gui->name("Termin");
     $gui->label("TodoDescription", "Details");
     $gui->label("TodoTillDay", "Ende");
     $gui->label("TodoTillTime", "Uhrzeit");
     $gui->label("TodoFromDay", "Anfang");
     $gui->label("TodoFromTime", "Uhrzeit");
     $gui->label("TodoType", "Typ");
     $gui->label("TodoUserID", "Zuständig");
     $gui->label("TodoStatus", "Status");
     $gui->label("TodoRemind", "Erinnerung");
     $gui->label("TodoName", "Betreff");
     $gui->label("TodoRepeat", "Wiederholen");
     #$gui->label("TodoRepeatInterval","Intervall");
     $gui->label("TodoClassID", "Kunde");
     $gui->label("TodoLocation", "Ort");
     $gui->label("TodoAllDay", "Ganzer Tag");
     $gui->space("TodoRemind", "Optionen");
     $gui->space("TodoFromDay", "Zeit");
     if ($this->A("TodoFromDay") == "01.01.1970" and $this->A("TodoFromTime") == "00:00") {
         $this->changeA("TodoFromDay", $this->A("TodoTillDay"));
         $this->changeA("TodoFromTime", $this->A("TodoTillTime"));
     }
     $gui->attributes(array("TodoType", "TodoClass", "TodoClassID", "TodoDescription", "TodoLocation", "TodoFromDay", "TodoTillDay", "TodoAllDay", "TodoRemind", "TodoUserID"));
     $gui->type("TodoType", "select", TodoGUI::types());
     $gui->type("TodoRemind", "select", array("-1" => "keine Erinnerung", "60" => "1 Minute vorher", "300" => "5 Minuten vorher", "600" => "10 Minuten vorher", "900" => "15 Minuten vorher", "1800" => "30 Minuten vorher", "2700" => "45 Minuten vorher", "3600" => "1 Stunde vorher"));
     $gui->type("TodoClass", "hidden");
     $gui->type("TodoDescription", "textarea");
     $gui->type("TodoAllDay", "checkbox");
     $gui->addFieldEvent("TodoAllDay", "onchange", "\$j('#TodoFromTimeDisplay').css('display', this.checked ? 'none' : 'inline'); \$j('#TodoTillTimeDisplay').css('display', this.checked ? 'none' : 'inline');");
     $gui->parser("TodoFromDay", "TodoGUI::dayFromParser");
     $gui->parser("TodoTillDay", "TodoGUI::dayTillParser");
     $ac = Users::getUsers();
     $users = array();
     while ($u = $ac->getNextEntry()) {
         if (!isset($allowed[$u->getID()]) and $u->getID() != Session::currentUser()->getID()) {
             continue;
         }
         if (isset($allowed[$u->getID()]) and strpos($allowed[$u->getID()], "create") === false) {
             continue;
         }
         $users[$u->getID()] = $u->A("name");
     }
     $ac = Users::getUsers(1);
     while ($u = $ac->getNextEntry()) {
         if (!isset($allowed[$u->getID()]) and $u->getID() != Session::currentUser()->getID()) {
             continue;
         }
         if (isset($allowed[$u->getID()]) and strpos($allowed[$u->getID()], "create") === false) {
             continue;
         }
         $users[$u->getID()] = $u->A("name");
     }
     $users["-1"] = "Alle";
     if (Session::isPluginLoaded("mWAdresse") and ($this->A("TodoClass") == "WAdresse" or $this->A("TodoClass") == "Kalender")) {
         $gui->parser("TodoClassID", "TodoGUI::parserKunde");
     } else {
         $gui->type("TodoClassID", "hidden");
     }
     $gui->type("TodoUserID", "select", $users);
     $gui->type("TodoStatus", "select", $this->getStatus());
     $gui->activateFeature("CRMEditAbove", $this);
     if ($gui instanceof CRMHTMLGUI) {
         return $gui->getEditTableHTML(4);
     }
 }
コード例 #13
0
ファイル: mTodoGUI.class.php プロジェクト: nemiah/fheME
 function editInPopup($id, $date = null, $targetClass = null, $targetClassID = null, $time = null, $description = null, $location = null)
 {
     if ($date != null) {
         BPS::setProperty("TodoGUI", "TodoTillDay", Util::CLDateParser($date));
     }
     if ($time != null) {
         BPS::setProperty("TodoGUI", "TodoFromTime", $time);
     }
     if ($description != null) {
         BPS::setProperty("TodoGUI", "TodoDescription", $description);
     }
     if ($location != null) {
         BPS::setProperty("TodoGUI", "TodoLocation", $location);
     }
     $T = new TodoGUI($id);
     $T->GUI = new HTMLGUIX($T);
     $T->GUI->displayMode("popupS");
     $T->GUI->requestFocus("TodoName");
     #if($id == -1)
     $T->GUI->addToEvent("onSave", OnEvent::popup("Event", "mKalender", "-1", "getInfo", array("'mTodoGUI'", "transport.responseText", "'{$date}'")));
     if ($targetClass != null) {
         BPS::setProperty("mTodoGUI", "ownerClass", $targetClass);
         BPS::setProperty("mTodoGUI", "ownerClassID", $targetClassID);
     }
     $T->getHTML($id);
     #if($T->A("TodoClass") == "Kalender" OR $T->A("TodoClass") == "DBMail")
     $T->GUI->insertAttribute("after", "TodoClassID", "TodoName");
     if (BPS::getProperty("TodoGUI", "overview")) {
         $T->GUI->addFieldEvent("TodoUserID", "onChange", OnEvent::rme($this, "getBusyList", array("this.value", "1"), "function(t){ \$j('#busyList').html(t.responseText); }"));
         $gui = $T->GUI->getEditHTML();
         $html = "<div id=\"busyList\" style=\"display:inline-block;width:400px;vertical-align:top;max-height:450px;overflow:auto;\">" . $this->getBusyList(Session::currentUser()->getID(), false) . "</div><div style=\"display:inline-block;width:400px;vertical-align:top;\">{$gui}</div>";
         BPS::unsetProperty("TodoGUI", "overview");
         die($html);
     }
     echo $T->GUI->getEditHTML();
     #.OnEvent::script("\$j('#editTodoGUI input[name=TodoName]').trigger('focus');");
 }
コード例 #14
0
ファイル: AdresseGUI.class.php プロジェクト: nemiah/fheME
 function getHTML($id)
 {
     $forReload = "";
     $displayMode = null;
     $AuftragID = -1;
     $bps = $this->getMyBPSData();
     if ($bps != -1 and isset($bps["AuftragID"])) {
         $AuftragID = $bps["AuftragID"];
     }
     if ($bps != -1 and isset($bps["displayMode"])) {
         $displayMode = $bps["displayMode"];
     }
     $_SESSION["BPS"]->unsetACProperty("AuftragID");
     $_SESSION["BPS"]->unsetACProperty("displayMode");
     #if($this->A == null AND $id != -1) $this->loadMe();
     $this->loadMeOrEmpty();
     if ($id * 1 == -1) {
         $this->A = $this->newAttributes();
         $this->A->AuftragID = $AuftragID;
         if ($displayMode != null) {
             $this->A->type = $displayMode;
         }
         //Has to stay or lieferAdresse will also overwrite a normal Auftrags-Adresse
         if (Session::isPluginLoaded("mAdressBuch")) {
             $AB = BPS::getProperty("AdressenGUI", "AdressBuch", null);
             if ($AB) {
                 $this->A->type = "AB{$AB}";
             }
         }
         $id = $this->newMe(true, false);
         $this->forceReload();
         try {
             $K = new Kunden();
             if ($displayMode == null and $this->A("type") == "default") {
                 //Or else a lieferAdresse will get a Kundennummer
                 $K->createKundeToAdresse($id, false);
             }
         } catch (ClassNotFoundException $e) {
         }
         $forReload = "<script type=\"text/javascript\">lastLoadedLeft = {$id}; lastLoadedLeftPlugin = 'Adresse';</script>";
     }
     $OptTab = new HTMLSideTable("right");
     if (Session::isPluginLoaded("Kunden") and $this->A->AuftragID == -1) {
         $B = new Button("Kundendaten", "kunden");
         $B->loadFrame("contentLeft", "Kunde", "-1", "0", "KundeGUI;AdresseID:{$this->getID()};action:Kappendix");
         $OptTab->addRow($B);
     }
     if ($_SESSION["applications"]->getActiveApplication() == "open3A") {
         if ($displayMode != null) {
             $OptTab->setTableStyle("width:160px;margin:0px;margin-left:-170px;float:left;");
         }
         if (($id == -1 or $forReload != "") and Session::isPluginLoaded("mImport")) {
             $OTBV = new Button("Schnell-\nImport", "import");
             #$OTBV->rmePCR("importAdresse", "", "getFastImportWindow", "", "Popup.display('Adresse importieren:',transport);");
             $OTBV->onclick("Import.openSchnellImportAdresse('Adresse importieren:');");
             $OTBV->id("ButtonAdresseSchnellImport");
             $OptTab->addRow($OTBV);
         }
         if ($id != -1 and Session::isPluginLoaded("Kundenpreise") and $this->A->AuftragID == -1 and $this->A->type == "default") {
             $ButtonKundenpreise = new Button("Kundenpreise", "package");
             $ButtonKundenpreise->onclick("contentManager.loadFrame('contentLeft','Kunde', -1, 0, 'KundeGUI;AdresseID:{$this->ID};action:Kundenpreise');");
             $OptTab->addRow($ButtonKundenpreise);
         }
         if ($this->A->AuftragID == -1 and (Session::isPluginLoaded("mAnsprechpartner") or Session::isPluginLoaded("mOSM"))) {
             $OptTab->addRow("");
             $OptTab->addCellStyle(1, "height:30px;");
         }
         if ($id != -1 and Session::isPluginLoaded("mAnsprechpartner") and $this->A->AuftragID == -1) {
             $OptTab->addRow(Ansprechpartner::getButton("Adresse", $this->getID()));
         }
         if ($id != -1 and Session::isPluginLoaded("mOSM") and $this->A("AuftragID") == -1) {
             $OptTab->addRow(OpenLayers::getButton("Adresse", $this->getID()));
         }
     }
     if (Session::isPluginLoaded("mklickTel") and $this->A->AuftragID == -1) {
         $OptTab->addRow(klickTel::getButton($this->getID()));
     }
     $this->loadMeOrEmpty();
     $gui = $this->gui;
     $gui->insertSpaceAbove("tel", "Kontakt");
     $gui->insertSpaceAbove("strasse", "Adresse");
     $gui->insertSpaceAbove("homepage", "Sonstiges");
     $gui->setFormID("AdresseForm");
     $fields = array("firma", "position", "anrede", "vorname", "nachname", "AdresseSpracheID", "strasse", "bezirk", "zusatz1", "ort", "land", "tel", "fax", "mobil", "email", "homepage", "gebRem", "gebRemMail", "AuftragID", "KategorieID", "type", "geb", "bemerkung");
     if (Session::isPluginLoaded("mLDAP")) {
         $fields[] = "exportToLDAP";
     }
     $gui->setShowAttributes($fields);
     $gui->setLabel("bemerkung", "Notizen");
     if (Session::isPluginLoaded("mSprache")) {
         $gui->setLabel("AdresseSpracheID", "Sprache");
         $gui->setLabelDescription("AdresseSpracheID", "und Währung");
         #$ACS = anyC::get("Sprache");
         #$S = array();
         #while($SLW = $ACS->getNextEntry())
         #	$S[$SLW->getID()] = $SLW->A("SpracheSprache")." "." ".$SLW->A("SpracheWaehrung");
         $gui->selectWithCollection("AdresseSpracheID", new mSprache(), "SpracheName");
         #$gui->setType("AdresseSpracheID", "select");
         #$gui->setOptions("AdresseSpracheID", array_keys($S), array_values($S));
         #$gui->insertSpaceAbove("firma");
     } else {
         $gui->setType("AdresseSpracheID", "hidden");
     }
     #$gui->setAttributes($this->A);
     $gui->setObject($this);
     $gui->setName("Adresse");
     $gui->setOptions("anrede", array_keys(self::getAnreden()), array_values(self::getAnreden()));
     $gui->setType("anrede", "select");
     $gui->setType("geb", "hidden");
     $gui->setType("gebRemMail", "hidden");
     $gui->setType("gebRem", "hidden");
     $gui->setType("exportToLDAP", "checkbox");
     $gui->insertSpaceAbove("exportToLDAP");
     $gui->setFieldDescription("exportToLDAP", "Soll die Adresse auf einen LDAP-Server exportiert werden?");
     $gui->setType("AuftragID", "hidden");
     $gui->setType("type", "hidden");
     #$gui->setLabel("geb","Jahrestag");
     $gui->setLabel("ort", "PLZ/Ort");
     $gui->setLabel("strasse", "Straße/Hausnr.");
     $gui->setLabel("tel", "Telefon");
     $gui->setLabel("email", "E-Mail");
     $gui->setLabel("exportToLDAP", "LDAP-Export?");
     $gui->setParser("strasse", "AdresseGUI::parserStrasse", array($this->A("nr")));
     $gui->setParser("ort", "AdresseGUI::parserOrt", array($this->A("plz")));
     #$gui->useAutoCompletion("plz", (Session::isPluginLoaded("Postleitzahlen") ? "Postleitzahlen" : "Adressen"));
     if (Session::isPluginLoaded("mStammdaten") or Applications::activeApplication() == "MMDB") {
         /*if($this->A("land") == ""){
         			$S = Stammdaten::getActiveStammdaten();
         			if($S->A("land") == "D") $S->changeA("land","DE");
         			$this->changeA("land", ISO3166::getCountryToCode($S->A("land")));
         		}*/
         $gui->setType("land", "select");
         $countries = ISO3166::getCountries();
         $labels = array_merge(array("" => "keine Angabe"), $countries);
         $values = array_merge(array("" => ""), $countries);
         $gui->setOptions("land", array_values($values), array_values($labels));
         if ($this->A("land") != ISO3166::getCountryToCode("GB") and $this->A("land") != ISO3166::getCountryToCode("US") and $this->A("land") != ISO3166::getCountryToCode("CH")) {
             $gui->setLineStyle("zusatz1", "display:none;");
             $gui->setLineStyle("position", "display:none;");
         }
         if ($this->A("land") != ISO3166::getCountryToCode("DK") and $this->A("land") != ISO3166::getCountryToCode("ES")) {
             $gui->setLineStyle("bezirk", "display:none;");
         }
         $gui->setLabel("zusatz1", "Zusatz 1");
         $gui->setInputJSEvent("land", "onchange", "contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("GB") . "' || this.value == '" . ISO3166::getCountryToCode("US") . "' || this.value == '" . ISO3166::getCountryToCode("CH") . "') ? 'show' : 'hide', ['zusatz1', 'position']); contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("DK") . "' || this.value == '" . ISO3166::getCountryToCode("ES") . "') ? 'show' : 'hide', ['bezirk']);");
     }
     if (Session::isPluginLoaded("mGemeinschaft")) {
         $gui->activateFeature("addCustomButton", $this, "tel", Gemeinschaft::getCallButton($this->A("tel")));
         $gui->activateFeature("addCustomButton", $this, "mobil", Gemeinschaft::getCallButton($this->A("mobil"), "mobile"));
     }
     $kat = new Kategorien();
     $kat->addAssocV3("type", "=", $displayMode != "" ? $displayMode : "1");
     $keys = $kat->getArrayWithKeys();
     $keys[] = "0";
     $values = $kat->getArrayWithValues();
     $values[] = "bitte auswählen";
     $gui->setOptions("KategorieID", $keys, $values);
     $gui->setType("bemerkung", "textarea");
     $gui->setLabel("KategorieID", "Kategorie");
     if ($AuftragID == -1) {
         $gui->setType("KategorieID", "select");
     } else {
         $gui->setType("KategorieID", "hidden");
         $gui->setType("bemerkung", "hidden");
         $gui->setType("tel", "hidden");
         $gui->setType("fax", "hidden");
         $gui->insertSpaceAbove("email");
         $gui->setType("homepage", "hidden");
         $gui->setType("exportToLDAP", "hidden");
         $gui->setType("mobil", "hidden");
     }
     switch ($displayMode) {
         case "auftragsAdresse":
             $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentLeft','Auftrag',{$this->A->AuftragID});\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t}");
             break;
         case "lieferAdresse":
             $this->A->type = "lieferAdresse";
             $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t\tcontentManager.loadFrame('subframe','GRLBM',{$this->A->AuftragID});\n\t\t\t\t}");
             break;
     }
     Aspect::joinPoint("buttons", $this, __METHOD__, $OptTab);
     $gui->setStandardSaveButton($this, "Adressen");
     $gui->customize($this->customizer);
     return $forReload . $OptTab . $gui->getEditHTML();
 }
コード例 #15
0
ファイル: AdressenGUI.class.php プロジェクト: nemiah/fheME
 public static function firmaParser($w, $a, $p)
 {
     if (!is_array($p)) {
         $s = HTMLGUI::getArrayFromParametersString($p);
     } else {
         $s = $p;
     }
     $SM = BPS::getProperty("AdressenGUI", "selectionMode", false);
     if ($s[9] == "mAdresseGUI") {
         $SM = BPS::getProperty("mAdresseGUI", "selectionMode", false);
     }
     $symbols = "";
     if ($s[8] != "") {
         $symbols .= "<a href=\"{$s['8']}\" target=\"_blank\"><img class=\"mouseoverFade\" style=\"float:right;margin-left:4px;\" src=\"./images/i2/flowers.gif\" title=\"{$s['8']}\" /></a>";
     }
     if ($s[7] != "") {
         if (Session::isPluginLoaded("mGemeinschaft")) {
             $B = Gemeinschaft::getCallButton($s[7], "mobile");
             $B->style("float:right;margin-left:4px;");
             $symbols .= $B;
         } else {
             $symbols .= "<img class=\"mouseoverFade\" style=\"float:right;margin-left:4px;\" src=\"./images/i2/mobile.png\" title=\"{$s['7']}\" />";
         }
     }
     if ($s[6] != "") {
         $symbols .= "<a href=\"mailto:{$s['6']}\"><img class=\"mouseoverFade\" style=\"float:right;margin-left:4px;\" src=\"./images/i2/email.png\" title=\"{$s['6']}\" /></a>";
     }
     if ($s[5] != "") {
         $symbols .= "<img class=\"mouseoverFade\" style=\"float:right;margin-left:4px;\" src=\"./images/i2/fax.png\" title=\"{$s['5']}\" />";
     }
     if ($s[4] != "") {
         if (Session::isPluginLoaded("mGemeinschaft")) {
             $B = Gemeinschaft::getCallButton($s[7]);
             $B->style("float:right;margin-left:4px;");
             $symbols .= $B;
         } else {
             $symbols .= "<img class=\"mouseoverFade\" style=\"float:right;margin-left:4px;\" src=\"./images/i2/telephone.png\" title=\"{$s['4']}\" />";
         }
     }
     return $symbols . (($_SESSION["S"]->checkForPlugin("Kunden") and $s[3] == "default" and !$SM) ? "<img src=\"./images/i2/kunde.png\" title=\"Kundendaten anzeigen/erstellen\" onclick=\"contentManager.selectRow(this); contentManager.loadFrame('contentLeft', 'Kunde', -1, 0, 'KundeGUI;AdresseID:{$s['2']};action:Kappendix');\" style=\"float:left;margin-right:4px;\" class=\"mouseoverFade\" />" : "") . (($_SESSION["S"]->checkForPlugin("Kundenpreise") and $s[3] == "default" and !$SM) ? "<img src=\"./images/i2/kundenpreis.png\" title=\"Kundenpreise festlegen\" onclick=\"contentManager.selectRow(this); contentManager.loadFrame('contentLeft','Kunde', -1, 0,'KundeGUI;AdresseID:{$s['2']};action:Kundenpreise');\" style=\"float:left;margin-right:4px;\" class=\"mouseoverFade\" />" : "") . (($_SESSION["S"]->checkForPlugin("labelPrinter") and $s[3] == "default") ? "<img src=\"./images/i2/printer.png\" title=\"Etikette mit Adresse drucken\" onclick=\"rme('labelPrinter','','printEtikette','{$s['2']}');\" style=\"float:left;margin-right:4px;\" class=\"mouseoverFade\" />" : "") . ($w != "" ? stripslashes($w) . (($s[1] != "" or $s[0] != "") ? "<br /><small>{$s['0']} {$s['1']}</small>" : "") : $s[0] . " " . $s[1]);
 }
コード例 #16
0
ファイル: showPDF.php プロジェクト: nemiah/poolPi
 *  (at your option) any later version.
 *  phynx is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  2007 - 2016, Rainer Furtmeier - Rainer@Furtmeier.IT
 */
require "../classes/backend/BackgroundPluginState.class.php";
require "../classes/toolbox/BPS.class.php";
require "../classes/toolbox/Util.class.php";
session_name("phynx_" . sha1(str_replace("" . DIRECTORY_SEPARATOR . "interface" . DIRECTORY_SEPARATOR . "showPDF.php", "" . DIRECTORY_SEPARATOR . "system" . DIRECTORY_SEPARATOR . "connect.php", __FILE__)));
session_start();
if (!isset($_SESSION["BPS"])) {
    die(Util::getBasicHTMLError("Ihre Sitzung ist nicht bekannt. Bitte loggen Sie sich ein.", "Sitzung unbekannt"));
}
$_SESSION["BPS"]->setActualClass("showPDF");
$f = $_SESSION["BPS"]->getACProperty("filename");
if ($f == "") {
    die("No filename set!");
}
header('Content-Type: application/pdf');
header('Content-Length: ' . filesize($f));
header("Content-Disposition: inline; filename=\"" . basename($f) . "\"");
readfile($f);
if (BPS::getProperty("showPDF", "delete", true) and strpos($f, "/tmp") !== 0) {
    unlink($f);
}
exit;