<?php
/**
* @version $Id: install.php,v 1.4 2003/04/11 21:17:08 dtseiler Exp $
*/
if (!$_SESSION["OBJ_user"]->isDeity()){
header("location:index.php");
exit();
}
if ($status = $GLOBALS["core"]->sqlImport($GLOBALS["core"]->source_dir . "mod/phpwslistings/boost/install.sql", TRUE)){
$content .= "All phpwsListings tables successfully written.<br />";
/* Create image directories */
mkdir($GLOBALS["core"]->home_dir . "images/phpwslistings");
if(is_dir($GLOBALS["core"]->home_dir . "images/phpwslistings"))
$content .= "phpwsListings image directory " . $GLOBALS["core"]->home_dir . "images/phpwslistings successfully created!<br />";
else
$content .= "phpwsListings could not create the image directory: " . $GLOBALS["core"]->home_dir . "images/phpwsListings<br />You will have to do this manually!<br />";
mkdir($GLOBALS["core"]->home_dir . "images/phpwslistings/agents");
if(is_dir($GLOBALS["core"]->home_dir . "images/phpwslistings/agents"))
$content .= "phpwsListings image directory " . $GLOBALS["core"]->home_dir . "images/phpwslistings/agents successfully created!<br />";
else
$content .= "phpwsListings could not create the image directory: " . $GLOBALS["core"]->home_dir . "images/phpwsListings/agents<br />You will have to do this manually!<br />";
mkdir($GLOBALS["core"]->home_dir . "images/phpwslistings/agencies");
if(is_dir($GLOBALS["core"]->home_dir . "images/phpwslistings/agencies"))
$content .= "phpwsListings image directory " . $GLOBALS["core"]->home_dir . "images/phpwslistings/agencies successfully created!<br />";
else
$content .= "phpwsListings could not create the image directory: " . $GLOBALS["core"]->home_dir . "images/phpwsListings/agencies<br />You will have to do this manually!<br />";
} else
$content .= "There was a problem writing to the database.<br />";
?>