Location: PHPKode > projects > eBlog > install/index.php
<?php

/**************************************************************************
 *                                                                        *
 *                                                                        *
 *         Solution: eBlog                                                *
 *          Release: 1.7                                                  *
 *             File: install/index.php                                    *
 *               By: Emuci inc.                                           *
 *          Website: http://www.emuci.com                                 *
 *        Copyright: (C) 2010 Emcui inc.                                  *
 *                                                                        *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *                                                                        *
 *   This script is NOT freeware and is subjected to Emuci terms of use   *
 *   located in the docs folder.                                          *
 *                                                                        *
 *                                                                        *
 *************************************************************************/
 
 
include '../includes/config.php';
include 'lang.php';



	// Calculate steps
	$step = $_GET['step'];
	$nextStep = $step+1;
	$totalSteps = 9;	
	
	
	$universalError = "<input name=\"connection\" type=\"hidden\" value=\"$erorrCode\">
	<tr>
	<td valign=\"top\" style=\"\">
	<img src=\"../images/icons/icon_erorr.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_erorr_code101</font>
	</td>
	</tr>	
		
		
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_erorr.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_erorr_code808</font>
	</td>
	</tr>";	
	
	
	
	// Show header
	$lastStep = $nextStep-1;
	echo "<html dir=\"$blog_dir\">
	  	  <header>		
	  	  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=$blog_windows_encoding\">
	  	  <script type=\"text/javascript\">
	  	  
		  function checkForm6(form){
		  
		  if(form.blogName.value == \"\"){
		  alert( \"$lang_erorr_code202\" );
		  form.blogName.focus();
		  return false;
		  }
		  
		  if(form.url.value == \"\"){
		  alert( \"$lang_erorr_code303\" );
		  form.url.focus();
		  return false;
		  }
		  
		  return true;
		  }
		  
		  function checkForm7(form){		  
		  if(form.username.value == \"\"){
		  alert( \"$lang_erorr_code404\" );
		  form.username.focus();
		  return false;
		  }
		  
		  if(form.password.value == \"\"){
		  alert( \"$lang_erorr_code505\" );
		  form.password.focus();
		  return false;
		  }
		  
		  
		  if(form.email.value == \"\"){
		  alert( \"$lang_erorr_code606\" );
		  form.email.focus();
		  return false;
		  }
		  	  
		  if((form.email.value.indexOf(\".\") < 1) || (form.email.value.indexOf(\"@\") < 1))
		  {
		  alert( \"$lang_erorr_code707\" );
		  form.email.focus();
		  return false;
		  }
		






		  
		  
		  return true;
		  }
		  </script>
		  	  
	      <title>$lang_install_pageTitle</title>
	      </header>
	      <body background=\"images/inner_bg.gif\">
	      <div align=\"center\">
	      <font face=\"Tahoma\">
	      <form method=\"post\" action=\"index.php?step=$nextStep\" onsubmit=\"return checkForm$step(this);\">
	      <table width=\"330\" height=\"306\" background=\"images/inner_block.gif\">
	      <tr><td align=\"center\" height=\"70\" valign=\"bottom\"><img src=\"../images/logo.jpg\"></td></tr>
	      <tr><td align=\"center\"><font size=\"2\">$lang_install_step $step $lang_install_of $totalSteps</font></td></tr>
	      <tr><td valign=\"top\" height=\"100%\">
	      <center>
	      <table width=\"290\" border=\"0\">
	      <tr>
	      <td valign=\"top\">
	      ";
	      
	      
	      
	      
	      
	      
	      
	
	// if no step specified, go to step 1 
	if (empty($step))
	{
	   echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php?step=1\">";
	}
	


	// Step 1: Display Instructions
    if($step==1){
	echo "
	<table width=\"100%\" height=\"150\" cellpadding=\"4\">
	
	<tr>
	<td>
	&nbsp;
	</td>
	</tr>	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_info.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_start_message_1</font>
	</td>
	</tr>
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_info.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_start_message_2</font>
	</td>
	</tr>
		
	
	<tr>
	<td colspan=\"2\" height=\"100%\">
	<font size=\"1\">&nbsp;</font>
	</td>
	</tr>	
	
	</table>
	";
	}
			
	
	
	
	// Step 2: Connect to DB
	else if($step==2){
	echo "
	<table width=\"100%\" height=\"150\" border=\"0\">
	
	<tr>
	<td>
	&nbsp;
	<br>
	&nbsp;
	</td>
	</tr>
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_dbhost:</font>
	</td>
	<td>
	<input type=\"text\" name=\"dbhost\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\" value=\"$dbhost\" READONLY>	
	</td>
	</tr>
	

	<tr>
	<td>
	<font size=\"2\">$lang_install_dbname:</font>
	</td>
	<td>
	<input type=\"text\" name=\"dbname\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\" value=\"$dbname\" READONLY>	
	</td>
	</tr>
	
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_dbuser:</font>
	</td>
	<td>
	<input type=\"text\" name=\"dbuser\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\" value=\"$dbuser\" READONLY>	
	</td>
	</tr>
	
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_dbpass:</font>
	</td>
	<td>
	<input type=\"password\" name=\"dbpass\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\" value=\"$dbpass\" READONLY>	
	</td>
	</tr>		
	
	</table>
	";
	

	}
	
	
	
	
	// Step 3: Check Connectivity
	else if($step == 3)
	{
	$erorrCode = 0;
	$conn = @mysql_connect($dbhost, $dbuser, $dbpass);	
	$content = "";
	
	@mysql_close($conn);
	
	
	if($conn)
	{
	echo "<input name=\"connection\" type=\"hidden\" value=\"\">";
	$content = "<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_db_host</font>
	</td>
	</tr>	
		
		
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_db_username</font>
	</td>
	</tr>
	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_db_name</font>
	</td>
	</tr>
	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_db_connected</font>
	</td>
	</tr>";			
	}
	
	
	
	else
	{
		$content = $universalError;
		$disabled = "disabled";
	}	
	
	
	
	echo "
	<table width=\"100%\" height=\"150\" border=\"0\">
	
	<tr>
	<td>
	&nbsp;
	</td>
	</tr>		
	
	$content
	
	<tr height=\"100%\">
	<td>
	&nbsp;
	</td>
	</tr>
	
		
	</table>	
	";
	
	
	}
	
	
	
	
	
	// Step 4: Create Tables
	else if($step==4){
	$username = htmlspecialchars($_POST["username"]);
	$password = htmlspecialchars($_POST["password"]);
	$email = 	htmlspecialchars($_POST["email"]);
	$showForm = 0;
	
    $conn = @mysql_connect($dbhost, $dbuser, $dbpass);
    @mysql_select_db($dbname);
   	

	if(!empty($_POST["connection"]))
	{
	   $showForm = 1;
	   echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php?step=3\">";
	}
	
	
		
	
	if(($showForm==0)&&($conn)){

		// Create settings table
		$sql = 'DROP TABLE IF EXISTS `eblog_settings`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_settings` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`site_name` VARCHAR( 100 ) NOT NULL,
		`site_url` VARCHAR( 100 ) NOT NULL,
		`admin_username` VARCHAR( 100 ) NOT NULL,
		`admin_password` VARCHAR( 100 ) NOT NULL,
		`admin_email` VARCHAR( 100 ) NOT NULL,
		`meta_tag` TEXT NOT NULL,
		`css` TEXT NOT NULL,
		`bad_words`  TEXT NOT NULL,
		`replace_words` VARCHAR( 100 ) NOT NULL,
		`allow_comments` INT( 1 ) DEFAULT 1 NOT NULL,
		`visitors` INT( 40 ) DEFAULT 1 NOT NULL,
		`login_attempts` INT( 3 ) DEFAULT 5 NOT NULL,
		`lang` VARCHAR( 100 ) NOT NULL,
		`template` VARCHAR( 100 ) NOT NULL,
		`popup` INT( 1 ) DEFAULT 1 NOT NULL,
		`enable1` INT( 1 ) DEFAULT 1 NOT NULL,
		`enable2` INT( 1 ) DEFAULT 1 NOT NULL,
		`enable3` INT( 1 ) DEFAULT 1 NOT NULL,
		`enable4` INT( 1 ) DEFAULT 1 NOT NULL,
		`enablethumb` INT( 1 ) DEFAULT 1 NOT NULL,
		`thumb_width` INT( 3 ) DEFAULT 60 NOT NULL,
		`thumb_height` INT( 3 ) DEFAULT 77 NOT NULL,
		`sort_by` INT( 1 ) DEFAULT 2 NOT NULL,
		`sort_order` INT( 1 ) DEFAULT 1 NOT NULL,
		`auto_validate` INT( 1 ) DEFAULT 1 NOT NULL,
		`location` VARCHAR( 5 ) NOT NULL,
		`topicsPP` VARCHAR( 5 ) NOT NULL,
		`monthsPL` VARCHAR( 5 ) NOT NULL,
		`cellPR` VARCHAR( 5 ) NOT NULL,
		`topicPR` VARCHAR( 5 ) NOT NULL,
		`ww` VARCHAR( 5 ) NOT NULL,
		`wh` VARCHAR( 5 ) NOT NULL,
		`gpp` VARCHAR( 5 ) NOT NULL,
		`bw` VARCHAR( 5 ) NOT NULL,	
		`wrap` VARCHAR( 5 ) NOT NULL,		
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		// Create social links table
		$sql = 'DROP TABLE IF EXISTS `eblog_social`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_social` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`name` VARCHAR( 100 ) NOT NULL,
		`link`  TEXT NOT NULL,
		`image`  TEXT NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		// Create notifications table
		$sql = 'DROP TABLE IF EXISTS `eblog_new`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_new` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`uid` VARCHAR( 30 ) NOT NULL,
		`type`  VARCHAR( 30 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );		
		
		
		
		// Create contacts table
		$sql = 'DROP TABLE IF EXISTS `eblog_contacts`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_contacts` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`name` VARCHAR( 100 ) NOT NULL,
		`email`  VARCHAR( 100 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );	
		
		
		// Create friends table
		$sql = 'DROP TABLE IF EXISTS `eblog_friends`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_friends` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`name` VARCHAR( 100 ) NOT NULL,
		`url`  VARCHAR( 100 ) NOT NULL,
		`icon`  TEXT NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );				
		
				
		// Create what todo table
		$sql = 'DROP TABLE IF EXISTS `eblog_todo`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_todo` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`level` VARCHAR( 100 ) NOT NULL,
		`content` TEXT NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );		
				
		
		// Create sections table
		$sql = 'DROP TABLE IF EXISTS `eblog_sections`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_sections` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`title` VARCHAR( 300 ) NOT NULL,
		`disc`  TEXT NOT NULL,
		`allow_comments` INT( 1 ) DEFAULT 1 NOT NULL,
		`parent` VARCHAR( 30 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		
		
		
		
		// Create pages table
		$sql = 'DROP TABLE IF EXISTS `eblog_pages`';
		mysql_query( $sql, $conn );
		$sql = 'CREATE TABLE `eblog_pages` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`title` VARCHAR( 150 ) NOT NULL,
		`content` TEXT NOT NULL,
		`url` VARCHAR( 500 ) NOT NULL,
		`status` VARCHAR( 5 ) NOT NULL,
		`type` VARCHAR( 5 ) NOT NULL,
		`window` VARCHAR( 5 ) NOT NULL,
		`visible` VARCHAR( 5 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );		
		
		
		
		// Create topics table
		$sql = 'DROP TABLE IF EXISTS `eblog_topics`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_topics` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`sec` INT( 30 ) NOT NULL,
		`title` VARCHAR( 150 ) NOT NULL,
		`date` VARCHAR( 150 ) NOT NULL,
		`contents` TEXT NOT NULL,
		`thumb` TEXT NOT NULL,
		`main` TEXT NOT NULL,
		`allviewers` INT( 30 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		
		
		// Create comments table
		$sql = 'DROP TABLE IF EXISTS `eblog_comments`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_comments` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`author` VARCHAR( 150 ) NOT NULL,
		`date` VARCHAR( 150 ) NOT NULL,
		`contents` TEXT NOT NULL,
		`topicID` INT( 30 ) NOT NULL,
		`statusID` INT( 30 ) NOT NULL,
		`location` VARCHAR( 100 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		
		// Create guestbook table
		$sql = 'DROP TABLE IF EXISTS `eblog_gb`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_gb` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`title` VARCHAR( 150 ) NOT NULL,
		`author` VARCHAR( 150 ) NOT NULL,
		`date` VARCHAR( 150 ) NOT NULL,
		`location` VARCHAR( 150 ) NOT NULL,
		`comment` TEXT NOT NULL,
		`statusID` INT( 30 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		
		// Create online users table
		$sql = 'DROP TABLE IF EXISTS `eblog_online`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_online` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`ip` VARCHAR( 150 ) NOT NULL,
		`name` VARCHAR( 50 ) NOT NULL,
		`page`TEXT NOT NULL,
		`timeout` VARCHAR( 300 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';		
		mysql_query( $sql, $conn );		
		
		
		
		// Create blacklist table
		$sql = 'DROP TABLE IF EXISTS `eblog_blacklist`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_blacklist` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`ip` VARCHAR( 50 ) NOT NULL,
		`date` VARCHAR( 50 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );
		
		
		// Create messages table
		$sql = 'DROP TABLE IF EXISTS `eblog_messages`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_messages` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`sender` VARCHAR( 100 ) NOT NULL,
		`receiver` VARCHAR( 100 ) NOT NULL,
		`title` VARCHAR( 300 ) NOT NULL,
		`date` VARCHAR( 30 ) NOT NULL,
		`content` TEXT NOT NULL,
		`statusID` INT( 30 ) NOT NULL,
		`email` TEXT NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );	
		
		
		
				
		// Create countries table
		$sql = 'DROP TABLE IF EXISTS `eblog_countries`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_countries` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`name` VARCHAR( 100 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );	
		
		
		// Create alerts table
		$sql = 'DROP TABLE IF EXISTS `eblog_alerts`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_alerts` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`comments` INT( 10 ) NOT NULL,
		`gb` INT( 10 ) NOT NULL,
		`sub` INT( 10 ) NOT NULL,
		`mails` INT( 10 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );	
		
		
		
		// Create sync table
		$sql = 'DROP TABLE IF EXISTS `eblog_sync`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_sync` (
		`id` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`sn` VARCHAR( 100 ) NOT NULL,
		`name` VARCHAR( 100 ) NOT NULL,
		`icon` TEXT NOT NULL,
		`username` VARCHAR( 100 ) NOT NULL,
		`password` VARCHAR( 100 ) NOT NULL,
		PRIMARY KEY ( `id` )
		)';
		mysql_query( $sql, $conn );	
		
		
		// Create sec2sync table
		$sql = 'DROP TABLE IF EXISTS `eblog_sec2sync`';
		mysql_query( $sql, $conn );		
		$sql = 'CREATE TABLE `eblog_sec2sync` (
		`secID` INT( 30 ) UNSIGNED NOT NULL AUTO_INCREMENT,
		`status` INT( 30 ) UNSIGNED NOT NULL,
		PRIMARY KEY ( `secID` )
		)';
		mysql_query( $sql, $conn );							
					
					
					
					
		mysql_close($conn);
	
	
	echo "
	<table width=\"100%\" height=\"150\" cellpadding=\"2\">
	
	<tr>
	<td>
	&nbsp;
	<br>
	&nbsp;
	<br>	
	</td>
	</tr>	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_tablesCreated</font>
	</td>
	</tr>
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_tablesSetup</font>
	</td>
	</tr>	
		
		
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_tablesReady</font>
	</td>
	</tr>	
			
	
	<tr>
	<td colspan=\"2\" height=\"100%\">
	<font size=\"1\">&nbsp;</font>
	</td>
	</tr>	
	
	</table>
	";
	}
	else
	{
		echo "	<table width=\"100%\" height=\"150\" border=\"0\">
		<tr>
		<td>
		&nbsp;
		</td>
		</tr>		
		
		$universalError
		
		<tr height=\"100%\">
		<td>
		&nbsp;
		</td>
		</tr>
		
			
		</table>";
		
		$disabled = "disabled";
	}		
	}
	
	
	
	
	
	// Step 5: Populate Tables
	else if($step==5){
	
		// Connect to DB
		   $conn = @mysql_connect($dbhost, $dbuser, $dbpass);
	       @mysql_select_db($dbname);
	       
	   // Insert data
		if($conn){	   
		  $pageURL = 'http';
		  if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
		  $pageURL .= "://";
		  if ($_SERVER["SERVER_PORT"] != "80") {
		  	$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
		  } else {
		  	$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
		  }
		  $chunk = explode("install/index.php",$pageURL);
		  $scriptURL = $chunk[0];
		 	   
		  $defaultLang = "English";
		  $defaultTemplate = "default";
		  $thumb = "";
		  $picture = "";
		  $newDate = date("d-m-Y");
		  mysql_query("INSERT INTO eblog_settings (id, lang, template, topicsPP, monthsPL, cellPR, topicPR, ww, wh, thumb_width, thumb_height, gpp, bw, wrap, popup, enablethumb) VALUES ('1', '$defaultLang', '$defaultTemplate', '10', '12', '2', '5', '640', '500', '90', '90', '10', '1', '250', '2', '1')");
		  mysql_query("INSERT INTO eblog_sections  VALUES ('1', '$lang_install_sectionTitle', '$lang_install_sectionDisc', '1', '')");		  
		  mysql_query("INSERT INTO eblog_topics  VALUES ('1', '1', '$lang_install_topicTitle', '$newDate','$lang_install_topicContent', '$thumb', '$picture', '1')");
		  	    
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('1', 'caution', '<a href=\"settings.php\">$lang_todo_01_content</a>')");
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('2', 'add', '<a href=\"settings.php#social\">$lang_todo_02_content</a>')");
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('3', 'add', '<a href=\"sections.php#add\">$lang_todo_03_content</a>')");
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('4', 'add', '<a href=\"topics.php\">$lang_todo_04_content</a>')");
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('5', 'add', '<a href=\"mail.php#1\">$lang_todo_05_content</a>')");
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('6', 'info', '<a href=\"mail.php#3\">$lang_todo_06_content</a>')");
	   	  mysql_query("INSERT INTO eblog_todo  VALUES ('7', 'info', '<a target=\"_blank\" href=\"http://www.emuci.com/home/register.php\">$lang_todo_07_content</a>')");	   	  
	   	  
	   	  mysql_query("INSERT INTO eblog_sync  VALUES ('1', '', '', '', '', '')");
	   	  
	   	  mysql_query("INSERT INTO eblog_sec2sync  VALUES ('1', '1')");

	   	  mysql_query("INSERT INTO eblog_alerts  VALUES ('1', '0', '0', '0','0')");
	   	  
	   	  mysql_query("INSERT INTO eblog_social  VALUES ('1', 'Facebook', 'http://www.facebook.com', 'images/social/facebook.png')");
	   	  mysql_query("INSERT INTO eblog_social  VALUES ('2', 'MySpace', 'http://www.myspace.com', 'images/social/myspace.png')");
	   	  mysql_query("INSERT INTO eblog_social  VALUES ('3', 'Twitter', 'http://www.twitter.com/emuci', 'images/social/twitter.png')");
	   	  mysql_query("INSERT INTO eblog_social  VALUES ('4', 'LinkedIn', 'http://www.linkedin.com', 'images/social/linkedin.png')");
	   	  mysql_query("INSERT INTO eblog_social  VALUES ('5', 'Flickr', 'http://www.flickr.com', 'images/social/flickr.png')");
	   	  mysql_query("INSERT INTO eblog_social  VALUES ('6', 'Deviantart', 'http://www.deviantart.com', 'images/social/deviantart.png')");
	   	  
	$HTML_NEW_PAGE = "
<html dir=\"ltr\">

<head>
<title>Sample Page</title>
</head>

<body>
<h1>External Pages</h1>

<div align=\"left\">
The support of External Pages page is one of the many cool features of eBlog. From the admin control panel, you can create your own pages and modify them the way you want using:
<br>
<ul>
<li>HTML Code</li>
<li>JavaScript</li>
<li>CSS</li>
<li>Ajax</li>
<li>and all other technologies</li>
</ul>
<br>

To add, edit or delete external pages, go to Sections and Pages. You can choose to add any page you create to the main menu in the home page. External pages can help you with:
<br>
<ul>
<li>Making a biography page</li>
<li>Using iFrames to display other PHP scripts running on your server</li>
<li>Creating forms</li>
<li>And much much more...</li>
</ul>

<br>

Check it out now!!
<br>&nbsp;
<br>&nbsp;
</div>

</body>
</html>	";	   	  
	   	  
	   	   mysql_query("INSERT INTO eblog_pages  VALUES ('1', '$lang_install_ep_nameI', '$HTML_NEW_PAGE', '', '1', '1','2', '1')");
	   	   mysql_query("INSERT INTO eblog_pages  VALUES ('2', '$lang_install_ep_nameII', '', '$lang_install_ep_discII', '1', '2','2', '1')");
	   	  
	   	  
			mysql_query("INSERT INTO eblog_countries VALUES ('1', 'United States')");
			mysql_query("INSERT INTO eblog_countries VALUES ('2', 'Canada')");
			mysql_query("INSERT INTO eblog_countries VALUES ('3', 'Mexico')");
			mysql_query("INSERT INTO eblog_countries VALUES ('4', 'Afghanistan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('5', 'Albania')");
			mysql_query("INSERT INTO eblog_countries VALUES ('6', 'Algeria')");
			mysql_query("INSERT INTO eblog_countries VALUES ('7', 'Andorra')");
			mysql_query("INSERT INTO eblog_countries VALUES ('8', 'Angola')");
			mysql_query("INSERT INTO eblog_countries VALUES ('9', 'Anguilla')");
			mysql_query("INSERT INTO eblog_countries VALUES ('10', 'Antarctica')");
			mysql_query("INSERT INTO eblog_countries VALUES ('11', 'Antigua and Barbuda')");
			mysql_query("INSERT INTO eblog_countries VALUES ('12', 'Argentina')");
			mysql_query("INSERT INTO eblog_countries VALUES ('13', 'Armenia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('14', 'Aruba')");
			mysql_query("INSERT INTO eblog_countries VALUES ('15', 'Ascension Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('16', 'Australia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('17', 'Austria')");
			mysql_query("INSERT INTO eblog_countries VALUES ('18', 'Azerbaijan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('19', 'Bahamas')");
			mysql_query("INSERT INTO eblog_countries VALUES ('20', 'Bahrain')");
			mysql_query("INSERT INTO eblog_countries VALUES ('21', 'Bangladesh')");
			mysql_query("INSERT INTO eblog_countries VALUES ('22', 'Barbados')");
			mysql_query("INSERT INTO eblog_countries VALUES ('23', 'Belarus')");
			mysql_query("INSERT INTO eblog_countries VALUES ('24', 'Belgium')");
			mysql_query("INSERT INTO eblog_countries VALUES ('25', 'Belize')");
			mysql_query("INSERT INTO eblog_countries VALUES ('26', 'Benin')");
			mysql_query("INSERT INTO eblog_countries VALUES ('27', 'Bermuda')");
			mysql_query("INSERT INTO eblog_countries VALUES ('28', 'Bhutan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('29', 'Bolivia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('30', 'Bophuthatswana')");
			mysql_query("INSERT INTO eblog_countries VALUES ('31', 'Bosnia-Herzegovina')");
			mysql_query("INSERT INTO eblog_countries VALUES ('32', 'Botswana')");
			mysql_query("INSERT INTO eblog_countries VALUES ('33', 'Bouvet Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('34', 'Brazil')");
			mysql_query("INSERT INTO eblog_countries VALUES ('35', 'British Indian Ocean')");
			mysql_query("INSERT INTO eblog_countries VALUES ('36', 'British Virgin Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('37', 'Brunei Darussalam')");
			mysql_query("INSERT INTO eblog_countries VALUES ('38', 'Bulgaria')");
			mysql_query("INSERT INTO eblog_countries VALUES ('39', 'Burkina Faso')");
			mysql_query("INSERT INTO eblog_countries VALUES ('40', 'Burundi')");
			mysql_query("INSERT INTO eblog_countries VALUES ('41', 'Cambodia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('42', 'Cameroon')");
			mysql_query("INSERT INTO eblog_countries VALUES ('44', 'Cape Verde Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('45', 'Cayman Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('46', 'Central Africa')");
			mysql_query("INSERT INTO eblog_countries VALUES ('47', 'Chad')");
			mysql_query("INSERT INTO eblog_countries VALUES ('48', 'Channel Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('49', 'Chile')");
			mysql_query("INSERT INTO eblog_countries VALUES ('50', 'China, Peoples Republic')");
			mysql_query("INSERT INTO eblog_countries VALUES ('51', 'Christmas Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('52', 'CocoS ('Keeling) Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('53', 'Colombia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('54', 'Comoros Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('55', 'Congo')");
			mysql_query("INSERT INTO eblog_countries VALUES ('56', 'Cook Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('57', 'Costa Rica')");
			mysql_query("INSERT INTO eblog_countries VALUES ('58', 'Croatia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('59', 'Cuba')");
			mysql_query("INSERT INTO eblog_countries VALUES ('60', 'Cyprus')");
			mysql_query("INSERT INTO eblog_countries VALUES ('61', 'Czech Republic')");
			mysql_query("INSERT INTO eblog_countries VALUES ('62', 'Denmark')");
			mysql_query("INSERT INTO eblog_countries VALUES ('63', 'Djibouti')");
			mysql_query("INSERT INTO eblog_countries VALUES ('64', 'Dominica')");
			mysql_query("INSERT INTO eblog_countries VALUES ('65', 'Dominican Republic')");
			mysql_query("INSERT INTO eblog_countries VALUES ('66', 'Easter Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('67', 'Ecuador')");
			mysql_query("INSERT INTO eblog_countries VALUES ('68', 'Egypt')");
			mysql_query("INSERT INTO eblog_countries VALUES ('69', 'El Salvador')");
			mysql_query("INSERT INTO eblog_countries VALUES ('70', 'England')");
			mysql_query("INSERT INTO eblog_countries VALUES ('71', 'Equatorial Guinea')");
			mysql_query("INSERT INTO eblog_countries VALUES ('72', 'Estonia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('73', 'Ethiopia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('74', 'Falkland Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('75', 'Faeroe Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('76', 'Fiji')");
			mysql_query("INSERT INTO eblog_countries VALUES ('77', 'Finland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('78', 'France')");
			mysql_query("INSERT INTO eblog_countries VALUES ('79', 'French Guyana')");
			mysql_query("INSERT INTO eblog_countries VALUES ('80', 'French Polynesia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('81', 'Gabon')");
			mysql_query("INSERT INTO eblog_countries VALUES ('82', 'Gambia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('83', 'Georgia Republic')");
			mysql_query("INSERT INTO eblog_countries VALUES ('84', 'Germany')");
			mysql_query("INSERT INTO eblog_countries VALUES ('85', 'Gibraltar')");
			mysql_query("INSERT INTO eblog_countries VALUES ('86', 'Greece')");
			mysql_query("INSERT INTO eblog_countries VALUES ('87', 'Greenland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('88', 'Grenada')");
			mysql_query("INSERT INTO eblog_countries VALUES ('89', 'Guadeloupe (French)')");
			mysql_query("INSERT INTO eblog_countries VALUES ('90', 'Guatemala')");
			mysql_query("INSERT INTO eblog_countries VALUES ('91', 'Guernsey Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('92', 'Guinea Bissau')");
			mysql_query("INSERT INTO eblog_countries VALUES ('93', 'Guinea')");
			mysql_query("INSERT INTO eblog_countries VALUES ('94', 'Guyana')");
			mysql_query("INSERT INTO eblog_countries VALUES ('95', 'Haiti')");
			mysql_query("INSERT INTO eblog_countries VALUES ('96', 'Heard and McDonald Isls')");
			mysql_query("INSERT INTO eblog_countries VALUES ('97', 'Honduras')");
			mysql_query("INSERT INTO eblog_countries VALUES ('98', 'Hong Kong')");
			mysql_query("INSERT INTO eblog_countries VALUES ('99', 'Hungary')");
			mysql_query("INSERT INTO eblog_countries VALUES ('100', 'Iceland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('101', 'India')");
			mysql_query("INSERT INTO eblog_countries VALUES ('102', 'Iran')");
			mysql_query("INSERT INTO eblog_countries VALUES ('103', 'Iraq')");
			mysql_query("INSERT INTO eblog_countries VALUES ('104', 'Ireland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('105', 'Isle of Man')");
			mysql_query("INSERT INTO eblog_countries VALUES ('106', 'Israel')");
			mysql_query("INSERT INTO eblog_countries VALUES ('107', 'Italy')");
			mysql_query("INSERT INTO eblog_countries VALUES ('108', 'Ivory Coast')");
			mysql_query("INSERT INTO eblog_countries VALUES ('109', 'Jamaica')");
			mysql_query("INSERT INTO eblog_countries VALUES ('110', 'Japan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('111', 'Jersey Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('112', 'Jordan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('113', 'Kazakhstan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('114', 'Kenya')");
			mysql_query("INSERT INTO eblog_countries VALUES ('115', 'Kiribati')");
			mysql_query("INSERT INTO eblog_countries VALUES ('116', 'Kuwait')");
			mysql_query("INSERT INTO eblog_countries VALUES ('117', 'Laos')");
			mysql_query("INSERT INTO eblog_countries VALUES ('118', 'Latvia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('119', 'Lebanon')");
			mysql_query("INSERT INTO eblog_countries VALUES ('120', 'Lesotho')");
			mysql_query("INSERT INTO eblog_countries VALUES ('121', 'Liberia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('122', 'Libya')");
			mysql_query("INSERT INTO eblog_countries VALUES ('123', 'Liechtenstein')");
			mysql_query("INSERT INTO eblog_countries VALUES ('124', 'Lithuania')");
			mysql_query("INSERT INTO eblog_countries VALUES ('125', 'Luxembourg')");
			mysql_query("INSERT INTO eblog_countries VALUES ('126', 'Macao')");
			mysql_query("INSERT INTO eblog_countries VALUES ('127', 'Macedonia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('128', 'Madagascar')");
			mysql_query("INSERT INTO eblog_countries VALUES ('129', 'Malawi')");
			mysql_query("INSERT INTO eblog_countries VALUES ('130', 'Malaysia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('131', 'Maldives')");
			mysql_query("INSERT INTO eblog_countries VALUES ('132', 'Mali')");
			mysql_query("INSERT INTO eblog_countries VALUES ('133', 'Malta')");
			mysql_query("INSERT INTO eblog_countries VALUES ('134', 'Martinique (French)')");
			mysql_query("INSERT INTO eblog_countries VALUES ('135', 'Mauritania')");
			mysql_query("INSERT INTO eblog_countries VALUES ('136', 'Mauritius')");
			mysql_query("INSERT INTO eblog_countries VALUES ('137', 'Mayotte')");
			mysql_query("INSERT INTO eblog_countries VALUES ('139', 'Micronesia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('140', 'Moldavia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('141', 'Monaco')");
			mysql_query("INSERT INTO eblog_countries VALUES ('142', 'Mongolia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('143', 'Montenegro')");
			mysql_query("INSERT INTO eblog_countries VALUES ('144', 'Montserrat')");
			mysql_query("INSERT INTO eblog_countries VALUES ('145', 'Morocco')");
			mysql_query("INSERT INTO eblog_countries VALUES ('146', 'Mozambique')");
			mysql_query("INSERT INTO eblog_countries VALUES ('147', 'Myanmar')");
			mysql_query("INSERT INTO eblog_countries VALUES ('148', 'Namibia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('149', 'Nauru')");
			mysql_query("INSERT INTO eblog_countries VALUES ('150', 'Nepal')");
			mysql_query("INSERT INTO eblog_countries VALUES ('151', 'Netherlands Antilles')");
			mysql_query("INSERT INTO eblog_countries VALUES ('152', 'Netherlands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('153', 'New Caledonia (French)')");
			mysql_query("INSERT INTO eblog_countries VALUES ('154', 'New Zealand')");
			mysql_query("INSERT INTO eblog_countries VALUES ('155', 'Nicaragua')");
			mysql_query("INSERT INTO eblog_countries VALUES ('156', 'Niger')");
			mysql_query("INSERT INTO eblog_countries VALUES ('157', 'Niue')");
			mysql_query("INSERT INTO eblog_countries VALUES ('158', 'Norfolk Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('159', 'North Korea')");
			mysql_query("INSERT INTO eblog_countries VALUES ('160', 'Northern Ireland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('161', 'Norway')");
			mysql_query("INSERT INTO eblog_countries VALUES ('162', 'Oman')");
			mysql_query("INSERT INTO eblog_countries VALUES ('163', 'Pakistan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('164', 'Panama')");
			mysql_query("INSERT INTO eblog_countries VALUES ('165', 'Papua New Guinea')");
			mysql_query("INSERT INTO eblog_countries VALUES ('166', 'Paraguay')");
			mysql_query("INSERT INTO eblog_countries VALUES ('167', 'Peru')");
			mysql_query("INSERT INTO eblog_countries VALUES ('168', 'Philippines')");
			mysql_query("INSERT INTO eblog_countries VALUES ('169', 'Pitcairn Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('170', 'Poland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('171', 'Polynesia (French)')");
			mysql_query("INSERT INTO eblog_countries VALUES ('172', 'Portugal')");
			mysql_query("INSERT INTO eblog_countries VALUES ('173', 'Qatar')");
			mysql_query("INSERT INTO eblog_countries VALUES ('174', 'Reunion Island')");
			mysql_query("INSERT INTO eblog_countries VALUES ('175', 'Romania')");
			mysql_query("INSERT INTO eblog_countries VALUES ('176', 'Russia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('177', 'Rwanda')");
			mysql_query("INSERT INTO eblog_countries VALUES ('178', 'S.Georgia Sandwich Isls')");
			mysql_query("INSERT INTO eblog_countries VALUES ('179', 'Sao Tome, Principe')");
			mysql_query("INSERT INTO eblog_countries VALUES ('180', 'San Marino')");
			mysql_query("INSERT INTO eblog_countries VALUES ('181', 'Saudi Arabia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('182', 'Scotland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('183', 'Senegal')");
			mysql_query("INSERT INTO eblog_countries VALUES ('184', 'Serbia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('185', 'Seychelles')");
			mysql_query("INSERT INTO eblog_countries VALUES ('186', 'Shetland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('187', 'Sierra Leone')");
			mysql_query("INSERT INTO eblog_countries VALUES ('188', 'Singapore')");
			mysql_query("INSERT INTO eblog_countries VALUES ('189', 'Slovak Republic')");
			mysql_query("INSERT INTO eblog_countries VALUES ('190', 'Slovenia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('191', 'Solomon Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('192', 'Somalia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('193', 'South Africa')");
			mysql_query("INSERT INTO eblog_countries VALUES ('194', 'South Korea')");
			mysql_query("INSERT INTO eblog_countries VALUES ('195', 'Spain')");
			mysql_query("INSERT INTO eblog_countries VALUES ('196', 'Sri Lanka')");
			mysql_query("INSERT INTO eblog_countries VALUES ('197', 'St. Helena')");
			mysql_query("INSERT INTO eblog_countries VALUES ('198', 'St. Lucia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('199', 'St. Pierre Miquelon')");
			mysql_query("INSERT INTO eblog_countries VALUES ('200', 'St. Martins')");
			mysql_query("INSERT INTO eblog_countries VALUES ('201', 'St. Kitts Nevis Anguilla')");
			mysql_query("INSERT INTO eblog_countries VALUES ('202', 'St. Vincent Grenadines')");
			mysql_query("INSERT INTO eblog_countries VALUES ('203', 'Sudan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('204', 'Suriname')");
			mysql_query("INSERT INTO eblog_countries VALUES ('205', 'Svalbard Jan Mayen')");
			mysql_query("INSERT INTO eblog_countries VALUES ('206', 'Swaziland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('207', 'Sweden')");
			mysql_query("INSERT INTO eblog_countries VALUES ('208', 'Switzerland')");
			mysql_query("INSERT INTO eblog_countries VALUES ('209', 'Syria')");
			mysql_query("INSERT INTO eblog_countries VALUES ('210', 'Tajikistan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('211', 'Taiwan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('212', 'Tahiti')");
			mysql_query("INSERT INTO eblog_countries VALUES ('213', 'Tanzania')");
			mysql_query("INSERT INTO eblog_countries VALUES ('214', 'Thailand')");
			mysql_query("INSERT INTO eblog_countries VALUES ('215', 'Togo')");
			mysql_query("INSERT INTO eblog_countries VALUES ('216', 'Tokelau')");
			mysql_query("INSERT INTO eblog_countries VALUES ('217', 'Tonga')");
			mysql_query("INSERT INTO eblog_countries VALUES ('218', 'Trinidad and Tobago')");
			mysql_query("INSERT INTO eblog_countries VALUES ('219', 'Tunisia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('220', 'Turkmenistan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('221', 'Turks and Caicos Isls')");
			mysql_query("INSERT INTO eblog_countries VALUES ('222', 'Tuvalu')");
			mysql_query("INSERT INTO eblog_countries VALUES ('223', 'Uganda')");
			mysql_query("INSERT INTO eblog_countries VALUES ('224', 'Ukraine')");
			mysql_query("INSERT INTO eblog_countries VALUES ('225', 'United Arab Emirates')");
			mysql_query("INSERT INTO eblog_countries VALUES ('226', 'Uruguay')");
			mysql_query("INSERT INTO eblog_countries VALUES ('227', 'Uzbekistan')");
			mysql_query("INSERT INTO eblog_countries VALUES ('228', 'Vanuatu')");
			mysql_query("INSERT INTO eblog_countries VALUES ('229', 'Vatican City State')");
			mysql_query("INSERT INTO eblog_countries VALUES ('230', 'Venezuela')");
			mysql_query("INSERT INTO eblog_countries VALUES ('231', 'Vietnam')");
			mysql_query("INSERT INTO eblog_countries VALUES ('232', 'Virgin IslandS ('Brit)')");
			mysql_query("INSERT INTO eblog_countries VALUES ('233', 'Wales')");
			mysql_query("INSERT INTO eblog_countries VALUES ('234', 'Wallis Futuna Islands')");
			mysql_query("INSERT INTO eblog_countries VALUES ('235', 'Western Sahara')");
			mysql_query("INSERT INTO eblog_countries VALUES ('236', 'Western Samoa')");
			mysql_query("INSERT INTO eblog_countries VALUES ('237', 'Yemen')");
			mysql_query("INSERT INTO eblog_countries VALUES ('238', 'Yugoslavia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('239', 'Zaire')");
			mysql_query("INSERT INTO eblog_countries VALUES ('240', 'Zambia')");
			mysql_query("INSERT INTO eblog_countries VALUES ('241', 'Zimbabwe')");
		  
	   mysql_close($conn);
	   	
	echo "
	<table width=\"100%\" height=\"150\" cellpadding=\"2\">

	
	
		
	<tr>
	<td valign=\"bottom\">
	<font size=\"1\">&nbsp;<br>&nbsp;<br>&nbsp;</font>
	</td>
	</tr>
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_imported1</font>
	</td>
	</tr>	
		
		
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_imported2</font>
	</td>
	</tr>
	
	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_imported3</font>
	</td>
	</tr>		
			
	
	<tr>
	<td colspan=\"2\" height=\"100%\">
	<font size=\"1\">&nbsp;</font>
	</td>
	</tr>
	
	</table>	
	";
	}
	else
	{
		echo "	<table width=\"100%\" height=\"150\" border=\"0\">
		<tr>
		<td>
		&nbsp;
		</td>
		</tr>		
		
		$universalError
		
		<tr height=\"100%\">
		<td>
		&nbsp;
		</td>
		</tr>
		
			
		</table>";
		
		$disabled = "disabled";
	}		
	}	
	
	
	
	
	// Step 6: Blog Settings
	else if($step==6){

	
	echo "
	<table width=\"100%\" height=\"150\" border=\"0\">
	
	<tr>
	<td>
	&nbsp;
	<br>
	&nbsp;
	</td>
	</tr>		
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_blog_name:</font>
	</td>
	<td>
	<input type=\"text\" name=\"blogName\" size=\"26\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\" value=\"eBolg\">	
	<input name=\"db\" type=\"hidden\" value=\"$erorrCode\">	
	</td>
	</tr>
	
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_blog_url:</font>
	</td>
	<td>
	<input type=\"text\" name=\"url\" size=\"26\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\" value=\"\">	
	</td>
	</tr>
	

	<tr>
	<td>
	<font size=\"1\">&nbsp;</font>
	</td>
	<td>
	<font size=\"1\" color=\"grey\">$lang_install_example: http://www.example.com/</font>		
	</td>
	</tr>		
			
	<tr height=\"100%\">
	<td>
	&nbsp;
	</td>
	</tr>
	
		
	</table>
	";
	}
		
	
	
	
	// Step 7: Setup an Admin
	else if($step==7){
	
	$blogName = htmlspecialchars($_POST["blogName"]);
	$url = htmlspecialchars($_POST["url"]);

	
	// Connect to DB
	   $conn = @mysql_connect($dbhost, $dbuser, $dbpass);
	   @mysql_select_db($dbname);
	   
	
	if($conn){       	
	//insert data to DB
	$query = "UPDATE eblog_settings SET `site_name` = '$blogName' WHERE `id` = '1'";
	mysql_query($query);
	$query = "UPDATE eblog_settings SET `site_url` = '$url' WHERE `id` = '1'";
	mysql_query($query);	
	mysql_close($conn);
	
			
	echo "<table width=\"100%\" height=\"150\" border=\"0\">
	
	<tr>
	<td>
	<font size=\"2\">&nbsp;<br>&nbsp;</font>
	</td>
	</tr>
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_admin_username:</font>
	</td>
	<td>
	<input type=\"text\" name=\"username\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\">	
	</td>
	</tr>
	
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_admin_password:</font>
	</td>
	<td>
	<input type=\"text\" name=\"password\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\">	
	</td>
	</tr>	
	
	
	<tr>
	<td>
	<font size=\"2\">$lang_install_admin_email:</font>
	</td>
	<td>
	<input type=\"text\" name=\"email\" size=\"19\" style=\"font-family: Tahoma; font-size: 12px; color: #000000; border: 1px solid #000000; background-color: #cbcaca\">	
	</td>
	</tr>		
			
	<tr height=\"100%\">
	<td>
	&nbsp;
	</td>
	</tr>
	
		
	</table>

	";
	}
	else
	{
		echo "	<table width=\"100%\" height=\"150\" border=\"0\">
		<tr>
		<td>
		&nbsp;
		</td>
		</tr>		
		
		$universalError
		
		<tr height=\"100%\">
		<td>
		&nbsp;
		</td>
		</tr>
		
			
		</table>";
		
		$disabled = "disabled";
	}	
	}
	
	
	
	
	
	
	

	

	
	// Step 8: Installation Done
	else if($step==8){
	
	$username = $_POST["username"];
	$password = md5($_POST["password"]);
	$email = $_POST["email"];
	
	// Connect to DB
	   $conn = @mysql_connect($dbhost, $dbuser, $dbpass);
	   @mysql_select_db($dbname);
	   
	if($conn){       	
	//insert data to DB
	$query = "UPDATE eblog_settings SET `admin_username` = '$username' WHERE `id` = '1'";
	mysql_query($query);
	$query = "UPDATE eblog_settings SET `admin_password` = '$password' WHERE `id` = '1'";
	mysql_query($query);
	$query = "UPDATE eblog_settings SET `admin_email` = '$email' WHERE `id` = '1'";
	mysql_query($query);		
	mysql_close($conn);
		
	
	echo "
	<table width=\"100%\" height=\"150\" cellpadding=\"4\">

	<tr>
	<td>
	&nbsp;
	</td>
	</tr>	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_approve.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_done</font>
	</td>
	</tr>	
	
	
	<tr>
	<td valign=\"top\">
	<img src=\"../images/icons/icon_info.gif\">
	</td>
	<td>
	<font size=\"2\">$lang_install_alert</font>
	</td>
	</tr>		
		
			
	
	<tr>
	<td colspan=\"2\" height=\"100%\">
	<font size=\"1\">&nbsp;</font>
	</td>
	</tr>	
	
	</table>	
	";
	}
	else
	{
		echo "	<table width=\"100%\" height=\"150\" border=\"0\">
		<tr>
		<td>
		&nbsp;
		</td>
		</tr>		
		
		$universalError
		
		<tr height=\"100%\">
		<td>
		&nbsp;
		</td>
		</tr>
		
			
		</table>";
		
		$disabled = "disabled";
	}		
	}
	
	
	
	// Step 9: Redirecting
	else if($step==9){
	echo "<meta http-equiv=\"refresh\" content=\"0;url=../admin/index.php\">";
	}	
	
	
	
	
	// Step X : Unknown
	else
	{
	   echo "<meta http-equiv=\"refresh\" content=\"0;url=index.php?step=1\">";
	}

	
				
	
	// Show Footer
	echo "</td>
	      </tr>
	      </table>
	      </center>
		  </td></tr>
		  <tr><td height=\"50\"><center><input type=\"submit\" value=\"$lang_install_nextStep\" $disabled></center></td></tr>
		  </table>
		  </font>
		  </div>
		  </body>
		  </html>
		";
	

?>

Return current item: eBlog