Remove some extraneous/old files
This commit is contained in:
parent
3f70cbb20b
commit
55e69c2628
@ -1,66 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* meta
|
||||
*
|
||||
* Hierarchial data tool
|
||||
*
|
||||
* @package meta
|
||||
* @author Timothy J. Warren
|
||||
* @copyright Copyright (c) 2012
|
||||
* @link https://github.com/aviat4ion/meta
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Data Controller
|
||||
*
|
||||
* @package meta
|
||||
*/
|
||||
class data extends meta\controller {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* View section data
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Add data
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$section_id = (int) $_POST['section_id'];
|
||||
//$old_data = $this->model->get_data($section_id);
|
||||
|
||||
|
||||
$keys = filter_var_array($_POST['name'], FILTER_SANITIZE_STRING);
|
||||
$vals = filter_var_array($_POST['val'], FILTER_SANITIZE_STRING);
|
||||
|
||||
//echo miniMVC\to_string($_POST);
|
||||
|
||||
$data = array_combine($keys, $vals);
|
||||
|
||||
$res = /*(empty($old_data))
|
||||
?*/ $this->model->add_data($section_id, $data);
|
||||
//: FALSE;
|
||||
|
||||
($res)
|
||||
? $this->page->set_message('success', 'Added data')
|
||||
: $this->page->set_message('error', 'Data already exists');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// End of data.php
|
@ -594,6 +594,25 @@ class model extends \miniMVC\Model {
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ! Miscellaneous methods
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Check if a valid type for editing
|
||||
*
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
public function is_valid_type($str)
|
||||
{
|
||||
$valid = array(
|
||||
'genre','category','section','data'
|
||||
);
|
||||
|
||||
return in_array(str_to_lower($str), $valid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>TinyEditor - JavaScript WYSIWYG Editor</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script type="text/javascript" src="tinyeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<textarea id="input" style="width:400px; height:200px"></textarea>
|
||||
<script type="text/javascript">
|
||||
new TINY.editor.edit('editor',{
|
||||
id:'input',
|
||||
width:584,
|
||||
height:175,
|
||||
cssclass:'te',
|
||||
controlclass:'tecontrol',
|
||||
rowclass:'teheader',
|
||||
dividerclass:'tedivider',
|
||||
controls:['bold','italic','underline','strikethrough','|','subscript','superscript','|',
|
||||
'orderedlist','unorderedlist','|','outdent','indent','|','leftalign',
|
||||
'centeralign','rightalign','blockjustify','|','unformat','|','undo','redo','n',
|
||||
'font','size','style','|','image','hr','link','unlink','|','cut','copy','paste','print'],
|
||||
footer:true,
|
||||
fonts:['Verdana','Arial','Georgia','Trebuchet MS'],
|
||||
xhtml:true,
|
||||
cssfile:'style.css',
|
||||
bodyid:'editor',
|
||||
footerclass:'tefooter',
|
||||
toggle:{text:'source',activetext:'wysiwyg',cssclass:'toggle'},
|
||||
resize:{cssclass:'resize'}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user