-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsaveListing.php
More file actions
40 lines (22 loc) · 761 Bytes
/
saveListing.php
File metadata and controls
40 lines (22 loc) · 761 Bytes
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
<?php
require_once("../config/config.php");
require_once("../includes/global.inc.php");
require_once( $fullPath ."/auction/classes/listingTools.class.php");
$listingTools = new listingTools();
$listing = unserialize($_SESSION['listing']);
if (isset($_SESSION['editing'])) {
if ($listing->update($listing)) {
$content = "Listing updated!";
unset($_SESSION['editing']);
} else {
$content = "Updating listing failed!";
}
} else if ($listingTools->saveListing($listing)) {
$content = "Listing saved!";
} else {
$content = "An error occurred, please try again!";
}
$listingTools->unsetListing();
$heading = "Save Listing";
require_once("themes/".$pageTools->getTheme("auction")."/templates/template.inc.php");
?>