Beispiel #1
0
 function write2logfile($text, $site = 'Unknown')
 {
     if (function_exists("ownLog_writeToLog")) {
         ownLog_writeToLog($text);
         return true;
     }
     if (!file_exists("data/dontlog")) {
         $txt = "\n[" . date('d/m/Y H:i:s') . "] " . $site . ": " . $text;
         $log = fopen("data/log.txt", 'a') or die("Couldn't open log file");
         fwrite($log, $txt);
         fclose($log);
     }
 }
Beispiel #2
0
<?php

// This example site.php uses the package "multiSite" to display mutliple sites.
// We recommend using the package "multiSite2" for this.
if (!isset($permittedCall)) {
    echo "Please don't open this page directly!";
    exit;
}
// Include the scriptfile (site.script.php)
include scriptfile();
// Include the packages
include package("ownLog");
include package("multiSite");
include package("tiles");
ownLog_clearLog();
ownLog_writeToLog("This is a test!");
write2logfile("I'm writing to the ownLog log!");
if (multiSite_Site("main")) {
    ?>

Hello <?php 
    echo $api->getSynchroUsername();
    ?>
! You mail is: <?php 
    echo $api->getMail();
    ?>
<br>
This plugin is just a test. 'Real' plugins will come in the future!<br>
Pluginname: <?php 
    echo getValue(readSDB("examplePlugin.sdb"), "NAME");
    ?>