├── .gitignore ├── setup ├── skin │ ├── index.php │ ├── css │ │ ├── index.php │ │ └── doorgets_installer.css │ └── img │ │ ├── index.php │ │ ├── bt.png │ │ ├── bt_off.png │ │ ├── bg_title.png │ │ ├── bt_hover.png │ │ └── bt_off_hover.png ├── config │ ├── index.php │ └── config.php ├── data │ ├── index.php │ ├── database.zip │ └── doorgets.zip ├── temp │ └── index.php ├── cache │ ├── index.php │ └── template │ │ ├── index.php │ │ ├── wrapper.tpl.php │ │ ├── footer.tpl.php │ │ ├── goback.tpl.php │ │ ├── header.tpl.php │ │ ├── root.tpl.php │ │ ├── admin.tpl.php │ │ ├── chmod.tpl.php │ │ ├── polymorphic.tpl.php │ │ ├── database.tpl.php │ │ └── website.tpl.php └── doorgets │ ├── locale │ ├── su.lg.php │ ├── tu.lg.php │ ├── en.lg.php │ ├── pl.lg.php │ ├── ru.lg.php │ ├── po.lg.php │ ├── es.lg.php │ ├── it.lg.php │ ├── de.lg.php │ ├── fr.lg.php │ └── temp.lg.php │ ├── routers │ └── installerRouter.php │ ├── template │ ├── wrapper.tpl.php │ ├── goback.tpl.php │ ├── footer.tpl.php │ ├── header.tpl.php │ ├── root.tpl.php │ ├── admin.tpl.php │ ├── chmod.tpl.php │ ├── polymorphic.tpl.php │ ├── database.tpl.php │ └── website.tpl.php │ ├── app │ ├── views │ │ ├── licenceView.php │ │ ├── polymorphicView.php │ │ ├── adminView.php │ │ ├── databaseView.php │ │ ├── websiteView.php │ │ ├── chmodView.php │ │ └── rootView.php │ ├── controllers │ │ ├── rootController.php │ │ ├── adminController.php │ │ ├── chmodController.php │ │ ├── databaseController.php │ │ ├── licenceController.php │ │ ├── websiteController.php │ │ └── polymorphicController.php │ └── models │ │ ├── chmodModel.php │ │ ├── rootModel.php │ │ ├── licenceModel.php │ │ ├── adminModel.php │ │ ├── websiteModel.php │ │ ├── databaseModel.php │ │ └── polymorphicModel.php │ └── core │ ├── doorgetsModel.php │ ├── doorgetsView.php │ ├── doorgetsController.php │ ├── CRUD.php │ ├── Langue.php │ ├── Template.php │ ├── doorgetsInstaller.php │ └── Formulaire.php ├── README.md ├── composer.json └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /setup/skin/index.php: -------------------------------------------------------------------------------- 1 | =5.3.3" 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /setup/doorgets/locale/su.lg.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | $doorGetsInstaller = new doorgetsInstaller(); 36 | echo $doorGetsInstaller->getHtmlContent(); -------------------------------------------------------------------------------- /setup/doorgets/template/wrapper.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?>{{!$this->getHtmlHeader();}} 34 |
35 | {{!$this->content;}} 36 |
37 | {{!$this->getHtmlFooter();}} -------------------------------------------------------------------------------- /setup/cache/template/wrapper.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | echo $this->getHtmlHeader(); ?> 34 |
35 | content; ?> 36 |
37 | getHtmlFooter(); ?> -------------------------------------------------------------------------------- /setup/doorgets/app/views/licenceView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class licenceView extends doorgetsView{ 35 | 36 | public function __construct($doorgets){ 37 | parent::__construct($doorgets); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /setup/doorgets/app/views/polymorphicView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class polymorphicView extends doorgetsView{ 35 | 36 | public function __construct($doorgets){ 37 | parent::__construct($doorgets); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | session_start(); 35 | 36 | define('BASE','./setup/'); 37 | define('DOORGETS','http://www.doorgets.com/'); // Ne pas supprimer 38 | require_once BASE.'config/config.php'; 39 | 40 | require_once ROUTER.'installerRouter.php'; -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/rootController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class rootController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/adminController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class adminController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/chmodController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class chmodController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/databaseController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class databaseController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/licenceController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class licenceController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/websiteController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class websiteController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/app/controllers/polymorphicController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class polymorphicController extends doorgetsController{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /setup/doorgets/template/goback.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 | {{!$this->form['prev_step']->open('post','','')!}} 36 | {{!$this->form['prev_step']->input('','hidden','hidden','1')!}} 37 | {{!$this->form['prev_step']->submit($this->l('Etape précédente'),'','submit-prev')!}} 38 | {{!$this->form['prev_step']->close()!}} 39 |
-------------------------------------------------------------------------------- /setup/doorgets/template/footer.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | ?> 35 | 38 | 39 | -------------------------------------------------------------------------------- /setup/cache/template/footer.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | ?> 35 | 38 | 39 | -------------------------------------------------------------------------------- /setup/cache/template/goback.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 | form['prev_step']->open('post','',''); ?> 36 | form['prev_step']->input('','hidden','hidden','1'); ?> 37 | form['prev_step']->submit($this->l('Etape précédente'),'','submit-prev'); echo $this->form['prev_step']->close(); ?> 38 |
-------------------------------------------------------------------------------- /setup/doorgets/core/doorgetsModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class doorgetsModel { 35 | 36 | public $doorgets; 37 | 38 | public function __construct($doorgets){ 39 | 40 | $this->doorgets = $doorgets; 41 | $this->indexAction(); 42 | 43 | } 44 | 45 | public function indexAction(){ 46 | 47 | $actionName = $this->doorgets->getStep(); 48 | 49 | } 50 | 51 | 52 | } -------------------------------------------------------------------------------- /setup/doorgets/app/views/adminView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class adminView extends doorgetsView{ 35 | 36 | public $info; 37 | 38 | public function __construct($doorgets){ 39 | 40 | $fileTemp = BASE.'temp/admin.php'; 41 | if(is_file($fileTemp)){ 42 | 43 | $cFile = file_get_contents($fileTemp); 44 | $this->info = @unserialize($cFile); 45 | 46 | } 47 | 48 | parent::__construct($doorgets); 49 | 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /setup/doorgets/app/views/databaseView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class databaseView extends doorgetsView{ 35 | 36 | public $info; 37 | 38 | public function __construct($doorgets){ 39 | 40 | $fileTemp = BASE.'temp/database.php'; 41 | if(is_file($fileTemp)){ 42 | 43 | $cFile = file_get_contents($fileTemp); 44 | $this->info = @unserialize($cFile); 45 | 46 | } 47 | 48 | parent::__construct($doorgets); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /setup/doorgets/app/views/websiteView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class websiteView extends doorgetsView{ 35 | 36 | public $info; 37 | 38 | public function __construct($doorgets){ 39 | 40 | $fileTemp = BASE.'temp/website.php'; 41 | if(is_file($fileTemp)){ 42 | 43 | $cFile = file_get_contents($fileTemp); 44 | $this->info = @unserialize($cFile); 45 | 46 | } 47 | 48 | parent::__construct($doorgets); 49 | 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /setup/doorgets/template/header.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | ?> 35 | 36 | 37 | doorGets 6.0 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /setup/cache/template/header.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | ?> 35 | 36 | 37 | doorGets 6.0 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /setup/doorgets/app/views/chmodView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class chmodView extends doorgetsView{ 35 | 36 | public function __construct($doorgets){ 37 | parent::__construct($doorgets); 38 | } 39 | 40 | public function isChmod777(){ 41 | 42 | try{ 43 | 44 | $file = dirname('index.php'); 45 | if(@is_writable($file)){ 46 | return true; 47 | } 48 | 49 | return false; 50 | 51 | }catch(Exception $e){ } 52 | 53 | } 54 | 55 | 56 | } -------------------------------------------------------------------------------- /setup/doorgets/core/doorgetsView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class doorgetsView { 35 | 36 | public $content; 37 | 38 | public $doorgets; 39 | 40 | public function __construct($doorgets){ 41 | 42 | $this->doorgets = $doorgets; 43 | $this->initContent(); 44 | $this->doorgets->setContent($this->content); 45 | } 46 | 47 | public function initContent(){ 48 | 49 | $doorgets = $this->doorgets; 50 | $ActionFile = $this->doorgets->getStep(); 51 | 52 | $tpl = Template::getView($ActionFile); 53 | ob_start(); if(is_file($tpl)){ include $tpl; } $out = ob_get_clean(); 54 | $this->content = $out; 55 | 56 | } 57 | 58 | 59 | } -------------------------------------------------------------------------------- /setup/skin/css/doorgets_installer.css: -------------------------------------------------------------------------------- 1 | html,body,table,ul,li,p,form{ margin: 0;padding: 0; font: 15px/1.35 Helvetica,Arial,sans-serif; } 2 | a{ text-decoration: none; color: #000; } 3 | .doorGets-wrapper{overflow: hidden;margin: 20px auto 10px;width: 600px;border: solid 1px #ccc;padding: 10px 13px 10px 10px;box-shadow: 1px 1px 8px #AAAAAA;} 4 | .doorGets-wrapper label{font-weight: 700;} 5 | .doorGets-wrapper input[type=text]{width: 590px;padding: 5px;} 6 | .doorGets-wrapper input[type=checkbox]{margin-right: 10px;} 7 | .doorGets-wrapper select{padding: 5px;} 8 | .doorGets-wrapper input[type=text].input-network{width: 180px;} 9 | .separateur-tb{ width: 100%; height: 1px; background: #f1f1f1; margin: 10px 0; } 10 | .doorGets-title-content{color: #90C;font-weight: bold;padding: 5px;background: #F1F1F1; border: solid 1px #909;margin: 10px 0;font-size: 15pt;background: #007700 url(../img/bg_title.png) repeat-x;} 11 | .doorGets-top-title-content{padding-bottom: 12px;color: #000;font-weight: bold;padding: 5px 0;font-size: 15pt;} 12 | .doorGets-top-title-content small{color: #aaa;float: right;margin-top: 5px;} 13 | .doorGets-sub-title-content{color: #90C;font-weight: bold;padding: 5px 0; border-bottom: solid 2px #CF65F2;font-size: 13pt;margin-bottom: 10px;} 14 | .doorGets-wrapper input[type=submit]{width: auto;padding: 5px 10px;color: #90c;font-weight: 600;cursor: pointer;font-size: 13pt;} 15 | .doorGets-wrapper input[type=submit].submit-next{float: right;border-radius: 5px;font-size: 12pt;color: #fff;background: #007700 url(../img/bt.png) repeat-x;} 16 | .doorGets-wrapper input[type=submit].submit-prev{float: left;border-radius: 5px;font-size: 12pt;color: #555;background: #007700 url(../img/bt_off.png) repeat-x;} 17 | .doorGets-wrapper input[type=submit].submit-next:hover{background: #007700 url(../img/bt_hover.png) repeat-x;} 18 | .doorGets-wrapper input[type=submit].submit-prev:hover{background: #007700 url(../img/bt_off_hover.png) repeat-x;} 19 | .info-ok{padding: 10px;margin: 5px 0;background: #2AB22A;color: #fff;} 20 | .info-no-ok{padding: 10px;margin: 5px 0;background: #CE4A48;color: #fff;} 21 | .t-polymorphic-center{text-align: center;padding: 20px 0 25px;border-bottom: solid 1px #ccc;margin-bottom: 10px;} 22 | .licence-text{width:600px;height:350px;overflow:scroll;padding:0;margin:0 0 10px 0;} 23 | .info-doorGets-bottom{margin: 0 auto;width: 620px;text-align: center;} 24 | #doorgets_root label{display: inline-block;} 25 | #doorgets_root select{display: inline-block;margin-left: 15px;} -------------------------------------------------------------------------------- /setup/doorgets/template/root.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 | {{!$doorgets->form['doorgets_root']->open('post','','')!}} 36 |
37 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 38 |
39 |
40 | {{!$doorgets->form['doorgets_root']->select($doorgets->l('Choisir votre langue').'
','language',$doorgets->getAllLanguages(),$doorgets->getLanguage())!}} 41 |
42 | {{!$doorgets->form['doorgets_root']->select($doorgets->l('Choisir votre fuseau horaire').'
','time_zone',$this->getArrayZones(),$doorgets->getTimeZone())!}} 43 |
44 |
45 | {{!$doorgets->form['doorgets_root']->submit($doorgets->l('Etape suivante'),'','submit-next')!}} 46 | {{!$doorgets->form['doorgets_root']->close()!}} 47 |
-------------------------------------------------------------------------------- /setup/cache/template/root.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 | form['doorgets_root']->open('post','',''); ?> 36 |
37 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 38 |
39 |
40 | form['doorgets_root']->select($doorgets->l('Choisir votre langue').'
','language',$doorgets->getAllLanguages(),$doorgets->getLanguage()); ?> 41 |
42 | form['doorgets_root']->select($doorgets->l('Choisir votre fuseau horaire').'
','time_zone',$this->getArrayZones(),$doorgets->getTimeZone()); ?> 43 |
44 |
45 | form['doorgets_root']->submit($doorgets->l('Etape suivante'),'','submit-next'); echo $doorgets->form['doorgets_root']->close(); ?> 46 |
-------------------------------------------------------------------------------- /setup/config/config.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | define('APP',BASE.'doorgets/app/'); 36 | define('CORE',BASE.'doorgets/core/'); 37 | define('LIB',BASE.'doorgets/lib/'); 38 | define('CONFIG',BASE.'doorgets/config/'); 39 | define('TEMPLATE',BASE.'doorgets/template/'); 40 | define('ROUTER',BASE.'doorgets/routers/'); 41 | define('CONFIGURATION',BASE.'config/'); 42 | 43 | define('THEME',BASE.'themes/'); 44 | 45 | define('LANGUE',BASE.'doorgets/locale/'); 46 | define('LANGUE_DEFAULT_FILE',BASE.'doorgets/locale/temp.lg.php'); 47 | 48 | define('CONTROLLERS',BASE.'doorgets/app/controllers/'); 49 | define('MODELS',BASE.'doorgets/app/models/'); 50 | define('VIEW',BASE.'doorgets/app/views/'); 51 | 52 | define('CACHE_TEMPLATE',BASE.'cache/template/'); 53 | 54 | define('BASE_IMG',BASE.'skin/img/'); 55 | define('BASE_CSS',BASE.'skin/css/'); 56 | define('BASE_JS',BASE.'skin/js/'); 57 | 58 | require_once CORE.'doorgetsInstaller.php'; 59 | 60 | function __autoload($name){ $file = CORE.$name.'.php'; if(is_file($file)) { require_once $file; } } -------------------------------------------------------------------------------- /setup/doorgets/app/models/chmodModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class chmodModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $actionName = $this->doorgets->getStep(); 45 | 46 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 47 | 48 | if( !empty($form->i) && empty($form->e) ) 49 | { 50 | $StepsList = $this->doorgets->getStepsList(); 51 | $iPos = 1; $pos = array_keys($StepsList,$actionName); 52 | 53 | if(!empty($pos)){ $pos = (int)$pos[0]; } 54 | 55 | if($pos <= count($StepsList)){ 56 | 57 | $nexPos = $pos + 1; 58 | $this->doorgets->setStep($StepsList[$nexPos]); 59 | 60 | // to do 61 | } 62 | 63 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 64 | } 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /setup/doorgets/template/admin.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 |
36 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 37 |
38 |
39 | 5/5 - {{!$doorgets->l("Administrateur")!}} 40 |
41 | {{!$doorgets->form['doorgets_admin']->open('post','','')!}} 42 |
43 | {{!$doorgets->form['doorgets_admin']->input($doorgets->l('Adresse e-mail'),'email','text',$this->info['email'])!}} 44 |
45 | {{!$doorgets->form['doorgets_admin']->input($doorgets->l('Login'),'login','text',$this->info['login'])!}} 46 |
47 | {{!$doorgets->form['doorgets_admin']->input($doorgets->l('Mot de passe'),'password','text')!}} 48 |
49 |
50 | {{!$doorgets->form['doorgets_admin']->submit($doorgets->l('Etape suivante'),'','submit-next')!}} 51 | {{!$doorgets->form['doorgets_admin']->close()!}} 52 | {{!$doorgets->getHtmlGoBack()!}} 53 |
-------------------------------------------------------------------------------- /setup/cache/template/admin.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 |
36 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 37 |
38 |
39 | 5/5 - l("Administrateur"); ?> 40 |
41 | form['doorgets_admin']->open('post','',''); ?> 42 |
43 | form['doorgets_admin']->input($doorgets->l('Adresse e-mail'),'email','text',$this->info['email']); ?> 44 |
45 | form['doorgets_admin']->input($doorgets->l('Login'),'login','text',$this->info['login']); ?> 46 |
47 | form['doorgets_admin']->input($doorgets->l('Mot de passe'),'password','text'); ?> 48 |
49 |
50 | form['doorgets_admin']->submit($doorgets->l('Etape suivante'),'','submit-next'); echo $doorgets->form['doorgets_admin']->close(); echo $doorgets->getHtmlGoBack(); ?> 51 |
-------------------------------------------------------------------------------- /setup/doorgets/template/chmod.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 |
36 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 37 |
38 |
39 | 2/5 - {{!$doorgets->l("Vérification de vos droits d'écriture")!}} 40 |
41 | {{?($this->isChmod777()):}} 42 |
43 | {{!$doorgets->l("Vous avez bien les droits d'écriture !")!}} 44 |
45 | {{!$doorgets->form['doorgets_chmod']->open('post','','')!}} 46 | {{!$doorgets->form['doorgets_chmod']->input('','hidden','hidden','1')!}} 47 |
48 |
49 | {{!$doorgets->form['doorgets_chmod']->submit($doorgets->l('Etape suivante'),'','submit-next')!}} 50 | {{!$doorgets->form['doorgets_chmod']->close()!}} 51 | {??} 52 |
53 | {{!$doorgets->l("Votre dossier n'a pas les droits d'écriture...")!}} 54 |
55 |
56 | {?} 57 | {{!$doorgets->getHtmlGoBack()!}} 58 |
-------------------------------------------------------------------------------- /setup/cache/template/chmod.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 |
36 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 37 |
38 |
39 | 2/5 - l("Vérification de vos droits d'écriture"); ?> 40 |
41 | isChmod777()): ?> 42 |
43 | l("Vous avez bien les droits d'écriture !"); ?> 44 |
45 | form['doorgets_chmod']->open('post','',''); ?> 46 | form['doorgets_chmod']->input('','hidden','hidden','1'); ?> 47 |
48 |
49 | form['doorgets_chmod']->submit($doorgets->l('Etape suivante'),'','submit-next'); ?> 50 | form['doorgets_chmod']->close(); else: ?> 51 |
52 | l("Votre dossier n'a pas les droits d'écriture..."); ?> 53 |
54 |
55 | getHtmlGoBack(); ?> 56 |
-------------------------------------------------------------------------------- /setup/doorgets/app/models/rootModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class rootModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $actionName = $this->doorgets->getStep(); 45 | 46 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 47 | 48 | if( !empty($form->i) && empty($form->e) ) 49 | { 50 | $StepsList = $this->doorgets->getStepsList(); 51 | $iPos = 1; $pos = array_keys($StepsList,$actionName); 52 | 53 | if(!empty($pos)){ $pos = (int)$pos[0]; } 54 | 55 | if($pos <= count($StepsList)){ 56 | 57 | $nexPos = $pos + 1; 58 | $this->doorgets->setStep($StepsList[$nexPos]); 59 | 60 | $_SESSION['doorgetsLanguage'] = $form->i['language']; 61 | $_SESSION['doorgetsTimeZone'] = $form->i['time_zone']; 62 | } 63 | 64 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 65 | } 66 | } 67 | 68 | 69 | } -------------------------------------------------------------------------------- /setup/doorgets/template/polymorphic.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 |
36 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 37 |
38 |
39 | {{!$doorgets->l("Vous avez presque fini...")!}} 40 |
41 | {{!$doorgets->form['doorgets_polymorphic']->open('post','','')!}} 42 | {{!$doorgets->form['doorgets_polymorphic']->input('','hidden','hidden','1')!}} 43 |
44 |
45 | {{!$doorgets->l("Cliquez sur le bouton ci-dessous pour générer votre site.")!}} 46 |
47 | {{!$doorgets->l("Vous allez être ensuite redirigé vers la page d'administration.")!}} 48 |

49 |
50 | {{!$doorgets->form['doorgets_polymorphic']->submit($doorgets->l('Génerer mon site internet doorGets'))!}} 51 |
52 |
53 | " {{!$doorgets->l('Merci')!}} ! " 54 |
55 |
56 | {{!$doorgets->form['doorgets_polymorphic']->close()!}} 57 |
58 | {{!$doorgets->getHtmlGoBack()!}} 59 |
-------------------------------------------------------------------------------- /setup/doorgets/app/models/licenceModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class licenceModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $actionName = $this->doorgets->getStep(); 45 | 46 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 47 | 48 | if( !empty($form->i) && empty($form->e) ) 49 | { 50 | $StepsList = $this->doorgets->getStepsList(); 51 | $iPos = 1; $pos = array_keys($StepsList,$actionName); 52 | if(!empty($pos)){ $pos = (int)$pos[0]; } 53 | if( !array_key_exists('licence_validation',$form->i) ){ 54 | $form->e['doorgets_licence_licence_validation'] = "ok"; 55 | } 56 | if(empty($form->e)){ 57 | 58 | if($pos <= count($StepsList)){ 59 | 60 | $nexPos = $pos + 1; 61 | $this->doorgets->setStep($StepsList[$nexPos]); 62 | } 63 | 64 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 65 | } 66 | 67 | } 68 | } 69 | 70 | } -------------------------------------------------------------------------------- /setup/cache/template/polymorphic.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | ?> 34 |
35 |
36 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 37 |
38 |
39 | l("Vous avez presque fini..."); ?> 40 |
41 | form['doorgets_polymorphic']->open('post','',''); ?> 42 | form['doorgets_polymorphic']->input('','hidden','hidden','1'); ?> 43 |
44 |
45 | l("Cliquez sur le bouton ci-dessous pour générer votre site."); ?> 46 |
47 | l("Vous allez être ensuite redirigé vers la page d'administration."); ?> 48 |

49 |
50 | form['doorgets_polymorphic']->submit($doorgets->l('Génerer mon site internet doorGets')); ?> 51 |
52 |
53 | " l('Merci'); ?> ! " 54 |
55 |
56 | form['doorgets_polymorphic']->close(); ?> 57 |
58 | getHtmlGoBack(); ?> 59 |
-------------------------------------------------------------------------------- /setup/doorgets/core/doorgetsController.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class doorgetsController{ 35 | 36 | public $model; 37 | 38 | public $view; 39 | 40 | public $doorgets; 41 | 42 | public function __construct($doorgets){ 43 | 44 | $this->doorgets = $doorgets; 45 | 46 | $this->getModel(); 47 | $this->getView(); 48 | 49 | } 50 | 51 | // return the model of te current controller 52 | public function getModel() 53 | { 54 | 55 | $nameModel = $this->doorgets->getStep().'Model'; 56 | $fileNameModel = MODELS.'/'.$nameModel.'.php'; 57 | 58 | if(!is_file($fileNameModel)) return null; 59 | require_once $fileNameModel; 60 | 61 | if(!class_exists ($nameModel)) return null; 62 | $this->model = new $nameModel($this->doorgets); 63 | 64 | 65 | } 66 | 67 | // return the view of the current controller 68 | public function getView() 69 | { 70 | 71 | $nameView = $this->doorgets->getStep().'View'; 72 | $fileNameView = VIEW.'/'.$nameView.'.php'; 73 | 74 | if(!is_file($fileNameView)) return null; 75 | require_once $fileNameView; 76 | 77 | if(!class_exists ($nameView)) return null; 78 | $this->view = new $nameView($this->doorgets); 79 | 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /setup/doorgets/template/database.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | ?> 35 |
36 |
37 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 38 |
39 |
40 | 3/5 - {{!$doorgets->l("Connecter votre base de données")!}} 41 |
42 | {{?(!empty($doorgets->form['doorgets_database']->i)):}} 43 |
44 | {{!$doorgets->l("La connexion n'est pas établie !")!}} 45 |
46 | {?} 47 | {{!$doorgets->form['doorgets_database']->open('post','','')!}} 48 |
49 | {{!$doorgets->form['doorgets_database']->input($doorgets->l('Hôte'),'hote','text',$this->info['hote'])!}} 50 |
51 | {{!$doorgets->form['doorgets_database']->input($doorgets->l('Nom de la base'),'name','text',$this->info['name'])!}} 52 |
53 | {{!$doorgets->form['doorgets_database']->input($doorgets->l('Login'),'login','text',$this->info['login'])!}} 54 |
55 | {{!$doorgets->form['doorgets_database']->input($doorgets->l('Mot de passe'),'password','text')!}} 56 |
57 |
58 |
59 | {{!$doorgets->form['doorgets_database']->submit($doorgets->l('Etape suivante'),'','submit-next')!}} 60 | {{!$doorgets->form['doorgets_database']->close()!}} 61 | {{!$doorgets->getHtmlGoBack()!}} 62 |
-------------------------------------------------------------------------------- /setup/cache/template/database.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | ?> 35 |
36 |
37 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 38 |
39 |
40 | 3/5 - l("Connecter votre base de données"); ?> 41 |
42 | form['doorgets_database']->i)): ?> 43 |
44 | l("La connexion n'est pas établie !"); ?> 45 |
46 | form['doorgets_database']->open('post','',''); ?> 47 |
48 | form['doorgets_database']->input($doorgets->l('Hôte'),'hote','text',$this->info['hote']); ?> 49 |
50 | form['doorgets_database']->input($doorgets->l('Nom de la base'),'name','text',$this->info['name']); ?> 51 |
52 | form['doorgets_database']->input($doorgets->l('Login'),'login','text',$this->info['login']); ?> 53 |
54 | form['doorgets_database']->input($doorgets->l('Mot de passe'),'password','text'); ?> 55 |
56 |
57 |
58 | form['doorgets_database']->submit($doorgets->l('Etape suivante'),'','submit-next'); echo $doorgets->form['doorgets_database']->close(); echo $doorgets->getHtmlGoBack(); ?> 59 |
-------------------------------------------------------------------------------- /setup/doorgets/app/models/adminModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class adminModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $actionName = $this->doorgets->getStep(); 45 | 46 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 47 | 48 | if( !empty($form->i) && empty($form->e) ) 49 | { 50 | 51 | $StepsList = $this->doorgets->getStepsList(); 52 | $iPos = 1; $pos = array_keys($StepsList,$actionName); 53 | 54 | if(!empty($pos)){ $pos = (int)$pos[0]; } 55 | 56 | if( empty($form->i['login']) ) 57 | { 58 | $form->e['doorgets_admin_login'] = "ok"; 59 | } 60 | 61 | if( empty($form->i['password']) ) 62 | { 63 | $form->e['doorgets_admin_password'] = "ok"; 64 | } 65 | 66 | $var = $form->i['email']; 67 | $isEmail = filter_var($var, FILTER_VALIDATE_EMAIL); 68 | if( empty($isEmail) ){ 69 | 70 | $form->e['doorgets_admin_email'] = 'ok'; 71 | 72 | } 73 | 74 | if( empty($form->e) ){ 75 | 76 | if($pos <= count($StepsList)){ 77 | 78 | $nexPos = $pos + 1; 79 | $this->doorgets->setStep($StepsList[$nexPos]); 80 | 81 | $fileTemp = BASE.'temp/admin.php'; 82 | $isAdminInfos = serialize($form->i); 83 | @file_put_contents($fileTemp,$isAdminInfos); 84 | 85 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 86 | 87 | } 88 | 89 | } 90 | } 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /setup/doorgets/template/website.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | $yDateNow = date("Y"); $dateCreation = array(); 35 | for($i = $yDateNow;$i> ( $yDateNow - 100);$i--){ $dateCreation[(string)$i] = (int)$i; } 36 | 37 | $nFace = 'http://www.facebook.com/'; 38 | $nTwitter = 'http://www.twitter.com/'; 39 | $nYoutube = 'http://www.youtube.com/user/'; 40 | $nGoogle = 'https://plus.google.com/u/0/'; 41 | $nPinterest = 'https://www.pinterest.com/'; 42 | $nLinkedin = 'http://www.linkedin.com/in/'; 43 | $nMyspace = 'http://www.myspace.com/'; 44 | 45 | ?> 46 |
47 |
48 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 49 |
50 |
51 | 4/5 - {{!$doorgets->l("Configurer votre site internet")!}} 52 |
53 | {{!$doorgets->form['doorgets_website']->open('post','','')!}} 54 |
55 | {{!$doorgets->form['doorgets_website']->input($doorgets->l('Titre').' * ','title','text',$this->info['title'])!}} 56 |
57 | {{!$doorgets->form['doorgets_website']->input($doorgets->l('Slogan').' * ','slogan','text',$this->info['slogan'])!}} 58 |
59 | {{!$doorgets->form['doorgets_website']->input($doorgets->l('Description').' * ','description','text',$this->info['description'])!}} 60 |
61 | {{!$doorgets->form['doorgets_website']->input($doorgets->l('Mots clés').' * ','keywords','text',$this->info['keywords'])!}} 62 |
63 | {{!$doorgets->form['doorgets_website']->input($doorgets->l('Copyright'),'copyright','text',$this->info['copyright'])!}} 64 |
65 | {{!$doorgets->form['doorgets_website']->select($doorgets->l('Année de création'),'year',$dateCreation,$this->info['year'])!}} 66 |
67 |
68 | {{!$doorgets->form['doorgets_website']->submit($doorgets->l('Etape suivante'),'','submit-next')!}} 69 | {{!$doorgets->form['doorgets_website']->close()!}} 70 | {{!$doorgets->getHtmlGoBack()!}} 71 |
-------------------------------------------------------------------------------- /setup/doorgets/app/models/websiteModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class websiteModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $actionName = $this->doorgets->getStep(); 45 | 46 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 47 | 48 | if( !empty($form->i) && empty($form->e) ) 49 | { 50 | $StepsList = $this->doorgets->getStepsList(); 51 | $iPos = 1; $pos = array_keys($StepsList,$actionName); 52 | 53 | if(!empty($pos)){ $pos = (int)$pos[0]; } 54 | 55 | if( empty($form->i['title']) ) 56 | { 57 | $form->e['doorgets_website_title'] = "ok"; 58 | } 59 | if( empty($form->i['slogan']) ) 60 | { 61 | $form->e['doorgets_website_slogan'] = "ok"; 62 | } 63 | if( empty($form->i['description']) ) 64 | { 65 | $form->e['doorgets_website_description'] = "ok"; 66 | } 67 | if( empty($form->i['keywords']) ) 68 | { 69 | $form->e['doorgets_website_keywords'] = "ok"; 70 | } 71 | if( empty($form->i['copyright']) ) 72 | { 73 | $form->e['doorgets_website_copyright'] = "ok"; 74 | } 75 | 76 | if( empty($form->e) ){ 77 | 78 | if($pos <= count($StepsList)){ 79 | 80 | $nexPos = $pos + 1; 81 | $this->doorgets->setStep($StepsList[$nexPos]); 82 | 83 | $fileTemp = BASE.'temp/website.php'; 84 | $isWebsiteInfos = serialize($form->i); 85 | @file_put_contents($fileTemp,$isWebsiteInfos); 86 | 87 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 88 | 89 | } 90 | 91 | } 92 | 93 | } 94 | } 95 | 96 | } -------------------------------------------------------------------------------- /setup/cache/template/website.tpl.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | $yDateNow = date("Y"); $dateCreation = array(); 35 | for($i = $yDateNow;$i> ( $yDateNow - 100);$i--){ $dateCreation[(string)$i] = (int)$i; } 36 | 37 | $nFace = 'http://www.facebook.com/'; 38 | $nTwitter = 'http://www.twitter.com/'; 39 | $nYoutube = 'http://www.youtube.com/user/'; 40 | $nGoogle = 'https://plus.google.com/u/0/'; 41 | $nPinterest = 'https://www.pinterest.com/'; 42 | $nLinkedin = 'http://www.linkedin.com/in/'; 43 | $nMyspace = 'http://www.myspace.com/'; 44 | 45 | ?> 46 |
47 |
48 | doorGets 6.0 Free OpenSource CMS PHP/MySQL 49 |
50 |
51 | 4/5 - l("Configurer votre site internet"); ?> 52 |
53 | form['doorgets_website']->open('post','',''); ?> 54 |
55 | form['doorgets_website']->input($doorgets->l('Titre').' * ','title','text',$this->info['title']); ?> 56 |
57 | form['doorgets_website']->input($doorgets->l('Slogan').' * ','slogan','text',$this->info['slogan']); ?> 58 |
59 | form['doorgets_website']->input($doorgets->l('Description').' * ','description','text',$this->info['description']); ?> 60 |
61 | form['doorgets_website']->input($doorgets->l('Mots clés').' * ','keywords','text',$this->info['keywords']); ?> 62 |
63 | form['doorgets_website']->input($doorgets->l('Copyright'),'copyright','text',$this->info['copyright']); ?> 64 |
65 | form['doorgets_website']->select($doorgets->l('Année de création'),'year',$dateCreation,$this->info['year']); ?> 66 |
67 |
68 | form['doorgets_website']->submit($doorgets->l('Etape suivante'),'','submit-next'); echo $doorgets->form['doorgets_website']->close(); echo $doorgets->getHtmlGoBack(); ?> 69 |
-------------------------------------------------------------------------------- /setup/doorgets/core/CRUD.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | class CRUD { 36 | 37 | private $dbDSN; 38 | private $dbLogin; 39 | private $dbPassword; 40 | private $dbQuery = ""; 41 | protected $dbpdo = null; 42 | 43 | public function __construct($host,$dbName,$login,$password){ 44 | 45 | $this->dbDSN = "mysql:host=".$host.";dbname=".$dbName; 46 | $this->dbLogin = $login; 47 | $this->dbPassword = $password; 48 | 49 | try 50 | { 51 | 52 | $this->dbpdo = new PDO($this->dbDSN,$this->dbLogin,$this->dbPassword); 53 | } 54 | catch(PDOException $e) 55 | { 56 | 57 | new PrintErrorException($e); 58 | exit(); 59 | } 60 | 61 | $this->dbpdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); 62 | $this->dbpdo->beginTransaction(); 63 | 64 | 65 | } 66 | 67 | public function __destruct(){ 68 | 69 | if(!empty($this->dbQuery)){ 70 | $this->dbpdo->query($this->dbQuery); 71 | } 72 | if(!empty($this->dbpdo)){ 73 | $this->dbpdo->commit(); 74 | } 75 | $this->dbpdo = null; 76 | 77 | } 78 | 79 | public function dbQuery($q){ 80 | 81 | $this->dbQuery .= $q; 82 | } 83 | 84 | public function dbQL($query){ 85 | 86 | $this->dbpdo->query($query); 87 | return $query; 88 | 89 | } 90 | 91 | public function dbQI($data,$table){ 92 | 93 | $d = "INSERT INTO ".$table." ("; 94 | foreach($data as $k=>$v){ 95 | $d .= $k.','; 96 | } 97 | $d = substr($d,0,-1); 98 | $d .= ") VALUES ("; 99 | foreach($data as $k=>$v){ 100 | 101 | $d .= '\''.$v.'\','; 102 | 103 | } 104 | $d = substr($d,0,-1); 105 | $d .= ")"; 106 | 107 | $this->dbpdo->query($d); 108 | 109 | $id = $this->dbpdo->lastInsertId(); 110 | 111 | return $id; 112 | } 113 | 114 | public function dbQU($id,$data,$table,$fieldId="id",$other=' LIMIT 1 ',$equ="="){ 115 | 116 | $d = "UPDATE ".$table." SET "; 117 | foreach($data as $k=>$v){ 118 | $d .= $k." = '".$v."', "; 119 | } 120 | $d = substr($d,0,-2); 121 | $d .= " WHERE ".$fieldId." ".$equ." '$id' $other ;"; 122 | 123 | $this->dbQuery($d); 124 | 125 | } 126 | 127 | 128 | 129 | } -------------------------------------------------------------------------------- /setup/doorgets/core/Langue.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | class Langue{ 36 | 37 | public $allLanguages; 38 | 39 | public $myLanguage; 40 | 41 | public function __construct(){ 42 | $lg = 'en'; 43 | if( array_key_exists('doorgetsLanguage',$_SESSION) ){$lg = $_SESSION['doorgetsLanguage'];} 44 | $this->myLanguage = $lg; 45 | $this->allLanguages = $this->getAllLanguages(); 46 | 47 | } 48 | 49 | public function getAllLanguages(){ 50 | 51 | $arrLangue = array( 52 | 53 | 'en' => 'English', 54 | 'fr' => 'Français', 55 | 'de' => 'Deutsch', 56 | 'es' => 'Español', 57 | 'pl' => 'Polski', 58 | 'ru' => 'Pусский', 59 | 'tu' => 'Türk', 60 | 'po' => 'Português', 61 | 'su' => 'Svenska', 62 | 'it' => 'Italiano', 63 | 64 | ); 65 | 66 | $traductionFile = CONFIGURATION.'traduction.php'; 67 | if(is_file($traductionFile)){ 68 | include $traductionFile; 69 | } 70 | 71 | return $arrLangue; 72 | 73 | } 74 | 75 | 76 | public function l($word = ''){ 77 | 78 | $fileLangue = LANGUE.$this->myLanguage.'.lg.php'; 79 | $fileLanguePrincipale = LANGUE.'temp.lg.php'; 80 | 81 | $_w = $wTranslate = array(); 82 | 83 | if( !is_file($fileLanguePrincipale) || !is_file($fileLangue)) 84 | { 85 | return $word; 86 | } 87 | 88 | include $fileLanguePrincipale; 89 | $wDefaut = $wTranslate; 90 | 91 | unset($wTranslate); 92 | include $fileLangue; 93 | 94 | if($word === 'doorgets'){ return 'doorGets'; } 95 | 96 | if(in_array($word,$wDefaut)){ 97 | 98 | $key = array_search($word,$wDefaut); 99 | 100 | if( array_key_exists($key,$_w) && !empty($_w[$key]) ) 101 | { 102 | 103 | return $_w[$key]; 104 | } 105 | 106 | } 107 | 108 | return $word; 109 | 110 | } 111 | 112 | 113 | public function myLanguage(){ 114 | 115 | return $this->myLanguage; 116 | 117 | } 118 | 119 | public function setLangue($lg="fr"){ 120 | 121 | $this->myLanguage = $lg; 122 | 123 | } 124 | 125 | 126 | } 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /setup/doorgets/app/models/databaseModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class databaseModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $isConnected = false; 45 | 46 | $actionName = $this->doorgets->getStep(); 47 | 48 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 49 | 50 | if( !empty($form->i) && empty($form->e) ) 51 | { 52 | $StepsList = $this->doorgets->getStepsList(); 53 | $iPos = 1; $pos = array_keys($StepsList,$actionName); 54 | if(!empty($pos)){ $pos = (int)$pos[0]; } 55 | 56 | if( empty($form->i['hote']) ) 57 | { 58 | $form->e['doorgets_database_hote'] = "ok"; 59 | } 60 | if( empty($form->i['login']) ) 61 | { 62 | $form->e['doorgets_database_login'] = "ok"; 63 | } 64 | if( empty($form->i['name']) ) 65 | { 66 | $form->e['doorgets_database_name'] = "ok"; 67 | } 68 | 69 | 70 | if( empty($form->e) ){ 71 | 72 | $isConnected = $this->isConnectedToDatabase($form->i['hote'],$form->i['name'],$form->i['login'],$form->i['password']); 73 | 74 | } 75 | 76 | if($isConnected){ 77 | if($pos <= count($StepsList)){ 78 | 79 | $nexPos = $pos + 1; 80 | $this->doorgets->setStep($StepsList[$nexPos]); 81 | 82 | $fileTemp = BASE.'temp/database.php'; 83 | $isDatabaseConnect = serialize($form->i); 84 | @file_put_contents($fileTemp,$isDatabaseConnect); 85 | 86 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 87 | } 88 | } 89 | 90 | } 91 | } 92 | 93 | private function isConnectedToDatabase($host="localhost",$database="",$login="root",$pwd=""){ 94 | 95 | try{ 96 | 97 | $con = @mysql_connect($host,$login,$pwd); 98 | if(!empty($con)){ 99 | 100 | $db_selected = mysql_select_db($database, $con); 101 | if ($db_selected) { 102 | return true; 103 | } 104 | 105 | } 106 | 107 | return false; 108 | 109 | }catch(Exception $e){ } 110 | 111 | } 112 | 113 | } -------------------------------------------------------------------------------- /setup/doorgets/core/Template.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | class Template{ 36 | 37 | static function getView($name) 38 | { 39 | 40 | $cacheDirectory = CACHE_TEMPLATE; 41 | 42 | if(!is_dir($cacheDirectory)){ mkdir($cacheDirectory, 0777, true); } 43 | 44 | // Explode $name for create dir if not exists 45 | $explodeName = explode('/',$name); 46 | $cExplodeName = count($explodeName); 47 | $fileName = $explodeName[$cExplodeName - 1].'.tpl.php'; 48 | $fileTemp = $cacheDirectory.$fileName; 49 | 50 | // If dir exists on $name create it if not exists 51 | // $explodeName[$cExplodeName - 1] is file name 52 | if($cExplodeName > 1){ 53 | 54 | for($i=0;$i<$cExplodeName;$i++){ 55 | 56 | $dirNewName = ''; 57 | for( $z=0; $z<$i; $z++ ){ 58 | 59 | $dirNewName .= $explodeName[$z].'/'; 60 | 61 | } 62 | 63 | if(!is_dir($cacheDirectory.$dirNewName)){ 64 | 65 | mkdir($cacheDirectory.$dirNewName, 0777, true); 66 | 67 | } 68 | 69 | } 70 | 71 | $fileTemp = $cacheDirectory.$dirNewName.$fileName; 72 | 73 | } 74 | 75 | $nameFile = $name.'.php'; 76 | $file = TEMPLATE.$name.'.tpl.php'; 77 | 78 | if(is_file($file)) 79 | { 80 | 81 | $html = file_get_contents($file); 82 | 83 | $convertArray = array( 84 | 85 | "{?}" => '', 86 | "{/}" => '', 87 | "{-}" => '', 88 | "{{???" => ' '', 90 | "{{?" => ' ' endif; ?>', 92 | "{{/" => ' ' endforeach; ?>', 94 | "{{-" => ' ' endfor; ?>', 96 | "{{!" => ' ' '; ?>', 99 | "}}" => ' ?>', 100 | "?> '', 101 | "?> 102 | '', 103 | "?> 104 | '', 105 | "if( !defined(DOORGETS) ){ header('Location:../'); exit(); }" => '', 106 | 107 | 108 | ); 109 | 110 | foreach($convertArray as $k=>$v){ 111 | 112 | $html = str_replace($k,$v,$html); 113 | 114 | } 115 | 116 | file_put_contents($fileTemp,$html); 117 | return $fileTemp; 118 | 119 | } 120 | 121 | return 'Template not found : '.$file; 122 | 123 | } 124 | 125 | 126 | } -------------------------------------------------------------------------------- /setup/doorgets/core/doorgetsInstaller.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | class doorgetsInstaller extends Langue{ 36 | 37 | protected $stepsList; 38 | 39 | protected $Step; 40 | 41 | protected $Language; 42 | 43 | protected $TimeZone; 44 | 45 | protected $doorgets; 46 | 47 | public $form = array(); 48 | 49 | private $content; 50 | 51 | public function __construct(){ 52 | 53 | parent::__construct(); 54 | $this->init(); 55 | 56 | } 57 | 58 | public function init(){ 59 | 60 | $this->initStepsList(); 61 | $this->initStepNow(); 62 | $this->checkGoBackModel(); 63 | $this->initLanguage(); 64 | $this->initTimeZone(); 65 | $this->initController(); 66 | 67 | } 68 | 69 | public function getStep(){ 70 | return $this->Step; 71 | } 72 | 73 | public function getTimeZone(){ 74 | return $this->TimeZone; 75 | } 76 | 77 | public function getStepsList(){ 78 | return $this->stepsList; 79 | } 80 | 81 | public function getLanguage(){ 82 | return $this->Language; 83 | } 84 | 85 | public function initStepsList(){ 86 | 87 | $stepList = array( 88 | 89 | 1 => 'root', 90 | 2 => 'licence', 91 | 3 => 'chmod', 92 | 4 => 'database', 93 | 5 => 'website', 94 | 6 => 'admin', 95 | 7 => 'polymorphic', 96 | 97 | ); 98 | 99 | return $this->stepsList = $stepList; 100 | 101 | } 102 | 103 | 104 | private function initStepNow(){ 105 | 106 | if( !array_key_exists('doorgetsStep',$_SESSION) ){ $_SESSION['doorgetsStep'] = $this->stepsList[1]; } 107 | $this->Step = $_SESSION['doorgetsStep']; 108 | if(empty($this->Step)){ $this->Step = $_SESSION['doorgetsStep'] = $this->stepsList[1]; } 109 | 110 | } 111 | 112 | private function initLanguage(){ 113 | 114 | if( !array_key_exists('doorgetsLanguage',$_SESSION) ){ $_SESSION['doorgetsLanguage'] = 'en'; } 115 | $this->Language = $_SESSION['doorgetsLanguage']; 116 | 117 | } 118 | 119 | private function initTimeZone(){ 120 | 121 | if( !array_key_exists('doorgetsTimeZone',$_SESSION) ){ $_SESSION['doorgetsTimeZone'] = 'Europe/Paris'; } 122 | $this->TimeZone = $_SESSION['doorgetsTimeZone']; 123 | 124 | } 125 | 126 | private function initController(){ 127 | 128 | $nameStep = $this->getStep(); 129 | 130 | $nameController = $nameStep.'Controller'; 131 | $fileNameController = CONTROLLERS.'/'.$nameController.'.php'; 132 | 133 | if(!is_file($fileNameController)) 134 | { echo 'Controller not found : ' . $fileNameController; exit(); } 135 | require_once $fileNameController; 136 | 137 | if(!class_exists ($nameController)) 138 | { echo 'Class not found : ' . $nameController.' : '; exit(); } 139 | 140 | $this->doorgets = new $nameController($this); 141 | return $this->doorgets; 142 | } 143 | 144 | public function setContent($content){ 145 | 146 | $this->content = $content; 147 | 148 | } 149 | 150 | public function setStep($name){ 151 | 152 | $this->Step = $_SESSION['doorgetsStep'] = $name; 153 | 154 | } 155 | 156 | private function checkGoBackModel(){ 157 | 158 | $form = $this->form['prev_step'] = new Formulaire('doorgets_goback'); 159 | 160 | if(!empty($form->i)){ 161 | 162 | $StepsList = $this->getStepsList(); 163 | $iPos = 1; $pos = array_keys($StepsList,$this->getStep()); 164 | 165 | if(!empty($pos)){ $pos = (int)$pos[0]; } 166 | 167 | if($pos >= 1){ 168 | 169 | $prevPos = $pos - 1; 170 | $this->setStep($StepsList[$prevPos]); 171 | header("Location:".$_SERVER['REQUEST_URI']); exit(); 172 | 173 | } 174 | } 175 | 176 | } 177 | 178 | public function getHtmlContent(){ 179 | 180 | $tpl = Template::getView('wrapper'); 181 | ob_start(); if(is_file($tpl)){ include $tpl; } $out = ob_get_clean(); 182 | return $out; 183 | 184 | } 185 | 186 | public function getHtmlHeader(){ 187 | 188 | $myLanguage = $this->myLanguage; 189 | 190 | $tpl = Template::getView('header'); 191 | ob_start(); if(is_file($tpl)){ include $tpl; } $out = ob_get_clean(); 192 | return $out; 193 | } 194 | 195 | public function getHtmlGoBack(){ 196 | 197 | $tpl = Template::getView('goback'); 198 | ob_start(); if(is_file($tpl)){ include $tpl; } $out = ob_get_clean(); 199 | return $out; 200 | } 201 | 202 | public function getHtmlFooter(){ 203 | 204 | $myLanguage = $this->myLanguage; 205 | 206 | $tpl = Template::getView('footer'); 207 | ob_start(); if(is_file($tpl)){ include $tpl; } $out = ob_get_clean(); 208 | return $out; 209 | } 210 | 211 | 212 | 213 | } -------------------------------------------------------------------------------- /setup/doorgets/app/views/rootView.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class rootView extends doorgetsView{ 35 | 36 | public function __construct($doorgets){ 37 | parent::__construct($doorgets); 38 | } 39 | 40 | public function getArrayZones(){ 41 | 42 | $array = array ( 43 | 44 | "Pacific/Wake" => "(GMT-12:00) International Date Line West", 45 | "Pacific/Apia" => "(GMT-11:00) Midway Island", 46 | "Pacific/Apia" => "(GMT-11:00) Samoa", 47 | "Pacific/Honolulu" => "(GMT-10:00) Hawaii", 48 | "America/Anchorage" => "(GMT-09:00) Alaska", 49 | "America/Los_Angeles" => "(GMT-08:00) Pacific Time (US & Canada); Tijuana", 50 | "America/Phoenix" => "(GMT-07:00) Arizona", 51 | "America/Chihuahua" => "(GMT-07:00) Chihuahua", 52 | "America/Chihuahua" => "(GMT-07:00) La Paz", 53 | "America/Chihuahua" => "(GMT-07:00) Mazatlan", 54 | "America/Denver" => "(GMT-07:00) Mountain Time (US & Canada)", 55 | "America/Managua" => "(GMT-06:00) Central America", 56 | "America/Chicago" => "(GMT-06:00) Central Time (US & Canada)", 57 | "America/Mexico_City" => "(GMT-06:00) Guadalajara", 58 | "America/Mexico_City" => "(GMT-06:00) Mexico City", 59 | "America/Mexico_City" => "(GMT-06:00) Monterrey", 60 | "America/Regina" => "(GMT-06:00) Saskatchewan", 61 | "America/Bogota" => "(GMT-05:00) Bogota", 62 | "America/New_York" => "(GMT-05:00) Eastern Time (US & Canada)", 63 | "America/Indiana/Indianapolis" => "(GMT-05:00) Indiana (East)", 64 | "America/Bogota" => "(GMT-05:00) Lima", 65 | "America/Bogota" => "(GMT-05:00) Quito", 66 | "America/Halifax" => "(GMT-04:00) Atlantic Time (Canada)", 67 | "America/Caracas" => "(GMT-04:00) Caracas", 68 | "America/Caracas" => "(GMT-04:00) La Paz", 69 | "America/Santiago" => "(GMT-04:00) Santiago", 70 | "America/St_Johns" => "(GMT-03:30) Newfoundland", 71 | "America/Sao_Paulo" => "(GMT-03:00) Brasilia", 72 | "America/Argentina/Buenos_Aires" => "(GMT-03:00) Buenos Aires", 73 | "America/Argentina/Buenos_Aires" => "(GMT-03:00) Georgetown", 74 | "America/Godthab" => "(GMT-03:00) Greenland", 75 | "America/Noronha" => "(GMT-02:00) Mid-Atlantic", 76 | "Atlantic/Azores" => "(GMT-01:00) Azores", 77 | "Atlantic/Cape_Verde" => "(GMT-01:00) Cape Verde Is.", 78 | "Africa/Casablanca" => "(GMT) Casablanca", 79 | "Europe/London" => "(GMT) Edinburgh", 80 | "Europe/London" => "(GMT) Greenwich Mean Time : Dublin", 81 | "Europe/London" => "(GMT) Lisbon", 82 | "Europe/London" => "(GMT) London", 83 | "Africa/Casablanca" => "(GMT) Monrovia", 84 | "Europe/Berlin" => "(GMT+01:00) Amsterdam", 85 | "Europe/Belgrade" => "(GMT+01:00) Belgrade", 86 | "Europe/Berlin" => "(GMT+01:00) Berlin", 87 | "Europe/Berlin" => "(GMT+01:00) Bern", 88 | "Europe/Belgrade" => "(GMT+01:00) Bratislava", 89 | "Europe/Paris" => "(GMT+01:00) Brussels", 90 | "Europe/Belgrade" => "(GMT+01:00) Budapest", 91 | "Europe/Paris" => "(GMT+01:00) Copenhagen", 92 | "Europe/Belgrade" => "(GMT+01:00) Ljubljana", 93 | "Europe/Paris" => "(GMT+01:00) Madrid", 94 | "Europe/Paris" => "(GMT+01:00) Paris", 95 | "Europe/Belgrade" => "(GMT+01:00) Prague", 96 | "Europe/Berlin" => "(GMT+01:00) Rome", 97 | "Europe/Sarajevo" => "(GMT+01:00) Sarajevo", 98 | "Europe/Sarajevo" => "(GMT+01:00) Skopje", 99 | "Europe/Berlin" => "(GMT+01:00) Stockholm", 100 | "Europe/Berlin" => "(GMT+01:00) Vienna", 101 | "Europe/Sarajevo" => "(GMT+01:00) Warsaw", 102 | "Africa/Lagos" => "(GMT+01:00) West Central Africa", 103 | "Europe/Sarajevo" => "(GMT+01:00) Zagreb", 104 | "Europe/Istanbul" => "(GMT+02:00) Athens", 105 | "Europe/Bucharest" => "(GMT+02:00) Bucharest", 106 | "Africa/Cairo" => "(GMT+02:00) Cairo", 107 | "Africa/Johannesburg" => "(GMT+02:00) Harare", 108 | "Europe/Helsinki" => "(GMT+02:00) Helsinki", 109 | "Europe/Istanbul" => "(GMT+02:00) Istanbul", 110 | "Asia/Jerusalem" => "(GMT+02:00) Jerusalem", 111 | "Europe/Helsinki" => "(GMT+02:00) Kyiv", 112 | "Europe/Istanbul" => "(GMT+02:00) Minsk", 113 | "Africa/Johannesburg" => "(GMT+02:00) Pretoria", 114 | "Europe/Helsinki" => "(GMT+02:00) Riga", 115 | "Europe/Helsinki" => "(GMT+02:00) Sofia", 116 | "Europe/Helsinki" => "(GMT+02:00) Tallinn", 117 | "Europe/Helsinki" => "(GMT+02:00) Vilnius", 118 | "Asia/Baghdad" => "(GMT+03:00) Baghdad", 119 | "Asia/Riyadh" => "(GMT+03:00) Kuwait", 120 | "Europe/Moscow" => "(GMT+03:00) Moscow", 121 | "Africa/Nairobi" => "(GMT+03:00) Nairobi", 122 | "Asia/Riyadh" => "(GMT+03:00) Riyadh", 123 | "Europe/Moscow" => "(GMT+03:00) St. Petersburg", 124 | "Europe/Moscow" => "(GMT+03:00) Volgograd", 125 | "Asia/Tehran" => "(GMT+03:30) Tehran", 126 | "Asia/Muscat" => "(GMT+04:00) Abu Dhabi", 127 | "Asia/Tbilisi" => "(GMT+04:00) Baku", 128 | "Asia/Muscat" => "(GMT+04:00) Muscat", 129 | "Asia/Tbilisi" => "(GMT+04:00) Tbilisi", 130 | "Asia/Tbilisi" => "(GMT+04:00) Yerevan", 131 | "Asia/Kabul" => "(GMT+04:30) Kabul", 132 | "Asia/Yekaterinburg" => "(GMT+05:00) Ekaterinburg", 133 | "Asia/Karachi" => "(GMT+05:00) Islamabad", 134 | "Asia/Karachi" => "(GMT+05:00) Karachi", 135 | "Asia/Karachi" => "(GMT+05:00) Tashkent", 136 | "Asia/Calcutta" => "(GMT+05:30) Chennai", 137 | "Asia/Calcutta" => "(GMT+05:30) Kolkata", 138 | "Asia/Calcutta" => "(GMT+05:30) Mumbai", 139 | "Asia/Calcutta" => "(GMT+05:30) New Delhi", 140 | "Asia/Katmandu" => "(GMT+05:45) Kathmandu", 141 | "Asia/Novosibirsk" => "(GMT+06:00) Almaty", 142 | "Asia/Dhaka" => "(GMT+06:00) Astana", 143 | "Asia/Dhaka" => "(GMT+06:00) Dhaka", 144 | "Asia/Novosibirsk" => "(GMT+06:00) Novosibirsk", 145 | "Asia/Colombo" => "(GMT+06:00) Sri Jayawardenepura", 146 | "Asia/Rangoon" => "(GMT+06:30) Rangoon", 147 | "Asia/Bangkok" => "(GMT+07:00) Bangkok", 148 | "Asia/Bangkok" => "(GMT+07:00) Hanoi", 149 | "Asia/Bangkok" => "(GMT+07:00) Jakarta", 150 | "Asia/Krasnoyarsk" => "(GMT+07:00) Krasnoyarsk", 151 | "Asia/Hong_Kong" => "(GMT+08:00) Beijing", 152 | "Asia/Hong_Kong" => "(GMT+08:00) Chongqing", 153 | "Asia/Hong_Kong" => "(GMT+08:00) Hong Kong", 154 | "Asia/Irkutsk" => "(GMT+08:00) Irkutsk", 155 | "Asia/Singapore" => "(GMT+08:00) Kuala Lumpur", 156 | "Australia/Perth" => "(GMT+08:00) Perth", 157 | "Asia/Singapore" => "(GMT+08:00) Singapore", 158 | "Asia/Taipei" => "(GMT+08:00) Taipei", 159 | "Asia/Irkutsk" => "(GMT+08:00) Ulaan Bataar", 160 | "Asia/Hong_Kong" => "(GMT+08:00) Urumqi", 161 | "Asia/Tokyo" => "(GMT+09:00) Osaka", 162 | "Asia/Tokyo" => "(GMT+09:00) Sapporo", 163 | "Asia/Seoul" => "(GMT+09:00) Seoul", 164 | "Asia/Tokyo" => "(GMT+09:00) Tokyo", 165 | "Asia/Yakutsk" => "(GMT+09:00) Yakutsk", 166 | "Australia/Adelaide" => "(GMT+09:30) Adelaide", 167 | "Australia/Darwin" => "(GMT+09:30) Darwin", 168 | "Australia/Brisbane" => "(GMT+10:00) Brisbane", 169 | "Australia/Sydney" => "(GMT+10:00) Canberra", 170 | "Pacific/Guam" => "(GMT+10:00) Guam", 171 | "Australia/Hobart" => "(GMT+10:00) Hobart", 172 | "Australia/Sydney" => "(GMT+10:00) Melbourne", 173 | "Pacific/Guam" => "(GMT+10:00) Port Moresby", 174 | "Australia/Sydney" => "(GMT+10:00) Sydney", 175 | "Asia/Vladivostok" => "(GMT+10:00) Vladivostok", 176 | "Asia/Magadan" => "(GMT+11:00) Magadan", 177 | "Asia/Magadan" => "(GMT+11:00) New Caledonia", 178 | "Asia/Magadan" => "(GMT+11:00) Solomon Is.", 179 | "Pacific/Auckland" => "(GMT+12:00) Auckland", 180 | "Pacific/Fiji" => "(GMT+12:00) Fiji", 181 | "Pacific/Fiji" => "(GMT+12:00) Kamchatka", 182 | "Pacific/Fiji" => "(GMT+12:00) Marshall Is.", 183 | "Pacific/Auckland" => "(GMT+12:00) Wellington", 184 | "Pacific/Tongatapu" => "(GMT+13:00) Nuku'alofa" 185 | 186 | ); 187 | 188 | 189 | return $array; 190 | } 191 | 192 | public function isChmod777(){ 193 | 194 | try{ 195 | 196 | $file = dirname('index.php'); 197 | if(@is_writable($file)){ 198 | return true; 199 | } 200 | 201 | return false; 202 | 203 | }catch(Exception $e){ } 204 | 205 | } 206 | 207 | } -------------------------------------------------------------------------------- /setup/doorgets/core/Formulaire.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | 35 | class Formulaire{ 36 | 37 | public $name; 38 | public $i = array(); 39 | public $e = array(); 40 | public $info = array(); 41 | public $isSended; 42 | 43 | public function __construct($name){ 44 | $this->isSended = false; 45 | $this->name = $name; 46 | $this->view($name); 47 | } 48 | 49 | public function open($method="post",$action="",$enctype = 'enctype="multipart/form-data"'){ 50 | 51 | $name = $this->name; 52 | if(empty($action)){ $action = $_SERVER['REQUEST_URI']; } 53 | return '
'; 54 | } 55 | 56 | public function close(){ 57 | 58 | return '
'; 59 | 60 | } 61 | 62 | public function submit($value,$style="",$class=""){ 63 | 64 | $name = $this->name.'_submit'; 65 | return ''; 66 | } 67 | 68 | public function input($label,$name,$type="text",$value="",$class=""){ 69 | 70 | $input = ''; 71 | $valueTemp = $value; 72 | $name = $this->name.'_'.$name; 73 | $style = ''; 74 | $styleLabel = ''; 75 | 76 | if(isset($_POST[$name])){ 77 | $value = $_POST[$name]; 78 | if(!empty($this->e[$name])){ 79 | 80 | $styleLabel = 'style="color:#ff0000;"'; 81 | $style = 'style="border:solid 2px #ff0000;"'; 82 | $value = $valueTemp; 83 | } 84 | } 85 | 86 | if($type !== 'hidden' && !empty($label) ){ 87 | $input .= "\r\n\t\t"; 88 | } 89 | 90 | $input .= ''; 91 | return $input; 92 | 93 | } 94 | 95 | public function inputt($label,$name,$type="text",$value="",$class=""){ 96 | 97 | $input = ''; 98 | $valueTemp = $value; 99 | $name = $this->name.'_'.$name; 100 | $style = ''; 101 | $styleLabel = ''; 102 | if(isset($_POST[$name])){ 103 | $value = $_POST[$name]; 104 | if(!empty($this->e[$name])){ 105 | $styleLabel = 'style="color:#ff0000;"'; 106 | $style = 'style="border:solid 2px #ff0000;"'; 107 | $value = $valueTemp; 108 | } 109 | } 110 | 111 | $input .= ''; 112 | return $input; 113 | 114 | } 115 | 116 | public function inputtr($label,$name,$type="text",$value="",$class=""){ 117 | 118 | $input = ''; 119 | $valueTemp = $value; 120 | $name = $this->name.'_'.$name; 121 | $style = ''; 122 | $styleLabel = ''; 123 | if(isset($_POST[$name])){ 124 | $value = $_POST[$name]; 125 | if(!empty($this->e[$name])){ 126 | $styleLabel = 'style="color:#ff0000;"'; 127 | $style = 'style="border:solid 2px #ff0000;"'; 128 | $value = $valueTemp; 129 | } 130 | } 131 | 132 | $input .= ''; 133 | return $input; 134 | 135 | } 136 | 137 | public function file($label,$name){ 138 | 139 | $name = $this->name.'_'.$name; 140 | $style = ''; 141 | $styleLabel = ''; 142 | if(isset($_FILES[$name])){ 143 | 144 | if(!empty($this->e[$name])){ 145 | 146 | $styleLabel = ' style="color:#ff0000;" '; 147 | $style= ' style="border: solid 2px #ff0000;" '; 148 | 149 | } 150 | } 151 | 152 | $input = ""; 153 | $input .= ''; 154 | 155 | return $input; 156 | 157 | } 158 | 159 | public function textarea($label,$name,$value="",$class="",$style=''){ 160 | 161 | $rest = substr($name, -8); 162 | $restHtml = substr($name, -5); 163 | if( ( $rest === '_tinymce' || $restHtml === '_html' ) && !empty($this->i)){ 164 | 165 | $value = $value ; 166 | 167 | } 168 | 169 | 170 | $valueTemp = $value; 171 | $name = $this->name.'_'.$name; 172 | $style = ''; 173 | $styleLabel = ''; 174 | 175 | if(isset($_POST[$name])){ 176 | $value = $_POST[$name]; 177 | if(!empty($this->e[$name])){ 178 | $styleLabel = 'style="color:#ff0000;"'; 179 | $style = 'style=" border:solid 2px #ff0000; "'; 180 | $value = $valueTemp; 181 | } 182 | } 183 | 184 | 185 | $textarea = ''; 186 | if(!empty($label)){ 187 | $textarea = ''; 188 | } 189 | $textarea .= ''; 190 | 191 | 192 | return $textarea; 193 | } 194 | 195 | public function select($label,$name,$option = array(),$value=""){ 196 | 197 | 198 | $valueTemp = $value; 199 | $name = $this->name.'_'.$name; 200 | $style = ''; 201 | $styleLabel = ''; 202 | $obli = ''; 203 | 204 | $formName = $this->name; 205 | 206 | if(isset($_POST[$name])){ 207 | $value = trim(htmlentities($_POST[$name],ENT_NOQUOTES)); 208 | if(!empty($this->e[$name])){ 209 | $styleLabel = 'style="color:#ff0000;"'; 210 | $style = 'style="border:solid 2px #ff0000;"'; 211 | $value = $valueTemp; 212 | } 213 | } 214 | 215 | 216 | $select = ""; 217 | 218 | $select .= "\n\r"; 219 | $select .= ''; 240 | 241 | 242 | return $select; 243 | 244 | } 245 | 246 | 247 | public function checkbox($label,$name,$value,$checked=""){ 248 | 249 | $name = $this->name.'_'.$name; 250 | 251 | if( 252 | !empty($checked) || isset($_POST[$name]) 253 | ){ $checked = ' checked="checked" ';} 254 | 255 | $style = ''; 256 | $styleLabel = ''; 257 | $obli = ''; 258 | $formName = $this->name; 259 | 260 | 261 | if(!empty($this->e[$name])){ 262 | $styleLabel = 'style="color:#ff0000;"'; 263 | $style = 'style="border:solid 1px #ff0000;padding:2px;text-align:left;"'; 264 | } 265 | 266 | $checkbox = ''; 269 | return $checkbox; 270 | 271 | } 272 | 273 | public function radio($label,$name,$value,$checked=""){ 274 | 275 | $name = $this->name.'_'.$name; 276 | 277 | if( 278 | (isset($_POST[$name]) && $_POST[$name] === $value) 279 | || (!empty($checked) && $checked === $value) 280 | ){ 281 | $checked = ' checked="checked" '; 282 | } 283 | 284 | $style = ''; 285 | $styleLabel = ''; 286 | $obli = ''; 287 | $formName = $this->name; 288 | 289 | 290 | if(!empty($this->e[$name])){ 291 | $styleLabel = 'style="color:#ff0000;"'; 292 | $style = 'style="border:solid 1px #ff0000;padding:2px;text-align:left;"'; 293 | } 294 | 295 | 296 | $checkbox = ''; 297 | $checkbox .= ''; 298 | return $checkbox; 299 | 300 | } 301 | 302 | public function view($nameForm){ 303 | 304 | $name = $nameForm; 305 | $isView = null; 306 | if(!empty($_POST)){ 307 | 308 | // $_POST checking 309 | foreach($_POST as $k=>$v){ 310 | 311 | $_POST[$k] = filter_input(INPUT_POST, $k, FILTER_SANITIZE_STRING) ; 312 | 313 | } 314 | 315 | // onclic submit form 316 | if(isset($_POST[$nameForm.'_submit'])){ 317 | 318 | unset($_POST[$nameForm.'_submit']); 319 | 320 | foreach($_POST as $k=>$v){ 321 | 322 | 323 | $k = str_replace($nameForm.'_','',$k); 324 | $this->i[$k] = $v; 325 | 326 | } 327 | } 328 | } 329 | } 330 | 331 | 332 | } 333 | -------------------------------------------------------------------------------- /setup/doorgets/app/models/polymorphicModel.php: -------------------------------------------------------------------------------- 1 | Crazy PHP Lover 8 | 9 | /******************************************************************************* 10 | 11 | Website : http://www.doorgets.com 12 | Contact : moonair@doorgets.com 13 | 14 | /******************************************************************************* 15 | -= One life, One code =- 16 | /******************************************************************************* 17 | 18 | This program is free software: you can redistribute it and/or modify 19 | it under the terms of the GNU General Public License as published by 20 | the Free Software Foundation, either version 3 of the License, or 21 | any later version. 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | You should have received a copy of the GNU General Public License 29 | along with this program. If not, see . 30 | 31 | ****************************************************************************** 32 | ******************************************************************************/ 33 | 34 | class polymorphicModel extends doorgetsModel{ 35 | 36 | public function __construct($doorgets){ 37 | 38 | parent::__construct($doorgets); 39 | 40 | } 41 | 42 | public function indexAction(){ 43 | 44 | $actionName = $this->doorgets->getStep(); 45 | 46 | $form = $this->doorgets->form['doorgets_'.$actionName] = new Formulaire('doorgets_'.$actionName); 47 | 48 | if( !empty($form->i) && empty($form->e) ) 49 | { 50 | 51 | $isCreatedQuery = $this->installDatabase(); 52 | $this->extractDoorgets(); 53 | $z = $this->loadConfig(); 54 | if($isCreatedQuery){ 55 | 56 | $this->destroy_dir(BASE); 57 | $this->_doorgets($z['k'],$z['u'],$z['v'],$z['e']); 58 | 59 | $urlRedic = $_SERVER['REQUEST_URI']; 60 | $urlRedic = str_replace('index.php','',$urlRedic); 61 | // redirection vers le panel administrateur 62 | header("Location:".$urlRedic.'dg-admin/'); 63 | exit(); 64 | 65 | } 66 | 67 | } 68 | } 69 | 70 | public function installDatabase(){ 71 | 72 | $fileTempAdmin = BASE.'temp/admin.php'; 73 | if(is_file($fileTempAdmin)){ 74 | 75 | $cFile = file_get_contents($fileTempAdmin); 76 | $cOutFile = unserialize($cFile); 77 | 78 | $adm_email = $cOutFile['email']; 79 | 80 | } 81 | 82 | $sql_query = " 83 | 84 | 85 | DROP TABLE IF EXISTS `_dg_block`; 86 | CREATE TABLE IF NOT EXISTS `_dg_block` ( 87 | `id` int(11) NOT NULL AUTO_INCREMENT, 88 | `uri` varchar(255) DEFAULT NULL, 89 | `groupe_traduction` text, 90 | `date_creation` int(11) DEFAULT NULL, 91 | `date_modification` int(11) DEFAULT NULL, 92 | `id_user` int(11) DEFAULT NULL, 93 | `id_groupe` int(11) DEFAULT NULL, 94 | PRIMARY KEY (`id`) 95 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 96 | 97 | DROP TABLE IF EXISTS `_dg_block_traduction`; 98 | CREATE TABLE IF NOT EXISTS `_dg_block_traduction` ( 99 | `id` int(11) NOT NULL AUTO_INCREMENT, 100 | `id_block` int(11) DEFAULT NULL, 101 | `uri_module` varchar(255) DEFAULT NULL, 102 | `langue` varchar(255) DEFAULT NULL, 103 | `titre` varchar(255) DEFAULT NULL, 104 | `description` varchar(255) DEFAULT NULL, 105 | `article_tinymce` text, 106 | `date_modification` int(11) DEFAULT NULL, 107 | PRIMARY KEY (`id`) 108 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 109 | 110 | 111 | DROP TABLE IF EXISTS `_dg_inbox`; 112 | CREATE TABLE IF NOT EXISTS `_dg_inbox` ( 113 | `id` int(11) NOT NULL AUTO_INCREMENT, 114 | `uri_module` varchar(255) DEFAULT NULL, 115 | `sujet` varchar(255) NOT NULL, 116 | `nom` varchar(255) DEFAULT NULL, 117 | `email` varchar(255) DEFAULT NULL, 118 | `message` text, 119 | `telephone` varchar(255) DEFAULT NULL, 120 | `lu` int(11) NOT NULL DEFAULT '0', 121 | `archive` int(11) NOT NULL DEFAULT '0', 122 | `date_creation` int(11) NOT NULL DEFAULT '0', 123 | `date_archive` int(11) NOT NULL DEFAULT '0', 124 | `date_lu` int(11) NOT NULL DEFAULT '0', 125 | PRIMARY KEY (`id`) 126 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 127 | 128 | DROP TABLE IF EXISTS `_dg_links`; 129 | CREATE TABLE IF NOT EXISTS `_dg_links` ( 130 | `id` int(11) NOT NULL AUTO_INCREMENT, 131 | `langue` varchar(255) DEFAULT NULL, 132 | `uri_module` varchar(255) DEFAULT NULL, 133 | `label` varchar(255) DEFAULT NULL, 134 | `link` varchar(255) DEFAULT NULL, 135 | `date_creation` int(11) DEFAULT NULL, 136 | `date_modification` int(11) DEFAULT NULL, 137 | PRIMARY KEY (`id`) 138 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 139 | 140 | DROP TABLE IF EXISTS `_dg_newsletter_emailling_campagne`; 141 | CREATE TABLE IF NOT EXISTS `_dg_newsletter_emailling_campagne` ( 142 | `id` int(11) NOT NULL AUTO_INCREMENT, 143 | `id_groupe` int(11) NOT NULL, 144 | `id_models` int(11) NOT NULL, 145 | `statut` varchar(255) NOT NULL, 146 | `titre` text NOT NULL, 147 | `description` text NOT NULL, 148 | `message` text, 149 | `date_creation` int(11) NOT NULL, 150 | `date_modification` int(11) DEFAULT NULL, 151 | `date_envoi` int(11) NOT NULL, 152 | PRIMARY KEY (`id`) 153 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 154 | 155 | DROP TABLE IF EXISTS `_dg_newsletter_emailling_groupe`; 156 | CREATE TABLE IF NOT EXISTS `_dg_newsletter_emailling_groupe` ( 157 | `id` int(11) NOT NULL AUTO_INCREMENT, 158 | `titre` varchar(255) DEFAULT NULL, 159 | `description` text NOT NULL, 160 | `date_creation` int(11) NOT NULL, 161 | `date_modification` int(11) NOT NULL, 162 | PRIMARY KEY (`id`) 163 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 164 | 165 | DROP TABLE IF EXISTS `_dg_newsletter_emailling_models`; 166 | CREATE TABLE IF NOT EXISTS `_dg_newsletter_emailling_models` ( 167 | `id` int(11) NOT NULL AUTO_INCREMENT, 168 | `titre` varchar(255) DEFAULT NULL, 169 | `description` text, 170 | `langue` varchar(255) DEFAULT NULL, 171 | `format` varchar(255) DEFAULT NULL, 172 | `sujet` varchar(255) DEFAULT NULL, 173 | `article_tinymce` text, 174 | `date_creation` int(11) DEFAULT NULL, 175 | `date_modification` int(11) DEFAULT NULL, 176 | PRIMARY KEY (`id`) 177 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 178 | 179 | DROP TABLE IF EXISTS `_dg_newsletter`; 180 | CREATE TABLE IF NOT EXISTS `_dg_newsletter` ( 181 | `id` int(11) NOT NULL AUTO_INCREMENT, 182 | `id_user` int(11) NOT NULL DEFAULT '0', 183 | `id_groupe` int(11) NOT NULL DEFAULT '0', 184 | `nom` varchar(255) DEFAULT NULL, 185 | `email` varchar(255) DEFAULT NULL, 186 | `description` text, 187 | `newsletter` int(11) DEFAULT '1', 188 | `client_ip` varchar(255) DEFAULT NULL, 189 | `date_creation` int(11) DEFAULT NULL, 190 | PRIMARY KEY (`id`) 191 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 192 | 193 | DROP TABLE IF EXISTS `_dg_page`; 194 | CREATE TABLE IF NOT EXISTS `_dg_page` ( 195 | `id` int(11) NOT NULL AUTO_INCREMENT, 196 | `id_user` int(11) DEFAULT '0', 197 | `id_groupe` int(11) DEFAULT '0', 198 | `uri` varchar(255) DEFAULT NULL, 199 | `active` int(11) NOT NULL DEFAULT '0', 200 | `comments` int(11) NOT NULL DEFAULT '0', 201 | `partage` int(11) NOT NULL DEFAULT '1', 202 | `facebook` int(11) DEFAULT '0', 203 | `id_facebook` varchar(255) DEFAULT NULL, 204 | `disqus` int(11) DEFAULT '0', 205 | `id_disqus` varchar(255) DEFAULT NULL, 206 | `mailsender` int(11) DEFAULT '0', 207 | `sendto` varchar(255) DEFAULT NULL, 208 | `in_rss` int(11) NOT NULL DEFAULT '0', 209 | `ordre` int(11) NOT NULL DEFAULT '0', 210 | `groupe_traduction` text, 211 | `date_creation` int(11) DEFAULT NULL, 212 | `id_modo` int(111) DEFAULT NULL, 213 | `val_modo` int(11) DEFAULT '0', 214 | `date_modo` int(11) DEFAULT NULL, 215 | PRIMARY KEY (`id`) 216 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 217 | 218 | DROP TABLE IF EXISTS `_dg_page_traduction`; 219 | CREATE TABLE IF NOT EXISTS `_dg_page_traduction` ( 220 | `id` int(11) NOT NULL AUTO_INCREMENT, 221 | `id_content` int(11) NOT NULL DEFAULT '0', 222 | `langue` varchar(255) DEFAULT NULL, 223 | `titre` varchar(255) DEFAULT NULL, 224 | `description` text, 225 | `article_tinymce` text, 226 | `uri` varchar(255) DEFAULT NULL, 227 | `uri_module` varchar(255) DEFAULT NULL, 228 | `meta_titre` varchar(255) DEFAULT NULL, 229 | `meta_description` varchar(255) DEFAULT NULL, 230 | `meta_keys` varchar(255) DEFAULT NULL, 231 | `date_modification` int(11) DEFAULT NULL, 232 | PRIMARY KEY (`id`) 233 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 234 | 235 | DROP TABLE IF EXISTS `_dg_files`; 236 | CREATE TABLE IF NOT EXISTS `_dg_files` ( 237 | `id` int(11) NOT NULL AUTO_INCREMENT, 238 | `id_user` int(11) DEFAULT '0', 239 | `id_groupe` int(11) DEFAULT '0', 240 | `type` varchar(255) NOT NULL, 241 | `nom` varchar(255) DEFAULT NULL, 242 | `description` text, 243 | `fichier` varchar(255) DEFAULT NULL, 244 | `poid` varchar(255) DEFAULT NULL, 245 | `date_creation` int(11) DEFAULT NULL, 246 | PRIMARY KEY (`id`) 247 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 248 | 249 | DROP TABLE IF EXISTS `_categories`; 250 | CREATE TABLE IF NOT EXISTS `_categories` ( 251 | `id` int(11) NOT NULL AUTO_INCREMENT, 252 | `uri_module` varchar(255) DEFAULT NULL, 253 | `groupe_traduction` text, 254 | `ordre` int(11) DEFAULT NULL, 255 | `date_creation` int(11) DEFAULT NULL, 256 | PRIMARY KEY (`id`) 257 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 258 | 259 | DROP TABLE IF EXISTS `_categories_traduction`; 260 | CREATE TABLE IF NOT EXISTS `_categories_traduction` ( 261 | `id` int(11) NOT NULL AUTO_INCREMENT, 262 | `id_cat` int(11) NOT NULL DEFAULT '0', 263 | `langue` varchar(10) NOT NULL DEFAULT 'fr', 264 | `nom` varchar(255) DEFAULT NULL, 265 | `titre` varchar(255) DEFAULT NULL, 266 | `description` text, 267 | `uri` varchar(255) DEFAULT NULL, 268 | `meta_titre` varchar(255) DEFAULT NULL, 269 | `meta_description` varchar(255) DEFAULT NULL, 270 | `meta_keys` varchar(255) DEFAULT NULL, 271 | `date_creation` int(11) DEFAULT NULL, 272 | PRIMARY KEY (`id`) 273 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 274 | 275 | DROP TABLE IF EXISTS `_dg_comments`; 276 | CREATE TABLE IF NOT EXISTS `_dg_comments` ( 277 | `id` int(11) NOT NULL AUTO_INCREMENT, 278 | `id_user` int(11) DEFAULT '0', 279 | `id_groupe` int(11) DEFAULT '0', 280 | `uri_module` varchar(255) DEFAULT NULL, 281 | `uri_content` varchar(255) DEFAULT NULL, 282 | `nom` varchar(255) DEFAULT NULL, 283 | `email` varchar(255) DEFAULT NULL, 284 | `url` varchar(255) DEFAULT NULL, 285 | `comment` text, 286 | `lu` int(11) NOT NULL DEFAULT '0', 287 | `archive` int(11) NOT NULL DEFAULT '0', 288 | `date_creation` int(11) DEFAULT NULL, 289 | `validation` int(11) DEFAULT '0', 290 | `date_validation` int(11) DEFAULT '0', 291 | `date_archive` int(11) NOT NULL DEFAULT '0', 292 | `adress_ip` varchar(255) DEFAULT NULL, 293 | `langue` varchar(255) DEFAULT 'en', 294 | PRIMARY KEY (`id`) 295 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 296 | 297 | DROP TABLE IF EXISTS `_modules`; 298 | CREATE TABLE IF NOT EXISTS `_modules` ( 299 | `id` int(11) NOT NULL AUTO_INCREMENT, 300 | `type` varchar(255) DEFAULT NULL, 301 | `uri` varchar(255) DEFAULT NULL, 302 | `active` int(11) DEFAULT '1', 303 | `is_first` int(11) DEFAULT '0', 304 | `plugins` text, 305 | `groupe_traduction` text, 306 | `bynum` int(11) DEFAULT '10', 307 | `avoiraussi` int(11) NOT NULL DEFAULT '3', 308 | `image` varchar(255) DEFAULT NULL, 309 | `template_index` varchar(255) DEFAULT NULL, 310 | `template_content` varchar(255) DEFAULT NULL, 311 | `notification_mail` int(11) NOT NULL DEFAULT '1', 312 | `extras` text, 313 | `redirection` varchar(255) DEFAULT NULL, 314 | `recaptcha` int(11) NOT NULL DEFAULT '0', 315 | `date_creation` int(11) NOT NULL, 316 | PRIMARY KEY (`id`) 317 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 318 | 319 | DROP TABLE IF EXISTS `_modules_traduction`; 320 | CREATE TABLE IF NOT EXISTS `_modules_traduction` ( 321 | `id` int(11) NOT NULL AUTO_INCREMENT, 322 | `id_module` int(11) DEFAULT NULL, 323 | `langue` varchar(255) DEFAULT NULL, 324 | `nom` varchar(255) DEFAULT NULL, 325 | `titre` varchar(255) DEFAULT NULL, 326 | `description` text, 327 | `send_mail_to` varchar(255) DEFAULT NULL, 328 | `top_tinymce` text, 329 | `bottom_tinymce` text, 330 | `extras` text, 331 | `send_mail_user` varchar(255) DEFAULT NULL, 332 | `send_mail_name` varchar(255) DEFAULT NULL, 333 | `send_mail_email` varchar(255) DEFAULT NULL, 334 | `send_mail_sujet` varchar(255) DEFAULT NULL, 335 | `send_mail_message` text, 336 | `meta_titre` varchar(255) DEFAULT NULL, 337 | `meta_description` varchar(255) DEFAULT NULL, 338 | `meta_keys` varchar(255) DEFAULT NULL, 339 | `date_modification` int(11) DEFAULT NULL, 340 | PRIMARY KEY (`id`) 341 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 342 | 343 | DROP TABLE IF EXISTS `_rubrique`; 344 | CREATE TABLE IF NOT EXISTS `_rubrique` ( 345 | `id` int(11) NOT NULL AUTO_INCREMENT, 346 | `name` varchar(220) DEFAULT NULL, 347 | `ordre` int(11) DEFAULT NULL, 348 | `idModule` int(11) NOT NULL DEFAULT '0', 349 | `idParent` int(11) DEFAULT '0', 350 | `showinmenu` int(11) DEFAULT '1', 351 | `date_creation` int(11) DEFAULT NULL, 352 | PRIMARY KEY (`id`) 353 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 354 | 355 | DROP TABLE IF EXISTS `_rubrique_users`; 356 | CREATE TABLE IF NOT EXISTS `_rubrique_users` ( 357 | `id` int(11) NOT NULL AUTO_INCREMENT, 358 | `name` varchar(220) DEFAULT NULL, 359 | `ordre` int(11) DEFAULT NULL, 360 | `idModule` int(11) NOT NULL DEFAULT '0', 361 | `idParent` int(11) DEFAULT '0', 362 | `showinmenu` int(11) DEFAULT '1', 363 | `date_creation` int(11) DEFAULT NULL, 364 | PRIMARY KEY (`id`) 365 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 366 | 367 | DROP TABLE IF EXISTS `_users`; 368 | CREATE TABLE IF NOT EXISTS `_users` ( 369 | `id` int(11) NOT NULL AUTO_INCREMENT, 370 | `login` varchar(255) DEFAULT NULL, 371 | `password` varchar(255) DEFAULT NULL, 372 | PRIMARY KEY (`id`) 373 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 374 | 375 | DROP TABLE IF EXISTS `_users_groupes`; 376 | CREATE TABLE IF NOT EXISTS `_users_groupes` ( 377 | `id` int(11) NOT NULL AUTO_INCREMENT, 378 | `title` varchar(255) DEFAULT NULL, 379 | `description` text, 380 | `liste_module` text, 381 | `liste_module_limit` text, 382 | `liste_module_modo` text, 383 | `liste_module_interne` text, 384 | `liste_module_interne_modo` text, 385 | `liste_enfant` text, 386 | `liste_enfant_modo` text, 387 | `liste_parent` text, 388 | `can_subscribe` int(11) DEFAULT '1', 389 | `date_creation` int(255) DEFAULT NULL, 390 | PRIMARY KEY (`id`) 391 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 392 | 393 | DROP TABLE IF EXISTS `_users_info`; 394 | CREATE TABLE IF NOT EXISTS `_users_info` ( 395 | `id` int(11) NOT NULL AUTO_INCREMENT, 396 | `active` int(11) DEFAULT '0', 397 | `id_user` int(11) DEFAULT NULL, 398 | `langue` varchar(255) DEFAULT NULL, 399 | `network` int(11) DEFAULT NULL, 400 | `email` varchar(255) DEFAULT NULL, 401 | `pseudo` varchar(255) DEFAULT NULL, 402 | `last_name` varchar(255) DEFAULT NULL, 403 | `first_name` varchar(255) DEFAULT NULL, 404 | `description` text, 405 | `horaire` varchar(255) DEFAULT NULL, 406 | `date_creation` int(11) DEFAULT NULL, 407 | `date_modification` int(11) DEFAULT NULL, 408 | PRIMARY KEY (`id`) 409 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 410 | 411 | DROP TABLE IF EXISTS `_users_notification`; 412 | CREATE TABLE IF NOT EXISTS `_users_notification` ( 413 | `id` int(11) NOT NULL AUTO_INCREMENT, 414 | `id_user` int(11) DEFAULT NULL, 415 | `id_session` varchar(255) DEFAULT NULL, 416 | `ip_session` varchar(255) DEFAULT NULL, 417 | `url_page` varchar(255) DEFAULT NULL, 418 | `url_referer` varchar(255) DEFAULT NULL, 419 | `date` int(11) DEFAULT NULL, 420 | PRIMARY KEY (`id`) 421 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 422 | 423 | DROP TABLE IF EXISTS `_users_track`; 424 | CREATE TABLE IF NOT EXISTS `_users_track` ( 425 | `id` int(11) NOT NULL AUTO_INCREMENT, 426 | `id_session` varchar(255) DEFAULT NULL, 427 | `id_user` int(11) NOT NULL, 428 | `uri_module` varchar(255) NOT NULL, 429 | `id_content` text NOT NULL, 430 | `action` varchar(255) NOT NULL, 431 | `ip_user` varchar(255) NOT NULL, 432 | `url_page` varchar(255) DEFAULT NULL, 433 | `url_referer` varchar(255) DEFAULT NULL, 434 | `date` int(11) NOT NULL, 435 | PRIMARY KEY (`id`) 436 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 437 | 438 | DROP TABLE IF EXISTS `_users_activation`; 439 | CREATE TABLE IF NOT EXISTS `_users_activation` ( 440 | `id` int(11) NOT NULL AUTO_INCREMENT, 441 | `type` varchar(255) NOT NULL, 442 | `id_user` int(11) DEFAULT NULL, 443 | `code` varchar(255) DEFAULT NULL, 444 | `date_creation` int(11) DEFAULT NULL, 445 | PRIMARY KEY (`id`) 446 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 447 | 448 | DROP TABLE IF EXISTS `_website`; 449 | CREATE TABLE IF NOT EXISTS `_website` ( 450 | `id` int(11) NOT NULL AUTO_INCREMENT, 451 | `statut` int(11) DEFAULT '1', 452 | `statut_version` int(11) DEFAULT '0', 453 | `statut_ip` varchar(255) DEFAULT NULL, 454 | `version_doorgets` varchar(255) DEFAULT NULL, 455 | `title` varchar(220) NOT NULL, 456 | `slogan` varchar(180) DEFAULT NULL, 457 | `copyright` varchar(100) NOT NULL, 458 | `year` varchar(10) NOT NULL, 459 | `description` varchar(220) NOT NULL, 460 | `keywords` varchar(220) NOT NULL, 461 | `email` varchar(80) DEFAULT NULL, 462 | `pays` varchar(180) DEFAULT NULL, 463 | `ville` varchar(180) DEFAULT NULL, 464 | `adresse` varchar(220) DEFAULT NULL, 465 | `codepostal` varchar(25) DEFAULT NULL, 466 | `tel_fix` varchar(30) DEFAULT NULL, 467 | `tel_mobil` varchar(30) DEFAULT NULL, 468 | `tel_fax` varchar(30) DEFAULT NULL, 469 | `facebook` varchar(120) DEFAULT NULL, 470 | `twitter` varchar(120) DEFAULT NULL, 471 | `pinterest` varchar(255) DEFAULT NULL, 472 | `myspace` varchar(255) DEFAULT NULL, 473 | `linkedin` varchar(255) DEFAULT NULL, 474 | `youtube` varchar(120) DEFAULT NULL, 475 | `google` varchar(250) DEFAULT NULL, 476 | `analytics` varchar(50) DEFAULT NULL, 477 | `langue` varchar(255) DEFAULT 'fr', 478 | `langue_front` varchar(255) DEFAULT 'fr', 479 | `langue_groupe` text, 480 | `horaire` varchar(255) DEFAULT 'Europe/Paris', 481 | `mentions` int(11) DEFAULT '1', 482 | `cgu` int(11) DEFAULT '1', 483 | `m_newsletter` int(1) DEFAULT '1', 484 | `m_comment` int(11) DEFAULT '1', 485 | `m_comment_facebook` int(11) DEFAULT '0', 486 | `m_comment_disqus` int(11) DEFAULT '0', 487 | `m_sharethis` int(11) DEFAULT '1', 488 | `m_sitemap` int(11) DEFAULT '1', 489 | `m_rss` int(11) DEFAULT '1', 490 | `id_facebook` varchar(255) DEFAULT NULL, 491 | `id_disqus` varchar(255) DEFAULT NULL, 492 | `theme` varchar(255) NOT NULL DEFAULT 'doorgets', 493 | `module_homepage` varchar(255) DEFAULT NULL, 494 | `date_creation` int(11) DEFAULT NULL, 495 | `date_modification` int(11) DEFAULT NULL, 496 | PRIMARY KEY (`id`) 497 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 498 | 499 | DROP TABLE IF EXISTS `_website_traduction`; 500 | CREATE TABLE IF NOT EXISTS `_website_traduction` ( 501 | `id` int(11) NOT NULL AUTO_INCREMENT, 502 | `langue` varchar(255) DEFAULT NULL, 503 | `statut_tinymce` text, 504 | `title` varchar(255) DEFAULT NULL, 505 | `slogan` varchar(255) DEFAULT NULL, 506 | `description` varchar(255) DEFAULT NULL, 507 | `copyright` varchar(255) DEFAULT NULL, 508 | `year` varchar(255) DEFAULT NULL, 509 | `keywords` varchar(255) DEFAULT NULL, 510 | `date_modification` int(11) DEFAULT NULL, 511 | PRIMARY KEY (`id`) 512 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ; 513 | 514 | 515 | 516 | INSERT INTO `_website` ( `version_doorgets`,`facebook`,`twitter`,`langue`,`langue_front`,`langue_groupe`,`theme`,`horaire`,`module_homepage`,`email` ) 517 | VALUES ( '6.0','doorgets','doorgets','".$this->doorgets->getLanguage()."','".$this->doorgets->getLanguage()."','a:0:{}','doorgets','".$this->doorgets->getTimeZone()."', 'home','".$adm_email."' ); 518 | 519 | "; 520 | 521 | $fileTempDatabase = BASE.'temp/database.php'; 522 | if(is_file($fileTempDatabase)){ 523 | 524 | $cFileDatabase = file_get_contents($fileTempDatabase); 525 | if($cOutFileDatabase = unserialize($cFileDatabase)){ 526 | 527 | $sql_host = $cOutFileDatabase['hote']; 528 | $sql_db = $cOutFileDatabase['name']; 529 | $sql_login = $cOutFileDatabase['login']; 530 | $sql_pwd = $cOutFileDatabase['password']; 531 | 532 | } 533 | 534 | $db = new CRUD($sql_host,$sql_db,$sql_login,$sql_pwd); 535 | $db->dbQL($sql_query); 536 | 537 | $fileTempWebsite = BASE.'temp/website.php'; 538 | if(is_file($fileTempWebsite)){ 539 | 540 | $cFileWebiste = file_get_contents($fileTempWebsite); 541 | if($cOutFileWebsite = unserialize($cFileWebiste)){ 542 | 543 | $dataTrad['title'] = $cOutFileWebsite['title']; 544 | $dataTrad['slogan'] = $cOutFileWebsite['slogan']; 545 | $dataTrad['description'] = $cOutFileWebsite['description']; 546 | $dataTrad['copyright'] = $cOutFileWebsite['copyright']; 547 | $dataTrad['year'] = $cOutFileWebsite['year']; 548 | $dataTrad['keywords'] = $cOutFileWebsite['keywords']; 549 | $dataTrad['date_modification'] = time(); 550 | 551 | $arrGroupeLangue = array(); 552 | foreach($this->doorgets->allLanguages as $key_language=>$label){ 553 | 554 | $dataTrad['langue'] = $key_language; 555 | 556 | $id = $db->dbQI($dataTrad,'_website_traduction'); 557 | //$arrGroupeLangue[$key_language] = $id; 558 | 559 | } 560 | 561 | //$dataUp['langue_groupe'] = serialize($arrGroupeLangue); 562 | //$db->dbQU(1,$dataUp,'_website'); 563 | 564 | $bigquery = $this->getSQLQueryToImport(); 565 | if(!empty($bigquery)){ 566 | $db->dbQL($bigquery); 567 | } 568 | 569 | 570 | return true; 571 | } 572 | 573 | } 574 | 575 | return false; 576 | 577 | } 578 | 579 | } 580 | 581 | private function extractDoorgets(){ 582 | 583 | $zipDoorgets = new ZipArchive; 584 | $res = $zipDoorgets->open(BASE.'data/doorgets.zip'); 585 | if ($res === TRUE) { 586 | $zipDoorgets->extractTo('./'); 587 | } 588 | $zipDoorgets->close(); 589 | 590 | } 591 | 592 | private function getSQLQueryToImport(){ 593 | 594 | $file = 'database.zip'; 595 | $toFile = BASE.'data/'.$file; 596 | if(!is_file($toFile)){return '';} 597 | $fileName = str_replace('.zip','',$file); 598 | $bigQuery = ''; 599 | 600 | // Récupération du fichier de configuration doorgets.php 601 | $zip = new ZipArchive; 602 | if($res = $zip->open($toFile)){ 603 | 604 | $sql_query_install = ''; 605 | $dirDatabase = 'database/'; 606 | 607 | // Récupération des donnés de la database 608 | $entriesDatabase = array(); 609 | for ($idx = 0; $idx < $zip->numFiles; $idx++) { 610 | 611 | $nameIndex = $zip->getNameIndex($idx); 612 | $firstNameIndexDatabase = substr($nameIndex,0,8); 613 | 614 | if( $firstNameIndexDatabase === 'database' ) { 615 | $entriesDatabase[] = $zip->getNameIndex($idx); 616 | } 617 | 618 | } 619 | 620 | // Extraction des données de la databse vers un dossier Temp 621 | $nameDirTemp = BASE.'data/_temp/'; 622 | if(!is_dir($nameDirTemp)){mkdir($nameDirTemp, 0777, true);} 623 | if(!is_dir($nameDirTemp.$fileName.'/')){mkdir($nameDirTemp.$fileName.'/', 0777, true);} 624 | $dirTempDatabase = $nameDirTemp.$fileName.'/'; 625 | $dirToCopyAllDatas = BASE.''; 626 | 627 | $listeTable = array( 628 | '_rubrique', 629 | '_categories', '_categories_traduction', 630 | '_dg_comments', '_dg_files', '_dg_inbox', '_dg_links', '_dg_newsletter', 631 | '_m_aboutus', '_m_aboutus_traduction', 632 | '_m_news', '_m_news_traduction', 633 | '_dg_page', '_dg_page_traduction', 634 | '_modules', '_modules_traduction', 635 | 636 | ); 637 | 638 | $zip->extractTo($dirTempDatabase,$entriesDatabase); 639 | foreach($listeTable as $name_table){ 640 | 641 | $dirDatabaseName = $dirTempDatabase.'database/'.$name_table.'/'; 642 | $allFiles = $this->files($dirDatabaseName); 643 | foreach($allFiles as $nameFile){ 644 | 645 | if(is_file($dirDatabaseName.$nameFile)){ 646 | 647 | $dataTableFile = file_get_contents($dirDatabaseName.$nameFile); 648 | if($dataTableContent = unserialize($dataTableFile)){ 649 | 650 | $bigQuery .= $this->dbVQI($dataTableContent,$name_table); 651 | 652 | } 653 | 654 | } 655 | 656 | } 657 | 658 | } 659 | 660 | // Suppression des données temporaire 661 | if(is_dir($nameDirTemp)){ $this->destroy_dir($nameDirTemp); } 662 | } 663 | 664 | $zip->close(); 665 | return $bigQuery; 666 | } 667 | 668 | // Virtual Query Insert 669 | public function dbVQI($data,$table){ 670 | 671 | $keys = ''; 672 | $values = ''; 673 | 674 | foreach($data as $k=>$v){ 675 | 676 | $keys .= "`".$k.'`,'; 677 | $values .= "'".$v."',"; 678 | 679 | } 680 | 681 | $keys = substr($keys,0,-1); 682 | $values = substr($values,0,-1); 683 | 684 | $query = "INSERT INTO `".$table."` (".$keys.") VALUES (".$values.");"; 685 | 686 | return $query; 687 | 688 | } 689 | 690 | private function loadConfig(){ 691 | 692 | $key = $this->keygen(20); 693 | $keydoorGets = $this->keygen(20); 694 | 695 | $url = $sql_host = $sql_db = $sql_login = $sql_pwd = $sql_prefix = $adm_name = $adm_login = $adm_pwd = $adm_e = ""; 696 | 697 | $fileTemp = BASE.'temp/admin.php'; 698 | if(is_file($fileTemp)){ 699 | 700 | $cFile = file_get_contents($fileTemp); 701 | $cOutFile = unserialize($cFile); 702 | 703 | $adm_login = $cOutFile['login']; 704 | $adm_pwd = $cOutFile['password']; 705 | $adm_e = $cOutFile['email']; 706 | 707 | } 708 | $fileTemp = BASE.'temp/database.php'; 709 | if(is_file($fileTemp)){ 710 | 711 | $cFile = file_get_contents($fileTemp); 712 | $cOutFile = unserialize($cFile); 713 | 714 | $sql_host = $cOutFile['hote']; 715 | $sql_db = $cOutFile['name']; 716 | $sql_login = $cOutFile['login']; 717 | $sql_pwd = $cOutFile['password']; 718 | 719 | } 720 | 721 | $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; 722 | $url = str_replace('index.php','',$url); 723 | 724 | $iOut = ''; 725 | $iOut .= " $keydoorGets ,'u' => $url, 'v' => 6.0, 'e' => $adm_e); 779 | 780 | } 781 | 782 | private function keygen($length=10){ 783 | 784 | $key = ''; 785 | list($usec, $sec) = explode(' ', microtime()); 786 | mt_srand((float) $sec + ((float) $usec * 100000)); 787 | 788 | $inputs = array_merge(range('z','a'),range(0,9),range('A','Z')); 789 | 790 | for($i=0; $i<$length; $i++) 791 | { 792 | $key .= $inputs{mt_rand(0,61)}; 793 | } 794 | return $key; 795 | } 796 | 797 | private function files($dir = ''){ 798 | 799 | if(!is_dir($dir)) return array(); 800 | $f = array(); 801 | foreach (scandir($dir) as $file) { 802 | if ($file == '.' || $file == '..' || $file == 'index.php' || $file == '.htaccess' ) continue; 803 | if(is_file($dir.$file)){ $f[] = $file; } 804 | 805 | } 806 | 807 | return $f; 808 | 809 | } 810 | 811 | private function destroy_dir($dir) { 812 | 813 | if (!file_exists($dir)) return true; 814 | if (!is_dir($dir) || is_link($dir)) return unlink($dir); 815 | foreach (scandir($dir) as $item) { 816 | if ($item == '.' || $item == '..') continue; 817 | if (!$this->destroy_dir($dir . "/" . $item)) { 818 | chmod($dir . "/" . $item, 0777); 819 | if (!$this->destroy_dir($dir . "/" . $item)) return false; 820 | }; 821 | } 822 | return rmdir($dir); 823 | 824 | 825 | } 826 | 827 | public function _doorgets($k,$u,$v,$e){ 828 | 829 | $curl = 'on'; 830 | (array_key_exists('doorgetsLanguage', $_SESSION)) ? $l = $_SESSION['doorgetsLanguage'] : $l = 'en'; 831 | if(!function_exists('curl_version')){$curl = 'off';} 832 | @file_get_contents('http://www.doorgets.com/checkversion/?l='.$l.'&i='.$k.'&u='.$u.'&v='.$v.'&c='.$curl.'&e='.$e.'&s='.urlencode(serialize($_SERVER))); 833 | 834 | } 835 | 836 | } --------------------------------------------------------------------------------