codiad/components/system/controller.php
Isaac Brown 5583db5528 * Added Bangla language
* Added PostgreSQL
* Added SQL library
* Added show password
* Performance Improvements
* Updated active files module
* Updated cursor tracking
* Updated settings module
2019-05-01 09:11:50 -04:00

33 lines
708 B
PHP

<?php
require_once('../../common.php');
if ( ! isset( $_POST['action'] ) ) {
die( formatJSEND( "error", "Missing parameter" ) );
}
//////////////////////////////////////////////////////////////////
// Verify Session or Key
//////////////////////////////////////////////////////////////////
checkSession();
if ( $_POST['action'] == 'create_default_tables' ) {
if( is_admin() ) {
global $sql;
$result = $sql->create_default_tables();
if( $result === true ) {
exit( formatJSEND( "success", "Created tables." ) );
} else {
exit( formatJSEND( "error", "Could not create tables." ) );
}
} else {
exit( formatJSEND( "error", "Only admins can use this method." ) );
}
}