コード例 #1
0
ファイル: account.php プロジェクト: bouchra012/PMB
include "{$include_path}/account.inc.php";
include "{$include_path}/templates/account.tpl.php";
require_once "{$include_path}/user_error.inc.php";
require_once "{$class_path}/thesaurus.class.php";
require_once "{$base_path}/admin/users/users_func.inc.php";
require_once "{$class_path}/actes.class.php";
require_once "{$class_path}/suggestions_map.class.php";
require_once "{$class_path}/lignes_actes_statuts.class.php";
print $menu_bar;
print $extra2;
print $account_layout;
if ($use_shortcuts) {
    include "{$include_path}/shortcuts/circ.sht";
}
if (!$modified) {
    $user_params = get_account_info(SESSlogin);
    // constitution des paramètres utilisateurs
    $requete_param = "SELECT * FROM users WHERE userid='{$PMBuserid}' LIMIT 1 ";
    $res_param = mysql_query($requete_param, $dbh);
    $field_values = mysql_fetch_row($res_param);
    $param_user = "******" . $msg["1500"] . "</b></div>\n";
    $deflt_user = "******" . $msg["1501"] . "</b></div>\n";
    $i = 0;
    while ($i < mysql_num_fields($res_param)) {
        $field = mysql_field_name($res_param, $i);
        $field_deb = substr($field, 0, 6);
        switch ($field_deb) {
            case "deflt_":
                if ($field == "deflt_styles") {
                    $deflt_user_style = "\n\t\t\t\t\t\t<div class='colonne60'><div class='row'>" . $msg[$field] . "&nbsp;:&nbsp;</div></div>\n\n\t\t\t\t\t\t<div class='colonne_suite'><div_class='row'>" . make_user_style_combo($field_values[$i]) . "</div></div>\n";
                } elseif ($field == "deflt_docs_location") {
コード例 #2
0
ファイル: users.php プロジェクト: no2key/VegaDNS
         exit;
     } else {
         $smarty->assign('user_mode_next', 'add_account_now');
         $smarty->assign('account_title', 'Add Account');
         $smarty->assign('submit', 'add');
         $smarty->display('header.tpl');
         require 'src/account_form.php';
         $smarty->display('footer.tpl');
         exit;
     }
 } else {
     if ($_REQUEST['user_mode'] == 'add_account_now') {
         // Set account id based on user type
         $id = set_edit_id($user_info);
         // Get account info
         $account_info = get_account_info($id);
         // Make sure this is a senior admin
         if ($user_info['Account_Type'] != 'senior_admin' && $user_info['Account_Type'] != 'group_admin') {
             set_msg_err("Error: you do not have the rights to add a user");
             $smarty->display('header.tpl');
             $smarty->display('footer.tpl');
             exit;
         } else {
             $smarty->assign('user_mode_next', 'add_account_now');
             $smarty->assign('account_title', 'Add Account');
             $smarty->assign('submit', 'add');
             // Check data
             require 'src/check_account_data.php';
             // Add account
             $q = "insert into accounts (";
             if ($user_info['Account_Type'] == 'group_admin') {
コード例 #3
0
ファイル: footer.php プロジェクト: raphaelchang/schedulepoll
</div>
<hr>
<div id="footer">
&copy; 2015 Raphael Chang
<?php 
if ($account !== false) {
    ?>
<div style="float:right">Logged in as: <?php 
    echo get_account_info($account)["email"];
    ?>
 | <a href="logout">Logout</a></div>
<?php 
}
?>
</div>
</div>
</body>
コード例 #4
0
ファイル: cp.php プロジェクト: raphaelchang/schedulepoll
?>
		</div>
        <div id="invites-div" class="tab">
		<?php 
if (count($invites) > 0) {
    ?>
		<table border="1">
		<tr>
		<th>Event</th>
		<th>Event Description</th>
		<th>Event Type</th>
		<th>Invited By</th>
		</tr>
		<?php 
    foreach ($invites as $e) {
        $owner = get_account_info($e["account"]);
        echo "<tr>";
        echo "<td><a href=\"view?event=" . $e["hash_code"] . "\">" . $e["name"] . "</a></td>";
        echo "<td>" . $e["description"] . "</td>";
        echo "<td>" . ($e["type"] == "open" ? "Open Scheduling" : "Centered Around Schedule") . "</td>";
        $num = get_number_responses($e["id"]);
        echo "<td>" . $owner["first_name"] . " " . $owner["last_name"] . "</td>";
        echo "</tr>";
    }
    ?>
		</table>
		<?php 
} else {
    echo "No invites!";
}
?>
コード例 #5
0
ファイル: select.php プロジェクト: raphaelchang/studybuddy
<?php

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
require_once "includes.php";
$title = "Select Your Courses";
require_once "header_home.php";
if ($account === false) {
    header("Location: /" . SITE_ROOT);
}
$account_info = get_account_info($account);
if (isset($_POST["submit"])) {
    $selected = array();
    foreach ($_POST as $key => $value) {
        if (substr($key, 0, 3) == "num" && is_numeric($value)) {
            array_push($selected, $value);
        }
    }
    set_user_courses($account, $selected);
    header("Location: /" . SITE_ROOT);
}
?>
<h1>Select Your Courses</h1>
<h3>College: <?php 
$college = get_college_from_email($account_info["email"]);
echo $college["name"];
?>
</h3>
<script type="text/javascript">
$(function() {
  $(document).on('click', "#btnAdd", function() {
                     var num        = $('.clonedInput').length;    // how many "duplicatable" input fields we currently have
コード例 #6
0
ファイル: posts.php プロジェクト: raphaelchang/studybuddy
?>
 classmate<?php 
echo count($users) != 2 ? "s" : "";
?>
 nearby</h2>
<form method="POST" action="">
<input type="text" required="required" size="60" placeholder="Where can others meet you?" name="content" /><input type="submit" value="Post" style="margin-left: 5px"/>
</form>
<?php 
$posts = get_posts_in_vicinity($account_info["lat"], $account_info["long"], $course["id"]);
$first = true;
foreach ($posts as $p) {
    if ($p["active"] == "0") {
        continue;
    }
    $poster = get_account_info($p["user_id"]);
    if (!$first) {
        echo "<hr>";
    }
    $first = false;
    echo '<div class="post">';
    echo '<div class="userpic">' . substr($poster["first_name"], 0, 1) . '</div>';
    echo "<span style=\"font-weight: bold\">" . $poster["first_name"] . " " . $poster["last_name"] . "</span> <span style=\"color: #888\">&mdash; " . date("n/j/Y g:i A", strtotime($p["post_time"])) . "</span>";
    if ($p["user_id"] == $account) {
        echo "<a href=\"?course=" . $_GET["course"] . "&finish=" . $p["id"] . "\"><div class=\"button finish\">Finished Studying</div></a>";
    } else {
        echo "<a href=\"?course=" . $_GET["course"] . "&attend=" . $p["id"] . "\"><div class=\"button attend\">" . (is_attending($account, $p["id"]) ? "Leave Session" : "Attend Session") . "</div></a>";
    }
    echo "<br>";
    echo "<div style=\"clear: both\"></div>";
    echo "<p>" . $p["content"] . "</p>";
コード例 #7
0
			<table border="1">
			<tr>
			<th></th>
			<?php 
        for ($i = 0; $i < count($schedules); $i++) {
            $schedules[$i]["count"] = 0;
            echo "<td>" . date("n/j/Y g:i A", strtotime($schedules[$i]["range_start"])) . "-" . (date("n/j/Y", strtotime($schedules[$i]["range_start"])) == date("n/j/Y", strtotime($schedules[$i]["range_end"])) ? date("g:i A", strtotime($schedules[$i]["range_end"])) : date("n/j/Y g:i A", strtotime($schedules[$i]["range_end"]))) . "</td>";
        }
        ?>
			</tr>
			<?php 
        foreach ($users as $u) {
            $votes = get_votes($u["id"]);
            echo "<tr>";
            if ($u["account"] != 0) {
                $a = get_account_info($u["account"]);
                echo "<td>" . $a["first_name"] . " " . $a["last_name"] . "</td>";
            } else {
                echo "<td>" . $u["name"] . "</td>";
            }
            for ($i = 0; $i < count($schedules); $i++) {
                if ($votes[$schedules[$i]["id"]] == "2") {
                    $schedules[$i]["count"]++;
                    echo "<td style=\"background-color: SpringGreen\">Preferred</td>";
                } else {
                    if ($votes[$schedules[$i]["id"]] == "1") {
                        $schedules[$i]["count"]++;
                        echo "<td style=\"background-color: LightGreen\">Available</td>";
                    } else {
                        if ($votes[$schedules[$i]["id"]] == "0") {
                            echo "<td style=\"background-color: Salmon\">Unavailable</td>";
コード例 #8
0
ファイル: invite.php プロジェクト: raphaelchang/schedulepoll
<?php

require_once "includes.php";
if (!isset($_GET["event"])) {
    header("Location: /" . SITE_ROOT);
}
$event = get_event($_GET["event"]);
if (isset($_POST["email"]) && $event["account"] === $account && $event["public"] == 0) {
    if ($_POST["email"] == "") {
        echo "Please enter an email.";
    } else {
        if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
            echo "Please enter a valid email.";
        } else {
            if ($_POST["email"] != get_account_info($account)["email"]) {
                add_invite($event["id"], $_POST["email"]);
                //TODO: email
            }
        }
    }
}
header("Location: view?event=" . $_GET["event"] . "#share");
コード例 #9
0
ファイル: my-subscriptions.php プロジェクト: Knixd/JPDrills
<?php

$path = $_SERVER['DOCUMENT_ROOT'];
include $path . '/stats.php';
log_visitor();
include $path . "/include/check_login.php";
if (!$logged_in) {
    header("location:login.php");
    exit;
}
if ($_SESSION['user']['account_type'] == "0") {
    header("location: http://www.jpdrills.com/account/");
    exit;
}
$account_name = $_SESSION['user']['account_type'] == 1 || $_SESSION['user']['account_type'] == 2 ? 'JPDrills Platinum' : '';
$account_info = get_account_info($_SESSION['user']['id']);
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- Super important! Tells googlebot that this site is responsive!-->
	<meta name="robots" content="NOODP">
	<title>Changing my details</title>
	<meta name="description" content="Changing my details at JPDrills.com">
	<meta name="keywords" content="Changing details" />
	<meta name="author" content="Ben Cann">
	
	<link rel="stylesheet" type="text/css" href="http://www.jpdrills.com/css/flatly.bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="http://www.jpdrills.com/css/newStyle.css">