| 1 |
<?php /* $Id: premium.module,v 1.16 2008/08/03 06:17:46 jerdavis Exp $ */ |
<?php /* $Id: premium.module,v 1.7.2.4 2008/08/03 06:26:20 jerdavis Exp $ */ |
| 2 |
/** |
/** |
| 3 |
* @file Restrict access to the full body of premium content |
* @file Restrict access to the full body of premium content |
| 4 |
*/ |
*/ |
| 157 |
), |
), |
| 158 |
); |
); |
| 159 |
|
|
| 160 |
$options = (range(1, 15)); |
$options = (range(0, 15)); |
| 161 |
unset($options[0]); |
unset($options[0]); |
| 162 |
$form['premium_time_count'] = array( |
$form['premium_time_count'] = array( |
| 163 |
'#type' => 'select', |
'#type' => 'select', |
| 222 |
if ($form_values['premium_bulk_update']) { |
if ($form_values['premium_bulk_update']) { |
| 223 |
db_query("DELETE from {premium}"); |
db_query("DELETE from {premium}"); |
| 224 |
|
|
|
$start = $end = 0; |
|
|
_premium_offset(0, $start, $end, $mode, $count, $unit); |
|
|
|
|
| 225 |
foreach ($premium_types as $type) { |
foreach ($premium_types as $type) { |
| 226 |
|
$start = $end = 0; |
| 227 |
|
_premium_offset(0, $start, $end, $mode, $count, $unit); |
| 228 |
// Apply the timestamp delta's to the node's created date. |
// Apply the timestamp delta's to the node's created date. |
| 229 |
if ($start) $start = 'created + '. (int) $start; |
if ($start) $start = 'created + '. (int) $start; |
| 230 |
if ($end) $end = 'created + '. (int) $end; |
if ($end) $end = 'created + '. (int) $end; |