Exemplo n.º 1
0
    }
    // Close connection.
    // Refresh page if no errors were reported.
    if ($output == "") {
        $location = NC_CMS_URL . '/' . basename(__FILE__);
        // Load default installer page.
        header('Location: ' . $location);
    }
} else {
    $output .= '<p>Welcome to the nc-cms MySQL database setup. This script will install the appropriate database tables for use with nc-cms.</p>';
    if ($nc_db_fail) {
        if ($nc_report_error != "") {
            $output .= NCUtility::Error($nc_report_error);
        }
        if ($nc_report_tip != "") {
            $output .= NCUtility::Tip($nc_report_tip);
        }
        $output .= '<p>You may delete this file if you do not plan to use nc-cms\'s database support.</p>';
    } else {
        if ($nc_already_setup) {
            $output .= '<h2><strong>Database Setup Complete!</strong></h2> <p>The required nc-cms tables have already been setup in your database. You may now delete this file if you wish.</p>';
        } else {
            $output .= '<p style="width: 200px; margin: 0 auto; text-align: center;"><span class="button"><a href="?action=install" ><span class="icon icon_setup_database" > Setup MySQL Database</span></a></span></p><br />';
            $output .= '<p>You may delete this file if you do not plan to use nc-cms\'s database support.</p>';
        }
    }
}
?>
	
<!DOCTYPE html>
<html lang="en">
Exemplo n.º 2
0
 /** 
  * Special display function for tips.
  * @param string $message Tip message.
  * @param boolean $return True = Return formatted message. False = Echo formatted message.
  * @return string Formatted tip message.
  */
 static function Tip($message, $return = false)
 {
     NCUtility::Tip($message, $return);
 }