/**
  * Constructor
  */
 public function init()
 {
     parent::init('tbl_files_quotas');
     $this->objUser = $this->getObject('user', 'security');
     $this->objLanguage = $this->getObject('language', 'language');
     $this->loadClass('formatfilesize', 'files');
 }
 /**
  * Constructor method to define the table
  */
 function init()
 {
     parent::init('tbl_context_learneroutcomes');
     $this->objUser =& $this->getObject('user', 'security');
     $this->objDBContext =& $this->getObject('dbcontext', 'context');
     $this->objUserId = $this->objUser->userId();
 }
 public function init()
 {
     parent::init('tbl_users');
     $this->objGroupOps = $this->getObject('groupops', 'groupadmin');
     $this->objGroupModel = $this->getObject('groupadminmodel', 'groupadmin');
     $this->objUserModel = $this->getObject('useradmin_model2', 'security');
 }
 /**
  * Class Constructor
  *
  * @access public
  * @return void
  */
 public function init()
 {
     try {
         parent::init('tbl_module_blocks');
     } catch (Exception $e) {
         throw customException($e->getMessage());
         exit;
     }
 }
 /**
  * Constructor
  */
 public function init()
 {
     parent::init('tbl_users');
     $this->objLanguage = $this->getObject('language', 'language');
     //Ehb-added-begin
     $this->objGroups = $this->getObject('groupAdminModel', 'groupadmin');
     $this->objContext = $this->getObject('dbcontext', 'context');
     $this->sqlComplete = "";
     //Ehb-added-end
 }
 /**
  * Standard init function to set the database table and instantiate
  * common classes.
  */
 function init()
 {
     // Set the database table for this class and set mirroring to
     // false since configuration paramaters should not be mirrored.
     parent::init('tbl_sysconfig_properties', false);
     // Get an instance of the user object
     $this->objUser = $this->getObject('user', 'security');
     // Get an instance of the language object
     $this->objConfig = $this->getObject('altconfig', 'config');
 }
Example #7
0
 /**
  * Constructor method
  */
 public function init()
 {
     try {
         parent::init('tbl_logger');
         $this->objUser = $this->getObject('user', 'security');
     } catch (Exception $e) {
         throw customException($e->getMessage());
         exit;
     }
 }
 /**
  *
  * Constructor method to define the table
  *
  */
 public function init()
 {
     parent::init('tbl_stories');
     $this->objUser = $this->getObject('user', 'security');
     $this->objLanguage = $this->getObject('language', 'language');
     $this->objDbStories = $this->getObject('dbstories');
     $this->objH = $this->getObject('htmlheading', 'htmlelements');
     //Get the smiley parser
     $this->objParse = $this->getObject('parse4display', 'strings');
     $this->objWashout = $this->getObject('washout', 'utilities');
 }
 /**
  * standard init function
  *
  */
 public function init()
 {
     try {
         parent::init('tbl_module_blocks');
         //Config and Language Objects
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objConfig = $this->getObject('altconfig', 'config');
     } catch (Exception $e) {
         echo customException::cleanUp();
         exit;
     }
 }
 /**
  * Constructor method
  */
 public function init()
 {
     // Create an instance of the modulesadmin class for checking
     // if a module is registered
     try {
         $this->objModule = $this->getObject('modules', 'modulecatalogue');
         $this->objUser = $this->getObject('user', 'security');
         parent::init('tbl_dynamicblocks');
     } catch (customException $e) {
         echo customException::cleanUp($e);
         die;
     }
 }
Example #11
0
 /**
  * Constructor
  */
 public function init()
 {
     parent::init('tbl_users');
     $this->objConfig = $this->getObject('altconfig', 'config');
     $this->objLanguage = $this->getObject('language', 'language');
     $this->loggedInUsers = $this->getObject('loggedInUsers');
     $this->userLoginHistory = $this->getObject('userLoginHistory');
     $this->objSkin = $this->getObject('skin', 'skin');
     $this->objGroups = $this->getObject('groupadminmodel', 'groupadmin');
     $this->imagePath = $this->objConfig->getsiteRootPath() . '/user_images/';
     $this->imageUrl = $this->objConfig->getsiteRoot() . 'user_images/';
     $this->imageUri = 'user_images/';
     $this->objPerms = $this->getObject('perms', 'permissions');
 }
Example #12
0
 /**
  * Constructor
  */
 public function init()
 {
     parent::init('tbl_files');
     $this->objUser = $this->getObject('user', 'security');
     $this->objFileParts = $this->getObject('fileparts', 'files');
     $this->objConfig = $this->getObject('altconfig', 'config');
     $this->objCleanUrl = $this->getObject('cleanurl');
     $this->objMediaFileInfo = $this->getObject('dbmediafileinfo');
     $this->objFileFolder = $this->getObject('filefolder');
     $this->objMimetypes = $this->getObject('mimetypes', 'files');
     $this->objLanguage = $this->getObject('language', 'language');
     $this->loadClass('link', 'htmlelements');
     $this->loadClass('formatfilesize', 'files');
 }
 /**
  * Constructor method
  */
 public function init()
 {
     try {
         //  Set the parent table
         parent::init('tbl_logger');
         //  Set default to log each time the page is loaded
         $this->logOncePerSession = FALSE;
         //  Get an instance of the user object
         $this->objUser = $this->getObject('user', 'security');
         $this->userId = $this->objUser->userId();
     } catch (Exception $e) {
         throw customException($e->getMessage());
         exit;
     }
 }
 /**
  * Standard chisimba init function
  *
  */
 public function init()
 {
     try {
         parent::init('tbl_prelogin_blocks');
         $this->objUser = $this->getObject('user', 'security');
         if ($this->dbType == "pgsql") {
             $this->TRUE = 't';
             $this->FALSE = 'f';
         } else {
             $this->TRUE = 1;
             $this->FALSE = 0;
         }
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
 /**
  * Method to initialize the systext facet object
  *
  * @access private
  */
 function init()
 {
     parent::init('tbl_sysconfig_properties');
     $this->_objSystemTypeDb = $this->getObject('dbsystem', 'systext');
     $this->_objTextItemDb = $this->getObject('dbtext', 'systext');
     $this->_objAbstractTextDb = $this->getObject('dbabstract', 'systext');
     $this->_objConfig = $this->getObject('altconfig', 'config');
     // The abstract list is persistent for this session.
     // Initialize the abstract list for this instance.
     if ($this->getSession('systext')) {
         // The abstract list is available so fetch it from the session variable.
         $this->fetchSession();
     } else {
         // This is the first instance of the systext facet ( normally at login after authentication )
         // The abstract list must be generated, ie. get it from the database tables.
         // The session permissions variable is initialized as well.
         $this->updateSession();
     }
 }
 /**
  *
  * Constructor for the class, which clears inactive users, and
  * updates login for anyone logged into the system.
  *
  */
 public function init()
 {
     parent::init('tbl_loggedinusers');
     $this->objConfig = $this->getObject('altconfig', 'config');
     $this->systemTimeOut = $this->objConfig->getsystemTimeout();
     //==$this->objSysConfig = $this->getObject ('dbsysconfig','sysconfig');
     // Because of a circular reference via dbsysconfig_class_inc.php and user_class_inc.php, the above class cannot be instantiated. So, $xlogoutdestroy is therefore hardcoded to true.
     $xlogoutdestroy = 'true';
     //==$this->objSysConfig->getValue('auth_logoutdestroy', 'security', 'true');
     //$this->objConfig->getValue('auth_logoutdestroy', 'security', true);
     //trigger_error('$xlogoutdestroy::'.($xlogoutdestroy?'T':'F'));
     if ($xlogoutdestroy == 'true' || $xlogoutdestroy == 'TRUE' || $xlogoutdestroy == 'True') {
         $this->logoutdestroy = true;
     } else {
         $this->logoutdestroy = false;
     }
     // Clear inactive users.
     $this->clearInactive();
     //trigger_error('$this->logoutdestroy::'."$this->logoutdestroy");
 }
Example #17
0
 /**
  * Constructor
  */
 public function init()
 {
     parent::init('tbl_files_folders');
     $this->objFiles = $this->getObject('dbfile');
     $this->objUser = $this->getObject('user', 'security');
     $this->objConfig = $this->getObject('altconfig', 'config');
     $this->objCleanUrl = $this->getObject('cleanurl');
     $this->objContext = $this->getObject('dbcontext', 'context');
     $this->contextCode = $this->objContext->getContextCode();
     $this->objLanguage = $this->getObject('language', 'language');
     $this->loadClass('treemenu', 'tree');
     $this->loadClass('treenode', 'tree');
     $this->loadClass('htmllist', 'tree');
     $this->loadClass('htmldropdown', 'tree');
     $this->loadClass('dhtml', 'tree');
     $this->loadClass('link', 'htmlelements');
     $this->loadClass('label', 'htmlelements');
     $this->loadClass('form', 'htmlelements');
     $this->loadClass('button', 'htmlelements');
     $this->loadClass('textinput', 'htmlelements');
 }
Example #18
0
* (at your option) any later version.                                          *
*                                                                              *
* This program is distributed in the hope that it will be useful,              *
* but WITHOUT ANY WARRANTY; without even the implied warranty of               *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                 *
* GNU Affero General Public License for more details.                          *
*                                                                              *
* You should have received a copy of the GNU Affero General Public License     *
* along with this program.  If not, see <http://www.gnu.org/licenses/>.        *
*                                                                              *
*******************************************************************************/
// Intermediary module to abstract some system stuff!
include_once 'php/friend.php';
// TODO: Remove this - place in install procedure
if (isset($args->command) && $args->command == 'listdevices') {
    $t = new dbTable('FIOTDevice');
    if (!$t->load()) {
        $SqlDatabase->query('
			CREATE TABLE FIOTDevice
			(
				ID bigint(20) NOT NULL auto_increment,
				UserID bigint(20),
				DeviceID bigint(20),
				`Key` varchar(255),
				`Value` varchar(255),
				PRIMARY KEY(ID)
			)
		');
    }
}
if (isset($args->command)) {
Example #19
0
 public function init()
 {
     parent::init('tbl_systext_text');
     $this->table = 'tbl_systext_text';
 }
 /**
  * Method to override the uri function to include automatic inclusion
  * of mode and restriction
  *
  * @access  public
  * @param   array  $params         Associative array of parameter values
  * @param   string $module         Name of module to point to (blank for core actions)
  * @param   string $mode           The URI mode to use, must be one of 'push', 'pop', or 'preserve'
  * @param   string $omitServerName flag to produce relative URLs
  * @param   bool   $javascriptCompatibility flag to produce javascript compatible URLs
  * @param   bool   $omitExtraParams Remove extra flags for mode and restrictions
  * @returns string $uri the URL
  */
 public function uri($params = array(), $module = '', $mode = '', $omitServerName = FALSE, $javascriptCompatibility = FALSE, $omitExtraParams = FALSE)
 {
     if ($params == NULL) {
         $params = array();
     }
     if (is_array($params) && !array_key_exists('mode', $params) && $this->getParam('mode') != '') {
         $params['mode'] = $this->getParam('mode');
     }
     if (is_array($params) && !array_key_exists('restriction', $params) && $this->getParam('restriction') != '') {
         $params['restriction'] = $this->getParam('restriction');
     }
     if (is_array($params) && !empty($params) && !array_key_exists('forcerestrictions', $params) && !is_null($this->getParam('forcerestrictions'))) {
         $params['forcerestrictions'] = $this->getParam('forcerestrictions');
     }
     if (is_array($params) && !array_key_exists('name', $params) && $this->getParam('name') != '') {
         $params['name'] = $this->getParam('name');
     }
     if (is_array($params) && !array_key_exists('context', $params) && $this->getParam('context') != '') {
         $params['context'] = $this->getParam('context');
     }
     if (is_array($params) && !array_key_exists('workgroup', $params) && $this->getParam('workgroup') != '') {
         $params['workgroup'] = $this->getParam('workgroup');
     }
     if ($omitExtraParams) {
         unset($params['mode']);
         unset($params['restriction']);
         unset($params['name']);
         unset($params['context']);
         unset($params['workgroup']);
     }
     return parent::uri($params, $module, $mode, $omitServerName, $javascriptCompatibility);
 }
 /**
  * Method to delete the given action rule.
  *
  * @access public    
  * @author Jonathan Abrahams
  * @param  string     actionId
  * @param  string     RuleId  
  * @return true|false Return true if successfull, otherwise false.
  */
 function deleteChild($actionId, $ruleId)
 {
     return parent::delete('actionid', $actionId . "' AND ruleid = '{$ruleId}");
 }
 /**
  * Constructor
  */
 public function init()
 {
     parent::init('tbl_context_parentnodes_has_tbl_context');
     $this->objDBContext = $this->newObject('dbcontext', 'context');
     $this->objUser = $this->newObject('user', 'security');
 }
 public function getPermUserId($userId)
 {
     $sql = 'SELECT perm_user_id FROM tbl_perms_perm_users WHERE auth_user_id = \'' . $userId . '\'';
     parent::init('tbl_perms_perm_users');
     $res = $this->getArray($sql);
     if (!empty($res)) {
         return $res[0]['perm_user_id'];
     } else {
         return false;
     }
 }
Example #24
0
* @author Jeremy O'Connor
* @author Nic Appleby
*
*
* $Id: pofile_class_inc.php,v 1.3 2007-04-24 09:58:35 joconnor Exp $
Example #25
0
 private function findSession($key, &$sid)
 {
     //$args = func_get_args();
     if ($key) {
         $ret = dbTable::get('session')->loadRow($key);
         if ($ret) {
             if ($ret->key != $sid) {
                 $ret = false;
             }
         }
     } else {
         $ret = dbTable::get('session')->loadRowsWhere(array('key' => $sid));
         if ($ret) {
             $ret = $ret[0];
         }
     }
     if ($ret) {
         if ($ret->timedout == 1) {
             dbTable::get('session')->delete($ret);
             $ret = false;
         }
         if ($ret) {
             //update last request
             if ($ret->last_request < time() - 5 * 60) {
                 $ret->last_request = time();
                 $ret->save();
             }
         }
     }
     $ret = $ret ? $ret->export() : false;
     return $ret;
 }
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" id="useridfetchclose" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Search For User ID</h4>
      </div>
      <div class="modal-body">
          <input type="text" class="form-control" id="userlogin" placeholder="User Login"/>
      </div>
      <div class="modal-footer">
          <button type="button" class="btn btn-primary" onclick="get_user_id('#id')">Search</button>
      </div>
    </div>
  </div>
</div>

<?php 
global $baselocation;
$table = "users";
$cols = array('id' => 'User ID', 'login' => 'Username');
if ($_SESSION['admin_level'] == 1) {
    $cols['email'] = "Email";
}
$limit = 50;
$pagenum = 1;
if (isset($_GET['pagenum'])) {
    $pagenum = $_GET['pagenum'];
}
$usertable = new dbTable($table, $cols, $limit, $pagenum, $user_options = 1, '<a href="' . $baselocation . '/users/base.php?action=uoptions&id=.id.">User Options</a>');
$usertable->display_search($cols);
$usertable->display_table();
$usertable->pagination();
Example #27
0
 public function removeTags($mod)
 {
     $metakey = 'moduletag_' . $mod;
     $module = 'modulecatalogue';
     parent::init('tbl_tags');
     $tagstodel = $this->getAll("WHERE meta_key = '{$metakey}'");
     if (empty($tagstodel)) {
         return;
     }
     foreach ($tagstodel as $tags) {
         $this->delete('id', $tags['id'], 'tbl_tags');
     }
     return;
 }
 /**
  * The object initialisation method.
  *
  * @access public
  * @param  void  
  * @return void  
  */
 public function init()
 {
     parent::init('tbl_decisiontable_decisiontable_rule');
 }
 /**
  * Method to delete a user from a group in the group hierarchy.
  *
  * The user is a member of the group.
  *
  * @param  string The unique ID of an existing group.
  * @param  string The unique ID of an existing user. NB use PKid( userId ) method in user class
  * @return true   |false TRUE on success, FALSE on failure
  */
 function deleteGroupUser($groupId, $userId)
 {
     return parent::delete('user_id', "{$userId}' AND group_id = '{$groupId}");
 }
 /**
  * Constructor method to define the table
  */
 public function init()
 {
     parent::init('tbl_loggedinusers');
     //$this->USE_PREPARED_STATEMENTS=True;
 }