예제 #1
0
                substr($record['info']['Title'], 0, 50));
        }
    }

    function html_entity_decode_ref(&$str) {
        $str = html_entity_decode($str);
    }

    try {
        $p = new SiteParse();
        # Don't set a max value when doing the email, as we don't need to worry
        # about the display
        $p->max_value_length = null;

        list($email, $is_text) = get_email_addr();
        $bibid = valid_bibid($_REQUEST['bibid']);

        $record = $p->get_record($bibid);
        array_walk_recursive($record, "html_entity_decode_ref");
        
        $record["info_keys"] = $p->email_detail_keys;

        $contents = get_detail_text($record, $is_text);

        $headers = get_email_headers($p);
        $subject = get_subject($p, $is_text, $record);

        mail($email, $subject, $contents, $headers);

        $sm = get_smarty();
        $sm->assign("bibid", $bibid);
예제 #2
0
    # don't want nojs return-to-search navigation in saved list items.
    clear_prev_search();

    $sm = get_smarty();
    $p = new SiteParse();
   
    try {
        $saved = ar_get('saved', $_SESSION);

        $records = array();
    
        if(!isset($_COOKIE['PHPSESSID'])) $sm->assign('cookies_disabled', true);

        if ($saved) {
            foreach (array_keys($saved) as $pos_bibid) {
                $bibid = valid_bibid($pos_bibid);

                $record  = $p->get_record($bibid);
                $record['info_keys'] = $p->detail_keys;
                $record['is_saved']  = true;

                $records[] = $record;
            }
        }

        $sm->assign("records", $records);
        
        header("Content-Type: text/html; charset=utf-8");
        $sm->display("pages/saved_list.html");

    } catch (Exception $e) {
예제 #3
0
<?
    require_once("util.php");

    $sm = get_smarty();

    try {
        $bibid = ar_get('bibid', $_REQUEST);

        if ($bibid == "all") {
            unset($_SESSION['saved']);
            $page = "responses/delete_all.html"; 
        } else {
            $bibid = valid_bibid($bibid);
            $sm->assign("bibid", $bibid);
            unset($_SESSION['saved'][$bibid]);
            $page = "responses/delete_one.html"; 
        }

        header("Content-Type: text/html; charset=utf-8");
        $sm->display($page);

    } catch (Exception $e) {
        $sm->assign("error", $e->GetMessage());
        $sm->display("responses/error.html");
    }
?>