Beispiel #1
0
<?php

/*
  Version: 2.0.2
http:// .com
*/
require_once "models/config.php";
if (!securePage($_SERVER['PHP_SELF'])) {
    die;
}
require_once "models/header.php";
echo "\n<body>\n<div id='wrapper'>\n<div id='top'><div id='logo'></div></div>\n<div id='content'>\n<h1> </h1>\n<h2>Account</h2>\n<div id='left-nav'>";
include "left-nav.php";
echo fetchTotalMarks($loggedInUser->user_id);
echo "\n</div>\n<div id='main'>\nHey, {$loggedInUser->displayname}. This is an example secure page designed to demonstrate some of the basic features of  . Just 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()) . ".\n</div>\n<div id='bottom'></div>\n</div>\n\n\n</body>\n</html>";
echo '<h3>Questions : </h3>';
fetchQuestions();
  Version: 2.0.2
http:// .com
*/
require_once "models/config.php";
if (!securePage($_SERVER['PHP_SELF'])) {
    die;
}
require_once "models/header.php";
if ($loggedInUser->checkPermission(array(2))) {
    if (isset($_POST['userId']) && isset($_POST['marks'])) {
        $userId = $_POST['userId'];
        $questionId = $_POST['question_id'];
        $marksAwarded = $_POST['marks'];
        $marksAwardedBy = $_POST['whoAdded'];
        updateUserMarks($userId, $questionId, $marksAwarded, $marksAwardedBy);
        $totalMarksOfUser = fetchTotalMarks($userId);
        updateUserProfileMarks($totalMarksOfUser, $userId);
        echo "Marks updated Successfully..";
        # code...
    }
    echo "\n\n<body>\n<div id='wrapper'>\n\n<div id='content'>\n<h1>ACM EVENT</h1>\n<h2>Account</h2>\n<div id='left-nav'>";
    include "left-nav.php";
    echo "\n</div>\n<div id='bottom'></div>\n</div>\n</body>\n</html>";
    ?>
<form method = "POST" action = "admin_updateMarks.php" name= "updateMarks">
<h3>Update Marks</h3>
<p>User ID : <input type = "text" name = "userId">	</p>
<p>Question ID : <input type= "text" name = "question_id" ></p>
<p>Marks Awarded : <input type = "text" name = "marks">	</p>

<input type = "hidden" name = "whoAdded" value = " <?php