first commit
This commit is contained in:
33
admin/templatesCategories.php
Normal file
33
admin/templatesCategories.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
$main_class = 'TemplatesCategories';
|
||||
|
||||
class TemplatesCategories extends Window
|
||||
{
|
||||
protected $tableName = 'templates_categories';
|
||||
|
||||
public function get_vars()
|
||||
{
|
||||
$vars = parent::get_vars();
|
||||
|
||||
$this->unserializeCustomData($vars['body']['data']);
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
public function getData()
|
||||
{
|
||||
$data = parent::getData();
|
||||
$acn = $this->getAction();
|
||||
|
||||
if (empty($data['position']) && $acn == 'add') {
|
||||
$data['position'] = returnSQLResult('SELECT COUNT(*) FROM '.getTableName('templates_categories'));
|
||||
}
|
||||
|
||||
if (getVal('Submit')) {
|
||||
$this->serializeCustomData($data);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user