Skip to content

Commit a38bb7a

Browse files
authored
Merge pull request #4 from aakashrajput/master
Some Major Updates
2 parents dcbf4a6 + 4c1927e commit a38bb7a

File tree

382 files changed

+19729
-1654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+19729
-1654
lines changed

Admin/calendar.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,3 @@
110110
</div>
111111
</div>
112112
<?php include("./includes/footer.php"); ?>
113-

Admin/create_contest.php

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<?php include("./includes/header.php"); ?>
2+
<div class="main-panel">
3+
<!-- Navbar -->
4+
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
5+
<div class="container-fluid">
6+
<div class="navbar-wrapper">
7+
<div class="navbar-minimize d-inline">
8+
<button class="minimize-sidebar btn btn-link btn-just-icon" rel="tooltip" data-original-title="Sidebar toggle" data-placement="right">
9+
<i class="tim-icons icon-align-center visible-on-sidebar-regular"></i>
10+
<i class="tim-icons icon-bullet-list-67 visible-on-sidebar-mini"></i>
11+
</button>
12+
</div>
13+
<div class="navbar-toggle d-inline">
14+
<button type="button" class="navbar-toggler">
15+
<span class="navbar-toggler-bar bar1"></span>
16+
<span class="navbar-toggler-bar bar2"></span>
17+
<span class="navbar-toggler-bar bar3"></span>
18+
</button>
19+
</div>
20+
<a class="navbar-brand" href="javascript:void(0)">Dashboard</a>
21+
</div>
22+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-expanded="false" aria-label="Toggle navigation">
23+
<span class="navbar-toggler-bar navbar-kebab"></span>
24+
<span class="navbar-toggler-bar navbar-kebab"></span>
25+
<span class="navbar-toggler-bar navbar-kebab"></span>
26+
</button>
27+
<div class="collapse navbar-collapse" id="navigation">
28+
<ul class="navbar-nav ml-auto">
29+
<?php include("./includes/search.php"); ?>
30+
<?php include("./includes/notification.php"); ?>
31+
<?php include("./includes/settings.php"); ?>
32+
<li class="separator d-lg-none"></li>
33+
</ul>
34+
</div>
35+
</div>
36+
</nav>
37+
<div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
38+
<div class="modal-dialog" role="document">
39+
<div class="modal-content">
40+
<div class="modal-header">
41+
<input type="text" class="form-control" id="inlineFormInputGroup" placeholder="SEARCH">
42+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
43+
<i class="tim-icons icon-simple-remove"></i>
44+
</button>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
49+
50+
<div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
51+
<div class="modal-dialog" role="document">
52+
<div class="modal-content">
53+
<div class="modal-header">
54+
<input type="text" class="form-control" id="inlineFormInputGroup" placeholder="SEARCH">
55+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
56+
<i class="tim-icons icon-simple-remove"></i>
57+
</button>
58+
</div>
59+
</div>
60+
</div>
61+
</div>
62+
<!-- End Navbar -->
63+
<div class="content">
64+
<div class="col-md-8 ml-auto mr-auto">
65+
<h2 class="text-center">DevelopersCup Contest Creation</h2>
66+
<p class="text-center">A beautiful plugin, highly flexible tool build upon the foundations of progressive enhancement, that adds all of these advanced features to any HTML table. Handcrafted by our friends. Please check out the
67+
<a href="https://datatables.net/" target="_blank">full documentation.</a>
68+
</p>
69+
</div>
70+
<div class="col-md-12">
71+
<div class="card">
72+
<div class="card-header">
73+
<h4 class="card-title">Create Contest</h4>
74+
</div>
75+
<div class="card-body">
76+
<form name="form1" class="form-horizontal" method="POST" enctype="multipart/form-data">
77+
<?php
78+
if(isset($_POST['submit'])){
79+
//$author = $_POST['author'];
80+
$title = $_POST['title'];
81+
$intro = $_POST['intro'];
82+
$overview = $_POST['overview'];
83+
$reg_fees = $_POST['reg_fees'];
84+
$duration = $_POST['duration'];
85+
$date = time();
86+
if(empty($title)){
87+
$error_msg = "Title Field is blank";
88+
} else {
89+
$query = "INSERT INTO `contests` (`id`, `date`, `title`, `intro`, `overview`,`reg_fees`, `duration`,`status`) VALUES (NULL, '$date', '$title', '$intro','$overview', '$reg_fees', '$duration','Active')";
90+
if(mysqli_query($link,$query)){
91+
$msg = "post Added";
92+
//$category = "";
93+
} else {
94+
$error_msg = "Failed to Add";
95+
//print_r($errors);
96+
}
97+
}
98+
}
99+
?>
100+
<div class="row">
101+
<label class="col-sm-2 col-form-label">Contest Name</label>
102+
<div class="col-sm-10">
103+
<div class="form-group">
104+
<input type="text" class="form-control" name="title">
105+
<span class="form-text">A Valid name that can describe what type of contest you are creating.</span>
106+
</div>
107+
</div>
108+
</div>
109+
<div class="row">
110+
<label class="col-sm-2 col-form-label">Intro</label>
111+
<div class="col-sm-10">
112+
<div class="form-group">
113+
<input type="text" class="form-control" name="intro">
114+
</div>
115+
</div>
116+
</div>
117+
<div class="row">
118+
<label class="col-sm-2 col-form-label">Overview</label>
119+
<div class="col-sm-10">
120+
<div class="form-group">
121+
<textarea rows="4" class="ckeditor form-control form-control-alternative" name="overview">Write overview here...</textarea>
122+
</div>
123+
</div>
124+
</div>
125+
<div class="row">
126+
<label class="col-sm-2 col-form-label">Registration Fees</label>
127+
<div class="col-sm-4">
128+
<div class="form-group">
129+
<input type="text" class="form-control" name="reg_fees" placeholder="Enter the Registration fees.">
130+
</div>
131+
</div>
132+
<label class="col-sm-2 col-form-label">Duration</label>
133+
<div class="col-sm-4">
134+
<div class="form-group">
135+
<input type="text" class="form-control" name="duration" placeholder="Enter time in hours.">
136+
</div>
137+
</div>
138+
</div>
139+
<div class="col-xs-8">
140+
<input type="submit" name="submit" class="btn btn-primary" value="submit">
141+
<?php if(isset($error_msg)){
142+
echo "<span style='color:red;' class='pull-right'>$error_msg</span>";
143+
}else if(isset($msg)) {
144+
echo "<span style='color:green;' class='pull-right'>$msg</span>";
145+
}
146+
?>
147+
</div>
148+
</form>
149+
</div>
150+
</div>
151+
</div>
152+
<!-- end row -->
153+
</div>
154+
<?php include("./includes/footer.php"); ?>

0 commit comments

Comments
 (0)