Example #1
0
 function _after_request()
 {
     $list_location_cookie = get_class($this) . '_ListLocation';
     if (isset($_COOKIE[$list_location_cookie]) && $_COOKIE[$list_location_cookie]) {
         ampredirect($_COOKIE[$list_location_cookie]);
     }
 }
Example #2
0
 function check_authen_credentials()
 {
     // First check for an existing authentication token.
     if (isset($_COOKIE[$this->_cookie_name])) {
         $this->notice('cookie exists');
         if ($result = $this->_handler->check_cookie($_COOKIE[$this->_cookie_name])) {
             return $result;
         }
     }
     //Check for a temporary auth token
     if (isset($_GET[$this->_cookie_name]) && isset($_GET['authtype']) && $_GET['authtype'] == 'temp') {
         if ($result = $this->_handler->check_cookie($_GET[$this->_cookie_name])) {
             $cookie_bits = explode(':', $_GET[$this->_cookie_name]);
             $hash = $cookie_bits[0];
             $this->_handler->set_authen_tokens();
             $this->_dbcon->Execute('DELETE FROM users_sessions where hash=' . $this->_dbcon->qstr($hash));
             if (isset($_GET['auth_action']) && $_GET['auth_action'] == 'reset') {
                 trigger_error('redirecting to :' . AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
                 ampredirect(AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
                 exit;
             }
             return $result;
         }
     }
     if (isset($_REQUEST[$this->_login_username_field]) || isset($_SERVER['PHP_AUTH_USER'])) {
         $this->notice('checking password');
         return $this->_handler->check_password();
     }
     $this->error('neither cookie nor password found');
     return false;
 }
Example #3
0
 function temp_auth_actions()
 {
     if (isset($_GET['auth_action']) && $_GET['auth_action'] == 'reset') {
         trigger_error('redirecting to :' . AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
         ampredirect(AMP_url_update('/system/' . AMP_SYSTEM_URL_USER, array('id' => $this->_handler->userid, 'action' => 'reset')));
         exit;
     }
 }
Example #4
0
 function onDelete(&$controller, $args = array())
 {
     $model = $controller->get_model();
     $nav_layout = $model->getLayoutId();
     if ($nav_layout) {
         ampredirect(AMP_url_update(AMP_SYSTEM_URL_NAV_LAYOUT, array('id' => $nav_layout)));
     }
 }
Example #5
0
 function onSave(&$controller)
 {
     $form = $controller->get_form();
     $values = $form->getValues();
     if (isset($values['list_form_id']) && $values['list_form_id']) {
         ampredirect(AMP_url_add_vars(AMP_SYSTEM_URL_TOOL_PUBLICPAGE, array('modid=' . $values['modid'])));
     }
 }
Example #6
0
 function commit_cancel()
 {
     $url = $this->assert_var('source_url');
     if (!$url) {
         $url = AMP_CONTENT_URL_INDEX;
     }
     ampredirect($url);
     return true;
 }
Example #7
0
 function commit_save()
 {
     $result = parent::commit_save();
     if (!$result) {
         return false;
     }
     $this->_saveSections();
     ampredirect(AMP_SYSTEM_URL_HOME);
     return $result;
 }
Example #8
0
 function commit_update()
 {
     require_once 'AMP/Content/RSS/Subscription/Subscription.php';
     $current_subscription_list =& AMPContent_Lookup::instance('RSS_Subscriptions');
     foreach ($current_subscription_list as $subscription_id => $subscription_name) {
         $sub = new RSS_Subscription(AMP_Registry::getDbcon(), $subscription_id);
         $sub->update();
     }
     AMP_flush_common_cache();
     ampredirect(AMP_SYSTEM_URL_RSS_AGGREGATOR);
 }
Example #9
0
 function show()
 {
     $this->_before('show');
     $article = $this->current_object = new Article(AMP_dbcon(), $this->params['id']);
     //section headers redirect to sections
     if ($article && $article->hasData() && $article->getData('class') == AMP_CONTENT_CLASS_SECTIONHEADER) {
         return ampredirect(AMP_route_for('section', $article->getParent()));
     }
     if (!($article && AmpUtility::display_okay($article))) {
         return AMP_make_404();
     }
     $this->render($article->getDisplay());
 }
Example #10
0
 function show()
 {
     $this->_before('show');
     $section = $this->current_object = new Section(AMP_dbcon(), $this->params['id']);
     if (!($section && AmpUtility::display_okay($section))) {
         return AMP_make_404();
     }
     if ($target = $section->getHeaderRedirect()) {
         ampredirect($target);
     }
     $display =& $section->getDisplay();
     $this->_render_section_header($display);
     $this->render($display);
 }
Example #11
0
function AMP_init_user()
{
    if (!isset($_SERVER['REMOTE_USER'])) {
        return false;
    }
    $AMP_Permission =& AMPSystem_PermissionManager::instance();
    $AMP_CurrentUser = false;
    $AMP_CurrentUser =& $AMP_Permission->readUser($_SERVER['REMOTE_USER']);
    if ($AMP_CurrentUser) {
        if (!defined('AMP_SYSTEM_USER_ID')) {
            define('AMP_SYSTEM_USER_ID', $AMP_CurrentUser->id);
        }
        $content_roots = AMP_lookup('userSiteRoots');
        if (isset($content_roots[AMP_SYSTEM_USER_ID])) {
            if (!defined('AMP_CONTENT_MAP_ROOT_SECTION')) {
                define('AMP_CONTENT_MAP_ROOT_SECTION', $content_roots[AMP_SYSTEM_USER_ID]);
            }
            $sections = AMP_lookup('sections');
            if (!defined('AMP_CONTENT_SECTION_NAME_ROOT')) {
                if (AMP_CONTENT_MAP_ROOT_SECTION != AMP_CONTENT_SECTION_ID_ROOT) {
                    define('AMP_CONTENT_SECTION_NAME_ROOT', $sections[AMP_CONTENT_MAP_ROOT_SECTION]);
                } else {
                    define('AMP_CONTENT_SECTION_NAME_ROOT', AMP_SITE_NAME);
                }
            }
        } else {
            define('AMP_CONTENT_MAP_ROOT_SECTION', AMP_CONTENT_SECTION_ID_ROOT);
            define('AMP_CONTENT_SECTION_NAME_ROOT', AMP_SITE_NAME);
        }
        //ACL user def code
        if (!defined('AMP_SYSTEM_USER_TYPE')) {
            define('AMP_SYSTEM_USER_TYPE', 'users');
        }
        if (!defined('AMP_SYSTEM_USER_ID_ACL')) {
            define('AMP_SYSTEM_USER_ID_ACL', 'user_' . $AMP_CurrentUser->id);
        }
        if (!AMP_Authorized(AMP_PERMISSION_CONTENT_ACCESS)) {
            trigger_error('content access not authorized for user ' . $AMP_CurrentUser->getName());
            ampredirect(AMP_SITE_URL);
        }
        //ENSURE THAT THE current user is allowed to see this page
        if (!$AMP_Permission->authorizedPage()) {
            trigger_error('unauthorized page access attempt by ' . $AMP_CurrentUser->getName());
            ampredirect($AMP_Permission->userHome());
        }
    }
}
Example #12
0
 function commit_update()
 {
     require_once 'Modules/WebAction/Deprecated.php';
     $old_webActions = new WebAction_Deprecated(AMP_Registry::getDbcon());
     $actions_set = $old_webActions->search();
     if (!$actions_set) {
         ampredirect(AMP_SYSTEM_URL_WEBACTION);
         return false;
     }
     foreach ($actions_set as $action) {
         if ($action->update()) {
             $this->message($action->getName() . ' updated');
             //$action->delete( );
         }
     }
     $this->display_default();
 }
Example #13
0
 /**
  * onInitForm 
  * Populate the form with default values based on different AMP Modules that can publish to the Content System
  * Currently handles IntroTexts, Photo Galleries, Petitions, and Web Actions
  * 
  * @param AMP_System_Component_Controller &$controller 
  * @access public
  * @return void
  */
 function onInitForm(&$controller)
 {
     $form =& $controller->get_form();
     if (($introtext_id = $controller->assert_var('mod_id')) || ($introtext_id = $controller->assert_var('introtext_id'))) {
         return $this->_initFormForIntrotext($form, $introtext_id);
     }
     if (($petition_id = $controller->assert_var('pid')) || ($petition_id = $controller->assert_var('petition_id'))) {
         return $this->_initFormForPetition($form, $petition_id);
     }
     if (($action_id = $controller->assert_var('action')) || ($action_id = $controller->assert_var('webaction_id'))) {
         return $this->_initFormForWebAction($form, $action_id);
     }
     if (($gallery_id = $controller->assert_var('gallery')) || ($gallery_id = $controller->assert_var('gallery_id'))) {
         return $this->_initFormForGallery($form, $gallery_id);
     }
     ampredirect(AMP_SYSTEM_URL_INDEX);
 }
Example #14
0
 function display_response()
 {
     $renderer =& new AMPDisplay_HTML();
     $this->message(sprintf(AMP_TEXT_DATA_SAVE_SUCCESS, AMP_TEXT_YOUR_COMMENT));
     if ($this->_article_id) {
         AMP_lookup_clear_cached('comments_live_by_article', $this->_article_id);
         ampredirect(AMP_Url_AddVars(AMP_CONTENT_URL_ARTICLE, array('id=' . $this->_article_id)));
     }
     if ($this->_userdata_id) {
         require_once 'AMP/UserData/Lookups.inc.php';
         $form_id_lookup =& FormLookup::instance('modin');
         if (isset($form_id_lookup[$this->_userdata_id])) {
             $target_modin = $form_id_lookup[$this->_userdata_id];
             ampredirect(AMP_Url_AddVars(AMP_CONTENT_URL_FORM_DISPLAY, array('uid=' . $this->_userdata_id, 'modin=' . $target_modin)));
         }
     }
 }
Example #15
0
 function restore()
 {
     $target_id = $this->getData('id');
     if (!$target_id) {
         return false;
     }
     require_once 'AMP/Content/Template.inc.php';
     $template =& new AMPContent_Template($this->dbcon, $target_id);
     $template->save_version();
     $template->mergeData($this->getData());
     $result = $template->save();
     if (!$result) {
         return false;
     }
     AMP_flush_common_cache();
     $flash =& AMP_System_Flash::instance();
     $flash->add_message(sprintf(AMP_TEXT_DATA_RESTORE_SUCCESS, $this->getName()));
     ampredirect(AMP_url_update(AMP_SYSTEM_URL_TEMPLATE, array('id' => $target_id)));
     return $result;
 }
Example #16
0
 function _update_list_location(&$controller)
 {
     $model =& $controller->get_model();
     $new_data = $_POST;
     $display_class = strtolower($this->components['list']);
     $list_location_cookie = $display_class . '_ListLocation';
     //frontpage content special action
     if (isset($new_data['class']) && $new_data['class'] == AMP_CONTENT_CLASS_FRONTPAGE) {
         ampredirect(AMP_SYSTEM_URL_ARTICLE_FRONTPAGE);
     }
     //default list behavior
     if (isset($new_data['section']) && (!(isset($new_data['id']) && $new_data['id']) || !(isset($_COOKIE[$list_location_cookie]) && $_COOKIE[$list_location_cookie]))) {
         ampredirect(AMP_Url_AddVars(AMP_SYSTEM_URL_ARTICLE, array('section=' . $new_data['section'])));
         return;
     }
     if (isset($new_data['class']) && $model->getClass() != $new_data['class']) {
         $controller->update_list_location($new_data['class'], 'class');
     }
     if (isset($new_data['section']) && $model->getSection() != $new_data['section']) {
         $controller->update_list_location($new_data['section'], 'section');
     }
 }
Example #17
0
     */
    if (AMP_CONTENT_REDIRECT_SECTIONHEADERS_TO_SECTIONS && $currentArticle->getClass() == AMP_CONTENT_CLASS_SECTIONHEADER) {
        if ($currentSection->hasData()) {
            ampredirect($currentSection->getURL());
        }
    }
}
/**
 * Check Section List pages for a redirect in the SectionHeader 
 */
if ($currentPage->isList(AMP_CONTENT_LISTTYPE_SECTION) && ($currentSection =& $currentPage->getSection())) {
    if (!$currentSection->isLive()) {
        AMP_make_404();
    }
    if ($target = $currentSection->getHeaderRedirect()) {
        ampredirect($target);
    }
}
/**
 * Check if a section was specified for class lists 
 */
if ($currentPage->isList(AMP_CONTENT_LISTTYPE_CLASS) && isset($_GET['type']) && ($currentSection =& $currentPage->getSection()) && ($currentClass =& $currentPage->getClass())) {
    $currentClass->addContentsCriteriaSection($currentSection->id);
}
/**
 * Get Listing Display  
 */
if ($listType) {
    $display =& $currentPage->getListDisplay();
    if ($display) {
        $filter = false;
Example #18
0
 function _setSortGalleryLinks(&$source, $sort_direction)
 {
     ampredirect(AMP_Url_AddVars(AMP_SYSTEM_URL_GALLERY_IMAGES, 'sort=galleryid'));
 }
Example #19
0
 *
 *****/
//ob_start();
require_once 'AMP/BaseDB.php';
require_once 'AMP/System/UserData/Module/Copy.inc.php';
require_once 'AMP/UserData/Input.inc.php';
$modin = isset($_REQUEST['modin']) && $_REQUEST['modin'] ? $_REQUEST['modin'] : false;
$new_name = isset($_REQUEST['core_name']) && $_REQUEST['core_name'] ? $_REQUEST['core_name'] : false;
if ($modin) {
    $udm = new UserDataInput($dbcon, $modin);
    if ($new_name) {
        //proceed to make a copy
        $copier = new AMPSystem_UserData_Module_Copy($dbcon, $modin);
        $copier->setOverride('name', $new_name, $udm->name);
        if ($new_copy = $copier->execute()) {
            ampredirect("modinput4_edit.php?modin=" . $new_copy);
        } else {
            $output = "Copy failed: " . $copier->ErrorMsg();
        }
        $output = $copier->ErrorMsg();
    } else {
        $output = '
            <p>In order to copy this form, we need to assign it a new name.</p>

            <form name="copy_structure" action="' . $_SERVER['PHP_SELF'] . '" method="POST">
                <input type="hidden" name="modin" value="' . $_REQUEST['modin'] . '" />
                <p>
                    Make a copy of the ' . $udm->name . ' form, and <label>name it</label>
                    <input type="text" name="core_name" />
                    <input type="submit" value="Go" />
                </p>
Example #20
0
 function onSave(&$controller)
 {
     ampredirect(AMP_SYSTEM_URL_PERMISSION_GROUP);
 }
Example #21
0
 function _reload_page()
 {
     ampredirect($_SERVER['REQUEST_URI']);
 }
Example #22
0
<?php

require_once 'AMP/System/Base.php';
$request_vars = AMP_URL_Read();
$map_name = isset($request_vars['component']) && $request_vars['component'] ? $request_vars['component'] : false;
if (!$map_name) {
    ampredirect(AMP_SYSTEM_URL_HOME);
    exit;
}
$map_folders = array(AMP_SYSTEM_INCLUDE_PATH, AMP_CONTENT_INCLUDE_PATH, AMP_MODULE_INCLUDE_PATH);
$map_class = false;
foreach ($map_folders as $folder) {
    $test_path = $folder . DIRECTORY_SEPARATOR . $map_name . DIRECTORY_SEPARATOR . AMP_COMPONENT_MAP_FILENAME;
    if (!file_exists_incpath($test_path)) {
        continue;
    }
    include_once $test_path;
    if (!class_exists(AMP_COMPONENT_MAP_CLASSNAME . '_' . $map_name)) {
        continue;
    }
    $map_class = AMP_COMPONENT_MAP_CLASSNAME . '_' . $map_name;
}
if (!$map_class) {
    ampredirect(AMP_SYSTEM_URL_HOME);
    exit;
}
$map =& new $map_class();
$controller =& $map->get_controller();
print $controller->execute();
Example #23
0
 * @package Content
 * @since 3.5.3
 * @access public
 * @author Austin Putman <*****@*****.**>
 * @copyright 2005 Radical Designs
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 */
require_once 'AMP/BaseDB.php';
require_once 'AMP/Content/Map.inc.php';
require_once 'AMP/Content/Page.inc.php';
/**
 * Filelink is used by link navs
 * TODO remove this when built-in navs are upgraded
 */
if (isset($_GET['filelink']) && $_GET['filelink']) {
    ampredirect($_GET['filelink']);
}
/* TODO: check the cache for the current page, once all front-end pages support caching */
/**
 * Initialize the current Page object  
 *
 * When the page is initialized, it is given a context within the current site hierarchy.  This
 * tells it which template to use, which navs to display, and what kind of metadata is needed in the header.
 *
 * @var AMPContent_Page
 */
$currentPage =& AMPContent_Page::instance();
/**
 *  If an intro_id or mod_id value is set to a non-default value , the page is not a content page 
 */
if (isset($mod_id) && $mod_id && !(isset($intro_id) && $intro_id)) {
<?php

require_once 'AMP/System/Base.php';
$modid = isset($_GET['modid']) && $_GET['modid'] ? $_GET['modid'] : false;
if (!$modid) {
    ampredirect(AMP_SYSTEM_URL_HOME);
}
if ($modid) {
    ampredirect(AMP_Url_AddVars(AMP_SYSTEM_URL_TOOLS, 'id=' . $modid));
}
Example #25
0
function insert_record($MM_editTable, $MM_fieldsStr, $MM_columnsStr, $MM_editRedirectUrl = NULL)
{
    global $dbcon;
    $MM_fields = Explode("|", $MM_fieldsStr);
    $MM_columns = Explode("|", $MM_columnsStr);
    // set the form values
    for ($i = 0; $i + 1 < sizeof($MM_fields); $i = $i + 2) {
        $MM_fields[$i + 1] = $GLOBALS[$MM_fields[$i]];
        //echo $MM_fields[$i+1];
    }
    // create the sql insert statement
    $MM_tableValues = "";
    $MM_dbValues = "";
    for ($i = 0; $i + 1 < sizeof($MM_fields); $i = $i + 2) {
        $formVal = $MM_fields[$i + 1];
        $MM_typesArray = explode(",", $MM_columns[$i + 1]);
        $delim = $MM_typesArray[0];
        if ($delim == "none") {
            $delim = "";
        }
        $altVal = $MM_typesArray[1];
        if ($altVal == "none") {
            $altVal = "";
        }
        $emptyVal = $MM_typesArray[2];
        if ($emptyVal == "none") {
            $emptyVal = "";
        }
        if ($formVal == "" || !isset($formVal)) {
            $formVal = $emptyVal;
        } else {
            if ($altVal != "") {
                $formVal = $altVal;
            } elseif ($delim == "'") {
                //deal with magic qoutes
                if (!MAGIC_QUOTES_ACTIVE) {
                    $formVal = "'" . str_replace("'", "\\'", $formVal) . "'";
                } else {
                    $formVal = "'" . $formVal . "'";
                }
                //done with magic quotes
            } else {
                $formVal = $delim . $formVal . $delim;
            }
        }
        if ($i == 0) {
            $MM_tableValues = $MM_tableValues . $MM_columns[$i];
            $MM_dbValues = $MM_dbValues . $formVal;
        } else {
            $MM_tableValues = $MM_tableValues . "," . $MM_columns[$i];
            $MM_dbValues = $MM_dbValues . "," . $formVal;
        }
    }
    $MM_editQuery = "insert into " . $MM_editTable . " (" . $MM_tableValues . ") values (" . $MM_dbValues . ")";
    $db = $dbcon->Execute($MM_editQuery) or die("insert" . $MM_editQuery . $dbcon->ErrorMsg());
    if ($MM_editRedirectUrl) {
        ampredirect($MM_editRedirectUrl);
    }
    $lastid = $dbcon->Insert_Id();
    return $lastid;
}
Example #26
0
	$field_value = $_POST['classlist'];
	$redirect = "edittypes.php";
}	


// insert, update, delete
if ($_POST['MM_update']) {
	$sql = "delete from nav where $field = $field_value";
	$dbcon->Execute($sql) or DIE($sql.$dbcon->ErrorMsg());
	//echo $sql.'<br>';
	foreach ($_POST['valid_nav'] as $k=>$v){	
		$sql ="insert into nav (navid,position,$field) values('".$_POST['navid'][$k]."','".$_POST['position'][$k]."','".$field_value."');"; 
		$dbcon->Execute($sql) or DIE($sql.$dbcon->ErrorMsg());
		//echo $sql.'<br>';
	}
	ampredirect($redirect);
}


if ($_GET['mod_id']) {
	$where = 'where moduleid= '.$_GET['mod_id'];
}	
if ($_GET['type']){
	$where ='where typelist= '.$_GET['type'];
}	
if ($_GET['typeid']){
	$where ='where typeid= '.$_GET['typeid'];
}	
if ($_GET['class']) {
	$where ='where classlist= '.$_GET['class'];
}	
Example #27
0
 function _after_request()
 {
     if ($this->_request->getPerformedAction() != 'trash' && $this->_request->getPerformedAction() != 'move') {
         return;
     }
     ampredirect($_SERVER['REQUEST_URI']);
     AMP_permission_update();
 }
Example #28
0
$intro_id = 57;
$modid = 1;
require_once 'AMP/BaseDB.php';
require_once 'AMP/UserData/Input.inc.php';
/**
 *  Check for a cached page
 */
if ($cached_output = AMP_cached_request()) {
    print $cached_output;
    exit;
}
$modin = isset($_REQUEST['modin']) && $_REQUEST['modin'] ? intval($_REQUEST['modin']) : false;
// Fetch the form instance specified by submitted modin value.
$udm =& new UserDataInput($dbcon, $modin);
if (!$udm->isLive()) {
    ampredirect(AMP_CONTENT_URL_INDEX);
    exit;
}
// User ID.
$uid = isset($_REQUEST['uid']) ? intval($_REQUEST['uid']) : false;
$otp = isset($_REQUEST['otp']) ? $_REQUEST['otp'] : null;
// Check for duplicates, setting $uid if found.
if (!$uid) {
    $uid = $udm->findDuplicates();
}
// Check for authentication, sending authentication mail if necessary.
if ($uid) {
    // Set authentication token if uid present
    $auth = $udm->authenticate($uid, $otp);
}
// Fetch or save user data.
Example #29
0
    ampredirect("modinput4_list.php");
}
$admin = AMP_Authorized(AMP_PERMISSION_FORM_DATA_EDIT) && AMP_Authorized($modin_permission);
// Fetch the form instance specified by submitted modin value.
$udm = new UserDataInput($dbcon, $modin, $admin);
// User ID.
$udm->authorized = true;
$udm->uid = $uid;
// Was data submitted via the web?
$sub = isset($_REQUEST['btnUdmSubmit']) ? $_REQUEST['btnUdmSubmit'] : false;
// Fetch or save user data.
if ($sub) {
    // Save only if submitted data is present, and the user is
    // authenticated, or if the submission is anonymous (i.e., !$uid)
    if ($udm->saveUser()) {
        ampredirect(AMP_SYSTEM_URL_FORM_DATA . "?modin=" . $udm->instance);
    }
    $udm->showForm = true;
} elseif (!$sub && $uid) {
    // Fetch the user data for $uid if there is no submitted data
    // and the user is authenticated.
    $udm->getUser($uid);
}
/* Now Output the Form.

   Any necessary changes to the form should have been registered
   before now, including any error messages, notices, or
   complete form overhauls. This can happen either within the
   $udm object, or from print() or echo() statements.

   By default, the form will include AMP's base template code,
Example #30
0
 *
 * UserData Listing Page
 * 
 * Allows search for records admin side
 *
 * 
 *
 *****/
$mod_name='udm';
require_once( 'AMP/System/Base.php' );
require_once('AMP/UserData/Set.inc.php'); 

if (isset($_REQUEST['modin']) && $_REQUEST['modin']) {
    $modin=$form_id_nav = $_REQUEST['modin'];
} else {
    ampredirect( AMP_SYSTEM_URL_FORMS );
}

$form_permissions = &AMPSystem_Lookup::instance( 'PermissionsbyForm');
$modin_permission = ( isset( $form_permissions[$modin]) && $form_permissions[$modin]) ? $form_permissions[$modin] : false;

$view_permission = (AMP_Authorized(AMP_PERMISSION_FORM_DATA_EDIT)
                 && ( $modin_permission ? AMP_Authorized($modin_permission) : true ));
$tool_set = &AMPSystem_Lookup::instance( 'ToolsbyForm');
$modid = isset( $tool_set[$modin]) ? $tool_set[$modin] : null;

$admin=true;
$userlist=&new UserDataSet($dbcon, $modin, $admin);

$userlist->_register_default_plugins();