Example #1
0
/* Including of the CLE engine */
require_once './sys/CLE/class.cle.ibdi.php';
require_once './sys/CLE/class.cle.modules.php';
require_once './sys/CLE/class.cle.basemodule.php';
require_once './sys/CLE/class.cle.json.php';
/* CL base object */
$_CL = CL::getInstance();
/* Some object and arrays related to (auto)loading of modules */
$_autoloadArray = array();
$_setVarsArray = array();
$_addVarsArray = array();
/* Array of modules, that support SOAP | JSON */
$_jsonEnabledModules = array();
if (CL::getConf('CLE_Ibdi/enabled') == 1) {
    require_once './sys/external/dibi.min.php';
    if (!CLE_Ibdi::getInstance()->connect() and CL::getConf('CLE_Ibdi/terminateScriptOnError') == 1) {
        exit('
            CLE error message: Database connection failed, script execution terminated.
            <br /><br />
            Please check your database connection settings in conf/config.xml<br />
                (if you do not wish to automatically start DB connection, you can as well deactivate it).
            <br /><br />
            If you do not wish CLE to terminate script execution on DB connection error,<br />
                you can set that in configuration file as well.
            <br /><br />
        ');
    }
}
/* Autoload of classes */
function __autoload($class)
{
Example #2
0
 /**
  * Load rows from a DB table (limited and sorted by method parameters)
  *
  * @param $table db table to use
  * @param string $start start record for limit
  * @param string $limit number of records requested (limit)
  * @param string $orderColumn column to order rows by
  * @param string $order order type
  * @return object db rows
  */
 function loadMany($table, $start = '', $limit = '', $orderColumn = '', $order = 'ASC')
 {
     global $_dibi;
     return $_dibi->fetchAll("SELECT *\n                                 FROM `" . CLE_Ibdi::getNameOfTable($table) . "`\n                                 %if ", $orderColumn, "\n                                    ORDER BY `" . $orderColumn . "` " . $order . "\n                                 %end\n                                 %if", $limit, "LIMIT " . (int) $start . ',' . (int) $limit);
 }
Example #3
0
 /**
  * Load rows from a DB table (limited and sorted by method parameters)
  *
  * @param string $start start record for limit
  * @param string $limit number of records requested (limit)
  * @param string $orderColumn column to order rows by
  * @param string $order order type
  * @return object db rows
  */
 function loadMany($start = '', $limit = '', $orderColumn = '', $order = 'ASC')
 {
     return CLE_Ibdi::getInstance()->loadMany($this->dbTable, $start, $limit, $orderColumn, $order);
 }