示例#1
0
function show_list_frais()
{
    global $dbh;
    global $msg;
    global $charset;
    global $pmb_gestion_devise;
    print "<table>\n\t<tr>\n\t\t<th>" . htmlentities($msg[103], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg[acquisition_frais_montant], ENT_QUOTES, $charset) . "</th>\n\t</tr>";
    $res = frais::listFrais();
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_object($res);
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./admin.php?categ=acquisition&sub=frais&action=modif&id={$row->id_frais}';\" ";
        print "<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer' ><td><i>" . htmlentities($row->libelle, ENT_QUOTES, $charset) . "</i></td><td><i>" . htmlentities($row->montant, ENT_QUOTES, $charset) . " " . $pmb_gestion_devise . "</i></td>";
        print "</tr>";
    }
    print "</table>\n\t\t<input class='bouton' type='button' value=' " . $msg[acquisition_ajout_frais] . " ' onClick=\"document.location='./admin.php?categ=acquisition&sub=frais&action=add'\" />";
}
示例#2
0
 function sel_frais_display($id_frais, $base_url, $form_checker = '')
 {
     if (!$id_frais) {
         return;
     }
     parent::frais($id_frais);
     $this->base_url = $base_url;
     $this->form_checker = $form_checker;
 }