Code clean up + datatables (#64)

* Reformat Code

Reformat Code
- spaces + tabs

* Code cleanup

removed duplicated datatables code

* Datatables

replace spells, monsters tables with JavaScript Sortable Tables (DataTables?)
This commit is contained in:
Lee
2018-12-02 05:30:36 +00:00
committed by slawkens
parent e3bcbc4da9
commit 876b1b988a
38 changed files with 2396 additions and 2510 deletions

View File

@@ -11,19 +11,16 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = 'Notepad';
$notepad_content = Notepad::get($account_logged->getId());
if(isset($_POST['content']))
{
if (isset($_POST['content'])) {
$_content = html_entity_decode(stripslashes($_POST['content']));
if(!$notepad_content)
if (!$notepad_content)
Notepad::create($account_logged->getId(), $_content);
else
Notepad::update($account_logged->getId(), $_content);
echo '<div class="success" style="text-align: center;">Saved at ' . date('H:i') . '</div>';
}
else
{
if($notepad_content !== false)
} else {
if ($notepad_content !== false)
$_content = $notepad_content;
}
@@ -35,7 +32,7 @@ class Notepad
{
global $db;
$query = $db->select(TABLE_PREFIX . 'notepad', array('account_id' => $account_id));
if($query !== false)
if ($query !== false)
return $query['content'];
return false;