当前位置: 首页>>代码示例>>PHP>>正文


PHP pmb_mysql_fetch_row函数代码示例

本文整理汇总了PHP中pmb_mysql_fetch_row函数的典型用法代码示例。如果您正苦于以下问题:PHP pmb_mysql_fetch_row函数的具体用法?PHP pmb_mysql_fetch_row怎么用?PHP pmb_mysql_fetch_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pmb_mysql_fetch_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show_abts

function show_abts($dbh)
{
    global $msg;
    global $charset;
    print "<table>\n\t\t<tr>\n\t\t<th>" . $msg[103] . "</th>\n\t\t<th style='display:none'>" . $msg["type_abts_prepay"] . "</th>\n\t\t<th style='display:none'>" . $msg["type_abts_prepay_dflt"] . "</th>\n\t\t<th>" . $msg["type_abts_tarif"] . "</th>\n\t\t<th>" . $msg["type_abts_caution"] . "</th>\n\t\t</tr>";
    // affichage du tableau des utilisateurs
    $requete = "SELECT id_type_abt, type_abt_libelle, prepay, prepay_deflt_mnt,tarif,caution FROM type_abts ORDER BY type_abt_libelle,id_type_abt";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_row($res);
        if ($row[2]) {
            $prepay = "x";
        }
        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=finance&sub=abts&action=modif&id={$row['0']}';\" ";
        print pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'><td>" . htmlentities($row[1], ENT_QUOTES, $charset) . "</td>\n\t\t\t<td style='text-align:center;display:none'>{$prepay}</td><td style='display:none'>" . $row[3] . "</td><td>" . $row[4] . "</td><td>" . $row[5] . "</td>\n\t\t\t\t\t\t</tr>");
    }
    print "</table>\n\t\t<input class='bouton' type='button' value=\" " . $msg["type_abts_add"] . " \" onClick=\"document.location='./admin.php?categ=finance&sub=abts&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:abts.inc.php

示例2: retrieve_shelf_content

 function retrieve_shelf_content($shelf_id, $OPACUserId)
 {
     global $dbh;
     $shelf_id += 0;
     if (!$shelf_id) {
         return array();
     }
     //droits d'acces emprunteur/notice
     $acces_j = '';
     global $gestion_acces_active, $gestion_acces_empr_notice;
     if ($OPACUserId != -1 && $gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
         $ac = new acces();
         $dom_2 = $ac->setDomain(2);
         $acces_j = $dom_2->getJoin($empr_id, 4, 'notice_id');
     }
     if ($acces_j) {
         $statut_j = '';
         $statut_r = '';
     } else {
         $statut_j = ',notice_statut';
         $statut_r = "and statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0) or (notice_visible_opac_abon=1 and notice_visible_opac=1)) ";
     }
     $sql = "SELECT object_id FROM etagere LEFT JOIN etagere_caddie ON (etagere_id = idetagere) LEFT JOIN caddie_content ON (caddie_content.caddie_id = etagere_caddie.caddie_id) LEFT JOIN notices ON (object_id = notice_id) {$acces_j} {$statut_j} WHERE etagere_id = " . $shelf_id . " AND object_id {$statut_r} GROUP BY object_id";
     $res = pmb_mysql_query($sql, $dbh);
     $results = array();
     while ($row = pmb_mysql_fetch_row($res)) {
         $results[] = $row[0];
     }
     return $results;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:30,代码来源:pmbesOPACGeneric.class.php

示例3: fetch_data

 function fetch_data()
 {
     global $include_path;
     global $PMBuserid;
     $this->info = array();
     $this->users = array();
     $requete_users = "SELECT userid, username FROM users order by username ";
     $res_users = pmb_mysql_query($requete_users);
     $this->all_users = array();
     while (list($this->all_userid, $all_username) = pmb_mysql_fetch_row($res_users)) {
         $this->all_users[] = array($this->all_userid, $all_username);
     }
     if (!$this->id) {
         $this->users[] = $PMBuserid;
         return;
     }
     $req = "select * from mailtpl where id_mailtpl=" . $this->id;
     $resultat = pmb_mysql_query($req);
     if (pmb_mysql_num_rows($resultat)) {
         $r = pmb_mysql_fetch_object($resultat);
         $this->info['id'] = $r->id_mailtpl;
         $this->info['name'] = $r->mailtpl_name;
         $this->info['objet'] = $r->mailtpl_objet;
         $this->info['tpl'] = $r->mailtpl_tpl;
         $this->info['users'] = $r->mailtpl_users;
     }
     $this->users = explode(" ", $this->info['users']);
     // printr($this->info[28]);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:mailtpl.class.php

示例4: show_procs

function show_procs($idcaddie)
{
    global $msg;
    global $PMBuserid;
    global $dbh;
    print "<table>";
    // affichage du tableau des procédures
    if ($PMBuserid != 1) {
        $where = " and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') ";
    }
    $requete = "SELECT idproc, type, name, requete, comment, autorisations, parameters FROM caddie_procs WHERE type='SELECT' {$where} ORDER BY name ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_row($res);
        $rqt_autorisation = explode(" ", $row[5]);
        if (array_search($PMBuserid, $rqt_autorisation) !== FALSE || $PMBuserid == 1) {
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity += 1;
            if (preg_match_all("|!!(.*)!!|U", $row[3], $query_parameters)) {
                $action = "form_proc";
            } else {
                $action = "pointe_item";
            }
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./catalog.php?categ=caddie&sub=pointage&moyen=selection&action={$action}&id={$row['0']}&idcaddie={$idcaddie}';\" ";
            print pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<strong>{$row['2']}</strong><br />\n\t\t\t\t\t\t<small>{$row['4']}&nbsp;</small>\n\t\t\t\t\t\t</td>\n\t\t\t\t</tr>");
        }
    }
    print "</table>";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:35,代码来源:selection.inc.php

示例5: do_selector_bul_section

function do_selector_bul_section($section_id, $location_id)
{
    global $dbh;
    global $charset;
    global $deflt_section;
    global $deflt_location;
    if (!$section_id) {
        $section_id = $deflt_section;
    }
    if (!$location_id) {
        $location_id = $deflt_location;
    }
    $rqtloc = "SELECT idlocation FROM docs_location order by location_libelle";
    $resloc = pmb_mysql_query($rqtloc, $dbh);
    while ($loc = pmb_mysql_fetch_object($resloc)) {
        $requete = "SELECT idsection, section_libelle FROM docs_section, docsloc_section where idsection=num_section and num_location='{$loc->idlocation}' order by section_libelle";
        $result = pmb_mysql_query($requete, $dbh);
        $nbr_lignes = pmb_mysql_num_rows($result);
        if ($nbr_lignes) {
            if ($loc->idlocation == $location_id) {
                $selector .= "<div id=\"docloc_section" . $loc->idlocation . "\" style=\"display:block\">";
            } else {
                $selector .= "<div id=\"docloc_section" . $loc->idlocation . "\" style=\"display:none\">";
            }
            $selector .= "<select name='f_ex_section" . $loc->idlocation . "' id='f_ex_section" . $loc->idlocation . "'>";
            while ($line = pmb_mysql_fetch_row($result)) {
                $selector .= "<option value='{$line['0']}'";
                $line[0] == $section_id ? $selector .= ' SELECTED>' : ($selector .= '>');
                $selector .= htmlentities($line[1], ENT_QUOTES, $charset) . '</option>';
            }
            $selector .= '</select></div>';
        }
    }
    return $selector;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:35,代码来源:bul_expl_form.inc.php

示例6: ajax_verif_date

function ajax_verif_date()
{
    global $msg, $p1;
    $mysql_date = extraitdate($p1);
    $rqt = "SELECT DATE_ADD('" . $mysql_date . "', INTERVAL 0 DAY)";
    if ($result = pmb_mysql_query($rqt)) {
        if ($row = pmb_mysql_fetch_row($result)) {
            if ($row[0]) {
                ajax_http_send_response($row[0]);
                return;
            }
        }
    }
    ajax_http_send_error('400', $msg['error_message_invalid_date']);
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:15,代码来源:misc.inc.php

示例7: show_procs

function show_procs($dbh)
{
    global $msg;
    global $charset;
    global $PMBuserid, $javascript_path, $form_notice_tpl;
    print "\n\t\t<script type=\"text/javascript\" src=\"" . $javascript_path . "/tablist.js\"></script>\n\t\t<a href=\"javascript:expandAll()\"><img src='./images/expand_all.gif' border='0' id=\"expandall\"></a>\n\t\t<a href=\"javascript:collapseAll()\"><img src='./images/collapse_all.gif' border='0' id=\"collapseall\"></a>\n\t\t";
    // affichage du tableau des procédures
    $requete = "SELECT idproc, name, requete, comment, autorisations, libproc_classement, num_classement FROM procs left join procs_classements on idproc_classement=num_classement ORDER BY libproc_classement,name ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $class_prec = $msg[proc_clas_aucun];
    $buf_tit = "";
    $buf_class = 0;
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_row($res);
        $rqt_autorisation = explode(" ", $row[4]);
        if (($PMBuserid == 1 || array_search($PMBuserid, $rqt_autorisation) !== FALSE) && pmb_strtolower(pmb_substr(trim($row[2]), 0, 6)) == 'select') {
            $classement = $row[5];
            if ($class_prec != $classement) {
                if (!$row[5]) {
                    $row[5] = $msg[proc_clas_aucun];
                }
                if ($buf_tit) {
                    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
                    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
                    $buf_contenu = "";
                }
                $buf_tit = $row[5];
                $buf_class = $row[6];
                $class_prec = $classement;
            }
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity++;
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./edit.php?categ=procs&sub=&action=execute&id_proc={$row['0']}';\" ";
            $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td><strong>{$row['1']}</strong><br />\n\t\t\t\t\t\t<small>{$row['3']}</small></td>\n\t\t\t\t</tr>";
        }
    }
    $buf_contenu = "<table><tr><th colspan=4>" . $buf_tit . "</th></tr>" . $buf_contenu . "</table>";
    print gen_plus("procclass" . $buf_class, $buf_tit, $buf_contenu);
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:45,代码来源:procs.inc.php

示例8: show_procs

function show_procs($dbh)
{
    global $msg;
    global $PMBuserid;
    print "<hr /><table>";
    // affichage du tableau des procédures
    if ($PMBuserid != 1) {
        $where = " where (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') ";
    }
    $requete = "SELECT idproc, type, name, requete, comment, autorisations FROM caddie_procs {$where} ORDER BY type, name ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_row($res);
        $rqt_autorisation = explode(" ", $row[5]);
        if (array_search($PMBuserid, $rqt_autorisation) !== FALSE || $PMBuserid == 1) {
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity += 1;
            $action = " onmousedown=\"document.location='./catalog.php?categ=caddie&sub=gestion&quoi=procs&action=modif&id={$row['0']}';\"";
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
            print "<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>";
            if ($row[1] != "ACTION") {
                print "\t<td width='10'><input class='bouton' type='button' value=' {$msg['procs_options_tester_requete']} ' onClick=\"document.location='./catalog.php?categ=caddie&sub=gestion&quoi=procs&action=execute&id={$row['0']}'\" />";
            } else {
                print "\t<td width='10' {$action}>&nbsp;";
            }
            print pmb_bidi("\n\t\t\t\t\t</td>\n\t\t\t\t\t<td width='80' {$action}>\n\t\t\t\t\t\t{$row['1']}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t<td {$action}>\n\t\t\t\t\t\t<strong>{$row['2']}</strong><br />\n\t\t\t\t\t\t<small>{$row['4']}&nbsp;</small>\n\t\t\t\t\t\t</td>");
            if (preg_match_all("|!!(.*)!!|U", $row[3], $query_parameters)) {
                print "<td><a href='catalog.php?categ=caddie&sub=gestion&quoi=procs&action=configure&id_query=" . $row[0] . "'>{$msg['procs_options_config_param']}</a>";
            } else {
                print "<td {$action}>&nbsp;";
            }
            print "</td>";
            print "<td><input class='bouton' type='button' value=\"" . $msg[procs_bt_export] . "\" onClick=\"document.location='./export.php?quoi=procs&sub=caddie&id={$row['0']}'\" /></td>\n\t\t\t\t\t\t</tr>";
        }
    }
    print "</table><hr />\n\t\t<input class='bouton' type='button' value=' {$msg['704']} ' onClick=\"document.location='./catalog.php?categ=caddie&sub=gestion&quoi=procs&action=add'\" />\n\t\t<input class='bouton' type='button' value=' {$msg['procs_bt_import']} ' onClick=\"document.location='./catalog.php?categ=caddie&sub=gestion&quoi=procs&action=import'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:43,代码来源:procs.inc.php

示例9: show_section

function show_section($dbh)
{
    global $msg;
    global $pmb_gestion_financiere, $pmb_gestion_abonnement;
    if ($pmb_gestion_financiere) {
        $gestion_abts = $pmb_gestion_abonnement;
    } else {
        $gestion_abts = 0;
    }
    print "<table>\n\t<tr>\n\t\t<th>" . $msg[103] . "</th>\n\t\t<th>" . $msg[1400] . "</th>";
    if ($gestion_abts) {
        print "<th>" . $msg["empr_categ_tarif"] . "</th>";
    }
    print "<th>" . $msg["empr_categ_age_min"] . "</th>\n\t\t<th>" . $msg["empr_categ_age_max"] . "</th>\n\t</tr>";
    // affichage du tableau des utilisateurs
    $requete = "SELECT id_categ_empr, libelle, duree_adhesion, tarif_abt, age_min, age_max FROM empr_categ ORDER BY libelle, id_categ_empr";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_row($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=empr&sub=categ&action=modif&id={$row['0']}';\" ";
        print pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'><td>{$row['1']}</td>\n\t\t\t\t\t\t<td>{$row['2']}</td>");
        if ($gestion_abts == 1) {
            $tarif = $row[3];
        } else {
            if ($gestion_abts == 2) {
                $tarif = $msg["finance_see_finance"];
            }
        }
        if ($gestion_abts) {
            print "<td>" . $tarif . "</td>";
        }
        print "<td>" . $row[4] . "</td>\n\t\t\t\t<td>" . $row[5] . "</td>\n\t\t\t\t\t</tr>";
    }
    print "</table>\n\t\t<input class='bouton' type='button' value=' {$msg['524']} ' onClick=\"document.location='./admin.php?categ=empr&sub=categ&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:43,代码来源:categ_empr.inc.php

示例10: show_list_biblio

function show_list_biblio()
{
    global $dbh;
    global $msg;
    global $charset;
    //Récupération de l'utilisateur
    $requete_user = "SELECT userid FROM users where username='" . SESSlogin . "' limit 1 ";
    $res_user = pmb_mysql_query($requete_user, $dbh);
    $row_user = pmb_mysql_fetch_row($res_user);
    $user_userid = $row_user[0];
    //Affichage de la liste des etablissements auxquels a acces l'utilisateur
    $aff = "<table>";
    $q = entites::list_biblio($user_userid);
    $res = pmb_mysql_query($q, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    if (!$nbr) {
        //Pas d'etablissements définis pour l'utilisateur
        $error = true;
        $error_msg .= htmlentities($msg["acquisition_err_coord"], ENT_QUOTES, $charset) . "<div class='row'></div>";
    }
    if ($error) {
        error_message($msg[321], $error_msg . htmlentities($msg["acquisition_err_par"], ENT_QUOTES, $charset), '1', './admin.php?categ=acquisition');
        die;
    }
    if ($nbr == '1') {
        $row = pmb_mysql_fetch_object($res);
        show_list_exer($row->id_entite);
    } else {
        $parity = 1;
        while ($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=compta&action=list&ent={$row->id_entite}';\" ";
            $aff .= "<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'><td><i>{$row->raison_sociale}</i></td></tr>";
        }
        $aff .= "</table>";
        print $aff;
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:43,代码来源:comptabilite.inc.php

示例11: aff_form_autorisations_etagere

function aff_form_autorisations_etagere($param_autorisations = "1", $creation_etagere = "1")
{
    global $dbh;
    global $msg;
    global $PMBuserid;
    $requete_users = "SELECT userid, username FROM users order by username ";
    $res_users = pmb_mysql_query($requete_users, $dbh);
    $all_users = array();
    while (list($all_userid, $all_username) = pmb_mysql_fetch_row($res_users)) {
        $all_users[] = array($all_userid, $all_username);
    }
    if ($creation_etagere) {
        $param_autorisations .= " " . $PMBuserid;
    }
    $autorisations_donnees = explode(" ", $param_autorisations);
    for ($i = 0; $i < count($all_users); $i++) {
        if (array_search($all_users[$i][0], $autorisations_donnees) !== FALSE) {
            $autorisation[$i][0] = 1;
        } else {
            $autorisation[$i][0] = 0;
        }
        $autorisation[$i][1] = $all_users[$i][0];
        $autorisation[$i][2] = $all_users[$i][1];
    }
    $autorisations_users = "";
    $id_check_list = '';
    while (list($row_number, $row_data) = each($autorisation)) {
        $id_check = "auto_" . $row_data[1];
        if ($id_check_list) {
            $id_check_list .= '|';
        }
        $id_check_list .= $id_check;
        if ($row_data[1] == 1) {
            $autorisations_users .= "<span class='usercheckbox'><input type='checkbox' name='etagere_autorisations[]' value='" . $row_data[1] . "' id='{$id_check}' checked class='checkbox' readonly /><label for='{$id_check}' class='normlabel'>&nbsp;" . $row_data[2] . "</label></span>&nbsp;";
        } elseif ($row_data[0]) {
            $autorisations_users .= "<span class='usercheckbox'><input type='checkbox' name='etagere_autorisations[]' value='" . $row_data[1] . "' id='{$id_check}' checked class='checkbox' /><label for='{$id_check}' class='normlabel'>&nbsp;" . $row_data[2] . "</label></span>&nbsp;";
        } else {
            $autorisations_users .= "<span class='usercheckbox'><input type='checkbox' name='etagere_autorisations[]' value='" . $row_data[1] . "' id='{$id_check}' class='checkbox' /><label for='{$id_check}' class='normlabel'>&nbsp;" . $row_data[2] . "</label></span>&nbsp;";
        }
    }
    $autorisations_users .= "<input type='hidden' id='auto_id_list' name='auto_id_list' value='{$id_check_list}' >";
    return $autorisations_users;
}
开发者ID:hogsim,项目名称:PMB,代码行数:43,代码来源:etagere.inc.php

示例12: show_codstat

function show_codstat($dbh)
{
    global $msg;
    print "<table>\n\t\t<tr>\n\t\t<th>" . $msg[103] . "</th>\n\t\t</tr>";
    // affichage du tableau des utilisateurs
    $requete = "SELECT idcode, libelle FROM empr_codestat ORDER BY libelle, idcode ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_row($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=empr&sub=codstat&action=modif&id={$row['0']}';\" ";
        print pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'><td>{$row['1']}</td>\n\t\t\t\t\t\t</tr>");
    }
    print "</table>\n\t\t<input class='bouton' type='button' value=' {$msg['99']} ' onClick=\"document.location='./admin.php?categ=empr&sub=codstat&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:22,代码来源:cod_stat.inc.php

示例13: mysqlTable

 function mysqlTable($action)
 {
     global $pmb_set_time_limit, $dbh;
     if (SESSrights & ADMINISTRATION_AUTH) {
         $result = array();
         if ($action) {
             @set_time_limit($pmb_set_time_limit);
             $db = DATA_BASE;
             $tables = pmb_mysql_list_tables($db);
             $num_tables = @pmb_mysql_num_rows($tables);
             $i = 0;
             while ($i < $num_tables) {
                 $table[$i] = pmb_mysql_tablename($tables, $i);
                 $i++;
             }
             while (list($cle, $valeur) = each($table)) {
                 $requete = $action . " TABLE " . $valeur . " ";
                 $res = @pmb_mysql_query($requete, $dbh);
                 $nbr_lignes = @pmb_mysql_num_rows($res);
                 if ($nbr_lignes) {
                     for ($i = 0; $i < $nbr_lignes; $i++) {
                         $row = pmb_mysql_fetch_row($res);
                         $tab = array();
                         foreach ($row as $dummykey => $col) {
                             if (!$col) {
                                 $col = "&nbsp;";
                             }
                             $tab[$dummykey] = $col;
                         }
                         $result[] = $tab;
                     }
                 }
             }
         }
         return $result;
     } else {
         return array();
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:39,代码来源:pmbesMySQL.class.php

示例14: int

     $rqt = "ALTER TABLE users ADD deflt3liv_statut int(3) not null default '-1' ";
     echo traite_rqt($rqt, "ALTER TABLE users ADD default liv state");
     $rqt = "ALTER TABLE users ADD deflt3fac_statut int(3) not null default '-1' ";
     echo traite_rqt($rqt, "ALTER TABLE users ADD default fac state");
     $rqt = "ALTER TABLE users ADD deflt3sug_statut int(3) not null default '-1' ";
     echo traite_rqt($rqt, "ALTER TABLE users ADD default sug state");
     //Modification de la table external_count
     $sql_alter_external_count = "ALTER TABLE external_count ADD source_id INT NOT NULL ";
     echo traite_rqt($sql_alter_external_count, "Modification de la table external_count 1");
     $sql_alter_external_count = "UPDATE external_count, entrepots SET external_count.source_id = entrepots.source_id WHERE entrepots.recid = external_count.rid ";
     echo traite_rqt($sql_alter_external_count, "Modification de la table external_count 2");
     //Récupération de la liste des sources
     $sql_liste_sources = "SELECT source_id FROM connectors_sources ";
     $res_liste_sources = pmb_mysql_query($sql_liste_sources, $dbh) or die(pmb_mysql_error());
     //Pour chaque source
     while ($row = pmb_mysql_fetch_row($res_liste_sources)) {
         //On créer la table
         $sql_create_table = "CREATE TABLE entrepot_source_" . $row[0] . " (\n\t\t\t\t\t\t\t  connector_id varchar(20) NOT NULL default '',\n\t\t\t\t\t\t\t  source_id int(11) unsigned NOT NULL default 0,\n\t\t\t\t\t\t\t  ref varchar(220) NOT NULL default '',\n\t\t\t\t\t\t\t  date_import datetime NOT NULL default '0000-00-00 00:00:00',\n\t\t\t\t\t\t\t  ufield char(3) NOT NULL default '',\n\t\t\t\t\t\t\t  usubfield char(1) NOT NULL default '',\n\t\t\t\t\t\t\t  field_order int(10) unsigned NOT NULL default 0,\n\t\t\t\t\t\t\t  subfield_order int(10) unsigned NOT NULL default 0,\n\t\t\t\t\t\t\t  value text NOT NULL,\n\t\t\t\t\t\t\t  i_value text NOT NULL,\n\t\t\t\t\t\t\t  recid bigint(20) unsigned NOT NULL default 0,\n\t\t\t\t\t\t\t  search_id varchar(32) NOT NULL default '',\n\t\t\t\t\t\t\t  PRIMARY KEY  (connector_id,source_id,ref,ufield,usubfield,field_order,subfield_order,search_id),\n\t\t\t\t\t\t\t  KEY usubfield (usubfield),\n\t\t\t\t\t\t\t  KEY ufield_2 (ufield,usubfield),\n\t\t\t\t\t\t\t  KEY recid_2 (recid,ufield,usubfield),\n\t\t\t\t\t\t\t  KEY source_id (source_id),\n\t\t\t\t\t\t\t  KEY i_recid_source_id (recid,source_id)\n\t\t\t\t\t\t\t) ";
         echo traite_rqt($sql_create_table, "CREATE TABLE entrepot_source_" . $row[0]);
         //On copie les éléments de la source dans sa nouvelle table
         $sql_transfer = "INSERT INTO entrepot_source_" . $row[0] . " (SELECT * FROM entrepots WHERE source_id = " . $row[0] . ")";
         echo traite_rqt($sql_transfer, "INSERT INTO entrepot_source_" . $row[0]);
     }
     // +-------------------------------------------------+
     echo "</table>";
     $rqt = "update parametres set valeur_param='" . $action . "' where type_param='pmb' and sstype_param='bdd_version' ";
     $res = pmb_mysql_query($rqt, $dbh);
     echo "<strong><font color='#FF0000'>" . $msg[1807] . $action . " !</font></strong><br />";
     echo form_relance("v4.66");
     break;
 case "v4.66":
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:alter_v4.inc.php

示例15: show_form

 function show_form()
 {
     global $msg;
     global $dbh;
     global $charset, $lang;
     global $search_form_map;
     global $all_query, $typdoc_query, $statut_query, $docnum_query, $pmb_indexation_docnum_allfields, $pmb_indexation_docnum;
     global $categ_query, $thesaurus_auto_postage_search, $auto_postage_query;
     global $thesaurus_concepts_active, $concept_query;
     global $map_echelle_query, $map_projection_query, $map_ref_query, $map_equinoxe_query;
     global $pmb_map_size_search_edition;
     global $pmb_map_base_layer_type;
     global $pmb_map_base_layer_params;
     global $map_emprises_query;
     // on commence par créer le champ de sélection de document
     // récupération des types de documents utilisés.
     $query = "SELECT count(typdoc), typdoc ";
     $query .= "FROM notices where typdoc!='' GROUP BY typdoc";
     $result = @pmb_mysql_query($query, $dbh);
     $toprint_typdocfield .= "  <option value=''>{$msg['tous_types_docs']}</option>\n";
     $doctype = new marc_list('doctype');
     while ($rt = pmb_mysql_fetch_row($result)) {
         $obj[$rt[1]] = 1;
         $qte[$rt[1]] = $rt[0];
     }
     foreach ($doctype->table as $key => $libelle) {
         if ($obj[$key] == 1) {
             $toprint_typdocfield .= "  <option ";
             $toprint_typdocfield .= " value='{$key}'";
             if ($typdoc == $key) {
                 $toprint_typdocfield .= " selected='selected' ";
             }
             $toprint_typdocfield .= ">" . htmlentities($libelle . " (" . $qte[$key] . ")", ENT_QUOTES, $charset) . "</option>\n";
         }
     }
     // récupération des statuts de documents utilisés.
     $query = "SELECT count(statut), id_notice_statut, gestion_libelle ";
     $query .= "FROM notices, notice_statut where id_notice_statut=statut GROUP BY id_notice_statut order by gestion_libelle";
     $result = pmb_mysql_query($query, $dbh);
     $toprint_statutfield .= "  <option value=''>{$msg['tous_statuts_notice']}</option>\n";
     while ($obj = @pmb_mysql_fetch_row($result)) {
         $toprint_statutfield .= "  <option value='{$obj['1']}'";
         if ($statut_query == $obj[1]) {
             $toprint_statutfield .= " selected";
         }
         $toprint_statutfield .= ">" . htmlentities($obj[2] . "  (" . $obj[0] . ")", ENT_QUOTES, $charset) . "</OPTION>\n";
     }
     $search_form_map = str_replace("!!typdocfield!!", $toprint_typdocfield, $search_form_map);
     $search_form_map = str_replace("!!statutfield!!", $toprint_statutfield, $search_form_map);
     $search_form_map = str_replace("!!all_query!!", htmlentities(stripslashes($all_query), ENT_QUOTES, $charset), $search_form_map);
     $search_form_map = str_replace("!!categ_query!!", htmlentities(stripslashes($categ_query), ENT_QUOTES, $charset), $search_form_map);
     if ($thesaurus_concepts_active) {
         $search_form_map = str_replace("!!concept_query!!", htmlentities(stripslashes($concept_query), ENT_QUOTES, $charset), $search_form_map);
     }
     // map
     $layer_params = json_decode($pmb_map_base_layer_params, true);
     $baselayer = "baseLayerType: dojox.geo.openlayers.BaseLayerType." . $pmb_map_base_layer_type;
     if (count($layer_params)) {
         if ($layer_params['name']) {
             $baselayer .= ",baseLayerName:\"" . $layer_params['name'] . "\"";
         }
         if ($layer_params['url']) {
             $baselayer .= ",baseLayerUrl:\"" . $layer_params['url'] . "\"";
         }
         if ($layer_params['options']) {
             $baselayer .= ",baseLayerOptions:" . json_encode($layer_params['options']);
         }
     }
     $size = explode("*", $pmb_map_size_search_edition);
     if (count($size) != 2) {
         $map_size = "width:800px; height:480px;";
     }
     $map_size = "width:" . $size[0] . "px; height:" . $size[1] . "px;";
     if (!$map_emprises_query) {
         $map_emprises_query = array();
     }
     $map_holds = array();
     foreach ($map_emprises_query as $map_hold) {
         $map_holds[] = array("wkt" => $map_hold, "type" => "search", "color" => null, "objects" => array());
     }
     $r = "<div id='map_search' data-dojo-type='apps/map/map_controler' style='{$map_size}' data-dojo-props='" . $baselayer . ",mode:\"search_criteria\",hiddenField:\"map_emprises_query\",searchHolds:" . json_encode($map_holds, true) . "'></div>";
     $search_form_map = str_replace("!!map!!", $r, $search_form_map);
     //champs maps
     $requete = "SELECT map_echelle_id, map_echelle_name FROM map_echelles ORDER BY map_echelle_name ";
     $projections = gen_liste($requete, "map_echelle_id", "map_echelle_name", "map_echelle_query", "", $map_echelle_query, 0, "", 0, $msg['map_echelle_vide']);
     $search_form_map = str_replace("!!map_echelle_list!!", $projections, $search_form_map);
     $requete = "SELECT map_projection_id, map_projection_name FROM map_projections ORDER BY map_projection_name ";
     $projections = gen_liste($requete, "map_projection_id", "map_projection_name", "map_projection_query", "", $map_projection_query, 0, "", 0, $msg['map_projection_vide']);
     $search_form_map = str_replace("!!map_projection_list!!", $projections, $search_form_map);
     $requete = "SELECT map_ref_id, map_ref_name FROM map_refs ORDER BY map_ref_name ";
     $refs = gen_liste($requete, "map_ref_id", "map_ref_name", "map_ref_query", "", $map_ref_query, 0, "", 0, $msg['map_ref_vide']);
     $search_form_map = str_replace("!!map_ref_list!!", $refs, $search_form_map);
     $search_form_map = str_replace("!!map_equinoxe_value!!", $map_equinoxe_query, $search_form_map);
     $checkbox = "";
     if ($thesaurus_auto_postage_search) {
         $checkbox = "\n\t\t\t<div class='colonne'>\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<input type='checkbox' !!auto_postage_checked!! id='auto_postage_query' name='auto_postage_query'/><label for='auto_postage_query'>" . $msg["search_autopostage_check"] . "</label>\n\t\t\t\t</div>\n\t\t\t</div>";
         $checkbox = str_replace("!!auto_postage_checked!!", $auto_postage_query ? 'checked' : '', $checkbox);
     }
     $search_form_map = str_replace("!!auto_postage!!", $checkbox, $search_form_map);
     if ($pmb_indexation_docnum) {
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:searcher.class.php


注:本文中的pmb_mysql_fetch_row函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。