HomeHelpTrac

source: tags/6.1/unregister.php @ 10242

Revision 10242, 2.5 KB checked in by Alexander Trofimov, 3 years ago (diff)

dolphin 6.1.5, initial commit

Line 
1<?
2
3/***************************************************************************
4*                            Dolphin Smart Community Builder
5*                              -----------------
6*     begin                : Mon Mar 23 2006
7*     copyright            : (C) 2006 BoonEx Group
8*     website              : http://www.boonex.com/
9* This file is part of Dolphin - Smart Community Builder
10*
11* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
12* http://creativecommons.org/licenses/by/3.0/
13*
14* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16* See the Creative Commons Attribution 3.0 License for more details.
17* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
18* see license.txt file; if not, write to marketing@boonex.com
19***************************************************************************/
20
21require_once( 'inc/header.inc.php' );
22require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
23require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
24
25// --------------- page variables and login
26
27$_page['name_index']    = 34;
28$_page['css_name']      = 'unregister.css';
29
30$logged['member'] = member_auth(0);
31
32$_page['header'] = _t("_Delete account");
33$_page['header_text'] = _t("_Delete account");
34
35// --------------- page components
36
37$_ni = $_page['name_index'];
38$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();
39
40
41// --------------- [END] page components
42
43PageCode();
44
45// --------------- page components functions
46
47/**
48 * page code function
49 */
50function PageCompPageMainCode()
51{
52    global $site;
53
54    if ( $_POST['DELETE'] )
55    {
56        profile_delete($_COOKIE['memberID']);
57
58        setcookie( 'memberID', $_COOKIE['memberID'], time() - 3600, '/' );
59        setcookie( 'memberPassword', $_COOKIE['memberPassword'], time() - 3600, '/' );
60
61        return "<center>"._t("_DELETE_SUCCESS")."<br />
62                <a href=\"$site[url]\">$site[title]</a></center>";
63    }
64
65
66    ob_start();
67
68    echo spacer(1,5);
69
70?>
71
72<table width="100%" cellpadding="4" cellspacing="4">
73    <td align="center" class="text2">
74        <form action="<? echo $_SERVER['PHP_SELF']; ?>" method="post">
75            <input type="hidden" name="DELETE" value="1">
76            <center>
77                <?= _t("_DELETE_TEXT"); ?><br /><br />
78                <input class="no" type="submit" value="<?= _t("_Delete account"); ?>">
79                <br />
80                <br />
81            </center>
82        </form>
83    </td>
84</table>
85
86<?php
87
88    $ret = ob_get_clean();
89
90    return $ret;
91}
92
93?>
Note: See TracBrowser for help on using the repository browser.