+// Checks whether auto-start is enabled
+function isSurfbarAutoStartEnabled () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = ((isConfigEntry('surfbar_auto_start')) && (getSurfbarAutoStart() == 'Y'));
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_daily_counter
+function getSurfbarDailyCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_daily_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_yester_counter
+function getSurfbarYesterCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_yester_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_weekly_counter
+function getSurfbarWeeklyCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_weekly_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_monthly_counter
+function getSurfbarMonthlyCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_monthly_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_total_counter
+function getSurfbarTotalCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_total_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+//------------------------------------------------------------------------------
+// Template helper functions
+//------------------------------------------------------------------------------
+
+// Template helper to generate a selection box for surfbar actions
+function doTemplateSurfbarActionsActionSelectionBox ($templateName, $clear = FALSE, $default = NULL) {
+ // Init array
+ $actionsAction = array(
+ 0 => array('actions_action' => 'EDIT'),
+ 1 => array('actions_action' => 'DELETE'),
+ 2 => array('actions_action' => 'PAUSE'),
+ 3 => array('actions_action' => 'UNPAUSE'),
+ 4 => array('actions_action' => 'FRAMETEST'),
+ 5 => array('actions_action' => 'RETREAT'),
+ 6 => array('actions_action' => 'RESUBMIT'),
+ 7 => array('actions_action' => 'BOOKNOW')
+ );
+
+ // Handle it over to generateSelectionBoxFromArray()
+ $content = generateSelectionBoxFromArray($actionsAction, 'actions_action', 'actions_action', '', '_surfbar', '', $default, '', FALSE, TRUE);
+
+ // Return prepared content
+ return $content;
+}
+
+// Template helper to generate a selection box for surfbar status
+function doTemplateSurfbarActionsStatusSelectionBox ($templateName, $clear = FALSE, $default = NULL) {
+ // Init array
+ $status = array(
+ 0 => array('actions_status' => 'PENDING'),
+ 1 => array('actions_status' => 'ACTIVE'),
+ 2 => array('actions_status' => 'LOCKED'),
+ 3 => array('actions_status' => 'STOPPED'),
+ 4 => array('actions_status' => 'REJECTED'),
+ 5 => array('actions_status' => 'DELETED'),
+ 6 => array('actions_status' => 'MIGRATED'),
+ 7 => array('actions_status' => 'DEPLETED')
+ );
+
+ // Handle it over to generateSelectionBoxFromArray()
+ $content = generateSelectionBoxFromArray($status, 'actions_status', 'actions_status', '', '_surfbar', '', $default, '', FALSE, TRUE);
+
+ // Return prepared content
+ return $content;
+}
+
+// Template helper to generate a selection box for surfbar status
+function doTemplateSurfbarActionsNewStatusSelectionBox ($templateName, $clear = FALSE, $default = NULL) {
+ // Init array
+ $status = array(
+ 0 => array('actions_new_status' => 'PENDING'),
+ 1 => array('actions_new_status' => 'ACTIVE'),
+ 2 => array('actions_new_status' => 'LOCKED'),
+ 3 => array('actions_new_status' => 'STOPPED'),
+ 4 => array('actions_new_status' => 'REJECTED'),
+ 5 => array('actions_new_status' => 'DELETED'),
+ 6 => array('actions_new_status' => 'MIGRATED'),
+ 7 => array('actions_new_status' => 'DEPLETED')
+ );
+
+ // Handle it over to generateSelectionBoxFromArray()
+ $content = generateSelectionBoxFromArray($status, 'actions_new_status', 'actions_new_status', '', '_surfbar', '', $default, '', TRUE, TRUE);
+
+ // Return prepared content
+ return $content;
+}
+
+//------------------------------------------------------------------------------