/** * $Id: httpreq_do_csarr_autocomplete.php 26917 2015-01-27 16:43:50Z aurelie17 $ * * @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 26917 $ */ CCanDo::checkRead(); $needle = CValue::post("code_activite_csarr", CValue::post("code_csarr", CValue::post("code"))); $type_seance = CValue::post("type_seance"); if (!$needle) { $needle = "%"; } $activite = new CActiviteCsARR(); /** @var CActiviteCsARR[] $activites */ $activites = $activite->seek($needle, null, 300); foreach ($activites as $cle_activite => $_activite) { $_activite->loadRefHierarchie(); $reference = $_activite->loadRefReference(); if ($type_seance == "dediee" && $reference->dedie != "oui" || $type_seance == "non_dediee" && $reference->non_dedie != "possible" || $type_seance == "collective" && $reference->collectif != "oui") { unset($activites[$cle_activite]); } } // Création du template $smarty = new CSmartyDP(); $smarty->assign("activites", $activites); $smarty->assign("needle", $needle); $smarty->assign("nodebug", true); $smarty->display("inc_do_csarr_autocomplete.tpl");
* @package Mediboard * @subpackage SSR * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkRead(); $activite = new CActiviteCsARR(); $activite->code = CValue::getOrSession("code"); // Pagination $current = CValue::getOrSession("current", 0); $step = 20; $limit = "{$current}, {$step}"; $where = array(); $order = ""; /** @var CActiviteCsARR[] $listActivites */ $listActivites = $activite->seek($activite->code, $where, $limit, true); $total = $activite->_totalSeek; // Détail du chargement foreach ($listActivites as $_activite) { $_activite->countElements(); $_activite->countActes(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("activite", $activite); $smarty->assign("listActivites", $listActivites); $smarty->assign("current", $current); $smarty->assign("step", $step); $smarty->assign("total", $total); $smarty->display("vw_csarr.tpl");