Completed
Push — master ( caf9a4...5ee189 )
by Ankit
03:27
created

index.php (2 issues)

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
3
require_once (__DIR__ . '/vendor/autoload.php');
4
use ChatApp\Session;
5
use Dotenv\Dotenv;
6
$dotenv = new Dotenv(__DIR__);
7
$dotenv->load();
8
9
// die("Hello");
0 ignored issues
show
Unused Code Comprehensibility introduced by
84% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
10 View Code Duplication
if(Session::get('start') != null)
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...
11
{
12
    header("Location:".getenv('APP_URL')."/views/account.php");
13
}
14
?>
15
  <!Doctype html>
16
  <html>
17
18
  <head>
19
    <title>Open Chat</title>
20
    <meta charset="utf-8">
21
    <meta name="viewport" content="width=device-width, initial-scale=1">
22
    <script type="text/javascript" src="public/assests/js/jquery-3.0.0.min.js"></script>
23
    <link rel="stylesheet" href="public/assests/css/bootstrap.min.css">
24
25
    <!-- Latest compiled JavaScript -->
26
    <script src="public/assests/js/bootstrap.min.js"></script>
27
    <style type="text/css">
28
      .navbar {
29
                border-radius: 0;
30
              }
31
              .heading {
32
                padding: 10px;
33
              }
34
            input {
35
              border-radius: 0px;
36
            }
37
    </style>
38
  </head>
39
40
  <body>
41
    <!-- Navbar -->
42
    <nav class="navbar navbar-inverse">
43
      <div class="container-fluid">
44
        <div class="navbar-header">
45
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
46
        <span class="icon-bar"></span>
47
        <span class="icon-bar"></span>
48
        <span class="icon-bar"></span>
49
      </button>
50
          <a class="navbar-brand" href="">OpenChat</a>
51
        </div>
52
        <div class="collapse navbar-collapse" id="myNavbar">
53
          <ul class="nav navbar-nav">
54
            <li class="active"><a href="#">Home</a></li>
55
          </ul>
56
          <ul class="nav navbar-nav navbar-right">
57
        <!--     <li><a href="#Register"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
58
            <li><a href="#Login"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> -->
59
          </ul>
60
        </div>
61
      </div>
62
    </nav>
63
64
    <!-- Main Body -->
65
    <div class="container"><br><br>
66
      <div class="row">
67
68
      <!-- Login -->
69
        <div class="col-sm-4 col-sm-offset-1">
70
          <div class="row">
71
            <div class="col-sm-12 text-center">
72
              <h2 class="heading">Login</h2>
73
            </div>
74
            <hr>
75
          </div>
76
          <form>
77
            <div class="form-group">
78
              <label for="login" id="loginLabel">Email or Username</label>
79
              <input type="text" name="login" id="login" class="form-control" placeholder="Email or Username">
80
            </div>
81
            <div class="form-group">
82
              <label for="passLogin" id="passLabelLogin">Password</label>
83
              <input type="password" name="passLogin" id="passLogin" class="form-control" placeholder="Password">
84
            </div>
85
            <button type="button" class="btn btn-success" onclick="loginCheck()" value="Login">Submit</button>
86
          </form>
87
        </div>
88
89
        <!-- Register -->
90
        <div class="col-sm-4 col-sm-offset-2">
91
          <div class="row">
92
            <div class="col-sm-12 text-center">
93
              <h2>Register</h2>
94
            </div>
95
            <hr>
96
          </div>
97
          <form>
98
            <div class="form-group">
99
              <label for="name" id="nameLabel">Your Name</label>
100
              <input type="text" name="name" class="form-control" id="name" placeholder="Name">
101
            </div>
102
            <div class="form-group">
103
              <label for="email" id="emailLabel">Email</label>
104
              <input type="email" name="email" id="email" class="form-control" placeholder="Email id">
105
            </div>
106
            <div class="form-group">
107
              <label id="userLabel">Username</label>
108
              <input type="text" name="username" id="username" class="form-control" placeholder="Username">
109
            </div>
110
            <div class="form-group">
111
              <label id="mobLabel">Mobile No.</label>
112
              <input type="text" name="mob" id="mob" class="form-control" placeholder="99******00">
113
            </div>
114
            <div class="form-group">
115
              <label for="passRegister" id="passLabelRegister">Password</label>
116
              <input type="password" name="passRegister" id="passRegister" class="form-control" class="form-control" placeholder="Password">
117
            </div>
118
            <button type="button" class="btn btn-success" onclick="registerCheck()" value="Register">Register</button>
119
          </form>
120
        </div>
121
      </div>
122
      <br><br><br>
123
    </div>
124
125
    <!-- Scripts -->
126
    <script type="text/javascript" src="public/assests/js/login_validate.js"></script>
127
    <script type="text/javascript" src="public/assests/js/register_validate.js"></script>
128
  </body>
129
130
131
  </html>