コード例 #1
0
ファイル: index.php プロジェクト: vinod-co/centa
  <script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="../js/toprightmenu.js"></script>
  <?php 
    if ($userObject->has_role('Staff')) {
        echo '<script type="text/javascript" src="../js/staff_help.js"></script>';
    } else {
        echo '<script type="text/javascript" src="../js/student_help.js"></script>';
    }
    require_once '../include/toprightmenu.inc';
    ?>
</head>
<body>
<?php 
    echo draw_toprightmenu();
    if ($paper_no > 1) {
        echo displayHead($string);
        echo "<div style=\"margin:16px\">";
        echo "<h1>" . $string['multipleExams'] . "</h1>\n";
        echo "<p>" . $string['selectOne'] . "</p>\n";
    }
    echo "<table cellpadding=\"0\" cellspacing=\"4\" border=\"0\">\n";
    for ($i = 0; $i < $paper_no; $i++) {
        if ($paper_display[$i]['password'] == '') {
            echo "<tr><td width=\"66\" style=\"text-align:right\"><a href=\"user_index.php?id=" . $paper_display[$i]['crypt_name'] . "\">" . Paper_utils::displayIcon($paper_display[$i]['paper_type'], '', '', '', '', '') . "</a></td>\n";
            echo "<td><a href=\"user_index.php?id=" . $paper_display[$i]['crypt_name'] . "\">" . $paper_display[$i]['paper_title'] . "</a>";
        } else {
            echo "<tr><td width=\"66\" style=\"text-align:right\"><a href=\"user_index.php?id=" . $paper_display[$i]['crypt_name'] . "\">" . Paper_utils::displayIcon($paper_display[$i]['paper_type'], '', '', '', '', '') . "</a></td>\n";
            echo "<td><a href=\"user_index.php?id=" . $paper_display[$i]['crypt_name'] . "\">" . $paper_display[$i]['paper_title'] . "</a>";
            echo ' <img src="../artwork/key.png" width="16" height="16" alt="Key" /> <span style="color:#C88607; font-weight:bold; font-size:80%">' . $string['passwordRequired'] . '</span>';
        }
        if ($paper_display[$i]['completed'] == '') {
コード例 #2
0
ファイル: traitement.php プロジェクト: Darvey/AlloDoc
<?php 
session_start();
require_once 'includes/htmlElmt.php';
displayHead("Acceuil");
displayHeader();
try {
    $bdd = new PDO('mysql:host=localhost;dbname=docapp', 'root', 'root');
} catch (Exception $e) {
    die('Erreur :' . $e->getMessage());
}
if (!empty($_POST['Connexion'])) {
    // Si le formulaire est envoyé.
    if (!empty($_POST['s_mail']) && !empty($_POST['s_pass'])) {
        $password = md5($_POST['s_pass']);
        $mail = $_POST['s_mail'];
        if (isset($_POST['medecin'])) {
            $req = $bdd->prepare('SELECT * FROM medecin WHERE m_mail = (:mail) LIMIT 1;');
        } else {
            $req = $bdd->prepare('SELECT * FROM patient WHERE p_mail = (:mail) LIMIT 1;');
        }
        $req->execute(array("mail" => $mail));
        $res = $req->fetch();
        if (isset($_POST['medecin'])) {
            if ($res['m_mdp'] != $password) {
                echo 'Probleme Mail/Mot de passe';
            } else {
                $_SESSION["id"] = $res['m_id'];
                $_SESSION["nom"] = $res['m_nom'];
                $_SESSION["prenom"] = $res['m_prenom'];
                $_SESSION["pro"] = 1;
コード例 #3
0
                    }
                    $clientHandler = ClientHandler::getClientHandlerInstance($cfg);
                    $clientHandler->startTorrentClient($torrent, 0);
                    // just a sec..
                    sleep(1);
                }
                break;
        }
    }
    // back to index if no errors
    if (isset($messages) && $messages == "") {
        header("location: index.php");
        exit;
    }
}
displayHead(_MULTIPLE_UPLOAD);
?>

<?php 
if (isset($messages) && $messages != "") {
    ?>
    <table border="1" cellpadding="10" bgcolor="#ff9b9b">
    <tr>
    <td><div align="center"><?php 
    echo $messages;
    ?>
</div></td>
    </tr>
    </table><br><br>
<?php 
}