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


PHP formatdate函数代码示例

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


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

示例1: affichage_liste_bulletins_tableau

function affichage_liste_bulletins_tableau($res)
{
    global $charset, $msg;
    print "<table cellpadding='2' class='exemplaires' width='100%'><tr><th><b>" . $msg[bull_numero] . "</b></th><th><b>" . $msg[bull_mention_date] . "</b></th><th><b>" . $msg['etat_collection_title'] . "</b></th></tr>";
    $odd_even = 1;
    while ($tableau = mysql_fetch_array($res)) {
        if ($odd_even == 0) {
            $pair_impair = "odd";
            $odd_even = 1;
        } else {
            if ($odd_even == 1) {
                $pair_impair = "even";
                $odd_even = 0;
            }
        }
        $tr_javascript = " class='{$pair_impair}' onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./index.php?lvl=bulletin_display&id=" . $tableau['bulletin_id'] . "';\" style='cursor: pointer' ";
        print "<tr {$tr_javascript}><td><table width='100%'><tr><td style='border:none;width:16px'>" . ($tableau['nbexplnum'] != 0 ? $tableau['nbexplnum'] > 1 ? "<img src='./images/globe_rouge.png' />" : "<img src='./images/globe_orange.png' />" : "") . "</td><td style='border:none;'>" . $tableau['bulletin_numero'] . "</td></tr></table>";
        print "</td><td>";
        if ($tableau['mention_date']) {
            print pmb_bidi(" " . $tableau['mention_date'] . "\n");
        } elseif ($tableau['date_date']) {
            print pmb_bidi(" " . formatdate($tableau['date_date']) . "\n");
        }
        print "</td><td>";
        if ($tableau['bulletin_titre']) {
            print pmb_bidi(" " . htmlentities($tableau['bulletin_titre'], ENT_QUOTES, $charset) . "\n");
        }
        print "</td></tr>";
    }
    print "</table><br /><br />";
}
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:bul_list_func.inc.php

示例2: list_out_sets

function list_out_sets()
{
    global $msg, $charset;
    global $connector_out_set_types_msgs;
    $sets = new connector_out_sets();
    $current_type = 0;
    $tableheader = "<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>" . $msg["admin_connecteurs_sets_setcaption"] . "</th>\n\t\t\t\t\t<th>" . $msg["admin_connecteurs_sets_settype"] . "</th>\n\t\t\t\t\t<th>" . $msg["admin_connecteurs_sets_setadditionalinfo"] . "</th>\n\t\t\t\t\t<th>" . $msg["admin_connecteurs_setcateg_latestcacheupdate"] . "</th>\n\t\t\t\t\t<th>" . $msg["admin_connecteurs_setcateg_manualupdate"] . "</th>\n\t\t\t\t</tr>";
    $tablefooter = '</table>';
    $parity = 1;
    foreach ($sets->sets as &$aset) {
        if ($current_type != $aset->type) {
            print $current_type != 0 ? $tablefooter : '';
            print "<h1>" . htmlentities($msg[$connector_out_set_types_msgs[$aset->type]], ENT_QUOTES, $charset) . "</h1>";
            print $tableheader;
            $current_type = $aset->type;
        }
        $pair_impair = $parity++ % 2 ? 'even' : 'odd';
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./admin.php?categ=connecteurs&sub=out_sets&action=edit&id={$aset->id}';\" ";
        print "<tr style='cursor: pointer' class='{$pair_impair}' {$tr_javascript}>";
        print "<td>" . htmlentities($aset->caption, ENT_QUOTES, $charset) . "</td>";
        print "<td>" . htmlentities($msg[$connector_out_set_types_msgs[$aset->type]], ENT_QUOTES, $charset) . "</td>";
        print "<td>" . htmlentities($aset->get_third_column_info(), ENT_QUOTES, $charset) . "</td>";
        $date_caption = strtotime($aset->cache->last_updated_date) ? formatdate($aset->cache->last_updated_date, 1) : $msg["admin_connecteurs_setcateg_latestcacheupdate_never"];
        print "<td>" . htmlentities($date_caption, ENT_QUOTES, $charset) . "</td>";
        print "<td align=\"center\">" . "<input type='button' class='bouton_small' value='" . htmlentities($msg["admin_connecteurs_setcateg_updatemanually"], ENT_QUOTES, $charset) . "' onClick='document.location=\"admin.php?categ=connecteurs&sub=out_sets&action=manual_update&id={$aset->id}\"'/>" . "</td>";
        print "</tr>";
    }
    if (!count($sets->sets)) {
        print '<tr><td colspan="2">' . $msg["admin_connecteurs_sets_nosets"] . '</td></tr>';
    }
    print $tablefooter;
    print "<br /><hr /><input class='bouton' type='button' value=' {$msg['admin_connecteurs_set_add']} ' onClick=\"document.location='./admin.php?categ=connecteurs&sub=out_sets&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:33,代码来源:out_sets.inc.php

示例3: format_date

function format_date($value)
{
    if ($value == "") {
        return "";
    }
    return formatdate($value);
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:7,代码来源:datatype.inc.php

示例4: expl_list

function expl_list($type, $id)
{
    global $dbh;
    global $msg;
    $requete = "SELECT exemplaires.*, pret.*, docs_location.*, docs_section.*, docs_statut.*";
    $requete .= " FROM exemplaires, docs_location, docs_section, docs_statut";
    $requete .= " LEFT JOIN pret ON exemplaires.expl_id=pret.pret_idexpl";
    // selon le type de données d'origine : ouvrage ou bulletin d'un périodique
    // on adapte la requête
    switch ($type) {
        case 'b':
            $requete .= " WHERE expl_bulletin='{$id}'";
            break;
        case 'm':
        default:
            $requete .= " WHERE expl_notice='{$id}'";
            break;
    }
    $requete .= " AND exemplaires.expl_location=docs_location.idlocation";
    $requete .= " AND exemplaires.expl_section=docs_section.idsection ";
    $requete .= " AND exemplaires.expl_statut=docs_statut.idstatut ";
    $requete .= " AND section_visible_opac = 1 ";
    $requete .= " AND statut_visible_opac = 1 ";
    // récupération du nombre d'exemplaires
    $res = mysql_query($requete, $dbh);
    $compteur = 0;
    while ($expl = mysql_fetch_object($res)) {
        $compteur = $compteur + 1;
        $expl_liste .= "<tr><td>";
        $expl_liste .= $expl->expl_cb . "&nbsp;";
        $expl_liste .= "</td><td><strong>";
        $expl_liste .= $expl->expl_cote . "&nbsp;";
        $expl_liste .= "</strong></td><td>";
        $expl_liste .= $expl->location_libelle . "&nbsp;";
        $expl_liste .= "</td><td>";
        $expl_liste .= $expl->section_libelle . "&nbsp;";
        $situation = "";
        if ($expl->statut_libelle_opac != "") {
            $situation .= $expl->statut_libelle_opac . "<br />";
        }
        if ($expl->pret_flag) {
            if ($expl->pret_retour) {
                // exemplaire sorti
                $situation .= "<strong>{$msg['out_until']} " . formatdate($expl->pret_retour) . '</strong>';
            } else {
                // exemplaire disponible
                $situation .= "<strong>{$msg['available']}</strong>&nbsp;";
            }
        } else {
            $situation .= "<strong>{$msg['exclu']}</strong>";
        }
        $expl_liste .= "</td><td>{$situation} &nbsp;</td>";
        $expl_liste .= "</tr>";
    }
    // affichage de la liste d'exemplaires calculées ci-dessus
    if ($compteur == 0) {
        $expl_liste = "<tr class=even><td colspan=5>" . $msg["no_expl"] . "</td></tr>";
    }
    print pmb_bidi($expl_liste);
}
开发者ID:bouchra012,项目名称:PMB,代码行数:60,代码来源:expl_list.inc.php

示例5: affichage_liste_bulletins_depliable

function affichage_liste_bulletins_depliable($res)
{
    global $charset, $dbh;
    $resultat_aff = "";
    while ($tableau = pmb_mysql_fetch_array($res)) {
        $sql = "SELECT COUNT(1) FROM explnum WHERE explnum_bulletin='" . $tableau["bulletin_id"] . "'";
        $result = @pmb_mysql_query($sql, $dbh);
        $count = pmb_mysql_result($result, 0, 0);
        $titre = "";
        if ($count) {
            $titre .= '<img src="' . get_url_icon('attachment.png') . '">';
        }
        $titre .= $tableau['bulletin_numero'];
        if ($tableau['mention_date']) {
            $titre .= pmb_bidi(" (" . $tableau['mention_date'] . ")\n");
        } elseif ($tableau['date_date']) {
            $titre .= pmb_bidi(" (" . formatdate($tableau['date_date']) . ")\n");
        }
        if ($tableau['bulletin_titre']) {
            $titre .= pmb_bidi(" : " . htmlentities($tableau['bulletin_titre'], ENT_QUOTES, $charset) . "\n");
        }
        //	($id,$titre,$contenu,$maximise=0) {
        $resultat_aff .= gen_plus("bull_id_" . $tableau['bulletin_id'], $titre, get_bulletin_list_func($tableau['bulletin_id']));
    }
    print $resultat_aff;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:bul_list_func.inc.php

示例6: list_connectors_out

function list_connectors_out()
{
    global $msg, $charset;
    $conns = new connecteurs_out();
    print "\n\t<script type='text/javascript' >\n\t\tfunction show_sources(id) {\n\t\t\tif (document.getElementById(id).style.display=='none') {\n\t\t\t\tdocument.getElementById(id).style.display='';\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdocument.getElementById(id).style.display='none';\n\t\t\t}\n\t\t} \n\t</script>\n\t<table>\n\t\t<tr>\n\t\t\t<th>&nbsp;</th>\n\t\t\t<th>" . $msg["connector_out_service"] . "</th>\n\t\t\t<th>" . $msg["connector_out_sources"] . "</th>\n\t\t\t<th>&nbsp;</th>\n\t\t</tr>";
    $pair_impair = 0;
    $parity = 0;
    foreach ($conns->connectors as $aconn) {
        $pair_impair = $parity++ % 2 ? "even" : "odd";
        $comment = $aconn->comment;
        $sign = $aconn->name . " : " . $comment . " - ";
        $sign .= "Auteur : " . $aconn->author . " - " . $aconn->org . " - ";
        $sign .= formatdate($aconn->date);
        $n_sources = count($aconn->sources);
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" ";
        print "<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer' title='" . htmlentities($sign, ENT_QUOTES, $charset) . "' alter='" . htmlentities($sign, ENT_QUOTES, $charset) . "' id='tr" . $aconn->id . "'><td>" . ($n_sources ? "<img src='images/plus.gif' class='img_plus' onClick='if (event) e=event; else e=window.event; e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); show_sources(\"" . addslashes($aconn->path) . "\"); '/>" : "&nbsp;") . "</td><td onmousedown=\"if (event) e=event; else e=window.event; if (e.srcElement) target=e.srcElement; else target=e.target; if (target.nodeName!='IMG') document.location='./admin.php?categ=connecteurs&sub=out&action=edit&id=" . $aconn->id . "';return false;\">" . htmlentities($aconn->comment, ENT_QUOTES, $charset) . "</td>\n\t\t<td onmousedown=\"if (event) e=event; else e=window.event; if (e.srcElement) target=e.srcElement; else target=e.target; if (target.nodeName!='IMG') document.location='./admin.php?categ=connecteurs&sub=out&action=edit&id=" . $aconn->id . "';return false;\">" . sprintf($msg["connecteurs_count_sources"], $n_sources) . "</td><td style='text-align:right'><input type='button' value='" . $msg["connector_out_sourceadd"] . "' class='bouton_small' onClick='document.location=\"admin.php?categ=connecteurs&sub=out&action=source_add&connector_id=" . $aconn->id . "\"'/></td></tr>\n";
        print "<tr class='{$pair_impair}' style='display:none' id='" . $aconn->path . "'><td>&nbsp;</td><td colspan='3'><table style='border:1px solid'>";
        $parity_source = 0;
        foreach ($aconn->sources as $asource) {
            $pair_impair_source = $parity_source++ % 2 ? "even" : "odd";
            $tr_javascript_source = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair_source}'\" onmousedown=\"if (event) e=event; else e=window.event; if (e.srcElement) target=e.srcElement; else target=e.target; if (target.nodeName!='INPUT') document.location='./admin.php?categ=connecteurs&sub=out&action=source_edit&connector_id=" . $aconn->id . "&source_id=" . $asource->id . "';return false;\" ";
            print "<tr style='cursor: pointer' class='{$pair_impair_source}' {$tr_javascript_source}>\n\t\t\t\t<td>" . htmlentities($asource->name, ENT_QUOTES, $charset) . "</td>\n\t\t\t\t<td>" . htmlentities(substr($asource->comment, 0, 60), ENT_QUOTES, $charset) . "</td>\n\t\t\t\t<td></td><td></td></tr>";
        }
        print "</table></td></tr>";
    }
    print "</table>";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:27,代码来源:out.inc.php

示例7: gen_print_transactions

 function gen_print_transactions($data, $tpl = '')
 {
     global $msg, $pmb_gestion_devise;
     $default_template = "@!{{biblio.name}}!\r\n{{biblio.adr1}}\r\n{{biblio.town}}\r\n{{biblio.phone}}\r\n{{biblio.email}}\r\n\r\n" . $msg["fpdf_edite"] . " " . formatdate(date("Y-m-d", time())) . "\n\r\nEmprunteur:\r\n{% for empr in empr_list %}\r\n{{empr.name}} {{empr.fistname}}\r\n{% endfor %}\r\n\n{% for data in empr_list %}\n" . $msg["transactype_ticket_solde"] . "{{compte_autre.solde}} " . $pmb_gestion_devise . "\n{% endfor %}\n\n\r\nVA @";
     if (!$tpl) {
         $tpl = $default_template;
     }
     return H2o::parseString($tpl)->render($data);
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:9,代码来源:metapace.class.php

示例8: get_notice_id

 public function get_notice_id()
 {
     global $pmb_keyword_sep;
     $notice_id = 0;
     $this->data = array();
     $this->data['tit1'] = $this->data['tit4'] = $this->data['authors'] = $this->data['co_authors'] = $this->data['code'] = $this->data['npages'] = $this->data['year'] = $this->data['index_l'] = $this->data['url'] = $this->data['thumbnail_content'] = $this->data['publisher'] = $this->data['n_resume'] = "";
     if ($this->mimetype == "application/epub+zip") {
         //pour les ebook, on gère ca directement ici !
         $this->data['tit1'] = $this->metas['title'][0];
         $this->data['authors'] = $this->metas['creator'];
         $this->data['co_authors'] = $this->metas['contributor'];
         if ($this->metas['identifier']['isbn']) {
             $this->data['code'] = \formatISBN($this->metas['identifier']['isbn'], 13);
         } else {
             if ($this->metas['identifier']['ean']) {
                 $this->data['code'] = \EANtoISBN($this->metas['identifier']['ean']);
                 $this->data['code'] = \formatISBN($code, 13);
             }
         }
         if ($this->metas['identifier']['uri']) {
             $this->data['url'] = \clean_string($this->metas['identifier']['uri']);
         }
         $this->data['publisher'] = $this->metas['publisher'][0];
         $this->data['year'] = $this->metas['date'][0]['value'];
         if (strlen($this->data['year']) && strlen($this->data['year']) != 4) {
             $this->data['year'] = \formatdate(detectFormatDate($this->data['year']));
         }
         $this->data['lang'] = $this->metas['language'];
         $this->data['n_resume'] = implode("\n", $this->metas['description']);
         $this->data['keywords'] = implode($pmb_keyword_sep, $this->metas['subject']);
         $this->data['thumbnail_content'] = $this->metas['thumbnail_content'];
     } else {
         foreach ($this->map['meta'] as $map_field => $map) {
             foreach ($this->metas as $meta_field => $meta_value) {
                 if ($map_field == $meta_field) {
                     if (method_exists($this, $map['function'])) {
                         $this->data[$map['field']] = $this->{$map}['function']($this->data[$map['field']], $meta_value, $map['params']);
                     } else {
                         $this->data[$map['field']] = $meta_value;
                     }
                     break;
                 }
             }
         }
     }
     if (!$this->data['tit1']) {
         $this->data['tit1'] = $this->name;
     }
     $notice_id = $this->create_notice();
     $notice_id = $this->dedoublonne($notice_id);
     return $notice_id;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:52,代码来源:metasMapper.php

示例9: getCheckoutListShippings

 public function getCheckoutListShippings($adv_user)
 {
     $jshopConfig = JSFactory::getConfig();
     $cart = $this->getCart();
     $shippingmethod = JSFactory::getTable('shippingMethod', 'jshop');
     $shippingmethodprice = JSFactory::getTable('shippingMethodPrice', 'jshop');
     $id_country = $this->getAnyIdCountry($adv_user);
     if (!$id_country) {
         $this->setError(_JSHOP_REGWARN_COUNTRY);
         return false;
     }
     if ($jshopConfig->show_delivery_time_checkout) {
         $deliverytimes = JSFactory::getAllDeliveryTime();
         $deliverytimes[0] = '';
     }
     if ($jshopConfig->show_delivery_date) {
         $deliverytimedays = JSFactory::getAllDeliveryTimeDays();
     }
     $sh_pr_method_id = $cart->getShippingPrId();
     $active_shipping = intval($sh_pr_method_id);
     $payment_id = $cart->getPaymentId();
     $shippings = $shippingmethod->getAllShippingMethodsCountry($id_country, $payment_id);
     foreach ($shippings as $key => $value) {
         $shippingmethodprice->load($value->sh_pr_method_id);
         if ($jshopConfig->show_list_price_shipping_weight) {
             $shippings[$key]->shipping_price = $shippingmethodprice->getPricesWeight($value->sh_pr_method_id, $id_country, $cart);
         }
         $prices = $shippingmethodprice->calculateSum($cart);
         $shippings[$key]->calculeprice = $prices['shipping'] + $prices['package'];
         $shippings[$key]->delivery = '';
         $shippings[$key]->delivery_date_f = '';
         if ($jshopConfig->show_delivery_time_checkout) {
             $shippings[$key]->delivery = $deliverytimes[$value->delivery_times_id];
         }
         if ($jshopConfig->show_delivery_date) {
             $day = $deliverytimedays[$value->delivery_times_id];
             if ($day) {
                 $shippings[$key]->delivery_date = getCalculateDeliveryDay($day);
                 $shippings[$key]->delivery_date_f = formatdate($shippings[$key]->delivery_date);
             }
         }
         if ($value->sh_pr_method_id == $active_shipping) {
             $params = $cart->getShippingParams();
         } else {
             $params = array();
         }
         $shippings[$key]->form = $shippingmethod->loadShippingForm($value->shipping_id, $value, $params);
     }
     return $shippings;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:50,代码来源:checkoutshipping.php

示例10: show_rapport

function show_rapport()
{
    global $msg, $dbh, $base_path, $report_task, $report_error, $task_id, $type_task_id;
    $query_chk = "select id_tache from taches where id_tache=" . $task_id;
    $res_chk = mysql_query($query_chk, $dbh);
    if (mysql_num_rows($res_chk) == '1') {
        //date de génération du rapport
        $rs = mysql_query("select curdate()");
        $date_MySQL = mysql_result($rs, $row);
        $tasks = new taches();
        foreach ($tasks->types_taches as $type_tache) {
            if ($type_tache->id_type == $type_task_id) {
                require_once $base_path . "/admin/planificateur/" . $type_tache->name . "/" . $type_tache->name . ".class.php";
                eval("\$conn=new " . $type_tache->name . "(\"" . $base_path . "/admin/planificateur/" . $type_tache->name . "\");");
                $task_datas = $conn->get_report_datas($task_id);
                //affiche le rapport avec passage du template
                $report_task = str_replace("!!print_report!!", "<a onclick=\"openPopUp('./pdf.php?pdfdoc=rapport_tache&type_task_id={$type_task_id}&task_id=" . $task_id . "', 'Fiche', 500, 400, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes')\" href=\"#\"><img src='" . $base_path . "/images/print.gif' alt='Imprimer...' /></a>", $report_task);
                $report_task = str_replace("!!type_tache_name!!", $type_tache->comment, $report_task);
                $report_task = str_replace("!!planificateur_task_name!!", $msg["planificateur_task_name"], $report_task);
                $report_task = str_replace("!!date_mysql!!", formatdate($date_MySQL), $report_task);
                $report_task = str_replace("!!libelle_date_generation!!", $msg["tache_date_generation"], $report_task);
                $report_task = str_replace("!!libelle_date_derniere_exec!!", $msg["tache_date_dern_exec"], $report_task);
                $report_task = str_replace("!!libelle_heure_derniere_exec!!", $msg["tache_heure_dern_exec"], $report_task);
                $report_task = str_replace("!!libelle_date_fin_exec!!", $msg["tache_date_fin_exec"], $report_task);
                $report_task = str_replace("!!libelle_heure_fin_exec!!", $msg["tache_heure_fin_exec"], $report_task);
                $report_task = str_replace("!!libelle_statut_exec!!", $msg["tache_statut"], $report_task);
                $report_task = str_replace("!!report_execution!!", $msg["tache_report_execution"], $report_task);
                $report_task = str_replace("!!id!!", $task_datas["id_tache"], $report_task);
                $report_task = str_replace("!!libelle_task!!", stripslashes($task_datas["libelle_tache"]), $report_task);
                $report_task = str_replace("!!date_dern_exec!!", formatdate($task_datas['start_at'][0]), $report_task);
                $report_task = str_replace("!!heure_dern_exec!!", $task_datas['start_at'][1], $report_task);
                $report_task = str_replace("!!date_fin_exec!!", formatdate($task_datas['end_at'][0]), $report_task);
                $report_task = str_replace("!!heure_fin_exec!!", $task_datas['end_at'][1], $report_task);
                $report_task = str_replace("!!status!!", $msg["planificateur_state_" . $task_datas["status"]], $report_task);
                $report_task = str_replace("!!percent!!", $task_datas["indicat_progress"], $report_task);
                $report_execution = $conn->show_report($task_datas["rapport"]);
                $report_task = str_replace("!!rapport!!", $report_execution, $report_task);
                ajax_http_send_response($report_task);
                return;
            }
        }
    } else {
        // contenu non disponible
        $report_task = "Contenu non disponible";
        ajax_http_send_response($report_error);
        //		ajax_http_send_error('400',$msg['error_message_invalid_date']);
        return;
    }
}
开发者ID:bouchra012,项目名称:PMB,代码行数:49,代码来源:planificateur.inc.php

示例11: show_results

function show_results($dbh, $user_input, $nbr_lignes = 0, $page = 0)
{
    global $nb_per_page;
    global $base_url;
    global $caller;
    global $msg;
    global $charset;
    global $idaction;
    global $current_note;
    $user_input = str_replace('*', '%', $user_input);
    if ($user_input == "") {
        $req_count = "select count(1) from demandes_notes where num_action='" . $idaction . "' and id_note !='" . $current_note . "'";
    } else {
        $req_count = "select count(1) from demandes_notes where num_action='" . $idaction . "' and contenu like '%" . $user_input . "%' and id_note !='" . $current_note . "'";
    }
    $res = pmb_mysql_query($req_count, $dbh);
    $nbr_lignes = @pmb_mysql_result($res, 0, 0);
    if (!$page) {
        $page = 1;
    }
    $debut = ($page - 1) * $nb_per_page;
    if ($nbr_lignes) {
        // on lance la vraie requête
        if ($user_input == "") {
            $req = "select id_note, date_note, CONCAT(SUBSTRING(contenu,1,50),'','...') as note from demandes_notes where num_action='" . $idaction . "' and id_note !='" . $current_note . "'";
        } else {
            $req = "select id_note, date_note, CONCAT(SUBSTRING(contenu,1,50),'','...') as note from demandes_notes where num_action='" . $idaction . "' and contenu like '%" . $user_input . "%' and id_note !='" . $current_note . "'";
        }
        $res = pmb_mysql_query($req, $dbh);
        while ($note = pmb_mysql_fetch_object($res)) {
            print "<div class='row'>";
            print "<a href='#' onclick=\"set_parent('{$caller}', '{$note->id_note}', '" . htmlentities(addslashes($note->note), ENT_QUOTES, $charset) . "')\"> [" . htmlentities(formatdate($note->date_note), ENT_QUOTES, $charset) . '] ' . htmlentities($note->note, ENT_QUOTES, $charset) . "</a>";
            print "</div>";
        }
        pmb_mysql_free_result($res);
        // constitution des liens
        $nbepages = ceil($nbr_lignes / $nb_per_page);
        $suivante = $page + 1;
        $precedente = $page - 1;
    }
    print "<div class='row'>&nbsp;<hr /></div><div align='center'>";
    $url_base = $base_url . "&user_input=" . rawurlencode(stripslashes($user_input));
    $nav_bar = aff_pagination($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true);
    print $nav_bar;
    print "</div>";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:46,代码来源:notes.inc.php

示例12: bulletinage_bulletin

function bulletinage_bulletin($fiche, $x, $y, $link, $short = 0, $longmax = 99999)
{
    global $ourPDF;
    global $msg;
    global $pmb_pdf_font;
    $ourPDF->SetXY($x, $y);
    $ourPDF->setFont($pmb_pdf_font, '', 8);
    $ourPDF->multiCell(190, 3, formatdate($fiche['date_parution']), 0, 'L', 0);
    $ourPDF->SetXY($x + 20, $y);
    $ourPDF->setFont($pmb_pdf_font, '', 8);
    $titre = $fiche['libelle_notice'] . " / " . $fiche['libelle_abonnement'];
    $lgTitre = strlen($titre);
    if ($lgTitre > 110) {
        $titre = substr($titre, 0, 110) . "...";
    }
    $ourPDF->multiCell(120, 3, $titre . ". " . $fiche['cote'], 0, 'L', 0);
    $ourPDF->SetXY($x + 140, $y);
    $ourPDF->setFont($pmb_pdf_font, 'B', 8);
    $ourPDF->multiCell(190, 3, $fiche['libelle_numero'], 0, 'L', 0);
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:20,代码来源:liste_bulletinage.inc.php

示例13: show_form

function show_form($id, $type)
{
    global $dbh, $msg;
    if ($type == 'ask') {
        $title = $msg['demandes_question_form'];
        $btn = $msg['demandes_save_question'];
    } elseif ($type == 'info') {
        $title = $msg['demandes_info_form'];
        $btn = $msg['demandes_save_info'];
    } elseif ($type == 'rdv') {
        $title = $msg['demandes_rdv_form'];
        $btn = $msg['demandes_save_rdv'];
        $date = date('Ymd', time());
        $div_date = "\n\t\t<div class='row' >\n\t\t\t<label class='etiquette' >" . $msg['demandes_action_date_rdv'] . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<blockquote>\n\t\t\t\t<input type='hidden' id='date_rdv' name='date_rdv' value='{$date}' />\n\t\t\t\t<input type='button' class='bouton' id='date_rdv_btn' name='date_rdv_btn' value='" . formatdate($date) . "' onClick=\"window.open('./select.php?what=calendrier&caller=liste_action&date_caller={$date}&param1=date_rdv&param2=date_rdv_btn&auto_submit=NO&date_anterieure=YES', 'date_rdv', 'width=250,height=300,toolbar=no,dependent=yes,resizable=yes')\"/>\n\t\t\t</blockquote>\n\t\t</div>";
    }
    $display .= "\n\t\t<div class='row'>\n\t\t\t<h3>" . $title . "</h3>\n\t\t</div>";
    if ($div_date) {
        $display .= $div_date;
    }
    $display .= "\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' >" . $msg['demandes_action_sujet'] . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<blockquote>\n\t\t\t<input type='text' name='sujet' id='sujet' />\n\t\t\t</blockquote>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' >" . $msg['demandes_action_detail'] . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<blockquote>\n\t\t\t\t<textarea style='vertical-align:top' id='detail' name='detail' cols='50' rows='5'></textarea>\n\t\t\t</blockquote>\n\t\t</div>\t\t\t\t\n\t\t<input type='button' class='bouton' name='ask' id='ask' value='" . $btn . "' />\n\t\t<input type='button' class='bouton' name='cancel' id='cancel' value='" . $msg['demandes_cancel'] . "' />\n\t\t";
    ajax_http_send_response($display);
}
开发者ID:bouchra012,项目名称:PMB,代码行数:22,代码来源:ajax_demandes.inc.php

示例14: DoPrivateMessageBar

function DoPrivateMessageBar()
{
    global $loguserid, $loguser;
    if ($loguserid) {
        $unread = FetchResult("select count(*) from {pmsgs} where userto = {0} and msgread=0 and drafting=0", $loguserid);
        $content = "";
        if ($unread) {
            $pmNotice = $loguser['usebanners'] ? "id=\"pmNotice\" " : "";
            $rLast = Query("select * from {pmsgs} where userto = {0} and msgread=0 order by date desc limit 0,1", $loguserid);
            $last = Fetch($rLast);
            $rUser = Query("select * from {users} where id = {0}", $last['userfrom']);
            $user = Fetch($rUser);
            $content .= format("\n\t\t" . __("You have {0}{1}. {2}Last message{1} from {3} on {4}."), Plural($unread, format(__("new {0}private message"), "<a href=\"" . actionLink("private") . "\">")), "</a>", "<a href=\"" . actionLink("showprivate", $last['id']) . "\">", UserLink($user), formatdate($last['date']));
        }
        if ($loguser['newcomments']) {
            $content .= format("\n\t\t" . __("You {0} have new comments in your {1}profile{2}."), $content != "" ? "also" : "", "<a href=\"" . actionLink("profile", $loguserid) . "\">", "</a>");
        }
        if ($content) {
            write("\n\t<div {0} class=\"outline margin header0 cell0 smallFonts\">\n\t\t{1}\n\t</div>\n", $pmNotice, $content);
        }
    }
}
开发者ID:knytrune,项目名称:ABXD,代码行数:22,代码来源:snippets.php

示例15: bulletinage_abt

function bulletinage_abt($fiche, $x, $y, $link, $short = 0, $longmax = 99999)
{
    global $ourPDF;
    global $msg;
    global $pmb_pdf_font;
    $ourPDF->SetXY($x, $y);
    $ourPDF->setFont($pmb_pdf_font, '', 8);
    $ourPDF->multiCell(190, 8, formatdate($fiche['date']), 0, 'L', 0);
    $ourPDF->SetXY($x + 20, $y);
    $ourPDF->setFont($pmb_pdf_font, '', 8);
    $titre = $fiche['tit1'] . " / " . $fiche['abt_name'];
    $lgTitre = strlen($titre);
    if ($lgTitre > 140) {
        $titre = substr($titre, 0, 140) . "...";
    }
    $ourPDF->multiCell(180, 8, $titre . ". " . $fiche['cote'], 0, 'L', 0);
    /*	
    	$ourPDF->SetXY ($x+140,$y);
    	$ourPDF->setFont($pmb_pdf_font, 'B', 8);
    	$ourPDF->multiCell(190, 8, $fiche['libelle_numero'], 0, 'L', 0);
    */
}
开发者ID:bouchra012,项目名称:PMB,代码行数:22,代码来源:abts_depasse.inc.php


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