コード例 #1
0
ファイル: admin.php プロジェクト: pmontojo/Blackboard
function view($data)
{
    startOfPage();
    echo "<div class='jumbotron'>" . PHP_EOL;
    startContent();
    //$title = get_Title();
    //siteTitle("$title");
    admins_renderLoginForm();
    echo "</div>" . PHP_EOL;
    echo '<hr>' . PHP_EOL;
    echo '<div class="container-narrow">' . PHP_EOL;
    //echo "<a href='index.php?option=store&view=admin'>If you are a professor, login here</a>".PHP_EOL;
    $courses = $data["Tbl_Courses"];
    if (users_loggedIn()) {
        echo "<h2><a href='index.php?option=courses&view=edit'>Edit title and subtitle</a></h2>";
    }
    // if (!empty($courses))
    // {
    // 	foreach ($courses as $course)
    // 	{
    // 		courses_render($course);
    // 	}
    // }
    endContent();
    endOfPage();
}
コード例 #2
0
ファイル: purchase.php プロジェクト: pmontojo/Blackboard
function view($data)
{
    startOfPage();
    //$title = get_Title();
    //siteTitle("$title");
    //startOfPage();
    //startContent();
    //$content = "this is the title";
    //$title = get_Title();
    //siteTitle("$title");
    echo "<div class='jumbotron'>" . PHP_EOL;
    startContent();
    users_renderLoginForm();
    echo "</div>" . PHP_EOL;
    echo '<hr>' . PHP_EOL;
    echo '<div class="container-narrow">' . PHP_EOL;
    endContent();
    p("<h2>Here is the list of your current enrollments</h2>");
    //users_renderLoginForm();
    $history = $data["Enrollment"];
    h1("Your Enrollments");
    foreach ($history as $enrollment) {
        purchases_render($enrollment);
    }
    endOfPage();
}
コード例 #3
0
ファイル: home.php プロジェクト: beafus/blackboard
function view($data)
{
    startOfPage("homeeeeee");
    startContent();
    siteTitle("Blackboard");
    p("Welcome to Blackboard - Please Log in !");
    users_renderLoginForm();
    echo "<p><a href= 'index.php?option=user&view=students_list' >List of students</a></p>";
    echo "<p><a href= 'index.php?option=subject&view=subjects_list''>List of subjects</a></p>";
    endContent();
    endOfPage();
}
コード例 #4
0
ファイル: enrollment.php プロジェクト: beafus/blackboard
function view($data)
{
    startOfPage("esto es el view enrollment");
    siteTitle("Blackboard");
    p("Welcome to Blackboard - Select your subjects!");
    $history = $data["enrollments"];
    h1("Your Subjects");
    foreach ($history as $enrollment) {
        enrollments_render($enrollment);
    }
    endOfPage();
}
コード例 #5
0
ファイル: admin.php プロジェクト: beafus/blackboard
function view($data)
{
    startOfPage("homeeeeee");
    startContent();
    siteTitle("Blackboard");
    p("Welcome to Blackboard - Please Log in !");
    users_renderLoginForm();
    echo "<h3>If you want to change the title and subtitle do it now!</h3>";
    echo "<b><a href= 'editTitle.php' >Edit title</a></b>";
    endContent();
    endOfPage();
}
コード例 #6
0
ファイル: subject_detail.php プロジェクト: beafus/blackboard
function view($data)
{
    startOfPage("subjectsss en view subdetail");
    startContent();
    siteTitle("Blackboard");
    p("Welcome to Blackboard - Please Log in and select your subjects!");
    $subject = $data["subjects"];
    if (!empty($subject)) {
        subjects_render($subject);
    }
    endContent();
    endOfPage();
}
コード例 #7
0
ファイル: subjects_list.php プロジェクト: beafus/blackboard
function view($data)
{
    startOfPage();
    startContent();
    siteTitle("Blackboard");
    p("Welcome to Blackboard");
    $subjects = $data["subjects"];
    if (!empty($subjects)) {
        foreach ($subjects as $subject) {
            subjects_render($subject);
        }
    }
    endContent();
    endOfPage();
}
コード例 #8
0
ファイル: details.php プロジェクト: pmontojo/Blackboard
function view($data)
{
    startOfPage();
    echo "<div class='jumbotron'>" . PHP_EOL;
    startContent();
    users_renderLoginForm();
    echo "</div>" . PHP_EOL;
    echo '<div class="container-narrow">' . PHP_EOL;
    endContent();
    $history = $data["Enrollment"];
    h1("Details of this course");
    foreach ($history as $enrollment) {
        //echo $data;
        display_render($enrollment);
    }
    //endOfPage();
}
コード例 #9
0
ファイル: students_list.php プロジェクト: beafus/blackboard
function view($data)
{
    startOfPage("students list vieww");
    startContent();
    siteTitle("Blackboard");
    p("Welcome to Blackboard - Please Log in !");
    $students = $data["users"];
    if (!empty($students)) {
        h2("List of students:");
        foreach ($students as $student) {
            students_render($student);
        }
        h2("List of professors:");
        foreach ($students as $student) {
            professors_render($student);
        }
    }
    endContent();
    endOfPage();
}
コード例 #10
0
ファイル: users_list.php プロジェクト: pmontojo/Blackboard
function view($data)
{
    startOfPage();
    startContent();
    //echo '<hr>'.PHP_EOL;
    echo '<div class="container-narrow">' . PHP_EOL;
    //$content = "this is the title";
    //$title = get_Title();
    //siteTitle("$title");
    //p("<h2>Welcome to IIT Web Site. Please login and enroll to a course</h2>");
    //users_renderLoginForm();
    //echo "<a href='index.php?option=store&view=admin'>If you are a professor, login here</a>".PHP_EOL;
    $users = $data["Tbl_Users"];
    if (!empty($users)) {
        foreach ($users as $user) {
            users_render($user);
        }
    }
    endContent();
    endOfPage();
}
コード例 #11
0
ファイル: course_list.php プロジェクト: pmontojo/Blackboard
function view($data)
{
    startOfPage();
    //startContent();
    //$content = "this is the title";
    //$title = get_Title();
    //siteTitle("$title");
    echo "<div class='jumbotron'>" . PHP_EOL;
    startContent();
    users_renderLoginForm();
    echo "</div>" . PHP_EOL;
    echo '<hr>' . PHP_EOL;
    echo '<div class="container-narrow">' . PHP_EOL;
    endContent();
    //echo "<a href='index.php?option=store&view=admin'>If you are a professor, login here</a>".PHP_EOL;
    $courses = $data["Tbl_Courses"];
    if (!empty($courses)) {
        courses_render($courses);
    }
    //endContent();
    endOfPage();
}
コード例 #12
0
ファイル: installation.php プロジェクト: beafus/blackboard
<?php

define("true-access", true);
include_once "components/user/model/common.php";
include_once "layoutInstall/common.php";
startOfPage("Blackboard site");
startContent();
siteTitle("Blackboard");
h2("Welcome to Blackboard - Please Install your database!");
define("form_host", "host");
define("form_user", "user");
define("form_password", "password");
define("form_database", "database");
function display_installation_form()
{
    echo '<form enctype="multipart/form-data" method="POST" action="">' . PHP_EOL;
    echo '<table>';
    echo '<tr><td><b>Host Name:<b/></td></tr>' . PHP_EOL;
    echo '<tr><td><textarea type="textfield" rows="1" cols="40"name="' . form_host . '" placeholder="enter host"></textarea></td></tr>' . PHP_EOL;
    echo '<tr><td><b>User Name:<b/></td></tr>' . PHP_EOL;
    echo '<tr><td><textarea type="textfield" rows="1" cols="40" name="' . form_user . '" placeholder="enter user"></textarea></td></tr>' . PHP_EOL;
    echo '<tr><td><b>Password:<b/></td></tr>' . PHP_EOL;
    echo '<tr><td><textarea type="textfield" rows="1" cols="40" name="' . form_password . '" placeholder="enter password"></textarea></td></tr>' . PHP_EOL;
    echo '<tr><td><b>Database Name:<b/></td></tr>' . PHP_EOL;
    echo '<tr><td><textarea type="textfield" rows="1" cols="40" name="' . form_database . '" placeholder="enter database name"></textarea></td></tr>' . PHP_EOL;
    echo '</table>';
    echo '<input type="submit"  name="submit" value="Submit"/> ' . PHP_EOL;
    echo '</form>' . PHP_EOL;
    if (!empty($_POST["submit"]) && (empty($_POST[form_host]) || empty($_POST[form_user]) || empty($_POST[form_password]) || empty($_POST[form_database]))) {
        echo '<p style="color: red;">Please enter all the required data</p>' . PHP_EOL;
    }
コード例 #13
0
ファイル: user.php プロジェクト: beafus/blog
<?php

/**
* Blog application
* user can upload a new status
* also view previous status
*
*/
define("true-access", true);
include "lib/layout.php";
$totalPosts = intval(file_get_contents("./blogs/totalPosts"));
ob_start();
session_start();
startOfPage("blogWorld");
define("form_blog_input_name", "blog");
define("form_blog_title_name", "title");
function view_past_uploads()
{
    global $totalPosts;
    //we just want to print the last 5 posts of our blog.
    for ($j = $totalPosts; $j >= $totalPosts - 5; $j--) {
        $blogPath = "./blogs/blog" . $j . "/";
        if (file_exists($blogPath)) {
            $titlePath = $blogPath . "title.txt";
            $textPath = $blogPath . "text.txt";
            $imagePath = $blogPath . "image";
            $stringText = file_get_contents($textPath);
            $stringText = str_replace("\r", "<br>", $stringText);
            $stringTitle = file_get_contents($titlePath);
            echo '<a href="/src/user.php?post=' . $j . '"><h2>' . $stringTitle . '</h2></a>';
            echo '<p>' . $stringText . '</p>';
コード例 #14
0
ファイル: editTitle.php プロジェクト: beafus/blackboard

<?php 
//defined("true-access") or die("No script kiddies please!");
define("true-access", true);
include_once "layoutEdit/common.php";
startOfPage();
startContent();
siteTitle("Blackboard");
//h2("Welcome to Blackboard - Please Install your database!");
function edit_title()
{
    echo '<form enctype="multipart/form-data" method="POST" action="">' . PHP_EOL;
    //Text field to write your new title
    echo '<table>';
    echo '<tr><td><b>Page title:<b/></td></tr>' . PHP_EOL;
    echo '<tr><td><textarea type="textfield" rows="1" cols="40" name="' . form_title . '" placeholder="rename title"></textarea></td></tr>' . PHP_EOL;
    echo '<tr><td><textarea type="textfield" rows="1" cols="40" name="' . form_subtitle . '" placeholder="rename subtitle"></textarea></td></tr>' . PHP_EOL;
    echo '</table>';
    //Button to submit your entrie
    echo '<input type="submit"  name="submit" value="Rename"/> ' . PHP_EOL;
    echo '</form>' . PHP_EOL;
    if (!empty($_POST["submit"]) && (empty($_POST[form_title]) || empty($_POST[form_subtitle]))) {
        //display an error message in case the blogger didn´t write a title or the text.
        //as the image is optinal if an image is not uploaded there wont be an error message.
        echo '<p style="color: red;">Please enter a title and subtitle</p>' . PHP_EOL;
    }
    //p("Imparted by: ".$subject['Professor']." semester: ".$subject["Semester"]);
}
function confirm_title()
{