示例#1
0
<?php

if (LoginCheck($pdo) and $_SESSION['level'] == 2) {
    //init fields
    $Voornaam = $Achternaam = $Adres = $Postcode = $Woonplaats = $Telefoon = $Email = $Gebruikersnaam = $oudWachtwoord = $nieuwWachtwoord = $herhaalWachtwoord = $Level = $Leeftijd = $Groep = NULL;
    //init error fields
    $FnameErr = $LnameErr = $ZipErr = $CityErr = $TelErr = $MailErr = $UserErr = $PassErr = $RePassErr = $LeefErr = NULL;
    if (isset($_POST['Wijzig'])) {
        $Voornaam = $_POST['Voornaam'];
        $Achternaam = $_POST['Achternaam'];
        $Adres = $_POST['Adres'];
        $Postcode = $_POST['Postcode'];
        $Woonplaats = $_POST['Woonplaats'];
        $Telefoon = $_POST['Telefoon'];
        $Email = $_POST['Email'];
        $Gebruikersnaam = $_POST['Gebruikersnaam'];
        $parameters = array(':PersoonsID' => $_SESSION['user_id'], ':Voornaam' => $Voornaam, ':Achternaam' => $Achternaam, ':Adres' => $Adres, ':Postcode' => $Postcode, ':Woonplaats' => $Woonplaats, ':Telefoon' => $Telefoon, ':Email' => $Email);
        $sth = $pdo->prepare('UPDATE persoonsgegevens SET Achternaam = :Achternaam, Voornaam = :Voornaam, Adres = :Adres, Postcode = :Postcode, Woonplaats = :Woonplaats, Telefoon = :Telefoon, Email = :Email WHERE PersoonsID = :PersoonsID');
        $sth->execute($parameters);
        require './Forms/EditProfielForm.php';
    } elseif (isset($_POST['wijzigprofiel'])) {
        $sth = $pdo->prepare("SELECT * FROM persoonsgegevens p, groepsleiders gl, inloggegevens i WHERE p.PersoonsID = gl.PersoonsID AND p.PersoonsID = i.PersoonsID");
        $sth->execute();
        $row = $sth->fetch();
        $Voornaam = $row['Voornaam'];
        $Achternaam = $row['Achternaam'];
        $Adres = $row['Adres'];
        $Postcode = $row['Postcode'];
        $Woonplaats = $row['Woonplaats'];
        $Telefoon = $row['Telefoon'];
        $Email = $row['Email'];
示例#2
0
文件: Menu.php 项目: Stixs/tovuti
	<?php 
} else {
    ?>
	
	<a href="?Page=0">
		<div class="inloggen">
			<h1>Inloggen</h1>
		</div>
	</a>
	
	<?php 
}
?>
</div>
<div id="secondmenu">
<?php 
if (LoginCheck($pdo)) {
    $parameters = array(':level' => $_SESSION['level']);
    $sth = $pdo->prepare("SELECT * FROM menu WHERE Level = :level");
    $sth->execute($parameters);
    while ($row = $sth->fetch()) {
        echo '<a class ="a_menu" href="?Page=' . $row["MenuID"] . '">';
        echo '<div class="2ndmenu">';
        echo '<h1>' . $row["Naam"] . '</h1>';
        echo '</div>';
        echo '</a>';
    }
}
?>
	
</div>
示例#3
0
    $langfile = $langpath . $language_interface . '/trad4all.inc.php';
    if (file_exists($langfile)) {
        include $langfile;
    }
}
// include the local (contextual) parameters of this course or section
require $includePath . '/local.inc.php';
// The global variable $text_dir has been defined in the language file trad4all.inc.php.
// For determining text direction correspondent to the current language
// we use now information from the internationalization library.
$text_dir = api_get_text_direction();
// ===== "who is logged in?" module section =====
// check and modify the date of user in the track.e.online table
if (!($x = strpos($_SERVER['PHP_SELF'], 'whoisonline.php'))) {
    preventMultipleLogin($_user["user_id"]);
    LoginCheck(isset($_user['user_id']) ? $_user['user_id'] : '');
}
// ===== end "who is logged in?" module section =====
//Update of the logout_date field in the table track_e_login
// (needed for the calculation of the total connection time)
if (!isset($_SESSION['login_as']) && isset($_user)) {
    // if $_SESSION['login_as'] is set, then the user is an admin logged as the user
    $tbl_track_login = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
    $sql = "SELECT login_id, login_date\n            FROM {$tbl_track_login}\n            WHERE\n                login_user_id='" . $_user["user_id"] . "'\n            ORDER BY login_date DESC\n            LIMIT 0,1";
    $q_last_connection = Database::query($sql);
    if (Database::num_rows($q_last_connection) > 0) {
        $i_id_last_connection = Database::result($q_last_connection, 0, 'login_id');
        // is the latest logout_date still relevant?
        $sql = "SELECT logout_date FROM {$tbl_track_login}\n                WHERE login_id = {$i_id_last_connection}";
        $q_logout_date = Database::query($sql);
        $res_logout_date = convert_sql_date(Database::result($q_logout_date, 0, 'logout_date'));
<?php

//****************************//
//                            //
//      LMの選択/表示ページ      //
//                            //
//****************************//
require_once "ConfSmarty.class.php";
require_once "util.php";
require_once "connect.db.php";
Init();
LoginCheck();
//*************************//
// POST前な らLM選択画面を表示 //
//*************************//
if ($_SERVER["REQUEST_METHOD"] != "POST") {
    // LMの存在する日付の取得
    $query2 = "SELECT Date FROM {$lm_t}";
    $sql2 = mysqli_query($link, $query2) or die("クエリ2失敗です" . mysql_error());
    while ($data = mysqli_fetch_assoc($sql2)) {
        $date_exist[] = $data['Date'];
    }
    $date_exist = json_encode($date_exist);
    $title = "LM表示";
    $login = "******";
    $add_user = "******";
    $lm = "learning_material.php";
    $smarty = new ConfSmarty();
    $smarty->assign("title", $title);
    $smarty->assign("login", $login);
    $smarty->assign("add_user", $add_user);