本文整理汇总了PHP中Util::getRootPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::getRootPath方法的具体用法?PHP Util::getRootPath怎么用?PHP Util::getRootPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util::getRootPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHTML
function getHTML($id)
{
$this->loadMeOrEmpty();
$gui = new HTMLGUI2();
$gui->setObject($this);
$gui->setName("RSSFilter");
$gui->setShowAttributes(array("RSSFilterName", "RSSFilterFeed", "RSSFilterAdapter", "RSSFilterJDID", "RSSFilterAutoDL", "RSSFilterProviderRapidshare", "RSSFilterProviderNetload", "RSSFilterProviderUploaded"));
$gui->setLabel("RSSFilterName", "Name");
$gui->setLabel("RSSFilterFeed", "Feed URL");
$gui->setLabel("RSSFilterAdapter", "Adapter");
$gui->setLabel("RSSFilterJDID", "DL with");
$gui->setLabel("RSSFilterProviderRapidshare", "Rapidshare.com");
$gui->setLabel("RSSFilterProviderNetload", "Netload");
$gui->setLabel("RSSFilterProviderUploaded", "Uploaded");
$gui->setLabel("RSSFilterAutoDL", "Auto-DL?");
$gui->setType("RSSFilterProviderRapidshare", "checkbox");
$gui->setType("RSSFilterProviderNetload", "checkbox");
$gui->setType("RSSFilterAutoDL", "checkbox");
$gui->setType("RSSFilterProviderUploaded", "checkbox");
$gui->insertSpaceAbove("RSSFilterJDID");
$gui->setFieldDescription("RSSFilterAutoDL", "Currently only works when using JDownloader RC, Qnap and pyLoad. Will have no effect otherwise.");
$gui->selectWithCollection("RSSFilterJDID", new mJDGUI(), "JDName", "nicht herunterladen");
$gui->setStandardSaveButton($this);
$Tab = new HTMLSideTable("right");
$B = new Button("show filtered\nfeed", "./trinityDB/RSSFilter/Filtered.png");
$B->onclick("window.open('./trinityDB/RSSFilter/FilteredFeed.php?RSSFilterID=" . $this->getID() . "', 'Filtered feed');");
$Tab->addRow($B);
$FB = new FileBrowser();
$FB->addDir(Util::getRootPath() . "trinityDB/RSSFilter");
$Adapters = $FB->getAsLabeledArray("iFeedFilter", ".class.php", true);
$gui->setType("RSSFilterAdapter", "select");
$gui->setOptions("RSSFilterAdapter", array_values($Adapters), array_keys($Adapters));
return $Tab . $gui->getEditHTML();
}
示例2: cleanUp
public static function cleanUp()
{
if (!file_exists(Util::getRootPath() . "../phynxPublic/filelink")) {
return;
}
$delete = array();
$dir = new DirectoryIterator(Util::getRootPath() . "../phynxPublic/filelink/");
foreach ($dir as $file) {
if ($file->isDot()) {
continue;
}
if (!$file->isDir()) {
continue;
}
if ($file->getCTime() < time() - 3600 * 24 * 14) {
$delete[] = $file->getPathname();
}
}
foreach ($delete as $dir) {
$D = new DirectoryIterator($dir);
foreach ($D as $file) {
if ($file->isDot()) {
continue;
}
if ($file->isDir()) {
continue;
}
unlink($file->getPathname());
}
rmdir($dir);
}
}
示例3: loadPlugin
public function loadPlugin($app, $folder, $optional = false)
{
if (!file_exists(Util::getRootPath() . "{$app}/{$folder}/plugin.xml") and !$optional) {
throw new Exception("Required plugin {$app}/{$folder} not available (1)");
}
if (!file_exists(Util::getRootPath() . "{$app}/{$folder}/plugin.xml")) {
return false;
}
$xml = new XMLPlugin(Util::getRootPath() . "{$app}/{$folder}/plugin.xml");
$allowedPlugins = Environment::getS("allowedPlugins", false);
$extraPlugins = Environment::getS("pluginsExtra", false);
$allow = false;
if ($allowedPlugins !== false and in_array($xml->registerClassName(), $allowedPlugins)) {
$allow = true;
}
if ($extraPlugins !== false and in_array($xml->registerClassName(), $extraPlugins)) {
$allow = true;
}
if ($allowedPlugins !== false and !$allow) {
if (!$optional) {
throw new Exception("Required plugin {$app}/{$folder} not available (2)");
}
return false;
}
require_once Util::getRootPath() . "{$app}/{$folder}/" . $xml->registerClassName() . ".class.php";
$this->addClassPath(Util::getRootPath() . "{$app}/{$folder}");
return true;
}
示例4: getRelPath
function getRelPath()
{
$Path = $this->A("FileDir") . "/" . $this->A("FileName");
$pAF = Util::getRootPath();
#str_replace("interface","",dirname($_SERVER["PHP_SELF"]));
return str_replace($pAF, "./", substr($Path, strpos($Path, $pAF)));
}
示例5: getCMSHTML
function getCMSHTML()
{
$key = substr(Util::eK(), 0, 5);
if (!isset($_GET["key"]) or $key != $_GET["key"]) {
return "<span style=\"color:red;\">Bitte geben Sie den richtigen Schlüssel zum Aufrufen der Seite in der Adresszeile an.</span>";
}
registerClassPath("Einkaufszettel", Util::getRootPath() . "fheME/Einkaufszettel/Einkaufszettel.class.php");
/*
registerClassPath("GSRaumgruppe", Util::getRootPath()."FCalc/GSRaumgruppe/GSRaumgruppe.class.php");
registerClassPath("ObjektL", Util::getRootPath()."personalKartei/ObjekteL/ObjektL.class.php");
registerClassPath("mGSTaetigkeitGUI", Util::getRootPath()."FCalc/GSTaetigkeit/mGSTaetigkeitGUI.class.php");
registerClassPath("GSTaetigkeit", Util::getRootPath()."FCalc/GSTaetigkeit/GSTaetigkeit.class.php");
*
*/
$AC = anyC::get("Einkaufszettel");
$AC->addAssocV3("EinkaufszettelBought", "=", "0");
$AC->addOrderV3("EinkaufszettelName");
$html = "<style type=\"text/css\">\n\t\t\t\tbody {\n\t\t\t\t\tmargin:0px;\n\t\t\t\t\tmargin-top:10px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entry {\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryTouch {\n\t\t\t\t\tbackground-color: #c5d674;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div id=\"einkaufsliste\">";
while ($E = $AC->getNextEntry()) {
$html .= "<div id=\"entry" . $E->getID() . "\" onclick=\"CustomerPage.rme('setBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').remove(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\" class=\"nonEmpty entry backgroundColor1 borderColor1\">" . ($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : "") . "</div>";
}
$html .= "<div style=\"" . ($AC->numLoaded() == 0 ? "" : "display:none;") . "\" class=\"entry backgroundColor1 borderColor1\" id=\"emptyEntry\">Die Einkaufsliste enthält keine Einträge.<br /><small style=\"color:grey;\">" . Util::CLDateParser(time()) . "</small></div>";
$html .= "</div>";
return $html . OnEvent::script("\$('.entry').hammer().on('touch', function(){ \$(this).addClass('entryTouch'); }); \$('.entry').hammer().on('release', function(){ \$(this).removeClass('entryTouch'); });");
}
示例6: getCMSHTML
function getCMSHTML()
{
$key = substr(Util::eK(), 0, 5);
if (!isset($_GET["key"]) or $key != $_GET["key"]) {
return "<span style=\"color:red;\">Bitte geben Sie den richtigen Schlüssel zum Aufrufen der Seite in der Adresszeile an.</span>";
}
registerClassPath("Einkaufszettel", Util::getRootPath() . "fheME/Einkaufszettel/Einkaufszettel.class.php");
/*
registerClassPath("GSRaumgruppe", Util::getRootPath()."FCalc/GSRaumgruppe/GSRaumgruppe.class.php");
registerClassPath("ObjektL", Util::getRootPath()."personalKartei/ObjekteL/ObjektL.class.php");
registerClassPath("mGSTaetigkeitGUI", Util::getRootPath()."FCalc/GSTaetigkeit/mGSTaetigkeitGUI.class.php");
registerClassPath("GSTaetigkeit", Util::getRootPath()."FCalc/GSTaetigkeit/GSTaetigkeit.class.php");
*
*/
$AC = anyC::get("Einkaufszettel");
$AC->addAssocV3("EinkaufszettelBought", "=", "0");
$AC->addJoinV3("EinkaufszettelKategorie", "EinkaufszettelEinkaufszettelKategorieID", "=", "EinkaufszettelKategorieID");
$AC->addOrderV3("EinkaufszettelKategorieName");
$AC->addOrderV3("EinkaufszettelName");
$html = "<style type=\"text/css\">\n\t\t\t\tbody {\n\t\t\t\t\tmargin:0px;\n\t\t\t\t\tmargin-top:10px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@media only screen and (max-width: 360px) {\n\t\t\t\t\thtml {\n\t\t\t\t\t\tzoom: .8;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t.entry {\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\t-webkit-tap-highlight-color:rgba(255,255,255,0);\n\t\t\t\t\twidth:100%;\n\t\t\t\t\tbox-sizing:border-box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryRestore {\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\tcolor:#444;\n\t\t\t\t\t-webkit-tap-highlight-color:rgba(255,255,255,0);\n\t\t\t\t\twidth:100%;\n\t\t\t\t\tbox-sizing:border-box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.backgroundColor4 {\n\t\t\t\t\tbackground-color: #eee;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryTouch {\n\t\t\t\t\tbackground-color: #c5d674;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.borderColor0 {\n\t\t\t\t\tborder-color:white;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div id=\"einkaufsliste\">";
$B = new Button("Wiederherstellen", "undo", "iconicL");
$last = null;
while ($E = $AC->getNextEntry()) {
if ($last != $E->A("EinkaufszettelKategorieName") and $last !== null) {
$html .= "<h1 style=\"padding-left:10px;padding-top:15px;padding-bottom:7px;\">" . $E->A("EinkaufszettelKategorieName") . "</h1>";
}
$html .= "\n\t\t\t\t<div\n\t\t\t\t\tid=\"entry" . $E->getID() . "\"\n\t\t\t\t\tontouchend=\"if(Touch.cancelNext) return; CustomerPage.rme('setBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').hide(); \$('#restoreEntry" . $E->getID() . "').show(); \$('#emptyEntry').hide(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\"\n\t\t\t\t\tclass=\"nonEmpty entry backgroundColor1 borderColor1\">\n\t\t\t\t\t\n\t\t\t\t\t" . ($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : "") . "\n\t\t\t\t</div>\n\t\t\t\t<div \n\t\t\t\t\tclass=\"nonEmpty entryRestore backgroundColor4 borderColor0\"\n\t\t\t\t\tontouchend=\"if(Touch.cancelNext) return; CustomerPage.rme('setUnBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').show(); \$('#restoreEntry" . $E->getID() . "').hide(); \$('#emptyEntry').hide(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\"\n\t\t\t\t\tid=\"restoreEntry" . $E->getID() . "\" style=\"display:none;\">" . $E->A("EinkaufszettelName") . " {$B}</div>";
$last = $E->A("EinkaufszettelKategorieName");
}
$html .= "<div style=\"" . ($AC->numLoaded() == 0 ? "" : "display:none;") . "\" class=\"entry backgroundColor1 borderColor1\" id=\"emptyEntry\">Die Einkaufsliste enthält keine Einträge.<br /><small style=\"color:grey;\">" . Util::CLDateParser(time()) . "</small></div>";
$html .= "</div>";
return $html . OnEvent::script("\n\t\tvar Touch = {};\n\t\t\n\t\t\$(document).on('touchstart mousedown', '[ontouchend]', function(ev){\n\t\t\t\$(this).addClass('entryTouch'); \n\t\t\t\n\t\t\tTouch.startPos = [ev.clientX, ev.clientY];\n\t\t\tTouch.cancelNext = false;\n\t\t\tTouch.inAction = this;\n\t\t\n\t\t}); \n\t\t\n\t\t\$(document).on('touchend mouseup', '[ontouchend]', function(ev){\n\t\t\t\$(this).removeClass('entryTouch');\n\t\t\tTouch.inAction = false;\n\t\t});\n\t\t\t\n\t\t\$(document).on('touchmove mousemove', '[ontouchend]', function(ev){\n\t\t\tif(!Touch.inAction)\n\t\t\t\treturn;\n\n\t\t\tif(Math.abs(ev.clientX - Touch.startPos[0]) < 15 && Math.abs(ev.clientY - Touch.startPos[1]) < 15)\n\t\t\t\treturn;\n\n\t\t\tTouch.cancelNext = true;\n\t\t\t\$('.entryTouch').removeClass('entryTouch');\n\t\t\t\n\t\t\t//\$(ev.target).trigger('touchend');\n\t\t});\n\t");
}
示例7: getDBData
public function getDBData($newFolder = null)
{
$external = false;
if (file_exists(Util::getRootPath() . "../../phynxConfig")) {
$newFolder = Util::getRootPath() . "../../phynxConfig/";
$external = true;
}
if (file_exists(Util::getRootPath() . "../phynxConfig")) {
$newFolder = Util::getRootPath() . "../phynxConfig/";
$external = true;
}
if ($newFolder == null) {
$newFolder = Util::getRootPath() . "system/DBData/";
}
$findFor = "*";
if (isset($_SERVER["HTTP_HOST"])) {
$findFor = $_SERVER["HTTP_HOST"];
}
$data = new mInstallation();
if ($newFolder != "") {
$data->changeFolder($newFolder);
}
$data->setAssocV3("httpHost", "=", $findFor);
#$data->loadCollectionV2();
$n = $data->getNextEntry();
if ($n == null) {
#$data = new mInstallation();
#if($newFolder != "") $data->changeFolder($newFolder);
$data = new mInstallation();
if ($newFolder != "") {
$data->changeFolder($newFolder);
}
$data->setAssocV3("httpHost", "=", "*");
$n = $data->getNextEntry();
}
if ($n != null) {
$n->changeFolder($newFolder);
$d = $n->getA();
} else {
if (!isset($_SERVER["HTTP_CLOUD"])) {
$I = new Installation(-1);
$I->changeFolder($newFolder);
$I->makeNewInstallation();
$d = $I->getA();
}
}
$I2 = new Installation(-1);
$s = PMReflector::getAttributesArray($I2->newAttributes());
$t = array();
if (isset($d)) {
foreach ($s as $key => $value) {
$t[$value] = $d->{$value};
}
}
$t["external"] = $external;
$rt = Environment::getS("databaseData", $t);
return $rt;
}
示例8: scanApplications
public function scanApplications()
{
$_SESSION["messages"]->startMessage("checking for directory ./applications/: ");
if (is_dir(Util::getRootPath() . "applications/")) {
$_SESSION["messages"]->endMessage("found");
$apps = array();
$fp = opendir(Util::getRootPath() . "applications/");
while (($file = readdir($fp)) !== false) {
if (strpos($file, "Application") === false) {
continue;
}
$apps[] = $file;
}
sort($apps);
$allowedApplications = Environment::getS("allowedApplications", null);
foreach ($apps as $key => $file) {
require Util::getRootPath() . "applications/{$file}";
$f = explode(".", $file);
if ($f[0][0] == "-") {
continue;
}
$_SESSION["messages"]->startMessage("trying to register application {$f['0']}: ");
$f = $f[0];
$c = new $f();
if ($allowedApplications != null and !in_array($c->registerName(), $allowedApplications)) {
continue;
}
$this->apps[$c->registerName()] = $c->registerFolder();
if (method_exists($c, "registerIcon")) {
$this->icons[$c->registerName()] = $c->registerIcon();
}
if (method_exists($c, "registerVersion")) {
$this->versions[$c->registerName()] = $c->registerVersion();
}
$_SESSION["messages"]->endMessage("loaded");
unset($c);
}
} else {
$_SESSION["messages"]->endMessage("not found");
}
foreach ($this->apps as $name => $folder) {
$newName = Environment::getS("renameApplication:{$name}", $name);
if ($name != $newName) {
$this->apps[$newName] = $folder;
unset($this->apps[$name]);
if (isset($this->icons[$name])) {
$this->icons[$newName] = $this->icons[$name];
unset($this->icons[$name]);
}
if (isset($this->versions[$name])) {
$this->versions[$newName] = $this->versions[$name];
unset($this->versions[$name]);
}
}
}
}
示例9: calculate
public function calculate($formula)
{
require_once Util::getRootPath() . 'libraries/math-parser/lib/PHPMathParser/Math.php';
$math = new PHPMathParser\Math();
try {
$answer = $math->evaluate($formula);
} catch (Exception $e) {
die("##");
}
echo Util::CLNumberParserZ($answer);
}
示例10: alienClassLoader
public static function alienClassLoader($class)
{
$ex = explode("\\", $class);
#if($ex[0] == "figo"){
$file = Util::getRootPath() . "plugins/Websocket/WAMP/" . implode("/", $ex) . ".php";
if (!file_exists($file)) {
return false;
}
require_once $file;
#}
}
示例11: build
public static function build()
{
if (!file_exists(Util::getRootPath() . "system/build.xml")) {
return false;
}
try {
$xml = new SimpleXMLElement(file_get_contents(Util::getRootPath() . "system/build.xml"));
return $xml->build->prefix . "-" . $xml->build->number;
} catch (Exception $e) {
return false;
}
}
示例12: classes
function classes()
{
#registerClassPath("Seminar", Util::getRootPath()."MMDB/Seminare/Seminar.class.php");
#registerClassPath("SeminarGUI", Util::getRootPath()."MMDB/Seminare/SeminarGUI.class.php");
#registerClassPath("STeilnehmer", Util::getRootPath()."MMDB/Seminare/STeilnehmer.class.php");
registerClassPath("Bestellung", Util::getRootPath() . "ubiquitous/Bestellungen/Bestellung.class.php");
addClassPath(Util::getRootPath() . "MMDB/Seminare/");
addClassPath(Util::getRootPath() . "open3A/Adressen/");
addClassPath(Util::getRootPath() . "open3A/Kunden/");
addClassPath(Util::getRootPath() . "open3A/Auftraege/");
addClassPath(Util::getRootPath() . "open3A/Stammdaten/");
addClassPath(Util::getRootPath() . "open3A/Textbausteine/");
addClassPath(Util::getRootPath() . "open3A/Kategorien/");
addClassPath(Util::getRootPath() . "open3A/Brief/");
}
示例13: getDBData
public function getDBData($newFolder = null)
{
if ($newFolder == null) {
$newFolder = Util::getRootPath() . "system/DBData/";
}
if (!isset($_SERVER["HTTP_HOST"])) {
$_SERVER["HTTP_HOST"] = "*";
}
$data = new mInstallation();
if ($newFolder != "") {
$data->changeFolder($newFolder);
}
$data->setAssocV3("httpHost", "=", $_SERVER["HTTP_HOST"]);
#$data->loadCollectionV2();
$n = $data->getNextEntry();
if ($n == null) {
#$data = new mInstallation();
#if($newFolder != "") $data->changeFolder($newFolder);
$data = new mInstallation();
if ($newFolder != "") {
$data->changeFolder($newFolder);
}
$data->setAssocV3("httpHost", "=", "*");
$n = $data->getNextEntry();
}
if ($n != null) {
$n->changeFolder($newFolder);
$d = $n->getA();
} else {
$I = new Installation(-1);
$I->changeFolder($newFolder);
$I->makeNewInstallation();
$d = $I->getA();
}
$I2 = new Installation(-1);
$s = PMReflector::getAttributesArray($I2->newAttributes());
$t = array();
foreach ($s as $key => $value) {
$t[$value] = $d->{$value};
}
$rt = Environment::getS("databaseData", $t);
return $rt;
}
示例14: saveMe
function saveMe($checkUserData = true, $output = false)
{
if ($this->A("ContentImage") != "") {
$path = Util::getRootPath() . "specifics/" . $this->A("ContentImage");
$image = new Imagick($path);
$imageSmall = Util::getRootPath() . "specifics/" . str_replace(basename($this->A("ContentImage")), "small/" . basename($this->A("ContentImage")), $this->A("ContentImage"));
$imageBig = Util::getRootPath() . "specifics/" . str_replace(basename($this->A("ContentImage")), "big/" . basename($this->A("ContentImage")), $this->A("ContentImage"));
$image->resizeImage(0, 550, Imagick::FILTER_LANCZOS, 1);
if (!$image->writeImage($imageBig)) {
Red::alertD("Das große Vorschaubild kann nicht erstellt werden!");
}
$image->resizeImage(150, 0, Imagick::FILTER_LANCZOS, 1);
if (!$image->writeImage($imageSmall)) {
Red::alertD("Das kleine Vorschaubild kann nicht erstellt werden!");
}
$image->destroy();
}
parent::saveMe($checkUserData, $output);
}
示例15: getCMSHTML
function getCMSHTML()
{
if (!isset($_SERVER['PHP_AUTH_USER']) or $_SERVER['PHP_AUTH_USER'] == "") {
header('WWW-Authenticate: Basic realm="Ticket POS"');
header('HTTP/1.0 401 Unauthorized');
die("Authentifikation fehlgeschlagen");
}
$EC = new ExtConn(Util::getRootPath());
if (!$EC->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) {
header('WWW-Authenticate: Basic realm="Ticket POS"');
header('HTTP/1.0 401 Unauthorized');
die("Authentifikation fehlgeschlagen");
}
$html = "<div style=\"width:200px;float:right;\">Angemeldet als<br /><b>" . Session::currentUser()->A("name") . "</b></div>";
$html .= "<h1>Ticket POS</h1>";
$AC = anyC::get("Seminar");
$AC->addAssocV3("SeminarVon", ">=", time() - 3600 * 48);
$Events = array();
while ($S = $AC->getNextEntry()) {
$Events[$S->getID()] = $S->A("SeminarName") . ", " . Util::CLFormatDate($S->A("SeminarVon"), true);
}
$I = new HTMLInput("currentEvent", "select", null, $Events);
$I->style("font-size:20px;width:45%;");
$html .= "<div style=\"margin-bottom:45px;\">{$I}</div>";
$TS = new CCTicketShop();
/*$count = array();
for($i = 0; $i < 21; $i++)
$count[$i] = $i;
$I = new HTMLInput("ticketCount", "select", null, $count);
$I->style("width:100%;font-size:20px;");
$IC = new Button("Weiter", "");
$IC->onclick("CustomerPage.rme('handleTicketSale', [$('select[name=currentEvent]').val(), $('select[name=ticketCount]').val()], function(){ })");
$IC->className("submitFormButton");*/
$html .= "\n\t\t<div style=\"float:right;width:45%;\">\n\t\t\t<h2 style=\"margin-bottom:10px;\">Ticketverkauf</h2>\n\t\t\t" . $TS->getCMSHTML(false) . "\n\t\t\t<!--<div style=\"border:1px dashed grey;padding:10px;margin-top:10px;\">\n\t\t\t\tAnzahl der Tickets:\n\t\t\t\t{$I}{$IC}\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>-->\n\t\t</div>";
$I = new HTMLInput("ticketCheck");
$I->style("width:98%;font-size:20px;");
$I->onEnter("CustomerPage.rme('handleTicketCheck', [\$('select[name=currentEvent]').val(), \$(this).val()], function(transport){ \$('#ticketValidInfo').html(transport); })");
$html .= "\n\t\t<div style=\"width:45%;\">\n\t\t\t<h2 style=\"margin-bottom:10px;\">Einlass</h2>\n\t\t\t<div style=\"border:1px dashed #BBBBBB;padding:10px;\">\n\t\t\t\tTicket-Nummer:\n\t\t\t\t{$I}\n\t\t\t\t<div id=\"ticketValidInfo\" style=\"font-size:20px;margin-top:20px;\">\n\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>";
return $html;
}