Advertisement
Guest User

application/_installation/setup-config-html.php

a guest
Nov 5th, 2015
3,665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 86.63 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * HTMLs configuration pages
  5.  * @author Bruno Ribeiro <bruno.espertinho@gmail.com>
  6.  * @version 1.1
  7.  * @access public
  8.  * @package Config
  9.  * @todo Improve the customization of the configuration file
  10.  * */
  11. class SetupConfigHTML {
  12.  
  13.     /**
  14.      * file config required for start the website
  15.      * Note: at the time of verification and creating the configuration file, is always
  16.      * in the root folder, then the file is in a folder specify as follows: "config/config.inc.php"
  17.      * @var string
  18.      */
  19.     public $file = 'application/config/config.php';
  20.  
  21.     /**
  22.      * Name your project
  23.      * @var str
  24.      */
  25.     var $name = 'Sistema Financeiro para salão de beleza';
  26.  
  27.     /**
  28.      * Name SQL file
  29.      * @var String
  30.      */
  31.     var $sql = '/Salao.sql';
  32.  
  33.     /**
  34.      * link your project
  35.      * @var str
  36.      */
  37.     var $link = 'http://example.com';
  38.  
  39.     /**
  40.      * logo your project
  41.      * @var str
  42.      */
  43.     var $logo = 'images/w-logo-blue.png';
  44.  
  45.     /**
  46.      * Rules for replacement
  47.      * @var array
  48.      */
  49.     var $Rules = array("&lt;" => "<", "&gt;" => ">", "&quot;" => '"', "&apos;" => "'", "&amp;" => "&");
  50.  
  51.     /**
  52.      * Metthod Magic
  53.      * Require language file
  54.      */
  55.     public function __construct() {
  56.         include('Language/pt-br.php');
  57.         if (!defined('LOGO')) {
  58.             die('error');
  59.         }
  60.     }
  61.  
  62.     protected function makehtaccess($POST) {
  63.         $RewriteBase = parse_url($POST['url'], PHP_URL_PATH);
  64.         return <<<EOF
  65. # Necessary to prevent problems when using a controller named "index" and having a root index.php
  66. # more here: http://stackoverflow.com/q/20918746/1114320
  67. Options -MultiViews
  68.  
  69. # turn rewriting on
  70. RewriteEngine On
  71.  
  72. # When using the script within a sub-folder, put this path here, like /mysubfolder/
  73. # If your app is in the root of your web folder, then please delete this line or comment it out
  74. RewriteBase {$RewriteBase}
  75.  
  76. RewriteCond %{REQUEST_FILENAME} !-d
  77. RewriteCond %{REQUEST_FILENAME} !-f
  78. RewriteCond %{REQUEST_FILENAME} !-l
  79.  
  80. RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
  81. EOF;
  82.     }
  83.  
  84.     protected function MakeSQLFile($POST) {
  85.         $name = $POST['name'];
  86.         $now = date("Y-m-d H:i:s", time());
  87.         $pass = password_hash($_POST['passSystem'], PASSWORD_DEFAULT, array('cost' => "10"));
  88.         return <<<EOF
  89. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  90. SET time_zone = "+00:00";
  91.  
  92.  
  93. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  94. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  95. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  96. /*!40101 SET NAMES utf8 */;
  97. -- --------------------------------------------------------
  98.  
  99. --
  100. -- Estrutura para tabela `agenda`
  101. --
  102.  
  103. CREATE TABLE IF NOT EXISTS `agenda` (
  104.   `id` int(11) NOT NULL AUTO_INCREMENT,
  105.   `id_user` int(11) NOT NULL,
  106.   `id_cliente` int(11) DEFAULT NULL,
  107.   `titulo` varchar(250) DEFAULT NULL,
  108.   `description` mediumtext,
  109.   `horario` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  110.   `horario_end` datetime DEFAULT NULL COMMENT 'Termínio',
  111.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  112.   PRIMARY KEY (`id`)
  113. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
  114.  
  115. -- --------------------------------------------------------
  116.  
  117. --
  118. -- Estrutura para tabela `ChangeLog`
  119. --
  120.  
  121. CREATE TABLE IF NOT EXISTS `ChangeLog` (
  122.   `id` int(11) NOT NULL AUTO_INCREMENT,
  123.   `id_version` int(11) NOT NULL,
  124.   `id_bug` int(11) DEFAULT NULL,
  125.   `title` varchar(250) DEFAULT NULL,
  126.   `descri` varchar(250) DEFAULT NULL,
  127.   `data_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'no show',
  128.   PRIMARY KEY (`id`)
  129. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=74 ;
  130.  
  131. --
  132. -- Fazendo dump de dados para tabela `ChangeLog`
  133. --
  134.  
  135. INSERT INTO `ChangeLog` (`id`, `id_version`, `id_bug`, `title`, `descri`, `data_created`) VALUES
  136. (1, 1, NULL, 'added: Comissão de Usuário', NULL, '2014-10-03 01:21:35'),
  137. (2, 2, NULL, 'added: Filtros para pesquisa', NULL, '2014-10-03 01:22:35'),
  138. (3, 2, NULL, 'added: Lembretes', NULL, '2014-10-03 01:22:35'),
  139. (4, 3, NULL, 'fix: API correios', NULL, '2014-10-03 01:24:11'),
  140. (5, 3, NULL, 'update: Filtros avançados', NULL, '2014-10-03 01:24:11'),
  141. (6, 3, NULL, 'update: 3 novos Gráficos', NULL, '2014-10-03 01:24:11'),
  142. (7, 3, NULL, 'added: Chat Global', NULL, '2014-10-03 01:24:11'),
  143. (8, 3, NULL, 'added: Controle de Serviço', NULL, '2014-10-03 01:24:11'),
  144. (9, 3, NULL, 'added: Controle de Estoque', NULL, '2014-10-03 01:24:41'),
  145. (10, 3, NULL, 'added: Comissão de Usuário', NULL, '2014-10-03 01:24:41'),
  146. (11, 4, NULL, 'fix: Query Security', NULL, '2014-10-03 01:25:12'),
  147. (12, 4, NULL, 'update: Query Mysqli', NULL, '2014-10-03 01:25:12'),
  148. (13, 5, NULL, 'added: Aniversário', NULL, '2014-10-03 01:25:50'),
  149. (14, 5, NULL, 'added: Checkout', NULL, '2014-10-03 01:25:50'),
  150. (15, 5, NULL, 'added: Carrinho de Compras', NULL, '2014-10-03 01:25:50'),
  151. (16, 6, NULL, 'fix: Checkout', NULL, '2014-10-03 01:27:39'),
  152. (17, 6, NULL, 'fix: Vendas', NULL, '2014-10-03 01:27:39'),
  153. (18, 6, NULL, 'update: Aniversário', NULL, '2014-10-03 01:27:39'),
  154. (19, 6, NULL, 'update: Alt Clientes', NULL, '2014-10-03 01:27:39'),
  155. (20, 6, NULL, 'update: Add Clientes', NULL, '2014-10-03 01:27:39'),
  156. (21, 6, NULL, 'update: Query Clientes', NULL, '2014-10-03 01:27:39'),
  157. (22, 6, NULL, 'update: Query Contas', NULL, '2014-10-03 01:27:39'),
  158. (23, 6, NULL, 'added: Query Recibos Itens', NULL, '2014-10-03 01:27:39'),
  159. (24, 6, NULL, 'added: Query Recibos', NULL, '2014-10-03 01:27:39'),
  160. (25, 6, NULL, 'added: Tool Recibos', NULL, '2014-10-03 01:27:39'),
  161. (41, 7, NULL, 'fix: Login', NULL, '2014-10-03 01:30:00'),
  162. (42, 7, NULL, 'fix: Menu', NULL, '2014-10-03 01:30:00'),
  163. (43, 7, NULL, 'fix: Principal', NULL, '2014-10-03 01:30:00'),
  164. (44, 7, NULL, 'fix: Relatório Financeiro', NULL, '2014-10-03 01:30:00'),
  165. (46, 8, NULL, 'fix: Detalhes Funcionário', NULL, '2014-10-03 01:31:14'),
  166. (47, 8, NULL, 'fix: Recibos', NULL, '2014-10-03 01:31:14'),
  167. (48, 8, NULL, 'fix: Finanças Produtos', NULL, '2014-10-03 01:31:29'),
  168. (49, 8, NULL, 'fix: Relatório Financeiro', NULL, '2014-10-03 01:31:29'),
  169. (50, 9, NULL, 'update: Layout Responsivo', NULL, '2014-10-03 01:53:57'),
  170. (51, 9, NULL, 'added: Agendamento de Clientes', NULL, '2014-10-03 01:53:57'),
  171. (52, 9, NULL, 'added: Calendário', NULL, '2014-10-03 01:53:57'),
  172. (54, 9, NULL, 'added: Largura de Banda', NULL, '2014-10-03 01:53:57'),
  173. (55, 9, NULL, 'fix: Comissões', NULL, '2014-10-03 01:53:57'),
  174. (56, 9, NULL, 'added: Permissões de cargos', NULL, '2014-10-03 01:53:57'),
  175. (57, 9, NULL, 'added: Suspender', NULL, '2014-10-03 01:53:57'),
  176. (58, 9, NULL, 'fix: Lembretes', NULL, '2014-10-03 01:53:57'),
  177. (59, 9, NULL, 'update: database structure', NULL, '2014-10-03 01:53:57'),
  178. (60, 9, NULL, 'added: Instalação Fácil', NULL, '2014-10-03 01:53:57'),
  179. (61, 9, NULL, 'added: Gravatar system', NULL, '2014-10-03 01:53:57'),
  180. (62, 9, NULL, 'added: Configurações Globais', NULL, '2014-10-03 01:53:57'),
  181. (64, 9, NULL, 'fix: Notas', NULL, '2014-10-04 06:00:00'),
  182. (65, 9, NULL, 'added: Notificações', NULL, '2014-10-04 06:00:00'),
  183. (67, 10, NULL, 'Versão Inicial', NULL, '2014-10-03 01:27:39'),
  184. (68, 9, NULL, 'added: Configurações Menu', NULL, '2014-10-07 22:27:19'),
  185. (69, 9, NULL, 'added: Configurações Acesso', NULL, '2014-10-07 22:27:35'),
  186. (70, 9, NULL, 'update: Global Chat', NULL, '2014-10-07 22:30:05'),
  187. (71, 9, NULL, 'update: Usuários', NULL, '2014-10-07 22:30:46'),
  188. (72, 9, NULL, 'update: Changerlog', NULL, '2014-10-07 22:31:52'),
  189. (73, 9, NULL, 'update: Gráficos', NULL, '2014-10-07 22:32:53'),
  190. (74, 11, NULL, 'fix: Recibos', NULL, '2014-11-10 05:46:07'),
  191. (75, 11, NULL, 'update: Acessos', NULL, '2014-11-10 05:46:34'),
  192. (76, 11, NULL, 'fix: Menu', NULL, '2014-11-10 05:47:00'),
  193. (77, 11, NULL, 'fix: Principal', NULL, '2014-11-10 08:04:22'),
  194. (78, 11, NULL, 'fix: Auto Instalador', NULL, '2014-11-10 08:29:53'),
  195. (79, 12, NULL, 'added: Custos Fixos', NULL, '2014-11-24 00:06:21'),
  196. (80, 12, NULL, 'added: Módulo Relatórios', NULL, '2014-11-24 00:06:50'),
  197. (81, 12, NULL, 'fix: Adicionar Cliente', NULL, '2014-11-24 00:07:18'),
  198. (82, 12, NULL, 'update: Movimentar Serviços', NULL, '2014-11-24 00:07:53'),
  199. (83, 12, NULL, 'update: Movimentar Produtos', NULL, '2014-11-24 00:08:03'),
  200. (84, 12, NULL, 'update: Configuração Globais', NULL, '2014-11-24 00:08:43'),
  201. (85, 12, NULL, 'update: Auto Instalador', NULL, '2014-11-24 00:09:37'),
  202. (86, 12, NULL, 'update: Recibos', NULL, '2014-11-24 00:10:16'),
  203. (88, 12, NULL, 'update: composer.json', NULL, '2014-11-24 04:52:25'),
  204. (89, 12, NULL, 'fix: Ferramentas Access', NULL, '2014-11-24 04:53:40'),
  205. (90, 12, NULL, 'fix: Notificações', NULL, '2014-11-24 04:55:21'),
  206. (91, 12, NULL, 'fix: Mensagens', NULL, '2014-11-24 04:55:29'),
  207. (92, 12, NULL, 'update: Gráficos Finanças', NULL, '2014-11-24 05:33:49'),
  208. (93, 12, NULL, 'added: Fluxo de Caixa', NULL, '2014-11-27 01:01:52'),
  209. (94, 12, NULL, 'added: Fontes', NULL, '2014-11-27 01:04:06'),
  210. (95, 12, NULL, 'fix: Recibos', NULL, '2014-12-04 00:44:56'),
  211. (96, 12, NULL, 'fix: Checkout', NULL, '2014-12-10 20:24:38'),
  212. (97, 12, NULL, 'added: Galeria', NULL, '2014-12-13 23:26:36'),
  213. (98, 12, NULL, 'fix: Global', NULL, '2014-12-14 05:35:38'),
  214. (99, 12, NULL, 'fix: Estoque', NULL, '2014-12-18 23:48:15'),
  215. (100, 12, NULL, 'fix: Funcionários', NULL, '2014-12-18 23:50:48'),
  216. (101, 12, NULL, 'fix: Serviços', NULL, '2014-12-18 23:53:08'),
  217. (102, 12, NULL, 'fix: Usuários', NULL, '2014-12-18 23:56:24'),
  218. (103, 12, NULL, 'fix: Notificações Barra', NULL, '2014-12-19 00:09:48'),
  219. (104, 12, NULL, 'added: Configuração Autenticação', NULL, '2014-12-19 00:10:17'),
  220. (105, 13, NULL, 'update: Tarefas Ajax application', NULL, '2015-07-24 08:22:01'),
  221. (106, 13, NULL, 'fix: Print Recibos', NULL, '2015-07-24 08:22:19'),
  222. (107, 13, NULL, 'fix: Menu', NULL, '2015-07-24 08:22:37'),
  223. (108, 13, NULL, 'fix: Autenticação', NULL, '2015-07-24 20:40:13'),
  224. (109, 13, NULL, 'fix: Acessos', NULL, '2015-07-24 20:40:27'),
  225. (110, 13, NULL, 'fix: Globais', NULL, '2015-07-24 20:40:38'),
  226. (111, 13, NULL, 'fix: Produtos', NULL, '0000-00-00 00:00:00'),
  227. (112, 13, NULL, 'fix: Serviços', NULL, '0000-00-00 00:00:00'),
  228. (113, 14, NULL, 'fix: Comissões', NULL, '2015-10-25 23:45:32'),
  229. (114, 14, NULL, 'fix: Filtro Fluxo de Caixa', NULL, '2014-11-27 01:01:52'),
  230. (115, 14, NULL, 'fix: Impressão Google Chrome', NULL, '2014-12-14 05:35:38'),
  231. (116, 15, NULL, 'added: URL redirect', NULL, '2015-10-25 23:48:39'),
  232. (117, 15, NULL, 'added: Envio Notificações', NULL, '2015-10-25 23:48:57'),
  233. (118, 15, NULL, 'fix: Recibos', NULL, '2015-10-25 23:50:38'),
  234. (119, 15, NULL, 'update: Bash', NULL, '2015-10-25 23:53:01'),
  235. (120, 16, NULL, 'update: acessos', NULL, '2014-10-03 01:21:35'),
  236. (121, 16, NULL, 'added: assoc empregados', NULL, '2014-10-03 01:21:35'),
  237. (122, 16, NULL, 'added: assoc clientes', NULL, '2014-10-03 01:21:35'),
  238. (123, 16, NULL, 'fix: fornecedores', NULL, '2014-10-03 01:21:35'),
  239. (124, 16, NULL, 'added: assoc fornecedor', NULL, '2014-10-03 01:21:35'),
  240. (125, 16, NULL, 'update: auto instalador', NULL, '2014-10-03 01:21:35'),
  241. (126, 16, NULL, 'added: 2 cargos : "Cliente" e "Fornecedor"', NULL, '2014-10-03 01:21:35');
  242. -- --------------------------------------------------------
  243.  
  244. --
  245. -- Estrutura para tabela `ChangeLog_Version`
  246. --
  247.  
  248. CREATE TABLE IF NOT EXISTS `ChangeLog_Version` (
  249.   `id` int(11) NOT NULL AUTO_INCREMENT,
  250.   `version` varchar(10) NOT NULL,
  251.   `subtitle` varchar(250) DEFAULT NULL,
  252.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  253.   PRIMARY KEY (`id`)
  254. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;
  255.  
  256. --
  257. -- Fazendo dump de dados para tabela `ChangeLog_Version`
  258. --
  259.  
  260. INSERT INTO `ChangeLog_Version` (`id`, `version`, `subtitle`, `data`) VALUES
  261. (1, '1.1', 'Beta', '2013-04-26 22:06:21'),
  262. (2, '2.1', NULL, '2013-05-26 22:06:41'),
  263. (3, '3.0', 'Release', '2013-05-28 22:07:06'),
  264. (4, '3.1', NULL, '2014-03-21 22:07:16'),
  265. (5, '3.2', 'Beta', '2014-03-28 22:07:20'),
  266. (6, '3.3', 'Beta', '2014-04-16 22:07:24'),
  267. (7, '3.4', NULL, '2014-08-01 22:07:24'),
  268. (8, '3.5', NULL, '2014-09-18 22:07:24'),
  269. (9, '4.0', 'Release', '2014-10-02 22:07:36'),
  270. (10, '1.0', NULL, '2013-01-03 22:06:21'),
  271. (11, '4.1', NULL, '2014-11-10 02:45:24'),
  272. (12, '4.2', 'Release', '2014-11-23 21:05:50'),
  273. (13, '4.2.1', NULL, '2015-07-24 05:21:36'),
  274. (14, '4.2.2', NULL, '2015-10-23 05:21:36'),
  275. (15, '4.2.3', NULL, '2015-10-25 23:45:09'),
  276. (16, '4.2.4', NULL, '2015-11-04 20:20:59');
  277. -- --------------------------------------------------------
  278.  
  279. --
  280. -- Estrutura para tabela `clientes`
  281. --
  282.  
  283. CREATE TABLE IF NOT EXISTS `clientes` (
  284.   `id` int(11) NOT NULL AUTO_INCREMENT,
  285.   `id_user` int(11) DEFAULT NULL,
  286.   `assoc` int(11) DEFAULT NULL,
  287.   `nome` varchar(100) NOT NULL,
  288.   `agenda` varchar(15) DEFAULT NULL,
  289.   `agenda_cor` varchar(10) NOT NULL DEFAULT '#000000',
  290.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  291.   `End` varchar(100) DEFAULT NULL,
  292.   `Num` varchar(5) DEFAULT NULL,
  293.   `Bairro` varchar(50) DEFAULT NULL,
  294.   `Cidade` varchar(50) DEFAULT NULL,
  295.   `UF` varchar(2) DEFAULT NULL,
  296.   `Cep` varchar(9) DEFAULT NULL,
  297.   `Fone` varchar(255) DEFAULT NULL,
  298.   `Email` varchar(50) DEFAULT NULL,
  299.   `Rg` varchar(22) DEFAULT NULL,
  300.   `Cpf` varchar(14) DEFAULT NULL,
  301.   `Aniversario` timestamp NULL DEFAULT NULL,
  302.   `Sexo` enum('F','M','T') NOT NULL,
  303.   `Indicacao` varchar(100) DEFAULT NULL,
  304.   `Obs` varchar(50) DEFAULT NULL,
  305.   PRIMARY KEY (`id`),
  306.   UNIQUE KEY `Nm` (`nome`)
  307. ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
  308.  
  309. -- --------------------------------------------------------
  310.  
  311. --
  312. -- Estrutura para tabela `Configure`
  313. --
  314.  
  315. CREATE TABLE IF NOT EXISTS `Configure` (
  316.   `id` int(11) NOT NULL AUTO_INCREMENT,
  317.   `DEBUG` tinyint(1) NOT NULL DEFAULT '0',
  318.   `url` varchar(250) NOT NULL,
  319.   `LOGO` varchar(250) NOT NULL,
  320.   `FAVOICON` varchar(250) NOT NULL,
  321.   `INTERFACE` varchar(250) NOT NULL DEFAULT 'eth0',
  322.   `NAME` varchar(100) NOT NULL,
  323.   `COOKIE_RUNTIME` int(11) NOT NULL,
  324.   `COOKIE_DOMAIN` varchar(50) NOT NULL DEFAULT 'localhost',
  325.   `ACCOUNT_TYPE_FOR_SALLER` int(11) NOT NULL,
  326.   `DAY_CLOSE_COMISSION` int(11) DEFAULT NULL,
  327.   `STATUS_DAY_CLOSE` tinyint(1) NOT NULL,
  328.   PRIMARY KEY (`id`)
  329. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
  330.  
  331. --
  332. -- Fazendo dump de dados para tabela `Configure`
  333. --
  334.  
  335. INSERT INTO `Configure` (`id`, `DEBUG`, `url`, `LOGO`, `FAVOICON`, `INTERFACE`, `NAME`, `COOKIE_RUNTIME`,  `COOKIE_DOMAIN`, `ACCOUNT_TYPE_FOR_SALLER`, `DAY_CLOSE_COMISSION`, `STATUS_DAY_CLOSE`) VALUES
  336. (1, 0, '{$POST['url']}', 'logo.png', 'favicon.ico', 'eth1', '{$POST['name']}', 1209600, '{$POST['coockie_domain']}', 1, 10, 1);
  337.  
  338.  
  339. -- --------------------------------------------------------
  340.  
  341. --
  342. -- Estrutura para tabela `ConfigureFonts`
  343. --
  344.  
  345. CREATE TABLE IF NOT EXISTS `ConfigureFonts` (
  346.   `Id` int(11) NOT NULL AUTO_INCREMENT,
  347.   `titulo` varchar(150) NOT NULL,
  348.   `banco` enum('Banco Do Brasil','Bradesco','Caixa','Itau','Santander') NOT NULL,
  349.   `agencia` int(4) NOT NULL,
  350.   `conta` int(8) NOT NULL,
  351.   `Convenio` int(11) DEFAULT NULL,
  352.   `carteira` varchar(20) DEFAULT NULL,
  353.   `codigoCliente` int(5) DEFAULT NULL,
  354.   `numeroDocumento` int(7) DEFAULT NULL,
  355.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  356.   PRIMARY KEY (`Id`)
  357. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
  358.  
  359. --
  360. -- Fazendo dump de dados para tabela `ConfigureFonts`
  361. --
  362.  
  363. INSERT INTO `ConfigureFonts` (`Id`, `titulo`, `banco`, `agencia`, `conta`, `Convenio`, `carteira`, `codigoCliente`, `numeroDocumento`, `data`) VALUES
  364. (1, 'Conta Web Master', 'Caixa', 2392, 3334, NULL, 'SR', NULL, NULL, '2014-11-25 23:55:00');
  365.  
  366.  
  367.  
  368. -- --------------------------------------------------------
  369.  
  370. --
  371. -- Estrutura para tabela `ConfigureInfos`
  372. --
  373.  
  374. CREATE TABLE IF NOT EXISTS `ConfigureInfos` (
  375.   `id` int(11) NOT NULL AUTO_INCREMENT,
  376.   `logo` varchar(250) DEFAULT NULL,
  377.   `email` varchar(50) DEFAULT NULL,
  378.   `Fone` varchar(50) DEFAULT NULL,
  379.   `End` varchar(100) DEFAULT NULL,
  380.   `Num` varchar(5) DEFAULT NULL,
  381.   `Bairro` varchar(50) DEFAULT NULL,
  382.   `Cidade` varchar(50) DEFAULT NULL,
  383.   `UF` varchar(2) DEFAULT NULL,
  384.   `Cep` varchar(9) DEFAULT NULL,
  385.   `CNPJ` varchar(50) DEFAULT NULL,
  386.   PRIMARY KEY (`id`)
  387. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
  388.  
  389. --
  390. -- Fazendo dump de dados para tabela `ConfigureInfos`
  391. --
  392.  
  393. INSERT INTO `ConfigureInfos` (`id`, `logo`, `email`, `Fone`, `End`, `Num`, `Bairro`, `Cidade`, `UF`, `Cep`, `CNPJ`) VALUES
  394. (1, 'bucket-logo.png', 'bruno.espertinho@gmail.com', '(82) 3651-2816', 'Rua Doutor Abelardo de Barros', '200', 'Tijuca', 'Rio de Janeiro', 'RJ', '20521030', '48.274.445/7437-55');
  395.  
  396. -- --------------------------------------------------------
  397.  
  398. --
  399. -- Estrutura para tabela `ConfigureMail`
  400. --
  401.  
  402. CREATE TABLE IF NOT EXISTS `ConfigureMail` (
  403.   `id` int(11) NOT NULL AUTO_INCREMENT,
  404.   `AUTH` tinyint(1) NOT NULL DEFAULT '0',
  405.   `SMTP` varchar(20) DEFAULT NULL,
  406.   `SMTP_SECURE` enum('tls','ssl') DEFAULT NULL,
  407.   `USER` varchar(50) DEFAULT NULL,
  408.   `PASS` varchar(20) DEFAULT NULL,
  409.   `PORT` int(4) NOT NULL DEFAULT '587',
  410.   `CC` varchar(50) DEFAULT NULL,
  411.   `BCC` varchar(50) DEFAULT NULL,
  412.   `HTML` tinyint(1) NOT NULL DEFAULT '1',
  413.   `BUTTON_SIGNATURE` mediumtext,
  414.   `TOP_SIGNATURE` longtext,
  415.   PRIMARY KEY (`id`)
  416. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
  417.  
  418. --
  419. -- Fazendo dump de dados para tabela `ConfigureMail`
  420. --
  421.  
  422. INSERT INTO `ConfigureMail` (`id`, `AUTH`, `SMTP`, `SMTP_SECURE`, `USER`, `PASS`, `PORT`, `CC`, `BCC`, `HTML`, `BUTTON_SIGNATURE`, `TOP_SIGNATURE`) VALUES
  423. (1, 0, NULL, 'tls', NULL, NULL, 587, '', '', 1, 'Senado Federal - Praça dos Três Poderes - Brasília DF - CEP 70165-900 - Fone: (61)6666-6666', '<img src="https://ci5.googleusercontent.com/proxy/eHfqKidrRMZJ7DHhentABTu1RKQSLxMrt7HAzR_UArgre9dbqSYUK08W6ZLe0VI4bF8H0OdFe8ihLsZMgtaxSRDbcCFhaw6s4rbfyY_AhYl_bIvkMxfJB-y_XKY=s0-d-e1-ft#http://www12.senado.gov.br/ecidadania/++resource++img/email-header.png" alt="">');
  424. -- --------------------------------------------------------
  425.  
  426.  
  427. -- --------------------------------------------------------
  428.  
  429. --
  430. -- Estrutura para tabela `cron_input`
  431. --
  432.  
  433. CREATE TABLE IF NOT EXISTS `cron_input` (
  434.   `id` int(11) NOT NULL AUTO_INCREMENT,
  435.   `id_user` int(11) NOT NULL,
  436.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  437.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  438.   `card_agence` varchar(250) DEFAULT NULL,
  439.   `card_number` varchar(250) DEFAULT NULL,
  440.   `cheque_number` varchar(250) DEFAULT NULL,
  441.   `title` varchar(100) NOT NULL,
  442.   `descri` mediumtext,
  443.   `qnt` int(5) DEFAULT NULL,
  444.   `value` double NOT NULL,
  445.   `status` tinyint(1) NOT NULL,
  446.   `cron_time` enum('monthly','weekly','daily') NOT NULL,
  447.   `monthly_day` int(1) DEFAULT NULL,
  448.   `weekly_day` int(1) DEFAULT NULL,
  449.   `daily_hour` int(2) DEFAULT NULL,
  450.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  451.   PRIMARY KEY (`id`)
  452. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  453.  
  454. -- --------------------------------------------------------
  455.  
  456. --
  457. -- Estrutura para tabela `cron_output`
  458. --
  459.  
  460. CREATE TABLE IF NOT EXISTS `cron_output` (
  461.   `id` int(11) NOT NULL AUTO_INCREMENT,
  462.   `id_user` int(11) DEFAULT NULL,
  463.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  464.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  465.   `card_agence` varchar(250) DEFAULT NULL,
  466.   `card_number` varchar(250) DEFAULT NULL,
  467.   `cheque_number` varchar(250) DEFAULT NULL,
  468.   `title` varchar(100) NOT NULL,
  469.   `descri` mediumtext,
  470.   `value` double NOT NULL,
  471.   `status` tinyint(1) NOT NULL,
  472.   `cron_time` enum('monthly','weekly','daily') NOT NULL,
  473.   `monthly_day` int(1) DEFAULT NULL,
  474.   `weekly_day` int(1) DEFAULT NULL,
  475.   `daily_hour` time DEFAULT NULL,
  476.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  477.   PRIMARY KEY (`id`)
  478. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  479.  
  480. --
  481. -- Estrutura para tabela `fornecedores`
  482. --
  483.  
  484. CREATE TABLE IF NOT EXISTS `fornecedores` (
  485.   `id` int(11) NOT NULL AUTO_INCREMENT,
  486.   `assoc` int(11) DEFAULT NULL,
  487.   `empresa` varchar(250) NOT NULL,
  488.   `cpf` varchar(250) DEFAULT NULL,
  489.   `cpnj` varchar(250) DEFAULT NULL,
  490.   `email` varchar(250) NOT NULL,
  491.   `fone` varchar(250) NOT NULL,
  492.   `UF` varchar(2) DEFAULT NULL,
  493.   `Cep` varchar(9) DEFAULT NULL,
  494.   `End` varchar(100) DEFAULT NULL,
  495.   `Num` varchar(5) DEFAULT NULL,
  496.   `Bairro` varchar(50) DEFAULT NULL,
  497.   `Cidade` varchar(50) DEFAULT NULL,
  498.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  499.   PRIMARY KEY (`id`)
  500. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  501.  
  502. -- --------------------------------------------------------
  503.  
  504. --
  505. -- Estrutura para tabela `funcionarios`
  506. --
  507.  
  508. CREATE TABLE IF NOT EXISTS `funcionarios` (
  509.   `id` int(11) NOT NULL AUTO_INCREMENT,
  510.   `assoc` int(11) DEFAULT NULL,
  511.   `nome` varchar(100) NOT NULL,
  512.   `Salario` double DEFAULT NULL,
  513.   `Sexo` enum('F','M','T') NOT NULL,
  514.   `DtNasc` varchar(20) DEFAULT NULL,
  515.   `CPF` varchar(100) DEFAULT NULL,
  516.   `RG` varchar(100) DEFAULT NULL,
  517.   `End` varchar(100) DEFAULT NULL,
  518.   `Num` varchar(5) DEFAULT NULL,
  519.   `Bairro` varchar(50) DEFAULT NULL,
  520.   `Cidade` varchar(50) DEFAULT NULL,
  521.   `UF` varchar(2) DEFAULT NULL,
  522.   `Cep` varchar(100) DEFAULT NULL,
  523.   `Tel` varchar(100) DEFAULT NULL,
  524.   `Celular` varchar(100) DEFAULT NULL,
  525.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  526.   PRIMARY KEY (`id`),
  527.   UNIQUE KEY `Nm` (`nome`)
  528. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  529.  
  530.  
  531. CREATE TABLE IF NOT EXISTS `gallery_cat` (
  532.   `id` int(11) NOT NULL AUTO_INCREMENT,
  533.   `id_user` int(11) NOT NULL,
  534.   `title` varchar(250) NOT NULL,
  535.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  536.   PRIMARY KEY (`id`)
  537. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  538.  
  539. -- --------------------------------------------------------
  540.  
  541. --
  542. -- Estrutura para tabela `gallery_pic`
  543. --
  544.  
  545. CREATE TABLE IF NOT EXISTS `gallery_pic` (
  546.   `id` int(11) NOT NULL AUTO_INCREMENT,
  547.   `id_cat` int(11) NOT NULL,
  548.   `id_user` int(11) NOT NULL,
  549.   `pic` varchar(250) NOT NULL,
  550.   `title` varchar(200) DEFAULT 'Sem título',
  551.   `descri` mediumtext,
  552.   `type` varchar(5) NOT NULL,
  553.   `Resolution` varchar(10) NOT NULL,
  554.   `size` int(20) NOT NULL,
  555.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  556.   PRIMARY KEY (`id`)
  557. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  558.  
  559. -- --------------------------------------------------------
  560.  
  561. --
  562. -- Estrutura para tabela `global_chat`
  563. --
  564.  
  565. CREATE TABLE IF NOT EXISTS `global_chat` (
  566.   `id` int(11) NOT NULL AUTO_INCREMENT,
  567.   `id_user` int(11) NOT NULL,
  568.   `msg` mediumtext NOT NULL,
  569.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  570.   PRIMARY KEY (`id`)
  571. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  572.  
  573. -- --------------------------------------------------------
  574.  
  575. --
  576. -- Estrutura para tabela `guia_solucao`
  577. --
  578.  
  579. CREATE TABLE IF NOT EXISTS `guia_solucao` (
  580.   `id` int(3) NOT NULL AUTO_INCREMENT,
  581.   `id_poster` int(11) DEFAULT NULL,
  582.   `status` tinyint(1) NOT NULL DEFAULT '1',
  583.   `style` enum('primary','success','info','inverse','default','danger') NOT NULL DEFAULT 'primary',
  584.   `position` enum('left','right','center') NOT NULL,
  585.   `titulo` varchar(240) NOT NULL,
  586.   `texto` longtext NOT NULL,
  587.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  588.   PRIMARY KEY (`id`)
  589. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 COMMENT='portal de dúvidas' AUTO_INCREMENT=7 ;
  590.  
  591. --
  592. -- Fazendo dump de dados para tabela `guia_solucao`
  593. --
  594.  
  595. INSERT INTO `guia_solucao` (`id`, `id_poster`, `status`, `style`, `position`, `titulo`, `texto`, `data`) VALUES
  596. (2, NULL, 1, 'success', 'left', 'Não Consigo Adicionar Usuário ', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>', '2014-09-07 00:56:00'),
  597. (3, NULL, 1, 'primary', 'left', 'Tem algum erro no meu sistema ', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>', '2014-09-07 00:56:00'),
  598. (4, NULL, 1, 'success', 'right', 'Não Consigo Adicionar uma Foto ', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>', '2014-09-07 00:56:00'),
  599. (5, NULL, 1, 'default', 'center', 'Quero relatar minhas sugestões ', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>', '2014-09-07 00:56:00'),
  600. (6, NULL, 1, 'danger', 'right', 'Quero Formatar minha maquina ', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n<p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>\n                                <p>\n                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare dolor, quis ullamcorper ligula sodales at. Nulla tellus elit, varius non commodo eget, mattis vel eros. In sed ornare nulla.\n                                </p>', '2014-09-07 00:56:00');
  601.  
  602. -- --------------------------------------------------------
  603.  
  604. --
  605. -- Estrutura para tabela `input_others`
  606. --
  607.  
  608. CREATE TABLE IF NOT EXISTS `input_others` (
  609.   `id` int(11) NOT NULL AUTO_INCREMENT,
  610.   `id_user` int(11) NOT NULL,
  611.   `id_cron` int(11) DEFAULT NULL,
  612.   `cron` tinyint(1) NOT NULL DEFAULT '0',
  613.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  614.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  615.   `card_agence` varchar(250) DEFAULT NULL,
  616.   `card_number` varchar(250) DEFAULT NULL,
  617.   `cheque_number` varchar(250) DEFAULT NULL,
  618.   `title` varchar(100) NOT NULL,
  619.   `descri` mediumtext,
  620.   `value` double NOT NULL,
  621.   `status` tinyint(1) NOT NULL,
  622.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  623.   PRIMARY KEY (`id`)
  624. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  625.  
  626. -- --------------------------------------------------------
  627.  
  628. --
  629. -- Estrutura para tabela `input_product`
  630. --
  631.  
  632. CREATE TABLE IF NOT EXISTS `input_product` (
  633.   `id` int(11) NOT NULL AUTO_INCREMENT,
  634.   `id_user` int(10) DEFAULT NULL,
  635.   `id_product` int(10) NOT NULL,
  636.   `id_client` int(11) DEFAULT NULL,
  637.   `id_font` int(11) DEFAULT NULL,
  638.   `id_receipt` int(11) NOT NULL,
  639.   `name` varchar(250) NOT NULL,
  640.   `descri` mediumtext,
  641.   `qnt` int(3) NOT NULL DEFAULT '1',
  642.   `discount` float DEFAULT NULL,
  643.   `generate_billet` tinyint(1) NOT NULL DEFAULT '0',
  644.   `installments` int(2) NOT NULL DEFAULT '1' COMMENT 'Payment installments',
  645.   `payment_due` int(2) DEFAULT NULL COMMENT 'day of the month due for payment',
  646.   `value` float DEFAULT NULL COMMENT 'atenção o valor deve está multiplicado',
  647.   `status` tinyint(1) NOT NULL,
  648.   `Payment_method` enum('a_vista','parcelado','entrada_e_parcelas','porcentagem_e_Parcelas') NOT NULL DEFAULT 'a_vista',
  649.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  650.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  651.   `card_agence` varchar(50) DEFAULT NULL,
  652.   `card_number` varchar(100) DEFAULT NULL,
  653.   `cheque_number` varchar(250) DEFAULT NULL,
  654.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  655.   PRIMARY KEY (`id`)
  656. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='all products ever made' AUTO_INCREMENT=1 ;
  657.  
  658.  
  659. -- --------------------------------------------------------
  660.  
  661. --
  662. -- Estrutura para tabela `input_product_plots`
  663. --
  664.  
  665. CREATE TABLE IF NOT EXISTS `input_product_plots` (
  666.   `id` int(11) NOT NULL AUTO_INCREMENT,
  667.   `id_receipt` int(11) NOT NULL,
  668.   `status` tinyint(1) NOT NULL DEFAULT '0',
  669.   `plot` int(2) NOT NULL,
  670.   `plot_value` float NOT NULL,
  671.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  672.   PRIMARY KEY (`id`)
  673. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  674.  
  675.  
  676. -- --------------------------------------------------------
  677.  
  678. --
  679. -- Estrutura para tabela `input_servico`
  680. --
  681.  
  682. CREATE TABLE IF NOT EXISTS `input_servico` (
  683.   `id` int(11) NOT NULL AUTO_INCREMENT,
  684.   `id_user` int(10) DEFAULT NULL,
  685.   `id_service` int(10) NOT NULL,
  686.   `id_client` int(11) DEFAULT NULL,
  687.   `id_employee` int(10) DEFAULT NULL,
  688.   `id_font` int(11) DEFAULT NULL,
  689.   `id_receipt` int(11) NOT NULL,
  690.   `name` varchar(250) NOT NULL,
  691.   `descri` mediumtext,
  692.   `qnt` int(3) NOT NULL DEFAULT '1',
  693.   `discount` float DEFAULT NULL,
  694.   `generate_billet` tinyint(1) NOT NULL DEFAULT '0',
  695.   `installments` int(2) DEFAULT '1' COMMENT 'Payment installments',
  696.   `payment_due` int(2) DEFAULT NULL COMMENT 'day of the month due for payment',
  697.   `value` float DEFAULT NULL,
  698.   `status` tinyint(1) NOT NULL,
  699.   `Payment_method` enum('a_vista','parcelado','entrada_e_parcelas','porcentagem_e_Parcelas') NOT NULL DEFAULT 'a_vista',
  700.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  701.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  702.   `card_agence` varchar(50) DEFAULT NULL,
  703.   `card_number` varchar(100) DEFAULT NULL,
  704.   `cheque_number` varchar(250) DEFAULT NULL,
  705.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  706.   PRIMARY KEY (`id`)
  707. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='all services ever made' AUTO_INCREMENT=1 ;
  708.  
  709.  
  710. -- --------------------------------------------------------
  711.  
  712. --
  713. -- Estrutura para tabela `input_servico_plots`
  714. --
  715.  
  716. CREATE TABLE IF NOT EXISTS `input_servico_plots` (
  717.   `id` int(11) NOT NULL AUTO_INCREMENT,
  718.   `id_receipt` int(11) NOT NULL,
  719.   `status` tinyint(1) NOT NULL DEFAULT '0',
  720.   `plot` int(2) NOT NULL,
  721.   `plot_value` float NOT NULL,
  722.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  723.   PRIMARY KEY (`id`)
  724. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  725.  
  726. -- --------------------------------------------------------
  727.  
  728. --
  729. -- Estrutura para tabela `marcador`
  730. --
  731.  
  732. CREATE TABLE IF NOT EXISTS `marcador` (
  733.   `id` int(11) NOT NULL AUTO_INCREMENT,
  734.   `nome` varchar(200) NOT NULL,
  735.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  736.   PRIMARY KEY (`id`)
  737. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  738.  
  739. -- --------------------------------------------------------
  740.  
  741. --
  742. -- Estrutura para tabela `mensagem`
  743. --
  744.  
  745. CREATE TABLE IF NOT EXISTS `mensagem` (
  746.   `id` int(11) NOT NULL AUTO_INCREMENT,
  747.   `id_from` int(11) DEFAULT NULL COMMENT 'ID do usuário remetente',
  748.   `id_to` int(11) NOT NULL COMMENT 'ID do usuário destinário',
  749.   `star` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = Não é favorito | 1 = Favorito',
  750.   `important` tinyint(1) NOT NULL DEFAULT '0',
  751.   `trash` tinyint(1) DEFAULT '0' COMMENT '0 = não está na lixeira | 1 = lixeira',
  752.   `spam` tinyint(1) NOT NULL DEFAULT '0',
  753.   `label` int(11) DEFAULT NULL,
  754.   `title` varchar(250) NOT NULL,
  755.   `text` mediumtext NOT NULL,
  756.   `lida` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = não lida, 1 = lida',
  757.   `data` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  758.   PRIMARY KEY (`id`)
  759. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='mensagens' AUTO_INCREMENT=1 ;
  760.  
  761. -- --------------------------------------------------------
  762.  
  763. --
  764. -- Estrutura para tabela `mensagem_attack`
  765. --
  766.  
  767. CREATE TABLE IF NOT EXISTS `mensagem_attack` (
  768.   `id` int(11) NOT NULL AUTO_INCREMENT,
  769.   `id_message` int(11) NOT NULL,
  770.   `size` varchar(11) NOT NULL,
  771.   `file` varchar(250) NOT NULL,
  772.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  773.   PRIMARY KEY (`id`)
  774. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  775.  
  776. -- --------------------------------------------------------
  777.  
  778. --
  779. -- Estrutura para tabela `mensagem_reply`
  780. --
  781.  
  782. CREATE TABLE IF NOT EXISTS `mensagem_reply` (
  783.   `id` int(11) NOT NULL AUTO_INCREMENT,
  784.   `id_user` int(11) NOT NULL,
  785.   `id_message` int(11) NOT NULL,
  786.   `text` longtext NOT NULL,
  787.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  788.   PRIMARY KEY (`id`)
  789. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  790.  
  791. -- --------------------------------------------------------
  792.  
  793. --
  794. -- Estrutura para tabela `menu`
  795. --
  796.  
  797. CREATE TABLE IF NOT EXISTS `menu` (
  798.   `id` int(11) NOT NULL AUTO_INCREMENT,
  799.   `status` tinyint(1) NOT NULL,
  800.   `sub` tinyint(1) DEFAULT '0' COMMENT 'id subcategoria ',
  801.   `name` varchar(50) NOT NULL,
  802.   `link` varchar(250) NOT NULL DEFAULT '#' COMMENT 'padrão #',
  803.   `icone` varchar(250) NOT NULL COMMENT 'icone fa class',
  804.   `position` int(10) NOT NULL,
  805.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  806.   PRIMARY KEY (`id`)
  807. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ;
  808.  
  809. --
  810. -- Fazendo dump de dados para tabela `menu`
  811. --
  812.  
  813. INSERT INTO `menu` (`id`, `status`, `sub`, `name`, `link`, `icone`, `position`, `data`) VALUES
  814. (1, 1, 0, 'Principal', 'dashboard/index', 'fa-home', 1, '2014-09-29 00:36:52'),
  815. (2, 1, 1, 'Gráficos', '#', 'fa-bar-chart-o', 2, '2014-03-05 16:05:52'),
  816. (3, 1, 1, 'Movimentar', '#', 'fa-external-link', 6, '2014-03-05 16:05:52'),
  817. (5, 1, 1, 'Notificações', '#', 'fa-envelope', 8, '2014-03-05 16:05:52'),
  818. (6, 1, 1, 'Ferramentas', '#', 'fa-suitcase', 9, '2014-03-05 16:05:52'),
  819. (7, 1, 0, 'Guia do Usuário', 'dashboard/Guide/doubts', 'fa-question-circle', 10, '2014-03-05 16:05:52'),
  820. (8, 0, 1, 'Sistema', '#', 'fa-user', 12, '2014-03-05 16:05:52'),
  821. (11, 1, 1, 'Gerenciar', '#', 'fa-book', 5, '2014-03-05 16:05:52'),
  822. (12, 1, 1, 'Configuração', '#', 'fa-gear', 13, '2013-11-05 16:05:52'),
  823. (13, 1, 1, 'Custos Fixos', '#', 'fa-refresh', 8, '2014-10-03 02:11:58'),
  824. (14, 1, 1, 'Relatórios', '#', 'fa-tasks', 8, '2014-10-03 02:11:58');
  825.  
  826.  
  827. -- --------------------------------------------------------
  828.  
  829. --
  830. -- Estrutura para tabela `menu_access`
  831. --
  832.  
  833. CREATE TABLE IF NOT EXISTS `menu_access` (
  834.   `id` int(11) NOT NULL AUTO_INCREMENT,
  835.   `account_type` int(11) NOT NULL,
  836.   `id_menu` int(11) NOT NULL,
  837.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  838.   PRIMARY KEY (`id`),
  839.   UNIQUE KEY `id` (`id`)
  840. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=77 ;
  841.  
  842. --
  843. -- Fazendo dump de dados para tabela `menu_access`
  844. --
  845.  
  846. INSERT INTO `menu_access` (`id`, `account_type`, `id_menu`, `data`) VALUES
  847. (51, 1, 1, CURRENT_TIME),
  848. (52, 1, 11, CURRENT_TIME),
  849. (53, 1, 5, CURRENT_TIME),
  850. (54, 1, 6, CURRENT_TIME),
  851. (55, 1, 7, CURRENT_TIME),
  852. (56, 1, 8, CURRENT_TIME),
  853. (57, 2, 1, CURRENT_TIME),
  854. (58, 2, 2, CURRENT_TIME),
  855. (59, 2, 5, CURRENT_TIME),
  856. (60, 2, 6, CURRENT_TIME),
  857. (61, 2, 7, CURRENT_TIME),
  858. (62, 2, 8, CURRENT_TIME),
  859. (63, 3, 1, CURRENT_TIME),
  860. (64, 3, 2, CURRENT_TIME),
  861. (65, 3, 3, CURRENT_TIME),
  862. (66, 3, 5, CURRENT_TIME),
  863. (67, 3, 7, CURRENT_TIME),
  864. (68, 3, 8, CURRENT_TIME),
  865. (69, 4, 1, CURRENT_TIME),
  866. (70, 4, 2, CURRENT_TIME),
  867. (71, 4, 11, CURRENT_TIME),
  868. (72, 4, 3, CURRENT_TIME),
  869. (73, 4, 5, CURRENT_TIME),
  870. (74, 4, 6, CURRENT_TIME),
  871. (75, 4, 7, CURRENT_TIME),
  872. (76, 4, 8, CURRENT_TIME);
  873.  
  874.  
  875. -- --------------------------------------------------------
  876.  
  877. --
  878. -- Estrutura para tabela `menu_sub`
  879. --
  880.  
  881. CREATE TABLE IF NOT EXISTS `menu_sub` (
  882.   `id` int(11) NOT NULL AUTO_INCREMENT,
  883.   `status` tinyint(1) NOT NULL COMMENT 'visible ?',
  884.   `id_menu` int(11) DEFAULT NULL COMMENT 'id do menu',
  885.   `name` varchar(50) NOT NULL,
  886.   `link` varchar(250) NOT NULL DEFAULT '#' COMMENT 'padrão #',
  887.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'data created',
  888.   PRIMARY KEY (`id`)
  889. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=69 ;
  890.  
  891. --
  892. -- Fazendo dump de dados para tabela `menu_sub`
  893. --
  894.  
  895. INSERT INTO `menu_sub` (`id`, `status`, `id_menu`, `name`, `link`, `data`) VALUES
  896. (2, 1, 13, 'Despesas', 'dashboard/OverheadCosts/expense', '2014-03-05 16:05:18'),
  897. (3, 1, 2, 'Comissões', 'dashboard/Charts/comissions', '2014-03-05 16:05:18'),
  898. (4, 1, 2, 'Finanças', 'dashboard/Charts/finance', '2014-03-05 16:05:18'),
  899. (6, 1, 3, 'Vendas Serviços', 'dashboard/Mov/services', '2014-03-05 16:05:18'),
  900. (7, 1, 3, 'Vendas Produtos', 'dashboard/Mov/products', '2014-03-05 16:05:18'),
  901. (14, 1, 11, 'Usuários', 'dashboard/Manager/users', '2014-03-05 16:05:18'),
  902. (15, 1, 5, 'Mensagem', 'dashboard/Notifier/inbox', '2014-03-05 16:05:18'),
  903. (17, 1, 5, 'Notificações', 'dashboard/Notifier/notifier', '2014-03-05 16:05:18'),
  904. (18, 1, 8, 'Sair', 'login/logout', '2014-03-05 16:05:18'),
  905. (22, 1, 7, 'Portal de Dúvidas', 'dashboard/Guide/doubts', '2014-03-05 16:05:18'),
  906. (25, 1, 8, 'Suspender', 'dashboard/System/lock_screen', '2014-03-05 16:05:18'),
  907. (27, 1, 6, 'Agenda', 'dashboard/Tools/calendar', '2014-03-05 16:05:18'),
  908. (32, 1, 6, 'Tempo Real Largura de Banda', 'dashboard/Tools/chart_bandwidth', '2014-03-05 16:05:18'),
  909. (35, 1, 12, 'Globais', 'dashboard/Settings/global', '2014-03-05 16:05:18'),
  910. (36, 1, 12, 'Menu', 'dashboard/Settings/Menu', '2014-03-05 16:05:18'),
  911. (47, 1, 11, 'Clientes', 'dashboard/Manager/clients', '2014-09-20 03:00:00'),
  912. (48, 1, 11, 'Fornecedores ', 'dashboard/Manager/fornecedores', '2014-09-20 03:00:00'),
  913. (49, 1, 11, 'Estoque', 'dashboard/Manager/estoque', '2014-09-20 03:00:00'),
  914. (50, 1, 11, 'Serviços', 'dashboard/Manager/servicos', '2014-09-20 03:00:00'),
  915. (51, 1, 14, 'Comissões', 'dashboard/Reports/commission', '2014-09-20 03:00:00'),
  916. (52, 1, 8, 'Changelog', 'dashboard/System/Changerlog', '2014-03-05 16:05:18'),
  917. (53, 1, 11, 'Agenda', 'dashboard/Manager/agenda', '2014-09-22 03:00:00'),
  918. (55, 1, 3, 'Despesas', 'dashboard/Mov/expense', '2014-09-20 03:00:00'),
  919. (56, 1, 3, 'Receitas', 'dashboard/Mov/income', '2014-09-20 03:00:00'),
  920. (58, 1, 12, 'Acessos', 'dashboard/Settings/access', '2014-03-05 16:05:18'),
  921. (59, 1, 13, 'Receitas', 'dashboard/OverheadCosts/income', '2014-03-05 16:05:18'),
  922. (60, 1, 12, 'Informações Comercial', 'dashboard/Settings/receipts', '2014-10-13 23:32:20'),
  923. (61, 1, 14, 'Recibos', 'dashboard/Reports/receipt', '2014-10-16 16:57:15'),
  924. (62, 1, 11, 'Funcionários', 'dashboard/Manager/employee', '2014-10-21 18:56:27'),
  925. (64, 1, 14, 'Fluxo de Caixa', 'dashboard/Reports/cash_flow', '2014-11-20 00:02:56'),
  926. (65, 0, 14, 'Serviços', 'dashboard/Settings/access', '2014-11-20 00:02:56'),
  927. (66, 1, 11, 'Fontes', 'dashboard/Manager/fonts', '2014-11-26 15:51:10'),
  928. (67, 1, 12, 'Autenticação', 'dashboard/Settings/auth', '2014-12-12 22:01:15'),
  929. (68, 1, 6, 'Galeria', 'dashboard/Tools/gallery', '2014-12-13 20:24:47'),
  930. (69, '1', '6', 'Aniversários', 'dashboard/Tools/birth', '2015-10-23 17:15:45');
  931.  
  932. -- --------------------------------------------------------
  933.  
  934. --
  935. -- Estrutura para tabela `menu_sub_access`
  936. --
  937.  
  938. CREATE TABLE IF NOT EXISTS `menu_sub_access` (
  939.   `id` int(11) NOT NULL AUTO_INCREMENT,
  940.   `account_type` int(11) NOT NULL,
  941.   `id_sub_menu` int(11) NOT NULL,
  942.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  943.   PRIMARY KEY (`id`)
  944. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=58 ;
  945.  
  946. --
  947. -- Fazendo dump de dados para tabela `menu_sub_access`
  948. --
  949.  
  950. INSERT INTO `menu_sub_access` (`id`, `account_type`, `id_sub_menu`, `data`) VALUES
  951. (1, 4, 3, CURRENT_TIME),
  952. (2, 4, 4, CURRENT_TIME),
  953. (3, 3, 4, CURRENT_TIME),
  954. (4, 4, 6, CURRENT_TIME),
  955. (5, 3, 6, CURRENT_TIME),
  956. (6, 3, 7, CURRENT_TIME),
  957. (7, 4, 7, CURRENT_TIME),
  958. (9, 2, 15, CURRENT_TIME),
  959. (10, 3, 15, CURRENT_TIME),
  960. (11, 4, 15, CURRENT_TIME),
  961. (13, 2, 17, CURRENT_TIME),
  962. (14, 3, 17, CURRENT_TIME),
  963. (15, 4, 17, CURRENT_TIME),
  964. (17, 2, 18, CURRENT_TIME),
  965. (18, 3, 18, CURRENT_TIME),
  966. (19, 4, 18, CURRENT_TIME),
  967. (21, 2, 22, CURRENT_TIME),
  968. (22, 3, 22, CURRENT_TIME),
  969. (23, 4, 22, CURRENT_TIME),
  970. (25, 2, 25, CURRENT_TIME),
  971. (26, 3, 25, CURRENT_TIME),
  972. (27, 4, 25, CURRENT_TIME),
  973. (29, 2, 27, CURRENT_TIME),
  974. (30, 3, 27, CURRENT_TIME),
  975. (31, 4, 27, CURRENT_TIME),
  976. (32, 4, 28, CURRENT_TIME),
  977. (33, 4, 47, CURRENT_TIME),
  978. (34, 4, 48, CURRENT_TIME),
  979. (35, 4, 49, CURRENT_TIME),
  980. (36, 4, 50, CURRENT_TIME),
  981. (37, 4, 51, CURRENT_TIME),
  982. (39, 2, 52, CURRENT_TIME),
  983. (40, 3, 52, CURRENT_TIME),
  984. (41, 4, 52, CURRENT_TIME),
  985. (42, 4, 53, CURRENT_TIME),
  986. (43, 2, 53, CURRENT_TIME),
  987. (45, 4, 55, CURRENT_TIME),
  988. (46, 4, 56, CURRENT_TIME),
  989. (47, 4, 59, CURRENT_TIME),
  990. (48, 3, 61, CURRENT_TIME),
  991. (49, 4, 61, CURRENT_TIME),
  992. (57, 1, 53, CURRENT_TIME);
  993.  
  994.  
  995. -- --------------------------------------------------------
  996.  
  997. --
  998. -- Estrutura para tabela `notes`
  999. --
  1000.  
  1001. CREATE TABLE IF NOT EXISTS `notes` (
  1002.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1003.   `id_user` int(11) NOT NULL,
  1004.   `text` mediumtext NOT NULL,
  1005.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1006.   PRIMARY KEY (`id`)
  1007. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1008.  
  1009. -- --------------------------------------------------------
  1010.  
  1011. --
  1012. -- Estrutura para tabela `notifier`
  1013. --
  1014.  
  1015. CREATE TABLE IF NOT EXISTS `notifier` (
  1016.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1017.   `id_from` int(11) DEFAULT NULL COMMENT 'ID do usuário remetente',
  1018.   `id_to` int(11) NOT NULL COMMENT 'ID do usuário destinário',
  1019.   `title` varchar(250) NOT NULL,
  1020.   `text` mediumtext NOT NULL,
  1021.   `lida` int(1) DEFAULT '0' COMMENT '0 = não lida, 1 = lida',
  1022.   `data` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  1023.   PRIMARY KEY (`id`)
  1024. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='notificações' AUTO_INCREMENT=1 ;
  1025.  
  1026. INSERT INTO `notifier` (`id_from`, `id_to`, `title`, `text`, `lida`, `data`) VALUES
  1027. (NULL, 6, 'Seja Bem Vindo !', 'Instalação efetuada com sucesso ! seja bem vindo ao {$name}.', 0, '{$now}');
  1028.  
  1029. -- --------------------------------------------------------
  1030.  
  1031. --
  1032. -- Estrutura para tabela `output_others`
  1033. --
  1034.  
  1035. CREATE TABLE IF NOT EXISTS `output_others` (
  1036.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1037.   `id_user` int(11) NOT NULL,
  1038.   `id_cron` int(11) DEFAULT NULL,
  1039.   `cron` tinyint(1) NOT NULL DEFAULT '0',
  1040.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  1041.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  1042.   `card_agence` varchar(250) DEFAULT NULL,
  1043.   `card_number` varchar(250) DEFAULT NULL,
  1044.   `cheque_number` varchar(250) DEFAULT NULL,
  1045.   `title` varchar(100) NOT NULL,
  1046.   `descri` mediumtext,
  1047.   `value` double NOT NULL,
  1048.   `status` tinyint(1) NOT NULL,
  1049.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1050.   PRIMARY KEY (`id`)
  1051. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1052.  
  1053. -- --------------------------------------------------------
  1054.  
  1055. --
  1056. -- Estrutura para tabela `output_product`
  1057. --
  1058.  
  1059. CREATE TABLE IF NOT EXISTS `output_product` (
  1060.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1061.   `id_user` int(11) NOT NULL,
  1062.   `id_client` int(11) DEFAULT NULL,
  1063.   `status` tinyint(1) NOT NULL DEFAULT '1',
  1064.   `id_product` int(10) NOT NULL,
  1065.   `id_receipt` int(11) NOT NULL,
  1066.   `discount` tinyint(1) NOT NULL DEFAULT '0',
  1067.   `name` varchar(250) NOT NULL,
  1068.   `descri` mediumtext,
  1069.   `qnt` int(3) DEFAULT '1',
  1070.   `value` float NOT NULL,
  1071.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  1072.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  1073.   `card_agence` varchar(50) DEFAULT NULL,
  1074.   `card_number` varchar(100) DEFAULT NULL,
  1075.   `cheque_number` varchar(250) DEFAULT NULL,
  1076.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1077.   PRIMARY KEY (`id`)
  1078. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='all products ever made' AUTO_INCREMENT=1 ;
  1079.  
  1080. -- --------------------------------------------------------
  1081.  
  1082. --
  1083. -- Estrutura para tabela `output_servico`
  1084. --
  1085.  
  1086. CREATE TABLE IF NOT EXISTS `output_servico` (
  1087.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1088.   `id_user` int(10) DEFAULT NULL,
  1089.   `id_service` int(10) DEFAULT NULL,
  1090.   `id_client` int(11) DEFAULT NULL,
  1091.   `id_employee` int(10) DEFAULT NULL,
  1092.   `id_receipt` int(11) NOT NULL,
  1093.   `discount` tinyint(1) NOT NULL DEFAULT '0',
  1094.   `name` varchar(250) NOT NULL,
  1095.   `descri` mediumtext,
  1096.   `qnt` int(3) DEFAULT '1',
  1097.   `value` float NOT NULL,
  1098.   `status` tinyint(1) NOT NULL,
  1099.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  1100.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  1101.   `card_agence` varchar(50) DEFAULT NULL,
  1102.   `card_number` varchar(100) DEFAULT NULL,
  1103.   `cheque_number` varchar(100) DEFAULT NULL,
  1104.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1105.   PRIMARY KEY (`id`)
  1106. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='all services ever made' AUTO_INCREMENT=1 ;
  1107.  
  1108. -- --------------------------------------------------------
  1109.  
  1110. --
  1111. -- Estrutura para tabela `produtos`
  1112. --
  1113.  
  1114. CREATE TABLE IF NOT EXISTS `produtos` (
  1115.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1116.   `id_fornecedor` int(11) NOT NULL,
  1117.   `autoexpense` tinyint(1) NOT NULL DEFAULT '0',
  1118.   `nome` varchar(250) NOT NULL,
  1119.   `descri` mediumtext,
  1120.   `valor_original` varchar(50) NOT NULL,
  1121.   `valor` varchar(250) NOT NULL,
  1122.   `marcador` int(11) DEFAULT NULL,
  1123.   `quantidade` int(11) NOT NULL,
  1124.   `foto` varchar(250) DEFAULT NULL,
  1125.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1126.   PRIMARY KEY (`id`)
  1127. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1128.  
  1129. -- --------------------------------------------------------
  1130.  
  1131. --
  1132. -- Estrutura para tabela `ProgrammerBillet`
  1133. --
  1134.  
  1135. CREATE TABLE IF NOT EXISTS `ProgrammerBillet` (
  1136.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1137.   `id_poster` int(11) NOT NULL,
  1138.   `status` tinyint(1) NOT NULL DEFAULT '0',
  1139.   `id_client` int(11) DEFAULT NULL,
  1140.   `id_funcionario` int(11) DEFAULT NULL,
  1141.   `id_receipt` int(11) DEFAULT NULL,
  1142.   `id_font` int(11) NOT NULL,
  1143.   `plots` int(11) NOT NULL,
  1144.   `value` float NOT NULL,
  1145.   `data_send` date NOT NULL,
  1146.   `data_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1147.   PRIMARY KEY (`id`)
  1148. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1149.  
  1150. -- --------------------------------------------------------
  1151.  
  1152. --
  1153. -- Estrutura para tabela `recibos`
  1154. --
  1155.  
  1156. CREATE TABLE IF NOT EXISTS `recibos` (
  1157.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1158.   `id_cliente` int(11) DEFAULT NULL,
  1159.   `id_user` int(11) DEFAULT NULL,
  1160.   `id_employee` int(11) DEFAULT NULL COMMENT 'if type is service, used for commission',
  1161.   `id_font` int(11) DEFAULT NULL,
  1162.   `discount` double DEFAULT NULL,
  1163.   `generate_billet` tinyint(1) NOT NULL DEFAULT '0',
  1164.   `installments` int(2) NOT NULL DEFAULT '1',
  1165.   `payment_due` int(2) DEFAULT NULL,
  1166.   `_interval` int(3) DEFAULT NULL,
  1167.   `_interval_period` enum('day','week','month','year') DEFAULT NULL,
  1168.   `Payment_method` enum('a_vista','parcelado','entrada_e_parcelas','porcentagem_e_Parcelas') NOT NULL DEFAULT 'a_vista',
  1169.   `entry_value` float DEFAULT NULL,
  1170.   `percent_entry` float DEFAULT NULL,
  1171.   `status` tinyint(1) NOT NULL DEFAULT '0',
  1172.   `style` enum('Products','Services') NOT NULL,
  1173.   `metthod` enum('Dinheiro','Cartão de Crédito','Cheque','Débito Automático') NOT NULL,
  1174.   `card_name` enum('American Express','Diners Club','MasterCard','Visa','Maestro','Amex','Outros') DEFAULT NULL,
  1175.   `card_agence` varchar(250) DEFAULT NULL,
  1176.   `card_number` varchar(250) DEFAULT NULL,
  1177.   `cheque_number` varchar(250) DEFAULT NULL,
  1178.   `data` datetime NOT NULL,
  1179.   `data_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1180.   PRIMARY KEY (`id`)
  1181. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1182.  
  1183. -- --------------------------------------------------------
  1184.  
  1185. --
  1186. -- Estrutura para tabela `recibos_itens`
  1187. --
  1188.  
  1189. CREATE TABLE IF NOT EXISTS `recibos_itens` (
  1190.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1191.   `id_recibo` int(11) NOT NULL,
  1192.   `id_product` int(11) DEFAULT NULL,
  1193.   `id_service` int(11) DEFAULT NULL,
  1194.   `nome` varchar(200) NOT NULL,
  1195.   `descri` mediumtext,
  1196.   `valor_original` float DEFAULT NULL,
  1197.   `valor_despesa` float DEFAULT NULL,
  1198.   `valor_lucro` float NOT NULL,
  1199.   `qnt` int(11) NOT NULL DEFAULT '1',
  1200.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1201.   PRIMARY KEY (`id`)
  1202. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1203.  
  1204. -- --------------------------------------------------------
  1205.  
  1206. --
  1207. -- Estrutura para tabela `servicos`
  1208. --
  1209.  
  1210. CREATE TABLE IF NOT EXISTS `servicos` (
  1211.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1212.   `titulo` varchar(250) NOT NULL COMMENT 'Título do serviço',
  1213.   `descri` mediumtext COMMENT 'uma pequena descrição do serviço',
  1214.   `valor` double NOT NULL COMMENT 'valor bruto do serviço',
  1215.   `comissao` double DEFAULT NULL COMMENT 'comissão por funcionario',
  1216.   `data` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  1217.   PRIMARY KEY (`id`)
  1218. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1219.  
  1220. -- --------------------------------------------------------
  1221.  
  1222. --
  1223. -- Estrutura para tabela `task`
  1224. --
  1225.  
  1226. CREATE TABLE IF NOT EXISTS `task` (
  1227.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1228.   `id_user` int(11) NOT NULL,
  1229.   `status` tinyint(1) NOT NULL DEFAULT '0',
  1230.   `title` mediumtext NOT NULL,
  1231.   `data` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1232.   PRIMARY KEY (`id`)
  1233. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  1234.  
  1235. -- --------------------------------------------------------
  1236.  
  1237. --
  1238. -- Estrutura para tabela `users`
  1239. --
  1240.  
  1241. CREATE TABLE IF NOT EXISTS `users` (
  1242.   `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'auto incrementing user_id of each user, unique index',
  1243.   `user_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s name, unique',
  1244.   `user_first_name` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,
  1245.   `user_last_name` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,
  1246.   `user_password_hash` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s password in salted and hashed format',
  1247.   `user_email` varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s email, unique',
  1248.   `user_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'user''s activation status',
  1249.   `user_account_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'user''s account type (basic, premium, etc)',
  1250.   `user_has_avatar` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 if user has a local avatar, 0 if not',
  1251.   `user_rememberme_token` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s remember-me cookie token',
  1252.   `user_creation_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'timestamp of the creation of user''s account',
  1253.   `user_last_login_timestamp` bigint(20) DEFAULT NULL COMMENT 'timestamp of user''s last login',
  1254.   `user_failed_logins` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'user''s failed login attempts',
  1255.   `user_last_failed_login` int(10) DEFAULT NULL COMMENT 'unix timestamp of last failed login attempt',
  1256.   `user_activation_hash` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s email verification hash string',
  1257.   `user_registration_ip` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  1258.   `user_password_reset_hash` char(40) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s password reset code',
  1259.   `user_password_reset_timestamp` bigint(20) DEFAULT NULL COMMENT 'timestamp of the password reset request',
  1260.   `user_provider_type` text COLLATE utf8_unicode_ci,
  1261.   `user_facebook_uid` bigint(20) unsigned DEFAULT NULL COMMENT 'optional - facebook UID',
  1262.   PRIMARY KEY (`user_id`),
  1263.   UNIQUE KEY `user_name` (`user_name`),
  1264.   UNIQUE KEY `user_email` (`user_email`),
  1265.   KEY `user_facebook_uid` (`user_facebook_uid`)
  1266. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='user data' AUTO_INCREMENT=11 ;
  1267.  
  1268. --
  1269. -- Fazendo dump de dados para tabela `users`
  1270. --
  1271. INSERT INTO `users` (`user_id`, `user_name`, `user_first_name`, `user_last_name`, `user_password_hash`, `user_email`, `user_active`, `user_account_type`,`user_provider_type`) VALUES
  1272. (6, '{$_POST["userSystem"]}', '{$_POST["userSystem"]}', NULL, '{$pass}', '{$_POST["emailSystem"]}', 1, 0, 'DEFAULT');
  1273. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  1274. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  1275. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  1276. EOF;
  1277.     }
  1278.  
  1279.     /**
  1280.      * Here is the main configuration file of your application.
  1281.      * Note: replace special characters that makes conflict with the EOFPAGE
  1282.      * if the character in question does not exist, add it to
  1283.      * the array $ASCI_table_replace the file setup-config.php
  1284.      * @access protected
  1285.      * @param array $POST
  1286.      * @return HTML
  1287.      */
  1288.     protected function FileGenerate($POST) {
  1289.         $year = date('Y');
  1290.  
  1291.         return <<<EOFPAGE
  1292. &#60;?php
  1293.        
  1294. /**
  1295.  * Configuration File {$this->name}
  1296.  *
  1297.  * For more info about constants please @see http://php.net/manual/en/function.define.php
  1298.  * If you want to know why we use "define" instead of "const" @see http://stackoverflow.com/q/2447791/1114320
  1299.  * @copyright (c) {$year}, Bruno Ribeiro
  1300.  */
  1301.  
  1302. /**
  1303.  * Configuration for: Database
  1304.  * This is the place where you define your database credentials, type etc.
  1305.  *
  1306.  * database type
  1307.  * define('DB_TYPE', 'mysql');
  1308.  * database host, usually it's "127.0.0.1" or "localhost", some servers also need port info, like "127.0.0.1:8080"
  1309.  * define('DB_HOST', '127.0.0.1');
  1310.  * name of the database. please note: database and database table are not the same thing!
  1311.  * define('DB_NAME', 'login');
  1312.  * user for your database. the user needs to have rights for SELECT, UPDATE, DELETE and INSERT
  1313.  * By the way, it's bad style to use "root", but for development it will work
  1314.  * define('DB_USER', 'root');
  1315.  * The password of the above user
  1316.  * define('DB_PASS', 'xxx');
  1317.  * define('DB_PREFIX', 'prefix_'); or NULL
  1318.  */
  1319. define('DB_TYPE', 'mysql');
  1320. define('DB_HOST', '{$POST['dbhost']}');
  1321. define('DB_NAME', '{$POST['dbname']}');
  1322. define('DB_USER', '{$POST['uname']}');
  1323. define('DB_PASS', '{$POST['pwd']}');
  1324. define('DB_PREFIX', NULL);
  1325.  
  1326. // get data for dynamic settings
  1327. function array_table(&#36;table, &#36;where, &#36;fetch) {
  1328.     &#36;mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
  1329.     &#36;mysqli->set_charset('utf8');
  1330.     if (&#36;where !== false) {
  1331.         &#36;query = "SELECT &#36;fetch FROM `&#36;table` WHERE &#36;where[0] = '&#36;where[1]' LIMIT 1";
  1332.     } else {
  1333.         &#36;query = "SELECT &#36;fetch FROM `&#36;table` LIMIT 1";
  1334.     }
  1335.     &#36;q = mysqli_query(&#36;mysqli, &#36;query);
  1336.     while (&#36;data = mysqli_fetch_array(&#36;q)) {
  1337.         return &#36;data[&#36;fetch];
  1338.     }
  1339. }
  1340.  
  1341. &#36;_SYSTEM_DEBUG = array_table('Configure', false, 'DEBUG') == 0 ? false : true;
  1342.  
  1343. # -----------------------------------------
  1344. # Set Locale for date function
  1345. # -----------------------------------------
  1346. setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese');
  1347.  
  1348. # -----------------------------------------
  1349. # Bug fix erros de caracteres na header
  1350. # -----------------------------------------
  1351. ini_set('default_charset', 'UTF-8');
  1352.  
  1353. # -----------------------------------------
  1354. # Timezone
  1355. # -----------------------------------------
  1356. date_default_timezone_set('{$_POST['timezone']}');
  1357.  
  1358. /**
  1359.  * Configuration for: Base URL
  1360.  * This is the base url of our app. if you go live with your app, put your full domain name here.
  1361.  * if you are using a (different) port, then put this in here, like http://mydomain:8888/subfolder/
  1362.  * Note: The trailing slash is important!
  1363.  */
  1364. define('URL',  array_table('Configure', false, 'url'));
  1365.  
  1366.  
  1367. # -----------------------------------------
  1368. # account type  that is not accessible to other users when you add a sales service.
  1369. # is used to checked the combobox in Mov/service
  1370. # -----------------------------------------
  1371. define('ACCOUNT_TYPE_FOR_SALLER', array_table('Configure', false, 'ACCOUNT_TYPE_FOR_SALLER'));
  1372. # -----------------------------------------
  1373. # status comission close day
  1374. # value boolean
  1375. # -----------------------------------------
  1376. define('STATUS_DAY_CLOSE', array_table('Configure', false, 'STATUS_DAY_CLOSE'));
  1377.  
  1378. # -----------------------------------------
  1379. # day that will close the monthly commission.
  1380. # used to organize committees
  1381. # -----------------------------------------
  1382. define('DAY_CLOSE_COMISSION', array_table('Configure', FALSE, 'DAY_CLOSE_COMISSION'));
  1383.  
  1384. /**
  1385.  * demonstration mode, if true no one can change and add users also can not change
  1386.  * user profile, settings menu, global, access and receipts.
  1387.  */
  1388. define('DEMOSTRATION', FALSE);
  1389.  
  1390. /**
  1391.  * Versão mínima do PHP para rodar a aplicação
  1392.  * veja a lista dos recursos adicionados, editado e alterados do PHP http://pt.wikipedia.org/wiki/PHP
  1393.  *
  1394.  */
  1395. define('MIN_PHP_VERSION', '5.4.3');
  1396.  
  1397.  
  1398. /**
  1399.  * Configuration for: Folders
  1400.  * Here you define where your folders are. Unless you have renamed them, there's no need to change this.
  1401.  */
  1402. define('LIBS_PATH', 'application/libs/');
  1403. define('LIBS_DEV_PATH', 'application/libs/Developer/');
  1404. define('LIBS_DEV_PATH_DASHBOARD', 'application/libs/Dashboard/');
  1405. define('CONTROLLER_PATH', 'application/controllers/');
  1406. define('MODELS_PATH', 'application/models/');
  1407. define('VIEWS_PATH', 'application/views/');
  1408. define('DS', DIRECTORY_SEPARATOR);
  1409. // don't forget to make this folder writable via chmod 775 or 777 (?)
  1410. // the slash at the end is VERY important!
  1411. define('AVATAR_PATH', 'public/avatars/');
  1412.  
  1413. /**
  1414.  * Configuration for: Additional login providers: Facebook
  1415.  * Self-explaining. The FACEBOOK_LOGIN_PATH is the controller-action where the user is redirected to after getting
  1416.  * authenticated via Facebook. Leave it like that unless you know exactly what you do.
  1417.  */
  1418. define('FACEBOOK_LOGIN', false);
  1419. define('FACEBOOK_LOGIN_APP_ID', '');
  1420. define('FACEBOOK_LOGIN_APP_SECRET', '');
  1421. define('FACEBOOK_LOGIN_PATH', 'login/loginWithFacebook');
  1422. define('FACEBOOK_REGISTER_PATH', 'login/registerWithFacebook');
  1423.  
  1424. /**
  1425.  * Configuration for: Avatars/Gravatar support
  1426.  * Set to true if you want to use "Gravatar(s)", a service that automatically gets avatar pictures via using email
  1427.  * addresses of users by requesting images from the gravatar.com API. Set to false to use own locally saved avatars.
  1428.  * AVATAR_SIZE set the pixel size of avatars/gravatars (will be 44x44 by default). Avatars are always squares.
  1429.  * AVATAR_DEFAULT_IMAGE is the default image in public/avatars/
  1430.  */
  1431. define('USE_GRAVATAR', true);
  1432. define('AVATAR_SIZE', 44);
  1433. define('AVATAR_JPEG_QUALITY', 85);
  1434. define('AVATAR_DEFAULT_IMAGE', 'default.jpg');
  1435.  
  1436. /**
  1437.  * Configuration for: Cookies
  1438.  * Please note: The COOKIE_DOMAIN needs the domain where your app is,
  1439.  * in a format like this: .mydomain.com
  1440.  * Note the . in front of the domain. No www, no http, no slash here!
  1441.  * For local development .127.0.0.1 is fine, but when deploying you should
  1442.  * change this to your real domain, like '.mydomain.com' ! The leading dot makes the cookie available for
  1443.  * sub-domains too.
  1444.  * @see http://stackoverflow.com/q/9618217/1114320
  1445.  * @see php.net/manual/en/function.setcookie.php
  1446.  */
  1447. // 1209600 seconds = 2 weeks
  1448. define('COOKIE_RUNTIME', array_table('Configure', false, 'COOKIE_RUNTIME'));
  1449. // the domain where the cookie is valid for, for local development ".127.0.0.1" and ".localhost" will work
  1450. // IMPORTANT: always put a dot in front of the domain, like ".mydomain.com" !
  1451. define('COOKIE_DOMAIN', array_table('Configure', false, 'COOKIE_DOMAIN'));
  1452.  
  1453.  
  1454. /**
  1455.  * Interface used for tool live brandswich
  1456.  */
  1457. define('INTERFACE_NETWORK', array_table('Configure', false, 'INTERFACE'));
  1458.  
  1459.  
  1460. /**
  1461.  * Configuration for: Hashing strength
  1462.  * This is the place where you define the strength of your password hashing/salting
  1463.  *
  1464.  * To make password encryption very safe and future-proof, the PHP 5.5 hashing/salting functions
  1465.  * come with a clever so called COST FACTOR. This number defines the base-2 logarithm of the rounds of hashing,
  1466.  * something like 2^12 if your cost factor is 12. By the way, 2^12 would be 4096 rounds of hashing, doubling the
  1467.  * round with each increase of the cost factor and therefore doubling the CPU power it needs.
  1468.  * Currently, in 2013, the developers of this functions have chosen a cost factor of 10, which fits most standard
  1469.  * server setups. When time goes by and server power becomes much more powerful, it might be useful to increase
  1470.  * the cost factor, to make the password hashing one step more secure. Have a look here
  1471.  * (@see https://github.com/panique/php-login/wiki/Which-hashing-&-salting-algorithm-should-be-used-%3F)
  1472.  * in the BLOWFISH benchmark table to get an idea how this factor behaves. For most people this is irrelevant,
  1473.  * but after some years this might be very very useful to keep the encryption of your database up to date.
  1474.  *
  1475.  * Remember: Every time a user registers or tries to log in (!) this calculation will be done.
  1476.  * Don't change this if you don't know what you do.
  1477.  *
  1478.  * To get more information about the best cost factor please have a look here
  1479.  * @see http://stackoverflow.com/q/4443476/1114320
  1480.  */
  1481. // the hash cost factor, PHP's internal default is 10. You can leave this line
  1482. // commented out until you need another factor then 10.
  1483. define("HASH_COST_FACTOR", "10");
  1484.  
  1485. /**
  1486.  * Configuration for: Email server credentials
  1487.  *
  1488.  * Here you can define how you want to send emails.
  1489.  * If you have successfully set up a mail server on your linux server and you know
  1490.  * what you do, then you can skip this section. Otherwise please set EMAIL_USE_SMTP to true
  1491.  * and fill in your SMTP provider account data.
  1492.  *
  1493.  * An example setup for using gmail.com [Google Mail] as email sending service,
  1494.  * works perfectly in August 2013. Change the "xxx" to your needs.
  1495.  * Please note that there are several issues with gmail, like gmail will block your server
  1496.  * for "spam" reasons or you'll have a daily sending limit. See the readme.md for more info.
  1497.  *
  1498.  * define("PHPMAILER_DEBUG_MODE", 0);
  1499.  * define("EMAIL_USE_SMTP", true);
  1500.  * define("EMAIL_SMTP_HOST", 'ssl://smtp.gmail.com');
  1501.  * define("EMAIL_SMTP_AUTH", true);
  1502.  * define("EMAIL_SMTP_USERNAME", 'xxxxxxxxxx@gmail.com');
  1503.  * define("EMAIL_SMTP_PASSWORD", 'xxxxxxxxxxxxxxxxxxxx');
  1504.  * define("EMAIL_SMTP_PORT", 465);
  1505.  * define("EMAIL_SMTP_ENCRYPTION", 'ssl');
  1506.  *
  1507.  * It's really recommended to use SMTP!
  1508.  */
  1509. // Options: 0 = off, 1 = commands, 2 = commands and data, perfect to see SMTP errors, see the PHPMailer manual for more
  1510. define("PHPMAILER_DEBUG_MODE", 0);
  1511. // use SMTP or basic mail() ? SMTP is strongly recommended
  1512. define("EMAIL_USE_SMTP", true);
  1513. // name of your host
  1514. define("EMAIL_SMTP_HOST", '');
  1515. // leave this true until your SMTP can be used without login
  1516. define("EMAIL_SMTP_AUTH", true);
  1517. // SMTP provider username
  1518. define("EMAIL_SMTP_USERNAME", '');
  1519. // SMTP provider password
  1520. define("EMAIL_SMTP_PASSWORD", '');
  1521. // SMTP provider port
  1522. define("EMAIL_SMTP_PORT", 465);
  1523. // SMTP encryption, usually SMTP providers use "tls" or "ssl", for details see the PHPMailer manual
  1524. define("EMAIL_SMTP_ENCRYPTION", 'ssl');
  1525.  
  1526. /**
  1527.  * Configuration for: Email content data
  1528.  *
  1529.  * php-login uses the PHPMailer library, please have a look here if you want to add more
  1530.  * config stuff: @see https://github.com/PHPMailer/PHPMailer
  1531.  *
  1532.  * As email sending within your project needs some setting, you can do this here:
  1533.  *
  1534.  * Absolute URL to password reset action, necessary for email password reset links
  1535.  * define("EMAIL_PASSWORD_RESET_URL", "http://127.0.0.1/php-login/4-full-mvc-framework/login/passwordReset");
  1536.  * define("EMAIL_PASSWORD_RESET_FROM_EMAIL", "noreply@example.com");
  1537.  * define("EMAIL_PASSWORD_RESET_FROM_NAME", "My Project");
  1538.  * define("EMAIL_PASSWORD_RESET_SUBJECT", "Password reset for PROJECT XY");
  1539.  * define("EMAIL_PASSWORD_RESET_CONTENT", "Please click on this link to reset your password:");
  1540.  *
  1541.  * absolute URL to verification action, necessary for email verification links
  1542.  * define("EMAIL_VERIFICATION_URL", "http://127.0.0.1/php-login/4-full-mvc-framework/login/verify/");
  1543.  * define("EMAIL_VERIFICATION_FROM_EMAIL", "noreply@example.com");
  1544.  * define("EMAIL_VERIFICATION_FROM_NAME", "My Project");
  1545.  * define("EMAIL_VERIFICATION_SUBJECT", "Account Activation for PROJECT XY");
  1546.  * define("EMAIL_VERIFICATION_CONTENT", "Please click on this link to activate your account:");
  1547.  */
  1548. define("EMAIL_PASSWORD_RESET_URL", URL . "login/verifypasswordreset");
  1549. define("EMAIL_PASSWORD_RESET_FROM_EMAIL", "no-reply@example.com");
  1550. define("EMAIL_PASSWORD_RESET_FROM_NAME", "My Project");
  1551. define("EMAIL_PASSWORD_RESET_SUBJECT", "Password reset for PROJECT XY");
  1552. define("EMAIL_PASSWORD_RESET_CONTENT", "Please click on this link to reset your password: ");
  1553.  
  1554. define("EMAIL_VERIFICATION_URL", URL . "login/verify");
  1555. define("EMAIL_VERIFICATION_FROM_EMAIL", "no-reply@example.com");
  1556. define("EMAIL_VERIFICATION_FROM_NAME", "My Project");
  1557. define("EMAIL_VERIFICATION_SUBJECT", "Account activation for PROJECT XY");
  1558. define("EMAIL_VERIFICATION_CONTENT", "Please click on this link to activate your account: ");
  1559.  
  1560. /**
  1561.  * Configuration for: Error messages and notices
  1562.  *
  1563.  * In this project, the error messages, notices etc are all-together called "feedback".
  1564.  */
  1565. define("FEEDBACK_UNKNOWN_ERROR", "Ocorreu um erro desconhecido!");
  1566. define("FEEDBACK_PASSWORD_WRONG_3_TIMES", "Você digitou uma senha errada 3 ou mais vezes. Por favor, aguarde 30 segundos para tentar novamente.");
  1567. define("FEEDBACK_ACCOUNT_NOT_ACTIVATED_YET", "A sua conta ainda não está ativada. Por favor, clique no link de confirmação no e-mail.");
  1568. define("FEEDBACK_PASSWORD_WRONG", "Senha estava errada.");
  1569. define("FEEDBACK_USER_DOES_NOT_EXIST", "Este usuário não existe.");
  1570. // The "login failed"-message is a security improved feedback that doesn't show a potential attacker if the user exists or not
  1571. define("FEEDBACK_LOGIN_FAILED", "Falha no login.");
  1572. define("FEEDBACK_USERNAME_FIELD_EMPTY", "Campo Nome de Usuário vazio.");
  1573. define("FEEDBACK_PASSWORD_FIELD_EMPTY", "Campo Senha estava vazio.");
  1574. define("FEEDBACK_EMAIL_FIELD_EMPTY", "E-mail e senhas campos estavam vazios.");
  1575. define("FEEDBACK_EMAIL_AND_PASSWORD_FIELDS_EMPTY", "Email campo estava vazio.");
  1576. define("FEEDBACK_USERNAME_SAME_AS_OLD_ONE", "Desculpe, esse nome é o mesmo que o seu atual. Por favor, escolha outro.");
  1577. define("FEEDBACK_USERNAME_ALREADY_TAKEN", "Desculpe, esse nome de usuário já está tomada. Por favor, escolha outro.");
  1578. define("FEEDBACK_USER_EMAIL_ALREADY_TAKEN", "Desculpe, esse e-mail já está em uso. Por favor, escolha outro.");
  1579. define("FEEDBACK_USERNAME_CHANGE_SUCCESSFUL", "Seu nome de usuário foi alterado com sucesso.");
  1580. define("FEEDBACK_USERNAME_AND_PASSWORD_FIELD_EMPTY", "Nome de usuário e senha campos estão vazios.");
  1581. define("FEEDBACK_USERNAME_DOES_NOT_FIT_PATTERN", "Usuário não se encaixa no esquema username: apenas AZ e números são permitidos, 2-64 caracteres.");
  1582. define("FEEDBACK_EMAIL_DOES_NOT_FIT_PATTERN", "Desculpe, seu e-mail escolhido não se encaixam no padrão de nomenclatura e-mail.");
  1583. define("FEEDBACK_EMAIL_SAME_AS_OLD_ONE", "Desculpe, esse endereço de e-mail é o mesmo que o seu atual. Por favor, escolha outro.");
  1584. define("FEEDBACK_EMAIL_CHANGE_SUCCESSFUL", "O seu endereço de e-mail foi alterado com sucesso.");
  1585. define("FEEDBACK_CAPTCHA_WRONG", "Os caracteres digitados de segurança captcha estavam errados.");
  1586. define("FEEDBACK_PASSWORD_REPEAT_WRONG", "Senha e senha repetição não são os mesmos.");
  1587. define("FEEDBACK_PASSWORD_TOO_SHORT", "Senha tem um comprimento mínimo de 6 caracteres.");
  1588. define("FEEDBACK_USERNAME_TOO_SHORT_OR_TOO_LONG", "Nome de usuário não pode ser menor que 2 ou mais de 64 caracteres.");
  1589. define("FEEDBACK_EMAIL_TOO_LONG", "E-mail não poderá ser maior que 64 caracteres.");
  1590. define("FEEDBACK_ACCOUNT_SUCCESSFULLY_CREATED", "Sua conta foi criada com sucesso e nós enviou um e-mail. Por favor, clique no link de verificação dentro desse e-mail.");
  1591. define("FEEDBACK_VERIFICATION_MAIL_SENDING_FAILED", "Desculpe, mas não poderia enviar-lhe um e-mail de verificação. Sua conta não foi criada.");
  1592. define("FEEDBACK_ACCOUNT_CREATION_FAILED", "Desculpe, seu registro falhou. Por favor, volte e tente novamente.");
  1593. define("FEEDBACK_VERIFICATION_MAIL_SENDING_ERROR", "Verificação de e-mail não pôde ser enviado devido a: ");
  1594. define("FEEDBACK_VERIFICATION_MAIL_SENDING_SUCCESSFUL", "Um e-mail de verificação foi enviada com sucesso.");
  1595. define("FEEDBACK_ACCOUNT_ACTIVATION_SUCCESSFUL", "A ativação foi bem sucedida! Agora você pode logar");
  1596. define("FEEDBACK_ACCOUNT_ACTIVATION_FAILED", "Desculpe, nenhuma combinação de código de id / verificação aqui ...");
  1597. define("FEEDBACK_AVATAR_UPLOAD_SUCCESSFUL", "Avatar foi enviado bem sucedido.");
  1598. define("FEEDBACK_AVATAR_UPLOAD_WRONG_TYPE", "Apenas arquivos JPEG e PNG são suportados.");
  1599. define("FEEDBACK_AVATAR_UPLOAD_TOO_SMALL", "Largura / altura do arquivo de origem Avatar é muito pequeno. Precisa ser 100x100 pixels mínimo.");
  1600. define("FEEDBACK_AVATAR_UPLOAD_TOO_BIG", "Arquivo de origem Avatar é muito grande. 5 Megabyte é o máximo.");
  1601. define("FEEDBACK_AVATAR_FOLDER_DOES_NOT_EXIST_OR_NOT_WRITABLE", "pasta Avatar não existe ou não é gravável. Por favor, altere esta via chmod 775 ou 777.");
  1602. define("FEEDBACK_AVATAR_IMAGE_UPLOAD_FAILED", "Algo deu errado com o upload da imagem.");
  1603. define("FEEDBACK_PASSWORD_RESET_TOKEN_FAIL", "Não foi possível gravar token para banco de dados.");
  1604. define("FEEDBACK_PASSWORD_RESET_TOKEN_MISSING", "Nenhuma senha sinal de reset.");
  1605. define("FEEDBACK_PASSWORD_RESET_MAIL_SENDING_ERROR", "Redefinição de senha e-mail não pôde ser enviado devido a: ");
  1606. define("FEEDBACK_PASSWORD_RESET_MAIL_SENDING_SUCCESSFUL", "A redefinição de senha de e-mail foi enviado com sucesso.");
  1607. define("FEEDBACK_PASSWORD_RESET_LINK_EXPIRED", "Seu link de redefinição expirou. Por favor, use o link de redefinição de dentro de uma hora.");
  1608. define("FEEDBACK_PASSWORD_RESET_COMBINATION_DOES_NOT_EXIST", "Combinação código Nome de Usuário / Verificação não existe.");
  1609. define("FEEDBACK_PASSWORD_RESET_LINK_VALID", "Redefinição de senha link de validação é válido. Por favor, altere a senha agora.");
  1610. define("FEEDBACK_PASSWORD_CHANGE_SUCCESSFUL", "Senha alterada com sucesso.");
  1611. define("FEEDBACK_PASSWORD_CHANGE_FAILED", "Desculpe, sua mudança de senha falhou.");
  1612. define("FEEDBACK_ACCOUNT_UPGRADE_SUCCESSFUL", "Conta atualização foi bem sucedida.");
  1613. define("FEEDBACK_ACCOUNT_UPGRADE_FAILED", "Conta atualização falhou.");
  1614. define("FEEDBACK_ACCOUNT_DOWNGRADE_SUCCESSFUL", "Conta rebaixamento foi bem sucedida.");
  1615. define("FEEDBACK_ACCOUNT_DOWNGRADE_FAILED", "Rebaixamento Conta falhou.");
  1616. define("FEEDBACK_NOTE_CREATION_FAILED", "Nota criação falhou.");
  1617. define("FEEDBACK_NOTE_EDITING_FAILED", "Edição Nota falhou.");
  1618. define("FEEDBACK_NOTE_DELETION_FAILED", "Nota exclusão falhou.");
  1619. define("FEEDBACK_COOKIE_INVALID", "Seu lembrar-me-cookie é inválido.");
  1620. define("FEEDBACK_COOKIE_LOGIN_SUCCESSFUL", "Você foi registrado com sucesso em via a lembrar-me-cookie.");
  1621. define("FEEDBACK_FACEBOOK_LOGIN_NOT_REGISTERED", "Desculpe, você não tem uma conta aqui. Por favor, registre-se primeiro.");
  1622. define("FEEDBACK_FACEBOOK_EMAIL_NEEDED", "Desculpe, mas você precisa nos permitem ver o seu endereço de e-mail para se cadastrar.");
  1623. define("FEEDBACK_FACEBOOK_UID_ALREADY_EXISTS", "Desculpe, mas você já se registrou aqui (seu Facebook ID existe em nosso banco de dados).");
  1624. define("FEEDBACK_FACEBOOK_EMAIL_ALREADY_EXISTS", "Desculpe, mas você já se registrou aqui (seu e-mail Facebook existe em nosso banco de dados).");
  1625. define("FEEDBACK_FACEBOOK_USERNAME_ALREADY_EXISTS", "Desculpe, mas você já se registrou aqui (seu nome de usuário do Facebook existe em nosso banco de dados).");
  1626. define("FEEDBACK_FACEBOOK_REGISTER_SUCCESSFUL", "Você foi registrado com êxito com o Facebook.");
  1627. define("FEEDBACK_FACEBOOK_OFFLINE", "Nós não poderia alcançar os servidores do Facebook. Talvez Facebook está offline (que realmente acontece às vezes).");
  1628.  
  1629.  
  1630. // Português Brasileiro Paginação
  1631. define('PAGINATION_TEXT_DB_NAME', 'Não foi poss&iacute;vel conectar ao banco de dados: ');
  1632. define('PAGINATION_TEXT_ERRO_QUERY', 'Erro: Tipo de consulta: ');
  1633. define('PAGINATION_TEXT_ERRO_TYPE_QUERY', 'Erro na consulta: ');
  1634. define('PAGINATION_TEXT_BEFORE', 'Anterior');
  1635. define('PAGINATION_TEXT_AFTER', 'Pr&#243;ximo');
  1636.  
  1637. // Settings Web Site
  1638.  
  1639.  
  1640. /**
  1641.  * URL logo web site
  1642.  */
  1643. define('WEB_SITE_LOGO', array_table('Configure', false, 'LOGO'));
  1644.  
  1645. /**
  1646.  * Favicon of site
  1647.  * use false for disable
  1648.  */
  1649. define('WEB_SITE_CEO_FAVOICON', array_table('Configure', false, 'FAVOICON'));
  1650.  
  1651.  
  1652. /**
  1653.  * keywords site
  1654.  * use , for separate the words
  1655.  */
  1656. define('WEB_SITE_CEO_NAME', array_table('Configure', false, 'NAME'));
  1657.  
  1658.  
  1659. /**
  1660.  * System Debug
  1661.  * if it is as false when there is an error interrupts the task if true shows the error as Exception
  1662.  */
  1663. define('SYSTEM_DEBUG', &#36;_SYSTEM_DEBUG);
  1664.  
  1665.  
  1666.  
  1667. /**
  1668.  * Sustem preview mode
  1669.  * if this application are using a host, the database values autofill for graphs
  1670.  * @Boolean
  1671.  */
  1672. define('SYSTEM_PREVIEW_MODE', false);
  1673.  
  1674. /**
  1675.  * Mail configuration
  1676.  */
  1677. define('MAIL_AUTH', array_table('ConfigureMail', false, 'AUTH'));
  1678. define('MAIL_SMTP', array_table('ConfigureMail', false, 'SMTP'));
  1679. define('MAIL_SMTP_SECURE', array_table('ConfigureMail', false, 'SMTP_SECURE'));
  1680. define('MAIL_USER', array_table('ConfigureMail', false, 'USER'));
  1681. define('MAIL_PASS', array_table('ConfigureMail', false, 'PASS'));
  1682. define('MAIL_PORT', array_table('ConfigureMail', false, 'PORT'));
  1683. define('MAIL_CC', array_table('ConfigureMail', false, 'CC'));
  1684. define('MAIL_BCC', array_table('ConfigureMail', false, 'BCC'));
  1685. define('MAIL_HTML', array_table('ConfigureMail', false, 'HTML'));
  1686. define('MAIL_BUTTON_SIGNATURE', array_table('ConfigureMail', false, 'BUTTON_SIGNATURE'));
  1687. define('MAIL_TOP_SIGNATURE', array_table('ConfigureMail', false, 'TOP_SIGNATURE'));
  1688.  
  1689. EOFPAGE;
  1690.     }
  1691.  
  1692.     /**
  1693.      * Convert Special Char
  1694.      * @param string $string
  1695.      * @return string
  1696.      */
  1697.     private function RevertHTML($string) {
  1698.         foreach ($this->Rules as $k => $v) {
  1699.             $string = str_replace($k, $v, $string);
  1700.         }
  1701.         return $string;
  1702.     }
  1703.  
  1704.     /**
  1705.      * Create an HTML for step 1
  1706.      * @access protected
  1707.      * @return HTML
  1708.      */
  1709.     protected function HTMLStep1() {
  1710.         $html = new DOMDocument();
  1711.         $html->loadHTMLFile("Pages/step1.xml");
  1712.         $html->preserveWhiteSpace = false;
  1713.         $html->formatOutput = true;
  1714.  
  1715.         $html->getElementById('logo')->nodeValue = sprintf(LOGO, $this->logo, $this->link, $this->name);
  1716.         $html->getElementsByTagName('title')->item(0)->nodeValue = sprintf(STEP1_TITLETAG, $this->name);
  1717.         $html->getElementById('title')->nodeValue = sprintf(STEP1_TITLE, $this->name);
  1718.         $html->getElementById('LIST1')->nodeValue = STEP1_LIST1;
  1719.         $html->getElementById('LIST2')->nodeValue = STEP1_LIST2;
  1720.         $html->getElementById('LIST3')->nodeValue = STEP1_LIST3;
  1721.         $html->getElementById('LIST4')->nodeValue = STEP1_LIST4;
  1722.         $html->getElementById('txt1')->nodeValue = sprintf(STEP1_TEXT1, $this->file, $this->file, $this->file);
  1723.         $html->getElementById('txt2')->nodeValue = STEP1_TEXT2;
  1724.         $html->getElementById('step_1_buttom')->nodeValue = STEP1_BUTTOM;
  1725.  
  1726.         return $this->RevertHTML($html->saveHTML());
  1727.     }
  1728.  
  1729.     /**
  1730.      * Make timezone
  1731.      * @return String
  1732.      */
  1733.     private function MakeTZ() {
  1734.         $zones = timezone_identifiers_list();
  1735.         $locales = array(
  1736.             'Africa',
  1737.             'America',
  1738.             'Antarctica',
  1739.             'Arctic',
  1740.             'Asia',
  1741.             'Atlantic',
  1742.             'Australia',
  1743.             'Europe',
  1744.             'Indian',
  1745.             'Pacific',
  1746.         );
  1747.  
  1748.         foreach ($zones as $zone) {
  1749.             $zone = explode('/', $zone); // 0 => Continent, 1 => City
  1750.             // Only use "friendly" continent names
  1751.             if ($zone[0] == 'Africa' || $zone[0] == 'America' || $zone[0] == 'Antarctica' || $zone[0] == 'Arctic' || $zone[0] == 'Asia' || $zone[0] == 'Atlantic' || $zone[0] == 'Australia' || $zone[0] == 'Europe' || $zone[0] == 'Indian' || $zone[0] == 'Pacific') {
  1752.                 if (isset($zone[1]) != '') {
  1753.                     $locations[$zone[0]][$zone[0] . '/' . $zone[1]] = str_replace('_', ' ', $zone[1]); // Creates array(DateTimeZone => 'Friendly name')
  1754.                 }
  1755.             }
  1756.         }
  1757.  
  1758.         $result = '<select id="e1" class="populate" style="width: 100%" name="timezone">';
  1759.         foreach ($locales as $v) {
  1760.             $result.= '<optgroup label="' . $v . '">';
  1761.             foreach ($locations[$v] as $value) {
  1762.                 $result.= '<option value="' . $v . '/' . str_replace(" ", "_", $value) . '">' . $v . '/' . $value . '</option>';
  1763.             }
  1764.             $result.= '</optgroup>';
  1765.         }
  1766.         $result.= '</select>';
  1767.         return $result;
  1768.     }
  1769.  
  1770.     /**
  1771.      * Create an HTML for step 2
  1772.      * @access protected
  1773.      * @return HTML
  1774.      */
  1775.     protected function HTMLStep2() {
  1776.         $html = new DOMDocument();
  1777.         $html->loadHTMLFile("Pages/step2.xml");
  1778.         $html->preserveWhiteSpace = false;
  1779.         $html->formatOutput = true;
  1780.         $html->getElementById('logo')->nodeValue = sprintf(LOGO, $this->logo, $this->link, $this->name);
  1781.         $html->getElementsByTagName('title')->item(0)->nodeValue = sprintf(STEP1_TITLETAG, $this->name);
  1782.  
  1783.         $html->getElementById('STEP2_TEXT1')->nodeValue = STEP2_TEXT1;
  1784.  
  1785.         $html->getElementById('LIST1')->nodeValue = STEP2_LIST1;
  1786.         $html->getElementById('DLIST1')->nodeValue = sprintf(STEP2_DLIST1, $this->name);
  1787.  
  1788.         $html->getElementById('LIST2')->nodeValue = STEP2_LIST2;
  1789.         $html->getElementById('DLIST2')->nodeValue = STEP2_DLIST2;
  1790.  
  1791.         $html->getElementById('LIST3')->nodeValue = STEP2_LIST3;
  1792.         $html->getElementById('DLIST3')->nodeValue = STEP2_DLIST3;
  1793.  
  1794.         $html->getElementById('LIST3')->nodeValue = STEP2_LIST3;
  1795.         $html->getElementById('DLIST3')->nodeValue = STEP2_DLIST3;
  1796.  
  1797.         $html->getElementById('LIST4')->nodeValue = STEP2_LIST4;
  1798.         $html->getElementById('DLIST4')->nodeValue = STEP2_DLIST4;
  1799.  
  1800.  
  1801.         $html->getElementById('field5')->nodeValue = $this->MakeTZ();
  1802.  
  1803.         $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
  1804.         $url = str_replace("application/_installation/setup-config.php?step=1", "", $actual_link);
  1805.  
  1806.  
  1807.         $u = $html->getElementById('url');
  1808.  
  1809.         $u->setAttribute('value', $url);
  1810.  
  1811.  
  1812.  
  1813.  
  1814.         $input = $html->getElementById('send');
  1815.         $input->removeAttribute('value');
  1816.         $input->setAttribute('value', STEP2_BUTTOM);
  1817.  
  1818.  
  1819.  
  1820.         return $this->RevertHTML($html->saveHTML());
  1821.     }
  1822.  
  1823.     /**
  1824.      * Create an HTML when it is not possible to connect to the database
  1825.      * @access protected
  1826.      * @return type
  1827.      */
  1828.     protected function HTMLErroConnection() {
  1829.         $html = new DOMDocument();
  1830.         @$html->loadHTMLFile("Pages/ErroConnection.xml");
  1831.         $html->preserveWhiteSpace = false;
  1832.         $html->formatOutput = true;
  1833.  
  1834.         $html->getElementsByTagName('title')->item(0)->nodeValue = sprintf(STEP1_TITLETAG, $this->name);
  1835.  
  1836.         $html->getElementById('TEXT1')->nodeValue = ERRO_CONNETION_TEXT1;
  1837.         $html->getElementById('TEXT2')->nodeValue = ERRO_CONNETION_TEXT2;
  1838.         $html->getElementById('TEXT3')->nodeValue = ERRO_CONNETION_TEXT3;
  1839.         $html->getElementById('TEXT4')->nodeValue = ERRO_CONNETION_TEXT4;
  1840.         $html->getElementById('TEXT5')->nodeValue = ERRO_CONNETION_TEXT5;
  1841.         $html->getElementById('TEXT6')->nodeValue = ERRO_CONNETION_TEXT6;
  1842.         $html->getElementById('buttom')->nodeValue = ERRO_CONNETION_BUTTOM;
  1843.  
  1844.         return $this->RevertHTML($html->saveHTML());
  1845.     }
  1846.  
  1847.     /**
  1848.      * create an HTML when the file was created successfully
  1849.      * @access protected
  1850.      * @return HTML
  1851.      */
  1852.     protected function HTMLSucessCreatedFileConfig() {
  1853.         $html = new DOMDocument();
  1854.         $html->loadHTMLFile("Pages/SucessCreated.xml");
  1855.         $html->preserveWhiteSpace = false;
  1856.         $html->formatOutput = true;
  1857.  
  1858.         $html->getElementById('logo')->nodeValue = sprintf(LOGO, $this->logo, $this->link, $this->name);
  1859.         $html->getElementsByTagName('title')->item(0)->nodeValue = sprintf(STEP1_TITLETAG, $this->name);
  1860.  
  1861.         $html->getElementById('text')->nodeValue = sprintf(SUCCESS_TEXT, $this->name);
  1862.  
  1863.         $html->getElementById('buttom')->nodeValue = SUCCESS_BUTTOM;
  1864.  
  1865.         return $this->RevertHTML($html->saveHTML());
  1866.     }
  1867.  
  1868.     /**
  1869.      * create an HTML when some error occurs
  1870.      * @access protected
  1871.      * @return HTML
  1872.      */
  1873.     protected function HTMLErroUnknow() {
  1874.         $html = new DOMDocument();
  1875.         $html->loadHTMLFile("Pages/ErroUnknow.xml");
  1876.         $html->preserveWhiteSpace = false;
  1877.         $html->formatOutput = true;
  1878.  
  1879.         $html->getElementById('logo')->nodeValue = sprintf(LOGO, $this->logo, $this->link, $this->name);
  1880.         $html->getElementsByTagName('title')->item(0)->nodeValue = sprintf(STEP1_TITLETAG, $this->name);
  1881.  
  1882.         $html->getElementById('ERROUNKNOW_TEXT1')->nodeValue = sprintf(ERROUNKNOW_TEXT1, $this->file);
  1883.         $html->getElementById('ERROUNKNOW_TEXT2')->nodeValue = sprintf(ERROUNKNOW_TEXT2, $this->file);
  1884.         $html->getElementById('ERROUNKNOW_TEXT3')->nodeValue = ERROUNKNOW_TEXT3;
  1885.  
  1886.         $html->getElementById('wp-config')->nodeValue = $this->FileGenerate($_POST);
  1887.  
  1888.         $html->getElementById('buttom')->nodeValue = SUCCESS_BUTTOM;
  1889.  
  1890.         return $this->RevertHTML($html->saveHTML());
  1891.     }
  1892.  
  1893. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement