forked from shivangg66/ERP-Module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreport.php
More file actions
174 lines (168 loc) · 5.14 KB
/
report.php
File metadata and controls
174 lines (168 loc) · 5.14 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
172
173
174
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./css/all.css">
<style type = "text/css">
#filter{
height:380px;
width:340px;
margin:0
auto;
position:fixed;
z-index:10;
display:none;
border:5px solid #cccccc;
border-radius:10px;
background-color: #aaaaaa;
}
</style>
<script>
function filter()
{
document.getElementById("filter").style.display = "block";
}
</script>
</head>
<body onload="applyfilter();">
<?php
require('connection.php');
session_start();
$desig = $_SESSION['desig'];
$label = $_GET['label'];
$sap = $_SESSION["sapid"];
$dep = $_SESSION["dep"];
$tab = $_SESSION["tab"];
if($tab=='r'){
$query = "SELECT * FROM data WHERE sap_id = ".$sap." AND indexed= '".$label."'";
}
else if($tab=='tr')
{
$query1 = "SELECT * FROM login WHERE name= '".$label."'";
$result = mysqli_query($db,$query1);
while($row = mysqli_fetch_assoc($result))
{$sapid= $row['sap_id'];}
$query = "SELECT * FROM data WHERE sap_id = ".$sapid;
}
else if($tab=='d'){
$query = "SELECT * FROM data WHERE department='".$label."'";
}
$mon=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
?>
<h1>REPORT<h1>
<h3>Publications indexed in SCOPUS & above</h3>
<button style="float:left;" onclick="filter();">Filter</button>
<button style="float:right" onclick="window.print()">Print</button>
<br>
<br>
<div id="try">
</div>
<div style = "align:right;position:absolute; left:5%; top:23%" id ="filter">
<h3>Filter</h3>
Category:<select name = "category" id ="category">
<option value = "" select = "selected" name= "category" >Category</option>
<option value="Journal" >Journal</option>
<option value="Conference">Conference</option>
<option value="Book Chapter">Book Chapter</option>
<option value="Book">Book</option>
<option value="Magazine">Magazine</option>
<option value="News Paper">News Paper</option>
<option value="White Paper">White Paper</option>
<option value="Patent">Patent</option>
<option value="Transaction">Transaction</option>
</select><br><br>
Month:<select name="month" id="month">
<option value="" select="selected">Month</option>
<?php
foreach($mon as $month)
{
echo "<option value=\"$month\">".$month."</option>";
}
?>
</select><br><br>
Year:<input size="16" type="year" id ="year"><br><br>
Identifier:<select name="identifier" id="identifier">
<option value = "" select = "selected" name= "identifier" >Identifier</option>
<option value="ISSN">ISSN</option>
<option value="ISBN">ISBN</option>
<option value="ISSP">ISSP</option>
</select><br><br>
Indexed in:<select name="indexed" id="indexed">
<option value = "" select = "selected" name= "indexed" >Indexed In:</option>
<option value="SCI">SCI</option>
<option value="Scopus">Scopus</option>
<option value="eSCI">eSCI</option>
<option value="UGC Approved">UGC Approved</option>
<option value="Other">Other</option>
<option value="GOI Patent Office">GOI Patent Office</option>
<option value="International Patent Office">International Patent Office</option>
</select><br><br>
Remarks:<select name="remarks" id="remarks">
<option value = "" select = "selected" name= "remarks" >Remarks</option>
<option value="Submitted">Submitted</option>
<option value="Accepted">Accepted</option>
<option value="In-print">In-print</option>
<option value="Published">Published</option>
</select><br><br>
<input size="16" style="right:25%; position:absolute" type= "submit" name = "submit" onclick="applyfilter();" value = "Filter">
<input size="16" style="right:5%; position:absolute" type= "submit" name = "back" onclick="hide();" value = "Back">
</div>
<script>
function applyfilter()
{
var query = "<?php echo $query; ?>";
document.getElementById("filter").style.display = "none";
var name_element = document.getElementById("name")
if(name_element)
{
var name = document.getElementById("name").value;
if(name!='')
{
query=query.concat(" AND name= '"+name+"'");
}
}
var category = document.getElementById("category").value;
var month = document.getElementById("month").value;
var year = document.getElementById("year").value;
var identifier = document.getElementById("identifier").value;
var indexed = document.getElementById("indexed").value;
var remarks = document.getElementById("remarks").value;
if(category!="")
{
query=query.concat(" AND category = '"+category+"'");
}
if(month!="")
{
query=query.concat(" AND month = '"+month+"'");
}
if(year!="")
{
query=query.concat(" AND year = '"+year+"'");
}
if(identifier!="")
{
query=query.concat(" AND identifier = '"+identifier+"'");
}
if(indexed!="")
{
query=query.concat(" AND indexed = '"+indexed+"'");
}
if(remarks!="")
{
query=query.concat(" AND remarks = '"+remarks+"'");
}
var httprequest = new XMLHttpRequest();
httprequest.onreadystatechange = function(){
if (this.readyState == 4 && this.status == 200) {
document.getElementById("try").innerHTML = this.responseText;
}
};
httprequest.open("GET", "report1.php?q="+query, true);
httprequest.send();
}
function hide()
{
document.getElementById("filter").style.display = "none";
}
</script>
</body>
</html>