";
\$setTitle = "SGD";
\$setDescription = "Groupware module. Manage web projects with team collaboration, users management, tasks and projects tracking, files approval tracking, project sites clients access, customer relationship management (Php / Mysql, PostgreSQL or Sql Server).";
\$setKeywords = "SGD, SGD.com, Sourceforge, management, web, projects, tasks, organizations, reports, Php, MySql, Sql Server, mssql, Microsoft Sql Server, PostgreSQL, module, application, module, file management, project site, team collaboration, free, crm, CRM, cutomer relationship management, workflow, workgroup";
?>
STAMP;
if (!$error)
{
$fp = @fopen("../includes/settings.php",'wb+');
$fw = fwrite($fp,$content);
if (!$fw)
{
$error = 1;
echo "
PANIC!
settings.php can't be written!
";
}
fclose($fp);
$msg = 'File settings.php created correctly.';
// crypt admin and demo password
$demoPwd = get_password("demo");
$adminPwd = get_password($adminPwd);
// create all tables
include("../includes/db_var.inc.php");
include("../includes/setup_db.php");
if ($databaseType == "mysql")
{
$my = @mysql_connect($myserver, $mylogin, $mypassword);
if (mysql_errno() != 0){ exit('
PANIC!
Error during connection on server MySQL.
'); }
mysql_select_db($mydatabase, $my);
if (mysql_errno() != 0){ exit('
PANIC!
Error during selection database.
'); }
for($con = 0; $con < count($SQL); $con++)
{
mysql_query($SQL[$con]);
//echo $SQL[$con] . ';
';
if (mysql_errno() != 0){ exit('
PANIC!
Error during the creation of the tables.
Error: '. mysql_error()); }
}
}
if ($databaseType == "postgresql")
{
$my = pg_connect("host=$myserver port=5432 dbname=$mydatabase user=$mylogin password=$mypassword");
if (pg_last_error() != 0){ exit('
PANIC!
Error during connection on server PostgreSQL.
'); }
for($con = 0; $con < count($SQL); $con++)
{
pg_query($SQL[$con]);
//echo $SQL[$con] . ';
';
if (pg_last_error() != 0){ exit('
PANIC!
Error during the creation of the tables.
Error: '. pg_last_error()); }
}
}
if ($databaseType == "sqlserver")
{
$my = @mssql_connect($myserver, $mylogin, $mypassword);
if (mssql_get_last_message() != 0){ exit('
PANIC!
Error during connection on server SQl Server.
'); }
mssql_select_db($mydatabase, $my);
if (mssql_get_last_message() != 0){ exit('
PANIC!
Error during selection database.
'); }
for($con = 0; $con < count($SQL); $con++)
{
mssql_query($SQL[$con]);
//echo $SQL[$con] . '
';
if (mssql_get_last_message() != 0){ exit('
PANIC!
Error during the creation of the tables.
Error: '. mssql_get_last_message()); }
}
}
if ($databaseType == "oracle")
{
$my = OCILogon($mylogin,$mypassword,$myserver);
for($con = 0; $con < count($SQL); $con++)
{
$index = @OCIParse($my,$SQL[$con]);
OCIExecute($index);
//echo $SQL[$con] . '
';
if (OCIError() != 0){ exit('
PANIC!
Error during the creation of the tables.
Error: '. mssql_get_last_message()); }
}
}
$msg .= "
Tabelas e arquivos de configurações criados com sucesso.";
//$msg .= "
Por favor efetue login";
$msg .= "
Por favor efetue login";
}
else
{
$msg = $error;
}
}
if ($step == "")
{
$step = "1";
}
$setTitle = "SGD";
define('THEME','default');
$banner_top = "teste_01.jpg";
$blank = "true";
include("../themes/".THEME."/block.class.php");
include ('../themes/' . THEME . '/header.php');
$blockPage = new block();
$blockPage->openBreadcrumbs();
$blockPage->itemBreadcrumbs("Instalação");
if ($step == "1")
{
$blockPage->itemBreadcrumbs("Licença");
}
elseif ($step > "1")
{
$blockPage->itemBreadcrumbs("Licença");
if ($step == "2")
{
$blockPage->itemBreadcrumbs("Configurações");
}
elseif ($step > "2")
{
$blockPage->itemBreadcrumbs("Configurações");
if ($step == "3")
{
$blockPage->itemBreadcrumbs("Control");
}
}
}
$blockPage->closeBreadcrumbs();
$block1 = new block();
if ($step == "1")
{
$block1->heading("Licença");
}
if ($step == "2")
{
$block1->heading("Configurações");
}
if ($step == "3")
{
$block1->heading("Control");
}
if ($step == "1")
{
$block1->openContent();
$block1->contentTitle(" ");
echo "
"; //include("../docs/copying.txt"); include("../docs/LICENCA.txt"); echo "
"; echo " |