function __construct() { global $absolutePathToPhynx; parent::__construct($absolutePathToPhynx); $this->useDefaultMySQLData(); $this->useUser(); $this->loadPluginInterface("fheME/Fhem", "ExtConnFhem"); }
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; }
* 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 */ if (isset($argv[1])) { $_GET["cloud"] = $argv[1]; } if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnInstallation"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $e = new ExtConn($absolutePathToPhynx); $e->addClassPath($absolutePathToPhynx . "/plugins/Installation"); $e->useDefaultMySQLData(); $e->useAdminUser(); $CH = Util::getCloudHost(); $I = new mInstallation(); $data = $I->updateAllTables(); $T = new HTMLTable(2); $T->setTableStyle("font-size:10px;font-family:sans-serif;"); $T->addColStyle(1, "vertical-align:top;"); foreach ($data as $k => $v) { $T->addRow(array($k, "<pre>" . trim($v) . "</pre>")); } $mimeMail2 = new PHPMailer(true, "", true); $mimeMail2->CharSet = "UTF-8"; $mimeMail2->Subject = "Installation Plugin";
if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnNuntius"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); register_shutdown_function('cronShutdownHandler'); function cronShutdownHandler() { $last_error = error_get_last(); if ($last_error['type'] !== E_ERROR) { return; } print_r(SysMessages::i()->getMessages()); } $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $e = new ExtConn($absolutePathToPhynx); #$e->addClassPath($absolutePathToPhynx."/lightCRM/Mail"); $e->loadPlugin("fheME", "Nuntius"); $e->useDefaultMySQLData(); $e->useUser(); $caller = ""; if ($_GET["from"] == "FritzBox") { $data = explode(",", $_GET["message"]); $xml = file_get_contents("ftp://*****:*****@{$_SERVER['REMOTE_ADDR']}/phonebook.xml"); $xml = str_replace("<?xml\nversion=\"1.0\" encoding=\"utf-8\">", "<?xml version=\"1.0\" encoding=\"utf-8\" ?><pb>", $xml) . "</pb>"; libxml_use_internal_errors(false); try { $S = new SimpleXMLElement($xml); foreach ($S->phonebook as $PB) { foreach ($PB->contact as $C) { foreach ($C->telephony->number as $N) {
* it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * lightAd 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 */ if (isset($argv[1])) { $_GET["cloud"] = $argv[1]; } if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnOWM"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = Util::getRootPath(); $e = new ExtConn($absolutePathToPhynx); $e->addClassPath($absolutePathToPhynx . "ubiquitous/OWM"); $e->addClassPath($absolutePathToPhynx . "specifics"); $e->addClassPath(FileStorage::getFilesDir()); $e->useDefaultMySQLData(); $e->useUser(); #echo "<pre>"; mOpenWeatherMap::update(); $e->cleanUp(); #echo "</pre>";
* 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 */ if (isset($argv[1])) { $_GET["cloud"] = $argv[1]; } if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnKalender"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $E = new ExtConn($absolutePathToPhynx); $E->addClassPath($absolutePathToPhynx . "ubiquitous/xCal"); $E->addClassPath(FileStorage::getFilesDir()); $E->useDefaultMySQLData(); $E->useUser(); $AC = anyC::get("xCal", "xCalServerActive", "1"); while ($S = $AC->getNextEntry()) { // XML $xml = file_get_contents($S->A("xCalUrl")); if ($xml === false) { continue; } $S->changeA("xCalCache", $xml); $S->saveMe(); } $E->cleanUp();
} if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnTinkerforge"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); register_shutdown_function('cronShutdownHandler'); function cronShutdownHandler() { $last_error = error_get_last(); if ($last_error['type'] !== E_ERROR) { return; } print_r(SysMessages::i()->getMessages()); } $e = new ExtConn(realpath(dirname(__FILE__) . "/../../") . "/"); $e->loadPlugin("fheME", "Tinkerforge"); $e->useDefaultMySQLData(); $e->useUser(); require_once __DIR__ . '/lib/IPConnection.php'; require_once __DIR__ . '/lib/BrickletTemperatureIR.php'; #require_once(__DIR__.'/lib/BrickletAnalogOut.php'); #require_once(__DIR__.'/lib/BrickletIO4.php'); declare (ticks=1); function callback($value, $data) { $bricklet = $data[0]; $type = $data[1]; $entryData = array('topic' => "tinkerforge", 'value' => $value, 'bricklet' => $bricklet, 'type' => $type, 'time' => time()); $context = new ZMQContext(); $socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'my pusher');
/* * This file is part of plugins. * plugins is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * plugins 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 */ if (isset($argv[1])) { $_GET["cloud"] = $argv[1]; } if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnBackup"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $e = new ExtConn($absolutePathToPhynx); #$e->addClassPath($absolutePathToPhynx."/plugins/Installation"); $e->useDefaultMySQLData(); $e->useAdminUser(); $BM = new BackupManagerGUI(); $BM->makeBackupOfToday(); $e->cleanUp();
* 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/>. * * 2010, trinityDB - https://sourceforge.net/p/opentrinitydb/ */ session_name("ExtConnFF"); error_reporting(E_ALL); $absolutePathToPhynx = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "..") . DIRECTORY_SEPARATOR; require_once $absolutePathToPhynx . "system/connect.php"; #if(function_exists('date_default_timezone_set')) # date_default_timezone_set('Europe/Berlin'); require_once $absolutePathToPhynx . "classes" . DIRECTORY_SEPARATOR . "frontend" . DIRECTORY_SEPARATOR . "ExtConn.class.php"; $e = new ExtConn($absolutePathToPhynx); $e->useDefaultMySQLData(); $e->useUser(); /*require_once $absolutePathToPhynx."trinityDB/Serien/Serie.class.php"; require_once $absolutePathToPhynx."trinityDB/Serien/SerieGUI.class.php"; require_once $absolutePathToPhynx."trinityDB/Serien/Folge.class.php"; require_once $absolutePathToPhynx."trinityDB/Serien/iEpguideAdapter.class.php"; require_once $absolutePathToPhynx."trinityDB/Serien/EpguideAdapter.class.php"; require_once $absolutePathToPhynx."trinityDB/Serien/thetvdbcomAdapter.class.php"; require_once $absolutePathToPhynx."trinityDB/Incoming/Incoming.class.php"; require_once $absolutePathToPhynx."trinityDB/Incoming/mIncoming.class.php";*/ require_once $absolutePathToPhynx . "classes/backend/File.class.php"; require_once $absolutePathToPhynx . "plugins/Files/mFile.class.php"; require_once $absolutePathToPhynx . "classes/backend/FileStorage.class.php"; require_once $absolutePathToPhynx . "classes/frontend/HTMLInput.class.php"; /*require_once $absolutePathToPhynx."trinityDB/RSSFilter/RSSFilter.class.php";
session_name("ExtConnGlobalRSSParser"); if (isset($argv[1])) { $_SERVER["HTTP_HOST"] = $argv[1]; } require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $fp = fopen("/home/nemiah/globalCronRSSParser.lock", "a"); if (!$fp) { syslog(LOG_ERR, "Could not create lock file /home/nemiah/globalCronRSSParser.lock! Exiting."); throw new Exception("Could not create lock file /home/nemiah/globalCronRSSParser.lock"); } if (!flock($fp, LOCK_EX | LOCK_NB)) { syslog(LOG_WARNING, "Could not acquire lock! Exiting."); throw new Exception("Could not acquire lock!"); } syslog(LOG_INFO, "Lock acquired."); $e = new ExtConn(Util::getRootPath()); $e->loadPlugin("plugins", "Cloud"); $absolutePathToPhynx = Util::getRootPath(); $e->addClassPath(FileStorage::getFilesDir()); $e->useDefaultMySQLData(); $ACC = new mCloud(); $ACC->addAssocV3("CloudOption", "=", "allowedPlugins"); $ACC->addAssocV3("CloudValue", "REGEXP", "(^mRSSParser,)|(,mRSSParser,)|(,mRSSParser\$)|(^mRSSParser\$)"); $ACC->lCV3(); $zugaenge = array(); while ($C = $ACC->getNextEntry()) { $zugaenge[] = $C->A("CloudUser"); } syslog(LOG_INFO, "Checked accounts: " . implode(", ", $zugaenge)); $e->loadPlugin("ubiquitous", "RSSParser"); $lastUser = null;
return false; } require_once $file; #} } } if (isset($argv[1])) { $_GET["cloud"] = $argv[1]; } if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnFhem"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $e = new ExtConn($absolutePathToPhynx); $e->addClassPath($absolutePathToPhynx . "fheME/Fhem"); $lastCommand = null; $lastCommandC = 0; $fp = stream_socket_client("tcp://192.168.7.11:7072", $errno, $errstr, 30); if (!$fp) { echo "{$errstr} ({$errno})<br />\n"; } else { fwrite($fp, "inform on\n"); while (!feof($fp)) { $line = fgets($fp, 1024); if ($line === false) { continue; } if ($line == $lastCommand) { $lastCommandC++;
* it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * ubiquitous 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></http:>. * * 2007 - 2012, Rainer Furtmeier - Rainer@Furtmeier.de */ session_name("ExtConnpPJob"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $E = new ExtConn($absolutePathToPhynx); $E->addClassPath($absolutePathToPhynx . "/ubiquitous/xCal/"); $E->addClassPath($absolutePathToPhynx . "/ubiquitous/Sync/"); $E->addClassPath($absolutePathToPhynx . "/ubiquitous/Todo/"); $E->addClassPath($absolutePathToPhynx . "/ubiquitous/Kalender/"); $E->useDefaultMySQLData(); $cutoffDatePast = $_GET["cutoff_past"]; $cutoffDateFuture = $_GET["cutoff_future"]; if (!preg_match("/^[0-9]*\$/", $cutoffDatePast)) { die("incorrect date format"); } if (!preg_match("/^[0-9]*\$/i", $cutoffDateFuture)) { die("incorrect date format"); } if (empty($cutoffDatePast)) { $cutoffDatePast = time() - 14 * 24 * 3600;
* (at your option) any later version. * fheME 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 - 2012, Rainer Furtmeier - Rainer@Furtmeier.de */ if (isset($argv[1])) { $_GET["cloud"] = $argv[1]; } if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnEinkaufszettel"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $e = new ExtConn($absolutePathToPhynx); $e->addClassPath($absolutePathToPhynx . "/fheME/Einkaufszettel"); $e->addClassPath($absolutePathToPhynx . "/ubiquitous/openEAN"); $e->useDefaultMySQLData(); $e->useUser(); $data = explode(";", $_GET["data"]); foreach ($data as $k => $v) { $data[$k] = LinuxKeycodes::codeToKey($v); } $E = new mEinkaufszettelGUI(-1); $E->addEAN(strtolower(implode("", $data)), false); $e->cleanUp();