| Revision 15211,
1.8 KB
checked in by Alexander Trofimov, 12 months ago
(diff) |
|
Code cleaning:
- converting new lines to \n
- deleting spaces at the end of every line
- converting all tabs to 4 spaces
- automated script for future cleaning was added
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * @package Dolphin Core |
|---|
| 4 | * @copyright Copyright (c) BoonEx Pty Limited - http://www.boonex.com/ |
|---|
| 5 | * @license CC-BY - http://creativecommons.org/licenses/by/3.0/ |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | require_once('./inc/header.inc.php'); |
|---|
| 9 | require_once(BX_DIRECTORY_PATH_INC . "languages.inc.php"); |
|---|
| 10 | require_once(BX_DIRECTORY_PATH_INC . "params.inc.php"); |
|---|
| 11 | require_once(BX_DIRECTORY_PATH_INC . "design.inc.php"); |
|---|
| 12 | |
|---|
| 13 | member_auth(0); |
|---|
| 14 | |
|---|
| 15 | $oTemplate = BxDolTemplate::getInstance(); |
|---|
| 16 | $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT); |
|---|
| 17 | $oTemplate->setPageHeader (_t("_Delete account")); |
|---|
| 18 | $oTemplate->setPageContent ('page_main_code', PageCompPageMainCode()); |
|---|
| 19 | |
|---|
| 20 | PageCode(); |
|---|
| 21 | |
|---|
| 22 | /** |
|---|
| 23 | * page code function |
|---|
| 24 | */ |
|---|
| 25 | function PageCompPageMainCode() { |
|---|
| 26 | |
|---|
| 27 | if (bx_get('DELETE')) { |
|---|
| 28 | require_once(BX_DIRECTORY_PATH_INC . "admin.inc.php"); |
|---|
| 29 | profile_delete(getLoggedId()); |
|---|
| 30 | bx_logout(); |
|---|
| 31 | return MsgBox(_t("_DELETE_SUCCESS")); |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | $aForm = array( |
|---|
| 35 | 'form_attrs' => array ( |
|---|
| 36 | 'action' => BX_DOL_URL_ROOT . 'unregister.php', |
|---|
| 37 | 'method' => 'post', |
|---|
| 38 | 'name' => 'form_unregister' |
|---|
| 39 | ), |
|---|
| 40 | |
|---|
| 41 | 'inputs' => array( |
|---|
| 42 | 'delete' => array ( |
|---|
| 43 | 'type' => 'hidden', |
|---|
| 44 | 'name' => 'DELETE', |
|---|
| 45 | 'value' => '1', |
|---|
| 46 | ), |
|---|
| 47 | 'info' => array( |
|---|
| 48 | 'type' => 'custom', |
|---|
| 49 | 'content' => _t("_DELETE_TEXT"), |
|---|
| 50 | 'colspan' => true, |
|---|
| 51 | ), |
|---|
| 52 | 'submit' => array ( |
|---|
| 53 | 'type' => 'submit', |
|---|
| 54 | 'name' => 'submit', |
|---|
| 55 | 'value' => _t("_Delete account"), |
|---|
| 56 | ), |
|---|
| 57 | ), |
|---|
| 58 | ); |
|---|
| 59 | bx_import('BxTemplFormView'); |
|---|
| 60 | $oForm = new BxTemplFormView($aForm); |
|---|
| 61 | return DesignBoxContent(_t("_Delete account"), $oForm->getCode(), BX_DB_PADDING_DEF); |
|---|
| 62 | } |
|---|
| 63 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.