paper

[insert_php]

global $wpdb;
if (!ctype_digit($_GET[“id”])) {
die(“wrong id”);
}
$id = $_GET[“id”];
$paper = $wpdb->get_row(“select * from enoch_papers where id=$id”);
echo “

“.$paper->title.”

“;
echo “Author: $paper->author_name
“;
echo “Author Full name: $paper->author_fullname
“;
global $current_user;
if (is_user_logged_in() && $current_user->roles!=array(“subscriber”)) {
echo “download paper“;
} else {
echo “
Sorry, access to papers is limited to members only.
“;
wp_login_form();
}
[/insert_php]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*