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


PHP gen_plus函数代码示例

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


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

示例1: fetch_data

 function fetch_data()
 {
     global $dbh;
     $req = "SELECT surloc_num, location_id,location_libelle, rel_date_parution,rel_libelle_numero, rel_comment_opac \n\t\tfrom perio_relance, abts_abts, docs_location\n\t\twhere  location_id=idlocation and rel_abt_num=abt_id and num_notice=" . $this->serial_id . " and rel_comment_opac!='' group by rel_abt_num,rel_date_parution,rel_libelle_numero order by rel_nb desc";
     $result = pmb_mysql_query($req);
     if (pmb_mysql_num_rows($result)) {
         $tr_class = "";
         while ($r = pmb_mysql_fetch_object($result)) {
             $surloc_libelle = "";
             if ($opac_sur_location_activate && $r->surloc_num) {
                 $req = "select surloc_libelle from sur_location where surloc_id = " . $r->surloc_num;
                 $res_surloc = pmb_mysql_query($req);
                 if (pmb_mysql_num_rows($res_surloc)) {
                     $surloc = pmb_mysql_fetch_object($res_surloc);
                     $surloc_libelle = $surloc->surloc_libelle . " / ";
                 }
             }
             $line = $bulletin_retard_line;
             $line = str_replace("!!location_libelle!!", $surloc_libelle . $r->location_libelle, $line);
             $line = str_replace("!!date_parution!!", $r->rel_date_parution, $line);
             $line = str_replace("!!libelle_numero!!", $r->rel_libelle_numero, $line);
             $line = str_replace("!!comment_opac!!", $r->rel_comment_opac, $line);
             if ($tr_class == 'even') {
                 $tr_class = "odd";
             } else {
                 $tr_class = 'even';
             }
             $line = str_replace("!!tr_class!!", $tr_class, $line);
             $lines .= $line;
         }
         $tpl = $bulletin_retard_form;
         $tpl = gen_plus("bulletin_retard", $msg["bulletin_retard_title"], str_replace("!!bulletin_retard_list!!", $lines, $tpl));
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:34,代码来源:abts_perio.class.php

示例2: get_documents_form

 public function get_documents_form($selected = array())
 {
     global $msg, $charset;
     $list = "\n\t\t<div class='row'>&nbsp</div>\n\t\t<hr />\n\t\t<script type='text/javascript'>\n\t\t\tfunction document_change_background(id){\n\t\t\t\tvar doc = dojo.byId('document_'+id);\n\t\t\t\tif(doc.className == 'document_item'){\n\t\t\t\t\tdoc.setAttribute('class','document_item document_item_selected');\n\t\t\t\t}else{\n\t\t\t\t\tdoc.setAttribute('class','document_item');\n\t\t\t\t}\n\t\t\t}\n\t\t</script>\n\t\t<h3>" . htmlentities($msg['cms_documents_add']) . "</h3>";
     foreach ($this->collections as $collection) {
         $coll_form = "<div class='row'>&nbsp;</div>";
         $coll_form = $collection->get_documents_form($selected);
         $coll_form .= "<div class='row'>&nbsp;</div>";
         $list .= gen_plus('collection' . $collection->id, $collection->title . " (" . $collection->nb_doc . " " . $msg['cms_document'] . ")", $coll_form);
     }
     return $list;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:12,代码来源:cms_collections.class.php

示例3: get_documents_form

 public function get_documents_form($selected = array())
 {
     global $msg, $charset;
     $list = "\n\t\t<div class='row'>&nbsp</div>\n\t\t<hr />\n\t\t<script type='text/javascript'>\n\t\t\tfunction document_change_background(id){\n\t\t\t\tvar doc = dojo.byId('document_'+id);\n\t\t\t\tif(doc.className == 'document_item'){\n\t\t\t\t\tdoc.setAttribute('class','document_item document_item_selected');\n\t\t\t\t}else{\n\t\t\t\t\tdoc.setAttribute('class','document_item');\n\t\t\t\t}\n\t\t\t}\n\t\t\trequire(['dojo/ready', 'dojox/widget/DialogSimple'], function(ready, Dialog) {\n\t\t\t\t\tready(function() {\n\t\t\t\t\t\topenEditDialog = function(id){\n\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\tvar dialog = dijit.byId('dialog_document');\n\t\t\t\t\t\t\t}catch(e){}\n\t\t\t\t\t\t\tif(!dialog){\n\t\t\t\t\t\t\t\tvar dialog = new Dialog({title:'',id:'dialog_document'});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar path ='./ajax.php?module=cms&categ=documents&caller=editorial_form&action=get_form&id='+id;\n\t\t\t\t\t\t\tdialog.attr('href', path);\n\t\t\t\t\t\t\tdialog.startup();\n\t\t\t\t\t\t\tdialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t<h3>" . htmlentities($msg['cms_documents_add']) . "</h3>";
     foreach ($this->collections as $collection) {
         $coll_form = "<div class='row'>&nbsp;</div>";
         $coll_form = $collection->get_documents_form($selected);
         $coll_form .= "<div class='row'>&nbsp;</div>";
         $list .= gen_plus('collection' . $collection->id, $collection->title . " (" . $collection->nb_doc . " " . $msg['cms_document'] . ")", $coll_form);
     }
     return $list;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:12,代码来源:cms_collections.class.php

示例4: show_infopages

function show_infopages($dbh)
{
    global $msg, $charset, $opac_url_base, $PMBuserid;
    print "<script src='./javascript/classementGen.js' type='text/javascript'></script>";
    print "<div class='hmenu'>\n\t\t\t\t\t<span><a href='admin.php?categ=infopages&sub2=classementGen'>" . $msg["classementGen_list_libelle"] . "</a></span>\n\t\t\t\t</div><hr>";
    print "<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a></div>";
    $requete = "select id_infopage, title_infopage, content_infopage, valid_infopage, infopage_classement from infopages order by valid_infopage DESC, title_infopage ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    $arrayRows = array();
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_object($res);
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $baselink = "./admin.php?categ=infopages";
        $classementRow = $row->infopage_classement;
        if (!trim($classementRow)) {
            $classementRow = classementGen::getDefaultLibelle();
        }
        $tr_javascript = "class='{$pair_impair}' style='cursor: pointer' onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
        $td_javascript = "onmousedown=\"document.location='./admin.php?categ=infopages&sub=infopages&action=modif&id={$row->id_infopage}';\" ";
        $rowPrint = "<tr {$tr_javascript}>";
        $rowPrint .= "<td {$td_javascript} align='right'><b>" . $row->id_infopage . "</b></td>";
        if ($row->valid_infopage) {
            $visible = "X";
        } else {
            $visible = "&nbsp;";
        }
        $rowPrint .= "<td {$td_javascript} align='center' class='erreur'>{$visible}</td>";
        $rowPrint .= "<td {$td_javascript}>" . htmlentities($row->title_infopage, ENT_QUOTES, $charset) . "</td>";
        $rowPrint .= "<td><a href=\"" . $opac_url_base . "index.php?lvl=infopages&pagesid=" . $row->id_infopage . "\" target=_blank>" . htmlentities($opac_url_base . "index.php?lvl=infopages&pagesid=" . $row->id_infopage, ENT_QUOTES, $charset) . "</a></td>";
        $classementGen = new classementGen('infopages', $row->id_infopage);
        $rowPrint .= "<td>" . $classementGen->show_selector($baselink, $PMBuserid) . "</td>";
        $rowPrint .= "</tr>";
        $arrayRows[$classementRow]["title"] = stripslashes($classementRow);
        $arrayRows[$classementRow]["infopage_list"] .= $rowPrint;
    }
    //on trie
    ksort($arrayRows);
    //on remplace les clés à cause des accents
    $arrayRows = array_values($arrayRows);
    foreach ($arrayRows as $key => $type) {
        print gen_plus($key, $type["title"], "<table><tr><th width='3%'>" . $msg['infopages_id_infopage'] . "</th><th width='3%'>" . $msg['infopage_valid_infopage'] . "</th><th>" . $msg['infopage_title_infopage'] . "</th><th>" . $msg['infopage_lien_direct'] . "</th><th width='3%'>&nbsp;</th></tr>" . $type["infopage_list"] . "</table>", 1);
    }
    print "\t<input class='bouton' type='button' value=\" " . $msg['infopages_bt_ajout'] . " \" onClick=\"document.location='./admin.php?categ=infopages&sub=infopages&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:51,代码来源:infopages.inc.php

示例5: 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 = mysql_query($requete, $dbh);
    $nbr = mysql_num_rows($res);
    $class_prec = $msg[proc_clas_aucun];
    $buf_tit = "";
    $buf_class = 0;
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = 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:bouchra012,项目名称:PMB,代码行数:45,代码来源:procs.inc.php

示例6: get_form

 public function get_form()
 {
     $form = parent::get_form();
     $metadatas_list = $this->get_metas_list();
     $form .= "<div class='row'>\n\t\t\t\t\t\t<label for='cms_module_metadatas_datasource_metadatas_generic_def_metadatas'>" . $this->format_text($this->msg['cms_module_metadatas_datasource_metadatas_generic_def_metadatas']) . "</label>\n\t\t\t\t</div>";
     $metadatas_format_form = "";
     foreach ($metadatas_list as $key_metadata_list => $metadata_list) {
         $metadata_format_form = "";
         foreach ($metadata_list["items"] as $key => $metadata) {
             if (!isset($this->parameters[$this->get_form_value_name($key_metadata_list . "_" . $key)])) {
                 $active_template_content = $metadata["default_template"];
             } else {
                 $active_template_content = $this->parameters[$this->get_form_value_name($key_metadata_list . "_" . $key)];
             }
             $metadata_format_form .= "<div class='row'>\n\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t<label for='" . $this->get_form_value_name($key_metadata_list . "_" . $key) . "' title='" . $this->format_text($metadata["desc"]) . "'>" . $metadata["label"] . " (" . $metadata_list["prefix"] . $metadata_list["separator"] . $key . ")</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='right'>\n\t\t\t\t\t\t<textarea name='" . $this->get_form_value_name($key_metadata_list . "_" . $key) . "' id='" . $this->get_form_value_name($key_metadata_list . "_" . $key) . "'>" . $this->format_text($active_template_content) . "</textarea>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
         }
         $metadatas_format_form .= gen_plus("metadatas_parameters_" . $key_metadata_list, $this->format_text($metadata_list["name"]), $metadata_format_form, false);
     }
     $form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='cms_module_metadatas_datasource_metadatas_generic_django_template_content'>" . $this->format_text($this->msg['cms_module_metadatas_datasource_metadatas_generic_django_template_content']) . "</label>\n\t\t\t\t" . $this->get_format_data_structure_tree("") . "\n\t\t\t</div>\n\t\t\t<div class='left'>\n\t\t\t\t" . $metadatas_format_form . "\n\t\t\t</div>\n\t\t</div>";
     return $form;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:21,代码来源:cms_module_metadatas_datasource_metadatas_generic.class.php

示例7: show_state_list

function show_state_list()
{
    global $msg, $charset, $javascript_path;
    $query = "select id_editions_state, editions_state_name, editions_state_comment, libproc_classement, editions_state_num_classement from editions_states left join procs_classements on editions_state_num_classement = idproc_classement order by libproc_classement,editions_state_name asc";
    $result = mysql_query($query);
    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";
    if (mysql_num_rows($result)) {
        $class_prec = $msg['proc_clas_aucun'];
        $buf_tit = $msg['proc_clas_aucun'];
        $buf_class = 0;
        $parity = 1;
        while ($row = mysql_fetch_object($result)) {
            if (!$row->libproc_classement) {
                $row->libproc_classement = $msg['proc_clas_aucun'];
            }
            //Pour les états qui ne sont pas dans un classement
            if ($class_prec != $row->libproc_classement) {
                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->libproc_classement;
                $buf_class = $row->editions_state_num_classement;
                $class_prec = $row->libproc_classement;
            }
            if ($parity % 2) {
                $pair_impair = "even";
            } else {
                $pair_impair = "odd";
            }
            $parity++;
            $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
            $buf_contenu .= "\n<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td width='10'><input type='button' class='bouton' onclick=\"document.location='./edit.php?categ=state&action=show&sub=tab&id=" . $row->id_editions_state . "';\" value='" . $msg['708'] . "'/></td>\n\t\t\t\t\t<td onmousedown=\"document.location='./edit.php?categ=state&action=edit&id=" . $row->id_editions_state . "';\" ><strong>" . htmlentities($row->editions_state_name, ENT_QUOTES, $charset) . "</strong><br />\n\t\t\t\t\t\t<small>" . htmlentities($row->editions_state_comment, ENT_QUOTES, $charset) . "</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);
    }
    print "\n\t\t<div class='row'>\n\t\t\t<input type='button' class='bouton' value='" . $msg['editions_state_add'] . "' onclick=\"document.location='./edit.php?categ=state&action=edit&id=0';\" />\n\t\t</div>";
}
开发者ID:bouchra012,项目名称:PMB,代码行数:40,代码来源:main.inc.php

示例8: show_form_sug


//.........这里部分代码省略.........
                        $premier_user = $lib_orig;
                    } else {
                        $list_user .= $lib_orig . "<br />";
                    }
                    break;
                case '2':
                    if ($orig) {
                        $lib_orig = $orig;
                    } else {
                        $lib_orig = $msg['suggest_anonyme'];
                    }
                    if (empty($premier_user) || !isset($premier_user)) {
                        $premier_user = $lib_orig;
                    } else {
                        $list_user .= $lib_orig . "<br />";
                    }
                    break;
            }
        }
        //Récupération du statut de la suggestion
        $lib_statut = $sug_map->getHtmlComment($sug->statut);
        $form = str_replace('!!dat_cre!!', formatdate($sug->date_creation), $form);
        $form = str_replace('!!orig!!', $orig, $form);
        //Ajout du champ de saisie du nouveau créateur
        $ajout_create = "<input id='creator_orig_id' type='hidden' name='creator_orig_id'>\n\t\t<input type='text' id='creator_lib_orig' name='creator_lib_orig' class='saisie-10emr'/>\n\t\t<input type='button' class='bouton_small' value='...' onclick=\"openPopUp('./select.php?what=origine&caller=sug_modif_form&param1=creator_orig_id&param2=creator_lib_orig&param3=typ&param4=&param5=&param6=&deb_rech=', 'select_creator_orig', 400, 400, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" />";
        if (sizeof($users) > 1) {
            //on ajoute le champ à la liste
            $list_user .= $ajout_create;
            $form = str_replace('!!creator_ajout!!', '', $form);
        } else {
            $form = str_replace('!!creator_ajout!!', "<br />" . $ajout_create, $form);
        }
        //Menu dépliant
        $deroul_user = gen_plus('ori', $msg['suggest_creator'] . " (" . (sizeof($users) - 1) . ")", $list_user, 0);
        if ($lib_orig) {
            $form = str_replace('!!lib_orig!!', htmlentities($premier_user, ENT_QUOTES, $charset), $form);
            if (sizeof($users) > 1) {
                $form = str_replace('!!list_user!!', $deroul_user, $form);
            } else {
                $form = str_replace('!!list_user!!', '', $form);
            }
        } else {
            $form = str_replace('!!lib_orig!!', '&nbsp;', $form);
            $form = str_replace('!!list_user!!', '', $form);
        }
        $form = str_replace('!!typ!!', $typ, $form);
        $form = str_replace('!!poi!!', $poids, $form);
        $form = str_replace('!!poi_tot!!', $poids_tot, $form);
        $form = str_replace('!!statut!!', $sug->statut, $form);
        $form = str_replace('!!lib_statut!!', $lib_statut, $form);
        if ($acquisition_sugg_categ != '1') {
            $sel_categ = "";
        } else {
            $state_name = $sug_map->getStateNameFromId($sug->statut);
            $categ = $sug_map->getState_CATEG($state_name);
            $sugg_categ = new suggestions_categ($sug->num_categ);
            if ($categ == 'YES') {
                $tab_categ = suggestions_categ::getCategList();
                $sel_categ = "<select class='saisie-25em' id='num_categ' name='num_categ'>";
                foreach ($tab_categ as $id_categ => $lib_categ) {
                    $sel_categ .= "<option value='" . $id_categ . "' ";
                    if ($id_categ == $sug->num_categ) {
                        $sel_categ .= "selected='selected' ";
                    }
                    $sel_categ .= ">";
                    $sel_categ .= htmlentities($lib_categ, ENT_QUOTES, $charset) . "</option>";
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:67,代码来源:suggestions_display_genes.inc.php

示例9: getChilds

 function getChilds($id_note)
 {
     global $dbh, $charset, $msg;
     $req = "select id_note, CONCAT(SUBSTRING(contenu,1,50),'','...') as titre, contenu, date_note, prive, rapport, notes_num_user,notes_type_user \n\t\tfrom demandes_notes where num_note_parent='" . $id_note . "' and num_action='" . $this->num_action . "' order by date_note desc, id_note desc";
     $res = pmb_mysql_query($req, $dbh);
     $display = "";
     if (pmb_mysql_num_rows($res)) {
         while ($fille = pmb_mysql_fetch_object($res)) {
             $createur = $this->getCreateur($fille->notes_num_user, $fille->notes_type_user);
             $contenu = "\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t\t<input type='image' src='./images/email_go.png' alt='" . htmlentities($msg['demandes_note_reply_icon'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_reply_icon'], ENT_QUOTES, $charset) . "' \n\t\t\t\t\t\t\t\t\t\tonclick='document.forms[\"modif_notes\"].act.value=\"reponse\";document.forms[\"modif_notes\"].idnote.value=\"{$fille->id_note}\";' />\n\t\t\t\t\t\t\t<input type='image' src='./images/b_edit.png' alt='" . htmlentities($msg['demandes_note_modif_icon'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_modif_icon'], ENT_QUOTES, $charset) . "' \n\t\t\t\t\t\t\t\t\t\tonclick='document.forms[\"modif_notes\"].act.value=\"modif_note\";document.forms[\"modif_notes\"].idnote.value=\"{$fille->id_note}\";' />\n\t\t\t\t\t\t\t<input type='image' src='./images/cross.png' alt='" . htmlentities($msg['demandes_note_suppression'], ENT_QUOTES, $charset) . "' title='" . htmlentities($msg['demandes_note_suppression'], ENT_QUOTES, $charset) . "' \n\t\t\t\t\t\t\t\t\t\tonclick='document.forms[\"modif_notes\"].act.value=\"suppr_note\";document.forms[\"modif_notes\"].idnote.value=\"{$fille->id_note}\";' />\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette'>" . $msg['demandes_note_privacy'] . " : </label>&nbsp;\n\t\t\t\t\t\t" . ($fille->prive ? $msg['40'] : $msg['39']) . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette'>" . $msg['demandes_note_rapport'] . " : </label>&nbsp;\n\t\t\t\t\t\t" . ($fille->rapport ? $msg['40'] : $msg['39']) . "\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<label class='etiquette'>" . $msg['demandes_note_contenu'] . " : </label>&nbsp;\n\t\t\t\t\t\t" . nl2br(htmlentities($fille->contenu, ENT_QUOTES, $charset)) . "\n\t\t\t\t\t</div>\n\t\t\t\t";
             $contenu .= $this->getChilds($fille->id_note);
             if (strlen($fille->titre) < 50) {
                 $fille->titre = str_replace('...', '', $fille->titre);
             }
             $display .= "<span style='margin-left:20px'>" . gen_plus("note_" . $fille->id_note, "[" . formatdate($fille->date_note) . "] " . $fille->titre . ($createur ? " <i>" . sprintf($msg['demandes_action_by'], $createur . "</i>") : ""), $contenu) . "</span>";
         }
     }
     return $display;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:19,代码来源:demandes_notes.class.php

示例10: get_config_form

 function get_config_form()
 {
     global $charset, $dbh, $pmb_url_base;
     $result = parent::get_config_form();
     //on attributs/initialise certaines valeurs par défaut
     if (!$this->config['activeTabs']) {
         $this->config['activeTabs'] = array();
     }
     if (!$this->config['shelf_nbResultsByPage']) {
         $this->config['shelf_nbResultsByPage'] = 20;
     }
     if (!$this->config['search_nbResultsByPage']) {
         $this->config['search_nbResultsByPage'] = 20;
     }
     if (!$this->config['bulletinsList_nbResultsByPage']) {
         $this->config['bulletinsList_nbResultsByPage'] = 10;
     }
     if (!$this->config['analysisList_nbResultsByPage']) {
         $this->config['analysisList_nbResultsByPage'] = 10;
     }
     //Adresse d'utilisation
     $result .= "<div class=row><label class='etiquette' for='api_exported_functions'>" . $this->msg['mobile_service_endpoint'] . "</label><br />";
     if ($this->id) {
         $result .= "<a target='_blank' href='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "'>" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "</a>";
     } else {
         $result .= $this->msg["mobile_service_endpoint_unrecorded"];
     }
     $result .= "</div>";
     //Connecteur dédié
     $connecteurs = new connecteurs_out();
     foreach ($connecteurs->connectors as $conn) {
         if ($conn->name == 'JSON-RPC') {
             $sources = $conn->sources;
         }
     }
     //on génère l'affichage du sélecteur
     $proxyIsInList = false;
     if (sizeof($sources) == 0) {
         $selectWS = $this->msg['mobile_admin_error_proxy'];
     } else {
         $selectWS = "<select name='proxyUrl'>";
         foreach ($sources as $source) {
             if ($this->config['proxyUrl'] == $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id) {
                 $proxyIsInList = true;
             }
             $selectWS .= "<option value='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id . "'" . ($this->config['proxyUrl'] == $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id ? " selected" : "") . ">" . $source->name . "</option>";
         }
         $selectWS .= "</select>";
     }
     //maintenant l'entrée manuelle...
     $writeWS = "<input type='text' id='proxyUrl' name='proxyUrl' value='" . $this->config['proxyUrl'] . "' />";
     $result .= "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='proxyUrl'>" . $this->msg['mobile_admin_proxyUrl'] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_pickWSInList_yes'] . "\n\t\t\t&nbsp;<input type='radio' name='pickWSInList' value='yes' " . ($proxyIsInList == true ? "checked='checked'" : "") . " onchange='switchWSMethod();'/>\n\t\t\t&nbsp;" . $this->msg['mobile_admin_pickWSInList_no'] . "\t\t\t\n\t\t\t&nbsp;<input type='radio' name='pickWSInList' value='no' " . ($proxyIsInList == true ? "" : "checked='checked'") . " onchange='switchWSMethod();' /><br /><br />\n\t\t\t<div id='selectWS'></div>\n\t\t\t";
     $result .= "\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     //Onglets dispo dans l'appli
     $result .= "\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' >" . $this->msg['mobile_admin_tabs_title'] . "</label><br />\n\t\t\t<div class='notice-child'>\n\t\t\t<table class='quadrille'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style='text-align:right;'>" . $this->msg['mobile_admin_form_tabs_label'] . "</th>\n\t\t\t\t\t<th style='text-align:center;' >" . $this->msg['mobile_admin_form_tabs_valid'] . "</th>\n\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['mobile_admin_firstTab'] . "</th>\n\t\t\t\t\t<th style='text-align:left;'>" . $this->msg['mobile_admin_form_tabs_desc'] . "</th>\n\t\t\t\t\t\n\t\t\t\t</tr>";
     $i = 0;
     $first_onglet_check = false;
     foreach ($this->onglets as $onglet => $value) {
         $check_first_onglet = "";
         if ($this->config['firstTab'] && $this->config['activeTabs'][$this->config['firstTab']]) {
             if ($this->config['firstTab'] === $onglet) {
                 $check_first_onglet = " checked ";
                 $first_onglet_check = true;
             }
         } elseif (!$first_onglet_check) {
             $check_first_onglet = " checked ";
         }
         $result .= "\n\t\t\t\t<tr >\n\t\t\t\t\t<td style='text-align:right;'>" . $value['label'] . "</td>\n\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t" . $this->msg['mobile_admin_form_tabs_yes'] . "&nbsp;\n\t\t\t\t\t\t<input type='radio' id='tab_" . $onglet . "_ok' name='{$onglet}' value='1'" . ($this->config['activeTabs'][$onglet] == 1 ? " checked " : " ") . "onchange='checkParam(\"{$onglet}\",false);' />&nbsp;\n\t\t\t\t\t\t" . $this->msg['mobile_admin_form_tabs_no'] . "&nbsp;\n\t\t\t\t\t\t<input type='radio' id='tab_" . $onglet . "_ko' name='{$onglet}' value='0' " . ($this->config['activeTabs'][$onglet] == 0 ? " checked " : " ") . "onchange='checkParam(\"{$onglet}\",false);' />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t<input type='radio' id='firstTab_{$onglet}' name='firstTab' value='{$onglet}' " . $check_first_onglet . "/>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:left;'>" . $value['desc'] . "</td>\n\t\t\t\t</tr>";
         $i++;
     }
     $result .= "\n\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>";
     //param pour l'onglet 'Accueil'
     $form_infoPage = "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='firstInfoPage'>" . $this->msg['mobile_admin_firstInfoPage'] . "</label><br />";
     $requete = "select id_infopage as id, title_infopage as title from infopages where valid_infopage = 1 order by title DESC";
     $res = mysql_query($requete);
     if (mysql_num_rows($res)) {
         $form_infoPage .= "\n\t\t\t<select id ='firstInfoPage' name='firstInfoPage'>";
         while ($infopage = mysql_fetch_object($res)) {
             $form_infoPage .= "\n\t\t\t\t<option value='" . $infopage->id . "'" . ($this->config["firstInfoPage"] == $infopage->id ? " selected" : "") . ">" . $infopage->title . "</option>";
         }
         $form_infoPage .= "\n\t\t\t</select>";
     } else {
         $form_infoPage .= $this->msg['mobile_admin_error_infopage'];
     }
     $form_infoPage .= "\n\t\t</div>\n\t\t<div class='row'>&nbsp;</div>\n\t\t";
     $result .= gen_plus("form_infoPage", $this->msg['mobile_admin_form_infoPagesTitle'], $form_infoPage) . "<div class='row'>&nbsp;</div>";
     //param pour l'onglet 'Etagère coup de coeur'
     $form_shelf .= "\n\t\t<div class='row'>&nbsp;</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='heartShelf'>" . $this->msg['mobile_admin_heatShelf'] . "</label><br />";
     $etageres = etagere::get_etagere_list();
     $etagere_valid = false;
     $select = "\n\t\t\t<select id='heartShelf' name='heartShelf'>";
     foreach ($etageres as $etagere) {
         if ($etagere['validite'] == 1 && $etagere['visible_accueil'] == 1) {
             $select .= "\n\t\t\t\t<option value='" . $etagere['idetagere'] . "'" . ($this->config['heartShelf'] == $etagere['idetagere'] ? " selected" : "") . ">" . $etagere['name'] . "</option>";
             $etagere_valid = true;
         }
     }
     $select .= "\n\t\t\t</select>";
     if ($etagere_valid == true) {
         $form_shelf .= $select;
//.........这里部分代码省略.........
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:mobile.class.php

示例11: source_get_property_form


//.........这里部分代码省略.........
     }
     if (!($z3950_max_notices * 1)) {
         $z3950_max_notices = 100;
     }
     //Liste des transformations possibles avant import
     $this->parse_convert_catalog();
     //Création de la liste des types d'import
     $export_type = "<select name=\"z3950_convert\" id=\"z3950_convert\">\n";
     $export_type .= "<option value=\"0\">" . $this->msg["z3950_no_convert"] . "</option>\n";
     for ($i = 0; $i < count($this->convert_path_order); $i++) {
         $export_type .= "<option value=\"" . $this->convert_path_order[$i]["PATH"] . "\"" . ($z3950_convert == $this->convert_path_order[$i]["PATH"] ? " selected" : "") . ">" . $this->convert_path_order[$i]["NAME"] . "</option>\n";
     }
     $export_type .= "</select>";
     $form = "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='url'>" . $this->msg["z3950_url"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-60em' name='url' id='url' value='" . htmlentities($url, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_base'>" . $this->msg["z3950_port"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-10em' name='z3950_port' id='z3950_port' value='" . htmlentities($z3950_port, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_base'>" . $this->msg["z3950_base"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-30em' name='z3950_base' id='z3950_base' value='" . htmlentities($z3950_base, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_login'>" . $this->msg["z3950_login"] . "</label>&nbsp;\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-20em' name='z3950_login' id='z3950_login' value='" . htmlentities($z3950_login, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_password'>" . $this->msg["z3950_password"] . "</label>&nbsp;\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-20em' name='z3950_password' id='z3950_password' value='" . htmlentities($z3950_password, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_format'>" . $this->msg["z3950_format"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-30em' name='z3950_format' id='z3950_format' value='" . htmlentities($z3950_format, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_max_notices'>" . $this->msg["z3950_max_notices"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' class='saisie-10em' name='z3950_max_notices' id='z3950_max_notices' value='" . htmlentities($z3950_max_notices, ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_convert'>" . $this->msg["z3950_convert"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $export_type . "\n\t\t\t</div>\n\t\t</div>";
     $xsl_exemplaire_input = "";
     if ($xslt_exemplaire) {
         $xsl_exemplaire_input .= '<select name="action_xsl_expl"><option value="keep">' . sprintf($this->msg["z3950_keep_xsl_exemplaire"], $xslt_exemplaire["name"]) . '</option><option value="delete">' . $this->msg["z3950_delete_xsl_exemplaire"] . '</option></select>';
     }
     $xsl_exemplaire_input .= '&nbsp;<input onchange="document.source_form.action_xsl_expl.selectedIndex=1" type="file" name="xsl_exemplaire"/>';
     $form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_profils'>" . $this->msg["z3950_xsl_exemplaire"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $xsl_exemplaire_input . "\n\t\t\t</div>\n\t\t</div>\n\t\t";
     //Lecture des profils
     $this->get_profiles();
     $profils = "<input type='hidden' name='reload' value=''/>\n\t\t\t<select name='z3950_profil' id='z3950_profils'>\n\t\t\t\t<option value=''>Manuel</option>\n\t\t";
     for ($i = 0; $i < count($this->profiles); $i++) {
         $profils .= "<option value='" . $this->profiles[$i]["name"] . "'" . ($z3950_profil == $this->profiles[$i]["name"] ? " selected" : "") . ">" . htmlentities($this->profiles[$i]["comment"], ENT_QUOTES, $charset) . "</option>\n";
     }
     $profils .= "</select><input type='button' value='" . $this->msg["z3950_bib1_calculate"] . "' class='bouton_small' onClick='this.form.reload.value=1; this.form.action=\"" . basename($_SERVER["REQUEST_URI"]) . "\"; this.form.act.value=\"add_source\"; this.form.submit();'/>&nbsp;" . $this->msg["z3950_warning_bib1"] . "\n";
     $form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_profils'>" . $this->msg["z3950_profils"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $profils . "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t";
     $fields = $this->get_unimarc_search_fields();
     //Si c'est un recalcul
     if ($reload) {
         //Recherche du profil
         for ($i = 0; $i < count($this->profiles); $i++) {
             if ($this->profiles[$i]["name"] == $z3950_profil) {
                 $profil = $this->profiles[$i];
                 break;
             }
         }
     }
     $form_bib1 = "<table class='quadrille'><tr><th>Unimarc</th><th>Champ</th><th>Propriétés</th></tr>\n";
     foreach ($fields as $ufield => $values) {
         if ($ufield != "FORBIDDEN") {
             $form_bib1 .= "<tr><td>" . htmlentities(" (" . $ufield . ")", ENT_QUOTES, $charset) . "</td><td>" . nl2br(htmlentities(implode("\n", $values["TITLE"]), ENT_QUOTES, $charset)) . "</td><td>";
             $form_bib1 .= "<table class='quadrille'>\n";
             $form_bib1 .= "<tr><th>Opérateur</th><th>Att. 1 (Use)</th><th>Att. 2 (Relation)</th><th>Att. 3 (Position)</th><th>Att. 4 (Structure)</th><th>Att. 5 (Truncation)</th><th>Att. 6 (Completeness)</th></tr>\n";
             //Calcul du Att1 si reload
             if ($reload) {
                 foreach ($values["OPERATORS"] as $op => $top) {
                     $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_0";
                     global ${$bibli};
                     ${$bibli} = $profil["ufields"][$ufield];
                     if ($profil["operators"][$op]) {
                         $ops = explode(",", $profil["operators"][$op]);
                         for ($i = 0; $i < count($ops); $i++) {
                             $ops_ = explode("=", $ops[$i]);
                             $opst[$ops_[0]] = $ops_[1];
                         }
                         for ($i = 1; $i < 6; $i++) {
                             $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i;
                             global ${$bibli};
                             ${$bibli} = "";
                             if ($opst[$i + 1]) {
                                 ${$bibli} = $opst[$i + 1];
                             }
                         }
                     } else {
                         for ($i = 1; $i < 6; $i++) {
                             $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i;
                             global ${$bibli};
                             ${$bibli} = "";
                         }
                     }
                 }
             } else {
                 if (count($z3950_bib1)) {
                     foreach ($z3950_bib1 as $bib1 => $bib1_value) {
                         global ${$bib1};
                         ${$bib1} = $bib1_value;
                     }
                 }
             }
             foreach ($values["OPERATORS"] as $op => $top) {
                 $form_bib1 .= "<tr><td>" . htmlentities($top ? $top : $op, ENT_QUOTES, $charset) . "</td>";
                 for ($i = 0; $i < 6; $i++) {
                     $bibli = "bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i;
                     global ${$bibli};
                     $form_bib1 .= "<td class='quadrille_sub'><input type='text' name='bib1_" . str_replace("\$", "", $ufield) . "_" . $op . "_" . $i . "' value='" . htmlentities(${$bibli}, ENT_QUOTES, $charset) . "' style='width:4em'/></td>";
                 }
                 $form_bib1 .= "</tr>";
             }
             $form_bib1 .= "</table>\n";
             $form_bib1 .= "</td></tr>\n";
         }
     }
     $form_bib1 .= "</table>\n";
     $form .= "<script src='javascript/tablist.js'></script>\n";
     $form .= gen_plus("bib1", $this->msg["z3950_bib1"], $form_bib1);
     $form .= "\n\t\t</div>\n\t\t<div class='row'></div>";
     return $form;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:z3950.class.php

示例12: pmb_bidi

         $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
         $print_cart[$ctype]["cart_list"] .= pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} ><td><input type='checkbox' id='id_" . $ca->idcaddie . "' name='caddie[" . $ca->idcaddie . "]' value='" . $ca->idcaddie . "' />&nbsp;");
         $link = "print_cart.php?action=print&object_type=" . $object_type . "&idcaddie=" . $ca->idcaddie . "&item={$item}&current_print={$current_print}";
         $print_cart[$ctype]["cart_list"] .= pmb_bidi("<a href='javascript:document.getElementById(\"id_" . $ca->idcaddie . "\").checked=true;document.forms[\"print_options\"].submit();' /><strong>" . $ca->name . "</strong>");
         if ($ca->comment) {
             $print_cart[$ctype]["cart_list"] .= pmb_bidi("<br /><small>(" . $ca->comment . ")</small>");
         }
         $print_cart[$ctype]["cart_list"] .= pmb_bidi("</td>\n            \t<td><b>" . $ca->nb_flags . "</b>" . $msg['caddie_contient_pointes'] . " / <b>{$ca->nb_objects}</b> </td>\n            \t<td>{$aff_lien}</td>\n\t\t\t\t</tr>");
     }
 }
 print "\n\t\t<input type='radio' name='pager' value='1'/>&nbsp;" . $msg["print_size_current_page"] . "<br />\n\t\t<input type='radio' name='pager' value='0' checked='checked' />&nbsp;" . $msg["print_size_all"] . "<br />\t\n\t\t<input type='checkbox' id='include_child' name='include_child' />&nbsp;" . $msg["cart_include_child"];
 print "<hr />";
 print pmb_bidi("<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a>" . $msg['caddie_add_search'] . "</div>");
 if (count($print_cart)) {
     foreach ($print_cart as $key => $cart_type) {
         print gen_plus($key, $cart_type["titre"], "<table border='0' cellspacing='0' width='100%'>" . $cart_type["cart_list"] . "</table>", 1);
     }
 }
 print "<input type='hidden' name='current_print' value='{$current_print}'/>";
 $boutons_select = '';
 if (count($print_cart)) {
     $boutons_select = "<input type='submit' value='" . $msg['print_cart_add'] . "' class='bouton' />";
 }
 $boutons_select .= "&nbsp;<input type='button' value='" . $msg['print_cancel'] . "' class='bouton' onClick='self.close();' />";
 $lien_creation = 1;
 $object_type = "NOTI";
 if ($lien_creation) {
     print "<div class='row'><hr />\n\t\t\t{$boutons_select}&nbsp;<input class='bouton' type='button' value=' " . $msg['new_cart'] . " ' onClick=\"document.location='./cart.php?action=new_cart&object_type=" . $object_type . "&item={$item}&current_print={$current_print}'\" />\n\t\t\t</div>";
 } else {
     print "<div class='row'><hr />\n\t\t\t{$boutons_select}\n\t\t\t</div>";
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:print_cart.php

示例13: aff_paniers


//.........这里部分代码省略.........
        print pmb_bidi("<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a>{$titre}</div>");
        print confirmation_delete("{$lien_origine}&action=del_cart&object_type=" . $object_type . "&item={$item}&idcaddie=");
        while (list($cle, $valeur) = each($liste)) {
            $rqt_autorisation = explode(" ", $valeur['autorisations']);
            if (array_search($PMBuserid, $rqt_autorisation) !== FALSE || $PMBuserid == 1) {
                $aff_lien = str_replace('!!idcaddie!!', $valeur['idcaddie'], $lien_edition_panier_cst);
                if (!$myCart) {
                    $myCart = new caddie(0);
                }
                $myCart->nb_item = $valeur['nb_item'];
                $myCart->nb_item_pointe = $valeur['nb_item_pointe'];
                $myCart->type = $valeur['type'];
                $print_cart[$myCart->type]["titre"] = "<b>" . $msg["caddie_de_" . $myCart->type] . "</b><br />";
                if (!trim($valeur["caddie_classement"])) {
                    $valeur["caddie_classement"] = classementGen::getDefaultLibelle();
                }
                $parity[$myCart->type] = 1 - $parity[$myCart->type];
                if ($parity[$myCart->type]) {
                    $pair_impair = "even";
                } else {
                    $pair_impair = "odd";
                }
                $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
                if ($item && $action != "save_cart") {
                    $rowPrint = pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} ><td class='classement60'>" . (!$nocheck ? "<input type='checkbox' id='id_" . $valeur['idcaddie'] . "' name='caddie[" . $valeur['idcaddie'] . "]' value='" . $valeur['idcaddie'] . "'>" : "") . "&nbsp;");
                    $link = "{$lien_origine}&action={$action_click}&object_type=" . $object_type . "&idcaddie=" . $valeur['idcaddie'] . "&item={$item}";
                    if (!$nocheck) {
                        $rowPrint .= pmb_bidi("<a href='#' onclick='javascript:document.getElementById(\"id_" . $valeur['idcaddie'] . "\").checked=true;document.forms[\"print_options\"].submit();' /><strong>" . $valeur['name'] . "</strong>");
                    } else {
                        if ($lien_pointage) {
                            $rowPrint .= pmb_bidi("<a href='#' onclick='javascript:document.getElementById(\"idcaddie\").value=" . $item . ";document.getElementById(\"idcaddie_selected\").value=" . $valeur['idcaddie'] . ";document.forms[\"print_options\"].submit();' /><strong>" . $valeur['name'] . "</strong>");
                        } else {
                            $rowPrint .= pmb_bidi("<a href='#' onclick='javascript:document.getElementById(\"idcaddie\").value=" . $valeur['idcaddie'] . ";document.forms[\"print_options\"].submit();' /><strong>" . $valeur['name'] . "</strong>");
                        }
                    }
                    if ($valeur['comment']) {
                        $rowPrint .= pmb_bidi("<br /><small>(" . $valeur['comment'] . ")</small>");
                    }
                    $rowPrint .= pmb_bidi("</td>\n\t            \t\t" . aff_cart_nb_items_reduit($myCart) . "\n\t            \t\t<td class='classement20'>{$aff_lien}</td>\n\t\t\t\t\t\t</tr>");
                } else {
                    $link = "{$lien_origine}&action={$action_click}&object_type=" . $object_type . "&idcaddie=" . $valeur['idcaddie'] . "&item={$item}";
                    $rowPrint = pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} >");
                    $rowPrint .= pmb_bidi("<td class='classement60'><a href='{$link}' /><strong>" . $valeur['name'] . "</strong>");
                    if ($valeur['comment']) {
                        $rowPrint .= pmb_bidi("<br /><small>(" . $valeur['comment'] . ")</small>");
                    }
                    $rowPrint .= pmb_bidi("</a></td>");
                    $rowPrint .= pmb_bidi(aff_cart_nb_items_reduit($myCart));
                    if ($lien_creation) {
                        $classementGen = new classementGen('caddie', $valeur['idcaddie']);
                        $rowPrint .= pmb_bidi("<td class='classement15'>" . $aff_lien . "&nbsp;" . caddie::show_actions($valeur['idcaddie'], $valeur['type']) . "</td>");
                        $rowPrint .= pmb_bidi("<td class='classement5'>" . $classementGen->show_selector($baselink, $PMBuserid) . "</td>");
                    } else {
                        $rowPrint .= pmb_bidi("<td class='classement20'>{$aff_lien}</td>");
                    }
                    $rowPrint .= pmb_bidi("</tr>");
                }
                $print_cart[$myCart->type]["classement_list"][$valeur["caddie_classement"]]["titre"] = stripslashes($valeur["caddie_classement"]);
                $print_cart[$myCart->type]["classement_list"][$valeur["caddie_classement"]]["cart_list"] .= $rowPrint;
            }
        }
        if ($lien_creation) {
            print "<script src='./javascript/classementGen.js' type='text/javascript'></script>";
        }
        //Tri des classements
        foreach ($print_cart as $key => $cart_type) {
            ksort($print_cart[$key]["classement_list"]);
        }
        // affichage des paniers par type
        foreach ($print_cart as $key => $cart_type) {
            //on remplace les clés à cause des accents
            $cart_type["classement_list"] = array_values($cart_type["classement_list"]);
            $contenu = "";
            foreach ($cart_type["classement_list"] as $keyBis => $cart_typeBis) {
                $contenu .= gen_plus($key . $keyBis, $cart_typeBis["titre"], "<table border='0' cellspacing='0' width='100%' class='classementGen_tableau'>" . $cart_typeBis["cart_list"] . "</table>", 1);
            }
            print gen_plus($key, $cart_type["titre"], $contenu, 1);
        }
    } else {
        print $msg[398];
    }
    if (!$nocheck) {
        if ($item && $action != "save_cart") {
            $boutons_select = "<input type='submit' value='" . $msg["print_cart_add"] . "' class='bouton'/>&nbsp;<input type='button' value='" . $msg["print_cancel"] . "' class='bouton' onClick='self.close();'/>&nbsp;";
        }
        if ($lien_creation) {
            print "<div class='row'><hr />\n\t\t\t\t{$boutons_select}<input class='bouton' type='button' value=' {$msg['new_cart']} ' onClick=\"document.location='{$lien_origine}&action=new_cart&object_type=" . $object_type . "&item={$item}'\" />\n\t\t\t\t</div>";
        } else {
            print "<div class='row'><hr />\n\t\t\t\t{$boutons_select}\n\t\t\t\t</div>";
        }
    } else {
        if ($lien_creation) {
            print "<div class='row'><hr />\n\t\t\t{$boutons_select}<input class='bouton' type='button' value=' {$msg['new_cart']} ' onClick=\"document.location='{$lien_origine}&action=new_cart&object_type=" . $object_type . "&item={$item}'\" />\n\t\t\t</div>";
        }
    }
    //if(($item)&&(!$nocheck)) print"</form>";
    if ($item) {
        print "</form>";
    }
}
开发者ID:hogsim,项目名称:PMB,代码行数:101,代码来源:cart.inc.php

示例14: avis_notice


//.........这里部分代码省略.........
                    if ($acces_m != 0) {
                        $rqt = "update avis set valide=0 where id_avis='" . $valid_id_avis[$i] . "' ";
                        pmb_mysql_query($rqt, $dbh);
                    }
                }
                break;
            case 'supprimer':
                for ($i = 0; $i < sizeof($valid_id_avis); $i++) {
                    $acces_m = 1;
                    if ($acces_jm) {
                        $q = "select count(1) from avis {$acces_jm} where id_avis=" . $valid_id_avis[$i];
                        $r = pmb_mysql_query($q, $dbh);
                        if (pmb_mysql_result($r, 0, 0) == 0) {
                            $acces_m = 0;
                        }
                    }
                    if ($acces_m != 0) {
                        $rqt = "delete from avis where id_avis='" . $valid_id_avis[$i] . "' ";
                        pmb_mysql_query($rqt, $dbh);
                    }
                }
                break;
            case 'ajouter':
                global $avis_note, $avis_sujet, $avis_commentaire;
                if (!$avis_note) {
                    $avis_note = "NULL";
                }
                if ($charset != "utf-8") {
                    $avis_commentaire = cp1252Toiso88591($avis_commentaire);
                }
                $sql = "insert into avis (num_empr,num_notice,note,sujet,commentaire) values ('0','{$id}','{$avis_note}','{$avis_sujet}','" . $avis_commentaire . "')";
                pmb_mysql_query($sql, $dbh);
                break;
            default:
                break;
        }
    }
    $aff = "";
    $req_avis = "select id_avis,note,sujet,commentaire,DATE_FORMAT(dateajout,'" . $msg['format_date'] . "') as ladate,empr_login,empr_nom, empr_prenom, valide\n\t\tfrom avis left join empr on id_empr=num_empr where num_notice='" . $id . "' order by avis_rank, dateajout desc";
    $r = pmb_mysql_query($req_avis, $dbh);
    $nb_avis = 0;
    $nb_avis = pmb_mysql_num_rows($r);
    $aff = "\n\t\t\t<script type='text/javascript' src='javascript/tablist.js'></script>\n\t\t\t<script type=\"text/javascript\" src='./javascript/dyn_form.js'></script>\n\t\t\t<script type=\"text/javascript\" src='./javascript/http_request.js'></script>\n\t\t\t<script type='text/javascript' src='./javascript/bbcode.js'></script>\n\t\t\t<script type='text/javascript' src='./javascript/avis_drop.js'></script>\n\n\t\t\t<script type='text/javascript'>\n\t\t\t\tfunction setCheckboxes(the_form, the_objet, do_check) {\n\t\t\t\t\tvar elts = document.forms[the_form].elements[the_objet+'[]'] ;\n\t\t\t\t\tvar elts_cnt  = (typeof(elts.length) != 'undefined')\n\t\t\t                  ? elts.length\n\t\t\t                  : 0;\n\t\t\t\t\tif (elts_cnt) {\n\t\t\t\t\t\tfor (var i = 0; i < elts_cnt; i++) {\n\t\t\t\t\t\t\telts[i].checked = do_check;\n\t\t\t\t\t\t\t} // end for\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telts.checked = do_check;\n\t\t\t\t\t\t\t} // end if... else\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t</script>\n\n\t\t\t<form class='form-catalog' method='post' id='validation_avis_{$id}' name='validation_avis_{$id}' >\n\t\t";
    $i = 0;
    while ($loc = pmb_mysql_fetch_object($r)) {
        if ($pmb_javascript_office_editor) {
            $office_editor_cmd = " if (typeof(tinyMCE) != 'undefined') tinyMCE.execCommand('mceAddControl', true, 'avis_desc_" . $loc->id_avis . "');\t ";
        }
        $avis_notice = "\n\t\t\t\t<div id='avis_{$loc->id_avis}' onclick=\" make_form('" . $loc->id_avis . "');{$office_editor_cmd}\">\n\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t<input type='checkbox' name='valid_id_avis[]' id='valid_id_avis[]' value='{$loc->id_avis}' onClick=\"stop_evenement(event);\" />";
        if ($pmb_avis_note_display_mode) {
            if ($pmb_avis_note_display_mode != 1) {
                $categ_avis = $msg['avis_detail_note_' . $loc->note];
            }
            if ($pmb_avis_note_display_mode != 2) {
                $etoiles = "";
                $cpt_star = 4;
                for ($i = 1; $i <= $loc->note; $i++) {
                    $etoiles .= "<img border=0 src='images/star.png' align='absmiddle' />";
                }
                for ($j = round($loc->note); $j <= $cpt_star; $j++) {
                    $etoiles .= "<img border=0 src='images/star_unlight.png' align='absmiddle' />";
                }
            }
            if ($pmb_avis_note_display_mode == 3 || $pmb_avis_note_display_mode == 5) {
                $note = $etoiles . "<br />" . $categ_avis;
            } else {
                if ($pmb_avis_note_display_mode == 4) {
                    $note = $etoiles;
                } else {
                    $note = $etoiles . $categ_avis;
                }
            }
        } else {
            $note = "";
        }
        if (!$loc->valide) {
            $avis_notice .= "<font color='#CC0000'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $avis_notice .= "<font color='#00BB00'><span >{$note}<b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $avis_notice .= ", " . $loc->ladate . "  {$loc->empr_prenom} {$loc->empr_nom}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id='update_{$loc->id_avis}'></div>\n\t\t\t\t<br />\n\t\t\t";
        //Drag pour tri
        $id_elt = $loc->id_avis;
        $drag_avis = "<div id=\"drag_" . $id_elt . "\" handler=\"handle_" . $id_elt . "\" dragtype='avisdrop' draggable='yes' recepttype='avisdrop' id_avis='{$id_elt}'\n\t\t\t\trecept='yes' dragicon=\"" . $base_path . "/images/icone_drag_notice.png\" dragtext='" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "' downlight=\"avis_downlight\" highlight=\"avis_highlight\"\n\t\t\t\torder='{$i}' style='' >\n\n\t\t\t\t<span id=\"handle_" . $id_elt . "\" style=\"float:left; padding-right : 7px\"><img src=\"" . $base_path . "/images/sort.png\" style='width:12px; vertical-align:middle' /></span>";
        $aff .= $drag_avis . $avis_notice . "</div>";
        $i++;
    }
    $avis_tpl_form = $avis_tpl_form1;
    $avis_tpl_form = str_replace("!!notice_id!!", $id, $avis_tpl_form);
    $add_avis_onclick = "show_add_avis(" . $id . ");";
    $aff .= "\t{$avis_tpl_form}\n\t\t\t\t<div class='row'>\n\t\t\t\t\t<div class='left'>\n\t\t\t\t\t\t<input type='hidden' name='avis_quoifaire' value='' />\n\t\t\t\t\t\t<input type='button' class='bouton' name='selectionner' value='" . $msg[avis_bt_selectionner] . "' onClick=\"setCheckboxes('validation_avis_{$id}', 'valid_id_avis', true); return false;\" />&nbsp;\n\t\t\t\t\t\t<input type='button' class='bouton' name='valider' value='" . $msg[avis_bt_valider] . "' onclick='this.form.avis_quoifaire.value=\"valider\"; this.form.submit()' />&nbsp;\n\t\t\t\t\t\t<input type='button' class='bouton' name='invalider' value='" . $msg[avis_bt_invalider] . "' onclick='this.form.avis_quoifaire.value=\"invalider\"; this.form.submit()' />&nbsp;\n\t\t\t\t\t\t<input type='button' class='bouton' name='ajouter' value='" . $msg[avis_bt_ajouter] . "' onclick='{$add_avis_onclick}' />&nbsp;\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='right'>\n\t\t\t\t\t\t<input type='button' class='bouton' name='supprimer' value='" . $msg[avis_bt_supprimer] . "' onclick='this.form.avis_quoifaire.value=\"supprimer\"; this.form.submit()' />&nbsp;\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='row'></div>\n\t\t\t</form>\n\n\t\t\t\t";
    if ($avis_quoifaire) {
        $deplier = 1;
    }
    $aff = gen_plus("plus_avis_notice_" . $id, $msg["avis_notice_titre"] . " ({$nb_avis})", $aff, $deplier, '', "recalc_recept();");
    return $aff;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:avis_notice.inc.php

示例15: aff_etagere

function aff_etagere($action, $bouton_ajout = 1)
{
    global $msg;
    global $PMBuserid;
    global $charset, $opac_url_base;
    $liste = etagere::get_etagere_list();
    if (sizeof($liste)) {
        if ($action == "edit_etagere") {
            print "<script src='./javascript/classementGen.js' type='text/javascript'></script>";
            print "<div class='hmenu'>\n\t\t\t\t\t<span><a href='catalog.php?categ=etagere&sub=classementGen'>" . $msg["classementGen_list_libelle"] . "</a></span>\n\t\t\t\t</div><hr>";
            if ($bouton_ajout) {
                print "<div class='row'>\n\t\t\t\t<input class='bouton' type='button' value=' " . $msg["etagere_new_etagere"] . " ' onClick=\"document.location='./catalog.php?categ=etagere&sub=gestion&action=new_etagere'\" />\n\t\t\t\t</div><br>";
            }
        }
        print pmb_bidi("<div class='row'><a href='javascript:expandAll()'><img src='./images/expand_all.gif' id='expandall' border='0'></a>\n\t\t\t<a href='javascript:collapseAll()'><img src='./images/collapse_all.gif' id='collapseall' border='0'></a></div>");
        $parity = 1;
        $arrayRows = array();
        while (list($cle, $valeur) = each($liste)) {
            $rqt_autorisation = explode(" ", $valeur['autorisations']);
            if (array_search($PMBuserid, $rqt_autorisation) !== FALSE || $PMBuserid == 1) {
                $classementRow = $valeur['etagere_classement'];
                if (!trim($classementRow)) {
                    $classementRow = classementGen::getDefaultLibelle();
                }
                $baselink = "./catalog.php?categ=etagere";
                $link = $baselink . "&sub={$action}&action=edit_etagere&idetagere=" . $valeur['idetagere'];
                if ($parity % 2) {
                    $pair_impair = "even";
                } else {
                    $pair_impair = "odd";
                }
                $parity += 1;
                $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
                $td_javascript_click = " onmousedown=\"document.location='{$link}';\" ";
                $rowPrint = pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} >");
                $rowPrint .= pmb_bidi("<td {$td_javascript_click} style='cursor: pointer'><strong>" . $valeur['name'] . "</strong>" . ($valeur['comment'] ? " (" . $valeur['comment'] . ")" : "") . "</td>");
                $rowPrint .= pmb_bidi("<td {$td_javascript_click} style='cursor: pointer'>" . $valeur['nb_paniers'] . "</td>");
                $rowPrint .= pmb_bidi("<td {$td_javascript_click} style='cursor: pointer'>" . ($valeur['validite'] ? $msg['etagere_visible_date_all'] : $msg['etagere_visible_date_du'] . " " . $valeur['validite_date_deb_f'] . " " . $msg['etagere_visible_date_fin'] . " " . $valeur['validite_date_fin_f']) . "</td>");
                $rowPrint .= pmb_bidi("<td>" . ($valeur['visible_accueil'] ? "X" : "") . "<br /><a href='" . $opac_url_base . "index.php?lvl=etagere_see&id=" . $valeur['idetagere'] . "' target=_blank>" . $opac_url_base . "index.php?lvl=etagere_see&id=" . $valeur['idetagere'] . "</a></td>");
                if ($action == "edit_etagere") {
                    $classementGen = new classementGen('etagere', $valeur['idetagere']);
                    $rowPrint .= pmb_bidi("<td>" . $classementGen->show_selector($baselink, $PMBuserid) . "</td>");
                }
                $rowPrint .= pmb_bidi("</tr>");
                $arrayRows[$classementRow]["title"] = stripslashes($classementRow);
                $arrayRows[$classementRow]["etagere_list"] .= $rowPrint;
            }
        }
        //on trie
        ksort($arrayRows);
        //on remplace les clés à cause des accents
        $arrayRows = array_values($arrayRows);
        foreach ($arrayRows as $key => $type) {
            if ($action == "edit_etagere") {
                print gen_plus($key, $type["title"], "<table class='classementGen_tableau'><tr><th class='classement40'>" . $msg['etagere_name'] . "</th><th class='classement10'>" . $msg["etagere_cart_count"] . "</th><th class='classement10'>" . $msg['etagere_visible_date'] . "</th><th class='classement35'>" . $msg['etagere_visible_accueil'] . "</th><th class='classement5'>&nbsp;</th></tr>" . $type["etagere_list"] . "</table>", 1);
            } else {
                print gen_plus($key, $type["title"], "<table class='classementGen_tableau'><tr><th class='classement40'>" . $msg['etagere_name'] . "</th><th class='classement10'>" . $msg["etagere_cart_count"] . "</th><th class='classement10'>" . $msg['etagere_visible_date'] . "</th><th class='classement40'>" . $msg['etagere_visible_accueil'] . "</th></tr>" . $type["etagere_list"] . "</table>", 1);
            }
        }
    } else {
        print $msg['etagere_no_etagere'];
    }
    if ($bouton_ajout) {
        print "<div class='row'>\n\t<input class='bouton' type='button' value=' " . $msg["etagere_new_etagere"] . " ' onClick=\"document.location='./catalog.php?categ=etagere&sub=gestion&action=new_etagere'\" />\n\t</div>";
    }
}
开发者ID:hogsim,项目名称:PMB,代码行数:66,代码来源:etagere.inc.php


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