Enabled user registration

This commit is contained in:
Deon George
2018-12-25 12:48:57 +11:00
parent cb2d7936d0
commit 128002f434
26 changed files with 854 additions and 149 deletions

View File

@@ -13,6 +13,8 @@ class Ansi extends AbstractServer {
define('ESC', chr(27));
define('CON', ESC.'[?25h'); // Cursor On
define('COFF', ESC.'[?25l'); // Cursor Off
define('CSAVE', ESC.'[s'); // Save Cursor position
define('CRESTORE',ESC.'[u'); // Restore to saved position
define('HOME', ESC.'[0;0f');
define('LEFT', ESC.'[D'); // Move Cursor
define('RIGHT', ESC.'[C'); // Move Cursor
@@ -54,14 +56,15 @@ class Ansi extends AbstractServer {
// Abstract function
public function sendBaseline($client,$text,$reposition=FALSE) {
$client->send(ESC.'[24;0f'.$text.
$client->send(CSAVE.ESC.'[24;0f'.$text.
($this->blp > $this->strlenv($text)
? str_repeat(' ',$this->blp-$this->strlenv($text)).
($reposition ? ESC.'[24;0f'.str_repeat(RIGHT,$this->strlenv($text)) : '')
: '')
($reposition ? ESC.'[24;0f'.str_repeat(RIGHT,$this->strlenv($text)) : CRESTORE)
: ($reposition ? '' : CRESTORE))
);
$this->blp = $this->strlenv($text);
$this->baseline = $text;
}
// Abstract function