Beispiel #1
0
function createXML()
{
    // Add trace level
    $paramServerTriggerXML[] = array("name" => "verbose", "level" => $GLOBALS['PLUGIN_irrigation']['TRACE_LEVEL']);
    // Add every parameters of the database
    $triggerList = getTriggers();
    foreach ($triggerList as $k => $triggerParam) {
        $numTrigger = $triggerParam['id'];
        $triggerAction = $triggerParam['action'];
        foreach ($triggerAction as $key => $value) {
            $paramServerTriggerXML[] = array("key" => $key, "value" => $value);
        }
        $triggerCondition = $triggerParam['condition'];
        foreach ($triggerCondition as $key => $value) {
            $paramServerTriggerXML[] = array("key" => $key, "value" => $value);
        }
    }
    // Save it
    \create_conf_XML($GLOBALS['CULTIPI_CONF_TEMP_PATH'] . "/serverTrigger/conf.xml", $paramServerTriggerXML);
    return 0;
}
						        </div>
            				</div>
            				<div class="timeline-body">
            					<div>
            						Released: <span class="release_time"><?php 
        echo date("g:i A", strtotime($release->release_time));
        ?>
</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Internal Alert Level:&nbsp;&nbsp;<span class="internal_alert_level"><?php 
        echo $release->internal_alert_level;
        ?>
</span></b>
            					</div>
            					<hr>

            					<?php 
        $trigger_list = getTriggers($release->release_id, $triggers);
        if (count($trigger_list) > 0) {
            ?>
            					<div class="triggers">
            						<ul>
            					<?php 
            foreach ($trigger_list as $trigger) {
                ?>
		        						<li><?php 
                echo format($trigger->trigger_type, $trigger->timestamp);
                ?>
</li>
                                        <?php 
                if ($trigger->info != null) {
                    echo "<ul><li>" . $trigger->info . "</li></ul>";
                }