-
Notifications
You must be signed in to change notification settings - Fork 38
/
dbsetup.php
61 lines (51 loc) · 2.31 KB
/
dbsetup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
$menu_main = 'setup';
$menu_sub = 'createdb';
include_once('php-inc/settings.php');
include_once('php-inc/header.php');
?>
<!-- **********************************************************************************************************************************************************
MAIN CONTENT
*********************************************************************************************************************************************************** -->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="row">
<div class="col-lg-12 main-chart">
<?php
$dbcreds_path = "sql-connections/db-creds.inc";
if (!file_exists($dbcreds_path)) {
$btn_disabled = 'disabled';
?>
<div class="alert alert-danger"><b>Wait!</b> Your Configuration file is not present. Please click on <b>Configuration</b> link and create the file.</div>
<?php
}
else {
//including the Mysql connect parameters.
include_once("sql-connections/db-creds.inc");
}
?>
<div class="row mtbox">
<div class="col-md-12 col-sm-12 box0">
<div class="box1">
<h1>Setup / Reset Database For SQL Injection Labs</h1>
<p class="box-welcome-text"><a id="create-db" class="btn btn-success btn-lg <?php echo isset($btn_disabled)? $btn_disabled:'' ?>">Create/Reset Database</a></p>
</div>
</div>
</div>
<div class="row mtbox" id="sql-msg-section">
<div class="col-md-12 col-sm-12 box0">
<div id="sql-msg" class="box1">
sfgffg
</div>
</div>
</div>
</div><!-- /col-lg-9 END SECTION MIDDLE -->
</div><!--/row -->
</section>
</section>
<!--main content end-->
<div></div>
<?php
include_once('php-inc/footer.php');
?>