-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquedit.php
105 lines (91 loc) · 4.12 KB
/
quedit.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
101
102
103
104
105
<?php
session_start();
include("vendor/autoload.php");
use App\question\question;
$obj = new question();
$data = $obj->show($_GET['quid']);
?>
<!DOCTYPE html>
<html>
<head>
<?php include("header.php") ?>
</head>
<body class="hold-transition skin-green sidebar-mini">
<div class="wrapper">
<?php include("navbar.php") ?>
<?php include("sidebar.php") ?>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<?php
if (isset($_SESSION['message'])) {
echo $_SESSION['message'];
unset ($_SESSION['message']);
}
?>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- /.col -->
<div class="col-md-8">
<div class="box box-info">
<div class="box-header">
<h3 class="box-title">Update or Edit Your Question
<small>in this section you can edit your Question</small>
</h3>
<!-- tools box -->
<div class="pull-right box-tools">
<button type="button" class="btn btn-info btn-sm" data-widget="collapse"
data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-info btn-sm" data-widget="remove"
title="Remove">
<i class="fa fa-times"></i></button>
</div>
<!-- /. tools -->
</div>
<!-- /.box-header -->
<div class="box-body pad">
<form action="views/question/update.php" method="post">
<input type="hidden" name="question_id" value="<?php echo $_GET['quid']; ?>">
<img class="img-responsive img-circle img-sm" src="<?php echo $data['photo']; ?>" alt="image">
<!-- .img-push is used to add margin to elements next to floating images -->
<div class="img-push">
<div style="padding-bottom: 10px;"
class="input-group input-group-sm">
<input type="text" name="title" value="<?php echo $data['title']; ?>"
placeholder="Enter your Question title"
class="form-control">
<span class="input-group-btn">
<i class="btn btn-info btn-flat">Title</i>
</span>
</div>
</div>
<textarea id="editor1" name="description" rows="10" cols="80" ">
<?php echo $data['description']; ?>
</textarea>
<div class="box-footer">
<a href="views/question/delete.php?101010101010101010101010101010="<?php echo $data['id']; ?> type="button" class="btn btn-default">Delete
</a>
<button type="submit" class="btn btn-info pull-right">Update</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<?php include("rightbar.php") ?>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include("footer.php") ?>
</div>
<!-- ./wrapper -->
</body>
</html>