<?php
// $Id: update.php,v 1.6 2003/04/30 14:51:01 dtseiler Exp $
if (!$_SESSION["OBJ_user"]->isDeity()){
header("location:index.php");
exit();
}
$status = 1;
if ($currentVersion == "0.1.0") {
if ($status = $GLOBALS["core"]->sqlImport($GLOBALS["core"]->source_dir . "mod/phpwslistings/boost/update_020-010.sql", TRUE)){
$content .= "All phpwsListings tables successfully updated.<br />";
// Need to manually update these rows
$class_id = $GLOBALS["core"]->sqlInsert(array("name"=>"Default","use_price"=>1,"active"=>1), "mod_listings_classes",FALSE,TRUE,FALSE,TRUE);
$GLOBALS["core"]->sqlUpdate(array("class_id"=>$class_id), "mod_listings");
$GLOBALS["core"]->sqlUpdate(array("class_id"=>$class_id), "mod_listings_formelements");
$GLOBALS["core"]->sqlUpdate(array("feature_title"=>"Featured Listings","block_title"=>"Random Listings","show_menu"=>1), "mod_listings_settings");
$content .= "All phpwsListings data successfully updated.<br />";
$content .= "Setting manager to NULL ... ";
$_SESSION["SES_LISTING_MANAGER"] = NULL;
if(is_null($_SESSION["SES_LISTING_MANAGER"]))
$content .= "Done<br />";
else
$content .= "NO<br />";
$content .= "Unsetting manager ... ";
unset($_SESSION["SES_LISTING_MANAGER"]);
if(!isset($_SESSION["SES_LISTING_MANAGER"]))
$content .= "Done<br />";
else
$content .= "NO<br />";
} else {
$content .= "There was a problem writing to the database.<br />";
}
}
?>