/**
  * @deprecated Deprecated.  Use CmsContentOperations::some_method instead.
  **/
 function GetContentOperations()
 {
     return CmsContentOperations::get_instance();
 }
if (!isset($gCms)) {
    exit;
}
// 0.  Check cms version
global $CMS_VERSION;
if (version_compare($CMS_VERSION, '2.0-beta1') < 0) {
    // not CMS 2.0, don't go any further.
    return;
}
// 1.  Get the content_id
$content_id = $gCms->variables['content_id'];
if ($content_id <= 0) {
    return;
}
// 2.  Get the content object
$content_obj = CmsContentOperations::load_content_from_id($content_id);
if (!is_object($content_obj)) {
    return;
}
// 3.  Get the properties.
$content_obj->load_properties();
$feu_groups = $content_obj->get_property_value('feu_groups');
$feu_redirect = $content_obj->get_property_value('feu_redirect');
// if the groups list is empty, return.
if ($feu_groups == '') {
    return;
}
// check this users member groups
$passed = false;
$uid = $this->LoggedInId();
if ($uid) {
 public function get_attribute_input($attr, $content_obj, $adding)
 {
     $gCms = cmsms();
     $feu = self::get_feu();
     switch ($attr->get_name()) {
         case 'feu_groups':
             $tmp = array($feu->Lang('any_logged_in_user') => '-1');
             $t2 = $feu->GetGroupList();
             foreach ($t2 as $k => $v) {
                 $tmp[$k] = $v;
             }
             if (is_array($tmp)) {
                 $sel = array();
                 $sel_str = $content_obj->get_property_value('feu_groups');
                 if ($sel_str) {
                     $sel = explode(',', $sel_str);
                 }
                 $prompt = $feu->Lang('feu_groups_prompt');
                 $field = $feu->CreateInputSelectList('', 'feu_groups[]', $tmp, $sel, min(count($tmp), 5));
                 return array($prompt . ':', $field);
             }
             break;
         case 'feu_redirect':
             // get a list of pages
             $val = $content_obj->get_property_value('feu_redirect', -1);
             $prompt = $feu->Lang('feu_redirect_prompt');
             $field = CmsContentOperations::CreateHierarchyDropdown($val, '', 'feu_redirect');
             return array($prompt . ':', $field);
             break;
     }
 }