示例#1
0
 public function _list()
 {
     $oArticleModel = new model_article();
     $tArticle = $oArticleModel->findAllOrderBy(module_table::getParam('order', 'titre'), module_table::getParam('side'));
     $oView = new _view('private/article::slist');
     $oView->tArticle = $tArticle;
     $oView->tColumn = $oArticleModel->getListColumn();
     //array('id','titre');//
     //on recupere un tableau indexe des auteurs pour afficher leur nom a la place de leur id
     $oView->tJoinAuteur = model_auteur::getInstance()->getSelect();
     $this->oLayout->add('main', $oView);
 }
示例#2
0
 public function _listAjax()
 {
     $sOrder = module_table::getParam('order');
     if ($sOrder == '') {
         $sOrder = 'titre';
     }
     $sSide = module_table::getParam('side');
     if ($sSide == '') {
         $sSide = 'ASC';
     }
     $oArticleModel = new model_article();
     $tArticle = $oArticleModel->findAllOrderBy($sOrder, $sSide);
     $oView = new _view('article::listViaModuleAjax');
     $oView->tArticle = $tArticle;
     $oView->tColumn = $oArticleModel->getListColumn();
     //on recupere un tableau indexe des auteurs pour afficher leur nom a la place de leur id
     $oView->tJoinAuteur = model_auteur::getInstance()->getSelect();
     print $oView->show();
     exit;
 }
示例#3
0
        ?>
					<a href="<?php 
        echo module_table::getLink(null, array('order' => $tDetail['order'], 'side' => 'asc', $sVarPage => $sValuePage));
        ?>
"><img src="css/images/flecheUp<?php 
        if ($sParamOrder == $tDetail['order'] and $sParamSide == 'asc') {
            ?>
On<?php 
        } else {
            ?>
Off<?php 
        }
        ?>
.png"/></a> 
					<a href="<?php 
        echo module_table::getLink(null, array('order' => $tDetail['order'], 'side' => 'desc', $sVarPage => $sValuePage));
        ?>
"><img src="css/images/flecheDown<?php 
        if ($sParamOrder == $tDetail['order'] and $sParamSide == 'desc') {
            ?>
On<?php 
        } else {
            ?>
Off<?php 
        }
        ?>
.png"/></a> 
				<?php 
    }
    ?>
</th>
示例#4
0
<?php

//avec tri
$oTable = new module_table('complex5ajax');
$oTable->enablePagination();
$oTable->setPaginationLimit(2);
$oTable->setAjaxLink('article::listAjax');
$oTable->setClass('tb_list');
$oTable->setCycleClass(array(null, 'alt'));
$oTable->addHeaderWithOrder('Titre', 'titre');
$oTable->addHeaderWithOrder('Auteur', 'auteur_id');
$oTable->addHeaderWithOrder('Priority', 'priority');
$oTable->addHeader('');
if ($this->tArticle) {
    foreach ($this->tArticle as $oArticle) {
        $sAuteur = null;
        if (isset($this->tJoinAuteur[$oArticle->auteur_id])) {
            $sAuteur = $this->tJoinAuteur[$oArticle->auteur_id];
        }
        $oTable->addLine(array($oArticle->titre, $sAuteur, $oArticle->priority, '<a href="' . $this->getLink('article::edit', array('id' => $oArticle->getId())) . '">Edit</a>
			|
			<a href="' . $this->getLink('article::show', array('id' => $oArticle->getId())) . '">Show</a>
			|
			<a href="' . $this->getLink('article::delete', array('id' => $oArticle->getId())) . '">Delete</a>'));
    }
}
echo $oTable->build()->show();
示例#5
0
        ?>
					<a href="<?php 
        echo module_table::getLink(null, array('order' => $tDetail['order'], 'side' => 'asc'));
        ?>
"><img src="css/images/flecheUp<?php 
        if ($sParamOrder == $tDetail['order'] and $sParamSide == 'asc') {
            ?>
On<?php 
        } else {
            ?>
Off<?php 
        }
        ?>
.png"/></a> 
					<a href="<?php 
        echo module_table::getLink(null, array('order' => $tDetail['order'], 'side' => 'desc'));
        ?>
"><img src="css/images/flecheDown<?php 
        if ($sParamOrder == $tDetail['order'] and $sParamSide == 'desc') {
            ?>
On<?php 
        } else {
            ?>
Off<?php 
        }
        ?>
.png"/></a> 
				<?php 
    }
    ?>
</th>
示例#6
0
文件: main.php 项目: clavat/mkMarket
 public static function setRootLink($sRootModule, $tRootParams = null)
 {
     self::$sRootModule = $sRootModule;
     self::$tRootParams = $tRootParams;
 }
示例#7
0
<?php

$sOrder = module_table::getParam('order');
$sSide = module_table::getParam('side');
?>
<div class="pagination">
<ul>
<?php 
for ($i = 1; $i <= $this->iMax; $i++) {
    ?>
	<li <?php 
    if ($i == $this->iPage + 1) {
        ?>
class="selectionne"<?php 
    }
    ?>
><a href="<?php 
    echo module_table::getLink(null, array($this->sParamPage => $i, 'order' => $sOrder, 'side' => $sSide));
    ?>
">page <?php 
    echo $i;
    ?>
</a></li> 
<?php 
}
?>
</ul>
</div>