Ejemplo n.º 1
0
function createContingent($nameParam)
{
    $password = random_password();
    $name = clean_string($nameParam);
    $loginID = registration_id();
    $db = \Udaan\Database::connect();
    $sth = $db->prepare("INSERT INTO contingent_college(name,loginid,password) VALUES('{$name}','{$loginID}','{$password}')");
    $sth->execute();
    header('Location: college.php');
}
Ejemplo n.º 2
0
/**
 * Created by PhpStorm.
 * User: tuxer
 * Date: 12/2/2015
 * Time: 11:07 PM
 */
/** test php file  */
session_start();
if (isset($_SESSION['is_logged_in']) && $_SESSION['is_logged_in'] == true) {
    header("location:events.php");
}
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require_once "{$root}/Udaan2016/fms/utilities/Database.class.php";
require_once "{$root}/Udaan2016/fms/models/Event.class.php";
use Udaan\Database;
$dbhandler = Database::connect();
# connect to the database
try {
} catch (PDOException $pdoe) {
    echo $pdoe->getMessage();
}
?>
<html>
	<head>
		<title>UDAAN-A BIOSCOPE 2016</title>
		<link type="text/css" rel="stylesheet" href="css/login.css"/>
	</head>
	<body>

		<form id="login" action="auth.php" method="POST">
			<h1>Log In</h1>
Ejemplo n.º 3
0
 function __construct()
 {
     $this->databaseHandler = Database::connect();
 }
Ejemplo n.º 4
0
    $details = $_POST['details'];
    $category = $_POST['category'];
    $starttime = $_POST['starttime'];
    $endtime = $_POST['endtime'];
    $startdate = $_POST['startdate'];
    $enddate = $_POST['enddate'];
    $groupsize = $_POST['groupsize'];
    $homefee = $_POST['homefee'];
    $remotefee = $_POST['remotefee'];
    $firstprice = $_POST['firstprice'];
    $location = $_POST['location'];
    $equipments = $_POST['equipments'];
    $headname = $_POST['head'];
    $headcontact = $_POST['contact'];
    $rule = $_POST['rules'];
    $db = \Udaan\Database::connect();
    $sth = $db->prepare("UPDATE event SET name='{$name}',slogan='{$slogan}',category='{$category}',details='{$details}',start_time='{$starttime}',end_time='{$endtime}',start_date='{$startdate}',end_date='{$enddate}',group_size='{$groupsize}',fee_home='{$homefee}',fee_remote='{$remotefee}',award='{$firstprice}',location='{$location}',equipments_provided='{$equipments}',rules='{$rule}',event_head_name='{$headname}',event_head_contact='{$headcontact}' where id='{$eventid}' ");
    $sth->execute();
    header('Location: events.php');
} else {
}
//var_dump($result);
?>
<html><head>
    <meta charset="utf-8">
    <title>UDAAN 2016</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
Ejemplo n.º 5
0
 function __construct()
 {
     $this->dbh = Database::connect();
 }