-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2517 from MPOS/development
UPDATE : Development to Master
- Loading branch information
Showing
68 changed files
with
2,034 additions
and
15,008 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,7 @@ | |
|
||
/vendor/ | ||
|
||
tests/_output/* | ||
tests/_output/* | ||
|
||
# NetBeans Project Directory | ||
/nbproject/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; | ||
|
||
/** | ||
* We extend our CoinBase class | ||
* No need to change anything, base class supports | ||
* scrypt and sha256d | ||
**/ | ||
class Coin extends CoinBase { | ||
protected $target_bits = 16; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; | ||
/** | ||
* We extend our CoinBase class | ||
* No need to change anything, base class supports | ||
* scrypt and sha256d | ||
**/ | ||
class Coin extends CoinBase { | ||
protected $target_bits = 24; | ||
protected $share_difficulty_precision = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; | ||
/** | ||
* We extend our CoinBase class | ||
* No need to change anything, base class supports | ||
* scrypt and sha256d | ||
**/ | ||
class Coin extends CoinBase { | ||
protected $target_bits = 24; | ||
protected $share_difficulty_precision = 4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
interface IPushNotification { | ||
public static function getName(); | ||
public static function getParameters(); | ||
public function notify($message, $severity, $event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
class Notifications_NotifyMyAndroid implements IPushNotification { | ||
|
||
private $apiKey; | ||
public function __construct($apikey){ | ||
$this->apiKey = $apikey; | ||
} | ||
|
||
static $priorities = array( | ||
0 => 'info', | ||
2 => 'error', | ||
); | ||
|
||
public static function getName(){ | ||
return "notifymyandroid.com"; | ||
} | ||
|
||
public static function getParameters(){ | ||
return array( | ||
'apikey' => 'API key', | ||
); | ||
} | ||
|
||
public function notify($message, $severity = 'info', $event = null){ | ||
curl_setopt_array($ch = curl_init(), array( | ||
CURLOPT_URL => "https://www.notifymyandroid.com/publicapi/notify", | ||
CURLOPT_POST => true, | ||
CURLOPT_RETURNTRANSFER => true, | ||
CURLOPT_POSTFIELDS => http_build_query($data = array( | ||
"apikey" => $this->apiKey, | ||
"application" => "CryptoGlance", | ||
"description" => $message, | ||
"content-type" => "text/html", | ||
"event" => $event, | ||
"priority" => array_search($severity, self::$priorities), | ||
)), | ||
)); | ||
curl_exec($ch); | ||
curl_close($ch); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
class Notifications_Pushover implements IPushNotification { | ||
|
||
private $token; | ||
private $user; | ||
public function __construct($token, $user){ | ||
$this->token = $token; | ||
$this->user = $user; | ||
} | ||
|
||
static $priorities = array( | ||
0 => 'info', | ||
1 => 'warning', | ||
2 => 'error', | ||
); | ||
|
||
public static function getName(){ | ||
return "pushover.net"; | ||
} | ||
|
||
public static function getParameters(){ | ||
return array( | ||
'token' => 'API Token/Key', | ||
'user' => 'Your User Key', | ||
); | ||
} | ||
|
||
public function notify($message, $severity = 'info', $event = null){ | ||
curl_setopt_array($ch = curl_init(), array( | ||
CURLOPT_URL => "https://api.pushover.net/1/messages.json", | ||
CURLOPT_POST => true, | ||
CURLOPT_RETURNTRANSFER => true, | ||
CURLOPT_POSTFIELDS => http_build_query($data = array( | ||
"token" => $this->token, | ||
"user" => $this->user, | ||
"message" => $code = strip_tags(preg_replace('/<([\/]?)span[^>]*>/i', '<\1b>', $message), "<b><i><u><a><font><p><br>"), | ||
"title" => strip_tags($event), | ||
"priority" => (int)array_search($severity, self::$priorities), | ||
"timestamp" => time(), | ||
"html" => preg_match('/<[^>]+>/', $code), | ||
)), | ||
)); | ||
curl_exec($ch); | ||
curl_close($ch); | ||
} | ||
} |
Oops, something went wrong.