} require_once "inc/functions.php"; openPage("Initialisation"); echo "\r\nJust so you know, your title at the moment is {$loggedInUser->title}, and that can be changed in the admin panel. You registered this account on " . date("M d, Y", $loggedInUser->signupTimeStamp()) . "."; echo "<h2>RAZ tables</h2>"; $result = mysqli_query($mysqli, "DELETE FROM account"); $result = mysqli_query($mysqli, "ALTER TABLE `account` AUTO_INCREMENT = 1"); $result = mysqli_query($mysqli, "delete from sk_users where id >1"); $result = mysqli_query($mysqli, "ALTER TABLE `sk_users` AUTO_INCREMENT = 2"); $result = mysqli_query($mysqli, "DELETE FROM sk_user_permission_matches WHERE USER_ID != 1"); $result = mysqli_query($mysqli, "DELETE FROM market"); echo "<h2>creation des users 'Professeurs'</h2>"; addProfessor("mel", "Mélanie", "*****@*****.**"); addProfessor("dom", "Dominique", "*****@*****.**"); addProfessor("xtophe", "Christophe", "*****@*****.**"); addProfessor("pierre", "Pierre", "*****@*****.**"); addProfessor("laurence", "Laurence", "*****@*****.**"); addProfessor("marc", "Marc", "*****@*****.**"); addProfessor("sophie", "Sophie", "*****@*****.**"); echo "<h2>creation des users 'Etudiants'</h2>"; for ($i = 1; $i < 201; $i++) { echo "<br/>creation de Groupe{$i}"; $result = mysqli_query($mysqli, "INSERT INTO `sk_users` (`id`, `user_name`, `display_name`, `password`, `email`, `activation_token`, `last_activation_request`, `lost_password_request`, `active`, `title`, `sign_up_stamp`, `last_sign_in_stamp`) VALUES (NULL, 'groupe{$i}', 'Groupe {$i}', '9051a509f95691159c7ed617fd884f29af9213d747b13b6c7860fff6fb40cb24d', 'user{$i}@skema.edu', 'b3f4ed2c42cc370d457f9caa201617a8', 1377894239, 0, 1, 'Student', 1377894239, 1377898821);"); $result = mysqli_query($mysqli, "SELECT id FROM `sk_users` WHERE user_name = 'Groupe{$i}';"); list($idNew) = mysqli_fetch_row($result); $result = mysqli_query($mysqli, "INSERT INTO `sk_user_permission_matches` (`id`, `user_id`, `permission_id`) VALUES (NULL, '{$idNew}', '1');"); $timeStamp = date("Y-m-d H:i:s"); $result = mysqli_query($mysqli, "INSERT INTO `account` (`id`, `account1`, `account2`, `debit`, `credit`, `description`, timestamp) VALUES (NULL, '{$idNew}', NULL, NULL, '10000', 'Solde Initial','{$timeStamp}');"); } closePage();
function DisplayTheaterCompare() { global $theater, $mod, $theaterfile, $theaterpath, $version, $mod_compare, $theaterfile_compare, $theaterpath_compare, $version_compare; $theater_compare = ParseTheaterFile("{$theaterfile_compare}.theater", $mod_compare, $version_compare, $theaterpath_compare); $index = "{$version}/{$theaterfile}"; $index_compare = "{$version_compare}/{$theaterfile_compare}"; $changes = multi_diff($index, $theater, $index_compare, $theater_compare); DisplayStatsHeader(); echo "<table border='1' cellpadding='2' cellspacing='0'><tr><th>Setting</th><th>{$index}</th><th>{$index_compare}</th></tr>\n"; $sections = array(); foreach ($changes as $name => $data) { $sections[] = $name; if (isset($data[$index]) || isset($data[$index_compare])) { echo "<tr><td>" . implode("/", $sections) . "</td>"; echo "<td>" . printval($data, $index, 0, '-') . "</td>\n"; echo "<td>" . printval($data, $index_compare, 0, '-') . "</td>\n"; echo "</tr>\n"; } else { DisplayCompare($data, $sections, $index, $index_compare); } array_pop($sections); } closePage(1); }