Ejemplo n.º 1
0
 function quota($type_id = "", $descriptor = "")
 {
     global $_parsed_quotas_;
     global $lang;
     global $include_path;
     global $_quotas_table_;
     if ($descriptor == "") {
         $this->descriptor = $include_path . "/quotas/{$lang}.xml";
     } else {
         $this->descriptor = $descriptor;
     }
     if (!$_parsed_quotas_[$this->descriptor]) {
         quota::parse_quotas($this->descriptor);
     }
     $this->table = $_quotas_table_;
     if ($type_id != "") {
         $this->type_id = $type_id;
         $this->quota_type = $this->get_quota_type_by_id($type_id);
         if (count($this->quota_type) == 0) {
             $this->quota_type = $this->get_quota_type_by_name($type_id);
         }
     }
 }
Ejemplo n.º 2
0
            $list_statut .= "</select>\n";
            $finance_amende_relance_form = str_replace("!!statut_perdu!!", $list_statut, $finance_amende_relance_form);
            print $finance_amende_relance_form;
            break;
        default:
            //Gestion simple
            show_amende_parameters();
            break;
    }
} else {
    $menu_sous_rub = $msg["finance_amendes"];
    //Gestion par quotas
    if ($quota) {
        $qt = new quota($quota, "{$include_path}/quotas/own/{$lang}/finances.xml");
    } else {
        quota::parse_quotas("{$include_path}/quotas/own/{$lang}/finances.xml");
    }
    $admin_menu_quotas = "<span><a href='./admin.php?categ=finance&sub=amendes_relance&action=edit_loststatus'>" . $msg["finance_statut_perdu_expl_empr"] . "</a></span>&nbsp;";
    for ($i = 0; $i < count($_quotas_types_); $i++) {
        if ($_quotas_types_[$i]["FILTER_ID"] == "amende_relance") {
            $admin_menu_quotas .= "<span><a href='./admin.php?categ=finance&sub=amendes_relance&quota=" . $_quotas_types_[$i]["ID"] . "'>" . $_quotas_types_[$i]["SHORT_COMMENT"] . "</a></span>\n";
            if ($quota == $_quotas_types_[$i]["ID"]) {
                $menu_sous_rub .= " > " . $_quotas_types_[$i]["SHORT_COMMENT"];
                if ($elements) {
                    $menu_sous_rub .= " > " . $qt->get_title_by_elements_id($elements);
                }
            }
        }
    }
    $admin_layout = str_replace('!!menu_sous_rub!!', $menu_sous_rub, $admin_layout);
    print $admin_layout;
Ejemplo n.º 3
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: main.inc.php,v 1.13 2012-04-30 14:04:19 dbellamy Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/quotas.class.php";
//Parse des quotas possibles
if ($sub) {
    $qt = new quota($sub);
} else {
    quota::parse_quotas();
}
//Génération dynamique du menu
$admin_menu_quotas = "\n<h1>" . $msg["admin_quotas"] . " <span> !!menu_sous_rub!!</span></h1>\n\n<div class=\"hmenu\">";
for ($i = 0; $i < count($_quotas_types_); $i++) {
    if ($pmb_pret_restriction_prolongation != 2 && $_quotas_types_[$i]['NAME'] == 'PROLONG_NMBR_QUOTA') {
        continue;
    }
    if ($pmb_pret_restriction_prolongation != 2 && $_quotas_types_[$i]['NAME'] == 'PROLONG_TIME_QUOTA') {
        continue;
    }
    if (!$pmb_short_loan_management && ($_quotas_types_[$i]['NAME'] == 'SHORT_LOAN_TIME_QUOTA' || $_quotas_types_[$i]['NAME'] == 'SHORT_LOAN_NMBR_QUOTA')) {
        continue;
    }
    $admin_menu_quotas .= "<span" . ongletSelect("categ=quotas&sub=" . $_quotas_types_[$i]["ID"]) . "><a href='./admin.php?categ=quotas&sub=" . $_quotas_types_[$i]["ID"] . "'>" . $_quotas_types_[$i]["SHORT_COMMENT"] . "</a></span>\n";
    if ($sub == $_quotas_types_[$i]["ID"]) {
        $menu_sous_rub = $_quotas_types_[$i]["SHORT_COMMENT"];