A Liturgy for Reconciliation

Lent and Advent are the two penitential seasons of the church year. They are times of preparation and waiting. The most important way we as Christians prepare for the coming of the Christ, the one who reconciles us, is to examine ourselves and repent of sin. The following liturgy is set within the context of Advent. By changing the prayers and Scripture readings, it can be suitably modified for other seasons of the year.

<?php
global $user;
$url = $_GET['q'];
//If it's a node full view
if (preg_match("/^node\/([0-9]+)$/", $url, $matches) || preg_match("/^comment\/reply\/([0-9]+)$/", $url, $matches)) {
$node_id = $matches[1];
$content = node_load($node_id);
if ($content->type == "premium_content") {
//for registered users
//Set the reference to this premium content to take the user back to the same article after successful checkout
$_SESSION['pre_checkout_premium_page'] = request_uri();

$message = 'Full text is available to premium subscribers only. You may subscribe here and start accessing premium content right away!';

if ($user->uid > 0) {
drupal_set_message($message, 'error');
drupal_goto('premium_content_subscription');
} else { //for anonymous users
drupal_set_message($message . '
If you are already subscribed to Worshipedia, log in here.', 'error');
drupal_goto('user/register');
}
}
}
?>