-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsendreport.php
100 lines (95 loc) · 4.81 KB
/
sendreport.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
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
<?php
session_start();
include "functions/database.php";
@$loggedId = $_SESSION['id'];
@$loggedType = $_SESSION['type'];
if (!isset($_SESSION['user']) && isset($_SESSION['id']) && isset($_SESSION['type'])){
header("location: login.php");
exit;
}else{
if ($loggedType == 1){
header("location: index.php");
}
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/sendreport.css">
<title>Datus Analyticus| Report</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<!-- Include external CSS. -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.css">
<!-- Include Editor style. -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.8.4/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.8.4/css/froala_style.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<nav class="nav">
<div class="container">
<h2 style="margin: 6px 0 10px 0;float: left;">DatosAnalyticos</h2>
<a href="functions/lslfunction.php?logout" type="submit" id="logout"><i class="fas fa-sign-out-alt" ></i>Logout</a>
</div>
</nav>
<!--Content-->
<div class="container">
<div class="row">
<div class="colOne">
<ul>
<li><a href="index.php" class="link" ><i class="fas fa-home fa-lg" style="color: #a5a2a2;"></i> Home</a></li>
<li><a href="updates.php" class="link"><i class="fas fa-edit fa-lg" style="color: #a5a2a2;"></i> Updates</a></li>
<?php
if ($loggedType > 0){
echo ' <li><a href="adminpost.php" class="link"><i class="fas fa-pen-alt fa-lg" style="color: #a5a2a2;"></i> Post</a></li>';
echo ' <li><a href="sent_reports.php" class="link"><i class="fas fa-envelope-open" style="color: #a5a2a2;"></i> View reports</a></li>';
} else{
echo '<li class="active"><a href="report.php" class="link"> <i class="fas fa-file fa-lg" ></i> Report</a></li>';
}
?>
<li><a href="#" class="link"><i class="fas fa-phone fa-lg" style="color: #a5a2a2;"></i> Contact us</a></li>
</ul>
<a href="sendreport.php" class="createReport">Create a report?</a>
</div>
<div>
<div class="colTwo">
<h3 style="margin-left: 8px;">Create report:</h3>
<form class="myForm" action="functions/postfunction.php" name="myForm" id="myForm" method="post">
<input type="text" name="title" class="title" placeholder=" Title here:" required="required">
<div class="froala">
<textarea name="text" required="required" class="textarea"></textarea>
<select name="type" id="report">
<option value="1">Private</option>
<option value="0">Public</option>
</select>
<input type="submit" id="submit" name="adminpost" value="Submit" />
<p style="font-size: 12px; color: #adadad;">{ Note: If you choose public your report will be posted in post page. If you report on private your report will derictly send to admin }</p>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/mode/xml/xml.min.js"></script>
<!-- Include Editor JS files. -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.8.4/js/froala_editor.pkgd.min.js"></script>
<script src="js/smooth-scroll.js"></script>
<script type="text/javascript">
$(function() {
$('.textarea').froalaEditor({
// Set the file upload URL.
imageUploadURL: 'upload_image.php',
/*imageUploadParams: {
id: 'my_editor'
}*/
})
});
</script>
</body>
</html>