예제 #1
0
 /**
  * Add single check test to local checklist
  */
 public function addCheck($info, $test, $pass = "", $fail = "")
 {
     $info = Sanitize::toString($info);
     $test = Sanitize::toBool($test);
     $pass = Utils::value($pass, "Ready");
     $fail = Utils::value($fail, "Missing");
     $this->_checklist[] = array("info" => $info, "test" => $test, "pass" => $pass, "fail" => $fail);
 }
예제 #2
0
 /**
  * Remove all back slashes from the working string
  */
 public static function unescape($value = "")
 {
     $value = Sanitize::toString($value);
     $value = stripslashes(implode("", explode("\\", $value)));
     return $value;
 }
예제 #3
0
 /**
  * Send file response
  */
 public function sendFile($status, $mime, $file)
 {
     if (is_file($file)) {
         $this->setStatus($status);
         $this->setHeader("Content-Type", $mime);
         if (preg_match("/\\.php\$/i", $file) === 1) {
             $body = Sanitize::toString(include_once $file);
             $this->send($body);
         }
         $this->send("", $file);
     }
     $this->sendText(404, "File not found.");
 }