Beispiel #1
0
<?php

$get = _get($_GET);
$lang = _getLang();
# Count query for the pager
$rowCount = db_count('post')->where()->condition('deleted', null)->fetch();
# Prerequisite for the Pager
$pager = _pager()->set('itemsPerPage', $lc_itemsPerPage)->set('pageNumLimit', $lc_pageNumLimit)->set('total', $rowCount)->set('ajax', true)->calculate();
$qb = db_select('post', 'p')->join('category', 'c', 'p.catId = c.catId')->join('user', 'u', 'p.uid = u.uid')->fields('p', array('postId', 'created', 'postTitle', 'postBody', array('postTitle_' . $lang, 'postTitle_i18n'), array('postBody_' . $lang, 'postBody_i18n')))->fields('c', array('catName', array('catName_' . $lang, 'catName_i18n')))->fields('u', array('fullName'))->where()->condition('p.deleted', null)->orderBy('p.created', 'DESC')->orderBy('u.fullName')->limit($pager->get('offset'), $pager->get('itemsPerPage'));
$lang = _urlLang($lang);
if ($qb->getNumRows()) {
    ?>
    <table cellpadding="0" cellspacing="0" border="0" class="list news">
        <tr class="label">
            <td class="tableLeft" colspan="2"><?php 
    echo _t('Actions');
    ?>
</td>
            <td>
                <span><?php 
    echo _t('Title');
    ?>
</span>
                <label class="lang">(<?php 
    echo _langName($lang);
    ?>
)</label>
            </td>
            <td><?php 
    echo _t('Author');
    ?>
Beispiel #2
0
    }
}
include 'query.php';
?>
<!DOCTYPE html>
<html lang="<?php 
echo _lang();
?>
">
<head>
    <title><?php 
echo _title($pageTitle);
?>
</title>
    <?php 
include _i('inc/tpl/head.php');
?>
    <?php 
_css('base.' . _getLang() . '.css');
?>
</head>
<body>
    <?php 
include 'view.php';
?>
</body>
</html>
<script type="text/javascript">
    LC.Page.Post.Setup.init();
</script>
Beispiel #3
0
        require $sLangPath;
    }
    if (file_exists($sModLangPath)) {
        require $sModLangPath;
    }
    if (file_exists($sModFilePath)) {
        require $sModFilePath;
        //Kiem tra va goi function
        $sFuncName = $page . '_' . TYPE . '_' . $func;
        if (function_exists($sFuncName)) {
            $data = call_user_func($sFuncName);
        }
    }
    $_layout = 'layout.tpl';
    if (function_exists($mod . '_' . TYPE . '_' . 'layout')) {
        if ($name = call_user_func($mod . '_' . TYPE . '_' . 'layout')) {
            $_layout = $name;
        }
    }
    $_mod_layout = '';
    //news_user_mod_layout
    if (function_exists($page . '_' . TYPE . '_' . 'mod_layout')) {
        if ($name = call_user_func($page . '_' . TYPE . '_' . 'mod_layout')) {
            $_mod_layout = $name;
        }
    }
    $presenter = new Presenter($mod, $page, TYPE, $data, $_layout, $_mod_layout, false, $func);
    //Dua va o template
    $presenter->setLang(_getLang(), $_lang, $_mod_lang);
    $presenter->display();
}
Beispiel #4
0
<html lang="<?php 
echo _lang();
?>
">
<head>
    <title><?php 
echo _title($pageTitle);
?>
</title>
    <?php 
include _i('inc/tpl/head.php');
?>
    <?php 
_css('base.' . _getLang() . '.css');
?>
</head>
<body>
    <?php 
include 'view.php';
?>
</body>
</html>
<script type="text/javascript">
$(function() {
    LC.Page.Post.List.init('<?php 
echo _getLang();
?>
');
});
</script>