| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2017-12-16 13:32:58 -07:00
										 |  |  | /* This Source Code Form is subject to the terms of the Mozilla Public | 
					
						
							|  |  |  |  * License, v. 2.0. If a copy of the MPL was not distributed with this | 
					
						
							|  |  |  |  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | require_once __DIR__ . '/../required.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | redirectifnotloggedin(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-15 14:09:59 -06:00
										 |  |  | if ($database->count("locations") == 0 || $database->count("categories") == 0) { | 
					
						
							|  |  |  |     header('Location: app.php?page=items&msg=noloccat'); | 
					
						
							|  |  |  |     die(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | $itemdata = [ | 
					
						
							|  |  |  |     'name' => '', | 
					
						
							|  |  |  |     'catid' => '', | 
					
						
							|  |  |  |     'catname' => '', | 
					
						
							|  |  |  |     'locid' => '', | 
					
						
							|  |  |  |     'locname' => '', | 
					
						
							|  |  |  |     'loccode' => '', | 
					
						
							|  |  |  |     'code1' => '', | 
					
						
							|  |  |  |     'code2' => '', | 
					
						
							|  |  |  |     'text1' => '', | 
					
						
							|  |  |  |     'text2' => '', | 
					
						
							|  |  |  |     'text3' => '', | 
					
						
							|  |  |  |     'qty' => 1, | 
					
						
							| 
									
										
										
										
											2017-09-05 22:35:35 -06:00
										 |  |  |     'want' => 0, | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |     'cost' => 0.0, | 
					
						
							|  |  |  |     'price' => 0.0, | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |     'userid' => '']; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $editing = false; | 
					
						
							| 
									
										
										
										
											2017-11-07 15:34:10 -07:00
										 |  |  | $cloning = false; | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  | if (!empty($VARS['id'])) { | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |     if ($database->has('items', ['itemid' => $VARS['id']])) { | 
					
						
							| 
									
										
										
										
											2017-07-05 00:03:33 -06:00
										 |  |  |         $editing = true; | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |         if (isset($VARS['clone']) && $VARS['clone'] == 1) { | 
					
						
							| 
									
										
										
										
											2017-11-07 15:34:10 -07:00
										 |  |  |             $cloning = true; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-07-05 00:03:33 -06:00
										 |  |  |         $itemdata = $database->select( | 
					
						
							|  |  |  |                         'items', [ | 
					
						
							|  |  |  |                     '[>]categories' => [ | 
					
						
							|  |  |  |                         'catid' => 'catid' | 
					
						
							|  |  |  |                     ], | 
					
						
							|  |  |  |                     '[>]locations' => [ | 
					
						
							|  |  |  |                         'locid' => 'locid' | 
					
						
							|  |  |  |                     ] | 
					
						
							|  |  |  |                         ], [ | 
					
						
							|  |  |  |                     'name', | 
					
						
							|  |  |  |                     'code1', | 
					
						
							|  |  |  |                     'code2', | 
					
						
							|  |  |  |                     'text1', | 
					
						
							|  |  |  |                     'text2', | 
					
						
							|  |  |  |                     'text3', | 
					
						
							|  |  |  |                     'items.catid', | 
					
						
							|  |  |  |                     'catname', | 
					
						
							|  |  |  |                     'items.locid', | 
					
						
							|  |  |  |                     'locname', | 
					
						
							|  |  |  |                     'loccode', | 
					
						
							|  |  |  |                     'qty', | 
					
						
							| 
									
										
										
										
											2017-09-05 22:35:35 -06:00
										 |  |  |                     'want', | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                     'cost', | 
					
						
							|  |  |  |                     'price', | 
					
						
							| 
									
										
										
										
											2017-07-05 00:03:33 -06:00
										 |  |  |                     'userid' | 
					
						
							|  |  |  |                         ], [ | 
					
						
							|  |  |  |                     'itemid' => $VARS['id'] | 
					
						
							|  |  |  |                 ])[0]; | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |     } else { | 
					
						
							|  |  |  |         // item id is invalid, redirect to a page that won't cause an error when pressing Save
 | 
					
						
							|  |  |  |         header('Location: app.php?page=edititem'); | 
					
						
							| 
									
										
										
										
											2017-09-15 14:09:59 -06:00
										 |  |  |         die(); | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | ?>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <form role="form" action="action.php" method="POST"> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |     <div class="card border-green"> | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |         <h3 class="card-header text-green"> | 
					
						
							|  |  |  |             <?php | 
					
						
							|  |  |  |             if ($cloning) { | 
					
						
							|  |  |  |                 ?>
 | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                 <i class="fas fa-edit"></i> <?php $Strings->build("cloning item", ['oitem' => htmlspecialchars($itemdata['name']), 'nitem' => "<span id=\"name_title\">" . htmlspecialchars($itemdata['name']) . "</span>"]); ?>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                 <?php | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |             } else if ($editing) { | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                 ?>
 | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                 <i class="fas fa-edit"></i> <?php $Strings->build("editing item", ['item' => "<span id=\"name_title\">" . htmlspecialchars($itemdata['name']) . "</span>"]); ?>
 | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                 <?php | 
					
						
							|  |  |  |             } else { | 
					
						
							|  |  |  |                 ?>
 | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                 <i class="fas fa-edit"></i> <?php $Strings->get("Adding Item"); ?>
 | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                 <?php | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             ?>
 | 
					
						
							|  |  |  |         </h3> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |         <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |             <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                 <label for="name"><i class="fas fa-cube"></i> <?php $Strings->get("name"); ?></label>
 | 
					
						
							|  |  |  |                 <input type="text" class="form-control" id="name" name="name" placeholder="<?php $Strings->get("placeholder item name"); ?>" required="required" value="<?php echo htmlspecialchars($itemdata['name']); ?>" /> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |             </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             <div class="row"> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="cat"><i class="fas fa-archive"></i> <?php $Strings->get("category"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2018-10-05 00:28:38 -06:00
										 |  |  |                         <select class="form-control" name="cat" id="cat" required="required"> | 
					
						
							|  |  |  |                             <option value=""><?php $Strings->get("Choose a category"); ?></option>
 | 
					
						
							|  |  |  |                             <?php | 
					
						
							|  |  |  |                             $categories = $database->select('categories', ['catid (id)', 'catname (name)']); | 
					
						
							|  |  |  |                             foreach ($categories as $cat) { | 
					
						
							|  |  |  |                                 ?>
 | 
					
						
							|  |  |  |                             <option value="<?php echo $cat['id']; ?>" <?php echo $itemdata['catid'] == $cat['id'] ? "selected" : ""; ?>><?php echo $cat['name']; ?></option>
 | 
					
						
							|  |  |  |                             <?php | 
					
						
							|  |  |  |                             } | 
					
						
							|  |  |  |                             ?>
 | 
					
						
							|  |  |  |                         </select> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="loc"><i class="fas fa-map-marker"></i> <?php $Strings->get("location"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2018-10-05 00:28:38 -06:00
										 |  |  |                         <select class="form-control" name="loc" id="loc" required="required"> | 
					
						
							|  |  |  |                             <option value=""><?php $Strings->get("Choose a location"); ?></option>
 | 
					
						
							|  |  |  |                             <?php | 
					
						
							|  |  |  |                             $locations = $database->select('locations', ['locid (id)', 'locname (name)']); | 
					
						
							|  |  |  |                             foreach ($locations as $loc) { | 
					
						
							|  |  |  |                                 ?>
 | 
					
						
							|  |  |  |                             <option value="<?php echo $loc['id']; ?>" <?php echo $itemdata['locid'] == $loc['id'] ? "selected" : ""; ?>><?php echo $loc['name']; ?></option>
 | 
					
						
							|  |  |  |                             <?php | 
					
						
							|  |  |  |                             } | 
					
						
							|  |  |  |                             ?>
 | 
					
						
							|  |  |  |                         </select> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             <div class="row"> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="code1"><i class="fas fa-barcode"></i> <?php $Strings->get("code 1"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-07-05 00:03:33 -06:00
										 |  |  |                         <div class="input-group"> | 
					
						
							|  |  |  |                             <input type="text" class="form-control" id="code1" name="code1" placeholder="123456789" value="<?php echo htmlspecialchars($itemdata['code1']); ?>" /> | 
					
						
							|  |  |  |                             <span class="input-group-btn mobile-app-show"> | 
					
						
							|  |  |  |                                 <button type="button" class="btn btn-default" onclick="scancode('#code1'); return false;"><i class="fa fa-fw fa-barcode"></i></button> | 
					
						
							|  |  |  |                             </span> | 
					
						
							|  |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="code2"><i class="fas fa-qrcode"></i> <?php $Strings->get("code 2"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-07-05 00:03:33 -06:00
										 |  |  |                         <div class="input-group"> | 
					
						
							| 
									
										
										
										
											2017-11-13 16:16:49 -07:00
										 |  |  |                             <input type="text" class="form-control" id="code2" name="code2" placeholder="qwerty123" value="<?php echo htmlspecialchars($itemdata['code2']); ?>" /> | 
					
						
							| 
									
										
										
										
											2017-07-05 00:03:33 -06:00
										 |  |  |                             <span class="input-group-btn mobile-app-show"> | 
					
						
							|  |  |  |                                 <button type="button" class="btn btn-default" onclick="scancode('#code2'); return false;"><i class="fa fa-fw fa-barcode"></i></button> | 
					
						
							|  |  |  |                             </span> | 
					
						
							|  |  |  |                         </div> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             <div class="row"> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-3"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="qty"><i class="fas fa-hashtag"></i> <?php $Strings->get('quantity'); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                         <input type="number" class="form-control" id="qty" name="qty" placeholder="1" value="<?php echo $itemdata['qty']; ?>" /> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-3"> | 
					
						
							| 
									
										
										
										
											2017-09-05 22:35:35 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="want"><i class="fas fa-hashtag"></i> <?php $Strings->get('minwant'); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-09-05 22:35:35 -06:00
										 |  |  |                         <input type="number" class="form-control" id="want" name="want" placeholder="1" value="<?php echo $itemdata['want']; ?>" /> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |                 <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="assignedto"><i class="fas fa-user"></i> <?php $Strings->get('assigned to'); ?></label>
 | 
					
						
							|  |  |  |                         <input type="text" class="form-control" id="assignedto" name="assignedto" placeholder="<?php $Strings->get('nobody'); ?>" value="<?php
 | 
					
						
							|  |  |  |                         if (!empty($itemdata['userid'])) { | 
					
						
							|  |  |  |                             $user = new User($itemdata['userid']); | 
					
						
							|  |  |  |                             if ($user->exists()) { | 
					
						
							|  |  |  |                                 echo $user->getUsername(); | 
					
						
							|  |  |  |                             } | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                         } | 
					
						
							|  |  |  |                         ?>" />
 | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             <div class="row"> | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                 <div class="col-12 col-md-3"> | 
					
						
							|  |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="cost"><i class="far fa-money-bill-alt"></i> <?php $Strings->get('Item cost'); ?></label>
 | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                         <input type="number" class="form-control" id="cost" name="cost" placeholder="0.00" step="0.01" value="<?php echo $itemdata['cost']; ?>" /> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |                 <div class="col-12 col-md-3"> | 
					
						
							|  |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="price"><i class="fas fa-shopping-cart"></i> <?php $Strings->get('Sale price'); ?></label>
 | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                         <input type="number" class="form-control" id="price" name="price" placeholder="0.00" step="0.01" value="<?php echo $itemdata['price']; ?>" /> | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |                 <div class="col-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="info1"><i class="fas fa-info"></i> <?php $Strings->get("Description"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                         <textarea class="form-control" id="info1" name="text1"><?php echo htmlspecialchars($itemdata['text1']); ?></textarea>
 | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |             </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             <div class="row"> | 
					
						
							|  |  |  |                 <div class="col-12 col-sm-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="info2"><i class="fas fa-sticky-note"></i> <?php $Strings->get("Notes"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                         <textarea class="form-control" id="info2" name="text2"><?php echo htmlspecialchars($itemdata['text2']); ?></textarea>
 | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											2018-04-10 01:25:07 -06:00
										 |  |  |                 <div class="col-12 col-sm-12 col-md-6"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                     <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                         <label for="info3"><i class="fas fa-comments"></i> <?php $Strings->get("Comments"); ?></label>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                         <textarea class="form-control" id="info3" name="text3"><?php echo htmlspecialchars($itemdata['text3']); ?></textarea>
 | 
					
						
							|  |  |  |                     </div> | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-07 15:34:10 -07:00
										 |  |  |         <input type="hidden" name="itemid" value="<?php
 | 
					
						
							|  |  |  |         if ($editing && !$cloning) { | 
					
						
							|  |  |  |             echo htmlspecialchars($VARS['id']); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         ?>" />
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |         <input type="hidden" name="action" value="edititem" /> | 
					
						
							| 
									
										
										
										
											2018-10-06 00:43:58 -06:00
										 |  |  |         <?php | 
					
						
							|  |  |  |         if (isset($_GET['source']) && $_GET['source'] === "item" && $editing && !$cloning) { | 
					
						
							|  |  |  |             echo '<input type="hidden" name="source" value="item" />'; | 
					
						
							|  |  |  |         } else { | 
					
						
							|  |  |  |             echo '<input type="hidden" name="source" value="items" />'; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         ?>
 | 
					
						
							| 
									
										
										
										
											2018-09-22 02:41:38 -06:00
										 |  |  |         <?php | 
					
						
							|  |  |  |         if ($cloning) { | 
					
						
							|  |  |  |             ?>
 | 
					
						
							|  |  |  |             <input type="hidden" name="cloneof" value="<?php echo $VARS['id']; ?>" /> | 
					
						
							|  |  |  |             <?php | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         ?>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-29 00:37:39 -07:00
										 |  |  |         <div class="card-footer d-flex"> | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |             <?php | 
					
						
							| 
									
										
										
										
											2017-11-07 15:34:10 -07:00
										 |  |  |             if ($editing && !$cloning) { | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                 ?>
 | 
					
						
							| 
									
										
										
										
											2018-09-22 02:41:38 -06:00
										 |  |  |                 <button type="submit" class="btn btn-success mr-1"><i class="fas fa-save"></i> <?php $Strings->get("save"); ?></button>
 | 
					
						
							| 
									
										
										
										
											2018-10-06 00:43:58 -06:00
										 |  |  |                 <a href="./app.php?page=editimages&id=<?php echo $_GET['id']; ?>" class="btn btn-primary mr-1"><i class="fas fa-images"></i> <?php $Strings->get("Edit Images"); ?></a>
 | 
					
						
							|  |  |  |                 <a class="btn btn-success mr-auto" href="app.php?page=edititem&id=<?php echo $VARS['id']; ?>&clone=1"><i class="fas fa-clone"></i> <?php $Strings->get("clone"); ?></a>
 | 
					
						
							| 
									
										
										
										
											2018-09-07 18:29:25 -06:00
										 |  |  |                 <a href="action.php?action=deleteitem&source=items&itemid=<?php echo htmlspecialchars($VARS['id']); ?>" class="btn btn-danger ml-auto"><i class="fas fa-times"></i> <?php $Strings->get('delete'); ?></a>
 | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |                 <?php | 
					
						
							| 
									
										
										
										
											2018-09-22 02:41:38 -06:00
										 |  |  |             } else { | 
					
						
							|  |  |  |                 ?>
 | 
					
						
							|  |  |  |                 <button type="submit" class="btn btn-success mr-auto"><i class="fas fa-save"></i> <?php $Strings->get("save"); ?></button>
 | 
					
						
							|  |  |  |                 <?php | 
					
						
							| 
									
										
										
										
											2017-05-17 23:09:51 -06:00
										 |  |  |             } | 
					
						
							|  |  |  |             ?>
 | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | </form> |