Page 1 of 2

i need your help changing the style of this

Posted: Fri Jan 20, 2006 1:49 pm
by gaogier
we have the code so that you have an field in the forums, but we want to keep our forums free of modifications so we can keep them uptodate, and more secure, therefore we need to change the way we allow this to work

the code:

Code: Select all

<?php
include ('header.inc');

if(isset($_POST['submit'])){
if(empty($_POST['username'])){
		$username = FALSE;
		$message = '<table width=98% bgcolor=#faf5f4 class=logfail align=center><tr>
							<td width=40><img src=images/exclamation.gif></td>
							<td align=left>
							<B>Login Failed!</B> <BR>
							No username entered.
							<BR>Please Try again<br />
							</table><br /><br />';
	}else{
		$username = escape_data($_POST['username']);
	}
	if(empty($_POST['password'])){
		$password = FALSE;
		$message1 = '<br /><table width=98% bgcolor=#faf5f4 class=logfail align=center><tr>
							<td width=40><img src=images/exclamation.gif></td>
							<td align=left>
							<B>Login Failed!</B> <BR>
							No password entered.
							<BR>Please Try again<br />
							</table><br /><br />';
	}else{
		$password1 = escape_data($_POST['password']);
		$password = md5($password1);		
	}
	//echo $password1 .' ' .$password. ' ' .$username;
	if($username && $password){
		require_once ('../mysql_connect1.php');
		$query = "SELECT user_id, username, user_info FROM phpbb_users WHERE username='$username' AND user_password='$password'";
		$result = mysql_query ($query);
		$row = mysql_fetch_array ($result);
		if(mysql_num_rows($result) > 0)
				{	
					$space = " ";
					$name1 = ucwords(strtolower($row['user_info']));
					$names = str_replace($space, "_", $name1);
					$name  = str_replace("'", "_", $names);
										
					$_SESSION['user_info'] = $name;
					$_SESSION['username'] = $row['username'];
					$_SESSION['user_id'] = $row['user_id'];
					ob_end_clean();
					//header ("Location: http://" . $_SERVER['HTTP_HOST'] .
					//dirname($_SERVER['PHP_SELF']) . "Dsigs/test.php");
					include('header.inc');
					echo $_SESSION['user_info'].'<br />';
					echo 'You\'ve logged in successfully. Click <a href="createsig.php">here</a> to get your RuneHints Dynamic Sig.';
					include('footer.inc');
					exit();
				}else{
					$message = '<table width=98% bgcolor=#faf5f4 class=logfail align=center><tr>
							<td width=40><img src=images/exclamation.gif></td>
							<td align=left>
							<B>Login Failed!</B> <BR>
							The login combination you entered was not found. 
							<BR>Please Try again<br />
							</table><br /><br />';		
					}

	}
}
echo '<font face=verdana size=2 color=#3FC7C9> <b>Login</b></font><br /><br />'.$message.$message1.'
Login using your forum account.<br />
You must have a forum account and have set the "RS Name" field in order to use our dynamic sigs.<br />';
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
							<table width=98% bgcolor=#f5f8ff class=blueborder align=center><tr>
							<td width=40><img src=images/keylogin.gif></td>
							<td align=right>							
							<B>Username:</B> <br /><br />
							<B>Password:</B> <br /></td>
							<td align=left>
							<input type="text" name="username" size="10" maxlength="20" class="login" value ="<?php if (isset($_POST['username'])) echo $_POST['username']; ?>" />&nbsp;&nbsp;<small><i>Please enter your forum username</small></i><br /><br />							
							<input type="password" name="password" size="20" maxlength="20" class="login"/>&nbsp;&nbsp;<small><i>Please enter your forum password</small></i></td></tr>
							<tr><td width=40></td><td align="center"><input type="submit" name="submit" class="login" value="Login" /></td></tr>
							</table><br /><br />
</form>
<?php
include ('footer.inc');
?>
This code works, but as we dont have the field in the profile, we need to change it, but im not 100% sure on what to change it to, will it stop the image being saved? or anything, please help

Posted: Fri Jan 27, 2006 9:52 am
by gaogier
anyone can help me? please pm me, thanks

Posted: Fri Jan 27, 2006 3:28 pm
by raghavan20
the problem is not clear...I think you should spend more time explaining it with examples if possible...thanks

Posted: Fri Jan 27, 2006 3:45 pm
by Roja
gaogier wrote:anyone can help me? please pm me, thanks
These forums are useful because questions and answers can be found together, for problems that other people may have experienced. Please don't reduce the value of the forums by asking for solutions outside of the forums.

Posted: Sun Jan 29, 2006 11:04 am
by gaogier
we used a modification in our forums, to add an field in our profiles on phpbb. this was for our users to enter their usernames for an online game to get the stats from the site, and then put the stats onto an image, known as a dynamic sig

as their was a lot of members signing up on our forums, for the sigs, and our forums couldnt be updated i had decided to remove this modification, and make it so players of the game could just add their name into a field and then it stored into a database and then the code would do the rest of the work to get the stats from the site, and then put it onto a sig

sadly i dont know how to change this, and need advise and someone to help me get through this

thanks
gaogier

Posted: Wed Feb 01, 2006 2:24 pm
by gaogier
dose anyone know?

Posted: Fri Feb 03, 2006 6:46 pm
by gaogier
sorry agian, but i need help on this

Posted: Fri Feb 03, 2006 6:51 pm
by John Cartwright
Unfortunantly I'm still unclear as to what to what your problem is.

You could always try posting in the Volunteer Board too..

Posted: Fri Feb 03, 2006 6:55 pm
by gaogier
our problem is that we have so many unactive users, that use our forums for our dymanic sigs, therefore we need a different way to make the dymanic sigs so that we can free up our forums of unactive users

Posted: Fri Feb 03, 2006 6:59 pm
by John Cartwright
Why not prune inactive users? Are you using phpbb?

Posted: Sat Feb 04, 2006 5:07 am
by gaogier
because they use the dynaimc sigs, therefore if we prune them they will just sign back up

this is the reason why im trying to make it a different way

Posted: Sat Feb 04, 2006 8:28 am
by jayshields
make a cron job to prune the users every day?

Posted: Sat Feb 04, 2006 1:47 pm
by gaogier
you dont understand, the users are using a feature of our forums, therefore we need to change it so we can prune inactive members

Posted: Sat Feb 04, 2006 7:10 pm
by m3mn0n
Solution: make this feature separate from your forums.

If abuse of your dynamic image processing feature is a problem, then I'd recommend taking the feature out of the forums, since you don't any any mods on it, and then make a dynamic signature manager outside of the forums. It can be linked to from the forums.

Then you can have an accept/deny list system and you can base it on the members of your forum.

Ask for a username, password, and from there if that matches, scan the phpBB or whatever database for their account information.

Then from there, see how many posts they have, joined date, and etc.

Then the accept deny list can be automated or you can have someone manually do it.

Posted: Sun Feb 05, 2006 11:43 am
by gaogier
thats what i want help doing, making it separte from the forums, but i dont have a clue on what way i should do this, and im asking for help, and advise