Das Installationsskript:
<?
include_once "IPSInstaller.ips.php";
include_once "IPSLogger_Configuration.ips.php";
// --------------------------------------------------------------------------
// WebFront Configuration
// --------------------------------------------------------------------------
define ("c_Program_Path", "Program.IPSLogger");
define ("c_WebFront_Path", "WebFront.System.Logging");
define ("c_WebFront_ConfigId", 19332);
define ("c_WebFront_TabPaneParent", 'roottp');
define ("c_WebFront_TabPaneOrderId", 60);
define ("c_WebFront_TabPaneName", '');
define ("c_WebFront_TabPaneIcon", 'Window');
define ("c_iPhone_Path", "");
// ----------------------------------------------------------------------------------------------------------------------------
// Program Installation
// ----------------------------------------------------------------------------------------------------------------------------
$ID_IPSLoggerCategory = CreateCategoryPath(c_Program_Path);
$ID_IPSLoggerInstance = CreateDummyInstance("IPSLogger", $ID_IPSLoggerCategory, 0);
CreateProfiles();
// Add IPSLogger Scripts
$ID_ScriptIPSLogger = CreateScript('IPSLogger', 'IPSLogger.ips.php', $ID_IPSLoggerCategory, 10);
$ID_ScriptIPSLoggerConstants = CreateScript('IPSLogger_Constants', 'IPSLogger_Constants.ips.php', $ID_IPSLoggerCategory, 20);
$ID_ScriptIPSLoggerConfiguration = CreateScript('IPSLogger_Configuration', 'IPSLogger_Configuration.ips.php', $ID_IPSLoggerCategory, 30);
$ID_ScriptIPSLoggerOutput = CreateScript('IPSLogger_Output', 'IPSLogger_Output.ips.php', $ID_IPSLoggerCategory, 40);
$ID_ScriptIPSLoggerChangeSettings = CreateScript('IPSLogger_ChangeSettings', 'IPSLogger_ChangeSettings.ips.php', $ID_IPSLoggerCategory, 50);
$ID_ScriptIPSLoggerSendMail = CreateScript('IPSLogger_SendMail', 'IPSLogger_SendMail.ips.php', $ID_IPSLoggerCategory, 60);
$ID_ScriptIPSLoggerClearSingleOut = CreateScript('IPSLogger_ClearSingleOut', 'IPSLogger_ClearSingleOut.ips.php', $ID_IPSLoggerCategory, 70);
$ID_ScriptIPSLoggerClearHtmlOut = CreateScript('IPSLogger_ClearHtmlOut', 'IPSLogger_ClearHtmlOut.ips.php', $ID_IPSLoggerCategory, 80);
$ID_ScriptIPSLoggerPurgeLogFiles = CreateScript('IPSLogger_PurgeLogFiles', 'IPSLogger_PurgeLogFiles.ips.php', $ID_IPSLoggerCategory, 90);
$ID_ScriptIPSLoggerPhpErrorHandler = CreateScript('IPSLogger_PhpErrorHandler', 'IPSLogger_PhpErrorHandler.ips.php', $ID_IPSLoggerCategory, 100);
CreateTimer ('IPSLogger_PurgeLogFilesTimer', $ID_ScriptIPSLoggerPurgeLogFiles, 8);
// Add IPSLogger Variables
$ID_SingleOutEnabled = CreateVariable('SingleOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 100, '~Switch', $ID_ScriptIPSLoggerChangeSettings, true, 'Power');
$ID_SingleOutLevel = CreateVariable('SingleOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 110, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 1 /*Error*/, 'Intensity');
$ID_SingleOutMsg = CreateVariable('SingleOut_Msg', 3 /*String*/, $ID_IPSLoggerInstance, 120, '~HTMLBox', null, "" , 'Window');
$ID_HtmlOutEnabled = CreateVariable('HtmlOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 200, '~Switch', $ID_ScriptIPSLoggerChangeSettings, true, 'Power');
$ID_HtmlOutLevel = CreateVariable('HtmlOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 210, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 9 /*All*/, 'Intensity');
$ID_HtmlOutMsgCount = CreateVariable('HtmlOut_MsgCount', 1 /*Integer*/, $ID_IPSLoggerInstance, 220, 'IPSLogger_MsgCount', $ID_ScriptIPSLoggerChangeSettings, 20, 'Distance');
$ID_HtmlOutMsgId = CreateVariable('HtmlOut_MsgId', 1 /*Integer*/, $ID_IPSLoggerInstance, 230, 'IPSLogger_MsgId', null, 0, 'Repeat');
$ID_HtmlOutMsgList = CreateVariable('HtmlOut_MsgList', 3 /*String*/, $ID_IPSLoggerInstance, 240, '~HTMLBox', null, "", 'Window');
$ID_IPSOutEnabled = CreateVariable('IPSOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 300, '~Switch', $ID_ScriptIPSLoggerChangeSettings, true, 'Power');
$ID_IPSOutLevel = CreateVariable('IPSOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 310, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
$ID_FileOutEnabled = CreateVariable('FileOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 400, '~Switch', $ID_ScriptIPSLoggerChangeSettings, false, 'Power');
$ID_FileOutLevel = CreateVariable('FileOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 410, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
$ID_FileOutDays = CreateVariable('FileOut_Days', 1 /*Integer*/, $ID_IPSLoggerInstance, 420, 'IPSLogger_Days', $ID_ScriptIPSLoggerChangeSettings, 1, 'Repeat');
$ID_Log4IPSOutEnabled = CreateVariable('Log4IPSOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 500, '~Switch', $ID_ScriptIPSLoggerChangeSettings, true, 'Power');
$ID_Log4IPSOutLevel = CreateVariable('Log4IPSOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 510, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
$ID_Log4IPSOutDays = CreateVariable('Log4IPSOut_Days', 1 /*Integer*/, $ID_IPSLoggerInstance, 520, 'IPSLogger_Days', $ID_ScriptIPSLoggerChangeSettings, 1, 'Repeat');
$ID_EMailOutEnabled = CreateVariable('EMailOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 600, '~Switch', $ID_ScriptIPSLoggerChangeSettings, false, 'Power');
$ID_EMailOutLevel = CreateVariable('EMailOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 610, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 5 /*Debug*/, 'Intensity');
$ID_EMailOutPriority = CreateVariable('EMailOut_Priority', 1 /*Integer*/, $ID_IPSLoggerInstance, 620, 'IPSLogger_Priority', $ID_ScriptIPSLoggerChangeSettings, 0, 'Return');
$ID_EMailOutSendDelay = CreateVariable('EMailOut_SendDelay', 1 /*Integer*/, $ID_IPSLoggerInstance, 630, 'IPSLogger_Delay', $ID_ScriptIPSLoggerChangeSettings, 5, 'LockClosed');
$ID_EMailOutMsgList = CreateVariable('EMailOut_MsgList', 3 /*String*/, $ID_IPSLoggerInstance, 640, '~TextBox', null, "", 'Mail');
$ID_EchoOutEnabled = CreateVariable('EchoSOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 700, '~Switch', $ID_ScriptIPSLoggerChangeSettings, false, 'Power');
$ID_EchoOutLevel = CreateVariable('EchoOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 710, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 9 /*All*/, 'Intensity');
$ID_ProwlOutEnabled = CreateVariable('ProwlOut_Enabled', 0 /*Boolean*/, $ID_IPSLoggerInstance, 800, '~Switch', $ID_ScriptIPSLoggerChangeSettings, false, 'Power');
$ID_ProwlOutLevel = CreateVariable('ProwlOut_Level', 1 /*Integer*/, $ID_IPSLoggerInstance, 810, 'IPSLogger_Level', $ID_ScriptIPSLoggerChangeSettings, 1 /*Error*/, 'Intensity');
$ID_ProwlOutPriority = CreateVariable('ProwlOut_Priority', 1 /*Integer*/, $ID_IPSLoggerInstance, 820, 'IPSLogger_Priority', $ID_ScriptIPSLoggerChangeSettings, 0, 'Return');
SetVariableConstant ("c_ID_SingleOutEnabled", $ID_SingleOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_SingleOutLevel", $ID_SingleOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_SingleOutMsg", $ID_SingleOutMsg, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_HtmlOutEnabled", $ID_HtmlOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_HtmlOutLevel", $ID_HtmlOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_HtmlOutMsgCount", $ID_HtmlOutMsgCount, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_HtmlOutMsgId", $ID_HtmlOutMsgId, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_HtmlOutMsgList", $ID_HtmlOutMsgList, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_IPSOutEnabled", $ID_IPSOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_IPSOutLevel", $ID_IPSOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EMailOutEnabled", $ID_EMailOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EMailOutLevel", $ID_EMailOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EMailOutPriority", $ID_EMailOutPriority, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EMailOutDelay", $ID_EMailOutSendDelay,'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EMailOutMsgList", $ID_EMailOutMsgList, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_FileOutEnabled", $ID_FileOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_FileOutLevel", $ID_FileOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_FileOutDays", $ID_FileOutDays, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_Log4IPSOutEnabled", $ID_Log4IPSOutEnabled,'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_Log4IPSOutLevel", $ID_Log4IPSOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_Log4IPSOutDays", $ID_Log4IPSOutDays, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_ScriptSendMail", $ID_ScriptIPSLoggerSendMail, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_ScriptPurgeLogFiles",$ID_ScriptIPSLoggerPurgeLogFiles, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EchoOutEnabled", $ID_EchoOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_EchoOutLevel", $ID_EchoOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_ProwlOutEnabled", $ID_ProwlOutEnabled, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_ProwlOutLevel", $ID_ProwlOutLevel, 'IPSLogger_Constants.ips.php');
SetVariableConstant ("c_ID_ProwlOutPriority", $ID_ProwlOutPriority, 'IPSLogger_Constants.ips.php');
// ----------------------------------------------------------------------------------------------------------------------------
// Webfront Installation
// ----------------------------------------------------------------------------------------------------------------------------
$ID_CategoryWebFront = CreateCategoryPath(c_WebFront_Path);
$ID_CategoryOutput = CreateCategory('Output', $ID_CategoryWebFront, 10);
$ID_CategorySettings = CreateCategory('Settings', $ID_CategoryWebFront, 20);
$ID_CategorySettingsWidget = CreateCategory( 'Widget', $ID_CategorySettings, 200);
$ID_CategorySettingsWebFront = CreateCategory( 'WebFront',$ID_CategorySettings, 300);
$ID_CategorySettingsIPS = CreateCategory( 'IPS', $ID_CategorySettings, 400);
$ID_CategorySettingsFile = CreateCategory( 'File', $ID_CategorySettings, 500);
$ID_CategorySettingsLog4IPS = CreateCategory( 'Log4IPS', $ID_CategorySettings, 600);
$ID_CategorySettingsEMail = CreateCategory( 'EMail', $ID_CategorySettings, 700);
$ID_CategorySettingsProwl = CreateCategory( 'Prowl', $ID_CategorySettings, 800);
DeleteWFCItems(c_WebFront_ConfigId, 'SystemTP');
CreateWFCItemTabPane (c_WebFront_ConfigId, 'SystemTP', c_WebFront_TabPaneParent, c_WebFront_TabPaneOrderId, c_WebFront_TabPaneName, c_WebFront_TabPaneIcon);
CreateWFCItemCategory (c_WebFront_ConfigId, 'SystemTP_LogWindow'.date('Hi'), 'SystemTP', 10, 'Logging', 'Window', $ID_CategoryOutput /*BaseId*/, 'false' /*BarBottomVisible*/);
CreateWFCItemCategory (c_WebFront_ConfigId, 'SystemTP_LogSettings'.date('Hi'), 'SystemTP', 20, 'Log Settings','Gear', $ID_CategorySettings /*BaseId*/, 'true' /*BarBottomVisible*/);
// Output Window
CreateLink('Logging Window', $ID_HtmlOutMsgList, $ID_CategoryOutput, 10);
// Output Overview
CreateLink('Output Widget', $ID_SingleOutEnabled, $ID_CategorySettings, 10);
CreateLink('Output WebFront', $ID_HtmlOutEnabled, $ID_CategorySettings, 20);
CreateLink('Output IPS', $ID_IPSOutEnabled, $ID_CategorySettings, 30);
CreateLink('Output File', $ID_FileOutEnabled, $ID_CategorySettings, 40);
CreateLink('Output Log4IPS', $ID_Log4IPSOutEnabled, $ID_CategorySettings, 50);
CreateLink('Output EMail', $ID_EMailOutEnabled, $ID_CategorySettings, 60);
CreateLink('Output Echo', $ID_EchoOutEnabled, $ID_CategorySettings, 70);
CreateLink('Output Prowl', $ID_ProwlOutEnabled, $ID_CategorySettings, 80);
// Output Detail
CreateLink('Output Enabled', $ID_SingleOutEnabled, $ID_CategorySettingsWidget, 10);
CreateLink('Logging Level', $ID_SingleOutLevel, $ID_CategorySettingsWidget, 20);
CreateLink('Last Message', $ID_SingleOutMsg, $ID_CategorySettingsWidget, 30);
CreateLink('Clear Message', $ID_ScriptIPSLoggerClearSingleOut,$ID_CategorySettingsWidget, 40);
CreateLink('Output Enabled', $ID_HtmlOutEnabled, $ID_CategorySettingsWebFront, 10);
CreateLink('Logging Level', $ID_HtmlOutLevel, $ID_CategorySettingsWebFront, 20);
CreateLink('Message Count', $ID_HtmlOutMsgCount, $ID_CategorySettingsWebFront, 30);
CreateLink('Last MessageID', $ID_HtmlOutMsgId, $ID_CategorySettingsWebFront, 40);
CreateLink('Clear Output', $ID_ScriptIPSLoggerClearHtmlOut, $ID_CategorySettingsWebFront, 50);
CreateLink('Message List', $ID_HtmlOutMsgList, $ID_CategorySettingsWebFront, 60);
CreateLink('Output Enabled', $ID_IPSOutEnabled, $ID_CategorySettingsIPS, 10);
CreateLink('Logging Level', $ID_IPSOutLevel, $ID_CategorySettingsIPS, 20);
CreateLink('Output Enabled', $ID_FileOutEnabled, $ID_CategorySettingsFile, 10);
CreateLink('Logging Level', $ID_FileOutLevel, $ID_CategorySettingsFile, 20);
CreateLink('Purge Files after',$ID_FileOutDays, $ID_CategorySettingsFile, 30);
CreateLink('Execute Purge', $ID_ScriptIPSLoggerPurgeLogFiles, $ID_CategorySettingsFile, 40);
CreateLink('Output Enabled', $ID_Log4IPSOutEnabled, $ID_CategorySettingsLog4IPS, 10);
CreateLink('Logging Level', $ID_Log4IPSOutLevel, $ID_CategorySettingsLog4IPS, 20);
CreateLink('Purge Files after',$ID_Log4IPSOutDays, $ID_CategorySettingsLog4IPS, 30);
CreateLink('Execute Purge', $ID_ScriptIPSLoggerPurgeLogFiles, $ID_CategorySettingsLog4IPS, 40);
CreateLink('Output Enabled', $ID_EMailOutEnabled, $ID_CategorySettingsEMail, 10);
CreateLink('Logging Level', $ID_EMailOutLevel, $ID_CategorySettingsEMail, 20);
CreateLink('Priority', $ID_EMailOutPriority, $ID_CategorySettingsEMail, 30);
CreateLink('Send Delay', $ID_EMailOutSendDelay, $ID_CategorySettingsEMail, 40);
CreateLink('Message List', $ID_EMailOutMsgList, $ID_CategorySettingsEMail, 50);
CreateLink('Output Enabled', $ID_ProwlOutEnabled, $ID_CategorySettingsProwl, 10);
CreateLink('Logging Level', $ID_ProwlOutLevel, $ID_CategorySettingsProwl, 20);
CreateLink('Priority', $ID_ProwlOutPriority, $ID_CategorySettingsProwl, 30);
// ----------------------------------------------------------------------------------------------------------------------------
// iPhone Installation
// ----------------------------------------------------------------------------------------------------------------------------
if (c_iPhone_Path <> "") {
$ID_CategoryiPhone = CreateCategoryPath(c_iPhone_Path, c_WebFront_TabPaneOrderId, 'Window');
CreateLink('Logging Window', $ID_HtmlOutMsgList, $ID_CategoryiPhone, 10);
$ID_CategoryiPhone = CreateCategoryPath(c_iPhone_Path.'.Logging Settings', 20, 'Gear');
$ID_Output = CreateDummyInstance("Widget", $ID_CategoryiPhone, 100);
CreateLink('Output Enabled', $ID_SingleOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_SingleOutLevel, $ID_Output, 20);
CreateLink('Last Message', $ID_SingleOutMsg, $ID_Output, 30);
CreateLink('Clear Message', $ID_ScriptIPSLoggerClearSingleOut,$ID_Output, 40);
$ID_Output = CreateDummyInstance("WebFront", $ID_CategoryiPhone, 200);
CreateLink('Output Enabled', $ID_HtmlOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_HtmlOutLevel, $ID_Output, 20);
CreateLink('Message Count', $ID_HtmlOutMsgCount, $ID_Output, 30);
CreateLink('Clear Output', $ID_ScriptIPSLoggerClearHtmlOut, $ID_Output, 50);
$ID_Output = CreateDummyInstance("IPS", $ID_CategoryiPhone, 300);
CreateLink('Output Enabled', $ID_IPSOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_IPSOutLevel, $ID_Output, 20);
$ID_Output = CreateDummyInstance("LogFile", $ID_CategoryiPhone, 400);
CreateLink('Output Enabled', $ID_FileOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_FileOutLevel, $ID_Output, 20);
CreateLink('Purge Files after',$ID_FileOutDays, $ID_Output, 30);
CreateLink('Execute Purge', $ID_ScriptIPSLoggerPurgeLogFiles, $ID_Output, 40);
$ID_Output = CreateDummyInstance("Log4IPS", $ID_CategoryiPhone, 500);
CreateLink('Output Enabled', $ID_Log4IPSOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_Log4IPSOutLevel, $ID_Output, 20);
CreateLink('Purge Files after',$ID_Log4IPSOutDays, $ID_Output, 30);
CreateLink('Execute Purge', $ID_ScriptIPSLoggerPurgeLogFiles, $ID_Output, 40);
$ID_Output = CreateDummyInstance("EMail", $ID_CategoryiPhone, 600);
CreateLink('Output Enabled', $ID_EMailOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_EMailOutLevel, $ID_Output, 20);
CreateLink('Priority', $ID_EMailOutPriority, $ID_Output, 30);
CreateLink('Send Delay', $ID_EMailOutSendDelay, $ID_Output, 40);
CreateLink('Message List', $ID_EMailOutMsgList, $ID_Output, 50);
$ID_Output = CreateDummyInstance("Prowl", $ID_CategoryiPhone, 700);
CreateLink('Output Enabled', $ID_ProwlOutEnabled, $ID_Output, 10);
CreateLink('Logging Level', $ID_ProwlOutLevel, $ID_Output, 20);
CreateLink('Priority', $ID_ProwlOutPriority, $ID_Output, 30);
}
// ----------------------------------------------------------------------------------------------------------------------------
// Some Tests
// ----------------------------------------------------------------------------------------------------------------------------
include_once 'IPSLogger.ips.php';
// Some Test Messages
IPSLogger_Fat(__file__, 'Test for a Fatal Error');
IPSLogger_Err(__file__, 'Test for a Error ...');
IPSLogger_Wrn(__file__, 'Test for a Warning');
IPSLogger_Not(__file__, 'Test for a Notification with Priority 0 (High)');
IPSLogger_Not(__file__, 'Test for a Notification with Priority 10 (Low)');
IPSLogger_Inf(__file__, 'Test for a Information Message ...');
IPSLogger_Dbg(__file__, 'Test for a Debug Message ...');
IPSLogger_Com(__file__, 'Test for a Communication Message ...');
IPSLogger_Trc(__file__, 'Test for a Trace Message ...');
IPSLogger_Tst(__file__, 'Test for a Test Message ...');
// ------------------------------------------------------------------------------------------------
function CreateTimer ($Name, $Parent, $Hour) {
$TimerId = @IPS_GetEventIDByName($Name, $Parent);
if ($TimerId === false) {
$TimerId = IPS_CreateEvent(1 /*Cyclic Event*/);
IPS_SetName($TimerId, $Name);
IPS_SetParent($TimerId, $Parent);
if (!IPS_SetEventCyclic($TimerId, 2 /**Daily*/, 1,0,0,0,0)) {
echo "IPS_SetEventCyclic failed !!!
";
}
if (!IPS_SetEventCyclicTimeBounds($TimerId, mktime($Hour, 0, 0), 0)) {
echo "IPS_SetEventCyclicTimeBounds failed !!!
";
}
IPS_SetEventActive($TimerId, true);
echo 'Created Timer '.$Name.'='.$TimerId."
";
}
return $TimerId;
}
// ------------------------------------------------------------------------------------------------
function CreateProfiles() {
@IPS_CreateVariableProfile("IPSLogger_Level", 1);
IPS_SetVariableProfileText("IPSLogger_Level", "", "");
IPS_SetVariableProfileValues("IPSLogger_Level", 0, 0, 0);
IPS_SetVariableProfileDigits("IPSLogger_Level", 0);
IPS_SetVariableProfileIcon("IPSLogger_Level", "");
IPS_SetVariableProfileAssociation("IPSLogger_Level", 0, "Fatal", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 1, "Error", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 2, "Warning", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 3, "Notification", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 4, "Info", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 5, "Debug", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 6, "Communication", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 7, "Trace", "", 0xaaaaaa);
IPS_SetVariableProfileAssociation("IPSLogger_Level", 9, "All", "", 0xaaaaaa);
@IPS_CreateVariableProfile("IPSLogger_MsgCount", 1);
IPS_SetVariableProfileText("IPSLogger_MsgCount", "", " Msg's");
IPS_SetVariableProfileValues("IPSLogger_MsgCount", 5, 100, 5);
IPS_SetVariableProfileDigits("IPSLogger_MsgCount", 0);
IPS_SetVariableProfileIcon("IPSLogger_MsgCount", "");
@IPS_CreateVariableProfile("IPSLogger_MsgId", 1);
IPS_SetVariableProfileText("IPSLogger_MsgId", "", "");
IPS_SetVariableProfileValues("IPSLogger_MsgId", 0, 0, 0);
IPS_SetVariableProfileDigits("IPSLogger_MsgId", 0);
IPS_SetVariableProfileIcon("IPSLogger_MsgId", "");
@IPS_CreateVariableProfile("IPSLogger_Delay", 1);
IPS_SetVariableProfileText("IPSLogger_Delay", "", " Seconds");
IPS_SetVariableProfileValues("IPSLogger_Delay", 0, 600, 30);
IPS_SetVariableProfileDigits("IPSLogger_Delay", 0);
IPS_SetVariableProfileIcon("IPSLogger_Delay", "");
@IPS_CreateVariableProfile("IPSLogger_Days", 1);
IPS_SetVariableProfileText("IPSLogger_Days", "", " Tage");
IPS_SetVariableProfileValues("IPSLogger_Days", 0, 100, 5);
IPS_SetVariableProfileDigits("IPSLogger_Days", 0);
IPS_SetVariableProfileIcon("IPSLogger_Days", "");
@IPS_CreateVariableProfile("IPSLogger_Priority", 1);
IPS_SetVariableProfileText("IPSLogger_Priority", "", "");
IPS_SetVariableProfileValues("IPSLogger_Priority", 0, 10, 1);
IPS_SetVariableProfileDigits("IPSLogger_Priority", 0);
IPS_SetVariableProfileIcon("IPSLogger_Priority", "");
}
?>