-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd-edit-quote.php
More file actions
166 lines (107 loc) · 3.65 KB
/
add-edit-quote.php
File metadata and controls
166 lines (107 loc) · 3.65 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
<?php include('header.php'); ?>
<?php //header?>
<link rel="stylesheet" href="date/jquery-ui.css">
<link rel="stylesheet" href="date/jquery-ui.css">
<script src="date/jquery-1.9.1.js"></script>
<script src="date/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
.btn33{
background-color:white;
border-radius:6px;
outline:none;
padding-top:5px;
padding-bottom:5px;
padding-left:15px;
padding-right:15px;
}
.btn33:hover{
background-color:#00aeef;
}
</style>
<script>
$(function() {
$( "#datepicker1" ).datepicker();
$( "#datepicker2" ).datepicker();
});
</script>
<tr>
<?php
if(!empty($_REQUEST['quote'])){
$sql="select * from tbl_quote where 1 and quote_id='$_REQUEST[quote]'";
$rec_quote=mysql_fetch_array(db_query($sql));
}
if(isset($_REQUEST['update'])){
$quote_date=date("Y-m-d",strtotime($quote_date));
$sql="update tbl_quote set quote_msg='$quote_msg',
quote_status='$quote_status'
where quote_id='$_REQUEST[quote]'
";
$res=db_query($sql);
if($res>0){
header("location:manage-quotes.php");
exit;
}
}
if(isset($_REQUEST['submit'])){
$quote_date=date("Y-m-d",strtotime($quote_date));
$sql="insert into tbl_quote set quote_msg='$quote_msg',
quote_status='$quote_status'
";
$res=db_query($sql);
if($res>0){
header("location:manage-quotes.php");
exit;
}
}
?>
<td valign="top" width="17%" style="border-right: #284c93 solid 3px; height:505px;" >
<?php include 'left-menu.php'; ?>
</td>
<td valign="top" width="83%">
<p class="b xlarge mt10px ml10px">Quote
<span class="fr mr10px b blue u" style="font-size:12px;"><a href="manage-quotes.php">Go Back</a></span>
</p>
<p class="bdr0 ml10px m5px mr30px"></p>
<form action="" method="post" enctype="multipart/form-data">
<table border="0" cellpadding="0" cellspacing="0" width="50%" align="center" class="mt20px bdrAll">
<tr>
<td width="27%" height="40px" colspan="2" align="center" style="background-color:#284c93;color:#FFFFFF;font-size:14px;"><p class="p5px ml10px b">Quote Detail</p></td>
</tr>
<?php /*?><tr>
<td width="27%"><p class="p5px ml10px b"> Date</p></td>
<td width="71%"><p class="p5px ml35px"><input type="text" name="quote_date" id="datepicker1" autocomplete="off" style="height:25px; width:220px;" value="<?=$rec_quote['quote_date']?>" /></p></td>
</tr>
<?php */?>
<tr>
<td width="36%"><p class="p5px ml10px b">Quote</p></td>
<td width="62%"><p class="p5px ml35px">
<textarea class="" required name="quote_msg" id="quote_msg" rows="5" cols="40"><?=$rec_quote['quote_msg']?></textarea></p></td>
</tr>
<tr>
<td width="27%"><p class="p5px ml10px b">Status</p></td>
<td width="71%" style="font-weight:bold"><p class="p5px ml35px">
<input type="radio" required name="quote_status" value="Active" <?php if($rec_quote['quote_status']=='Active'){?> checked="checked"<?php }?> />Active
<input type="radio" required name="quote_status" value="Inactive" <?php if($rec_quote['quote_status']=='Inactive'){?> checked="checked"<?php }?> />Inactive
</p></td>
</tr>
<tr>
<td colspan="3"><p class="ac p5px"><span class="ml10px">
<?php if(!empty($_REQUEST['quote'])){ ?>
<input type="submit" name="update" value="Update" class="btn33" />
<?php }else{?>
<input type="submit" name="submit" value="Submit" class="btn33" />
<?php }?>
</span>
<span class="ml10px"><input type="reset" name="reset" value="Reset" class="btn33" /></span>
</p></td>
</tr>
</table>
</form>
<p> </p>
</td>
</tr>
</table>
<?php include 'footer.php'; ?>
</body>
</html>