Beispiel #1
0
<?php 
$objDb = new PDODatabase(DB_HOST, DB_NAME, DB_USER, DB_PASS);
//Its a sample Module
//Here are autodefined varaibles like: $strModuleName, $arrSharedData
//If you want to pass the values to template then populate it to $arrSharedData
//Either you can populate it manually or use + like: $arrSharedData = compact('xyz','abc') + $arrSharedData
//die();
echo defaultModule($strModuleName, $arrSharedData);
//$arrSharedData['title'] = $title;
//$arrSharedData['content']=$content;
Beispiel #2
0
<?php

//$SQL='select COUNT(*) as rowCount from news02news where news02uin>0 ';
///$data=Query($SQL);
//$page='News';
//$objCat= new NewsType();
$objAlbums = new GalleryAlbums();
$data['_data'] = $objAlbums->get('', '', 6);
$data['prefix'] = $objAlbums->getPrefix();
$data['upload_url'] = UPLOADS . $objAlbums->getUploadURL();
echo defaultModule($strModuleName, $data);
Beispiel #3
0
/**
 * load the specific module...
 */
function loadModule($strModuleName, $arrSharedData = array())
{
    //die();
    if (!file_exists(MODULES . $strModuleName . '.php')) {
        $strBlockContent = defaultModule($strModuleName, $arrSharedData);
    } else {
        ob_start();
        if (file_exists(MODULES . $strModuleName . '.php')) {
            include_once MODULES . $strModuleName . '.php';
            //var_dump( $strModuleName);
        } elseif (file_exists(TPL . 'modules/' . $strModuleName . '.php')) {
            include_once TPL . 'modules/' . $strModuleName . '.php';
        } else {
            include_once MODULES . $strModuleName . '.php';
        }
        $strBlockContent = ob_get_contents();
        ob_end_clean();
    }
    $strReturn = <<<ARUN
                {$strBlockContent}
ARUN;
    return $strReturn;
}