Jump to content

Displaying CSS + PHP problem


StarCrystal

Recommended Posts

I want to incorporate this CSS link with the following PHP pages:

http://www.inevitable-fear.org/jybosch/fanlisting/reset_password.php

http://www.inevitable-fear.org/jybosch/fanlisting/reset/upate_member.php

 

But I can't seem to get it to work.. Also, when I edited the update_member page and it changed the format like the breaklines :\ Then, I get an error on one of the lines and the whole page doesn't show up.

 

Any help is appreciated ^^; Thanks.

 

 

reset_password

<?php

/*****************************************************************************

Enthusiast: Fanlisting Management System

Copyright (c) by Angela Sabas

http://scripts.indisguise.org



This script is made available for free download, use, and modification as

long as this note remains intact and a link back to

http://scripts.indisguise.org/ is given. It is hoped that the script

will be useful, but does not guarantee that it will solve any problem or is

free from errors of any kind. Users of this script are forbidden to sell or

distribute the script in whole or in part without written and explicit

permission from me, and users agree to hold me blameless from any

liability directly or indirectly arising from the use of this script.



For more information please view the readme.txt file.

******************************************************************************/

require_once( 'config.inc.php' );



$show_form = true;

$message = '';



if( isset( $_POST["email"]                     ) && $_POST["email"]                     != '' ) {



$email = $_POST["email"]                    ;

$show_form = false;



// create password

$password = '';

$k = 0;

while( $k <= 10 ) {

	$password .= chr( rand( 97, 122 ) );

	$k++;

	}



// create sql query

$query = 'UPDATE ' . $db_table . ' SET password = PASSWORD( "' .

	$password . '" ) WHERE email = "' . $email . '"';



$db_link = mysql_connect( $db_server, $db_user, $db_password )

	or die( 'Cannot connect to the database. Try again.' );

mysql_select_db( $db_database )

	or die( 'Cannot connect to the database. Try again.' );



mysql_query( $query );

$affected_rows = mysql_affected_rows();



if( $affected_rows > 0 ) {

	$show_form = false;



	$to = $email;

	$subject = $fanlisting_title .

		' FL: Password reset';

	$headers = "From: " . $fanlisting_title . " <" .

		$fanlisting_email . ">\r\n";



	$lostpass_file = $backend_dir . 'emails/lostpass.txt';

	$lostpass_email = fopen( $lostpass_file, 'r' );

	$body = fread( $lostpass_email, filesize(

		$lostpass_file ) );

	fclose( $lostpass_email );



	require_once( $backend_dir . 'parse_email.php' );

	$body = parse_email( $body, $to, $password );



	$success_mail = mail( $to, $subject, $body,

		$headers );



	if( $success_mail ) {

?>

		<p>

		Your password has been successfully reset

		and an email has been sent to you containing the

		generated password.

		</p>

<?php

		}

	else {

?>

		<p>

		Your password has been successfully reset,

		however, there was a problem sending you an

		email regarding this. Please contact us instead by

		<a href="mailto:<?= str_replace( '@', '{ at }',

		$fanlisting_email ) ?>">email</a>.

		</p>

<?php

		}

	}

else {

?>

	<p>

	There was an error in your request to reset your

	password. This may be because there is no member

	recorded in the <?= $listing_type ?> with that email address.

	Please check your spelling and try again.

	</p>

<?php

	$show_form = true;

	} // end of if email and password is present



mysql_close( $db_link );



} // end of if update = yes



if( $show_form ) {

?>

<p>

If you have lost or forgotten your password, you can reset your

password using this form. The new generated password will be sent to

you, and we advise you to immediately change/update your password

once you receive this.

</p>



<p>

Enter your email address on the field below to generate

a password.

</p>



<p>

<b><?= $message ?></b>

</p>



<form method="post" action="<?= $lostpass_url ?>">



<p class="noindent">

Email address:<br />

<input type="text" name="email" />

<input type="submit" value="Reset my password" />

</p>



</form>



<?php

}

?>

 

 

update_member

<?php/***************************************************************************** Enthusiast: Fanlisting Management System Copyright (c) by Angela Sabas http://scripts.indisguise.org This script is made available for free download, use, and modification as long as this note remains intact and a link back to http://scripts.indisguise.org/ is given. It is hoped that the script will be useful, but does not guarantee that it will solve any problem or is free from errors of any kind. Users of this script are forbidden to sell or distribute the script in whole or in part without written and explicit permission from me, and users agree to hold me blameless from any liability directly or indirectly arising from the use of this script. For more information please view the readme.txt file.******************************************************************************/require_once( 'config.inc.php' );$show_form = true;$message = '';$old_email = '';$new_name = '';$new_email = '';$new_country = '';$new_url = '';$delete_url = 0;if( $additional_field ) {	$additional_fields = array();	foreach( $additional_field_names as $field )		$additional_fields["$field"]                     = ' ';	}if( isset( $_POST["update"]                     ) && $_POST["update"]                     == "yes" ) {	$old_email = $_POST["old_email"]                    ;	$old_password = $_POST["old_password"]                    ;	$new_email = $_POST["new_email"]                    ;	$new_password = $_POST["new_password"]                    ;	$new_vpassword = $_POST["new_vpassword"]                    ;	$new_name = $_POST["new_name"]                    ;	if( isset( $_POST["new_country"]                     ) )		$new_country = $_POST["new_country"]                    ;	$new_url = $_POST["new_url"]                    ;	$new_show_email = $_POST["new_show_email"]                    ;	if( isset( $_POST["delete_url"]                     ) )		$delete_url = $_POST["delete_url"]                    ;	if( $additional_field ) {		foreach( $additional_field_names as $field ) {			$additional_fields["$field"]                     = $_POST["new_$field"]                    ;			}		}	if( !( $old_email ) && !( $old_password ) ) {		$message = 'You must enter your old email and your old ' .			'password to verify your request for information ' .			'update.';		}	elseif( $new_password && $new_vpassword &&		$new_password != $new_vpassword ) {		$message = 'Your new password does not match the ' .			'verification. Please retype your new password.';		}	else {		$show_form = false;		// create sql query		$query = 'UPDATE ' . $db_table . ' SET ';		if( $new_email )			$query .= 'email = "' . $new_email . '",';		if( $new_name )			$query .= 'name = "' . $new_name . '",';		if( $new_country )			$query .= 'country = "' . $new_country . '",';		if( $new_password && $new_password == $new_vpassword )			$query .= 'password = PASSWORD( "' .				$new_password . '" ),';		if( $new_show_email != 2 )			$query .= 'showemail = ' . $new_show_email . ',';		if( $delete_url == 1 )			$query .= 'url = NULL,';		elseif( $new_url )			$query .= 'url = "' . $new_url . '",';		if( $additional_field ) {			reset( $additional_fields );			do {				if( current( $additional_fields ) ==					'deletethisfield' )					$query .= $db_table . '.' .						key( $additional_fields ) . ' = NULL,';				else if(current($additional_fields) != '' &&                                   current($additional_fields) != ' ' )					$query .= $db_table . '.' .						key( $additional_fields ) . ' = "' .						current( $additional_fields ) . '",';				} while( next( $additional_fields ) );			}		$query = rtrim( $query, ',' );		$query .= ' WHERE email = "' . $old_email . '" AND password ' .			'= PASSWORD( "' . $old_password . '" )';		$db_link = mysql_connect( $db_server, $db_user, $db_password )			or die( 'Cannot connect to the database. Try again.' );		mysql_select_db( $db_database )			or die( 'Cannot connect to the database. Try again.' );		mysql_query( $query );		$affected_rows = mysql_affected_rows();		mysql_close( $db_link );		if( $affected_rows > 0 ) {			$show_form = false;			if( $new_email )				$to = $new_email;			else				$to = $old_email;			$subject = $fanlisting_title .				' FL: Information change';			$headers = "From: " . $fanlisting_title . " <" .				$fanlisting_email . ">\r\n";			$update_file = $backend_dir . 'emails/update.txt';			$update_email = fopen( $update_file, 'r' );			$message = fread( $update_email, filesize(				$update_file ) );			fclose( $update_email );			require_once( $backend_dir . 'parse_email.php' );			$message = parse_email( $message, $to, $new_password );			$success_mail = mail( $to, $subject, $message,				$headers );			if( $success_mail ) {?>				<p>				Your information has been successfully changed				and an email has been sent to you regarding				these changes.				</p><?php				}			else {?>				<p>				Your information has been successfully changed,				however, there was a problem sending you an				email regarding these changes. You can check				if your changes has been successfully				stored by looking for your fan record at				the <a href="<?= $list_url ?>">fan list</a>				instead.				</p><?php				}			}		else {?>			<p>			There was an error in your request to update your			information. Please check your email and password and			try again.			</p><?php			}		} // end of if email and password is present	} // end of if update = yesif( $show_form ) {?>	<p>	If you're a member of the <?= $listing_type ?> and you want to modify	your information listed here, please fill out the form below. Your	[old] email address and password is required for this form.	</p>	<p>	<b>Important:</b> Leave the fields you wish unchanged blank, and hit	submit only once when you are sure you want to change your	information.	</p>	<p>	<b><?= $message ?></b>	</p>	<p>	<a href="<?= $join_url ?>">If you want to join the <?= $listing_type	?>, please use this other form.</a>	</p>	<form method="post" action="<?= $update_url ?>">	<input type="hidden" name="update" value="yes" />	<p class="noindent">	* Old email address:<br />	<input type="text" name="old_email" value="<?= $old_email ?>" />	</p>	<p class="noindent">	* Current password: (<a href="<?= $lostpass_url ?>">Lost it?</a>)<br />	<input type="password" name="old_password" />	</p>	<p class="noindent">	New name:<br />	<input type="text" name="new_name" />	</p>	<p class="noindent">	New email address:<br />	<input type="text" name="new_email" />	</p>	<p class="noindent">	New password (type twice):<br />	<input type="password" name="new_password" />	<input type="password" name="new_vpassword" />	</p>	<p class="noindent">	Show email address?<br />	<input type="radio" name="new_show_email" value="2" checked="checked"		class="noborder" /> Leave it as it is<br />	<input type="radio" name="new_show_email" value="1" class="noborder" />		Yes (SPAM-protected on the site)<br />	<input type="radio" name="new_show_email" value="0" class="noborder" />		No	</p><?php	if( !isset( $disable_country ) || !$disable_country ) {?>		<p class="noindent">		New country<br />		<select name="new_country">		<option value=""></option><?php		include $backend_dir . 'countries.inc.php';?>		</select>		</p><?php		}?>	<p class="noindent">	New website URL:<br />	<input type="text" name="new_url" /><br />	<input type="checkbox" name="delete_url" value="1" class="noborder" />		Delete your website?	</p><?php	if( $additional_field ) {		reset( $additional_fields );		do {?>			<p class="noindent">			New <?= key( $additional_fields ) ?>:<br />			<input type="text" name="new_<?=				key( $additional_fields ) ?>" value="<?=				current( $additional_fields ) ?>" /><br />			<input type="checkbox" name="new_<?=				key( $additional_fields ) ?>"				value="deletethisfield" /> Delete <?=				key( $additional_fields ) ?>			</p><?php			} while( next( $additional_fields ) );		}?>	<p class="noindent">	<input type="submit" value="Modify my information" />	</p>	</form><?php	}?>

Link to comment
Share on other sites

I used <link rel="stylesheet" type="text/css" href="http://www.inevitable-fear.org/jybosch/css_old.css"> before the php codes, but I still get line errors..

 

Warning: Unterminated comment starting line 4 in /home/inev/public_html/jybosch/fanlisting/update_member.php on line 4

 

Parse error: syntax error, unexpected T_REQUIRE_ONCE in /home/inev/public_html/jybosch/fanlisting/reset_password.php on line 3

 

 

 

Link to comment
Share on other sites

<html> <!-- make sure you put a proper doctype and everything -->
<head>

<title>page title</head>
<!-- CSS LINK HERE -->
</head>
<body>
<?php

/*****************************************************************************

Enthusiast: Fanlisting Management System

Copyright (c) by Angela Sabas

http://scripts.indisguise.org



This script is made available for free download, use, and modification as

long as this note remains intact and a link back to

http://scripts.indisguise.org/ is given. It is hoped that the script

will be useful, but does not guarantee that it will solve any problem or is

free from errors of any kind. Users of this script are forbidden to sell or

distribute the script in whole or in part without written and explicit

permission from me, and users agree to hold me blameless from any

liability directly or indirectly arising from the use of this script.



For more information please view the readme.txt file.

******************************************************************************/

require_once( 'config.inc.php' );



$show_form = true;

$message = '';



if( isset( $_POST["email"]                     ) && $_POST["email"]                     != '' ) {



$email = $_POST["email"]                    ;

$show_form = false;



// create password

$password = '';

$k = 0;

while( $k <= 10 ) {

	$password .= chr( rand( 97, 122 ) );

	$k++;

	}



// create sql query

$query = 'UPDATE ' . $db_table . ' SET password = PASSWORD( "' .

	$password . '" ) WHERE email = "' . $email . '"';



$db_link = mysql_connect( $db_server, $db_user, $db_password )

	or die( 'Cannot connect to the database. Try again.' );

mysql_select_db( $db_database )

	or die( 'Cannot connect to the database. Try again.' );



mysql_query( $query );

$affected_rows = mysql_affected_rows();



if( $affected_rows > 0 ) {

	$show_form = false;



	$to = $email;

	$subject = $fanlisting_title .

		' FL: Password reset';

	$headers = "From: " . $fanlisting_title . " <" .

		$fanlisting_email . ">\r\n";



	$lostpass_file = $backend_dir . 'emails/lostpass.txt';

	$lostpass_email = fopen( $lostpass_file, 'r' );

	$body = fread( $lostpass_email, filesize(

		$lostpass_file ) );

	fclose( $lostpass_email );



	require_once( $backend_dir . 'parse_email.php' );

	$body = parse_email( $body, $to, $password );



	$success_mail = mail( $to, $subject, $body,

		$headers );



	if( $success_mail ) {

?>

		<p>

		Your password has been successfully reset

		and an email has been sent to you containing the

		generated password.

		</p>

<?php

		}

	else {

?>

		<p>

		Your password has been successfully reset,

		however, there was a problem sending you an

		email regarding this. Please contact us instead by

		<a href="mailto:<?= str_replace( '@', '{ at }',

		$fanlisting_email ) ?>">email</a>.

		</p>

<?php

		}

	}

else {

?>

	<p>

	There was an error in your request to reset your

	password. This may be because there is no member

	recorded in the <?= $listing_type ?> with that email address.

	Please check your spelling and try again.

	</p>

<?php

	$show_form = true;

	} // end of if email and password is present



mysql_close( $db_link );



} // end of if update = yes



if( $show_form ) {

?>

<p>

If you have lost or forgotten your password, you can reset your

password using this form. The new generated password will be sent to

you, and we advise you to immediately change/update your password

once you receive this.

</p>



<p>

Enter your email address on the field below to generate

a password.

</p>



<p>

<b><?= $message ?></b>

</p>



<form method="post" action="<?= $lostpass_url ?>">



<p class="noindent">

Email address:<br />

<input type="text" name="email" />

<input type="submit" value="Reset my password" />

</p>



</form>



<?php

}

?>
</body>
</html>

Link to comment
Share on other sites

config.inc

 

<?php

/******************************************************************************

Your backend directory; do not forget the trailing slash

******************************************************************************/

$backend_dir = 'fanlisting/';







/******************************************************************************

Type of listing (i.e., 'fanlisting' or 'hatelisting', or 'clique', etc)

******************************************************************************/

$listing_type = 'fanlisting';







/******************************************************************************

Disable country field, enable affiliates, show sorting in drop-down

******************************************************************************/

$disable_country = false;

$enable_affiliates = true;

$sort_dropdown = true;









/******************************************************************************

Password you will use to log into the admin system

******************************************************************************/

$set_password = 'penguin';







/******************************************************************************

Fanlisting information

******************************************************************************/

$owner_name = 'StarCrystal';

$fanlisting_title = 'Johnny Bosch Remix';

$fanlisting_subject = 'Johnny Yong Bosch';

$fanlisting_email = 'quiliet@hotmail.com';

$fanlisting_url = 'http://inevitable-fear.org/jybosch';







/******************************************************************************

Database variables

$db_server - server your MySQL is installed in, usually "localhost"

$db_user - username you use to connect to your MySQL installation/account

$db_password - password you use to connect to your MySQL installation/account

$db_database - database your fanlisting uses (MUST BE PRESENT DURING

                INSTALLATION)

$db_table - the table within the database for your fanlisting

******************************************************************************/

$db_server = 'localhost';

$db_user = 'inev_star';

$db_password = 'penguin';

$db_database = 'inev_star';

$db_table = 'fanlisting_jybosch';







/******************************************************************************

Sorting fanlisting members

$fl_sort - sorts members via the same database column name specified

$show_sort_field = allows display toggling of the sort field

******************************************************************************/

$fl_sort = 'country';

$show_sort_field = false;







/******************************************************************************

How many fans are shown per page in the list

******************************************************************************/

$fans_per_page = 10;







/******************************************************************************

Where links open (value of TARGET attribute in the A tag).

******************************************************************************/

$link_target = '_blank';







/******************************************************************************

Addtional field variables:

Set $additional_field to true if you would like to have additional fields;

Add as many $additional_field_names[] as you want/need, single-quoted

   (should also be the column name of your field in the database, all

   lowercase (automatically title-cased in the site));

******************************************************************************/

$additional_field = false;

$additional_field_names = array();

$additional_field_names[] = 'fieldone';

$additional_field_names[] = 'fieldtwo';







/******************************************************************************

URLs of various pages in your fanlisting.

******************************************************************************/

$list_url = 'fanlisting.php?page=fan';

$update_url = 'fanlisting.php?page=update';

$join_url = 'fanlisting.php?page=join';

$lostpass_url = 'fanlisting.php?page=lostpass';







/******************************************************************************

Spacer for affiliates list, optional.

I.e., if you want them to be separated only by a space, leave it as it is;

if you want affiliate to be listed on each line, set it to '<br />'

******************************************************************************/

$spacer = ' ';







/******************************************************************************

Default width and height of affiliate images, optional.

This is commented by default (no value). If you use one image size for your

affiliates, uncomment (take away the '//' before each line) the lines below

and plug the correct values in the variable.

******************************************************************************/

//$default_width = '88';

//$default_height = '31';

?>

 

 

 

update_member

 

<html>
<head>

<title>Edit Info</title>
<link rel="stylesheet" type="text/css" href="http://www.inevitable-fear.org/jybosch/css_old.css">
</head>
<body> 

<?php
/***************************************************************************** Enthusiast: Fanlisting Management System Copyright (c) by Angela Sabas http://scripts.indisguise.org This script is made available for free download, use, and modification as long as this note remains intact and a link back to http://scripts.indisguise.org/ is given. It is hoped that the script will be useful, but does not guarantee that it will solve any problem or is free from errors of any kind. Users of this script are forbidden to sell or distribute the script in whole or in part without written and explicit permission from me, and users agree to hold me blameless from any liability directly or indirectly arising from the use of this script. For more information please view the readme.txt file.******************************************************************************/

require_once( 'config.inc.php' );
$show_form = true;
$message = '';
$old_email = '';
$new_name = '';$new_email = '';
$new_country = '';
$new_url = '';$delete_url = 0;if( $additional_field ) {	$additional_fields = array();	foreach( $additional_field_names as $field )		$additional_fields["$field"]                     = ' ';	}if( isset( $_POST["update"]                     ) && $_POST["update"]                     == "yes" ) {	$old_email = $_POST["old_email"] ;	
$old_password = $_POST["old_password"] ;	
$new_email = $_POST["new_email"]  ;	
$new_password = $_POST["new_password"] ;	
$new_vpassword = $_POST["new_vpassword"] ;	
$new_name = $_POST["new_name"]  ;	if( isset( $_POST["new_country"]                     ) )		
$new_country = $_POST["new_country"]                    ;	$new_url = $_POST["new_url"]                    ;	
$new_show_email = $_POST["new_show_email"]                    ;	if( isset( $_POST["delete_url"]                     ) )		$delete_url = $_POST["delete_url"]                    ;	if( $additional_field ) {		foreach( $additional_field_names as $field ) {			$additional_fields["$field"]                     = $_POST["new_$field"]                    ;			}		}	if( !( $old_email ) && !( $old_password ) ) {		$message = 'You must enter your old email and your old ' .			'password to verify your request for information ' .			'update.';		}	elseif( $new_password && $new_vpassword &&		$new_password != $new_vpassword ) {		$message = 'Your new password does not match the ' .			'verification. Please retype your new password.';		}	else {		$show_form = false;		// create sql query		$query = 'UPDATE ' . $db_table . ' SET ';		if( $new_email )			$query .= 'email = "' . $new_email . '",';		if( $new_name )			$query .= 'name = "' . $new_name . '",';		if( $new_country )			$query .= 'country = "' . $new_country . '",';		if( $new_password && $new_password == $new_vpassword )			$query .= 'password = PASSWORD( "' .				$new_password . '" ),';		if( $new_show_email != 2 )			$query .= 'showemail = ' . $new_show_email . ',';		if( $delete_url == 1 )			$query .= 'url = NULL,';		elseif( $new_url )			$query .= 'url = "' . $new_url . '",';		if( $additional_field ) {			reset( $additional_fields );			do {				if( current( $additional_fields ) ==					'deletethisfield' )					$query .= $db_table . '.' .						key( $additional_fields ) . ' = NULL,';				else if(current($additional_fields) != '' &&                                   current($additional_fields) != ' ' )					$query .= $db_table . '.' .						key( $additional_fields ) . ' = "' .						current( $additional_fields ) . '",';				} while( next( $additional_fields ) );			}		$query = rtrim( $query, ',' );		$query .= ' WHERE email = "' . $old_email . '" AND password ' .			'= PASSWORD( "' . $old_password . '" )';		$db_link = mysql_connect( $db_server, $db_user, $db_password )			or die( 'Cannot connect to the database. Try again.' );		mysql_select_db( $db_database )			or die( 'Cannot connect to the database. Try again.' );		mysql_query( $query );		$affected_rows = mysql_affected_rows();		mysql_close( $db_link );		if( $affected_rows > 0 ) {			$show_form = false;			if( $new_email )				$to = $new_email;			else				$to = $old_email;			$subject = $fanlisting_title .				' FL: Information change';			$headers = "From: " . $fanlisting_title . " <" .				$fanlisting_email . ">\r\n";			$update_file = $backend_dir . 'emails/update.txt';			$update_email = fopen( $update_file, 'r' );			$message = fread( $update_email, filesize(				$update_file ) );			fclose( $update_email );			require_once( $backend_dir . 'parse_email.php' );			$message = parse_email( $message, $to, $new_password );			$success_mail = mail( $to, $subject, $message,				$headers );			if( $success_mail ) {?>				<p>				Your information has been successfully changed				and an email has been sent to you regarding				these changes.				</p><?php				}			else {?>				<p>				Your information has been successfully changed,				however, there was a problem sending you an				email regarding these changes. You can check				if your changes has been successfully				stored by looking for your fan record at				the <a href="<?= $list_url ?>">fan list</a>				instead.				</p><?php				}			}		else {?>			<p>			There was an error in your request to update your			information. Please check your email and password and			try again.			</p><?php			}		} // end of if email and password is present	} // end of if update = yesif( $show_form ) {?>	<p>	If you're a member of the <?= $listing_type ?> and you want to modify	your information listed here, please fill out the form below. Your	[old] email address and password is required for this form.	</p>	<p>	<b>Important:</b> Leave the fields you wish unchanged blank, and hit	submit only once when you are sure you want to change your	information.	</p>	<p>	<b><?= $message ?></b>	</p>	<p>	<a href="<?= $join_url ?>">If you want to join the <?= $listing_type	?>, please use this other form.</a>	</p>	<form method="post" action="<?= $update_url ?>">	<input type="hidden" name="update" value="yes" />	<p class="noindent">	* Old email address:<br />	<input type="text" name="old_email" />	</p>	<p class="noindent">	* Current password: (<a href="<?= $lostpass_url ?>">Lost it?</a>)<br />	<input type="password" name="old_password" />	</p>	<p class="noindent">	New name:<br />	<input type="text" name="new_name" />	</p>	<p class="noindent">	New email address:<br />	<input type="text" name="new_email" />	</p>	<p class="noindent">	New password (type twice):<br />	<input type="password" name="new_password" />	<input type="password" name="new_vpassword" />	</p>	<p class="noindent">	Show email address?<br />	<input type="radio" name="new_show_email" value="2" checked="checked"		class="noborder" /> Leave it as it is<br />	<input type="radio" name="new_show_email" value="1" class="noborder" />		Yes (SPAM-protected on the site)<br />	<input type="radio" name="new_show_email" value="0" class="noborder" />		No	</p><?php	if( !isset( $disable_country ) || !$disable_country ) {?>		<p class="noindent">		New country<br />		<select name="new_country">		<option value=""></option><?php		include $backend_dir . 'countries.inc.php';?>		</select>		</p><?php		}?>	<p class="noindent">	New website URL:<br />	<input type="text" name="new_url" /><br />	<input type="checkbox" name="delete_url" value="1" class="noborder" />		Delete your website?	</p><?php	if( $additional_field ) {		reset( $additional_fields );		do {?>			<p class="noindent">			New <?= key( $additional_fields ) ?>:<br />			<input type="text" name="new_<?=				key( $additional_fields ) ?>" value="<?=				current( $additional_fields ) ?>" /><br />			<input type="checkbox" name="new_<?=				key( $additional_fields ) ?>"				value="deletethisfield" /> Delete <?=				key( $additional_fields ) ?>			</p><?php			} while( next( $additional_fields ) );		}?>	<p class="noindent">	<input type="submit" value="Modify my information" />	</p>	</form><?php	}?>

</body></html>

Link to comment
Share on other sites

I used <link rel="stylesheet" type="text/css" href="http://www.inevitable-fear.org/jybosch/css_old.css"> before the php codes, but I still get line errors..

 

If you're trying to use that line within PHP code it ain't gonna work.

 

Try this instead:

 

<?php

echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.inevitable-fear.org/jybosch/css_old.css\">";

?>

 

Oh and by the way, this:

 

<html>
<head>

<title>Edit Info</title>
<link rel="stylesheet" type="text/css" href="http://www.inevitable-fear.org/jybosch/css_old.css">
</head>

 

Your <title> </title> tags should go BEFORE <head> </head>, not inside of it.

Link to comment
Share on other sites

http://www.inevitable-fear.org/jybosch/fanlisting/update_member.php

 

-_-; Ignore the squares... if that's possible.. I just copied and pasted what I exactly had in notebook, but I guess it automatically added other symbols.

 

<html>
<head>
<title>Edit Info</title>
<link rel="stylesheet" type="text/css" href="http://www.inevitable-fear.org/jybosch/css_old.css">
</head>
<body> 

<?php
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.inevitable-fear.org/jybosch/css_old.css\">";


/***************************************************************************** 
Enthusiast: Fanlisting Management System Copyright (c) by Angela 
Sabas http://scripts.indisguise.org This script is made available for free 
download, use, and modification as long as this note remains intact and 
a link back to http://scripts.indisguise.org/ is given. It is hoped that the 
script will be useful, but does not guarantee that it will solve any problem 
or is free from errors of any kind. Users of this script are forbidden to sell 
or distribute the script in whole or in part without written and explicit permission 
from me, and users agree to hold me blameless from any liability directly or 
indirectly arising from the use of this script. For more information please view the 
readme.txt file.
******************************************************************************/

require_once( 'config.inc.php' );
$show_form = true;
$message = '';
$old_email = '';
$new_name = ''; $new_email = '';
$new_country = '';
$new_url = '';$delete_url = 0;if( $additional_field ) {	
$additional_fields = array();	
foreach( $additional_field_names as $field )		
$additional_fields["$field"]   = ' '; }
if( isset( $_POST["update"]                     ) && $_POST["update"]     == "yes" ) 
{	$old_email = $_POST["old_email"] ;	
$old_password = $_POST["old_password"] ;	
$new_email = $_POST["new_email"]  ;	
$new_password = $_POST["new_password"] ;	
$new_vpassword = $_POST["new_vpassword"] ;	
$new_name = $_POST["new_name"]  ; if( isset( $_POST["new_country"]   ) )		
$new_country = $_POST["new_country"]                    ;	
$new_url = $_POST["new_url"]                    ;	
$new_show_email = $_POST["new_show_email"]  ;	
if( isset( $_POST["delete_url"]   ) )		
$delete_url = $_POST["delete_url"]                    ;	if( $additional_field ) 
{		foreach( $additional_field_names as $field ) {			
$additional_fields["$field"]                     = $_POST["new_$field"]   ; } }	
if( !( $old_email ) && !( $old_password ) ) 
{ $message = 'You must enter your old email and your old ' . 
'password to verify your request for information ' .'update.'; }	
elseif( $new_password && $new_vpassword &&		
$new_password != $new_vpassword ) 
{		$message = 'Your new password does not match the ' .	 
'verification. Please retype your new password.';		}	
else {		$show_form = false;		// create sql query		
$query = 'UPDATE ' . $db_table . ' SET ';		if( $new_email )			
$query .= 'email = "' . $new_email . '",';		if( $new_name )			
$query .= 'name = "' . $new_name . '",';		if( $new_country )			
$query .= 'country = "' . $new_country . '",';		if( $new_password && 
$new_password == $new_vpassword )			
$query .= 'password = PASSWORD( "' .				
$new_password . '" ),';		if( $new_show_email != 2 )			
$query .= 'showemail = ' . $new_show_email . ',';		
if( $delete_url == 1 )			
$query .= 'url = NULL,'; elseif( $new_url )			
$query .= 'url = "' . $new_url . '",';if( $additional_field ) 
{ reset( $additional_fields );
do { if( current( $additional_fields ) ==	'deletethisfield' )	
$query .= $db_table . '.' .	key( $additional_fields ) . ' = NULL,';	 
else if(current($additional_fields) != '' &&     current($additional_fields) != ' ' )	
$query .= $db_table . '.' . key( $additional_fields ) . ' = "' . 
current( $additional_fields ) . '",';				
} while( next( $additional_fields ) ); }		
$query = rtrim( $query, ',' );		
$query .= ' WHERE email = "' . 
$old_email . '" AND password ' .	'= PASSWORD( "' . $old_password . '" )';		
$db_link = mysql_connect( $db_server, $db_user, $db_password )	 
or die( 'Cannot connect to the database. Try again.' );	
mysql_select_db( $db_database ) or die( 'Cannot connect to the database. Try again.' );		
mysql_query( $query ); $affected_rows = mysql_affected_rows();		
mysql_close( $db_link );		
if( $affected_rows > 0 ) {$show_form = false;			
if( $new_email )				
$to = $new_email;	 else $to = $old_email;	
subject = $fanlisting_title .	' FL: Information change';			
$headers = "From: " . $fanlisting_title . " <" .				
$fanlisting_email . ">\r\n";			
$update_file = $backend_dir . 'emails/update.txt';			
$update_email = fopen( $update_file, 'r' );			
$message = fread( $update_email, filesize(				
$update_file ) ); fclose( $update_email ); 
require_once( $backend_dir . 'parse_email.php' );		
$message = parse_email( $message, $to, $new_password );			
$success_mail = mail( $to, $subject, $message, $headers );			
if( $success_mail ) {?>				
<p>				
Your information has been successfully changed and an email has been sent 
to you regarding these changes. </p><?php }	else {?>	<p>				

Your information has been successfully changed, however, there was a problem 
sending you an email regarding these changes. You can check if your changes has 
been successfully stored by looking for your fan record at the 
<a href="<?= $list_url ?>">fan list</a> instead.				
</p><?php } }		else {?>			
<p>			
There was an error in your request to update your information. Please check 
your email and password and  try again. </p><?php } } 
// end of if email and password is present }
// end of if update = yesif( $show_form ) {?>	
<p>	
If you're a member of the <?= $listing_type ?> and you want to modify
your information listed here, please fill out the form below. Your
[old] email address and password is required for this form.	</p>	<p>	
<b>Important:</b> Leave the fields you wish unchanged blank, and hit
submit only once when you are sure you want to change your
information.	
</p><p>	
<b><?= $message ?></b>	</p>	
<p>	
<a href="<?= $join_url ?>">If you want to join the <?= $listing_type	?>, 
please use this other form.</a>	</p>	
<form method="post" action="<?= $update_url ?>">	
<input type="hidden" name="update" value="yes" />	
<p class="noindent">	* Old email address:<br />	
<input type="text" name="old_email" />	</p>	
<p class="noindent"> * Current password: 
(<a href="<?= $lostpass_url ?>">Lost it?</a>)<br />	
<input type="password" name="old_password" />	</p>	
<p class="noindent">New name:<br />	
<input type="text" name="new_name" /> </p>	
<p class="noindent">	New email address:<br />	
<input type="text" name="new_email" />	</p>	
<p class="noindent"> New password (type twice):<br />	
<input type="password" name="new_password" />	
<input type="password" name="new_vpassword" />	</p>	
<p class="noindent"> Show email address?<br />	
<input type="radio" name="new_show_email" value="2" checked="checked"	
class="noborder" /> Leave it as it is<br />	
<input type="radio" name="new_show_email" value="1" class="noborder" />	
Yes (SPAM-protected on the site)<br />	
<input type="radio" name="new_show_email" value="0" class="noborder" />	
No </p><?php	if( !isset( $disable_country ) || !$disable_country ) 
{?> 
<p class="noindent"> New country<br />		
<select name="new_country">		
<option value=""></option><?php include $backend_dir . 'countries.inc.php';?>		
</select>	 </p>
<?php		}?>	
<p class="noindent"> New website URL:<br />	
<input type="text" name="new_url" /><br />	
<input type="checkbox" name="delete_url" value="1" class="noborder" />
Delete your website? </p>


<?php } while( next( $additional_fields ) ); }?>	
<p class="noindent"><input type="submit" value="Modify my information" />	</p>	
</form>
<?php   }?>

</body></html>

 

 

 

I used <link rel="stylesheet" type="text/css" href="http://www.inevitable-fear.org/jybosch/css_old.css"> before the php codes, but I still get line errors..

 

If you're trying to use that line within PHP code it ain't gonna work.

 

I've used the regular css code for other PHP pages like  rest_password.php and it works fine.

Link to comment
Share on other sites

Honestly it is very hard to debug short hand PHP.

 

I recommend to you for best coding practices to use.

 

echo <<<END

 

HTML code

 

END;

 

Make sure their are no spaces after each command on the command line.

 

 

Clean up your code and it will be easy too check what syntax is missing what!

 

You will also find this useful for modifying it later, adding new stuff.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.