Example #1
0
 public function getHTML($id)
 {
     #$_SESSION["BPS"]->unregisterClass(get_class($this));
     $defaultAnsicht = "monat";
     if (Applications::activeApplication() == "personalKartei") {
         $defaultAnsicht = "jahr";
     }
     $ansicht = mUserdata::getUDValueS("KalenderAnsicht", $defaultAnsicht);
     #$ansicht = $ansicht->getUDValue("KalenderAnsicht");
     #if($ansicht == null) $ansicht = "monat";
     $display = mUserdata::getUDValueS("KalenderDisplay" . ucfirst($ansicht), "0");
     $BThis = new Button("", "arrow_down", "iconicG");
     $BThis->style("float:left;margin-top:-6px;margin-right:5px;");
     $Calendars = "";
     Registry::reset("Kalender");
     while ($C = Registry::callNext("Kalender", "categories")) {
         if (!$C) {
             continue;
         }
         foreach ($C as $tab) {
             $Calendars .= "<div onclick=\"{$tab->onclick}\">" . ($tab->isCurrent ? $BThis : "") . " {$tab->label}</div>";
         }
     }
     // <editor-fold defaultstate="collapsed" desc="styles">
     $html = "\n\t\t\n\t\t<style type=\"text/css\">\n\t\t.Day {\n\t\t\t-moz-user-select:none;\n\t\t\tborder-left:1px solid #EEE;\n\t\t\tborder-bottom:1px solid #EEE;\n\t\t}\n\t\t\n\t\t/*.Day:hover {\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tpadding:2px;\n\t\t}*/\n\n\t\t.dayOptions {\n\t\t\tdisplay:none;\n\t\t}\n\n\t\t.Day:hover .dayOptions {\n\t\t\tdisplay:inline;\n\t\t}\n\n\t\t.Termin {\n\t\t\tposition:relative;\n\t\t\tleft:44px;\n\t\t\tcursor:pointer;\n\t\t\twidth:150px;\n\t\t\tfloat:left;\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tmargin-right:3px;\n\t\t}\n\t\t\n\t\t.KalenderButton {\n\t\t\topacity:0.5;\n\t\t}\n\t\t\n\t\t.KalenderButton:hover {\n\t\t\topacity:1;\n\t\t}\n\t\t\n\t\t.KalenderUser {\n\t\t\tmargin-left:10px;\n\t\t}\n\t\t\n\t\t.KalenderUser div {\n\t\t\tpadding:10px;\n\t\t\tpadding-top:10px;\n\t\t\tpadding-bottom:5px;\n\t\t\tdisplay:inline-block;\n\t\t\tmargin-right:20px;\n\t\t\tcursor:pointer;\n\t\t\tmin-width:150px;\n\t\t}\n\t\t\n\t\t.cellHeight {\n\t\t}\n\t\t\n\t\t.ui-datepicker {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t#contentScreen tr:hover {\n\t\t\tbackground-color:inherit;\n\t\t}\n\n\t\t#calendar1stMonth .ui-datepicker-prev, #calendar1stMonth .ui-datepicker-next/*,\n\t\t#calendar2ndMonth .ui-datepicker-prev, #calendar2ndMonth .ui-datepicker-next */{\n\t\t\tdisplay:none;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-widget-content,\n\t\t#calendar2ndMonth .ui-widget-content, \n\t\t#calendar2ndMonth .ui-widget-content .ui-state-default,\n\t\t#calendar1stMonth .ui-widget-content .ui-state-default {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-datepicker-header,\n\t\t#calendar2ndMonth .ui-datepicker-header {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t/*@media only screen and (max-height: 820px) {\n\t\t\t.cellHeight {\n\t\t\t\theight:55px;\n\t\t\t}\n\t\t}*/\n\t\t</style>";
     // </editor-fold>
     $BLeft = new Button("Zurück", "back", "icon");
     $BLeft->rmePCR("mKalender", "", "setDisplay", $display - 1, "contentManager.loadFrame('contentScreen','mKalender');");
     $BLeft->style("margin-right:10px;");
     $BRight = new Button("Weiter", "navigation", "icon");
     $BRight->rmePCR("mKalender", "", "setDisplay", $display + 1, "contentManager.loadFrame('contentScreen','mKalender');");
     $BRight->style("margin-right:10px;");
     $BToday = new Button("Aktuelles Datum", "down", "icon");
     $BToday->rmePCR("mKalender", "", "setToday", '', "contentManager.loadFrame('contentScreen','mKalender');");
     $BToday->style("margin-right:10px;");
     $BJahr = new Button("Jahr", "./ubiquitous/Kalender/month.png", "icon");
     $BJahr->rmePCR("mKalender", "", "setView", "jahr", "contentManager.loadFrame('contentScreen','mKalender');");
     $BJahr->style("margin-right:10px;" . ($ansicht != "jahr" ? "opacity:0.5;" : ""));
     $BJahr->id("jahrButton");
     $BMonat = new Button("Monat", "./ubiquitous/Kalender/month.png", "icon");
     $BMonat->rmePCR("mKalender", "", "setView", "monat", "contentManager.loadFrame('contentScreen','mKalender');");
     $BMonat->style("margin-right:10px;" . ($ansicht != "monat" ? "opacity:0.5;" : ""));
     $BMonat->id("monatButton");
     $BWoche = new Button("Woche", "./ubiquitous/Kalender/workweek.png", "icon");
     $BWoche->rmePCR("mKalender", "", "setView", "woche", "contentManager.loadFrame('contentScreen','mKalender');");
     $BWoche->style("margin-right:10px;" . ($ansicht != "woche" ? "opacity:0.5;" : ""));
     $BWoche->id("wocheButton");
     $BTag = new Button("Tag", "./ubiquitous/Kalender/day.png", "icon");
     $BTag->rmePCR("mKalender", "", "setView", "tag", "contentManager.loadFrame('contentScreen','mKalender');");
     $BTag->style("margin-right:10px;" . ($ansicht != "tag" ? "opacity:0.5;" : ""));
     $BTag->id("tagButton");
     if (Applications::activeApplication() == "personalKartei") {
         $BTag = "";
         $BWoche = "";
         $BMonat = "";
     }
     if (Applications::activeApplication() != "personalKartei") {
         $BJahr = "";
     }
     $ST = new HTMLTable(1);
     $ST->setColClass(1, "");
     #$ST->setTableStyle("width:40px;margin:0px;margin-right:-215px;float:right;/*margin-right:-50px;margin-top:95px;*/");
     $newWindow = new Button("Kalender in neuem Fenster öffnen", "new_window", "iconicL");
     $newWindow->style("margin-right:10px;");
     $newWindow->newSession("Mail", Applications::activeApplication(), "mKalender", "Kalender");
     if (Session::physion()) {
         $newWindow = "";
     }
     $reminder = "";
     if (Session::isPluginLoaded("mReminder")) {
         $reminder = Reminder::getButton();
         $reminder->style("margin-right:10px;");
     }
     $ST->addRow("<div id=\"calendar1stMonth\"></div>");
     $ST->addRow("<div id=\"calendar2ndMonth\"></div>");
     $TC = "KalenderView" . ucfirst($ansicht);
     $TC = new $TC();
     $TCalendars = "<div>";
     if (trim($Calendars) != "") {
         $TCalendars .= "<div class=\"KalenderUser\">" . $Calendars . "</div>";
     }
     $TCalendars .= "</div>";
     $pCalButton = "";
     if (Session::isPluginLoaded("mpCal")) {
         $pCalButton = pCal::getTBButton();
         $pCalButton->type("icon");
         $pCalButton->style("margin-right:10px;");
     }
     $GoogleButton = "";
     $GoogleDLButton = "";
     if (Session::isPluginLoaded("mGoogle")) {
         $GoogleButton = LoginData::getButtonU("GoogleAccountUserPass", "Google-Daten bearbeiten", "./ubiquitous/Google/google.png");
         $GoogleButton->type("icon");
         $GoogleButton->style("margin-right:10px;");
         $GoogleDLButton = new Button("Daten herunterladen", "./ubiquitous/Google/googleDL.png", "icon");
         $GoogleDLButton->popup("", "Daten herunterladen", "Google", "-1", "syncByDateRange", array("'" . date("Y-m-d", $TC->getFirst()) . "'", "'" . date("Y-m-d", $TC->getLast()) . "'"));
         $GoogleDLButton->style("margin-right:10px;");
     }
     $xCalButton = "";
     if (Session::isPluginLoaded("mxCal")) {
         $xCalButton = xCal::getButton();
         $xCalButton->style("margin-right:10px;");
     }
     $BShare = new Button("Kalender teilen", "fork", "iconicL");
     $BShare->popup("", "Kalender teilen", "mKalender", "-1", "share");
     $BShare->style("margin-right:10px;");
     #$AWVButton = new Button("Müllabfuhr-Daten herunterladen", "trash_stroke", "iconicL");
     #$AWVButton->popup("", "Müllabfuhr-Daten", "mKalender", "-1", "downloadTrashData");
     $AWVButton = "";
     $ST->addRow($pCalButton . $GoogleButton . $GoogleDLButton);
     $html .= "\n\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"padding-top:30px;padding-bottom:15px;padding-left:0px;\">\n\t\t\t\t\t{$newWindow}{$BShare}{$AWVButton}{$xCalButton}{$reminder}\n\t\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div style=\"margin-right:270px;\">\n\t\t<div id=\"KalenderTitle\" class=\"prettyTitle\">\n\t\t\t\n\t\t\t<span style=\"float:right;\">\n\t\t\t\t{$BLeft}{$BToday}{$BRight}\n\t\t\t</span>\n\t\t\t<div style=\"float:right;margin-right:100px;\">{$BTag}{$BWoche}{$BMonat}{$BJahr}</div>\n\t\t\t" . $TC->getTitle() . "\n\t\t</div>\n\t\t</div>\n\t\t<div id=\"KalenderAuswahl\">\n\t\t\t{$TCalendars}\n\t\t</div>\n\t\t" . $TC->getHeader() . "\n\t\t<div id=\"KalenderWrapper\" style=\"overflow:auto;\">\n\t\t\t" . ($ansicht != "jahr" ? "\n\t\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"height:23px;\"></div>{$ST}\n\t\t\t</div>" : "") . "\n\t\t\t<div style=\"" . ($ansicht != "jahr" ? "margin-right:270px;" : "") . "\">\n\n\t\t\t" . $TC->getTable($this) . "\n\t\t\t</div>\n\t\t</div>";
     $nextMonths = new Datum();
     $nextMonths->setToMonth1st();
     $thisMonth = $nextMonths->time();
     $nextMonths->addMonth();
     $nextMonth = $nextMonths->time();
     $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar1stMonth').datepicker({ minDate: '" . date("d.m.Y", $thisMonth) . "'" . ($TC->getCurrent()->time() < $nextMonth ? ",defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true,  showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t\t\t\n\t\t\$j('.KalenderUser div[class!=backgroundColor1]').hover(function(){ \$j(this).addClass('backgroundColor2'); }, function(){ \$j(this).removeClass('backgroundColor2'); });\n\t\tfitKalender();\n\t\t\t\n\t\t\$j(window).resize(function() {\n\t\t\tfitKalender();\n\t\t});\n\t\t\n\t\t});\n\t\t\n\t\tfunction fitKalender(){\n\t\t\tif(!\$j('#KalenderTitle').length)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t//console.log(\$j('#KalenderTitle').outerHeight());\n\t\t\t//console.log(\$j('#KalenderAuswahl').outerHeight());\n\t\t\tvar height = (contentManager.maxHeight() - \$j('#KalenderAuswahl').outerHeight() - \$j('#KalenderTitle').outerHeight() - \$j('#KalenderHeader').outerHeight()) + 4;\n\t\t\tvar width = contentManager.maxWidth();\n\t\t\t\n\t\t\t\$j('#KalenderWrapper').css('height', height);\n\t\t\t\$j('#KalenderWrapper').css('width', width);\n\n\t\t\tvar cellHeight = (height - \$j('#KalenderTable tr:first th').parent().outerHeight()) / (\$j('#KalenderTable tr').length - " . (($ansicht == "monat" or $ansicht == "jahr") ? "1" : "0") . ") - 1;\n\t\t\t\$j('.cellHeight').css('height', cellHeight+'px');\n\t\t\t\$j('.innerCellHeight').css('height', (cellHeight - \$j('.innerCellTitle:visible').outerHeight())+'px');\n\t\t\t\n\t\t\tif(\$j('#KalenderHeader').length > 0){\n\t\t\t\t//console.log(\$j('#KalenderHeader tr:first th'));\n\t\t\t\t\$j('#KalenderTable tr:first td').each(function(k, v){\n\t\t\t\t\t\n\t\t\t\t\t\$j(\$j('#KalenderHeader tr:first th')[k]).css('width', \$j(v).width());\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tif(\$j('#tagDiv').length) {\n\t\t\t\t\$j('#tagDiv').css('width', \$j('#KalenderTable tr').width()+'px');\n\t\t\t\t\$j('#tagDiv').animate({scrollTop: 7*40}, 0);\n\t\t\t\tvar pos = \$j('#tagDiv').offset();\n\t\t\t\tpos.position = 'absolute';\n\n\t\t\t\t\$j('#tagDiv').css(pos)\n\t\t\t}\n\t\t}") . "\n\t\t<style type=\"text/css\">\n\t\t\t" . ($TC->getCurrent()->time() < $thisMonth ? "#calendar1stMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t" . ($TC->getCurrent()->time() < $nextMonth ? "#calendar2ndMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t.ui-datepicker-week-col { color:grey; text-align:left; }\n\t\t\ttr td.ui-datepicker-week-col {text-align:left;font-size:10px; }\n\t\t\t/*.ui-datepicker-week-end { background-color:#DDD; }*/\n\t\t</style>";
     $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar2ndMonth').datepicker({ minDate: '" . date("d.m.Y", $nextMonth) . "'" . ($TC->getCurrent()->time() >= $nextMonth ? ", defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true,  onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t});");
     return $html;
 }
Example #2
0
        setcookie("phynx_lastSeenBuild", Phynx::build(), time() + 3600 * 24 * 365);
    }
    $build = Phynx::build();
}
$validUntil = Environment::getS("validUntil", null);
if ($_SESSION["S"]->checkIfUserLoggedIn() == false) {
    $_SESSION["CurrentAppPlugins"]->scanPlugins();
}
$updateTitle = true;
$title = Environment::getS("renameFramework", "phynx by Furtmeier Hard- und Software");
if (isset($_GET["title"]) and preg_match("/[a-zA-Z0-9 _-]*/", $_GET["title"])) {
    $title = $_GET["title"];
    $updateTitle = false;
}
$favico = "./images/FHSFavicon.ico";
$sephy = Session::physion();
if ($sephy and isset($sephy[3]) and $sephy[3]) {
    $favico = $sephy[3];
}
?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
		<title><?php 
echo $title;
?>
</title>

		<link rel="shortcut icon" href="<?php 
Example #3
0
#print_r($_GET);
if (isset($_GET["cloud"]) and (isset($_SESSION["phynx_customer"]) and $_SESSION["phynx_customer"] != $_GET["cloud"] or !isset($_SESSION["phynx_customer"]))) {
    //if someone switches the cloud, kick him and reinitialize
    session_destroy();
    session_start();
}
if (!isset($_SESSION["classPaths"])) {
    $_SESSION["classPaths"] = array();
}
function phynxAutoloader($class_name)
{
    try {
        return findClass($class_name);
    } catch (ClassNotFoundException $e) {
        $_SESSION["classPaths"] = array();
        return findClass($class_name);
    }
}
if (!isset($_SESSION["S"]) or !isset($_SESSION["applications"]) or $_SESSION["applications"]->numAppsLoaded() == 0) {
    Session::init();
    if (Session::isPluginLoaded("mAutoLogin")) {
        mAutoLogin::doAutoLogin(null, null, null, isset($_GET["application"]) ? $_GET["application"] : null);
    }
}
if (Session::isPluginLoaded("mAutoLogin") and isset($_GET["application"])) {
    //for DEMO always switch application
    mAutoLogin::doAutoLogin(null, null, null, $_GET["application"]);
}
if ($physion != "default") {
    Session::physion($_GET["physion"], isset($_GET["application"]) ? $_GET["application"] : null, isset($_GET["plugin"]) ? $_GET["plugin"] : null, isset($_GET["icon"]) ? $_GET["icon"] : null);
}
Example #4
0
 public function getHTML($id)
 {
     if ($_SESSION["S"]->checkIfUserLoggedIn() == true) {
         return -1;
     }
     $es = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     $ts = $_SESSION["CurrentAppPlugins"]->getMenuTargets();
     $icons = $_SESSION["CurrentAppPlugins"]->getIcons();
     $appIco = $_SESSION["applications"]->getApplicationIcon($_SESSION["applications"]->getActiveApplication());
     if (isset($_COOKIE["phynx_color"]) and $_COOKIE["phynx_color"] != "standard") {
         $suffix = strrchr($appIco, ".");
         $newLogo = str_replace($suffix, ucfirst($_COOKIE["phynx_color"]) . $suffix, $appIco);
         if (file_exists("." . $newLogo)) {
             $appIco = $newLogo;
         }
     }
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     $newAppIco = Aspect::joinPoint("appLogo", $this, __METHOD__);
     if ($newAppIco != null) {
         $appIco = $newAppIco;
     }
     // </editor-fold>
     $appMenuHidden = "";
     $appMenuDisplayed = "";
     $appMenuActive = (!$_SESSION["S"]->isUserAdmin() and (!isset($_COOKIE["phynx_layout"]) or $_COOKIE["phynx_layout"] == "fixed" or $_COOKIE["phynx_layout"] == "horizontal" or $_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical"));
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     $aspectAppMenuActive = Aspect::joinPoint("appMenuActive", $this, __METHOD__);
     if ($aspectAppMenuActive !== null) {
         $appMenuActive = $aspectAppMenuActive;
     }
     // </editor-fold>
     $appIco = Environment::getS("ApplicationIcon:" . Applications::activeApplication(), $appIco);
     if ($appIco != "") {
         if (count($_SESSION["applications"]->getApplicationsList()) > 1 and !$_SESSION["S"]->isAltUser()) {
             echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden/Anwendung wechseln\" title=\"Abmelden/Anwendung wechseln\" onclick=\"" . Environment::getS("onLogout", "phynxContextMenu.start(this, 'Menu','1','Anwendung wechseln:','right');") . "\" />";
         } else {
             echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden\" title=\"Abmelden\" onclick=\"" . Environment::getS("onLogout", "userControl.doLogout();") . "\" />";
         }
     }
     $bigWorld = false;
     if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")) {
         $bigWorld = true;
     }
     if (!$_SESSION["S"]->isUserAdmin()) {
         $userHiddenPlugins = mUserdata::getHiddenPlugins();
         $U = new mUserdata();
         $U->addAssocV3("typ", "=", "TTP");
         $B = new Button(Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()), "application");
         $B->type("icon");
         $B->className($bigWorld ? "tabImg" : "smallTabImg");
         #".(($t == null OR $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"")."
         $B->hasMouseOverEffect(false);
         $B->id("busyBox");
         #$appMenuHidden = $this->getAppMenuOrder("appMenuHidden");
         $appMenuDisplayed = $this->getAppMenuOrder("appMenuDisplayed");
         #if($appMenuDisplayed != "" AND $appMenuHidden == "")
         #	$appMenuHidden = implode(";", array_diff(array_values($es), explode(";", $appMenuDisplayed)));
     }
     $appMenuH = "\n\t\t\t<li id=\"appMenu_emptyList\" style=\"height:auto;" . ($appMenuHidden != "emptyList" ? "display:none;" : "") . "\">Ziehen Sie Einträge auf diese Seite, um sie aus dem Menü auszublenden und nur hier anzuzeigen.</li>";
     $appMenuD = "";
     if ($appMenuActive) {
         $es = self::sort($es, $appMenuDisplayed);
     }
     #, $appMenuHidden);
     echo "\n\t\t\t<div id=\"navTabsWrapper\">";
     if ($appMenuActive) {
         echo "\n\t\t\t<div\n\t\t\t\tclass=\"navBackgroundColor navBorderColor " . ($bigWorld ? "" : " smallTab") . " navTab\"\n\t\t\t\tid=\"SpellbookMenuEntry\"\n\t\t\t>\n\t\t\t\t<div onclick=\"contentManager.loadPlugin('contentScreen', 'Spellbook', 'SpellbookGUI;-');\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\t\t\t\t{$B}" . ($bigWorld ? Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()) : "") . "\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     $collapsedTabs = Environment::getS("collapsedTabs", "0") == "1";
     foreach ($es as $key => $value) {
         if (isset($userHiddenPlugins[$value])) {
             continue;
         }
         $single = $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($value);
         $anyC = new anyC();
         $text = $anyC->loadLanguageClass($single);
         if ($text != null and $text->getMenuEntry() != "") {
             $key = $text->getMenuEntry();
         }
         $t = !$_SESSION["S"]->isUserAdmin() ? $U->getUDValueCached("ToggleTab{$value}") : "big";
         if ($t == null and $collapsedTabs) {
             $t = "small";
         }
         $key = Aspect::joinPoint("renameTab", $this, __METHOD__, array($key), $key);
         if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "vertical" or $_COOKIE["phynx_layout"] == "desktop")) {
             $t = "big";
         }
         #$emptyFrame = "contentLeft";
         #if(isset($ts[$value]) AND $ts[$value] == "contentLeft") $emptyFrame = "contentRight";
         #$onclick = "contentManager.emptyFrame('contentLeft'); contentManager.emptyFrame('contentRight'); contentManager.emptyFrame('contentScreen'); contentManager.loadFrame('".(isset($ts[$value]) ? $ts[$value] : "contentRight")."', '$value', -1, 0, '{$value}GUI;-');$('windows').update('');";
         $onclick = "contentManager.loadPlugin('" . (isset($ts[$value]) ? $ts[$value] : "contentRight") . "', '{$value}', '{$value}GUI;-');";
         $B = new Button($key, $icons[$value]);
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $BM = new Button("Reihenfolge ändern", "./images/i2/topdown.png");
         $BM->type("icon");
         $BM->style("float:right;margin-right:5px;");
         $BM->className("appMenuHandle");
         $appMenu = "\n\t\t\t<li\n\t\t\t\tid=\"appMenu_{$value}\"\n\t\t\t\tonmouseover = \"this.className = 'navBackgroundColor';\"\n\t\t\t\tonmouseout = \"this.className = '';\"\n\t\t\t>\n\t\t\t\t{$BM}\n\t\t\t\t<div\n\t\t\t\t\tonclick=\"appMenu.hide(); {$onclick}\"\n\t\t\t\t>\n\t\t\t\t{$B}<p>{$key}</p>\n\t\t\t\t</div>\n\t\t\t</li>";
         if (strpos($appMenuHidden, $value) !== false) {
             $appMenuH .= $appMenu;
         } else {
             $appMenuD .= $appMenu;
         }
         $style = (strpos($appMenuHidden, $value) !== false and $appMenuActive) ? "style=\"display:none;\"" : "";
         echo "\n\t\t\t\t\n\t\t\t\t<div\n\t\t\t\t\tid=\"" . $value . "MenuEntry\"\n\t\t\t\t\tclass=\"navBackgroundColor navBorderColor " . (($t == null or $t == "big") ? "" : " smallTab") . " navTab\"\n\t\t\t\t\t{$style}\n\t\t\t\t\t>\n\t\t\t\t\t<!--<img\n\t\t\t\t\t\tstyle=\"margin-top:-28px;float:left;\"\n\t\t\t\t\t\tid=\"" . $value . "TabMinimizer\"\n\t\t\t\t\t\tclass=\"navTabMinimizer\"\n\t\t\t\t\t\ttitle=\"Tab {$key} vergrößern/verkleinern\"\n\t\t\t\t\t\tonclick=\"toggleTab('{$value}');\"\n\t\t\t\t\t\tsrc=\"./images/i2/tabMinimize.png\" />-->\n\t\t\t\t\t\n\t\t\t\t\t<div onclick=\"{$onclick}\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tid=\"" . $value . "MenuImage\"\n\t\t\t\t\t\t\ttitle=\"{$key}\"\n\t\t\t\t\t\t\t" . (($t == null or $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"") . "\n\t\t\t\t\t\t\tsrc=\"{$icons[$value]}\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t" . (($t == null or $t == "big") ? $key : "") . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
     }
     echo "\n\t\t\t\t<div style=\"float:none;clear:both;border:0px;height:0px;width:0px;margin:0px;padding:0px;\"></div>\n\t\t\t</div>";
     /*
     			<div id=\"appMenuContainer\" class=\"backgroundColor0 navBorderColor\" style=\"display:none;\">
     				<ul style=\"min-height:50px;\" id=\"appMenuHidden\">$appMenuH</ul>
     				<p class=\"backgroundColor2\" style=\"cursor:pointer;background-image:url(./images/navi/down.png);background-repeat:no-repeat;background-position:95% 50%;\" onclick=\"if($('appMenuDisplayedContainer').style.display == 'none') new Effect.BlindDown('appMenuDisplayedContainer'); else new Effect.BlindUp('appMenuDisplayedContainer');\">Weitere Reiter</p>
     				<div id=\"appMenuDisplayedContainer\" style=\"display:none;\"><ul style=\"min-height:50px;\" id=\"appMenuDisplayed\">$appMenuD</ul><p>Um die Sortierung der Einträge zu übernehmen, muss die Anwendung <a href=\"#\" onclick=\"Installation.reloadApp(); return false;\">neu geladen werden</a>.</p></div>
     			</div>";*/
     #echo OnEvent::script("");
     if (!$_SESSION["S"]->isUserAdmin()) {
         $ud = new mUserdata();
         $al = $ud->getUDValue("noAutoLogout", "false");
         if ($al == "true") {
             echo "<script type=\"text/javascript\">contentManager.startAutoLogoutInhibitor();</script>";
         }
     }
     echo OnEvent::script("contentManager.isAltUser = "******"true" : "false") . ";");
     try {
         $c = get_class(Session::currentUser());
         $U = new $c(Session::currentUser()->getID());
         echo "<script type=\"text/javascript\">\$j.datepicker.setDefaults(\$j.datepicker.regional['" . $U->A("language") . "']); " . (Session::physion() ? "\$j('#navigation').hide();" : "") . "</script>";
     } catch (Exception $e) {
     }
 }
Example #5
0
 public function __toString()
 {
     #$style = "";
     if ($this->type == "date" and strpos($this->style, "width:") === false) {
         $this->style .= "width:87%;";
     }
     #if($this->style != null) $style = " style=\"$this->style\"";
     switch ($this->type) {
         case "audio":
             return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>";
             break;
         case "search":
             $currentId = $this->id != null ? $this->id : $this->name . rand(100, 100000000);
             $enter = "if(\$j('#{$currentId}').val() != ''){ \$j('#SB{$currentId}').fadeOut(200, function(){ \$j('#SA{$currentId}').fadeIn();}); } else { \$j('#SA{$currentId}').fadeOut(200, function(){ \$j('#SB{$currentId}').fadeIn(); }); }";
             $I = new HTMLInput($this->name, "text", $this->value, $this->options);
             $I->style($this->style);
             $I->placeholder($this->placeholder);
             $I->onEnter($this->onenter . $enter);
             #$I->onEnter(" ");
             $I->id($currentId);
             $BSearch = new Button("Suchen", "question_mark", "iconicG");
             $BSearch->style("margin-left:5px;");
             $BSearch->id("SB{$currentId}");
             $BSearch->onclick($this->onenter . $enter);
             #$BSearch->id("searchMailsInfo");
             $BSearchClear = new Button("Suche beenden", "x_alt", "iconicR");
             $BSearchClear->style("margin-left:5px;display:none;");
             $BSearchClear->id("SA{$currentId}");
             $BSearchClear->onclick("\$j('#{$currentId}').val('').trigger('blur'); {$this->onenter}{$enter}");
             #$BSearchClear->id("searchMailsClear");
             return $I . $BSearch . $BSearchClear . $this->requestFocus;
             break;
         case "HTMLEditor":
             $B = new Button("in HTML-Editor\nbearbeiten", "editor");
             $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->className("backgroundColor2");
             return $B->__toString();
             break;
         case "TextEditor":
             #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>";
             $B = new Button("in Editor\nbearbeiten", "editor");
             $B->className("backgroundColor2");
             $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             $ITA->id($this->name);
             $ITA->style("display:none;");
             return $B->__toString() . $ITA;
             break;
         case "nicEdit":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "nicEdit", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "tinyMCE":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->popup("", "Editor", "Wysiwyg", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "multiInput":
             return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>";
             break;
             /*case "customSelection":
             				$B = new Button("Eintrag auswählen...", "gutschrift");
             				$B->type("LPBig");
             				$B->style("float:right;margin-left:10px;");
             				#				 "contentRight"		"callingPluginID"  "selectPlugin"
             				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
             
             				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
             			break;*/
         /*case "customSelection":
         				$B = new Button("Eintrag auswählen...", "gutschrift");
         				$B->type("LPBig");
         				$B->style("float:right;margin-left:10px;");
         				#				 "contentRight"		"callingPluginID"  "selectPlugin"
         				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
         
         				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
         			break;*/
         case "textarea":
             if ($this->isDisplayMode) {
                 return nl2br($this->value);
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 $this->onfocus .= " contentManager.oldValue = this.value;";
                 $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->onblur .= "if(contentManager.oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 if ($this->hasFocusEvent) {
                     $this->onfocus .= "focusMe(this);";
                     $this->onblur .= "blurMe(this);";
                 }
                 $this->hasFocusEvent = false;
             }
             return "<textarea\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . (!$this->autocorrect ? "autocorrect=\"off\"" : "") . "\n\t\t\t\t\t" . (!$this->spellcheck ? "spellcheck=\"false\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>";
             break;
         case "file":
             $physion = Session::physion();
             $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000);
             if (isset($this->options["autoUpload"]) and !$this->options["autoUpload"]) {
                 $this->callback = "QQUploader{$currentId}.uploadStoredFiles();";
             }
             return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;{$this->style}\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tQQUploader{$currentId} = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\tsizeLimit: " . Util::toBytes(ini_get("upload_max_filesize")) . ",\n\t\t\t\t\t\t\telement: \$j('#{$currentId}')[0],\n\t\t\t\t\t\t\taction: './interface/set.php',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["targetFilename"])) ? ",'targetFilename':'" . $this->options["targetFilename"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . ($physion ? ",'physion':'{$physion['0']}'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t" . (isset($this->options["autoUpload"]) ? "autoUpload: " . ($this->options["autoUpload"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\t" . (isset($this->options["multiple"]) ? "multiple: " . ($this->options["multiple"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$j('#progress_{$currentId}').css('display', 'block');},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$j('progress_{$currentId}').css('display', 'none'); {$this->onchange} },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$j('#progressBar_{$currentId}').css('width', Math.ceil((loaded / total) * 100)+'%'); }});\n\t\t\t\t\t</script>";
             break;
         case "time":
             $this->type = "text";
             if (!$this->id) {
                 $this->id = rand(100000, 9999999) . $this->name;
             }
             #$this->onkeyup .= "if(\$j(this).val().length == 2 && \$j(this).val().lastIndexOf(':') == -1) \$j(this).val(\$j(this).val()+':'); ";
             if ($this->connectTo) {
                 $this->onkeyup .= "contentManager.connectedTimeInput(event, '{$this->id}', '{$this->connectTo}'); ";
             } else {
                 $this->onkeyup .= "contentManager.timeInput(event, '{$this->id}'); ";
             }
         case "radio1":
         case "date":
         case "email":
         case "text":
         case "hidden":
         case "submit":
         case "number":
         case "button":
         case "password":
         case "checkbox":
         case "readonly":
         case "fileold":
             $JS = "";
             if ($this->type == "radio1") {
                 $this->type = "radio";
             }
             if ($this->type == "fileold") {
                 $this->type = "file";
             }
             if ($this->isDisplayMode) {
                 if ($this->type == "checkbox") {
                     return Util::catchParser($this->value);
                 }
                 if ($this->type == "hidden") {
                     return "";
                 }
                 if ($this->type == "password") {
                     return str_repeat("*", mb_strlen($this->value));
                 }
                 return $this->value . "";
             }
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             $cal = "";
             $B2 = "";
             if ($this->type == "date") {
                 if ($this->id == null) {
                     $this->id = rand(10000, 90000);
                 }
                 $cal = new Button("Kalender anzeigen", "calendar", "iconic");
                 $cal->onclick("\$j('#{$this->id}').focus();");
                 $cal->style("float:right;");
                 $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>";
                 $this->type = "text";
             }
             $value = "value=\"" . htmlspecialchars($this->value) . "\"";
             if ($this->type == "checkbox") {
                 $value = $this->value == "1" ? "checked=\"checked\"" : "";
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 if ($this->type == "checkbox") {
                     $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 } else {
                     $this->onfocus .= " oldValue = this.value;";
                     $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                     $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
             }
             if ($this->autocomplete != null) {
                 if ($this->id == null) {
                     $this->id = $this->name;
                 }
                 /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);";
                 		$this->onblur .= " ACInputHasFocus = false; AC.end(this);";
                 		$this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/
                 $this->autocompleteBrowser = false;
                 $cal = $this->autocomplete[5];
                 #new Button("Suche", "./images/i2/details.png");
                 $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();");
                 if ($cal->getStyle() == "") {
                     $cal->style("float:right;");
                 }
                 if ($this->autocomplete[4] != null) {
                     $B2 = $this->autocomplete[4];
                     $B2->style("float:right;margin-left:5px;");
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:80%";
                     }
                 } else {
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:87%";
                     }
                 }
                 if ($this->autocomplete[1] == null) {
                     $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}').value = ''; \$('{$this->id}Display').focus();");
                     $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value));
                     $IN->id($this->name);
                     $JS .= $IN;
                     $this->autocomplete[1] = "function(selection){ \$('{$this->id}').value = selection.value; \$('{$this->id}Display').value = selection.label; return false; }";
                     if ($this->value != "") {
                         $C = substr($this->autocomplete[0], 1) . "GUI";
                         $C = new $C($this->value);
                         $value = "value=\"" . htmlspecialchars($C->ACLabel()) . "\"";
                     }
                     $this->id .= "Display";
                 }
                 $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"ui-autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li>\" )\n\t\t\t\t\t\t\t.data( \"item.ui-autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};");
             }
             return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->maxlength != null ? " maxlength=\"{$this->maxlength}\"" : "") . "\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}";
             break;
         case "option":
             return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>";
             break;
         case "radio":
             $html = "";
             foreach ($this->options as $k => $v) {
                 $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>";
             }
             return $html;
             break;
         case "select":
         case "select-multiple":
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->type == "select-multiple") {
                 $values = trim($this->value) != "" ? explode(";:;", $this->value) : array();
             }
             if ($this->isDisplayMode) {
                 return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value];
             }
             if ($this->multiEditOptions != null) {
                 $this->onchange("saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");");
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             $html = "<select " . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . " " . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . " " . ($this->size ? "size=\"{$this->size}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">";
             if ($this->options != null and is_array($this->options)) {
                 foreach ($this->options as $k => $v) {
                     if (!is_object($v)) {
                         if ($this->type == "select") {
                             $isThisIt = $this->value == $k;
                         } else {
                             $isThisIt = in_array($k, $values);
                         }
                         $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
                     } else {
                         if ($this->value == $k or $v->getValue() == $this->value) {
                             $v->isSelected(true);
                         }
                         $html .= $v;
                     }
                 }
             }
             $html .= "</select>";
             return $html;
             break;
     }
 }
Example #6
0
        SysMessages::log($errortype[$errno] . ": " . $errmsg . "\n{$filename}:{$linenum}", "PHP");
    } catch (Exception $e) {
    }
}
session_start();
if (isset($_COOKIE["phynx_customer"]) and isset($_GET["cloud"]) and $_COOKIE["phynx_customer"] != $_GET["cloud"]) {
    //if someone switches the cloud, kick him and reinitialize
    session_destroy();
    session_start();
}
if (!isset($_SESSION["classPaths"])) {
    $_SESSION["classPaths"] = array();
}
function __autoload($class_name)
{
    try {
        return findClass($class_name);
    } catch (ClassNotFoundException $e) {
        $_SESSION["classPaths"] = array();
        return findClass($class_name);
    }
}
if (!isset($_SESSION["S"]) or !isset($_SESSION["applications"]) or $_SESSION["applications"]->numAppsLoaded() == 0) {
    Session::init();
    if (Session::isPluginLoaded("mAutoLogin")) {
        mAutoLogin::doAutoLogin();
    }
}
if ($physion != "default" and isset($_GET["application"]) and isset($_GET["plugin"])) {
    Session::physion($_GET["physion"], $_GET["application"], $_GET["plugin"]);
}