コード例 #1
0
ファイル: paper.php プロジェクト: TheProjecter/openreview
tinyMCE.init({
	mode : "textareas",
	theme : "simple"
});
</script>
<div class='content fullwidth'>
<?php 
$paper_id = false;
$safe_doi = mysql_escape_string($_GET["doi"]);
$safe_paper_id = mysql_escape_string($_GET["paper_id"]);
if ($safe_doi) {
    $safe_paper_id = get_paper_id_from_doi($safe_doi);
}
if ($safe_paper_id && is_numeric($safe_paper_id)) {
    $paper_id = $safe_paper_id;
}
if ($paper_id >= 1) {
    $papers = get_papers("added_on", array("paper_id" => $paper_id));
    if (sizeof($papers) == 1) {
        $paper = $papers[0];
        print_paper($paper, array("magnify" => true, "link_through" => true));
    } else {
        print_error("Couldn't find paper", "Sorry, we couldn't find the paper that you're looking for.");
    }
} else {
    print_error("Couldn't find paper", "Sorry, we couldn't find the paper that you're looking for.");
}
?>
</div>
<?php 
include "footer.php";
コード例 #2
0
    print "<h3>All time most popular books &amp; papers</h3>";
    $papers = get_papers("cited", array("journal" => $safe_journal_id, "limit" => 5));
    foreach ($papers as $paper) {
        print_paper($paper, array("display" => "minimal"));
    }
    ?>
</td>
<?php 
    $papers = get_papers("cited", array("journal" => $safe_journal_id, "limit" => 5, "published_after" => $last_month));
    if ($papers) {
        ?>
<td valign='top' width='50%'>
	<?php 
        print "<h3>Recently published hot books &amp; papers</h3>";
        foreach ($papers as $paper) {
            print_paper($paper, array("display" => "minimal"));
        }
        ?>
	
</td>
<?php 
    }
    ?>
</tr>
</table>
</div>
<?php 
} else {
    print_error("No publisher specified", "Sorry, I'm not sure which publisher you're looking for.");
}
include "footer.php";
コード例 #3
0
ファイル: index.php プロジェクト: TheProjecter/openreview
    print_post($post, array("image" => true));
}
print "<div class='read_more'><a href='" . linkto("posts.php", $page_vars, array("order_by" => "cited", "timeframe" => "1w")) . "'>read more recently popular posts...</a></div>";
print "</div>";
?>
	
</div>
</div>
<div class='frontpage_tab2'>
<div class='tab_padding'>
<?php 
$papers = get_top_papers($safe_category, $last_fortnight);
if ($config['collect_papers'] && sizeof($papers)) {
    print "<div class='tab_title'>Popular books &amp; papers this week</div>";
    foreach ($papers as $paper) {
        print_paper($paper, array("display" => "minimal", "show_byline" => true));
    }
    print "<div class='read_more'><a href='" . linkto("papers.php", $page_vars, array("order_by" => "cited", "timeframe" => "1m")) . "'>read more recently popular papers...</a></div>";
    print "</div>";
} else {
    print "<div class='tab_title'>Popular posts this month</div>";
    $posts = get_top_posts($safe_category, $last_month, 5);
    print "<div class='popular'>";
    foreach ($posts as $post) {
        print_post($post, array("image" => true));
    }
    print "<div class='read_more'><a href='" . linkto("posts.php", $page_vars, array("order_by" => "cited", "timeframe" => "1w")) . "'>read more recently popular posts...</a></div>";
    print "</div>";
}
?>
</div>