-
Notifications
You must be signed in to change notification settings - Fork 0
/
tabs.php
429 lines (407 loc) · 24.5 KB
/
tabs.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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<?php
include_once("config.php");
if(isset($_GET['mm'])){
$id = $_GET['mm'];
$sql = "DELETE FROM bigapp WHERE id=".$id;
if (mysqli_query($con, $sql)) {
echo "record deleted successfully";
//header("Refresh:0");
}
}
if(isset($_POST['brands'])){
$brands = $_POST['brands'];
$min_number = $_POST['min_number'];
$max_number = $_POST['max_number'];
$min_amount = $_POST['min_amount'];
$max_amount = $_POST['max_amount'];
$brand_ids = implode(",",$brands);
$sql = "INSERT INTO bigapp (brand_id, min_number, max_number, min_amount, max_amount, status) VALUES ('$brand_ids', '$min_number', '$max_number', '$min_amount', '$max_amount', 1)";
if (mysqli_query($con, $sql)) {
echo "New record created successfully";
//header("Refresh:0");
}
}
if(isset($_POST['min'])){
$sql = "INSERT IGNORE INTO bigapp (brand_id, min_number, max_number, min_amount, max_amount, status,) VALUES ('$brand_ids', '$min_number', '$max_number', '$min_amount', '$max_amount', $status)";
if (mysqli_query($con, $sql)) {
echo "New record created successfully";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
</head>
<body>
<div class="product-wrapper-container">
<div class="wrap">
<div class="container">
<ul class="tabs">
<li class="tab-link current" data-tab="tab-2">Product</li>
<!-- <li class="tab-link" data-tab="tab-3">Group</li>
<!-- <li class="tab-link" data-tab="tab-4">Messages</li>
<li class="tab-link" data-tab="tab-4">Preferences</li>
<li class="tab-link" data-tab="tab-4">Help</li> -->
</ul>
<div id="tab-2" class="tab-content current">
<div class="product-container">
<p><b> Brand Limits</b></p>
<p>Product limits are the minimum and maximum quantity for individual brands that your customers may add to their cart. </p>
<div class="inline-toolbox">
<div class="toolbar">
<div class="Click-here"><button>Add Brand</button></div>
<div class="custom-model-main">
<div class="custom-model-inner">
<div class="close-btn">×</div>
<div class="custom-model-wrap">
<form method="post" action="#">
<div class="pop-up-content-wrap">
<h5>Select Brands</h5>
<div class="search-content">
<div class="search">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M8 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm9.707 4.293-4.82-4.82a5.968 5.968 0 0 0 1.113-3.473 6 6 0 0 0-12 0 6 6 0 0 0 6 6 5.968 5.968 0 0 0 3.473-1.113l4.82 4.82a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414z"></path></svg>
<!-- <input type="text" name="" placeholder="Type to search"> -->
<select required name="brands[]" class="form-control js-example-placeholder-multiple" multiple="multiple">
<?php
$brand_array = [];
foreach ($bc_products as $bc_key => $product) {
$brand_array[$product->id] = $product->name;?>
<option value="<?php echo $product->id;?>"><?php echo $product->name;?></option>
<?php }
?>
</select>
</div>
<!-- END SEARCH -->
</div>
<!-- END SEARCH-CONTENT -->
<div class="image-checkbox">
<ul>
<li>
<input required name="min_number" type="text" placeholder="min_number">
</li>
<li>
<input required name="max_number" type="text" placeholder="max_number">
</li>
<li>
<input required name="min_amount" type="text" placeholder="min_amount">
</li>
<li>
<input required name="max_amount" type="text" placeholder="max_amount">
</li>
</ul>
</div>
<!-- END IMAGE-CHECKBOX -->
<div class="product-select-bottom">
<!-- <div class="stack">
<p>0 products selected</p>
</div> -->
<!-- END STACK -->
<div class="product-btn-container">
<button><a href="">Cancel</a></button>
<button type="submit">select</button>
</div>
</form>
<!-- END PRODUCT-BTN-CONTAINER -->
</div>
<!-- end product-select-bottom -->
</div>
<!-- END POP-UP-CONTENT-WRAP -->
</div>
<!-- end custom-model-wrap -->
</div>
<!-- end custom-model-inner -->
<div class="bg-overlay"></div>
</div>
<!-- end custom-model-main -->
<!-- <div class="add-button"><button>Add SKU</button></div>
<div class="csv-button"><button>Add By CSV</button></div> -->
<div class="csv-model-main">
<div class="csv-model-inner">
<div class="close-btn">×</div>
<div class="csv-model-wrap">
<div class="csv-pop-up-content-wrap">
Content Here
</div>
</div>
<!-- end custom-model-wrap -->
</div>
<!-- end custom-model-inner -->
<div class="bg-overlay"></div>
</div>
<!-- END CUSTOM-MODEL-MAIN -->
</div>
<!-- END TOOLBAR -->
<div class="search-container">
<div class="search-box">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M8 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm9.707 4.293-4.82-4.82a5.968 5.968 0 0 0 1.113-3.473 6 6 0 0 0-12 0 6 6 0 0 0 6 6 5.968 5.968 0 0 0 3.473-1.113l4.82 4.82a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414z"></path></svg>
<input type="text" name="" placeholder="Type to search">
</div>
</div>
<!-- END SEARCH-CONTAINER -->
</div>
<!-- END INLINE-TOOLBOX -->
<div class="product-table">
<div class="product-content">
<table id="customers" class="Condition">
<!-- <tr class="product-left">
<p>Product</p>
</tr> -->
<!-- END PRODUCT-LEFT -->
<thead >
<tr class="add-sku-container">
<th>Brands</th>
<th>Min quantity</th>
<th>Max quantity</th>
<th>Min amount</th>
<th>Max amount</th>
<th>Remove</th>
<!-- END UL -->
</tr></thead>
<!-- END PRODUCT-RIGHT -->
</div>
<form name="deleteform" method="post" action="#">
<?php
$empQuery = "select * from bigapp WHERE 1=1";
//var_dump( $empQuery);die;
$empRecords = mysqli_query($con, $empQuery);
while ($order = mysqli_fetch_assoc($empRecords)) {
$brand_ids = explode(",",$order['brand_id']);
$brand_name_array = array();
foreach($brand_ids as $brandID){
$brand_name_array[] = $brand_array[$brandID];
}
$brand_name = implode(",", $brand_name_array);?>
<!-- END PRODUCT-CONTENT -->
<input type="hidden" name="brand_id" value="<?php echo $order['id']?>">
<tr class="add-sku-container">
<td>
<?php echo $brand_name?>
</td>
<!-- END SKU-LEFT -->
<td><?php echo $order['min_number']?></td>
<td><?php echo $order['max_number']?></td>
<td><?php echo $order['min_amount']?></td>
<td><?php echo $order['max_amount']?></td>
<!-- END ADD-SKU-RIGHT -->
<td class="add-remove">
<a href="https://store-sligwemgi.mybigcommerce.com/manage/app/43319?mm=<?php echo $order['id']?>" class="close-remove">×</a>
</td>
</tr>
<!-- END ADD-SKU-CONTAINER -->
<?php }?></form>
</table>
</div>
<!-- END PRODUCT-TABLE -->
</div>
<!-- END PRODUCT-CONTAINER -->
</div>
<!-- END TAB-CONTENT -->
<div id="tab-3" class="tab-content">
<div class="group-container">
<p><b>What are Group Limits?</b></p>
<p>Group limits are limit rules you set that apply across more than one item. You can categorize your items based on a common keyword in product titles, types, handles, variant titles, SKU, collection, tag or by similar price. Please read more tips in this article.</p>
<div class="add-row">
<div class="group-left">
<div class="add-group-section">
<button>add group</button>
<nav id="top-nav-menu">
<ul class="">
<li class="dropdown-select"><a href="#"> <span>♦</span> </a>
<ul class="dropdown-menu">
<li><a href="#">Add generic group</a></li>
<li><a href="#">Add SKU List group</a></li>
<li><a href="#">Select profile products</a></li>
</ul>
<!-- END DROPDOWN-MENU -->
</li>
</ul>
</nav>
<!-- END TOP-NAV-MENU -->
</div>
<!-- END ADD-GROUP-SECTION -->
<div class="add-link-btn">
<div class="box">
<!-- <a class="add-button" href="#csv-popup1"><button>Add By CSV</button></a> -->
</div>
<div id="csv-popup1" class="overlay">
<div class="popup-container">
<h3>CSV Input</h3>
<a class="close" href="#">×</a>
<div class="column-csv">
<div class="group">
<div class="pro-select">
<label>Group by</label>
<select>
<option>product type</option>
<option>Condition Set</option>
<option>Collection</option>
<option>Customer Tag</option>
<option>Description</option>
<option>Price</option>
<option>Product</option>
<option>Product Tag</option>
<option>Product Title</option>
<option>Product Handle</option>
<option>Vendor</option>
<option>Variant Title</option>
<option>SKU</option>
<option>Weight in grams</option>
</select>
</div>
<!-- END PRO-SELECT -->
<div class="equal-select">
<select>
<option>equal to</option>
<option>containing</option>
<option>not containing</option>
<option>not equal to</option>
<option>equal one of</option>
<option>not one of</option>
</select>
</div>
<!-- END EQUAL-SELECT -->
</div>
<!-- END GROUP -->
<div class="form-inline">
<label>CSV Columns: </label>
<span><code>Filter</code>, </span>
<span><code>Title</code>, </span>
<span><code>Min</code>, </span>
<span><code>Max</code>, </span>
<span><code>Multiple</code></span>
</div>
<!-- end form-inline -->
<div class="form-group">
<textarea class="form-control"></textarea>
</div>
<!-- end form-group -->
</div>
<!-- END COLUMN-CSV -->
<div class="popup-bottom-row">
<button class="cancel-btn">cancel</button>
<button class="add-btn">Add</button>
</div>
<!-- end popup-bootom-row -->
</div>
<!-- END POPUP-CONTAINER -->
</div>
<!-- END CSV-POPUP1 -->
</div>
<!-- END ADD-LINK-BTN -->
</div>
<!-- END GROUP-LEFT -->
<div class="group-right">
<div class="search-container">
<div class="search-box">
<svg viewBox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M8 12a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm9.707 4.293-4.82-4.82a5.968 5.968 0 0 0 1.113-3.473 6 6 0 0 0-12 0 6 6 0 0 0 6 6 5.968 5.968 0 0 0 3.473-1.113l4.82 4.82a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414z"></path></svg>
<input type="text" name="" placeholder="Type to search">
</div>
<!-- END SEARCH-BOX -->
</div>
<!-- END SEARCH-CONTAINER" -->
</div>
<!-- END GROUP-RIGHT -->
</div>
<!-- END ADD-ROW -->
<div class="drag-container">
<div class="group-limit">
<button class="close-icon"><span class="Button__Text">×</span></button>
<div class="product-selector">
<div class="price-selection">
<div class="price-wrap">
<label>Group by</label>
<div class="price-box">
<select>
<option>Condition Set</option>
<option>Customer Tag</option>
<option>Description</option>
<option>Price</option>
<option>Product</option>
<option>Product Tag</option>
<option>Product Title</option>
<option>Product Type</option>
<option>Product Handle</option>
<option>Vendor</option>
<option>Variant Title</option>
<option>Weight in grams</option>
</select>
</div>
<!-- END PRICE-BOX -->
</div>
<!-- END PRICE-WRAP -->
</div>
<!-- END PRICE-SELECTION -->
<div class="equal-section">
<select>
<option>equal to</option>
<option>not equal to</option>
<option>greater than</option>
<option>less than</option>
<option>between</option>
</select>
</div>
<!-- END EQUAL-SECTION -->
<div class="price-input-connect">
<input type="text" name="" value="0.0">
</div>
<!-- END PRICE-INPUT-CONNECT -->
</div>
<!-- END PRODUCT-SELECTOR -->
<div class="title-box">
<label>Title</label>
<input type="text" name="" placeholder="Free item">
</div>
<div class="quantity-container">
<div class="quantity-row">
<div class="min-quantity">
<label>minimum</label>
<input type="number" name="" placeholder="Min quantity">
</div>
<!-- END MIN-QUANTITY -->
<div class="max-quantity">
<label>maximum</label>
<input type="number" name="" placeholder="Max quantity">
</div>
<!-- END MIN-QUANTITY -->
</div>
<!-- END QUANTITY-ROW -->
<button type="button" class="Polaris-Link">more options</button>
</div>
<!-- END QUANTITY-CONTAINER -->
</div>
<!-- END GROUP-LIMIT -->
</div>
<!-- END DRAG-CONTAINER -->
<div class="remove-toolbar">
<button>Remove all</button>
</div>
<!-- END REMOVE-TOOLBAR -->
</div>
<!-- END GROUP-CONTAINER -->
</div>
<!-- END TAB-CONTENT -->
<!-- <div id="tab-4" class="tab-content">
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
</div> -->
<!-- END TAB-CONTENT -->
</div>
<!-- container -->
</div>
<!-- END INNERPADDING -->
</div>
<!-- END PRODUCT-WRAPPER-CONTAINER -->
<!-- Script Start -->
<script src="js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php
?>