Location: PHPKode > scripts > Open4Listing > install/index.php
<?php
include("../setari.php");
if($_POST[submit])
{
$error=0;
if($_POST[parola] != $_POST[pass])
{
die("<font color=red face=verdana size=1><b>Wrong password verification!<br>Press back and try again!</font><br><br>");
}
if(!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $_POST[email])) 
{ 
die("<font color=red face=verdana size=1><b>Wrong email adress!<br>Press back and try again!</font><br><br>");
} 
if(!trim($_POST[parola]))
{
die("<font color=red face=verdana size=1><b>Wrong password verification!<br>Press back and try again!</font><br><br>");
}

$cxn = @ConnectToDb($dbServer, $dbUser9, $dbPass9, $dbName9);
if($error==0)
{
$insta1=mysql_query("
CREATE TABLE IF NOT EXISTS clienti (
`id` int(5) NOT NULL auto_increment,
  `nume` varchar(100) NOT NULL default '',
  `telefon` varchar(1000) NOT NULL default '',
  `fax` varchar(100) NOT NULL default '',
  `adresa` text NOT NULL,
  `companie` text NOT NULL,
  `email` varchar(60) NOT NULL default '',
  `parola` varchar(15) NOT NULL default '',
  `tipcont` varchar(5) NOT NULL default 'moka',
  `currency` varchar(30) NOT NULL,
  `system` varchar(30) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `email` (`email`))")or die("Install failed 1");
  
$insta2=mysql_query("

CREATE TABLE IF NOT EXISTS judete (
 `id` int(11) NOT NULL auto_increment,
  `judete` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 2");  


$insta3=mysql_query("CREATE TABLE IF NOT EXISTS localitati (
   `id` int(5) NOT NULL auto_increment,
  `localitate` varchar(50) NOT NULL default '',
  `judet` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 3");

$insta4=mysql_query("
CREATE TABLE IF NOT EXISTS oferte (
  `idoferta` int(11) NOT NULL auto_increment,
  `idclient` int(10) NOT NULL default '0',
  `tranzactie` varchar(40) NOT NULL default '',
  `judet` varchar(40) NOT NULL default '',
  `titlu` varchar(100) NOT NULL,
  `suprafata` varchar(30) NOT NULL default '',
  `descriere` text NOT NULL,
  `pret` varchar(30) NOT NULL default '',
  `moneda` varchar(40) NOT NULL,
  `contact` text NOT NULL,
  `adaugat` date NOT NULL default '0000-00-00',
  `poza1` char(2) NOT NULL default 'nu',
  `poza2` char(2) NOT NULL default 'nu',
  `poza3` char(2) NOT NULL default 'nu',
  `poza4` char(2) NOT NULL default 'nu',
  `poza5` char(2) NOT NULL default 'nu',
  `rank` int(1) NOT NULL default '3',
  `pass` varchar(20) NOT NULL default '',
   PRIMARY KEY  (`idoferta`))")or die("Install failed 4");
  
$insta5=mysql_query(" 
CREATE TABLE IF NOT EXISTS poza1 (
   `id` int(11) NOT NULL default '0',
  `poza` mediumblob NOT NULL,
  `imgtype` varchar(16) NOT NULL,
  `pass` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 5");
  
  
$insta6=mysql_query(" 
CREATE TABLE IF NOT EXISTS poza2 (
   `id` int(11) NOT NULL default '0',
  `poza` mediumblob NOT NULL,
  `imgtype` varchar(16) NOT NULL,
  `pass` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 6");
  

$insta7=mysql_query(" 
CREATE TABLE IF NOT EXISTS poza3 (
   `id` int(11) NOT NULL default '0',
  `poza` mediumblob NOT NULL,
  `imgtype` varchar(16) NOT NULL,
  `pass` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 7");
  
  
$insta8=mysql_query(" 
CREATE TABLE IF NOT EXISTS poza4 (
   `id` int(11) NOT NULL default '0',
  `poza` mediumblob NOT NULL,
  `imgtype` varchar(16) NOT NULL,
  `pass` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 8"); 
  
$insta9=mysql_query(" 
CREATE TABLE IF NOT EXISTS poza5 (
   `id` int(11) NOT NULL default '0',
  `poza` mediumblob NOT NULL,
  `imgtype` varchar(16) NOT NULL,
  `pass` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`))")or die("Install failed 9"); 
 
 
$insert="INSERT INTO clienti (email, parola, nume, fax, companie, adresa)VALUES('$_POST[email]', '$_POST[parola]', 'Your Company Name', 'your website is ready to use', 'Hello world!
You can change this text, your company name and contact details from your admin area (yourwebsite.com/admin)
For more info, please visit http://www.open4listing.com', 'This is your contact page area')";
$rsult = mysql_query($insert) or die("Query failed aici7");



header("Location: success.php");

MYSQL_CLOSE();

}}

else {













?>











<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd"> 



<html>

<head>

</head>



<body bgcolor="#333333">



<div align="left">

	<div align="center">

	&nbsp;<p>&nbsp;</p>

	<table border="0" width="600" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">

		<tr>

			<td>

			<table border="0" width="100%" cellspacing="0" cellpadding="0">

				<tr>

					<td bgcolor="#FFFFFF">

<table border="0" width="100%" cellspacing="0" cellpadding="0">	

	</table>

					</td>

				</tr>

				<tr>

					<td bgcolor="#FFFFFF">

					<table border="0" width="100%" cellspacing="0" cellpadding="0">

						<tr>

							<td width="100%" align="right" bgcolor="#FFFFFF" valign="top">

							<div align="center">

								<table border="0" width="100%" cellspacing="0" cellpadding="0" align=center>

											<tr><td bgcolor="#FFFFFF">

	

	

	

	<div align="center">

												<table border="0" width="100%" cellspacing="1" cellpadding="4">

													<tr>

														<td bgcolor="#CC3300">

														<p style="margin-top: 0; margin-bottom: 0" align="left">

														<b>
														<font color="#FFFFFF" face="Arial">
														First Time Installation</font></b></td>

													</tr>

												</table>

												<p style="margin-top: 0; margin-bottom: 0" align="left">&nbsp;</p>
												<p style="margin-top: 0; margin-bottom: 0" align="left">&nbsp;</p>

	

	

	

	<table border="0" width="90%" cellpadding="4" cellspacing="4">

		<tr>

			<td bgcolor="#333333" colspan="3">

			<p align="left" style="margin-top: 0; margin-bottom: 0"><b>
			<font face="Arial" size="2" color="#FFFFFF">Create Admin User:</font></b></td>

			</tr>

<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">

		<tr>

			<td bgcolor="#E4ECFA" width="180" align="left">

			<p style="margin-top: 0; margin-bottom: 0"><b>

			<font size="1" face="Verdana" color="#333333">Email*</font></b></p>

			</td>

			<td width="187" bgcolor="#E4ECFA" align="left">

			<p style="margin-top: 0; margin-bottom: 0">

			<font size="1" face="Verdana" color="#FFFFFF">

			<input name="email" size="23" style="font-weight: 700"></font></td>

			<td width="139" bgcolor="#E4ECFA" rowspan="3" align="left">

			<p align="center" style="margin-top: 0; margin-bottom: 0"><b>

			<font face="Verdana" size="1">Sign In info!</font></b></td>

		</tr>

		<tr>

			<td bgcolor="#E4ECFA" width="180" align="left">

			<p style="margin-top: 0; margin-bottom: 0"><b>

			<font size="1" face="Verdana" color="#333333">Password*</font></b><p style="margin-top: 0; margin-bottom: 0">

			<span class="standard"><span class="note">

			<font size="1" face="Verdana">5 characters or longer</font></span></span></td>

			<td width="187" bgcolor="#E4ECFA" align="left">

			<p style="margin-top: 0; margin-bottom: 0">

			<font size="1" face="Verdana" color="#FFFFFF">

			<input name="parola" size="23" style="font-weight: 700" type="password"></font></td>

		</tr>

		<tr>

			<td bgcolor="#E4ECFA" width="180" align="left">

			<p style="margin-top: 0; margin-bottom: 0">

			<font size="1" face="Verdana">Confirm Password:</font><b><font size="1" face="Verdana" color="#333333">*</font></b></p>

			<p style="margin-top: 0; margin-bottom: 0"><span class="standard">

			<font size="1" face="Verdana">Type </font></span><b>

			<font size="1" face="Verdana" color="#333333">Password</font></b><span class="standard"><font size="1" face="Verdana"> 

			again</font></span></td>

			<td width="187" bgcolor="#E4ECFA" align="left">

			<p style="margin-top: 0; margin-bottom: 0">

			<font size="1" face="Verdana" color="#FFFFFF">

			<input name="pass" size="23" style="font-weight: 700" type="password"></font></td>

		</tr>

	</table>

	

	

												<p>

												&nbsp;</p>

												<p>

	

	

	<input type="submit" name="submit" value="Install my website">

	</form>

												</p>
												<p>

	

	

	&nbsp;</p>

		</div>

												</td></tr>						

									

								</table>

								</div>

							</td>

						</tr>

					</table>

					</td>

				</tr>

			</table>

			</td>

		</tr>

	</table>

	</div>

</div>




</body>



</html>

<?php }?>
Return current item: Open4Listing