	<?php
	/*
	* =======================================================================
	* CLASSNAME:        database.php
	* DATE CREATED:  	11-11-2013
	* FOR TABLE:  		admin_users
	* PRODUCED BY:		HEZECOM UltimateSpeed PHP CODE GENERATOR
	* AUTHOR:			Hezecom (http://hezecom.com) info@hezecom.net
	* =======================================================================
	*/
	if(!defined('VALID_DIR')) die('You are not allowed to execute this file directly');
		
		$dbm = new Hezdbmanager();
		
		if (get('view')=='hezedata')
		{
			//Import CSV
			$dbm->TableImportCSV(''.H_ADMIN.'&view=hezedata&do=database&msg=importer');
			
			//Create Backup
			if(get('dbm')){
			$dbm->backup_tables(H_BACKUP_DIR);
			send_to(''.H_ADMIN.'&view=hezedata&do=database&msg=backup');
			}
			//Delete Backup
			elseif(get('dbfile')){
			$dbm->deletebk(H_BACKUP_DIR,get('dbfile'));
			send_to(''.H_ADMIN.'&view=hezedata&do=database&msg=Delete');
			}
			//Restore DB
			elseif(get('dbrestore')){
			$dbm->ImportSplitSQL(H_BACKUP_DIR.'/'.get('dbrestore'));
			send_to(''.H_ADMIN.'&view=hezedata&do=database&msg=Restore');
			}
			//Export CSV
			elseif(get('hexport')){
			$dbm->ExportTable(get('hexport'));
			send_to(''.H_ADMIN.'&view='.get('hexport').'&do=viewall&msg=Export');
			}
			include 'libraries/views/admin/database.php';
		}


?>