Completed
Push — master ( 047121...54c8bf )
by Patrick
02:58 queued 01:25
created

reset.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2 View Code Duplication
if(strpos($_SERVER['REQUEST_URI'], '//') !== false)
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
3
{
4
    $uri = str_replace('//', '/', $_SERVER['REQUEST_URI']);
5
    header("Location: https://".$_SERVER["HTTP_HOST"].$uri);
6
    exit();
7
}
8
ini_set('display_errors', 1);
9
error_reporting(E_ALL);
10
require_once('class.ProfilesPage.php');
11
$page = new ProfilesPage('Burning Flipside Profiles Reset');
12
$page->addWellKnownJS(JS_BOOTBOX);
13
$page->addJS('js/reset.js');
14
15
if($page->user !== false && $page->user !== null)
16
{
17
    //User is logged in. They can reset their password...
18
    $page->body = '
19
        <div id="content">
20
            <h3>Burning Flipside Password Reset</h3>
21
            <div class="form-group">
22
                <label for="oldpass" class="col-sm-2 control-label">Current Password:</label>
23
                <div class="col-sm-10">
24
                    <input class="form-control" type="password" name="oldpass" id="oldpass" required/>
25
                </div>
26
            </div>
27
            <div class="clearfix visible-sm visible-md visible-lg"></div>
28
            <div class="form-group">
29
                <label for="newpass" class="col-sm-2 control-label">New Password:</label>
30
                <div class="col-sm-10">
31
                    <input class="form-control" type="password" name="newpass" id="newpass" required/>
32
                </div>
33
            </div>
34
            <div class="clearfix visible-sm visible-md visible-lg"></div>
35
            <div class="form-group">
36
                <label for="confirm" class="col-sm-2 control-label">Confirm Password:</label>
37
                <div class="col-sm-10">
38
                    <input class="form-control" type="password" name="confirm" id="confirm" required/>
39
                </div>
40
            </div>
41
            <div class="clearfix visible-sm visible-md visible-lg"></div>
42
            <button name="submit" class="btn btn-primary" onclick="change_password();">Change Password</button>
43
        </div>
44
    ';
45
}
46
else
47
{
48
    $page->body .= '
49
        <div id="content">
50
            <h3>Burning Flipside Login Reset/Recover</h3>
51
            <div class="radio">
52
                <label>
53
                    <input type="radio" name="forgot" value="user"/>
54
                    Forgot Username
55
                </label>
56
            </div>
57
            <div class="radio">
58
                <label>
59
                    <input type="radio" name="forgot" value="pass"/>
60
                    Forgot Password
61
                </label>
62
            </div>
63
            <div class="clearfix visible-sm visible-md visible-lg"></div>
64
            <button name="submit" class="btn btn-primary" onclick="what_did_they_forget();">Next</button>
65
        </div>';
66
}
67
68
$page->printPage();
69
// vim: set tabstop=4 shiftwidth=4 expandtab:
70