Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       Ryan Djurovich
8
 * @copyright       WebsiteBaker Org. e.V.
9
 * @link            http://websitebaker.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.3
12
 * @requirements    PHP 5.3.6 and higher
13
 * @version         $Id: signup_form.php 2 2017-07-02 15:14:29Z Manuela $
14
 * @filesource      $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/account/signup_form.php $
15
 * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
16
 *
17
 */
18

    
19
// Must include code to stop this file being access directly
20
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
21

    
22
$sCallingScript = WB_URL;
23
$redirect_url = ((isset($_SESSION['HTTP_REFERER']) && $_SESSION['HTTP_REFERER'] != '') ? $_SESSION['HTTP_REFERER'] : $sCallingScript );
24
$redirect_url = ( isset($redirect) && ($redirect!='') ? $redirect : $redirect_url);
25
require_once(WB_PATH.'/include/captcha/captcha.php');
26
/**
27
 * echo '<style type="text/css">';
28
 * include(WB_PATH .'/account/frontend.css');
29
 * echo "\n</style>\n";
30
 */
31

    
32
$error = array();
33
$success = array();
34

    
35
$sAddonName = basename(__DIR__);
36
if(file_exists(WB_PATH .'/'.$sAddonName.'/languages/EN.php')) {require(WB_PATH .'/'.$sAddonName.'/languages/EN.php');}
37
if(file_exists(WB_PATH .'/'.$sAddonName.'/languages/'.LANGUAGE .'.php')) {require(WB_PATH .'/'.$sAddonName.'/languages/'.LANGUAGE .'.php');}
38

    
39
if(isset($_POST['action']) && $_POST['action']=='send') {
40
    require(dirname(__FILE__).'/signup2.php');
41
}
42
if(sizeof($success)>0){
43
//$_SESSION['display_form'] = false;
44
?>
45
<p class="mod_preferences_success">
46
<?php
47
   foreach($success AS $value){ ?>
48
    <?php echo nl2br($value); ?>
49
<?php } ?>
50
</p>
51
<?php }
52

    
53
if($_SESSION['display_form']){
54
    if(sizeof($error)>0){
55
?>
56
    <p class="mod_preferences_error">
57
<?php
58
        echo implode('<br />', $error);
59
?>
60
    </p>
61
<?php }?>
62

    
63
    <div style="margin: 1em auto;">
64
        <button type="button" value="cancel" onclick="window.location = '<?php echo $redirect_url; ?>';"><?php print $TEXT['CANCEL'] ?></button>
65
    </div>
66
<?php if(!isset($display_form) || $display_form != false) { ?>
67
    <h1>&nbsp;<?php echo $TEXT['SIGNUP']; ?></h1>
68
    <form name="user" action="#" method="post" class="account">
69
        <?php echo $wb->getFTAN(); ?>
70
        <input type="hidden" name="action" value="send" />
71
        <input type="hidden" name="redirect" value="<?php echo $redirect_url; ?>" />
72
        <?php if(ENABLED_ASP) { // add some honeypot-fields
73
        ?>
74
        <div style="display:none;">
75
        <input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" />
76
        <p class="nixhier">
77
        email-address:
78
        <label for="email-address">Leave this field email-address blank:</label>
79
        <input id="email-address" name="email-address" size="60" value="" /><br />
80
        username (id):
81
        <label for="name">Leave this field name blank:</label>
82
        <input id="name" name="name" size="60" value="" /><br />
83
        Full Name:
84
        <label for="full_name">Leave this field full_name blank:</label>
85
        <input id="full_name" name="full_name" size="60" value="" /><br />
86
        </p>
87
        <?php } ?>
88
        </div>
89
        <table class="account">
90
            <tbody>
91
                <tr>
92
                    <td style="width: 180px;"><?php echo $TEXT['USERNAME']; ?>:</td>
93
                    <td class="value_input">
94
                        <input type="text" name="username" maxlength="30" style="width:300px;"/>
95
                    </td>
96
                </tr>
97
                <tr>
98
                    <td><?php echo $TEXT['DISPLAY_NAME']; ?>:</td>
99
                    <td class="value_input">
100
                        <input type="text" name="display_name" maxlength="255" style="width:300px;" />
101
                        <label> (<?php echo $TEXT['FULL_NAME']; ?>)</label>
102
                    </td>
103
                </tr>
104
                <tr>
105
                    <td><?php echo $TEXT['EMAIL']; ?>:</td>
106
                    <td class="value_input">
107
                        <input type="text" name="email" maxlength="255" style="width:300px;"/>
108
                    </td>
109
                </tr>
110
<?php
111
// Captcha
112
    if(ENABLED_CAPTCHA) {
113
?>
114
                <tr>
115
                    <td class="field_title"><?php echo $TEXT['VERIFICATION']; ?>:</td>
116
                    <td><?php call_captcha(); ?></td>
117
                </tr>
118
<?php
119
    }
120
?>
121
                <tr>
122
                    <td>&nbsp;</td>
123
                    <td>
124
                        <input type="submit" name="submit" value="<?php echo $TEXT['SIGNUP']; ?>" />
125
                        <input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" />
126
                    </td>
127
                </tr>
128
            </tbody>
129
        </table>
130
    </form>
131
    <br />
132
    &nbsp;
133
<?php
134
    }
135
}
(14-14/15)