Ejemplo n.º 1
0
  /**
	* display sql error page
	*/
  function sql_error($sql = '')
  {
    system_set_message("Uh-oh! Somethings gone wrong! " . $sql);
  }
Ejemplo n.º 2
0
*This should be tagged with v0.2 
* TODO: 
*	build database layer;
* 	get logins working;
*
**/

require_once('includes/common.php');

system_boot();

//read the url and decide what to do
if(isset($_GET['q']) && $_GET['q'] == "login") {
  $result = $db->sql_query("SELECT * FROM users WHERE u_name='" . $_POST['username'] ."'");
  $user = $db->sql_fetchrow($result);
	system_set_message("You are logging in - " . $user['u_email']);
}

print "So this is the start of sparks, the social networking tool that is going to change the face of the internet";

?>
<form action="login" method="POST">
	Username: <input type="text" name="username" />
	Password: <input type="password" name="password" />
	<input type="submit" name="Log in" />
</form>
<h1>Messages</h1>
<ul>
<?php
//To be replaced by a theme layer
foreach($messages as $message) {