Пример #1
0
 *  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>";
Пример #2
0
 *  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";
$mimeMail2->From = $CH->emailAdmin;
Пример #3
0
 *  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();
Пример #4
0
}
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;
$lastDir = null;
$lastZugang = null;
foreach ($zugaenge as $zugang) {
Пример #5
0
        }
        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++;
        } else {
Пример #6
0
 *  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;
}
Пример #7
0
 *  (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();