Hallo ik heb een berichten balk script maar hier zit een fout in weet jullie wat die fout is
het is een install.php script
fout melding is
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/....../domains/......../public_html/berichtenbalk/install.php on line 146
PHP
<style type='text/css'>
/* voor de <input> <select>, <option> en <textarea>*/
input, option, textarea, select{
font-family: Tahoma;
font-size: 11px;
color: #000000;
font-weight: none;
border: 1px solid #fcaeae;
background-color: #fae9e9;
}
/* de links zonder mouse-over */
a:link, a:visited {
color: #f88e8e;
text-decoration: none;
}
/* de links als je er met je muis overheen gaat */
a:hover {
color: #f95757;
text-decoration: underline;
}
/* de links als je er op drukt */
a:active {
color: #666666;
text-decoration: none;
}
table{
FONT-SIZE: 11px;
color: #000000;
FONT-FAMILY: Tahoma;
BORDER: 1px solid #fc1111;
background-color: #fcc7c7;
}
body{
font-family: Tahoma;
color: #000000;
font-size: 11px;
}
</style>
<?php
$tText['mysql'] = "
<table width='100%' >
<tr >
<td >Er is geen verbinding gemaakt met MySQL. Installeer je Berichtenbalk automatisch via Sql.Sql. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >";
$tText['invullen'] = "
<table width='100%' >
<tr >
<td >Je moet alle (verplichte) velden invullen. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >";
$tText['fopen'] = "
<table width='100%' >
<tr >
<td >Config.php kon niet geopend worden. Plaats alle info handmatig. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >" ;
$tText['fwrite'] = "
<table width='100%' >
<tr >
<td >Er is niks in config.php geschreven. Plaats alle info handmatig. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >" ;
$tText['gelukt'] = "
<table width='100%' >
<tr >
<td >Je Berichtenbalk is succesvol geinstalleerd. <a href='index.php' >Ga naar je Berichtenbalk!</a ></td >
</tr >
</table >" ;
$tText['mysql_create'] = "
<table width='100%' >
<tr >
<td >De MySQL tabellen konden niet gemaakt worden. Installeer je Berichtenbalk automatisch via Sql.Sql. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >" ;
$tText['mysql_delete'] = "
<table width='100%' >
<tr >
<td >De MySQL tabellen konden niet verwijdert worden. Installeer je Berichtenbalk automatisch via Sql.Sql. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >" ;
$tText['mysql_delete'] = "
<table width='100%' >
<tr >
<td >Install.php kon niet verwijdert worden. Verwijder de file handmatig. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >" ;
$tText['mysql_insert'] = "
<table width='100%' >
<tr >
<td >Er kon niks in je mysql tabellen geplaatst worden. Voer Sql.Sql handmatig uit. <a href='javascript:history.back()' >Ga terug.</a ></td >
</tr >
</table >" ;
if ( isset ( $_POST['submit'] ) )
{
if( !@mysql_connect ( $_POST['mysql_host'] , $_POST['mysql_user'] , $_POST['mysql_pass'] ) OR !mysql_select_db ( $_POST['mysql_db'] ) )
{
echo $tText['mysql'] ;
exit();
}
if ( empty ( $_POST['admin_login'] ) OR empty ( $_POST['admin_pass'] ) )
{
echo $tText['invullen'] ;
exit();
}
if ( $Fopen = fopen ( 'config.php' , 'r' ) == FALSE )
{
echo $tText['fopen'] ;
exit();
}
$Fopen = fopen('config.php', 'w') ;
$Fwrite = "<?php
/***************************************
****************************************
Page: config.php
Created by: ......
****************************************
***************************************/
session_start ( ) ;
ob_start ( ) ;
$cConnect['host'] = '" . $_POST['mysql_host'] . "';
$cConnect['user'] = '" . $_POST['mysql_user'] . "';
$cConnect['pass'] = '" . $_POST['mysql_pass'] . "';
$cConnect['db'] = '" . $_POST['mysql_db'] . "';
@mysql_connect ( $cConnect['host'] , $cConnect['user'] , $cConnect['pass'] ) or die ( 'Kon niet verbinden met MySQL.' ) ;
@mysql_select_db ( $cConnect['db'] ) or die ( 'Kon niet verbinden met de DataBase.' ) ;
?>";
if ( @fwrite ( $Fopen , $Fwrite ) == FALSE )
{
echo $tText['fwrite'] ;
exit();
}
if ( @mysql_query ( "
DROP TABLE IF EXISTS `text`;" ) == FALSE OR @mysql_query ( "
DROP TABLE IF EXISTS `scheld`;" ) == FALSE OR @mysql_query ( "
DROP TABLE IF EXISTS `ban`;" ) == FALSE OR @mysql_query ( "
DROP TABLE IF EXISTS `instellingen`;" ) == FALSE )
{
echo $tText['mysql_delete'] ;
exit();
}
if ( @mysql_query ( "
CREATE TABLE `text` (
`id` INT NOT NULL AUTO_INCREMENT ,
`naam` VARCHAR( 150 ) NOT NULL ,
`email` VARCHAR( 150 ) NOT NULL ,
`homepage` VARCHAR( 150 ) NOT NULL ,
`bericht` TEXT NOT NULL ,
`datum` DATETIME NOT NULL ,
`ip` VARCHAR( 11 ) NOT NULL ,
PRIMARY KEY ( `id` )
) TYPE = MYISAM ;" ) == FALSE OR @mysql_query ("
CREATE TABLE `ban` (
`id` INT NOT NULL AUTO_INCREMENT ,
`ip` VARCHAR( 11 ) NOT NULL ,
PRIMARY KEY ( `id` )
) TYPE = MYISAM ;" ) == FALSE OR @ mysql_query ( "
CREATE TABLE `scheld` (
`id` INT NOT NULL AUTO_INCREMENT ,
`woord` VARCHAR( 150 ) NOT NULL ,
`vervang` VARCHAR( 150 ) NOT NULL ,
PRIMARY KEY ( `id` )
) TYPE = MYISAM ;" ) == FALSE OR @mysql_query ( "
CREATE TABLE `instellingen` (
`scheidingsteken` VARCHAR( 150 ) NOT NULL ,
`scheidingsteken_wat` VARCHAR( 150 ) NOT NULL ,
`login` VARCHAR( 15 ) NOT NULL ,
`pass` VARCHAR( 32 ) NOT NULL
) TYPE = MYISAM ;" ) == FALSE )
{
echo $tText['mysql_create'] ;
exit();
}
if ( @mysql_query ( "
INSERT INTO text ( naam , bericht , datum , ip )
VALUES (
'Marten' ,
'Jou Berichtenbalk is succesvol geinstalleerd. Veel plezier ermee!' ,
'" . date ( 'Y-m-d H:i:s' ) . "' ,
'" . $_SERVER['REMOTE_ADDR'] . "' )" ) == FALSE OR @mysql_query ( "
INSERT INTO instellingen ( scheidingsteken , scheidingsteken_wat , login , pass )
VALUES (
'scheidingsteken.png' ,
'img' ,
'" . $_POST['admin_login'] . "' ,
'" . md5 ( $_POST['admin_pass'] ) . "' )" ) == FALSE )
{
echo $tText['mysql_insert'] ;
exit();
}
if ( unlink ( 'install.php' ) == FALSE )
{
echo $tText['unlink'] ;
exit();
}
Echo $tText['gelukt'] ;
}
else
{
echo "
<form method='post' action='' >
<table width='100%' >
<tr >
<td colspan='2' >Welkom, dit is de install-file. Hier kun je je Berichtenbalk installeren.<br ></td >
</tr >
<tr >
<td colspan='2' ><b >MySQL Connectie's:</b ></td >
</tr >
<tr >
<td >Host:</td >
<td ><input type='text' name='mysql_host' ></td >
</tr >
<tr >
<td >Username:</td >
<td ><input type='text' name='mysql_user' ></td >
</tr >
<tr >
<td >Pass:</td >
<td ><input type='password' name='mysql_pass' ></td >
</tr >
<tr >
<td >Database:</td >
<td ><input type='text' name='mysql_db' ><br ></td >
</tr >
<tr >
<td colspan='2' ><b >Admin Gegevens:</b ></td >
</tr >
<tr >
<td >Loginnaam:</td >
<td ><input type='text' name='admin_login' ></td >
</tr >
<tr >
<td >Wachtwoord:</td >
<td ><input type='password' name='admin_pass' ><br ></td >
</tr >
<tr >
<td > </td >
<td ><input type='submit' name='submit' value='Installeer!' ><br ></td >
</tr >
</table >
</form >";
}
?>
Toon Meer
of als iemand de config file kan schrijven dan is het ook opgelost
maar ik weet ni wat er in moet staan