-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnotesindex.php
More file actions
171 lines (167 loc) · 5.4 KB
/
notesindex.php
File metadata and controls
171 lines (167 loc) · 5.4 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
include 'header.php';
?>
<title>Notes</title>
<head>
<style>
.a
{
padding: 2px;
margin: 3px;
}
.mainn
{
margin-top: 0;color: white;
}
.b
{
min-width: 100px;
}
.x
{
background-image:linear-gradient(-90deg, rgba(1,2,234,0.5),rgba(256,1,0,0.5)) ;
}
.s
{
min-width: 400px;
border-radius: 5px;
min-height: 37px;
}
.k
{
min-height: 37px;
}
</style>
<!--upload notes-->
<div class="mainn">
<form class="form-group" action="db.php" method="post" enctype="multipart/form-data">
<div class="col-lg-12" style="background-image: url('images/blue.jpg');">
<div class="col-lg-6 col-lg-offset-3 " >
<h2 class="text-center"><strong> Notes Section</strong></h2>
<br>
<p style="color: red;display: block;font-weight: bold;"><?php echo isset($_GET['var'])?$_GET['var']:'';?></p>
<div class="col-lg-12">
<div class="col-lg-6">
<label class=""><h4><strong>Category Of Notes :</strong></h4></label>
</div>
<div class="col-lg-6">
<select name="select12" id="exampleFormControlSelect1" class="form-control a">
<option>Select Category type</option>
<option value="studymaterial">studymaterial(ppts)</option>
<option value="notes">Notes</option>
<option value="assignment">Assignment</option>
</select>
</div>
</div>
<br>
<div class="col-lg-12">
<div class="col-lg-6">
<label class=""><h4><strong>Select Your Branch :</strong></h4></label>
</div>
<div class="col-lg-6">
<select name="select1" id="exampleFormControlSelect1" class="form-control a">
<option>Select Branch</option>
<option value="cse">cse</option>
<option value="ece">ece</option>
<option value="it">it</option>
</select>
</div>
</div>
<br><br>
<div class="col-lg-12">
<div class="col-lg-6">
<label><h4><strong>Select Your Year :</strong></h4></label>
</div>
<div class="col-lg-6">
<select name="select2" id="exampleFormControlSelect1" class="form-control a">
<option>Select year and sem</option>
<option value="1-1">1-1</option>
<option value="1-2">1-2</option>
<option value="2-1">2-1</option>
<option value="2-2">2-2</option>
<option value="1-1">3-1</option>
<option value="1-2">3-2</option>
<option value="2-1">4-1</option>
<option value="2-2">4-2</option>
</select>
<br></div>
</div>
<br>
<div class="col-lg-12">
<div class="col-lg-6">
<label><h4><strong>Upload Notes :</strong></h4></label>
</div>
<div class="col-lg-6">
<input type="file" name="filew" >
</div>
<br><br><br><br>
<div class="col-lg-3 col-lg-offset-5">
<input type="submit" class="btn btn-block btn-primary" name="file" value="Upload">
<br>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="col-lg-12 ">
<hr>
<h2 class="text-center">All Notes</h2>
<div class="col-lg-6">
<hr>
<a href="?view=1" class="btn btn-primary btn-sm " >View notes</a>
</div>
<div class="col-lg-6 ">
<hr>
<input type="text " name="search" placeholder="Search notes by branch,sem,name..." class="s">
<button class="btn btn-default k" name ="sort" type="submit" >
<i class="glyphicon glyphicon-search"></i>
</button>
</div>
</div>
</form>
<div class="col-lg-6 col-lg-offset-3 text-center">
<hr>
<ul class="pagination">
<li><a href="?pageno=1">First</a></li>
<li class="<?php if($pageno <= 1){ echo 'disabled'; } ?>">
<a href="<?php if($pageno <= 1){ echo '#'; } else { echo "db.php?pageno=".($pageno - 1); } ?>">Prev</a>
</li>
<li class="<?php if($pageno >= $total_pages){ echo 'disabled'; } ?>">
<a href="<?php if($pageno >= $total_pages){ echo '#'; } else { echo "db.php?pageno=".($pageno + 1); } ?>">Next</a>
</li>
<li><a href="db.php?pageno=<?php echo $total_pages; ?>">Last</a></li>
</ul>
</div>
<br>
<?php
if(isset($_GET['view'])||isset($_GET['pageno'])||isset($_POST['sort'])){
while($row=mysqli_fetch_array($res1)){
?>
<div class="col-lg-6 well x">
<div class="col-lg-6 col-lg-offset-4 ">
<img src="https://img.icons8.com/cute-clipart/64/000000/file.png" class="img-responsive thumbnail" style="min-width: 100px;">
</div>
<div class="col-lg-12">
<?php
$v1=$row['name'];
$f=explode('/',$v1);
echo '<strong>File Name</strong>'.' : '.$f[1].'<br /><br>';
echo '<strong>Uploaded on</strong>'.' : '.$row['date'].'<br />';
echo '<strong>Category</strong>'.' : '.$row['category'].'<br />';
echo '<strong>Branch</strong>'.' : '.$row['branch'].'<br />';
echo '<strong>Year,sem</strong>'.' : '.$row['ys'].'<br />';
?>
<a href="<?php echo $row['name']; ?>" class="btn btn-info btn-sm" download>Download</a>
</div>
</div>
<?php
}
}
?>
</div>
<?php
include 'footer.php';
?>
</body>
</html>