예제 #1
0
        foreach ($code->_ref_code_ccam->_ref_infotarif as $_infotarif) {
            $_infotarif->date_effet = CDatedCodeCCAM::mapDateFrom($_infotarif->date_effet);
        }
        $codes[] = $code;
    }
} else {
    if ($code && $date_demandee) {
        $query = "SELECT CODEACTE\r\n    FROM p_phase_acte\r\n    WHERE DATEEFFET >= '" . $date_version . "'\r\n    AND CODEACTE = '" . $code . "'";
        $query .= " ORDER BY CODEACTE LIMIT 0 , 1";
        $ds = CSQLDataSource::get("ccamV2");
        $total = $ds->countRows($query);
        $result = $ds->exec($query);
        $result = $ds->exec($query);
        $codes = array();
        while ($row = $ds->fetchArray($result)) {
            $code = CDatedCodeCCAM::get($row["CODEACTE"]);
            $code->_ref_code_ccam->date_creation = CDatedCodeCCAM::mapDateFrom($code->_ref_code_ccam->date_creation);
            foreach ($code->_ref_code_ccam->_ref_infotarif as $_infotarif) {
                $_infotarif->date_effet = CDatedCodeCCAM::mapDateFrom($_infotarif->date_effet);
            }
            $codes[] = $code;
        }
    }
}
$smarty->assign("keywords_multiple", $keywords);
$smarty->assign("codes", $codes);
$smarty->assign("nbResultat", $total);
$smarty->assign("page", $page);
$smarty->assign("step", $step);
$smarty->assign("date_demandee", $date_demandee);
$smarty->display("inc_result_search_acte.tpl");
예제 #2
0
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    OXOL, see http://www.mediboard.org/public/OXOL
 * @version    $Revision$
 */
CCanDo::checkRead();
$code_ccam = CValue::get("code_ccam");
$date_version = CValue::get("date_version");
$date_demandee = CValue::get("date_demandee");
$date_version_to = null;
if ($date_demandee) {
    $date_version_to = CDatedCodeCCAM::mapDateToDash($date_demandee);
}
if ($date_version) {
    $date_version_to = CDatedCodeCCAM::mapDateToSlash($date_version);
}
$date_demandee = CDatedCodeCCAM::mapDateFrom($date_version_to);
$date_versions = array();
$code_complet = CDatedCodeCCAM::get($code_ccam, $date_version_to);
foreach ($code_complet->_ref_code_ccam->_ref_infotarif as $_infotarif) {
    $date_versions[] = $code_complet->mapDateFrom($_infotarif->date_effet);
}
foreach ($code_complet->activites as $_activite) {
    $code_complet->_count_activite += count($_activite->assos);
}
$acte_voisins = $code_complet->loadActesVoisins();
$smarty = new CSmartyDP();
if (!in_array($date_demandee, $date_versions) && $date_demandee) {
    $smarty->assign("no_date_found", "CDatedCodeCCAM-msg-No date found for date searched");
}
$smarty->assign("code_complet", $code_complet);
$smarty->assign("numberAssociations", $code_complet->_count_activite);