Пример #1
0
function reg()
{
    $id = get_valid_id($_REQUEST["id"]);
    $date = get_valid_date($_REQUEST["date"]);
    $t = strtotime($date);
    $talk_data = get_talk_data_or_gen($t, $id);
    if (file_exists(gen_memo_filename($t, $id))) {
        $memo_filename = date('ymd', $t) . "_{$id}.pdf";
        $link = "http://ropas.snu.ac.kr/snt_memo2/" . $memo_filename;
        $memo = "<a href=\"" . $link . "\">" . $memo_filename . "</a>";
    } else {
        $memo = "등록된 메모가 없습니다.";
    }
    $arr = array("ID" => $id, "NAME" => get_member_name($id), "WHEN" => $date, "TITLE" => htmlspecialchars($talk_data["title"]), "ABSTRACT" => htmlspecialchars($talk_data["abstract"]), "MEMO" => $memo);
    echo replace(__ROOT__ . "/template/reg_abstract.temp", $arr);
}
Пример #2
0
<?php

if (!defined('__ROOT__')) {
    define('__ROOT__', realpath(dirname(dirname(__FILE__))));
}
require_once __ROOT__ . "/lib/log.php";
require_once __ROOT__ . "/lib/read_data.php";
require_once __ROOT__ . "/lib/replace.php";
require_once __ROOT__ . "/lib/schedule.php";
require_once __ROOT__ . "/lib/send_mail.php";
require_once __ROOT__ . "/lib/comment.php";
require_once __ROOT__ . "/lib/validate_input.php";
$title = "코멘트 보기";
require __ROOT__ . '/template/header_noback.temp';
$id = get_valid_id($_REQUEST["id"]);
$t = strtotime(get_valid_date($_REQUEST["date"]));
if ($id !== NULL) {
    echo gen_comment_msg($t, $id);
}
require __ROOT__ . '/template/footer.temp';