[ 'ssha512_password', 'Encrypt a password' ],
[ 'logout', 'Clear Basic Auth' ],
[ 'status', 'Status infos page' ],
+ [ 'json', 'Dump json infos' ],
] + (
($this->perm < self::ADMIN) ? [] :
[
- [ 'json', 'Dump json infos' ],
[ 'phpinfo', 'Phpinfo datas' ],
[ '_SERVER', 'Dumper _SERVER' ],
[ '_REQUEST', 'Dumper _REQUEST' ],
} elseif ($action == 'status') {
$this->page($this,'status');
- } elseif ($this->perm < self::ADMIN) {
- // NOW ONLY FOR ADMIN !
-
} elseif ($action == 'json') {
$this->page($this,'json');
+ } elseif ($this->perm < self::ADMIN) {
+ // NOW ONLY FOR ADMIN !
+
} elseif ($action == 'phpinfo') {
$this->rows_table($action,$this->phpinfo_rows());
#$this->page(['phpinfo'=>$this->page->phpinfo(true)]);
[ 'help', 'This help' ],
[ 'status', 'Database status' ],
[ 'ls', 'List tables' ],
+ [ 'databases', 'List databases' ],
+ [ 'schema', 'Dump database structure only' ],
+ [ 'dump', 'Dump database structure with datas' ],
+ [ 'csv', 'Dump database data in csv with table name as first colum' ],
],['command','description'],function(&$r){
$r['command'] = $this->page->tag('a',$r['command'],'href="'
.$this->db->base.'/'.($r['command'] == self::PARAM_DB_DEFAULT
$this->db->dump2csv();
exit;
- } elseif ($action == 'sql') {
+ } elseif ($action == 'schema') {
header('Content-type: text/plain');
$this->db->sql();
exit;