Пример #1
0
/**
 * log events
 * @param: $message
 * @return: none
 */
function log_message($log_file, $message)
{
    $log = file_get_contents($log_file);
    $log .= $message . "\n";
    try {
        if (file_put_contents($log_file, $log) === FALSE) {
            throw $err = new customException("logging error");
        }
        return FALSE;
    } catch (customException $e) {
        $err->debug_notifier($e->errorMessage());
    }
}
 /**
  * Standard block show method. It uses the renderform
  * class to render the login box
  */
 public function show()
 {
     try {
         return $this->objLanguage->putlanguageChooser();
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
Пример #3
0
 /**
  * Init method
  * 
  * Standard Chisimba Init() method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objRPC = $this->getObject('xmlrpcapi');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * Standard init function to instantiate language object
  * and create title, etc
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject('language', 'language');
         $this->title = ucWords($this->objLanguage->code2Txt('mod_context_learneroutcomes', 'context'));
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
Пример #5
0
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
Пример #6
0
 /**
  * standard init function
  *
  */
 public function init()
 {
     try {
         $this->ffmpeg = $this->getResourcePath('ffmpeg');
         $this->objConfig = $this->getObject('altconfig', 'config');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * Standard init function to instantiate language object
  * and create title, etc
  */
 public function init()
 {
     try {
         $this->loadClass('link', 'htmlelements');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->title = ucWords($this->objLanguage->code2Txt('mod_context_aboutcontext', 'context'));
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
 /**
  * Standard block show method. It uses the renderform
  * class to render the login box
  */
 public function show()
 {
     try {
         $regLink = $this->newObject('link', 'htmlelements');
         $regLink->link = $this->objLanguage->languageText('word_register');
         $regLink->link($this->uri(NULL, 'userregistration'));
         return $regLink->show();
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
Пример #9
0
 /**
  * Standard block show method. It uses the renderform
  * class to render the login box
  */
 public function show()
 {
     try {
         $icon = $this->getObject('geticon', 'htmlelements');
         $icon->alt = "Valid XHTML 1.0 Transitional";
         $icon->extra = ' height="31" width="88"';
         return "<center>" . $icon->getLinkedIcon("http://validator.w3.org/check?uri=referer", 'valid-xhtml10', 'png') . "</center>";
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
Пример #10
0
 /**
  *
  * Generate a nonce and use the database class to store it
  *
  * @return string The generated nonce
  * @access public
  *
  */
 public function storeNonce()
 {
     try {
         $nonce = $this->generateNonce();
         $this->objDb->storeNonce($nonce);
         return $nonce;
     } catch (customException $e) {
         echo customException::cleanUp($e);
         die;
     }
 }
Пример #11
0
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         $this->objMedia = $this->getObject('media', 'utilities');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         // $this->objDbPhotos = $this->getObject('db','photogallery');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * 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;
     }
 }
Пример #14
0
 /**
  * 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;
     }
 }
 /**
  * Standard init function to instantiate language object
  * and create title, etc
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         $this->title = ucwords($this->objLanguage->code2Txt('mod_context_browseallcontexts', 'context', NULL, 'Browse All [-contexts-]'));
         //$this->title = ucWords($this->objLanguage->code2Txt("mod_context_contexts",'context'));
         $this->blockType = 'none';
         $this->loadClass('checkbox', 'htmlelements');
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
Пример #16
0
 /**
  * init method
  *
  * Standard Chisimba init method
  *
  * @return void
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         $this->objFiles = $this->getObject('dbfile', 'filemanager');
         $this->objFileIndexer = $this->getObject('indexfileprocessor', 'filemanager');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
Пример #17
0
 /**
  * Constructor method to instantiate objects and get variables
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objDbTags = $this->getObject('dbtags');
         //Get the activity logger class
         $this->objLog = $this->newObject('logactivity', 'logger');
         //Log this module call
         $this->objLog->log();
     } catch (customException $e) {
         echo customException::cleanUp();
         die;
     }
 }
Пример #18
0
 public function init()
 {
     $this->objLanguage = $this->getObject('language', 'language');
     $this->objCurl = $this->getObject('curlwrapper', 'utilities');
     // Read the key and secret
     try {
         $this->objConfig = $this->getObject('dbsysconfig', 'sysconfig');
         $this->_key = $this->objConfig->getValue('mod_buckets_key', 'buckets');
         $this->_secret = $this->objConfig->getValue('mod_buckets_secret', 'buckets');
     } catch (customException $e) {
         echo customException::cleanUp($e);
         exit;
     }
 }
Пример #19
0
 /**
  * Constructor method to instantiate objects and get variables
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objYaml = $this->getObject('yaml', 'utilities');
         //Get the activity logger class
         $this->objLog = $this->newObject('logactivity', 'logger');
         //Log this module call
         $this->objLog->log();
     } catch (customException $e) {
         echo customException::cleanUp();
         die;
     }
 }
Пример #20
0
 /**
  * Standard block show method. It uses the renderform
  * class to render the login box
  */
 public function show()
 {
     try {
         $objSysConfig = $this->getObject('dbsysconfig', 'sysconfig');
         $useSummaries = $objSysConfig->getValue('USESUMMARIES', 'stories');
         $objStories = $this->getObject('sitestories', 'stories');
         if ($useSummaries == 'Y') {
             return $objStories->fetchPreLoginCategory('prelogin', 3);
         } else {
             return $objStories->fetchCategory('prelogin');
         }
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         //database abstraction object
         $this->objModules = $this->getObject('modules', 'modulecatalogue');
         $this->isReg = $this->objModules->checkIfRegistered('mxitdictionary');
         if ($this->isReg === TRUE) {
             $this->objMxitDictionary = $this->getObject('dbcontacts', 'mxitdictionary');
         }
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * Standard Chisimba init method
  *
  * @return void
  * @access public
  */
 public function init()
 {
     try {
         $this->objModules = $this->getObject('modules', 'modulecatalogue');
         $this->isReg = $this->objModules->checkIfRegistered('twitterizer');
         if ($this->isReg === TRUE) {
             $this->objDbTwit = $this->getObject('dbtweets', 'twitterizer');
         }
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * Method to add a parameter
  *
  * @param  string $param
  * @param  string $value
  * @param  string $contextCode
  * @access public
  * @return bool
  */
 public function setParam($contextCode, $param, $value = NULL)
 {
     try {
         $fields = array('param' => $param, 'value' => $value, 'contextcode' => $contextCode);
         if ($this->getParamValue($contextCode, $param)) {
             //edit the param
             $sql = "UPDATE tbl_contextparams SET value = '" . $value . "' WHERE contextcode = '" . $contextCode . "' AND param = '" . $param . "'";
             return $this->getArray($sql);
         } else {
             return $this->insert($fields);
         }
     } catch (customException $e) {
         echo customException::cleanUp($e);
         die;
     }
 }
Пример #24
0
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         //database abstraction object
         $this->objModules = $this->getObject('modules', 'modulecatalogue');
         $this->isReg = $this->objModules->checkIfRegistered('blog');
         if ($this->isReg === TRUE) {
             $this->objDbBlog = $this->getObject('dbblog', 'blog');
         }
         $this->objUser = $this->getObject('user', 'security');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
 /**
  * Standard init function to instantiate language object
  * and create title, etc
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUserContext = $this->getObject('usercontext', 'context');
         $this->objUser = $this->getObject('user', 'security');
         $this->objContext = $this->getObject('dbcontext');
         $this->objGroups = $this->getObject('groupAdminModel', 'groupadmin');
         $this->title = ucWords($this->objLanguage->code2Txt('phrase_mycourses', 'system', NULL, 'My [-contexts-]'));
         // HTML Elements
         $this->loadClass('form', 'htmlelements');
         $this->loadClass('dropdown', 'htmlelements');
         $this->loadClass('button', 'htmlelements');
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
 /**
  * Standard init function to instantiate language object
  * and create title, etc
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         if ($this->objUser->isLoggedIn()) {
             $this->blockType = "invisible";
         }
         $this->title = $this->objLanguage->languageText("mod_security_loginelearn", 'security');
         $this->objSysConfig = $this->getObject('dbsysconfig', 'sysconfig');
         if ($this->objSysConfig->getValue('elearnlogin_default_visible', 'security', 'false') == 'true') {
             $this->defaultHidden = FALSE;
         }
     } catch (customException $e) {
         customException::cleanUp();
     }
 }
Пример #27
0
 /**
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objModules = $this->getObject('modules', 'modulecatalogue');
         $this->isReg = $this->objModules->checkIfRegistered('adm');
         if ($this->isReg === TRUE) {
             $this->objAdmOps = $this->getObject('admops', 'adm');
         }
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         $this->objIni = $this->getObject('ini', 'config');
         $this->objXMLThing = $this->getObject('xmlthing', 'utilities');
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
Пример #28
0
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         $this->objConfig = $this->getObject('altconfig', 'config');
         $this->objLanguage = $this->getObject('language', 'language');
         $this->objUser = $this->getObject('user', 'security');
         $this->objModules = $this->getObject('modules', 'modulecatalogue');
         $this->isReg = $this->objModules->checkIfRegistered('webpresent');
         if ($this->isReg === TRUE) {
             $this->objDbTags = $this->getObject('dbwebpresenttags', 'webpresent');
             $this->objDbFiles = $this->getObject('dbwebpresentfiles', 'webpresent');
             $this->objDbSlides = $this->getObject('dbwebpresentslides', 'webpresent');
         }
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
 }
Пример #29
0
 /**
  * Constructor method, checks to see if necessary binaries exist
  *
  * @access public
  * @param void
  * @return exception on error
  */
 public function init()
 {
     try {
         $this->objLanguage = $this->getObject("language", "language");
     } catch (customException $e) {
         customException::cleanUp();
         exit;
     }
     if (!@file_exists('/usr/bin/mp32ogg')) {
         throw new customException($this->objLanguage->languageText("mod_utilities_nomp32ogg", "utilities") . " http://directory.fsf.org/all/mp32ogg.html");
     }
     if (!@file_exists('/usr/bin/mplayer')) {
         throw new Exception($this->objLanguage->languageText("mod_utilities_nomplayer", "utilities") . " http://www.mplayerhq.hu/design7/news.html");
     }
     if (!@file_exists('/usr/bin/oggenc')) {
         throw new Exception($this->objLanguage->languageText("mod_utilities_nooggenc", "utilities") . " http://directory.fsf.org/OggEnc.html");
     }
 }
Пример #30
0
 /**
  * init method
  * 
  * Standard Chisimba init method
  * 
  * @return void  
  * @access public
  */
 public function init()
 {
     try {
         // Some config
         $this->objConfig = $this->getObject('altconfig', 'config');
         // multilingualize responses etc
         $this->objLanguage = $this->getObject('language', 'language');
         // make sure the users are who they say they are!
         $this->objUser = $this->getObject('user', 'security');
         // we will need to do some file manipulations
         $this->objFiles = $this->getObject('dbfile', 'filemanager');
         // index the files once dumped through the API
         $this->objFileIndexer = $this->getObject('indexfileprocessor', 'filemanager');
     } catch (customException $e) {
         // Bail dude, something went pear shaped!
         customException::cleanUp();
         exit;
     }
 }