<?php $_DB['hostname'] = "localhost"; $_DB['database'] = "coneti"; $_DB['username'] = "******"; $_DB['password'] = "******"; $_DB['banco'] = conectadb($_DB['hostname'], $_DB['username'], $_DB['password']); selectdb($_DB['banco'], $_DB['database']); function conectadb($dbHostname, $dbUsername, $dbPassword) { $con = mysqli_connect($dbHostname, $dbUsername, $dbPassword); if (!$con) { die("Não foi possível conectar ao MySQL: " . mysqli_error($con)); } return $con; } function selectdb($con, $db) { mysqli_select_db($con, $db) or die("Não foi possível selecionar a base de dados: " . mysqli_error($con)); } function query($query) { global $_DB; $result = mysqli_query($_DB['banco'], $query); if (!$result) { die("Falha de acesso à base: " . mysqli_error($_DB['banco']) . mysqli_errno($_DB['banco'])); throw new Exception("Erro Processando a Solicitação", $_mysqli->errno); } return $result; } function PrintTable($result)
//lets see if we need to begin the install of phpBB2. if (isset($HTTP_POST_VARS['install_phpbb2'])) { fetch_phpbb2(); } printf("<BR><BR>Your site should now be running FishCMS. For security reasons you"); printf(" must now delete the install directory. If you are installing phpBB2 from"); printf(" FishCMS you should follow the instructions in the phpBB2 installer regarding"); printf(" deleting directories and setting permissions.<BR>"); } //===Main code================================================================ //lets write the header. install_header(); //now we will perform the install steps. if (!isset($HTTP_GET_VARS['mode'])) { pre_install(); } elseif ($HTTP_GET_VARS['mode'] == "selectdb") { selectdb(); } elseif ($HTTP_GET_VARS['mode'] == "selectauth") { selectauth(); } elseif ($HTTP_GET_VARS['mode'] == "siteconfig") { siteconfig(); } elseif ($HTTP_GET_VARS['mode'] == "optional") { optional(); } elseif ($HTTP_GET_VARS['mode'] == "finalize") { finalize(); } /* else unknown (); */ //now we write the footer. install_footer();