Beispiel #1
0
 public function __construct($input)
 {
     if (filter_var($input, FILTER_VALIDATE_URL) || is_file($input)) {
         $this->data = file_get_contents($input);
         $this->source["source"] = $input;
         $this->source["info"] = pathinfo($input);
         $this->source["info"]["size"] = strlen($this->data);
         $this->mode = $this->data != "false" ? "read" : "write";
         if (MODE === "dev") {
             Reporting::notify($input . "|" . strlen($this->data), "info");
             Reporting::dump($this->data, "info");
         }
     }
 }
Beispiel #2
0
 public function send($message)
 {
     $this->message = '<html><body>';
     $this->message .= '<div>' . $message . '</div>';
     $this->message .= "</body></html>";
     if (!empty($this->message) && $this->status == 1) {
         mail($this->to, $this->subject, $this->message, $this->headers);
         if (MODE === "dev") {
             Reporting::notify("Mail sent to {$this->to}!", "success");
         }
     } else {
         if (MODE === "dev") {
             Reporting::notify("Please add an message!", "error");
         }
     }
 }
Beispiel #3
0
/* ============================
  CONSTANTS
  ============================== */
define("ROOT", getcwd() . "/");
define("CFG", ROOT . "config/");
define("MODE", "dev");
// dev | prod
/* ============================
  LOCALE SETTINGS
  ============================== */
date_default_timezone_set('Europe/Brussels');
setlocale(LC_ALL, 'nl_NL');
/* ============================
  PHP SETTINGS
  ============================== */
set_time_limit(0);
error_reporting(E_ALL);
ini_set("display_errors", true);
/* ============================
  INCLUDES
  ============================== */
include 'includes/Strings.php';
include 'includes/Reporting.php';
include 'includes/data/database.php';
include 'includes/data/base.php';
include 'includes/data/json.php';
include 'includes/Mail.php';
include 'music/bootstrap.php';
Reporting::notify("Init succesful", "success");
Beispiel #4
0
<?php

/* ============================
  CONSTANTS
  ============================== */
/* ============================
  INCLUDES
  ============================== */
include 'notes.php';
include 'chord.php';
include 'scale.php';
include 'harmony.php';
Reporting::notify("Music package init succesful", "success");
Beispiel #5
0
<?php

include "bootstrap.php";
$harmony = new Harmony("C", "minor");
foreach ($harmony->chords as $chord) {
    Reporting::notify($chord->name);
    Reporting::dump($chord->notes);
}