Esempio n. 1
0
            $sp = new pdSearchParams();
        }
        $pos = strpos($_SERVER['PHP_SELF'], 'papersdb');
        $url = substr($_SERVER['PHP_SELF'], 0, $pos) . 'papersdb';
        // WICK
        $this->js .= "\ncollection=" . convertArrayToJavascript($this->db_authors, false) . "\n";
        $js_file = 'js/advanced_search.js';
        assert('file_exists($js_file)');
        $content = file_get_contents($js_file);
        // adjust date information if user did not enter all the fields
        if (!isset($sp->startdate['Y'])) {
            $sp->startdate['Y'] = pdPublication::MIN_YEAR;
        }
        if (!isset($sp->startdate['M'])) {
            $sp->startdate['M'] = '1';
        }
        if (!isset($sp->enddate['Y'])) {
            $sp->enddate['Y'] = pdPublication::MAX_YEAR;
        }
        if (!isset($sp->enddate['M'])) {
            $sp->enddate['M'] = '12';
        }
        $this->js .= str_replace(array('{host}', '{self}', '{selected_authors}', '{cat_id}', '{title}', '{authors}', '{paper}', '{abstract}', '{venue}', '{keywords}', '{paper_rank_other}', '{startdateY}', '{startdateM}', '{enddateY}', '{enddateM}', '{paper_rank1}', '{paper_rank2}', '{paper_rank3}', '{paper_rank4}', '{paper_col1}', '{paper_col2}', '{paper_col3}', '{paper_col4}', '{author_myself}', '{show_internal_info}', '{have_user_info}', '{user_info}'), array($_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'], $sp->authors, $sp->cat_id, $sp->title, $sp->authors, $sp->paper, $sp->abstract, $sp->venue, $sp->keywords, $sp->paper_rank_other, $sp->startdate['Y'], $sp->startdate['M'], $sp->enddate['Y'], $sp->enddate['M'], isset($sp->paper_rank[1]) ? $sp->paper_rank[1] == 'yes' : FALSE, isset($sp->paper_rank[2]) ? $sp->paper_rank[2] == 'yes' : FALSE, isset($sp->paper_rank[3]) ? $sp->paper_rank[3] == 'yes' : FALSE, isset($sp->paper_rank[4]) ? $sp->paper_rank[4] == 'yes' : FALSE, isset($sp->paper_col[1]) ? $sp->paper_col[1] == 'yes' : FALSE, isset($sp->paper_col[2]) ? $sp->paper_col[2] == 'yes' : FALSE, isset($sp->paper_col[3]) ? $sp->paper_col[3] == 'yes' : FALSE, isset($sp->paper_col[4]) ? $sp->paper_col[4] == 'yes' : FALSE, isset($_SESSION['user']) ? $sp->author_myself != '' : FALSE, isset($_SESSION['user']) ? $sp->show_internal_info == 'yes' : FALSE, isset($_SESSION['user']) && $_SESSION['user']->showInternalInfo() ? 'true' : 'false', isset($_SESSION['user']) ? $sp->user_info : ""), $content);
        $this->addJavascriptFiles(array('js/wick.js', 'js/check_authors.js'));
    }
}
$page = new advanced_search();
echo $page->toHtml();
?>