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; }
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; }
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 = " " . $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 = " " . $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; }
$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[' '] = 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']}");
$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;
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ébit</th>"; $r .= "<th style=\"text-align:right\">Cré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; }
$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>";
$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) {
* 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 danydb@aevalys.eu /** * @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>'; ?>
/** * @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">'; } $r .= $tr; //internal code // button modify $r .= "<TD>"; // If url contains // $href = basename($_SERVER['PHP_SELF']); $r .= sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>', $row['jr_id'], $gDossier, $row['jr_internal']); $r .= "</TD>"; if ($this->type == 'ALL') { $r .= td($row['jrn_def_name']); } // date $r .= "<TD>"; $r .= $row['str_jr_date']; $r .= "</TD>"; // echeance if ($p_paid != 0) { $r .= "<TD>"; $r .= $row['str_jr_ech']; $r .= "</TD>"; $r .= "<TD>"; $r .= $row['str_jr_date_paid']; $r .= "</TD>"; } // pj $r .= "<TD>"; $r .= $row['jr_pj_number']; $r .= "</TD>"; // Tiers $other = $row['quick_code'] != '' ? '[' . $row['quick_code'] . '] ' . $row['name'] . ' ' . $row['first_name'] : ''; $r .= td($other); // comment $r .= "<TD>"; $tmp_jr_comment = h($row['jr_comment']); $r .= $tmp_jr_comment; $r .= "</TD>"; $r .= td(h($row['n_text']), ' style="font-size:0.87em%"'); // Amount // If the ledger is financial : // the credit must be negative and written in red $positive = 0; // Check ledger type : if ($row['jrn_def_type'] == 'FIN') { $positive = $this->db->get_value("select qf_amount from quant_fin where jr_id=\$1", array($row['jr_id'])); if ($this->db->count() != 0) { $positive = $positive < 0 ? 1 : 0; } } $r .= "<TD align=\"right\">"; $t_amount = $row['jr_montant']; if ($row['total_invoice'] != null && $row['total_invoice'] != $row['jr_montant']) { $t_amount = $row['total_invoice']; } $tot = $positive != 0 ? bcsub($tot, $t_amount) : bcadd($tot, $t_amount); //STAN $positive always == 0 if ($row['jrn_def_type'] == 'FIN') { $r .= $positive != 0 ? "<font color=\"red\"> - " . nbm($t_amount) . "</font>" : nbm($t_amount); } else { $r .= $t_amount < 0 ? "<font color=\"red\"> " . nbm($t_amount) . "</font>" : nbm($t_amount); } $r .= "</TD>"; // Show the paid column if p_paid is not null if ($p_paid != 0) { $w = new ICheckBox(); $w->name = "rd_paid" . $row['jr_id']; $w->selected = $row['jr_rapt'] == 'paid' ? true : false; // if p_paid == 2 then readonly $w->readonly = $p_paid == 2 ? true : false; $h = new IHidden(); $h->name = "set_jr_id" . $row['jr_id']; $r .= '<TD>' . $w->input() . $h->input() . '</TD>'; if ($row['jr_rapt'] == 'paid') { $amount_paid = bcadd($amount_paid, $t_amount); } else { $amount_unpaid = bcadd($amount_unpaid, $t_amount); } } // Rapprochement $rec = new Acc_Reconciliation($this->db); $rec->set_jr_id($row['jr_id']); $a = $rec->get(); $r .= "<TD>"; if ($a != null) { foreach ($a as $key => $element) { $operation = new Acc_Operation($this->db); $operation->jr_id = $element; $l_amount = $this->db->get_value("select jr_montant from jrn " . " where jr_id={$element}"); $r .= "<A class=\"detail\" HREF=\"javascript:modifyOperation('" . $element . "'," . $gDossier . ")\" > " . $operation->get_internal() . "[" . nbm($l_amount) . "]</A>"; } //for } // if ( $a != null ) { $r .= "</TD>"; if ($row['jr_valid'] == 'f') { $r .= "<TD>" . _("Opération annulée") . "</TD>"; } else { } // else //document if ($row['jr_pj_name'] != "") { $r .= '<td>' . HtmlInput::show_receipt_document($row['jr_id']) . '</td>'; } else { $r .= "<TD></TD>"; } // end row $r .= "</tr>"; } $amount_paid = round($amount_paid, 4); $amount_unpaid = round($amount_unpaid, 4); $tot = round($tot, 4); $r .= "<TR>"; $r .= '<TD COLSPAN="5">Total</TD>'; $r .= '<TD ALIGN="RIGHT">' . nbm($tot) . "</TD>"; $r .= "</tr>"; if ($p_paid != 0) { $r .= "<TR>"; $r .= '<TD COLSPAN="5">' . _("Payé") . '</TD>'; $r .= '<TD ALIGN="RIGHT">' . nbm($amount_paid) . "</TD>"; $r .= "</tr>"; $r .= "<TR>"; $r .= '<TD COLSPAN="5">' . _("Non payé") . '</TD>'; $r .= '<TD ALIGN="RIGHT">' . nbm($amount_unpaid) . "</TD>"; $r .= "</tr>"; } $r .= "</table>"; return array($count, $r); }
</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>
$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');
function th_right($x, $noesc = 0, $style = '', $col = 1, $field = '') { return th($x, $noesc, 'text-align:right;' . $style, $col, $field); }
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}');\""; } }
$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()))); }
/** * 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; }
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; }
function page_index() { global $go; // default/validate $_GET $go['page'] = getURI('page', 0, 'digit', 5); $this->template->location = $this->lang->word('main'); // sub-locations $this->template->sub_location[] = array($this->lang->word('referrers'), "?a={$go['a']}&q=refer"); $this->template->sub_location[] = array($this->lang->word('page visits'), "?a={$go['a']}&q=hits"); load_module_helper('files', $go['a']); $today = convertToStamp(getNow()); $day = substr($today, 6, 2); $mn = substr($today, 4, 2); $yr = substr($today, 0, 4); $thirtydays = date('Y-m-d', mktime('00', '00', '00', $mn - 1, $day, $yr)); // ++++++++++++++++++++++++++++++++++++++++++++++++++++ $body = "<div class='half'>\n"; $body .= "<div class='cola'>\n"; $total_since_hits = $this->db->getCount("SELECT count(*) FROM " . PX . "stats"); $total_since_unique_hits = $this->db->getCount("SELECT COUNT(DISTINCT hit_addr) AS 'total' FROM " . PX . "stats"); $total_since_refer_hits = $this->db->getCount("SELECT COUNT(DISTINCT hit_addr) AS 'total' FROM " . PX . "stats WHERE hit_referrer != ''"); $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('since'), "class='toptext' width='40%'"); $body .= th($this->lang->word('total'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('unique'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('refers'), "class='toptext cell-middle' width='20%'"); $body .= "</tr>\n"; $body .= "<tr class='over'>\n"; $body .= td(convertDate($this->access->settings['installdate'], $this->access->prefs['user_offset'], $this->access->prefs['user_format']), "class='cell-doc'"); $body .= td('<b>' . $total_since_hits . '</b>', "class='cell-middle'"); $body .= td('<b>' . $total_since_unique_hits . '</b>', "class='cell-middle'"); $body .= td('<b>' . $total_since_refer_hits . '</b>', "class='cell-middle'"); $body .= "</tr>\n"; $body .= "</table>\n"; // ++++++++++++++++++++++++++++++++++++++++++++ // dailies $days = getDailyHits(null); $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('this week'), "class='toptext' width='40%'"); $body .= th($this->lang->word('total'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('unique'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('refers'), "class='toptext cell-middle' width='20%'"); $body .= "</tr>\n"; $i = 1; foreach ($days as $key => $out) { $body .= "<tr" . row_color(" class='color'") . ">\n"; $body .= td($this->lang->word($key), "class='cell-doc'"); $body .= td($this->db->getCount("SELECT count(*) FROM " . PX . "stats WHERE hit_time > '{$out['0']}' AND hit_time < '{$out['1']}'"), "class='cell-middle'"); $body .= td($this->db->getCount("SELECT count(DISTINCT hit_addr) FROM " . PX . "stats WHERE hit_time > '{$out['0']}' AND hit_time < '{$out['1']}'"), "class='cell-middle'"); $body .= td($this->db->getCount("SELECT count(DISTINCT hit_addr) FROM " . PX . "stats WHERE hit_time > '{$out['0']}' AND hit_time < '{$out['1']}' AND hit_referrer != ''"), "class='cell-middle'"); $body .= "</tr>\n"; $i++; } $body .= "</table>\n"; // ++++++++++++++++++++++++++++++++++++++++++++ $week = getWeekHits(null); $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('this month'), "class='toptext' width='40%'"); $body .= th($this->lang->word('total'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('unique'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('refers'), "class='toptext cell-middle' width='20%'"); $body .= "</tr>\n"; $i = 1; foreach ($week as $key => $out) { $body .= "<tr" . row_color(" class='color'") . ">\n"; $body .= td($this->lang->word($key), "class='cell-doc'"); $body .= td($this->db->getCount("SELECT count(*) FROM " . PX . "stats WHERE hit_time > '{$out['0']}' AND hit_time < '{$out['1']}'"), "class='cell-middle'"); $body .= td($this->db->getCount("SELECT count(DISTINCT hit_addr) FROM " . PX . "stats WHERE hit_time > '{$out['0']}' AND hit_time < '{$out['1']}'"), "class='cell-middle'"); $body .= td($this->db->getCount("SELECT count(DISTINCT hit_addr) FROM " . PX . "stats WHERE hit_time > '{$out['0']}' AND hit_time < '{$out['1']}' AND hit_referrer != ''"), "class='cell-middle'"); $body .= "</tr>\n"; $i++; } $body .= "</table>\n"; // ++++++++++++++++++++++++++++++++++++++++++++ $months = getMonthlyHits(null); $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('year'), "class='toptext' width='40%'"); $body .= th($this->lang->word('total'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('unique'), "class='toptext cell-middle' width='20%'"); $body .= th($this->lang->word('refers'), "class='toptext cell-middle' width='20%'"); $body .= "</tr>\n"; $i = 1; foreach ($months as $key => $out) { $numero = $this->db->getCount("SELECT count(*) FROM " . PX . "stats WHERE hit_time LIKE '{$out['0']}%'"); $body .= "<tr" . row_color(" class='color'") . ">\n"; $body .= td($this->lang->word($key), "class='cell-doc'"); $body .= td($numero, "class='cell-middle'"); $body .= td($this->db->getCount("SELECT count(DISTINCT hit_addr) FROM " . PX . "stats WHERE hit_time LIKE '{$out['0']}%'"), "class='cell-middle'"); $body .= td($this->db->getCount("SELECT count(DISTINCT hit_addr) FROM " . PX . "stats WHERE hit_time LIKE '{$out['0']}%' AND hit_referrer != ''"), "class='cell-middle'"); $body .= "</tr>\n"; $i++; } $body .= "</table>\n"; $body .= "</div>\n"; // ++++++++++++++++++++++++++++++++++++++++++++ $body .= "<div class='colb'>\n"; // ++++++++++++++++++++++++++++++++++++++++++++ // top referrers... // we need to forget our own host... $repeat = $this->db->fetchArray("SELECT hit_referrer,hit_domain, COUNT(hit_referrer) AS 'refer' FROM " . PX . "stats WHERE hit_referrer != '' AND hit_domain != '' AND hit_time > '{$thirtydays}' GROUP by hit_referrer ORDER BY refer DESC LIMIT 10"); if (is_array($repeat)) { $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('top 10 referrers') . ' ' . span("(" . $this->lang->word('past 30') . ")", "class='small-txt'"), "class='toptext' width='75%'"); $body .= th('Total', "class='toptext cell-middle' width='25%'"); $body .= "</tr>\n"; $i = 1; foreach ($repeat as $out) { $body .= "<tr" . row_color(" class='color'") . ">\n"; $host = parse_url($out['hit_referrer']); $body .= td(href($out['hit_domain'], $out['hit_referrer'], "target='_new'"), "class='cell-doc'"); $body .= td($out['refer'], "class='cell-middle'"); $body .= "</tr>\n"; $i++; } $body .= "</table>\n"; } // top search terms... $terms = $this->db->fetchArray("SELECT hit_keyword, COUNT(hit_keyword) AS 'keywords' FROM " . PX . "stats WHERE hit_keyword != '' AND hit_time > '{$thirtydays}' GROUP by hit_keyword ORDER BY keywords DESC LIMIT 10"); if (is_array($terms)) { $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('top 10 keywords') . ' ' . span("(" . $this->lang->word('past 30') . ")", "class='small-txt'"), "class='toptext' width='75%'"); $body .= th('Total', "class='toptext cell-middle' width='25%'"); $body .= "</tr>\n"; $i = 1; foreach ($terms as $out) { $body .= "<tr" . row_color(" class='color'") . ">\n"; $keyword = $out['hit_keyword'] === '' ? 'Unknown' : $out['hit_keyword']; $body .= td($keyword, "class='cell-doc'"); $body .= td($out['keywords'], "class='cell-middle'"); $body .= "</tr>\n"; $i++; } $body .= "</table>\n"; } // if installed... // top countries... $cntry = $this->db->fetchArray("SELECT hit_country, COUNT(hit_country) AS 'total' FROM " . PX . "stats WHERE hit_country != '' AND hit_time > '{$thirtydays}' GROUP by hit_country ORDER BY total DESC LIMIT 10"); if (is_array($cntry)) { $body .= "<table class='table380' cellpadding='0' cellspacing='0' border='0'>\n"; $body .= "<tr>\n"; $body .= th($this->lang->word('top 10 countries') . ' ' . span("(" . $this->lang->word('past 30') . ")", "class='small-txt'"), "class='toptext' width='75%'"); $body .= th('Total', "class='toptext cell-middle' width='25%'"); $body .= "</tr>\n"; $i = 1; foreach ($cntry as $out) { $body .= "<tr" . row_color(" class='color'") . ">\n"; $country = $out['hit_country'] === '' ? 'Unknown' : $out['hit_country']; $body .= td($country, "class='cell-doc'"); $body .= td($out['total'], "class='cell-middle'"); $body .= "</tr>\n"; $i++; } $body .= "</table>\n"; } // ++++++++++++++++++++++++++++++++++++++++++++ $body .= "</div>\n"; // ++++++++++++++++++++++++++++++++++++++++++++ $body .= "<div class='cl'><!-- --></div>\n\n"; $body .= "</div>\n"; $this->template->body = $body; return; }
echo _("Filtre"); ?> : <?php $col = ""; $sp = ""; for ($e = 0; $e < count($aHeading); $e++) { $col .= $sp . $e; $sp = ","; } echo HtmlInput::filter_table("fiche_tb_id", $col, '1'); ?> <table id="fiche_tb_id" class="sortable"> <tr> <?php echo th(_('Détail')); for ($i = 0; $i < count($aHeading); $i++) { $span = ""; $sort = ""; if ($i == 0) { $span = '<span id="sorttable_sortfwdind"> ▾</span>'; $sort = 'class="sorttable_sorted"'; } echo '<th ' . $sort . '>' . $aHeading[$i]->ad_text . $span . '</th>'; } ?> </tr> <?php $e = 0; foreach ($array as $row) { $e++;
function hrow2($c1, $c2) { return tr(th($c1, 'left') . td($c2)); }
/* skip if nothing to display */ if (count($letter->content) == 0) { continue; } $detail_card = HtmlInput::card_detail($row->strAttribut(ATTR_DEF_QUICKCODE), $row->strAttribut(ATTR_DEF_NAME)); echo '<h2>' . $detail_card; echo "poste " . ":" . HtmlInput::history_account($row->strAttribut(ATTR_DEF_ACCOUNT), $row->strAttribut(ATTR_DEF_ACCOUNT), 'display:inline') . HtmlInput::infobulle(27) . '</h2>'; echo '<table class="result">'; echo '<tr>'; echo th(_('Date')); echo th(_('ref')); echo th(_('Interne')); echo th(_('Comm')); echo th(_('Montant'), 'style="width:auto" colspan="2"'); echo th(_('Prog.')); echo th(_('Let.')); echo '</tr>'; $amount_deb = 0; $amount_cred = 0; $prog = 0; bcscale(2); for ($i = 0; $i < count($letter->content); $i++) { $row = $letter->content[$i]; $html_letter = ""; if ($row['letter'] != -1) { $html_letter = strtoupper(base_convert($row['letter'], 10, 36)); } if ($i % 2 == 0) { echo '<tr class="even" name="tr_' . $html_letter . '_">'; } else { echo '<tr class="odd" name="tr_' . $html_letter . '_">';
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } $path = 'application/views/laporan'; link_js('FusionCharts.js', 'asset/js'); link_js('penjualan_graph.js', $path . '/js'); panel_begin('Grafik Penjualan'); panel_multi('grafikpenjualan', 'block', false); if ($all_grafikpenjualan != '') { addText(array('Bulan', 'Tahun', '', '', 'Model Grafik'), array("<select id='bln' name='bln'></select>", "<select id='thn' name='thn'></select>", "<input type='button' id='okelah' value='OK'>", '', "<select id='j_graph' name='j_graph'>\r\n\t\t\t \t <option value='FCF_MSLine' selected>Grafik Garis</option>\r\n\t\t\t \t <option value='FCF_MSColumn3D'>Grafik Bar 3D</option>\r\n\t\t\t\t <option value='FCF_MSArea2D'>Grafik Area</option>\r\n\t\t\t\t </select>")); echo "<div id='chartdiv' align='center'>"; echo tabel() . "<thead>"; echo tr('headere\' align=\'left') . th('Kalkulasi Data'); echo _tr() . "</thead><tbody>"; /**/ echo _tabel(true); echo "</div>"; } else { no_auth(); } panel_multi_end(); panel_end(); loading_ajax(); ?> <script language="javascript"> $(document).ready(function(e) { });
echo th(_('Description')); if ($owner->MY_TVA_USE == 'Y') { echo th(_('Taux TVA'), 'style="text-align:right"'); } else { echo th(''); } echo th(_('Prix/Un.'), 'style="text-align:right"'); echo th(_('Quantité'), 'style="text-align:right"'); echo th(_('Non ded'), 'style="text-align:right"'); if ($owner->MY_TVA_USE == 'Y') { echo th(_('HTVA'), 'style="text-align:right"'); echo th(_('TVA ND'), 'style="text-align:right"'); echo th(_('TVA'), 'style="text-align:right"'); echo th(_('TVAC'), 'style="text-align:right"'); } else { echo th(_('Total'), 'style="text-align:right"'); } if ($owner->MY_ANALYTIC != 'nu') { $anc = new Anc_Plan($cn); $a_anc = $anc->get_list(' order by pa_id '); $x = count($a_anc); /* set the width of the col */ /* add hidden variables pa[] to hold the value of pa_id */ $str_anc .= '<tr><th>Code</th><th>Montant</th><th colspan="' . $x . '">' . _('Compt. Analytique') . Anc_Plan::hidden($a_anc) . '</th></tr>'; } echo '</tr>'; for ($e = 0; $e < count($obj->det->array); $e++) { $row = ''; $q = $obj->det->array[$e]; $fiche = new Fiche($cn, $q['qp_fiche']); $qcode = $fiche->strAttribut(ATTR_DEF_QUICKCODE);
echo 'solde Fin' . $nend_extrait->input(); echo IButton::tooggle_checkbox('rec1'); echo '</p>'; echo '<p>'; echo _('Filtre') . HtmlInput::infobulle(25); echo HtmlInput::filter_table("t_rec_bk", "0,1,2,3", "1"); echo '</p>'; echo HtmlInput::submit('save', 'Mettre à jour le n° de relevé bancaire'); echo '<span style="display:block">'; echo '</span>'; echo '<table id="t_rec_bk" class="sortable" style="width:90%;margin-left:5%">'; $r = '<th class=" sorttable_sorted_reverse">' . 'Date ' . HtmlInput::infobulle(17) . '<span id="sorttable_sortrevind"> ▴</span>' . '</th>'; $r .= th('Libellé'); $r .= th('N° interne'); $r .= th('Montant', ' style="text-align:right"'); $r .= th('Selection', ' style="text-align:center" '); echo tr($r); $iradio = new ICheckBox('op[]'); $tot_not_reconcilied = 0; $diff = 0; for ($i = 0; $i < count($operation); $i++) { $row = $operation[$i]; $r = ''; $js = HtmlInput::detail_op($row['jr_id'], $row['jr_internal']); $r .= '<td sorttable_customkey="' . $row['raw_date'] . '">' . $row['fmt_date'] . '</td>'; $r .= td($row['jr_comment']); $r .= td($js); $amount = $cn->get_value('select qf_amount from quant_fin where jr_id=$1', array($row['jr_id'])); $r .= '<td class="num" class="sorttable_numeric" sorttable_customkey="' . $amount . '" style="text-align:right">' . nbm($amount) . '</td>'; $diff = bcadd($diff, $amount); $tot_not_reconcilied += $row['jr_montant'];
<?php $cycleClass = new Cycle('class="col1"', 'class="col2"'); ?> <table cellspacing="0" cellpadding="4" class="cycles caches"> <caption><?php echo _T('Caches'); ?> </caption> <tr> <?php echo th(N_("cache.cache")), th(N_("cache.slots")), th(N_("cache.size")), th(N_("cache.avail")), th(N_("cache.blocksgraph")), th(N_("cache.operations")), th(N_("cache.status")), th(N_("cache.hits")), th(N_("cache.hits_graph")), th(N_("cache.hits_avg_h")), th(N_("cache.hits_avg_s")), th(N_("cache.updates")), th(N_("cache.skips")), th(N_("cache.ooms")), th(N_("cache.errors")), th(N_("cache.readonly_protected")), th(N_("cache.cached")), th(N_("cache.deleted")), th(N_("cache.gc_timer")); ?> </tr> <?php $numkeys = explode(',', 'slots,size,avail,hits,updates,skips,ooms,errors,cached,deleted'); $l_clear = _T('Clear'); $l_disabled = _T('Disabled'); $l_disable = _T('Disable'); $l_enable = _T('Enable'); $l_compiling = _T('Compiling'); $l_normal = _T('Normal'); $l_confirm = _T('Sure?'); foreach (getCacheInfos() as $i => $ci) { $class = $cycleClass->next(); echo <<<TR \t<tr {$class}> TR; $pvalue = (int) ($ci['avail'] / $ci['size'] * 100); $pempty = 100 - $pvalue;
/** * An easy way to make a paginated bootStrapTable * * @param String $sql * @param Array $buttons * @param String $hideColumns * @param String $toolbar * @param Integer $rowLimit * @param Integer $selected_page * @param Array $customFields * @param String $name * @param String $class * @param Boolean $paginate * @param Boolean $searchable * @param Boolean $checked * @param String $checkPostURL * @return type */ function bootStrapTable($sql = "select * from user_detail", $buttons = "", $hideColumns = "", $toolbar = "My Grid", $customFields = null, $name = "grid", $tableInfo = "", $formHideFields = "", $class = "table table-striped", $rowLimit = 10, $paginate = true, $searchable = true, $checked = false, $selected_page = 1, $checkedPostURL = "", $checkSingleSelect = true, $event = "", $mobiletooltip = "") { $DEB = $this->DEB; $hideColumns = explode(",", strtoupper($hideColumns)); $object = rawurlencode(json_encode(func_get_args())); $paginating = "false"; if ($paginate) { $paginating = "true"; } $options = ["id" => $name, "class" => $class, "data-toolbar" => "#toolbar" . $name, "data-pagination" => "{$paginating}", "data-side-pagination" => "server", "data-search" => "false", "data-height" => "400", "data-page-list" => "[5, 10, 20, 50, 100, 200]", "data-page-size" => $rowLimit]; if ($searchable) { $options["data-search"] = "true"; } if ($checked) { $options["data-click-to-select"] = "true"; if ($checkSingleSelect) { $options["data-single-select"] = "true"; } } $data = @$DEB->getRow("select first 1 * from ({$sql}) t "); $fieldInfo = @$DEB->fieldinfo; if (empty($fieldInfo)) { die("Perhaps the SQL for this query is broken {$sql} or the table does not exist, have you specified the correct database in your Cody initialization, Try running migrations with maggy"); } $header = ""; if ($checked) { $header .= th(["data-field" => "checked" . $name . "[]", "class" => "text-left", "data-checkbox" => "true"], ""); } foreach ($fieldInfo as $fid => $field) { if (!in_array(strtoupper($field["name"]), $hideColumns)) { if (isset($customFields[$field["name"]])) { $customField = $customFields[$field["name"]]; if (empty($customField["type"])) { $customField["type"] = "text"; } switch ($customField["type"]) { default: $header .= th(["data-field" => $field["name"], "class" => "text-" . $field["align"], "data-sortable" => "true"], ucwords(str_replace("_", " ", strtolower($field["alias"])))); break; case "checkbox": $header .= th(["data-field" => $field["name"], "class" => "text-" . $field["align"], "data-checkbox" => "true"], ""); break; case "hidden": $header .= th(["data-field" => $field["name"], "class" => "hidden"], ucwords(str_replace("_", " ", strtolower($field["alias"])))); break; } } else { $header .= th(["data-field" => $field["name"], "class" => "text-" . $field["align"], "data-sortable" => "true"], ucwords(str_replace("_", " ", strtolower($field["alias"])))); } } } $addColumn = ""; if ($buttons) { $addColumn .= th(["data-field" => "BUTTONS"], "Options"); } $header = thead(tr($header . $addColumn)); if (empty($toolbar["caption"])) { $toolbar = array(); $toolbar["caption"] = ""; } $insertButton = $this->bootStrapButton("btnInsert", "Add", "call{$name}Ajax('/cody/form/insert','{$name}Target', {object : a{$name}object, record: null, db: '{$DEB->tag}' })", "btn btn-success pull-left", "", true); if (empty($toolbar["buttons"])) { $toolbar["buttons"] = ""; } $toolbar["buttons"] = $insertButton . $toolbar["buttons"]; if (empty($toolbar["filter"])) { $toolbar["filter"] = ""; } $tableHeading = ""; if (!empty($toolbar["caption"])) { $tableHeading = h3($toolbar["caption"]) . hr(); } $toolbarButtons = $toolbar["buttons"]; $toolbarFilters = $toolbar["filter"]; if ($searchable) { $toolbarFilters .= div(["class" => "search"], input(["id" => "search{$name}", "class" => "search form-control", "type" => "text", "placeholder" => "Search " . $toolbar["caption"], "onkeyup" => '$table' . $name . '.bootstrapTable(\'getData\')'])); } $toolbarFilters = div(["class" => "form-inline", "role" => "form"], $toolbarFilters); $html = $tableHeading . div(["class" => "table-responsive"], div(["class" => "table-toolbar clearfix"], div(["class" => "toolbar-buttons"], $toolbarButtons) . div(["class" => "toolbar-filters"], $toolbarFilters)) . table($options, $header, tbody())); $html .= script(' var a' . $name . 'object = "' . $object . '"; var $table' . $name . ' = $("#' . $name . '").bootstrapTable({search : false, url : "/cody/data/ajax/' . $this->DEB->tag . '", method : "post", onCheck: function (row) { eventType = \'check\'; ' . $event . ' }, onUnCheck: function (row) { eventType = \'uncheck\'; ' . $event . ' }, queryParams: function (p) { return {object: a' . $name . 'object, limit: p.limit, offset :p.offset, order: p.order, search : $("#search' . $name . '").val(), sort: p.sort } } }); $search = $("#search' . $name . '"); var timeoutId = null; $search.off("keyup").on("keyup", function (event) { clearTimeout(timeoutId); timeoutId = setTimeout(function () { $table' . $name . '.bootstrapTable("refresh", {pageNumber: 1}); }, 1000); }); '); if ($checked) { $html = form(["method" => "post", "action" => $checkedPostURL, "enctype" => "multipart/form-data"], $html); } $html .= div(["id" => "{$name}Target"]); $html .= $this->ajaxHandler("", "{$name}Target", "call{$name}Ajax"); return $html; }
$header->add(_("Nom"), $url, " order by use_name asc,use_first_name asc", "order by use_name desc,use_first_name desc", "na", "nd"); $header->add(_('Dossier'), $url, ' order by ag_dossier asc', 'order by ag_dossier desc', 'da', 'dd'); $header->add(_("Actif"), $url, " order by use_active asc", "order by use_active desc", "aa", "ad"); $ord = isset($_REQUEST['ord']) ? $_REQUEST['ord'] : 'la'; $sql = $header->get_sql_order($ord); $a_user = $repo->get_user_folder($sql); if (!empty($a_user)) { echo '<span style="display:block">'; echo _('Filtre') . HtmlInput::infobulle(22); echo HtmlInput::filter_table("user", "0,1,2,5", "1"); echo '</span>'; echo '<table id="user" class="result">'; echo '<tr>'; echo '<th>' . $header->get_header(0) . '</th>'; echo '<th>' . $header->get_header(1) . '</th>'; echo th(_("Prénom")); echo '<th>' . $header->get_header(3) . '</th>'; echo "<th>" . _('Type') . "</th>"; echo '<th>' . $header->get_header(2) . '</th>'; echo '</tr>'; foreach ($a_user as $r_user) { $compteur++; $class = $compteur % 2 == 0 ? "odd" : "even"; echo "<tr class=\"{$class}\">"; if ($r_user['use_active'] == 0) { $Active = $g_failed; } else { $Active = $g_succeed; } $det_url = $url . "&det&use_id=" . $r_user['use_id']; echo "<td>";
if (!defined('ALLOWED')) { die('Appel direct ne sont pas permis'); } require_once NOALYSS_INCLUDE . '/class_user.php'; require_once NOALYSS_INCLUDE . '/class_acc_bilan.php'; global $g_captcha, $g_failed, $g_succeed; $cn = new Database(dossier::id()); $exercice = $g_user->get_exercice(); echo '<div class="content">'; $sql_year = " and j_tech_per in (select p_id from parm_periode where p_exercice='" . $g_user->get_exercice() . "')"; echo '<div class="myfieldset"><h1 class="legend">' . _('Vérification des journaux') . '</h1>'; $sql = "select jrn_def_id,jrn_def_name from jrn_def"; $res = $cn->exec_sql($sql); $jrn = Database::fetch_all($res); echo '<table class="result">'; echo tr(th(_('Journal')) . th(_('Débit'), ' style="display:right"') . th(_("Crédit"), ' style="display:right"') . th(_("Différence"), ' style="display:right"') . th('')); $ix = 0; foreach ($jrn as $l) { $id = $l['jrn_def_id']; $name = $l['jrn_def_name']; $deb = $cn->get_value("select sum (j_montant) from jrnx where j_debit='t' and j_jrn_def={$id} {$sql_year} "); $cred = $cn->get_value("select sum (j_montant) from jrnx where j_debit='f' and j_jrn_def={$id} {$sql_year} "); if ($cred == $deb) { $result = $g_succeed; } else { $result = $g_failed; } $class = $ix % 2 == 0 ? 'odd' : "even"; print tr(td($name) . td(nbm($deb), 'class="num"') . td(nbm($cred), 'class="num"') . td(nbm($result), 'class="num"') . td($result), "class=\"{$class}\""); $ix++; }
</h1> <?php } ?> <div class="content"> <?php ?> <table class="result"> <tr> <?php echo th(_('Poste Comptable')); echo th(_('Quick Code')); echo th(_('Libellé')); echo th(_('Débit'), ' style="text-align:right"'); echo th(_('Crédit'), ' style="text-align:right"'); echo '</tr>'; for ($e = 0; $e < count($detail->det->array); $e++) { $row = ''; $q = $detail->det->array; $view_history = sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:view_history_account(\'%s\',\'%s\')" >%s</A>', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']); $row .= td($view_history); if ($q[$e]['j_qcode'] != '') { $fiche = new Fiche($cn); $fiche->get_by_qcode($q[$e]['j_qcode']); $view_history = sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>', $fiche->id, $gDossier, $q[$e]['j_qcode']); } else { $view_history = ''; } $row .= td($view_history); if ($q[$e]['j_text'] == "") {
<?php include_once $fsConfig - th() . 'view/partial/head.php'; ?> <div class="container container-fluid"> <h1>Orden servicio</h1> <a href=" <?php config::getUrl(); ?> index.php/ordenServicio/nuevo" class="btn-success">Nuevo</a> <table border="1"> <thead> <tr> <th><input type="checkbox" id="" name=""></th> <th>identificacion orden servicio</th> <th>identificacion de la maquina</th> <th>identificacion del tipo mantenimiento</th> <th>identificacion del tercero elabora</th> <th>identificacion del tercero realiza</th> <th>orden servicio fecha</th> <th>orden servicio observacion</th> <th>created</th> </tr> </thead> <tbody> <?php if ($objordenServicio !== false) { ?>