Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
Nelson
Hangin' Around


Joined: Sep 25, 2003
Posts: 30

PostPosted: Tue Nov 25, 2003 10:12 am Reply with quote

Hi All,

I would like to create a module addon for my site. The application is an email chess server (a sourceforge project), which I am now running as a php standalone.

The application uses its own mysql database, and requires its own login (cookie-based).

I am not asking anyone to do this work for me ... I would like to attempt it myself, but I am at a loss as to how to start..

Generally speaking, what major steps would be required to convert this to a php module?

Here is the index.php, as it stands now:
------------------------------
<?
session_start();
if (isset($user)&&isset($pass)){
$_POST['pwdPassword'] = $pass;
$_POST['txtNick'] = $user;
$_POST['ToDo'] = "Login";
session_register(_POST);
header("location: mainmenu.php");
exit;
}

require("config.php");

if ($_COOKIE["cookie_language"] != "")
$lang = $_COOKIE["cookie_language"];

if ($_GET["language"] != "")
$lang = $_GET["language"];

if ($lang=="")
$lang=$CFG_DEFAULT_LANGUAGE;

/* Language selection */
require "languages/".$lang.".inc.php";

setcookie("cookie_language",$lang,time()+60*60*24*365*2);
?>
<html>
<head>
<title>WebChess Login</title>
</head>

<body bgcolor=white text=black>


<font face="Verdana"><img src="images/compwebchess.gif"></font>




<form method="post" action="mainmenu.php" name="login">
<div align="center">


<table width="400" border="0" cellspacing="1" cellpadding="1" bgcolor="#000000" align=center>
<tr bgcolor=#cfcfbb>
<td width="86" align="right">
<font face="Verdana" size="2"><?=$MSG_LANG["language"]?>:</font></td>
<td width="207" align="left"><font face="Verdana">
<select name="language" onChange="window.location='index.php?language='+document.login.language.value">
<option value="english"><?=$MSG_LANG["english"]?>
<option value="portuguese"><?=$MSG_LANG["portuguese"]?>
<option value="french"><?=$MSG_LANG["french"]?>
<option value="german"><?=$MSG_LANG["german"]?>
<option value="spanish"><?=$MSG_LANG["spanish"]?>
</select>
</font></td>
</tr>
<tr bgcolor=#cfcfbb>
<td width="86" align="right">
<font face="Verdana" size="2"><?=$MSG_LANG["username"]?>:</font></td>
<td width="207" align="left"><font face="Verdana"> <input name="txtNick" type="text" size="15" /></font></td>
</tr>
<tr bgcolor=#cfcfbb>
<td width="86" align="right">
<font face="Verdana" size="2"><?=$MSG_LANG["password"]?>:</font></td>
<td width="207" align="left"><font face="Verdana"> <input name="pwdPassword" type="password" size="15" /><font
size="2">
</font></font></td>
</tr>
</table>


</div>

<p align="center">
<font face="Verdana">
<input name="ToDo" value="Login" type="hidden" />
<input name="login" value="<?=$MSG_LANG["login"]?>" type="submit" />
</font>
</p>


<p align="center">
<font face="Verdana" size="2">
<a href="newuser.php?language=<?=$language?>"><?=$MSG_LANG["createuser"]?></a></font></p>

</form>
<BR>
<font face="verdana" size="2">
<table cellSpacing="0" cellPadding="0" width="400" align="center" border="0">
<tr>
<td colSpan="2" align=center><font face=verdana size=1>
<a href="http://kymera.comp.pucpcaldas.br/projects/compwebchess/" target="_blank">CompWebChess</a> <?=$VERSION?> © 2003,
<a href="http://www.inf.pucpcaldas.br/~rayel" target="_blank">Felipe Rayel</a>,
<a href="credits.php">Collaborators</a>
<hr>
</td>
</tr>
<tr>
<td align="middle"><font face="verdana" size="1">
<?include("footer.inc.php")?>
</td>
</tr>
</table>
</font>
<script>
document.login.language.value="<?=$lang?>";
</script>

<p align="center"><font face="Verdana" size="1" color="#AAAAAA">
CompWebChess is based on GNU <a href="http://webchess.sourceforge.net/">WebChess 0.8.3</a> and is published under the GNU GPL (GNU General Public License).<BR>
To read the full license, go to Only registered users can see links on this board! Get registered or login! Basically, the GPL says you are free<BR>
to distribute and edit the sourcecode, as long as you keep the rightful credits intact. Please read the full documents if<BR>
you have any questions. <BR></font></p>
</body>
</html>
----------------------------------
 
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©