tried to get php working for account creation
This commit is contained in:
parent
3ad6ac284a
commit
b7e8138d86
22
uVote/api/acc/account.create.php
Normal file
22
uVote/api/acc/account.create.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
class account {
|
||||
public static function createNewAccount($newacc){
|
||||
$con = new \SYSTEM\DB\Connection(new \DBD\uVote());
|
||||
|
||||
//Variablen zuweisen
|
||||
$user_ID = $_POST['vorname'];
|
||||
$password = $_POST['passwort'];
|
||||
$email = $_POST['email'];
|
||||
|
||||
//Daten in DB speichern
|
||||
$sql_befehl = "INSERT INTO table VALUES ($vorname,$nachname,$email)";
|
||||
if (("" == $password) OR (""== $email)) {
|
||||
echo "Fehler: Eintrag unvollständig. ";
|
||||
} else {
|
||||
|
||||
echo "Ihr Eintrag wurde hinzugefügt. ";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,7 @@
|
||||
<?php
|
||||
|
||||
class default_page extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function js(){
|
||||
return '<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/timer.js').'"></script>';
|
||||
}
|
||||
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
|
||||
@ -2,14 +2,13 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Sign in · Twitter Bootstrap</title>
|
||||
<title>Sign in</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
${js}
|
||||
|
||||
<!-- Le styles -->
|
||||
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="'/lib/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 40px;
|
||||
@ -45,7 +44,7 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="'/lib/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
|
||||
@ -6,4 +6,4 @@ $autoload->registerFolder(dirname(__FILE__),'');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/default_page','');
|
||||
|
||||
$autoload->registerFolder(dirname(__FILE__),'');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/default_myVote','');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/default_register','');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user