Location: PHPKode > projects > SSEP - Election Simulation System > ssep-0.2/index.php
<?

require("conf.php");

$sql="select id,candidate from people where candidate = '0'";
$query=mysql_db_query($db,$sql,$conn);
$row=mysql_fetch_array($query);
if(!empty($row['id'])) $idmysql=$row['id'];
else {
$sql="INSERT INTO people( candidate ) value('0')";
$query=mysql_db_query($db,$sql,$conn);
if(!$query) exit("Error: MySQL SQL problem");
$sql="select id,candidate from people where candidate = '0'";
$query=mysql_db_query($db,$sql,$conn);
$row=mysql_fetch_array($query);
$idmysql=$row['id'];
}

?>

<html>
<head>
<title>SSED</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estru.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#E5E5E5">
<div align="center">
  <table width="790" border="2" cellpadding="0" cellspacing="0" bordercolor="#666666" bgcolor="#FFFFFF">
    <tr> 
      <td><table width="790" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td bgcolor="#FFFFFF">
              <h3><font color="#666666" face="Arial, Helvetica, sans-serif"><br>
                Election Simulation System</font></h3>
              <p align=justify><font size="2" face="Arial, Helvetica, sans-serif">
The goal of this project is to simulate an election with two candidates. <br>It was developed by Adolfo Ferreira and Vitor Vordini for FECAP university @ Sao Paulo / Brasil.<br>
See Election Stats <a href=stats.php>here</a>.
                </font></p>
              <p align=justify><font size="2" face="Arial, Helvetica, sans-serif">If you do want participate of this election, fill your id              .</font></p>
              <form action=eleger.php method=post>
DEMO ID: <?=$idmysql?> 
        <br>        
	ID: 
                <input size=10 type=text name=codigo maxlength=8>
                </font><br>
                <br>
<input type=submit value=Go>
<input type=reset value=Clean>
</form>

</td>
<tr><td align=Center>
<br><br>
<font size="2" face="Arial, Helvetica, sans-serif">
<a href=WARNING.txt>PLEASE SEE THE NOTE</a><br>
SSEP version <?=$version?>, Copyright (C) 2007 Adolfo Bravo Ferreira <adolfo.ferreira at hotmail.com> & Vitor Bordini <br>
SSEP comes with ABSOLUTELY NO WARRANTY;<br> 
This is free software, and you are welcome to redistribute it under certain conditions.
<br><br>
</td></tr>
        </table></td>
    </tr>
  </table>
</div>
</body>
</html>
Return current item: SSEP - Election Simulation System