Enabled user registration
This commit is contained in:
parent
cb2d7936d0
commit
128002f434
48
app/Classes/Control.php
Normal file
48
app/Classes/Control.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes;
|
||||||
|
|
||||||
|
use App\Classes\Control\Register;
|
||||||
|
use App\Classes\Control\Telnet;
|
||||||
|
|
||||||
|
abstract class Control
|
||||||
|
{
|
||||||
|
protected $complete = FALSE;
|
||||||
|
protected $so = NULL;
|
||||||
|
public $state = [];
|
||||||
|
|
||||||
|
public function __construct(Server $so) {
|
||||||
|
$this->so = $so;
|
||||||
|
|
||||||
|
$this->boot();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default boot method if a child class doesnt have one.
|
||||||
|
protected function boot() {
|
||||||
|
$this->state['mode'] = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has control completed?
|
||||||
|
*/
|
||||||
|
public function complete()
|
||||||
|
{
|
||||||
|
return $this->complete;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @todo Change to Dynamic Calls by the existence of files in App\Classes\Control
|
||||||
|
public static function factory(string $name, Server $so) {
|
||||||
|
switch ($name) {
|
||||||
|
case 'register':
|
||||||
|
return new Register($so);
|
||||||
|
|
||||||
|
case 'telnet':
|
||||||
|
return new Telnet($so);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new \Exception('Unknown control method: '.$name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract public function handle(string $char);
|
||||||
|
}
|
190
app/Classes/Control/Register.php
Normal file
190
app/Classes/Control/Register.php
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\Control;
|
||||||
|
|
||||||
|
use App\Classes\Control;
|
||||||
|
use App\Mail\SendToken;
|
||||||
|
use App\User;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Register handles registration
|
||||||
|
*
|
||||||
|
* @todo REMOVE the force .WHITE at the end of each sendBaseline()
|
||||||
|
*
|
||||||
|
* @package App\Classes\Control
|
||||||
|
*/
|
||||||
|
class Register extends Control
|
||||||
|
{
|
||||||
|
private $data = [];
|
||||||
|
|
||||||
|
protected function boot()
|
||||||
|
{
|
||||||
|
$this->so->sendBaseline($this->so->client(),GREEN.'Select User Name'.WHITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle Registration Form Input
|
||||||
|
*
|
||||||
|
* This function assumes the form has 7 fields in a specific order.
|
||||||
|
*
|
||||||
|
* @todo Make this form more dynamic, or put some configuration in a config file, so that there is flexibility
|
||||||
|
* in field placement.
|
||||||
|
* @param string $read
|
||||||
|
* @param array $current
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function handle(string $read,array $current=[])
|
||||||
|
{
|
||||||
|
// Ignore CR
|
||||||
|
if ($read == CR)
|
||||||
|
return '';
|
||||||
|
|
||||||
|
// If we got a # we'll be completing field input.
|
||||||
|
if ($read == HASH OR $read == LF) {
|
||||||
|
|
||||||
|
// Our registration page
|
||||||
|
// @todo get this from the DB
|
||||||
|
if ($current['page']['frame'] == '981') {
|
||||||
|
|
||||||
|
// Does our field have data...
|
||||||
|
if (array_get($current['fielddata'],$current['fieldnum'])) {
|
||||||
|
switch ($current['fieldnum']) {
|
||||||
|
// Username
|
||||||
|
case 0:
|
||||||
|
// See if the requested username already exists
|
||||||
|
if (User::where('login', $current['fielddata'][$current['fieldnum']])->exists()) {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'USER ALREADY EXISTS'.WHITE);
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->data['user'] = $current['fielddata'][$current['fieldnum']];
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'Enter Real Name'.WHITE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Real Name
|
||||||
|
case 1:
|
||||||
|
$this->data['name'] = $current['fielddata'][$current['fieldnum']];
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'Enter Email Address'.WHITE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Email Address
|
||||||
|
case 2:
|
||||||
|
if (Validator::make(['email'=>$current['fielddata'][$current['fieldnum']]],[
|
||||||
|
'email'=>'email',
|
||||||
|
])->fails()) {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'INVALID EMAIL ADDRESS'.WHITE);
|
||||||
|
|
||||||
|
return '';
|
||||||
|
};
|
||||||
|
|
||||||
|
// See if the requested email already exists
|
||||||
|
if (User::where('email', $current['fielddata'][$current['fieldnum']])->exists()) {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'USER ALREADY EXISTS'.WHITE);
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->data['email'] = $current['fielddata'][$current['fieldnum']];
|
||||||
|
$this->data['token'] = sprintf('%06.0f',rand(0,999999));
|
||||||
|
|
||||||
|
$this->so->sendBaseline($this->so->client(), YELLOW . 'PROCESSING...'.WHITE);
|
||||||
|
Mail::to($this->data['email'])->sendNow(new SendToken($this->data['token']));
|
||||||
|
|
||||||
|
if (Mail::failures()) {
|
||||||
|
dump('Failure?');
|
||||||
|
|
||||||
|
dump(Mail::failures());
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'Enter Password'.WHITE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Enter Password
|
||||||
|
case 3:
|
||||||
|
$this->data['password'] = $current['fielddata'][$current['fieldnum']];
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'Confirm Password'.WHITE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Confirm Password
|
||||||
|
case 4:
|
||||||
|
if ($this->data['password'] !== $current['fielddata'][$current['fieldnum']]) {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'PASSWORD DOESNT MATCH, *09 TO START AGAIN'.WHITE);
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'Enter Location'.WHITE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Enter Location
|
||||||
|
case 5:
|
||||||
|
$this->data['location'] = $current['fielddata'][$current['fieldnum']];
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'Enter TOKEN emailed to you'.WHITE);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Enter Token
|
||||||
|
case 6:
|
||||||
|
if ($this->data['token'] !== $current['fielddata'][$current['fieldnum']]) {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'TOKEN DOESNT MATCH, *09 TO START AGAIN'.WHITE);
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'HUH?');
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// If we are MODE_BL, we need to return the HASH, otherwise nothing.
|
||||||
|
if (in_array($this->state['mode'],[MODE_BL,MODE_SUBMITRF,MODE_RFNOTSENT])) {
|
||||||
|
return $read;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'FIELD REQUIRED...'.WHITE);
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $read;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function process()
|
||||||
|
{
|
||||||
|
$o = new User;
|
||||||
|
$o->login = $this->data['user'];
|
||||||
|
$o->email = $this->data['email'];
|
||||||
|
$o->password = $this->data['password'];
|
||||||
|
$o->name = $this->data['name'];
|
||||||
|
$o->location = $this->data['location'];
|
||||||
|
|
||||||
|
try {
|
||||||
|
$o->save();
|
||||||
|
$this->so->sendBaseline($this->so->client(), GREEN . 'ACCOUNT CREATED, PRESS '.HASH.' TO CONTINUE...'.WHITE);
|
||||||
|
$this->state['action'] = ACTION_NEXT;
|
||||||
|
|
||||||
|
// Add to CUG 0
|
||||||
|
$o->cugs()->attach(0);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->so->sendBaseline($this->so->client(), RED . 'SOMETHING WENT WRONG...'.WHITE);
|
||||||
|
$this->so->log('error',$e->getMessage());
|
||||||
|
$this->state['action'] = ACTION_RELOAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->complete = TRUE;
|
||||||
|
}
|
||||||
|
}
|
101
app/Classes/Control/Telnet.php
Normal file
101
app/Classes/Control/Telnet.php
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\Control;
|
||||||
|
|
||||||
|
use App\Classes\Control;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Telnet
|
||||||
|
*
|
||||||
|
* This class looks after any telnet session commands
|
||||||
|
*
|
||||||
|
* TELNET http://pcmicro.com/netfoss/telnet.html
|
||||||
|
*
|
||||||
|
* @package App\Classes\Control
|
||||||
|
*/
|
||||||
|
class Telnet extends Control
|
||||||
|
{
|
||||||
|
private $option = FALSE;
|
||||||
|
private $note = '';
|
||||||
|
private $terminal = '';
|
||||||
|
|
||||||
|
public function handle(string $read)
|
||||||
|
{
|
||||||
|
$this->state['mode'] = FALSE;
|
||||||
|
$this->so->log('debug',sprintf('Session Char (%s)',ord($read)),['complete'=>$this->complete,'option'=>$this->option]);
|
||||||
|
|
||||||
|
switch ($read) {
|
||||||
|
// Command being sent.
|
||||||
|
case TCP_IAC:
|
||||||
|
$this->complete = FALSE;
|
||||||
|
$this->note = 'IAC ';
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_SB:
|
||||||
|
$this->option = TRUE;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_SE:
|
||||||
|
$this->option = FALSE;
|
||||||
|
$this->complete = TRUE;
|
||||||
|
$this->so->log('debug',sprintf('Session Terminal: %s',$this->terminal));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_DO:
|
||||||
|
$this->note .= 'DO ';
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_WILL:
|
||||||
|
$this->note .= 'WILL ';
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_WONT:
|
||||||
|
$this->note .= 'WONT ';
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_OPT_TERMTYPE:
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_OPT_ECHO:
|
||||||
|
$this->note .= 'ECHO';
|
||||||
|
$this->complete = TRUE;
|
||||||
|
|
||||||
|
$this->so->log('debug',sprintf('Session Note: %s',$this->note));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_OPT_SUP_GOAHEAD:
|
||||||
|
$this->note .= 'SUPPRESS GO AHEAD';
|
||||||
|
$this->complete = TRUE;
|
||||||
|
|
||||||
|
$this->so->log('debug',sprintf('Session Note: %s',$this->note));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TCP_OPT_WINDOWSIZE:
|
||||||
|
$this->note .= 'WINDOWSIZE';
|
||||||
|
$this->complete = TRUE;
|
||||||
|
|
||||||
|
$this->so->log('debug',sprintf('Session Note: %s',$this->note));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if ($this->option AND $read) {
|
||||||
|
$this->terminal .= $read;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$this->so->log('debug',sprintf('Unhandled char in session_init: %s (%s)',$read,ord($read)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
@ -280,7 +280,7 @@ abstract class Frame
|
|||||||
*/
|
*/
|
||||||
public function isFramePublic(): bool
|
public function isFramePublic(): bool
|
||||||
{
|
{
|
||||||
return $this->frame->closed ? FALSE : TRUE;
|
return $this->frame->public ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
// @todo To implement
|
// @todo To implement
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ abstract class Frame
|
|||||||
$o->frame = 999;
|
$o->frame = 999;
|
||||||
$o->index = 'a';
|
$o->index = 'a';
|
||||||
$o->access = 1;
|
$o->access = 1;
|
||||||
$o->closed = 0;
|
$o->public = 1;
|
||||||
$o->cls = 1;
|
$o->cls = 1;
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Classes;
|
namespace App\Classes;
|
||||||
|
|
||||||
class Parser
|
abstract class Parser
|
||||||
{
|
{
|
||||||
}
|
}
|
@ -16,6 +16,7 @@ abstract class Server {
|
|||||||
private $mo = NULL; // Our Mode object
|
private $mo = NULL; // Our Mode object
|
||||||
private $co = NULL;
|
private $co = NULL;
|
||||||
protected $blp = 0; // Size of Bottom Line Pollution
|
protected $blp = 0; // Size of Bottom Line Pollution
|
||||||
|
protected $baseline = ''; // Whats on the baseline currently
|
||||||
protected $pid = NULL; // Client PID
|
protected $pid = NULL; // Client PID
|
||||||
|
|
||||||
public function __construct(Mode $o)
|
public function __construct(Mode $o)
|
||||||
@ -40,6 +41,9 @@ abstract class Server {
|
|||||||
define('ACTION_SUBMITRF', 7); // Offer to submit a response frame
|
define('ACTION_SUBMITRF', 7); // Offer to submit a response frame
|
||||||
define('ACTION_STAR', 8);
|
define('ACTION_STAR', 8);
|
||||||
|
|
||||||
|
define('CONTROL_TELNET', 1); // Telnet session control
|
||||||
|
define('CONTROL_METHOD', 2); // Send input to an external method
|
||||||
|
|
||||||
// Keyboard presses
|
// Keyboard presses
|
||||||
define('KEY_DELETE', chr(8));
|
define('KEY_DELETE', chr(8));
|
||||||
define('KEY_LEFT', chr(136));
|
define('KEY_LEFT', chr(136));
|
||||||
@ -114,9 +118,7 @@ abstract class Server {
|
|||||||
|
|
||||||
// We are now the child.
|
// We are now the child.
|
||||||
try {
|
try {
|
||||||
$session_init = $session_option = FALSE;
|
$session = NULL; // TCP Session Details
|
||||||
$session_note = ''; // TCP Session Notice
|
|
||||||
$session_term = ''; // TCP Terminal Type
|
|
||||||
|
|
||||||
$client->send(TCP_IAC . TCP_DO . TCP_OPT_SUP_GOAHEAD); // DO SUPPRES GO AHEAD
|
$client->send(TCP_IAC . TCP_DO . TCP_OPT_SUP_GOAHEAD); // DO SUPPRES GO AHEAD
|
||||||
$client->send(TCP_IAC . TCP_WONT . TCP_OPT_LINEMODE); // WONT LINEMODE
|
$client->send(TCP_IAC . TCP_WONT . TCP_OPT_LINEMODE); // WONT LINEMODE
|
||||||
@ -134,6 +136,8 @@ abstract class Server {
|
|||||||
$cmd = ''; // Current *command being typed in
|
$cmd = ''; // Current *command being typed in
|
||||||
$mode = FALSE; // Current mode.
|
$mode = FALSE; // Current mode.
|
||||||
$user = new User; // The logged in user
|
$user = new User; // The logged in user
|
||||||
|
$control = FALSE; // Logic in control
|
||||||
|
$method = collect(); // Method in control for CONTROL_METHOD
|
||||||
|
|
||||||
$current = []; // Attributes about the current page
|
$current = []; // Attributes about the current page
|
||||||
// field/fieldnum indexes are for fields on the active page
|
// field/fieldnum indexes are for fields on the active page
|
||||||
@ -161,85 +165,52 @@ abstract class Server {
|
|||||||
$read = NULL;
|
$read = NULL;
|
||||||
|
|
||||||
if ($read != '') {
|
if ($read != '') {
|
||||||
// Client initiation input
|
if ($read == TCP_IAC) {
|
||||||
// TELNET http://pcmicro.com/netfoss/telnet.html
|
|
||||||
if ($read == TCP_IAC OR $session_init OR $session_option) {
|
|
||||||
$this->log('debug',sprintf('Session Char (%s)',ord($read)),['init'=>$session_init,'option'=>$session_option]);
|
|
||||||
|
|
||||||
switch ($read) {
|
// If we are not already in a TELNET LOOP
|
||||||
// Command being sent.
|
if ($control !== CONTROL_TELNET) {
|
||||||
case TCP_IAC:
|
$control = CONTROL_TELNET;
|
||||||
$session_init = TRUE;
|
|
||||||
$session_note = 'IAC ';
|
|
||||||
|
|
||||||
continue 2;
|
// Remember our Telnet Session Object
|
||||||
|
// @todo We might need to clear out the old mode/action states
|
||||||
|
if (! $session) {
|
||||||
|
$session = Control::factory('telnet',$this);
|
||||||
|
}
|
||||||
|
|
||||||
case TCP_SB:
|
$method->push($session);
|
||||||
$session_option = TRUE;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
continue 2;
|
if ($control AND $method->count()) {
|
||||||
|
printf("= Control going to method: %s\n", get_class($method->last()));
|
||||||
|
|
||||||
case TCP_SE:
|
// Capture our state when we enter this method.
|
||||||
$session_option = $session_init = FALSE;
|
if (! array_key_exists('control',$method->last()->state)) {
|
||||||
$this->log('debug',sprintf('Session Terminal: %s',$session_term));
|
$method->last()->state['control'] = $control;
|
||||||
$read = '';
|
$method->last()->state['action'] = $action;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
$method->last()->state['mode'] = $mode;
|
||||||
|
$action = FALSE;
|
||||||
|
|
||||||
case TCP_DO:
|
// Pass Control to Method
|
||||||
$session_note .= 'DO ';
|
$read = $method->last()->handle($read,$current);
|
||||||
|
$mode = $method->last()->state['mode'];
|
||||||
|
|
||||||
continue 2;
|
if ($method->last()->complete()) {
|
||||||
|
printf("- Control complete: %s\n",get_class($method->last()));
|
||||||
|
$save = $method->pop();
|
||||||
|
|
||||||
case TCP_WILL:
|
if ($method->count()) {
|
||||||
$session_note .= 'WILL ';
|
$control = $method->last()->state['control'];
|
||||||
|
|
||||||
continue 2;
|
} else {
|
||||||
|
$mode = $save->state['mode'];
|
||||||
|
$action = $save->state['action'];
|
||||||
|
$control = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
case TCP_WONT:
|
dump(sprintf('End: Control is now: %s: Method Count: %s',is_object($control) ? get_class($control) : serialize($control),$method->count()));
|
||||||
$session_note .= 'WONT ';
|
|
||||||
|
|
||||||
continue 2;
|
|
||||||
|
|
||||||
case TCP_OPT_TERMTYPE:
|
|
||||||
|
|
||||||
continue 2;
|
|
||||||
|
|
||||||
case TCP_OPT_ECHO:
|
|
||||||
$session_note .= 'ECHO';
|
|
||||||
$session_init = FALSE;
|
|
||||||
$read = '';
|
|
||||||
|
|
||||||
$this->log('debug',sprintf('Session Note: %s',$session_note));
|
|
||||||
|
|
||||||
continue;
|
|
||||||
|
|
||||||
case TCP_OPT_SUP_GOAHEAD:
|
|
||||||
$session_note .= 'SUPPRESS GO AHEAD';
|
|
||||||
$session_init = FALSE;
|
|
||||||
$read = '';
|
|
||||||
|
|
||||||
$this->log('debug',sprintf('Session Note: %s',$session_note));
|
|
||||||
|
|
||||||
continue;
|
|
||||||
|
|
||||||
case TCP_OPT_WINDOWSIZE:
|
|
||||||
$session_note .= 'WINDOWSIZE';
|
|
||||||
$session_init = FALSE;
|
|
||||||
$read = '';
|
|
||||||
|
|
||||||
$this->log('debug',sprintf('Session Note: %s',$session_note));
|
|
||||||
|
|
||||||
continue;
|
|
||||||
|
|
||||||
default:
|
|
||||||
if ($session_option AND $read) {
|
|
||||||
$session_term .= $read;
|
|
||||||
$read = '';
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$this->log('debug',sprintf('Unhandled char in session_init: %s (%s)',$read,ord($read)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,6 +232,8 @@ abstract class Server {
|
|||||||
{
|
{
|
||||||
$action = ACTION_GOTO;
|
$action = ACTION_GOTO;
|
||||||
$page = ['frame'=>'981']; // @todo This should be in the DB.
|
$page = ['frame'=>'981']; // @todo This should be in the DB.
|
||||||
|
|
||||||
|
break 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,6 +276,7 @@ abstract class Server {
|
|||||||
$action = ACTION_STAR;
|
$action = ACTION_STAR;
|
||||||
$current['fieldpos'] = 0;
|
$current['fieldpos'] = 0;
|
||||||
$fielddata[$current['fieldnum']] = '';
|
$fielddata[$current['fieldnum']] = '';
|
||||||
|
$current['fielddata'][$current['fieldnum']] = '';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -312,6 +286,7 @@ abstract class Server {
|
|||||||
$current['fieldpos']--;
|
$current['fieldpos']--;
|
||||||
$client->send(LEFT.$fo::$if_filler.LEFT);
|
$client->send(LEFT.$fo::$if_filler.LEFT);
|
||||||
$fielddata[$current['fieldnum']] = substr($fielddata[$current['fieldnum']],0,-1);
|
$fielddata[$current['fieldnum']] = substr($fielddata[$current['fieldnum']],0,-1);
|
||||||
|
$current['fielddata'][$current['fieldnum']] = substr($current['fielddata'][$current['fieldnum']],0,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -360,15 +335,19 @@ abstract class Server {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ESC:
|
case ESC:
|
||||||
break;;
|
break;
|
||||||
|
|
||||||
// Record Data Entry
|
// Record Data Entry
|
||||||
default:
|
default:
|
||||||
if (ord($read) > 31 && $current['fieldpos'] < $current['field']->length) {
|
if (ord($read) > 31 && $current['fieldpos'] < $current['field']->length) {
|
||||||
if (! array_get($fielddata,$current['fieldnum']))
|
if (! array_key_exists($current['fieldnum'],$current['fielddata'])) {
|
||||||
|
$current['fielddata'][$current['fieldnum']] = '';
|
||||||
$fielddata[$current['fieldnum']] = '';
|
$fielddata[$current['fieldnum']] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$fielddata[$current['fieldnum']]{$current['fieldpos']} = $read; // @todo delete
|
||||||
|
$current['fielddata'][$current['fieldnum']]{$current['fieldpos']} = $read;
|
||||||
|
|
||||||
$fielddata[$current['fieldnum']]{$current['fieldpos']} = $read;
|
|
||||||
$current['fieldpos']++;
|
$current['fieldpos']++;
|
||||||
|
|
||||||
$client->send($fo->isFieldMasked($current['field']->type) ?: $read);
|
$client->send($fo->isFieldMasked($current['field']->type) ?: $read);
|
||||||
@ -393,7 +372,11 @@ abstract class Server {
|
|||||||
case '1':
|
case '1':
|
||||||
$route = $fo->route(1);
|
$route = $fo->route(1);
|
||||||
|
|
||||||
if ($route == '*' OR is_numeric($route)) {
|
// If we are in a control method, complete it
|
||||||
|
if ($control AND $method->count()) {
|
||||||
|
$method->last()->process();
|
||||||
|
|
||||||
|
} elseif ($route == '*' OR is_numeric($route)) {
|
||||||
$this->sendBaseline($client,RED.'NO ACTION PERFORMED');
|
$this->sendBaseline($client,RED.'NO ACTION PERFORMED');
|
||||||
$mode = MODE_RFSENT;
|
$mode = MODE_RFSENT;
|
||||||
|
|
||||||
@ -415,9 +398,13 @@ abstract class Server {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case '2':
|
case '2':
|
||||||
$this->sendBaseline($client,MSG_NOTSENT);;
|
$this->sendBaseline($client,MSG_NOTSENT);
|
||||||
$mode = MODE_RFNOTSENT;
|
$mode = MODE_RFNOTSENT;
|
||||||
|
|
||||||
|
// If a Control method was rejected, we can clear it
|
||||||
|
if ($control AND $method->count())
|
||||||
|
$method->pop();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STAR:
|
case STAR:
|
||||||
@ -564,10 +551,11 @@ abstract class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Toggle Timewarp Mode
|
// Toggle Timewarp Mode
|
||||||
|
// @todo in forms, the cursor is in the wrong location for ANSI
|
||||||
if ($cmd === '01') {
|
if ($cmd === '01') {
|
||||||
$client->send(COFF);
|
$client->send(COFF);
|
||||||
$timewarp = !$timewarp;
|
$timewarp = !$timewarp;
|
||||||
$this->sendBaseline($client,($timewarp ? MSG_TIMEWARP_ON : MSG_TIMEWARP_OFF));
|
$this->sendBaseline($client, ($timewarp ? MSG_TIMEWARP_ON : MSG_TIMEWARP_OFF));
|
||||||
$cmd = '';
|
$cmd = '';
|
||||||
$action = $mode = FALSE;
|
$action = $mode = FALSE;
|
||||||
|
|
||||||
@ -575,6 +563,7 @@ abstract class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Present Timewarp Frames
|
// Present Timewarp Frames
|
||||||
|
// @todo in forms, the cursor is in the wrong location for ANSI
|
||||||
if ($cmd === '02') {
|
if ($cmd === '02') {
|
||||||
$client->send(COFF);
|
$client->send(COFF);
|
||||||
$action = ACTION_INFO;
|
$action = ACTION_INFO;
|
||||||
@ -583,6 +572,14 @@ abstract class Server {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Report a problem
|
||||||
|
if ($cmd === '08') {
|
||||||
|
$this->sendBaseline($client, RED.'NOT IMPLEMENTED YET?');
|
||||||
|
$read = STAR;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Reload page
|
// Reload page
|
||||||
if ($cmd === '09') {
|
if ($cmd === '09') {
|
||||||
$client->send(COFF);
|
$client->send(COFF);
|
||||||
@ -595,12 +592,14 @@ abstract class Server {
|
|||||||
// Another star aborts the command.
|
// Another star aborts the command.
|
||||||
if ($read === STAR) {
|
if ($read === STAR) {
|
||||||
$action = FALSE;
|
$action = FALSE;
|
||||||
$this->sendBaseline($client,'');
|
$this->sendBaseline($client,array_get($current,'baseline',''));
|
||||||
$cmd = '';
|
$cmd = '';
|
||||||
|
|
||||||
if ($current['prevmode'] == MODE_FIELD) {
|
if ($current['prevmode'] == MODE_FIELD) {
|
||||||
$mode = $current['prevmode'];
|
$mode = $current['prevmode'];
|
||||||
$current['prevmode'] = FALSE;
|
$current['prevmode'] = FALSE;
|
||||||
|
|
||||||
|
// @todo The cursor color could be wrong
|
||||||
$client->send($this->outputPosition($current['field']->x,$current['field']->y).CON);
|
$client->send($this->outputPosition($current['field']->x,$current['field']->y).CON);
|
||||||
$client->send(str_repeat($fo::$if_filler, $current['field']->length));
|
$client->send(str_repeat($fo::$if_filler, $current['field']->length));
|
||||||
$current['fieldreset'] = TRUE;
|
$current['fieldreset'] = TRUE;
|
||||||
@ -654,6 +653,10 @@ abstract class Server {
|
|||||||
case ACTION_STAR:
|
case ACTION_STAR:
|
||||||
echo "+ Star command...\n";
|
echo "+ Star command...\n";
|
||||||
|
|
||||||
|
// If there is something on the baseline, lets preserve it
|
||||||
|
if ($this->blp)
|
||||||
|
$current['baseline'] = $this->baseline;
|
||||||
|
|
||||||
$this->sendBaseline($client,GREEN.STAR,TRUE);
|
$this->sendBaseline($client,GREEN.STAR,TRUE);
|
||||||
$client->send(CON);
|
$client->send(CON);
|
||||||
$action = FALSE;
|
$action = FALSE;
|
||||||
@ -773,6 +776,8 @@ abstract class Server {
|
|||||||
$history->push($page);
|
$history->push($page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("+ Mode is: %s\n",$mode);
|
||||||
|
|
||||||
// drop into
|
// drop into
|
||||||
case ACTION_RELOAD:
|
case ACTION_RELOAD:
|
||||||
$this->sendBaseline($client,'');
|
$this->sendBaseline($client,'');
|
||||||
@ -793,11 +798,25 @@ abstract class Server {
|
|||||||
|
|
||||||
// Login Frame.
|
// Login Frame.
|
||||||
case Frame::FRAMETYPE_LOGIN:
|
case Frame::FRAMETYPE_LOGIN:
|
||||||
|
$client->send($output);
|
||||||
|
$output = '';
|
||||||
|
|
||||||
|
// If this is the registration page
|
||||||
|
// @todo Should be evaluated out of the DB
|
||||||
|
if ($fo->page() == '981a') {
|
||||||
|
$control = CONTROL_METHOD;
|
||||||
|
$method->push(Control::factory('register',$this));
|
||||||
|
$method->last()->state['control'] = $control;
|
||||||
|
$method->last()->state['action'] = $action;
|
||||||
|
$method->last()->state['mode'] = MODE_FIELD;
|
||||||
|
}
|
||||||
|
|
||||||
// Active Frame. Prestel uses this for a Response Frame.
|
// Active Frame. Prestel uses this for a Response Frame.
|
||||||
case Frame::FRAMETYPE_ACTION:
|
case Frame::FRAMETYPE_ACTION:
|
||||||
$client->send($output);
|
$client->send($output);
|
||||||
// holds data entered by user.
|
// holds data entered by user.
|
||||||
$fielddata = [];
|
$fielddata = [];
|
||||||
|
$current['fielddata'] = [];
|
||||||
|
|
||||||
if (count($fo->fields)) {
|
if (count($fo->fields)) {
|
||||||
// Get our first editable field.
|
// Get our first editable field.
|
||||||
|
@ -13,6 +13,8 @@ class Ansi extends AbstractServer {
|
|||||||
define('ESC', chr(27));
|
define('ESC', chr(27));
|
||||||
define('CON', ESC.'[?25h'); // Cursor On
|
define('CON', ESC.'[?25h'); // Cursor On
|
||||||
define('COFF', ESC.'[?25l'); // Cursor Off
|
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('HOME', ESC.'[0;0f');
|
||||||
define('LEFT', ESC.'[D'); // Move Cursor
|
define('LEFT', ESC.'[D'); // Move Cursor
|
||||||
define('RIGHT', ESC.'[C'); // Move Cursor
|
define('RIGHT', ESC.'[C'); // Move Cursor
|
||||||
@ -54,14 +56,15 @@ class Ansi extends AbstractServer {
|
|||||||
|
|
||||||
// Abstract function
|
// Abstract function
|
||||||
public function sendBaseline($client,$text,$reposition=FALSE) {
|
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)
|
($this->blp > $this->strlenv($text)
|
||||||
? str_repeat(' ',$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->blp = $this->strlenv($text);
|
||||||
|
$this->baseline = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abstract function
|
// Abstract function
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App\Models\Frame;
|
use App\Models\Frame;
|
||||||
|
use App\Models\Mode;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||||
|
|
||||||
@ -15,9 +16,9 @@ class FrameImport extends Command
|
|||||||
*/
|
*/
|
||||||
protected $signature = 'frame:import {frame} {index} {file} '.
|
protected $signature = 'frame:import {frame} {index} {file} '.
|
||||||
'{--access=0 : Is frame accessible }'.
|
'{--access=0 : Is frame accessible }'.
|
||||||
'{--closed=1 : Is frame limited to CUG }'.
|
'{--public=0 : Is frame limited to CUG }'.
|
||||||
'{--cost=0 : Frame Cost }'.
|
'{--cost=0 : Frame Cost }'.
|
||||||
'{--mode=1 : Frame Emulation Mode }'.
|
'{--mode=videotex : Frame Emulation Mode }'.
|
||||||
'{--replace : Replace existing frame}'.
|
'{--replace : Replace existing frame}'.
|
||||||
'{--type=i : Frame Type}'.
|
'{--type=i : Frame Type}'.
|
||||||
'{--trim : Trim off header (first 40 chars)}';
|
'{--trim : Trim off header (first 40 chars)}';
|
||||||
@ -56,12 +57,14 @@ class FrameImport extends Command
|
|||||||
if (! file_exists($this->argument('file')))
|
if (! file_exists($this->argument('file')))
|
||||||
throw new \Exception('File not found: '.$this->argument('file'));
|
throw new \Exception('File not found: '.$this->argument('file'));
|
||||||
|
|
||||||
|
$mo = Mode::where('name',$this->option('mode'))->firstOrFail();
|
||||||
|
|
||||||
$o = new Frame;
|
$o = new Frame;
|
||||||
if ($this->option('replace')) {
|
if ($this->option('replace')) {
|
||||||
try {
|
try {
|
||||||
$o = $o->where('frame',$this->argument('frame'))
|
$o = $o->where('frame',$this->argument('frame'))
|
||||||
->where('index',$this->argument('index'))
|
->where('index',$this->argument('index'))
|
||||||
->where('mode_id',$this->option('mode'))
|
->where('mode_id',$mo->id)
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
|
|
||||||
} catch (ModelNotFoundException $e) {
|
} catch (ModelNotFoundException $e) {
|
||||||
@ -72,7 +75,7 @@ class FrameImport extends Command
|
|||||||
} else {
|
} else {
|
||||||
$o->frame = $this->argument('frame');
|
$o->frame = $this->argument('frame');
|
||||||
$o->index = $this->argument('index');
|
$o->index = $this->argument('index');
|
||||||
$o->mode_id = $this->option('mode');
|
$o->mode_id = $mo->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$o->content = ($this->option('trim'))
|
$o->content = ($this->option('trim'))
|
||||||
@ -80,10 +83,10 @@ class FrameImport extends Command
|
|||||||
: file_get_contents($this->argument('file'));
|
: file_get_contents($this->argument('file'));
|
||||||
|
|
||||||
$o->access = $this->option('access');
|
$o->access = $this->option('access');
|
||||||
$o->closed = $this->option('closed');
|
$o->public = $this->option('public');
|
||||||
$o->cost = $this->option('cost');
|
$o->cost = $this->option('cost');
|
||||||
$o->type = $this->option('type');
|
$o->type = $this->option('type');
|
||||||
|
|
||||||
$o->save();
|
$o->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
40
app/Mail/SendToken.php
Normal file
40
app/Mail/SendToken.php
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
use App\Models\Service;
|
||||||
|
|
||||||
|
class SendToken extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $token = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(string $token)
|
||||||
|
{
|
||||||
|
$this->token = $token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
return $this
|
||||||
|
->markdown('email.sendtoken')
|
||||||
|
->subject('Token to complete registration')
|
||||||
|
->with(['token'=>$this->token]);
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,18 @@ class Frame extends Model
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For cockroachDB, content is a "resource stream"
|
||||||
|
*
|
||||||
|
* @return bool|string
|
||||||
|
*/
|
||||||
|
public function getContentAttribute()
|
||||||
|
{
|
||||||
|
return is_resource($this->attributes['content'])
|
||||||
|
? stream_get_contents($this->attributes['content'])
|
||||||
|
: $this->attributes['content'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the Page Number
|
* Return the Page Number
|
||||||
*
|
*
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.0",
|
||||||
"laravel/framework": "5.7.*",
|
"laravel/framework": "5.7.*",
|
||||||
"laravel/tinker": "^1.0",
|
"laravel/tinker": "^1.0",
|
||||||
"lukaszkujawa/php-multithreaded-socket-server": "0.0.*"
|
"lukaszkujawa/php-multithreaded-socket-server": "0.0.*",
|
||||||
|
"nbj/cockroachdb-laravel": "^0.0.4@alpha"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"beyondcode/laravel-dump-server": "^1.0",
|
"beyondcode/laravel-dump-server": "^1.0",
|
||||||
|
61
composer.lock
generated
61
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "ff208b67c5f938a92c08bec4d362e0b4",
|
"content-hash": "d320d65a20b1a9c380331a5c8b043c98",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "dnoegel/php-xdg-base-dir",
|
"name": "dnoegel/php-xdg-base-dir",
|
||||||
@ -116,16 +116,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/dbal",
|
"name": "doctrine/dbal",
|
||||||
"version": "v2.9.0",
|
"version": "v2.9.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/dbal.git",
|
"url": "https://github.com/doctrine/dbal.git",
|
||||||
"reference": "21fdabe2fc01e004e1966f200d900554876bc63c"
|
"reference": "ec74d6e300d78fbc896669c3ca57ef9719adc9c6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/21fdabe2fc01e004e1966f200d900554876bc63c",
|
"url": "https://api.github.com/repos/doctrine/dbal/zipball/ec74d6e300d78fbc896669c3ca57ef9719adc9c6",
|
||||||
"reference": "21fdabe2fc01e004e1966f200d900554876bc63c",
|
"reference": "ec74d6e300d78fbc896669c3ca57ef9719adc9c6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -194,7 +194,7 @@
|
|||||||
"php",
|
"php",
|
||||||
"queryobject"
|
"queryobject"
|
||||||
],
|
],
|
||||||
"time": "2018-12-04T04:39:48+00:00"
|
"time": "2018-12-14T04:51:13+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/event-manager",
|
"name": "doctrine/event-manager",
|
||||||
@ -1065,6 +1065,51 @@
|
|||||||
],
|
],
|
||||||
"time": "2018-11-05T09:00:11+00:00"
|
"time": "2018-11-05T09:00:11+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "nbj/cockroachdb-laravel",
|
||||||
|
"version": "0.0.4-alpha",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/nbj/cockroachdb-laravel.git",
|
||||||
|
"reference": "852ac919fc57e4a483a027287000c6e37234d3c8"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/nbj/cockroachdb-laravel/zipball/852ac919fc57e4a483a027287000c6e37234d3c8",
|
||||||
|
"reference": "852ac919fc57e4a483a027287000c6e37234d3c8",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"type": "package",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Nbj\\Cockroach\\CockroachServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Nbj\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nikolaj Boel Jensen",
|
||||||
|
"email": "nbj@cego.dk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "CockroachDB driver for Laravel 5.6",
|
||||||
|
"keywords": [
|
||||||
|
"cockroach",
|
||||||
|
"cockroachdb",
|
||||||
|
"laravel"
|
||||||
|
],
|
||||||
|
"time": "2018-09-08T19:28:36+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "1.36.1",
|
"version": "1.36.1",
|
||||||
@ -4370,7 +4415,9 @@
|
|||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"stability-flags": [],
|
"stability-flags": {
|
||||||
|
"nbj/cockroachdb-laravel": 15
|
||||||
|
},
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
|
@ -82,6 +82,25 @@ return [
|
|||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'cockroach' => [
|
||||||
|
'driver' => 'cockroach',
|
||||||
|
'host' => env('DB_HOST', 'HOSTNAME-OF-COCKROACH-SERVER'),
|
||||||
|
'port' => env('DB_PORT', '26257'),
|
||||||
|
'database' => env('DB_DATABASE', 'DATABASE-NAME'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'schema' => 'public',
|
||||||
|
'sslmode' => 'prefer',
|
||||||
|
|
||||||
|
// Only set these keys if you want to run en secure mode
|
||||||
|
// otherwise you can them out of the configuration array
|
||||||
|
#'sslcert' => env('DB_SSLCERT', 'client.crt'),
|
||||||
|
#'sslkey' => env('DB_SSLKEY', 'client.key'),
|
||||||
|
#'sslrootcert' => env('DB_SSLROOTCERT', 'ca.crt'),
|
||||||
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
136
config/mail.php
Normal file
136
config/mail.php
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mail Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||||
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||||
|
| "sparkpost", "log", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may provide the host address of the SMTP server used by your
|
||||||
|
| applications. A default option is provided that is compatible with
|
||||||
|
| the Mailgun mail service which will provide reliable deliveries.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Port
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the SMTP port used by your application to deliver e-mails to
|
||||||
|
| users of the application. Like the host we have set this value to
|
||||||
|
| stay compatible with the Mailgun e-mail application by default.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'port' => env('MAIL_PORT', 587),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all e-mails sent by your application to be sent from
|
||||||
|
| the same address. Here, you may specify a name and address that is
|
||||||
|
| used globally for all e-mails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| E-Mail Encryption Protocol
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the encryption protocol that should be used when
|
||||||
|
| the application send e-mail messages. A sensible default using the
|
||||||
|
| transport layer security protocol should provide great security.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Server Username
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your SMTP server requires a username for authentication, you should
|
||||||
|
| set it here. This will get used to authenticate with your server on
|
||||||
|
| connection. You may also set the "password" value below this one.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Sendmail System Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||||
|
| the path to where Sendmail lives on this server. A default path has
|
||||||
|
| been provided here, which will work well on most of your systems.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Markdown Mail Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using Markdown based email rendering, you may configure your
|
||||||
|
| theme and component paths here, allowing you to customize the design
|
||||||
|
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'markdown' => [
|
||||||
|
'theme' => 'default',
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views/vendor/mail'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using the "log" driver, you may specify the logging channel
|
||||||
|
| if you prefer to keep mail messages separate from other log entries
|
||||||
|
| for simpler reading. Otherwise, the default channel will be used.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'log_channel' => env('MAIL_LOG_CHANNEL'),
|
||||||
|
|
||||||
|
];
|
19
data/1a-main.ans
Normal file
19
data/1a-main.ans
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[0;40;37m [1mÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿
|
||||||
|
[0;31mÍ[1;37m³[30mù[37m Õ¸Õ¸[31mú[37m³ [31mÍ[37m³[30mù[37m Õ͸[30mù[37m³ [31mÍ[37mÔ͸[30mù[37m Õ; [31mÍ[37m³[30mù[37m Õ͸[31mú[37m³ [0m[18C[1;30mddddddddddddddddd[0;41m [1;40m³ ³Ô¾³ ³ [41m [40m³ ÀÄÙ ³ [41m [40;31m²²[37m³ ³[41;31m°²[40;37m [41m [40m³ ³[31m²[37m³ ³
|
||||||
|
[41;31m°[40;37m³ ³[31m²±[37m³ ³ [41;31m°[40;37m³ Õ͸ ³ [41;31m°[40m°°[37m³ ³[31m²[41mÛ[40;37m [41;31m°[40;37m³ ³[31m±[37m³ ³
|
||||||
|
[41;31m±[40;37m³ ³[31m±[41m°[40;37m³ ³ [41;31m±[40;37m³ ³[41;31m°[40;37m³ ³ [41;31m±[40m±±[37m³ ³[41;31m°±[40;37m [41;31m±[40;37m³ ³[41;31m°[40;37m³ ³
|
||||||
|
[0;31mÍ[1;37m³[30mù[37m ³[31mÍÍ[37m³[30mù[37m³ [31mÍ[37m³[30mù[37m ³[31mÍ[37m³[30mù[37m³ [31mÍ[37mÚÄÙ[30mù[37m ÀÄ¿ [31mÍ[37m³[30mù[37m ³[31mÍ[37m³[30mù[37m³[0m [41m [1m*0# to get back here anytime. [0m [1mÔÍ; Ô; ÔÍÍ; Ô; ÔÍÍÍÍÍÍ; ÔÍÍ; Ô;
|
||||||
|
|
||||||
|
[0m[24C[1m [41;30mß[40;37m [41;30mß[40;37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mß[31mÜ[37m [41;30mß[40mßß[37m [41;30mß[40mß[41mß[0m
|
||||||
|
[24C[1m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40mß [37m [41;31mÜ[40mßÜ
|
||||||
|
[0m[24C[1m ßßß ß ß ßß ßßß ß ß
|
||||||
|
[0m[10C[1;41;30mß[40mßß[37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mßß[37m [30mßß[41mß[40;37m [41;30mß[40mß[41mß[40;37m [41;30mß[40;37m [41;30mß[40;37m [41;30mß[40mßß[37m [30mßß[41mß[40;37m [30mß[37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mß[41mß[0m
|
||||||
|
[10C[1;41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [31mßß[41mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40mßÜ[37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m[6C[41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[0m
|
||||||
|
[10C[1mßßß ßßß ß ß ßßß ß ß ß ßßß ßßß ß ß ßßß ß ß
|
||||||
|
|
||||||
|
|
||||||
|
[0m [31m1[1;37m Messages[0m[48C[1;31m*90#[0m [1mUser Menu
|
||||||
|
[0m [31m3[1;37m Fido Networks[0m[43C[1;31m*91#[0m [1mMessages
|
||||||
|
[0m [31m5[1;33m [37mDirectory[0m[47C[1;31m*95#[0m [1mHelp
|
||||||
|
[0m [31m8[1;37m Help[0m[52C[1;31m*97#[0m [1mDirectory
|
||||||
|
[0m [31m9[1;37m About this System[0m[39C[1;31m*99#[0m [1mLog Off
|
20
data/980a-login.ans
Normal file
20
data/980a-login.ans
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[0;40;37m [1mÚÄÄ¿ ÚÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄ¿[0m[5C[1mÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿
|
||||||
|
[0;31mÍ[1;37m³[30mù[37m ³[31mÍÍ[37m³[30mù[37m³[31mÍ[37m³[30mù[37m Õ͸[30mù[37m³[31mÍ[37m³[30mù[37m ³[31mÍÍÍÍÍ[37m³[30mù[37m Õ͸[30mù[37m³[31mÍ[37m³[30mù[37m Õ͸[30mù[37m³[31mÍ[37m³[30mù[37m Õ¸Õ¸[31mú[37m³[31mÍ[37m³[30mù[37m Õ͸[30mù[37m³[0;31mÍ
|
||||||
|
[1;41m°[40;37m³ ³[31m²[41mÛ[40;37m³ ³[41m [40m³ À¿ÀÄÙ[41;31m°[40;37m³ ³[41;31mÛ[40m²²²[41;37m [40m³ ³[31m²[37mÀÄÙ[41;31m°[40;37m³ ³[41;31mÛ[40;37m³ ³[41m [40m³ ³Ô¾³ ³[41m [40m³ À¿ÀÄÙ[41;31m°[0m
|
||||||
|
[1;41;31m±[40;37m³ ³Õ¸³ ³[41;31m°[40;37m³ ÚÙÚÄ¿[41;31m±[40;37m³ ³[41;31m²[40;37mÚÄ¿[41;31m°[40;37m³ ³[31m°[37mÚÄ¿[41;31m±[40;37m³ ³[41;31m²[40;37m³ ³[41;31m°[40;37m³ ³[31m²±[37m³ ³[41;31m°[40;37m³ ÚÙÚÄ¿[41;31m±[0m
|
||||||
|
[1;41;31m²[40;37m³ ÀÙÀÙ ³[41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m²[40;37m³ ÀÄÙ ³[41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m²[40;37m³ ÀÄÙ ³[41;31m±[40;37m³ ³[31m±[41m°[40;37m³ ³[41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m²[0m
|
||||||
|
[31mÍ[1;37m³[30mù[0m[5C[1;30mù[37m³[31mÍ[37m³[30mù[37m Ô;[30mù[37m³[31mÍ[37m³[30mù[0m[5C[1;30mù[37m³[31mÍ[37m³[30mù[37m Ô;[30mù[37m³[31mÍ[37m³[30mù[0m[5C[1;30mù[37m³[31mÍ[37m³[30mù[37m ³[31mÍÍ[37m³[30mù[37m³[31mÍ[37m³[30mù[37m Ô;[30mù[37m³[0;31mÍ
|
||||||
|
[37m [1mÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ; ÔÍ; Ô; ÔÍÍÍÍÍÍ;
|
||||||
|
[41m A vBBS by ....deon [0m
|
||||||
|
[1mYou have connected to [0;31mVBBS[1;37m.
|
||||||
|
|
||||||
|
This is a public access[0;34m ANSItex[1;37m BBS.
|
||||||
|
|
||||||
|
[0m [1mWhile this system is currently under development, you are welcome to use it
|
||||||
|
[0m [1mand make recommendations.
|
||||||
|
|
||||||
|
[0m [1mIf you would like to host your own pages on this system, please let [0;31mdeon
|
||||||
|
[37m [1mknow.
|
||||||
|
|
||||||
|
[0;31m User: [1;37muuuuuuuuuuu[0m [New Accounts use[1m [0;31mNEW#[37m]
|
||||||
|
[31m Pass: [1;37mppppppppppp
|
18
data/981a-register.ans
Normal file
18
data/981a-register.ans
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[0;40;37m [1mÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄ¿ ÚÄ¿[0m [1mÚÄÄÄ¿ ÚÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿
|
||||||
|
[0;31mÍ[1;37m³[30mù[37m Õ͸[31mú[37m³[31mÍ[37m³[30mù[37m Õ͸[30mù[37m³[31mÍ[37m³[30mù[37m ³[31mÍÍ[37m³[30mù[37m³[0;31mÍÍÍ[1;37m³[30mù[37m ³[31mÍ[37m³[30mù[37m³[31mÍ[37m³[30mù[37mÕÍÍÍÍ;[31mÍ[37m³[30mù[37m Õ͸[30mù[37m³[31mÍ[37m³[30mù[37m Õ͸[30mù[37m³[0;31mÍ
|
||||||
|
[41;37m [1;40m³ ³[31m²[37m³ ³[41m [40m³ À¿ÀÄÙ[41;31m°[40;37m³ ³[31m²[41mÛ[40;37m³ ³[41;31m°°°[40;37m³ ³[41;31mÛ[40;37m³ ³[41;31m²[40;37m³ ÀÄÄÄÄÄ¿[41m [40m³ À¿ÀÄÙ[41m [40m³ ÀÄÙÚÙ[41;31m°[0m
|
||||||
|
[1;41;31m°[40;37m³ ³[31m±[37m³ ³[41;31m°[40;37m³ ÚÙÚÄ¿[41;31m±[40;37m³ ³Õ¸³ ³[41;31m±±±[40;37m³ ³[41;31m²[40;37m³ ³[41;31mÛ[40;37mÔÍÍ͸ [30mù[37m³[41;31m°[40;37m³ ÚÙÚÄ¿[41;31m°[40;37m³ Õ͸À¿[41;31m±[0m
|
||||||
|
[1;41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m²[40;37m³ ÀÙÀÙ ³[41;31m²²²[40;37m³ ÀÄÙ ³[41;31m²[40;37mÚÄÄÄÙ ³[41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m±[40;37m³ ³[41;31m°[40;37m³ ³[41;31m²[0m
|
||||||
|
[31mÍ[1;37m³[30mù[37m ³[31mÍ[37m³[30mù[37m³[31mÍ[37m³[30mù[37m Ô;[30mù[37m³[31mÍ[37m³[30mù[0m[5C[1;30mù[37m³[0;31mÍÍÍ[1;37m³[30mù[0m[5C[1;30mù[37m³[31mÍ[37m³[30mù[0m[5C[1;30mù[37m³[31mÍ[37m³[30mù[37m Ô;[30mù[37m³[31mÍ[37m³[30mù[37m ³[31mÍ[37m³[30mù[37m³[0;31mÍ
|
||||||
|
[37m [1mÔÍÍ; Ô; ÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ;[0m [1mÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ; ÔÍÍÍÍÍÍ; ÔÍÍ; Ô;
|
||||||
|
[0;41m [1mThanks for your interest! To get started we just need a few details: [0m
|
||||||
|
|
||||||
|
|
||||||
|
[31mPreferred User Name:[1;37m ttttttttttt
|
||||||
|
[0m[11C[31mReal Name:[1;37m ttttttttttttttttttttttttttttt
|
||||||
|
[0m[7C[31mEmail Address:[1;37m ttttttttttttttttttttttttttttt
|
||||||
|
[0m[12C[31mPassword:[1;37m ppppppppppp
|
||||||
|
[0m[5C[31mRepeat Password:[1;37m ppppppppppp
|
||||||
|
[0m[12C[31mLocation:[1;37m ttttttttttttttttttttttttttttt
|
||||||
|
|
||||||
|
[0m[15C[31mToken: [1;37mttttt
|
10
data/under-construction.ans
Normal file
10
data/under-construction.ans
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[0;40;37m
|
||||||
|
[24C[1m [41;30mß[40;37m [41;30mß[40;37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mß[31mÜ[37m [41;30mß[40mßß[37m [41;30mß[40mß[41mß[0m
|
||||||
|
[24C[1m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40mß [37m [41;31mÜ[40mßÜ
|
||||||
|
[0m[24C[1m ßßß ß ß ßß ßßß ß ß
|
||||||
|
[0m[10C[1;41;30mß[40mßß[37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mßß[37m [30mßß[41mß[40;37m [41;30mß[40mß[41mß[40;37m [41;30mß[40;37m [41;30mß[40;37m [41;30mß[40mßß[37m [30mßß[41mß[40;37m [30mß[37m [41;30mß[40mß[41mß[40;37m [41;30mß[40mß[41mß[0m
|
||||||
|
[10C[1;41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [31mßß[41mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40mßÜ[37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[0m[6C[1;41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[40;37m [41;31mÜ[0m
|
||||||
|
[10C[1mßßß ßßß ß ß ßßß ß ß ß ßßß ßßß ß ß ßßß ß ß
|
||||||
|
[0m Lets hope that this frame is installed soon! Please check back another time...
|
||||||
|
|
||||||
|
[61C[5;31m*# [1;25;37mto go back...
|
@ -17,7 +17,7 @@ class InitDatabase extends Migration
|
|||||||
|
|
||||||
Schema::create('modes', function (Blueprint $table) {
|
Schema::create('modes', function (Blueprint $table) {
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('id')->autoIncrement();
|
$table->integer('id')->autoIncrement()->index();
|
||||||
$table->string('name',16);
|
$table->string('name',16);
|
||||||
$table->string('note',255);
|
$table->string('note',255);
|
||||||
|
|
||||||
@ -25,43 +25,38 @@ class InitDatabase extends Migration
|
|||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('cugs', function (Blueprint $table) {
|
Schema::create('cugs', function (Blueprint $table) {
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('id');
|
$table->integer('id')->index()->unique();
|
||||||
$table->string('name',16);
|
$table->string('name', 16);
|
||||||
$table->string('note',255);
|
$table->string('note', 255);
|
||||||
$table->integer('parent_id')->nullable();
|
$table->integer('parent_id')->nullable()->index();
|
||||||
|
});
|
||||||
|
|
||||||
$table->primary('id');
|
Schema::table('cugs', function (Blueprint $table) {
|
||||||
$table->foreign('parent_id')->references('id')->on('cugs');
|
$table->foreign('parent_id')->references('id')->on('cugs');
|
||||||
$table->unique(['name']);
|
$table->unique(['name']);
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('frames', function (Blueprint $table) {
|
Schema::create('frames', function (Blueprint $table) {
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('id')->autoIncrement();
|
$table->integer('id')->autoIncrement()->index();
|
||||||
$table->integer('frame');
|
$table->integer('frame');
|
||||||
$table->char('index',1);
|
$table->char('index', 1);
|
||||||
$table->integer('mode_id');
|
$table->integer('mode_id')->index();
|
||||||
$table->char('type',2);
|
$table->char('type', 2);
|
||||||
$table->smallInteger('cost')->default(0);
|
$table->smallInteger('cost')->default(0);
|
||||||
$table->integer('cug_id')->default(0);
|
$table->integer('cug_id')->default(0)->index();
|
||||||
$table->boolean('public')->default(FALSE);
|
$table->boolean('public')->default(FALSE);
|
||||||
$table->binary('content');
|
$table->binary('content');
|
||||||
$table->string('note',255)->nullable();
|
$table->string('note', 255)->nullable();
|
||||||
|
|
||||||
//$table->unique(['frame','index','mode_id']); // Not needed since we have timewarp
|
//$table->unique(['frame','index','mode_id']); // Not needed since we have timewarp
|
||||||
|
|
||||||
|
});
|
||||||
|
Schema::table('frames', function (Blueprint $table) {
|
||||||
$table->foreign('mode_id')->references('id')->on('modes');
|
$table->foreign('mode_id')->references('id')->on('modes');
|
||||||
$table->foreign('cug_id')->references('id')->on('cugs');
|
$table->foreign('cug_id')->references('id')->on('cugs');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('routes', function (Blueprint $table) {
|
|
||||||
$table->integer('id')->autoIncrement();
|
|
||||||
$table->char('key',1);
|
|
||||||
$table->integer('route');
|
|
||||||
|
|
||||||
$table->foreign('route')->references('id')->on('frames');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,18 +16,21 @@ class CreateFramemeta extends Migration
|
|||||||
$this->down();
|
$this->down();
|
||||||
|
|
||||||
Schema::create('framemeta', function (Blueprint $table) {
|
Schema::create('framemeta', function (Blueprint $table) {
|
||||||
$table->integer('frame_id')->primary();
|
$table->integer('frame_id')->index();
|
||||||
$table->string('r0')->default('*');
|
$table->string('r0')->default('*');
|
||||||
$table->string('r1')->default('*');
|
$table->string('r1')->default('*');
|
||||||
$table->string('r2')->default('*');
|
$table->string('r2')->default('*');
|
||||||
$table->string('r3')->default('*');
|
$table->string('r3')->default('*');
|
||||||
$table->string('r4')->default('*');
|
$table->string('r4')->default('*');
|
||||||
$table->string('r5')->default('*');
|
$table->string('r5')->default('*');
|
||||||
$table->string('r6')->default('*');
|
$table->string('r6')->default('*');
|
||||||
$table->string('r7')->default('*');
|
$table->string('r7')->default('*');
|
||||||
$table->string('r8')->default('*');
|
$table->string('r8')->default('*');
|
||||||
$table->string('r9')->default('*');
|
$table->string('r9')->default('*');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('framemeta', function (Blueprint $table) {
|
||||||
$table->foreign('frame_id')->references('id')->on('frames');
|
$table->foreign('frame_id')->references('id')->on('frames');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,11 @@ class CreateUserCug extends Migration
|
|||||||
$this->down();
|
$this->down();
|
||||||
|
|
||||||
Schema::create('cug_users', function (Blueprint $table) {
|
Schema::create('cug_users', function (Blueprint $table) {
|
||||||
$table->integer('cug_id');
|
$table->integer('cug_id')->index();
|
||||||
$table->integer('user_id')->unsigned();
|
$table->integer('user_id')->unsigned()->index();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('cug_users', function (Blueprint $table) {
|
||||||
$table->foreign('user_id')->references('id')->on('users');
|
$table->foreign('user_id')->references('id')->on('users');
|
||||||
$table->foreign('cug_id')->references('id')->on('cugs');
|
$table->foreign('cug_id')->references('id')->on('cugs');
|
||||||
$table->unique(['user_id','cug_id']);
|
$table->unique(['user_id','cug_id']);
|
||||||
|
@ -16,9 +16,11 @@ class CreateCugOwners extends Migration
|
|||||||
$this->down();
|
$this->down();
|
||||||
|
|
||||||
Schema::create('cug_owners', function (Blueprint $table) {
|
Schema::create('cug_owners', function (Blueprint $table) {
|
||||||
$table->integer('cug_id');
|
$table->integer('cug_id')->index();
|
||||||
$table->integer('user_id')->unsigned();
|
$table->integer('user_id')->unsigned()->index();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::table('cug_owners', function (Blueprint $table) {
|
||||||
$table->foreign('user_id')->references('id')->on('users');
|
$table->foreign('user_id')->references('id')->on('users');
|
||||||
$table->foreign('cug_id')->references('id')->on('cugs');
|
$table->foreign('cug_id')->references('id')->on('cugs');
|
||||||
$table->unique(['user_id','cug_id']);
|
$table->unique(['user_id','cug_id']);
|
||||||
|
@ -14,7 +14,6 @@ class FrameAddAccess extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('frames', function (Blueprint $table) {
|
Schema::table('frames', function (Blueprint $table) {
|
||||||
$table->renameColumn('public','closed');
|
|
||||||
$table->boolean('access')->default(FALSE);
|
$table->boolean('access')->default(FALSE);
|
||||||
$table->dropForeign(['cug_id']);
|
$table->dropForeign(['cug_id']);
|
||||||
$table->dropColumn('cug_id');
|
$table->dropColumn('cug_id');
|
||||||
@ -30,9 +29,8 @@ class FrameAddAccess extends Migration
|
|||||||
{
|
{
|
||||||
Schema::table('frames', function (Blueprint $table) {
|
Schema::table('frames', function (Blueprint $table) {
|
||||||
$table->dropColumn('access');
|
$table->dropColumn('access');
|
||||||
$table->renameColumn('closed','public');
|
|
||||||
$table->integer('cug_id')->default(0);
|
$table->integer('cug_id')->default(0);
|
||||||
$table->foreign('cug_id')->references('id')->on('cugs');
|
$table->foreign('cug_id')->references('id')->on('cugs');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,4 +18,4 @@ class SeedCUG extends Seeder
|
|||||||
'note' => 'All frames belong to this CUG if not any other.',
|
'note' => 'All frames belong to this CUG if not any other.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,10 +11,15 @@ class SeedMode extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
DB::table('modes')->insert([
|
DB::table('modes')->insert([
|
||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
'name' => 'VideoTex',
|
'name' => 'videotex',
|
||||||
'note' => 'Original ViewData/VideoTex 40x25 char mode.',
|
'note' => 'Original ViewData/VideoTex 40x25 char mode.',
|
||||||
]);
|
]);
|
||||||
|
DB::table('modes')->insert([
|
||||||
|
'created_at' => now(),
|
||||||
|
'name' => 'ansi',
|
||||||
|
'note' => 'ANSItex 80x25 char mode.',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
resources/views/email/sendtoken.blade.php
Normal file
14
resources/views/email/sendtoken.blade.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@component('mail::message')
|
||||||
|
# New User Token
|
||||||
|
|
||||||
|
Use this token to sign into ANSItex
|
||||||
|
|
||||||
|
If this email is a surprise to you, you can ignore it.
|
||||||
|
|
||||||
|
@component('mail::panel')
|
||||||
|
TOKEN: <b>{{ $token }}</b>
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
Thanks,
|
||||||
|
{{ config('app.name') }}
|
||||||
|
@endcomponent
|
Reference in New Issue
Block a user