• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP th函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: myList

 function myList()
 {
     $s = dossier::get();
     $sql = "select md_id,md_name,md_affect,dt_value from document_modele join document_type on(dt_id=md_type) order by md_name";
     $Res = $this->cn->exec_sql($sql);
     $all = Database::fetch_all($Res);
     $r = '';
     if (Database::num_row($Res) != 0) {
         $r .= '<p><form method="post">';
         $r .= dossier::hidden();
         $r .= "<table>";
         $r .= "<tr> ";
         $r .= th(_('Nom'));
         $r .= th(_('Catégorie'));
         $r .= th(_('Affect.'));
         $r .= th(_('Fichier'));
         $r .= th(_('Effacer'));
         $r .= "</tr>";
         foreach ($all as $row) {
             $r .= "<tr>";
             $r .= "<td>";
             $r .= h($row['md_name']);
             $r .= "</td>";
             $r .= "<td>";
             $r .= $row['dt_value'];
             $r .= "</td>";
             $r .= td(h($row['md_affect']));
             $r .= "<td>";
             $r .= '<A HREF="show_document_modele.php?md_id=' . $row['md_id'] . '&' . $s . '">Document</a>';
             $r .= "</td>";
             $r .= "<TD>";
             $c = new ICheckBox();
             $c->name = "dm_remove_" . $row['md_id'];
             $r .= $c->input();
             $r .= "</td>";
             $r .= td(HtmlInput::detail_modele_document($row['md_id'], 'Modifier'));
             $r .= "</tr>";
         }
         $r .= "</table>";
         // need hidden parameter for subaction
         $a = new IHidden();
         $a->name = "sa";
         $a->value = "rm_template";
         $r .= $a->input();
         $r .= HtmlInput::submit("rm_template", "Effacer la sélection");
     }
     $b = new IButton('show');
     $b->label = "Ajout d'un document";
     $b->javascript = "\$('add_modele').style.display='block';new Draggable('add_modele',{starteffect:function(){\n                      new Effect.Highlight(obj.id,{scroll:window,queue:'end'});}});";
     $r .= $b->input();
     $r .= "</form></p>";
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:53,代码来源:class_document_modele.php


示例2: display_html

 function display_html()
 {
     $idx = 0;
     $r = "";
     //---Html
     $array = $this->load();
     if (is_array($array) == false || empty($array)) {
         return 0;
     }
     $r .= '<table class="result" style="width=100%">';
     $r .= '<tr>' . '<th>' . _('Date') . '</th>' . '<th>' . _('Poste') . '</th>' . '<th>' . _('Quick_code') . '</th>' . '<th>' . _('Analytique') . '</th>' . th(_('Description')) . '<th>' . _('libelle') . '</th>' . '<th>' . _('Num.interne') . '</th>' . '<th>' . _('Montant') . '</th>' . '<th>' . _('D/C') . '</th>' . '</tr>';
     foreach ($array as $row) {
         $class = $idx % 2 == 0 ? 'even' : 'odd';
         $idx++;
         $r .= '<tr class="' . $class . '">';
         $detail = $row['jr_id'] != null ? HtmlInput::detail_op($row['jr_id'], $row['jr_internal']) : '';
         $post_detail = $row['j_poste'] != null ? HtmlInput::history_account($row['j_poste'], $row['j_poste']) : '';
         $card_detail = $row['f_id'] != null ? HtmlInput::history_card($row['f_id'], $row['qcode']) : '';
         $r .= '<td>' . $row['oa_date'] . '</td>' . td($post_detail) . td($card_detail) . '<td>' . h($row['po_name']) . '</td>' . '<td>' . h($row['oa_description']) . '</td>' . td($row['jr_comment']) . '<td>' . $detail . '</td>' . '<td class="num">' . nbm($row['oa_amount']) . '</td>' . '<td>' . ($row['oa_debit'] == 'f' ? 'CREDIT' : 'DEBIT') . '</td>';
         $r .= '</tr>';
     }
     $r .= '</table>';
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:24,代码来源:class_anc_listing.php


示例3: HtmlTable

 function HtmlTable($p_array = null, $op_let = 0, $from_div = 1)
 {
     if ($p_array == null) {
         $p_array = $_REQUEST;
     }
     $progress = 0;
     // if from_periode is greater than to periode then swap the values
     if (cmpDate($p_array['from_periode'], $p_array['to_periode']) > 0) {
         $tmp = $p_array['from_periode'];
         $p_array['from_periode'] = $p_array['to_periode'];
         $p_array['to_periode'] = $tmp;
     }
     list($array, $tot_deb, $tot_cred) = $this->get_row_date($p_array['from_periode'], $p_array['to_periode'], $op_let);
     if (count($this->row) == 0) {
         return -1;
     }
     $rep = "";
     if ($from_div == 1) {
         echo "<TABLE class=\"resultfooter\" style=\"margin:1%;width:98%;;border-collapse:separate;border-spacing:0px 5px\">";
     } else {
         echo "<TABLE id=\"tb" . $from_div . "\"class=\"result\" style=\"margin:1%;width:98%;border-collapse:separate;border-spacing:0px 2px\">";
     }
     echo '<tbody>';
     echo "<TR>" . "<TH style=\"text-align:left\">" . _('Date') . "</TH>" . "<TH style=\"text-align:left\">" . _('n° pièce') . " </TH>" . "<TH style=\"text-align:left\">" . _('Code interne') . " </TH>" . "<TH style=\"text-align:left\">" . _('Description') . " </TH>" . "<TH style=\"text-align:right\">" . _('Débit') . "  </TH>" . "<TH style=\"text-align:right\">" . _('Crédit') . " </TH>" . th('Prog.', 'style="text-align:right"') . th('Let.', 'style="text-align:right"');
     "</TR>";
     $old_exercice = "";
     $sum_deb = 0;
     $sum_cred = 0;
     bcscale(2);
     $idx = 0;
     foreach ($this->row as $op) {
         $vw_operation = sprintf('<A class="detail" style="text-decoration:underline;color:red" HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>', $op['jr_id'], dossier::id(), $op['jr_internal']);
         $let = '';
         $html_let = "";
         if ($op['letter'] != -1) {
             $let = strtoupper(base_convert($op['letter'], 10, 36));
             $html_let = HtmlInput::show_reconcile($from_div, $let);
         }
         $tmp_diff = bcsub($op['deb_montant'], $op['cred_montant']);
         /*
          * reset prog. balance to zero if we change of exercice
          */
         if ($old_exercice != $op['p_exercice']) {
             if ($old_exercice != '') {
                 $progress = bcsub($sum_deb, $sum_cred);
                 $side = "&nbsp;" . $this->get_amount_side($progress);
                 echo "<TR class=\"highlight\">" . "<TD>{$old_exercice}</TD>" . td('') . "<TD></TD>" . "<TD>Totaux</TD>" . "<TD style=\"text-align:right\">" . nbm($sum_deb) . "</TD>" . "<TD style=\"text-align:right\">" . nbm($sum_cred) . "</TD>" . td(nbm(abs($progress)) . $side, 'style="text-align:right"') . td('') . "</TR>";
                 $sum_cred = 0;
                 $sum_deb = 0;
                 $progress = 0;
             }
         }
         $progress = bcadd($progress, $tmp_diff);
         $side = "&nbsp;" . $this->get_amount_side($progress);
         $sum_cred = bcadd($sum_cred, $op['cred_montant']);
         $sum_deb = bcadd($sum_deb, $op['deb_montant']);
         if ($idx % 2 == 0) {
             $class = 'class="odd"';
         } else {
             $class = ' class="even"';
         }
         $idx++;
         echo "<TR {$class} name=\"tr_" . $let . "_" . $from_div . "\">" . "<TD>" . smaller_date(format_date($op['j_date_fmt'])) . "</TD>" . td(h($op['jr_pj_number'])) . "<TD>" . $vw_operation . "</TD>" . "<TD>" . h($op['description']) . "</TD>" . "<TD style=\"text-align:right\">" . nbm($op['deb_montant']) . "</TD>" . "<TD style=\"text-align:right\">" . nbm($op['cred_montant']) . "</TD>" . td(nbm(abs($progress)) . $side, 'style="text-align:right"') . td($html_let, ' style="text-align:right"') . "</TR>";
         $old_exercice = $op['p_exercice'];
     }
     $solde_type = $sum_deb > $sum_cred ? "solde débiteur" : "solde créditeur";
     $diff = abs(bcsub($sum_deb, $sum_cred));
     echo '<tfoot>';
     echo "<TR class=\"highlight\">" . "<TD>Totaux</TD>" . "<TD ></TD>" . "<TD ></TD>" . "<TD></TD>" . "<TD  style=\"text-align:right\">" . nbm($sum_deb) . "</TD>" . "<TD  style=\"text-align:right\">" . nbm($sum_cred) . "</TD>" . "<TD style=\"text-align:right\">" . nbm($diff) . "</TD>" . "</TR>";
     echo "<TR style=\"font-weight:bold\">" . "<TD>{$solde_type}</TD>" . "<TD style=\"text-align:right\">" . nbm($diff) . "</TD>" . "<TD></TD>" . "</TR>";
     echo '</tfoot>';
     echo '</tbody>';
     echo "</table>";
     return 0;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:75,代码来源:class_fiche.php


示例4: mysql_result

    $template = mysql_result($res, 0);
    tr2('<a href="mailbox.php?inbox">' . T_("INBOX") . ' </a> ', " {$inbox} " . P_("message", $inbox) . " ({$unread} " . T_("unread") . ")");
    tr2('<a href="mailbox.php?outbox">' . T_("OUTBOX") . ' </a> ', " {$outbox} " . P_("message", $outbox));
    tr2('<a href="mailbox.php?draft">' . T_("DRAFT") . ' </a> ', " {$draft} " . P_("message", $draft));
    tr2('<a href="mailbox.php?templates">' . T_("TEMPLATES") . ' </a> ', " {$template} " . P_("message", $template));
    end_table();
    echo "<br /><br />";
} elseif ($type == "Mail") {
    $order = order("added,sender,sendto,subject", "added", true);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE {$where}");
    $count = mysql_result($res, 0);
    list($pagertop, $pagerbottom, $limit) = pager2(20, $count);
    print $pagertop;
    begin_form();
    begin_table(0, "list");
    $table['&nbsp;'] = th("<input type=\"checkbox\" onclick=\"toggleChecked(this.checked);this.form.remove.disabled=true;\" />", 1);
    $table['Sender'] = th_left("Sender", 'sender');
    $table['Sent_to'] = th_left("Sent To", 'receiver');
    $table['Subject'] = th_left("Subject", 'subject');
    $table['Date'] = th_left("Date", 'added');
    table($table, $tablefmt);
    $res = SQL_Query_exec("SELECT * FROM messages WHERE {$where} {$order} {$limit}");
    while ($arr = mysql_fetch_assoc($res)) {
        unset($table);
        $userid = 0;
        $format = '';
        $reading = false;
        if ($arr["sender"] == $CURUSER['id']) {
            $sender = "Yourself";
        } elseif (is_valid_id($arr["sender"])) {
            $res2 = SQL_Query_exec("SELECT username FROM users WHERE `id` = {$arr['sender']}");
开发者ID:l3oncoder,项目名称:TorrentTrader,代码行数:31,代码来源:mailbox.php


示例5: INum

$desc->size = 50;
$size = new INum('size[]');
$size->size = 5;
$extra = new IText('extra[]');
$select_type->value = array(array('value' => 'text', 'label' => _('Texte')), array('value' => 'numeric', 'label' => _('Nombre')), array('value' => 'date', 'label' => _('Date')), array('value' => 'zone', 'label' => _('Zone de texte')), array('value' => 'poste', 'label' => _('Poste Comptable')), array('value' => 'card', 'label' => _('Fiche')), array('value' => 'select', 'label' => _('Selection')));
echo '<div class="content">';
echo '<form method="post">';
echo HtmlInput::hidden('sa', 'fat');
echo HtmlInput::hidden('p_action', 'divers');
echo '<table id="tb_rmfa">';
echo '<tr>';
echo th(_("id"));
echo th(_("Description"));
echo th(_("Type"));
echo th(_("Taille"));
echo th(_("Paramètre"));
echo '</tr>';
for ($e = 0; $e < count($array); $e++) {
    $row = $array[$e];
    $r = '';
    $r .= td(HtmlInput::hidden('ad_id[]', $row->get_parameter('id')) . $row->get_parameter('id'));
    $select_type->selected = $row->get_parameter('type');
    $desc->value = $row->get_parameter('desc');
    $size->value = $row->get_parameter('size');
    $extra->value = $row->get_parameter('extra');
    $remove = new IButton('rmfa' . $e);
    $remove->label = _('Effacer');
    if ($row->get_parameter('id') >= 9000) {
        $select_type->readOnly = false;
        $desc->readOnly = false;
        $size->readOnly = false;
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:card_attr.inc.php


示例6: display_html

 function display_html()
 {
     $r = "";
     $array = $this->load();
     $odd = 0;
     if (is_array($array) == false) {
         return $array;
     }
     $old = "";
     $tot_deb = 0;
     $tot_cred = 0;
     foreach ($array as $row) {
         $odd++;
         $r .= $odd % 2 == 0 ? '<tr class="odd">' : '<tr class="even">';
         if ($old == $row['a_po_name']) {
             $r .= '<td></td>';
         } else {
             if ($tot_deb != 0 || $tot_cred != 0) {
                 $r .= "<tr>" . td('');
                 $r .= "<td>Total </td>" . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"');
                 $s = abs($tot_deb - $tot_cred);
                 $d = $tot_deb > $tot_cred ? 'debit' : 'credit';
                 $r .= "<td class=\"num\">" . nbm($s) . "</td><td>{$d}</td>";
                 $r .= "</tr>";
             }
             $tot_deb = 0;
             $tot_cred = 0;
             // new
             $r .= "</table>";
             $r .= "<table class=\"result\" style=\"margin-bottom:3px\">";
             $r .= "<tr>";
             $r .= "<th style=\"width:30%\" >Poste comptable Analytique</th>";
             $r .= "<th style=\"width:30%\">Poste comptable Analytique</th>";
             $r .= "<th style=\"text-align:right\">D&eacute;bit</th>";
             $r .= "<th style=\"text-align:right\">Cr&eacute;dit</th>";
             $r .= "<th style=\"text-align:right\">Solde</th>";
             $r .= "<th>D/C</th>";
             $r .= "</tr>";
             $r .= '<tr>';
             $r .= td($row['a_po_name'] . ' ' . $row['a_po_description']);
             $old = $row['a_po_name'];
             $r .= '</tr>';
             $r .= '<tr>';
             $r .= td('');
         }
         $tot_deb += $row['a_d'];
         $tot_cred += $row['a_c'];
         $r .= td($row['b_po_name'] . " " . $row['b_po_description']);
         $r .= td(nbm($row['a_d']), ' class="num"');
         $r .= td(nbm($row['a_c']), ' class="num"');
         $r .= td(nbm($row['a_solde']), ' class="num"');
         $r .= sprintf("<td>%s</td>", $row['a_debit']);
         $r .= "</tr>";
     }
     /* end loop */
     if ($tot_deb != 0 || $tot_cred != 0) {
         $r .= "<tr>" . td('');
         $r .= "<td>Total </td> <td ' class=\"num\"> " . nbm($tot_deb) . " </td> <td ' class=\"num\">" . nbm($tot_cred) . "</td>";
         $s = abs($tot_deb - $tot_cred);
         $d = $tot_deb > $tot_cred ? 'debit' : 'credit';
         $r .= td(nbm($s), ' class="num"') . "<td>{$d}</td>";
         $r .= "</tr>";
     }
     $r .= "</table>";
     $r .= h2info('Résumé');
     $r .= '<table class="result">';
     $r .= '<tr>';
     $r .= th('Po') . th('Nom') . th('Débit', ' style="text-align:right"') . th('Crédit', 'style="text-align:right" ') . th('Solde', ' style="text-align:right"');
     $sum = $this->show_sum($array);
     $tot_cred = 0;
     $tot_deb = 0;
     foreach ($sum as $row) {
         $r .= '<tr>';
         $r .= '<td>' . $row['poste'] . '</td>';
         $r .= '<td>' . $row['desc'] . '</td>';
         $r .= '<td class="num">' . nbm($row['debit']) . '</td>';
         $r .= '<td class="num">' . nbm($row['credit']) . '</td>';
         $diff = bcsub($row['debit'], $row['credit']);
         $tot_cred = bcadd($tot_cred, $row['credit']);
         $tot_deb = bcadd($tot_deb, $row['debit']);
         $r .= td(nbm($diff), ' class="num" ');
         $r .= '<td>' . $row['dc'] . '</td>';
         $r .= '</tr>';
     }
     $r .= td('');
     $r .= td('total');
     $r .= td(nbm($tot_deb), 'class="num"');
     $r .= td(nbm($tot_cred), 'class="num"');
     $solde = bcsub($tot_deb, $tot_cred);
     $sign = $tot_cred < $tot_deb ? " - " : " + ";
     $r .= td($sign . nbm($solde), 'class="num" style="border:solid 1px blue;font-weight:bold"');
     $r .= '</tr>';
     $r .= '</table>';
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:95,代码来源:class_anc_balance_double.php


示例7: Sort_Table

 $header = new Sort_Table();
 $header->add('Login', $base_url, "order by use_login asc", "order by use_login desc", 'la', 'ld');
 $header->add('Nom', $base_url, "order by use_name asc,use_first_name asc", "order by use_name desc,use_first_name desc", 'na', 'nd');
 $header->add('Type d\'utilisateur', $base_url, "order by use_admin asc,use_login asc", "order by use_admin desc,use_login desc", 'ta', 'td');
 $order = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'la';
 $ord_sql = $header->get_sql_order($order);
 $repo = new Database();
 /*  Show all the active users, including admin */
 $user_sql = $repo->exec_sql("select use_id,\n                                            use_first_name,\n                                            use_name,\n                                            use_login,\n                                            use_admin\n                                                from ac_users left join jnt_use_dos using (use_id)\n\t\t\t\t\twhere use_login != 'phpcompta' and use_active=1\n\t\t\t\t\tand (dos_id=\$1  or (dos_id is null and use_admin=1))" . $ord_sql, array($gDossier));
 $MaxUser = Database::num_row($user_sql);
 echo '<TABLE class="result" style="width:80%;margin-left:10%">';
 echo "<tr>";
 echo '<th>' . $header->get_header(0) . '</th>';
 echo '<th>' . $header->get_header(1) . '</th>';
 echo th('prénom');
 echo th('profil');
 echo '<th>' . $header->get_header(2) . '</th>';
 for ($i = 0; $i < $MaxUser; $i++) {
     echo '<tr>';
     $l_line = Database::fetch_array($user_sql, $i);
     $str = "";
     $str = _('Utilisateur Normal');
     if ($l_line['use_admin'] == 1) {
         $str = _('Administrateur');
     }
     // get profile
     $profile = $cn->get_value("select p_name from profile\n\t\t\t\tjoin profile_user using(p_id) where user_name=\$1", array($l_line['use_login']));
     $url = $base_url . "&action=view&user_id=" . $l_line['use_id'];
     echo "<td>";
     echo HtmlInput::anchor($l_line['use_login'], $url);
     echo "</td>";
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:param_sec.inc.php


示例8: isset

 $ord = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'na';
 $sql_order = $header->get_sql_order($ord);
 $Res = $repocn->get_array("select *  from ac_dossier {$sql_order}");
 $compteur = 1;
 $template = "";
 echo '<div class="content">';
 echo '<span style="display:block">';
 echo _('Filtre') . HtmlInput::infobulle(23);
 echo HtmlInput::filter_table("t_dossier", "0,1,2", "1");
 echo '</span>';
 echo '<TABLE id="t_dossier" class="table_large" >';
 $r = "";
 $r .= '<th>' . $header->get_header(0) . '</td>';
 $r .= '<th>' . $header->get_header(1) . '</td>';
 $r .= '<th>' . $header->get_header(2) . '</td>';
 $r .= th(_('Taille')) . th(_('Nom base de données'));
 $r = tr($r);
 echo $r;
 // show all dossiers
 if ($Res != null) {
     foreach ($Res as $Dossier) {
         if ($compteur % 2 == 0) {
             $cl = 'class="odd"';
         } else {
             $cl = 'class="even"';
         }
         echo "<TR id=\"folder{$Dossier['dos_id']}\" {$cl}><TD style=\"vertical-align:top\"> " . $Dossier['dos_id'] . "</td><td> <B>" . h($Dossier['dos_name']) . "</B> </TD>";
         $str_name = domaine . 'dossier' . $Dossier['dos_id'];
         echo "<TD><I>  " . h($Dossier['dos_description']) . "</I></td>";
         $database_exist = $repocn->exist_database($str_name);
         if ($database_exist > 0) {
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:dossier.inc.php


示例9: th

 *   along with NOALYSS; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
/* $Revision$ */
// Copyright Author Dany De Bontridder [email protected]
/**
 * @file
 * @brief show detail of a operation of fin
 *
 */
echo '<table class="result">';
echo '<tr>';
echo th(_('Compte en banque'));
echo th(_('Tiers'));
echo th(_('Libellé'));
echo th(_('Montant'));
echo '</tr>';
echo '<tr>';
$bk = new Fiche($cn, $obj->det->array[0]['qf_bank']);
$view_card_detail = HtmlInput::card_detail($bk->get_quick_code(), h($bk->getName()), ' class="line" ');
echo td($view_card_detail);
$other = new Fiche($cn, $obj->det->array[0]['qf_other']);
$view_card_detail = HtmlInput::card_detail($other->get_quick_code(), h($other->getName()), ' class="line" ');
echo td($view_card_detail);
$comment = strip_tags($obj->det->jr_comment);
echo td($comment);
echo td(nbm($obj->det->array[0]['qf_amount']), ' class="inum"');
echo '</tr>';
echo '</table>';
?>
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:30,代码来源:operation_detail_fin.php


示例10: list

 /**
 * @brief Show all the operation
 * @param$sql is the sql stmt, normally created by build_search_sql
 * @param$offset the offset
 * @param$p_paid if we want to see info about payment
  \code
  // Example
  // Build the sql
  list($sql,$where)=$Ledger->build_search_sql($_GET);
  // Count nb of line
  $max_line=$cn->count_sql($sql);
 
  $step=$_SESSION['g_pagesize'];
  $page=(isset($_GET['offset']))?$_GET['page']:1;
  $offset=(isset($_GET['offset']))?$_GET['offset']:0;
  // create the nav. bar
  $bar=navigation_bar($offset,$max_line,$step,$page);
  // show a part
  list($count,$html)= $Ledger->list_operation($sql,$offset,0);
  echo $html;
  // show nav bar
  echo $bar;
 
  \endcode
 * \see build_search_sql
 * \see display_search_form
 * \see search_form
 
 * \return HTML string
 */
 public function list_operation($sql, $offset, $p_paid = 0)
 {
     global $g_parameter, $g_user;
     bcscale(2);
     $table = new Sort_Table();
     $gDossier = dossier::id();
     $amount_paid = 0.0;
     $amount_unpaid = 0.0;
     $limit = $_SESSION['g_pagesize'] != -1 ? " LIMIT " . $_SESSION['g_pagesize'] : "";
     $offset = $_SESSION['g_pagesize'] != -1 ? " OFFSET " . Database::escape_string($offset) : "";
     $order = "  order by jr_date_order asc,jr_internal asc";
     // Sort
     $url = "?" . CleanUrl();
     $str_dossier = dossier::get();
     $table->add(_("Date"), $url, 'order by jr_date asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc', 'order by  jr_date desc,substring(jr_pj_number,\'[0-9]+$\')::numeric desc', "da", "dd");
     $table->add(_('Echeance'), $url, " order by  jr_ech asc", " order by  jr_ech desc", 'ea', 'ed');
     $table->add(_('Paiement'), $url, " order by  jr_date_paid asc", " order by  jr_date_paid desc", 'eap', 'edp');
     $table->add(_('Pièce'), $url, ' order by  substring(jr_pj_number,\'[0-9]+$\')::numeric asc ', ' order by  substring(jr_pj_number,\'[0-9]+$\')::numeric desc ', "pja", "pjd");
     $table->add(_('Tiers'), $url, " order by  name asc", " order by  name desc", 'na', 'nd');
     $table->add(_('Montant'), $url, " order by jr_montant asc", " order by jr_montant desc", "ma", "md");
     $table->add(_("Description"), $url, "order by jr_comment asc", "order by jr_comment desc", "ca", "cd");
     $ord = !isset($_GET['ord']) ? 'da' : $_GET['ord'];
     $order = $table->get_sql_order($ord);
     // Count
     $count = $this->db->count_sql($sql);
     // Add the limit
     $sql .= $order . $limit . $offset;
     // Execute SQL stmt
     $Res = $this->db->exec_sql($sql);
     //starting from here we can refactor, so that instead of returning the generated HTML,
     //this function returns a tree structure.
     $r = "";
     $Max = Database::num_row($Res);
     if ($Max == 0) {
         return array(0, _("Aucun enregistrement trouvé"));
     }
     $r .= '<table class="result">';
     $r .= "<tr >";
     $r .= "<th>" . _("n° interne") . "</th>";
     if ($this->type == 'ALL') {
         $r .= th('Journal');
     }
     $r .= '<th>' . $table->get_header(0) . '</th>';
     if ($p_paid != 0) {
         $r .= '<th>' . $table->get_header(1) . '</td>';
     }
     if ($p_paid != 0) {
         $r .= '<th>' . $table->get_header(2) . '</th>';
     }
     $r .= '<th>' . $table->get_header(3) . '</th>';
     $r .= '<th>' . $table->get_header(4) . '</th>';
     $r .= '<th>' . $table->get_header(6) . '</th>';
     $r .= th('Notes', ' style="width:15%"');
     $r .= '<th>' . $table->get_header(5) . '</th>';
     // if $p_paid is not equal to 0 then we have a paid column
     if ($p_paid != 0) {
         $r .= "<th> " . _('Payé') . "</th>";
     }
     $r .= "<th>" . _('Concerne') . "</th>";
     $r .= "<th>" . _('Document') . "</th>";
     $r .= "</tr>";
     // Total Amount
     $tot = 0.0;
     $gDossier = dossier::id();
     for ($i = 0; $i < $Max; $i++) {
         $row = Database::fetch_array($Res, $i);
         if ($i % 2 == 0) {
             $tr = '<TR class="odd">';
         } else {
             $tr = '<TR class="even">';
//.........这里部分代码省略.........
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:101,代码来源:class_acc_ledger.php


示例11: array

        </ul> 

<div class="clearfix"></div>
<hr>

                
<?php 
$array = array("php" => "http://www.php.net/", "laravel" => "http://laravel.com/", "codeigniter" => "http://ellislab.com/codeigniter", "zend" => "http://framework.zend.com/", "wordpress" => "http://wordpress.org/", "html5" => "http://www.w3schools.com/html/html5_intro.asp", "css3" => "http://www.w3schools.com/css/DEFAULT.asp", "javascript" => "http://www.w3schools.com/js/DEFAULT.asp", "jquery" => "http://jquery.com/", "AngularJS" => "https://angularjs.org/", "json" => "http://www.json.org/", "less" => "http://lesscss.org/", "sass" => "http://sass-lang.com/", "java" => "http://www.java.com/", "smarty" => "http://www.smarty.net/", "regex" => "http://www.regular-expressions.info/", "composer" => "https://getcomposer.org", "tb" => "http://getbootstrap.com/", "emmet" => "http://emmet.io/", "photoshop" => "www.photoshop.com/", "excel" => "#", "word" => "#", "ccna" => "#", "ccnp" => "#");
?>

<div class="well">
<div class="row" id='tec8'>
<?php 
$i = 0;
foreach ($array as $img => $site) {
    echo "<div class='col-xs-6 col-sm-3 col-md-2'><a href='{$site}'><img src='" . th("cv/{$img}.jpg") . "' class='img-responsive img-thumbnail img-force'></a></div>";
    // if($i==5 || $i==11 || $i==17) echo "</div><br><div class='row'>";
    $i++;
}
?>
</div>
</div>



        <div class="clearfix"></div>
    </div>

    <div class="clearfix"></div>

开发者ID:Ahmed-Badawy,项目名称:ahmed-badawy.com-Website,代码行数:29,代码来源:cv_tools_used.blade.php


示例12: strval

        $sldig = $dt / 10 % 10;
        if ($sldig == 1) {
            return strval($dt) . "th";
        } else {
            switch ($ldig) {
                case 1:
                    return strval($dt) . "st";
                case 2:
                    return strval($dt) . "nd";
                case 3:
                    return strval($dt) . "rd";
            }
        }
    }
}
$pdf->Cell(0, 0, "on the " . th($dd) . " day of {$month}", 0, 1, 'L');
$pdf->Cell(0, 1, '', 0, 1);
$pdf->Cell(9, 0, '', 0, 0);
$pdf->SetFont("times", "R", 18);
$pdf->Cell(0, 0, $yr, 0, 1, 'L');
$pdf->Cell(0, 1, '', 0, 1);
$pdf->Cell(8, 0, '', 0, 0);
$pdf->Cell(0, 0, "in the Church of", 0, 1, 'L');
$pdf->Cell(0, 1, '', 0, 1);
$pdf->Cell(8, 0, '', 0, 0);
$pdf->Cell(0, 0.8, $confirmation->church, 0, 1, 'L');
draw_line($pdf, 22);
draw_line($pdf, 23);
$pdf->Cell(0, 4, '', 0, 1);
draw_line($pdf, 25.5);
$pdf->Cell(0, 0, 'Bishop                                              ', 0, 0, 'R');
开发者ID:srinidg,项目名称:stbennos-parish,代码行数:31,代码来源:view_cert.php


示例13: th_right

function th_right($x, $noesc = 0, $style = '', $col = 1, $field = '')
{
    return th($x, $noesc, 'text-align:right;' . $style, $col, $field);
}
开发者ID:lavanoid,项目名称:TorrentTrader3,代码行数:4,代码来源:mailbox-functions.php


示例14: Database

     require_once NOALYSS_INCLUDE . '/template/document_mod_change.php';
     break;
 case 'dsp_tva':
     $cn = new Database($gDossier);
     $Res = $cn->exec_sql("select * from tva_rate order by tva_rate desc");
     $Max = Database::num_row($Res);
     $r = "";
     $r = HtmlInput::anchor_close('tva_select');
     $r .= h2(_('Choisissez la TVA '), 'class="title"');
     $r .= '<div >';
     $r .= _('Filter') . " " . HtmlInput::filter_table("tva_select_table", '0,1,2,3', 1);
     $r .= '<TABLE style="width:100%" id="tva_select_table">';
     $r .= th(_('code'));
     $r .= th(_('Taux'));
     $r .= th(_('Symbole'));
     $r .= th(_('Explication'));
     for ($i = 0; $i < $Max; $i++) {
         $row = Database::fetch_array($Res, $i);
         if (!isset($compute)) {
             if (!isset($code)) {
                 $script = "onclick=\"\$('{$ctl}').value='" . $row['tva_id'] . "';removeDiv('tva_select');\"";
             } else {
                 $script = "onclick=\"\$('{$ctl}').value='" . $row['tva_id'] . "';set_value('{$code}','" . $row['tva_label'] . "');removeDiv('tva_select');\"";
             }
         } else {
             if (!isset($code)) {
                 $script = "onclick=\"\$('{$ctl}').value='" . $row['tva_id'] . "';removeDiv('tva_select');clean_tva('{$compute}');compute_ledger('{$compute}');\"";
             } else {
                 $script = "onclick=\"\$('{$ctl}').value='" . $row['tva_id'] . "';set_value('{$code}','" . $row['tva_label'] . "');removeDiv('tva_select');clean_tva('{$compute}');compute_ledger('{$compute}');\"";
             }
         }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:ajax_misc.php


示例15: strlen

                $val_length = strlen($d_val);
                $i = 0;
                while ($i++ < $tr_length) {
                    if ($i == 2) {
                        echo $d_val;
                        $i += $val_length - 1;
                    } else {
                        echo ' ';
                    }
                }
                echo '|';
            }
            echo PHP_EOL;
        }
    }
    echo PHP_EOL;
    ascLogo($table);
    line($table, '--  Exception Start  --');
    printf("\n Line: %s \n File: %s \n\n", $message['line'], $message['file']);
    th($table);
    thead($table);
    th($table);
    if (!empty($trace)) {
        foreach ($trace as $t) {
            tBody($t, $table);
            th($table);
        }
    }
    echo PHP_EOL;
    line($table, sprintf("--  Exception END  %s  --", date('Y-m-d H:i:s', time())));
}
开发者ID:ss7247,项目名称:crossphp,代码行数:31,代码来源:cli_error.tpl.php


示例16: select_ledger

 /**
  * return the html code to create an hidden div and a button
  * to show this DIV. This contains all the available ledgers
  * for the user in READ or RW
  *@param $selected is an array of checkbox
  *@param $div div suffix
  *@note the choosen ledger are stored in the array r_jrn (_GET)
  */
 static function select_ledger($p_type, $p_selected, $div = '')
 {
     global $g_user;
     $r = '';
     /* security : filter ledger on user */
     $p_array = $g_user->get_ledger($p_type, 3);
     ob_start();
     /* create a hidden div for the ledger */
     echo '<div id="div_jrn' . $div . '" >';
     echo HtmlInput::title_box(_("Journaux"), $div . "jrn_search");
     echo '<div style="padding:5px">';
     echo '<form method="GET" id="' . $div . 'search_frm" onsubmit="return hide_ledger_choice(\'' . $div . 'search_frm\')">';
     echo HtmlInput::hidden('nb_jrn', count($p_array));
     echo _('Filtre ') . HtmlInput::filter_table($div . 'tb_jrn', '0,1,2', 2);
     echo '<table class="result" id="' . $div . 'tb_jrn">';
     echo '<tr>';
     echo th(_('Nom'));
     echo th(_('Description'));
     echo th(_('Type'));
     echo '</tr>';
     echo '<tr>';
     echo '<td>';
     echo HtmlInput::button('sel_' . $div, _('Inverser la sélection'), ' onclick = "toggle_checkbox(\'' . "{$div}search_frm" . '\')"');
     echo '</td>';
     echo '</tr>';
     for ($e = 0; $e < count($p_array); $e++) {
         $row = $p_array[$e];
         $r = new ICheckBox($div . 'r_jrn' . $e, $row['jrn_def_id']);
         $idx = $row['jrn_def_id'];
         if ($p_selected != null && in_array($row['jrn_def_id'], $p_selected)) {
             $r->selected = true;
         }
         $class = $e % 2 == 0 ? ' class="even" ' : ' class="odd" ';
         echo '<tr ' . $class . '>';
         echo '<td style="white-space: nowrap">' . $r->input() . $row['jrn_def_name'] . '</td>';
         echo '<td >' . $row['jrn_def_description'] . '</td>';
         echo '<td >' . $row['jrn_def_type'] . '</td>';
         echo '</tr>';
     }
     echo '</table>';
     echo HtmlInput::hidden('div', $div);
     echo HtmlInput::submit('save', _('Valider'));
     echo HtmlInput::button_close($div . "jrn_search");
     echo '</form>';
     echo '</div>';
     echo '</div>';
     $ret = ob_get_contents();
     ob_end_clean();
     return $ret;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:58,代码来源:class_html_input.php


示例17: DisplayAttribut

 function DisplayAttribut($str = "")
 {
     if ($this->id == 0) {
         return;
     }
     $this->cn->exec_sql('select fiche_attribut_synchro($1)', array($this->id));
     $MaxLine = sizeof($this->attribut);
     $r = "<TABLE>";
     $r .= "<tr>" . th('Nom attribut') . th('') . th('Ordre', 'style="text-align:right"') . '</tr>';
     // Display each attribute
     $add_action = "";
     for ($i = 0; $i < $MaxLine; $i++) {
         $class = "even";
         if ($i % 2 == 0) {
             $class = "odd";
         }
         $r .= '<TR class="' . $class . '"><td>';
         // Can change the name
         if ($this->attribut[$i]->ad_id == ATTR_DEF_NAME) {
             continue;
         } else {
             if ($str == "remove") {
                 //Only for the not mandatory attribute (not defined in attr_min)
                 if ($this->cn->count_sql("select * from attr_min where frd_id=" . $this->fiche_def . " and ad_id = " . $this->attribut[$i]->ad_id) == 0 && $this->attribut[$i]->ad_id != ATTR_DEF_QUICKCODE && $this->attribut[$i]->ad_id != ATTR_DEF_ACCOUNT) {
                     $add_action = sprintf('</TD><TD> Supprimer <input type="checkbox" name="chk_remove[]" value="%d">', $this->attribut[$i]->ad_id);
                 } else {
                     $add_action = "</td><td>";
                 }
             }
             // The attribut.
             $a = sprintf('%s ', $this->attribut[$i]->ad_text);
             $r .= $a . $add_action;
             /*----------------------------------------  */
             /*  ORDER OF THE CARD */
             /*----------------------------------------  */
             $order = new IText();
             $order->name = 'jnt_order' . $this->attribut[$i]->ad_id;
             $order->size = 3;
             $order->value = $this->attribut[$i]->jnt_order;
             $r .= '</td><td> ' . $order->input();
         }
         $r .= '</td></tr>';
     }
     // Show the possible attribute which are not already attribute of the model
     // of card
     $Res = $this->cn->exec_sql("select ad_id,ad_text from attr_def\n                                 where\n                                 ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr\n                                 where fd_id=\$1) order by ad_text", array($this->id));
     $M = Database::num_row($Res);
     // Show the unused attribute
     $r .= '<TR> <TD>';
     $r .= '<SELECT NAME="ad_id">';
     for ($i = 0; $i < $M; $i++) {
         $l = Database::fetch_array($Res, $i);
         $a = sprintf('<OPTION VALUE="%s"> %s', $l['ad_id'], $l['ad_text']);
         $r .= $a;
     }
     $r .= '</SELECT>';
     $r .= "</TABLE>";
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:59,代码来源:class_fiche_def.php


示例18: page_index

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP th_order_by函数代码示例发布时间:2022-05-23
下一篇:
PHP tgmpa函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap