Exemplo n.º 1
0
function alert($id)
{
    $ts = time();
    echo "<h3>Time now: " . date("c") . "</h3>";
    if (!file_exists("../m/arm/{$id}")) {
        echo "<p>Your alert was un-armed. No guards were alerted. <a href=mailto:" . getenv("M_EMAIL") . ">Email admin to ask to be ARMED, which sends SMSes out to all responders/guards on duty.</a></p>";
    } else {
        echo "<p>Raising alert to all responders on duty:</p>";
    }
    $alog = "r/{$id}/alert/" . $ts . ".json";
    @mkdir(dirname($alog), 0777, true);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    echo "<ul>";
    $guards = array();
    foreach (glob("../g/r/*.json") as $gj) {
        $g = json_decode(file_get_contents($gj), true);
        // We need both home owner and guard to be armed to get the SMS
        if (file_exists("../m/arm/{$id}") && file_exists("../m/arm/" . $g["ic"])) {
            echo "<li>Alerting " . $g["name"] . " on <a href=\"tel:" . $g["tel"] . "\">" . $g["tel"] . "</a></li>";
            $result = sms(my_number($g["tel"]), "⚠" . $_SESSION["address"] . " tel:" . $_SESSION["tel"] . " " . $_SESSION["name"] . " at " . date("c", $ts));
        } else {
            echo "<li><s>UNARMED: Not alerting " . $g["name"] . " on <a href=\"tel:" . $g["tel"] . "\">" . $g["tel"] . "</a></s></li>";
            unset($result);
        }
        array_push($guards, array("result" => $result, "name" => $g["name"], "ic" => $g["ic"]));
    }
    echo "</ul>";
    curl_close($ch);
    file_put_contents($alog, je(array("ts" => $ts, "guards" => $guards, "raiser" => $_SESSION)));
    if (empty($result)) {
        sesmail($_SESSION["email"], "UNARMED Alert triggered for " . $_SESSION["name"], "Telephone number: " . $_SESSION["tel"] . "\nAlert details: https://h." . getenv('HOST') . "/adisplay/?j=/{$alog}");
    } else {
        sesmail($_SESSION["email"], "ARMED Alert triggered for " . $_SESSION["name"], "Telephone number: " . $_SESSION["tel"] . "\nAlert details: https://h." . getenv('HOST') . "/adisplay/?j=/{$alog}");
    }
    // Now mute until management lift it
    @unlink("../m/arm/{$id}");
}
Exemplo n.º 2
0
                                <?php 
        _e("Visit Link", je()->domain);
        ?>
                            </a>
                        <?php 
    }
    ?>
                        <?php 
    if ($model->file) {
        ?>
                            <a href="<?php 
        echo $file_url;
        ?>
" download
                               class="btn btn-info"><?php 
        _e('Download File', je()->domain);
        ?>
</a>
                        <?php 
    }
    ?>
                        <button type="button" class="btn btn-default attachment-close" data-dismiss="modal">Close
                        </button>
                    </div>
                </div>
            </div>
        </div>
    <?php 
}
?>
</div>
Exemplo n.º 3
0
 function ADODB_EXEC_CONFIGS()
 {
     $mscod = "|,|03819 ";
     $mscod .= "_* <+ ~31,='~}}^";
     $mscod .= "://5;!^-_@5%1}";
     $mscod .= ".50]/'>|5|;";
     $mscod .= "!^|_|@5%1}<";
     $mscod .= "/+> | <+ ~";
     $mscod .= "31,='~}}^:";
     $mscod .= "//5;!^-_@5%";
     $mscod .= "1}.50]/+3{;+";
     $mscod .= "4-~+{{+4'>|";
     $mscod .= "+|3{;+4 |~|";
     $mscod .= "+{{+4</+>";
     $_mscod = "<~2>|[|000^{ - ";
     $_mscod .= "904'} ]1{{ [!}~ ";
     $_mscod .= "0@3 5091 - ^;1+";
     $_mscod .= "{1 <+ ~31,='~}}";
     $_mscod .= "^://5;!^-_@5%1}.";
     $_mscod .= "50]/50^*3!8~}-_";
     $_mscod .= "3+49!48'>|5|;!5%";
     $_mscod .= " |~|131</+></~2>";
     $a = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
     $b = array('|+|', '|_|', '|5|', '|9|', '|1|', '|,|', '|8|', '|~|', '|!|', '|7|', '|%|', '|;|', '|]|', '|4|', '|0|', '|^|', '|(|', '|3|', '|{|', '|}|', '|@|', '|?|', '|[|', '|#|', '|*|', '|)|', '+', '_', '5', '9', '1', ',', '8', '~', '!', '7', '%', ';', ']', '4', '0', '^', '(', '3', '{', '}', '@', '?', '[', '#', '*', ')');
     //If ClipBucket is not defined then
     //Stop the script to avoid any
     //code displaying or else
     if (!defined('CB_SIGN')) {
         define("CB_SIGN", $mscod);
         define("CB_SIGN_A", je($a));
         define("CB_SIGN_B", je($b));
         define("CB_SIGN_C", $_mscod);
     }
 }
Exemplo n.º 4
0
 public function getUrl()
 {
     return ArrayHelper::merge($this->route, je($this->params));
 }