/** * Execute the console command. * * @return void */ public function fire() { // Check file exists if (!File::exists($this->argument('file'))) { $this->comment('No coverage file found, skipping.'); return 0; } // Open serialised file $serialised = File::get($this->argument('file')); if (!Str::startsWith($serialised, '<?php')) { $coverage = unserialize($serialised); // Require PHP object in file } else { $coverage = (require $this->argument('file')); } // Check coverage percentage $total = $coverage->getReport()->getNumExecutableLines(); $executed = $coverage->getReport()->getNumExecutedLines(); $percentage = nf($executed / $total * 100, 2); // Compare percentage to threshold $threshold = $this->argument('threshold'); if ($percentage >= $threshold) { $this->info("Code Coverage of {$percentage}% is higher than the minimum threshold required {$threshold}%!"); return; } // Throw error $this->error("Code Coverage of {$percentage}% is below than the minimum threshold required {$threshold}%!"); return 1; }
function stats_render() { global $DBc; $html = ""; $res = $DBc->sqlQuery("SELECT SUM(sp_money) as all_money, AVG(sp_money) as avg_money, COUNT(*) as playercount FROM app_achievements.stat_players as s, webig.players as p, ring_live.characters as c, nel.user as n WHERE s.sp_char = p.id AND p.cid = c.char_id AND c.user_id = n.uid AND n.privilege=''"); $html .= "<b>Total characters</b>: " . nf($res[0]['playercount']) . "<p>"; #$res = $DBc->sqlQuery("SELECT SUM(sp_money) as anz FROM stat_players"); $html .= "<b>Total money</b>: " . nf($res[0]['all_money']) . "<p>"; #$res = $DBc->sqlQuery("SELECT AVG(sp_money) as anz FROM stat_players"); $html .= "<b>Average money</b>: " . nf($res[0]['avg_money']) . "<p>"; $res = $DBc->sqlQuery("SELECT sp_money FROM app_achievements.stat_players as s, webig.players as p, ring_live.characters as c, nel.user as n WHERE s.sp_char = p.id AND p.cid = c.char_id AND c.user_id = n.uid AND n.privilege='' ORDER by sp_money ASC LIMIT " . floor($res[0]['playercount'] / 2) . ",1"); $html .= "<b>Mean money</b>: " . nf($res[0]['sp_money']) . "<p>"; return $html; }
/** * admin_custom_room_column() * * Display custom column data * * @param none * @return none */ function admin_custom_room_column($column, $post_id) { switch ($column) { case 'room_status': $status = get_field('room_status', $post_id); echo sprintf('<span class="badge %s">%s</span>', sanitize_title_with_dashes($status), $status); break; case 'room_type': echo get_room_type($post_id)->post_title; break; case 'room_price': echo nf(get_field('price', $post_id)); break; } }
<td align="right" style="font-size: 14px;">$<?php echo nf($a_order['shipping_price']); ?> </td> </tr> <tr> <td align="right" style="font-weight: bold; font-size: 14px;">GST (Included)</td> <td align="right" style="font-size: 14px;">$<?php echo nf($total->gst_inclusive); ?> </td> </tr> <tr> <td align="right" style="font-weight: bold; font-size: 14px;">Total</td> <td align="right" style="font-size: 14px;">$<?php echo nf($total->total_price_nf - $a_order['discount_amount']); ?> </td> </tr> </tbody> </table> <?php } ?> </p> <?php } ?>
function ach_render_progressbar($prog, $val, $width) { $val = max(1, $val); $left = floor($width * (100 * ($prog / $val)) / 100); $html = "\r\n\t\t<table width='" . $width . "px' cellspacing='0' cellpadding='0' style='border:1px solid #FFFFFF;color:#000000;'>\r\n\t\t\t<tr>\r\n\t\t\t\t<td bgcolor='#66CC00' width='" . $left . "px' align='right'>"; if ($prog / $val > 0.85) { $html .= " " . nf($prog) . " / " . nf($val) . " "; } $html .= "</td>\r\n\t\t\t\t<td align='left' style='color:#FFFFFF;'>"; if ($prog / $val <= 0.85) { $html .= " " . nf($prog) . " / " . nf($val) . " "; } $html .= "</td>\r\n\t\t\t</tr>\r\n\t\t</table>"; return $html; }
<div class="col-xs-12 text-center"> <div class="huge"><?php echo nf((double) get_year_sales()); ?> </div> <div>This Year</div> </div> </div> </div> </div> <div class="col-lg-3 col-md-6"> <div class="panel panel-violet"> <div class="panel-heading"> <div class="col-xs-12 text-center"> <div class="huge"><?php echo nf((double) get_last_year_sales()); ?> </div> <div>Last Year</div> </div> </div> </div> </div> </div> <div class="row"> <div class="graph-wrapper col-md-12"> <div id="legend"></div> <canvas id="canvas"></canvas> </div> </div>
</span></li> <li><span>Bed</span><span><?php the_field('bed', $data['room_type_ID']); ?> </span></li> <li><span>View</span><span><?php the_field('view', $data['room_type_ID']); ?> </span></li> <li> <span>Total Room <?php echo $data['no_of_room']; ?> </span> <span><?php echo nf($data['amount']); ?> </span> </li> </ul> </div> <div class="reservation-room-seleted_total"> <label>TOTAL</label> <span class="reservation-total"> <?php echo format_price($data['amount']); ?> </span> </div> <div class="guest-paid"> <label>GUEST PAID</label>
function ach_render_progressbar($prog, $val, $width) { $hero = false; if ($val == false) { $hero = true; $val = $prog; } $val = max(1, $val); $left = floor($width * (100 * ($prog / $val)) / 100); $left = max(1, $left); $html = "<table width='" . ($width + 12) . "px'>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width='10px'></td>\r\n\t\t\t\t<td><table cellpadding='1px' width='" . ($width + 2) . "px'><tr><td bgcolor='#FFFFFF'>\r\n\t\t<table width='" . $width . "px' cellspacing='0' cellpadding='0'>\r\n\t\t\t<tr>\r\n\t\t\t\t<td bgcolor='#66CC00' width='" . $left . "px'><font color='#000000'>"; if ($hero == false) { if ($prog / $val > 0.5) { $html .= " " . nf($prog) . " / " . nf($val) . " "; } $html .= "</font></td>\r\n\t\t\t\t\t<td align='left' bgcolor='#00000066'><font color='#FFFFFF'>"; if ($prog / $val <= 0.5) { $html .= " " . nf($prog) . " / " . nf($val) . " "; } } else { $html .= " " . nf($prog) . " "; } $html .= "</font></td>\r\n\t\t\t</tr>\r\n\t\t</table></td></tr></table></td>\r\n\t\t\t</tr>\r\n\t\t</table>"; return $html; }
?> "> </div> </div> </div> </div> <?php $totalBanco = $datos["MONBANCO1"] + $datos["MONBANCO2"] + $datos["MONBANCO3"]; ?> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label col-md-10">Total Depositos:</label> <div class="col-md-2"> <p class="form-control-static"><?php echo nf($totalBanco); ?> </p> </div> </div> </div> </div> </form> <!-- END EXAMPLE TABLE PORTLET--> </div>
function handle_hidden_prices(&$input) { global $language; if (empty($input['tank_inspection'])) { unset($input['hidden_tank_inspection_price']); } if (empty($input['antifreeze'])) { unset($input['hidden_antifreeze_price']); } # voor het moment verberg altijd de tank_inspection_price in de mail //unset( $input['hidden_tank_inspection_price'] ); $fields = array('hidden_mazout_liter_price', 'hidden_mazout_price', 'hidden_antifreeze_price', 'hidden_total_price'); # replace all ',' to '.' foreach ($fields as $field) { if (empty($input[$field])) { continue; } # the javascript sometimes passes these values => unset the value if (strpos($input[$field], 'undefined') !== false || strpos($input[$field], 'false') !== false) { error_log('undefined / false value on field ' . $field . ' value = ' . $input[$field]); unset($input[$field]); continue; } $input[$field] = str_replace(',', '.', $input[$field]); $input[$field] = str_replace('€', '', $input[$field]); if (!is_numeric($input[$field])) { unset($input[$field]); continue; } $input[$field] = (double) $input[$field]; if ($field == 'hidden_mazout_liter_price') { $btw_incl = $input[$field]; $btw_excl = $input[$field] / 1.21; $btw_incl_indication = $language->language == 'nl' ? 'incl. BTW' : 'TVAC'; $btw_excl_indication = $language->language == 'nl' ? 'excl. BTW' : 'hors TVA'; $input[$field] = '€ ' . nf($btw_incl, 4) . '/l ' . $btw_incl_indication . ' (' . '€ ' . nf($btw_excl, 4) . '/l ' . $btw_excl_indication . ')'; } else { if ($field == 'hidden_mazout_price') { $btw_incl_indication = $language->language == 'nl' ? 'incl. BTW' : 'TVAC'; # indien antivries -> toon totaalbedrag mazout+antivries if (!empty($input['antifreeze'])) { $input['hidden_total_price'] = str_replace('€', '€ ', $input['hidden_total_price']); $input[$field] = $input['hidden_total_price'] . ' ' . $btw_incl_indication; } else { $input[$field] = str_replace('.', ',', $input[$field]); $input[$field] = '€ ' . number_format($input[$field], 2, ',', '') . ' ' . $btw_incl_indication; } } else { $input[$field] = '€ ' . nf($input[$field], 2); } } } }
$pdf->SetFillColor($tab_modele_pdf["couleur_moy_general1"][$classe_id], $tab_modele_pdf["couleur_moy_general2"][$classe_id], $tab_modele_pdf["couleur_moy_general3"][$classe_id]); //if($total_coef_en_calcul != 0 and $affiche_moyenne_maxi_general[$classe_id] === '1' ){ if ($total_coef_en_calcul != 0 and $tab_modele_pdf["affiche_moyenne_maxi_general"][$classe_id] === '1') { $moyenne_max = $total_moyenne_max_en_calcul / $total_coef_en_calcul; } else { $moyenne_max = '-'; } if ($moyenne_max != '-') { //========================= // MODIF: boireaus 20080102 // On remplace la moyenne mal calculée au sein de la page par la moyenne calculée dans /lib/calcul_moy_gen.inc.php //$moyenne_max=$tab_moy_max_classe[$classe_id][$id_periode]; $moyenne_max = $tab_moy_max_classe[$classe_id][$id_periode]; //$pdf->Cell($largeur_d_une_moyenne[$classe_id], $hauteur_entete_moyenne_general[$classe_id], present_nombre($moyenne_max, $arrondie_choix[$classe_id], $nb_chiffre_virgule[$classe_id], $chiffre_avec_zero[$classe_id]),1,0,'C', $couleur_moy_general[$classe_id]); //$pdf->Cell($largeur_d_une_moyenne[$classe_id], $hauteur_entete_moyenne_general[$classe_id], $moyenne_max,1,0,'C', $couleur_moy_general[$classe_id]); $pdf->Cell($tab_modele_pdf["largeur_d_une_moyenne"][$classe_id], $tab_modele_pdf["hauteur_entete_moyenne_general"][$classe_id], nf($moyenne_max), 1, 0, 'C', $tab_modele_pdf["couleur_moy_general"][$classe_id]); //========================= } else { //$pdf->Cell($largeur_d_une_moyenne[$classe_id], $hauteur_entete_moyenne_general[$classe_id], '-',1,0,'C', $couleur_moy_general[$classe_id]); $pdf->Cell($tab_modele_pdf["largeur_d_une_moyenne"][$classe_id], $tab_modele_pdf["hauteur_entete_moyenne_general"][$classe_id], '-', 1, 0, 'C', $tab_modele_pdf["couleur_moy_general"][$classe_id]); } //$largeur_utilise = $largeur_utilise + $largeur_d_une_moyenne[$classe_id]; $largeur_utilise = $largeur_utilise + $tab_modele_pdf["largeur_d_une_moyenne"][$classe_id]; } // rang de l'élève //if($active_rang[$classe_id]==='1' and $ordre_moyenne[$cpt_ordre] === 'rang') { if ($tab_modele_pdf["active_rang"][$classe_id] === '1' and $ordre_moyenne[$cpt_ordre] === 'rang') { $pdf->SetXY($X_note_moy_app + $largeur_utilise, $Y_note_moy_app); $pdf->SetFont('DejaVu', '', 8); //$pdf->SetFillColor($couleur_moy_general1[$classe_id], $couleur_moy_general2[$classe_id], $couleur_moy_general3[$classe_id]); $pdf->SetFillColor($tab_modele_pdf["couleur_moy_general1"][$classe_id], $tab_modele_pdf["couleur_moy_general2"][$classe_id], $tab_modele_pdf["couleur_moy_general3"][$classe_id]);
<p><?php echo tt('Frost free'); ?> </p> </div> <div class="product_card_content"> <p><?php echo tt('Price from 2000L'); ?> (<?php echo $items['price']['last_modified']; ?> )</p> <p class="bold card_item">€ <?php echo nf($items['price']['price_standaard'], 4); ?> /l</p> </div> <div class="product_card_content card_button"> <a class="button red" href="<?php echo $calculator_link; ?> ?product=mazout-standard"><?php echo tt('Calculate the price'); ?> </a> </div> </div> </div>
function zone_browser($like = NULL, $highlight = NULL) { global $zone_group_size, $soa_table_name, $rr_table_name, $use_pgsql; echo "<DIV align=center>\n"; if ($zone_group_size == 0) { $res = sql_query(soa_select() . " ORDER BY origin") or ErrSQL("Error loading SOA record(s)."); } else { /* Get current offset and total number of zones */ $page = getpostvar('page'); $total = sql_count("SELECT COUNT(*) FROM {$soa_table_name} {$like}", "number of SOA records"); $offset = offset_select($page, $total, $zone_group_size, "action=browse"); $query = soa_select() . " {$like} ORDER BY origin "; if ($use_pgsql) { $query .= "LIMIT {$zone_group_size} OFFSET {$offset}"; } else { $query .= "LIMIT {$offset},{$zone_group_size}"; } $res = sql_query($query) or ErrSQL("Error loading SOA record(s)."); } ?> <TABLE class=browserBox cellspacing=0> <?php while ($soa = sql_fetch_array($res)) { $record_count = sql_count("SELECT COUNT(*) FROM {$rr_table_name} WHERE zone={$soa['id']}", "number of resource records in zone {$soa['id']}"); $output_origin = $soa['origin']; if ($highlight) { $output_origin = str_replace($highlight, "<span class=highlight>{$highlight}</span>", $output_origin); } ?> <TR bgcolor="<?php echo bgcolor(); ?> "> <TD class=browserCellLeft><A href="<?php echo $_SERVER['PHP_SELF']; ?> ?zone=<?php echo $soa['id']; ?> " title="Edit zone <?php echo $soa['id']; ?> "><?php echo $output_origin; ?> </A> <TD class=browserCellRight><?php echo nf($record_count); ?> record(s) <?php } echo "</TABLE>\n"; echo "</DIV>\n"; }
echo nf('2000', 0); ?> L</th> </tr> <? foreach ( $prices as $record ){ ?> <tr> <td class="bold"><?php echo htmlentities($record['name'], ENT_COMPAT, 'UTF-8'); ?> </td> <td>€ <?php echo htmlentities(nf($record['official_1000l_price'], 4), ENT_COMPAT, 'UTF-8'); ?> </td> <td>€ <?php echo htmlentities(nf($record['official_2000l_price'], 4), ENT_COMPAT, 'UTF-8'); ?> </td> </tr> <? } ?> </table> <div class="table_bottom"> <p><?php echo tt('Prices of'); ?> <?php echo $fd($prices[0]['modified']); ?> .</p> <a class="button red" href="/<?php
<!--<td class="order_price"> </td>--> </tr> <tr class="order_total"> <td class="order_invisible" colspan="5" style="background-color:white; border:0;"> </td> <td class="order_text"><strong>GST Amount (Included)</strong></td> <td class="center order_price" style="text-align:right">$<span class="gst"><?php echo nf($gst); ?> </span></td> <!--<td class="order_price"> </td>--> </tr> <tr class="order_total"> <td class="order_invisible" colspan="5" style="background-color:white; border:0;"> </td> <td class="order_dark_text"><strong>Current Grand Total</strong></td> <td class="center order_dark_price" style="text-align:right"><strong class="grand_total_box">$<span class="grand_total"><?php echo nf($total - $order->discount_amount + $order->shipping_price + $gst); ?> </span></strong></td> <!--<td class="order_dark_price"> </td>--> </tr> <?php } else { ?> <tr><td colspan="9">There are no items.</td></tr> <?php } ?> </tbody> </table>
function getTopCreators2($dbw, $cutoff, $start) { global $table, $join, $where, $cond, $andcond; $result = "<ol>"; $sql = "select nap_page from newarticlepatrol left join page on nap_page = page_id where page_namespace = 0\n\t\t\tand nap_timestamp > '{$cutoff}' and nap_timestamp < '{$start}'; "; wfDebug("Dashboard top creators: {$sql}\n"); debugMsg("getting nap {$nap} "); $res = $dbw->query($sql, __METHOD__); $pages = array(); $revisions = array(); while ($row = $dbw->fetchObject($res)) { $pages[] = $row->nap_page; } debugMsg("getting min revisions on pages " . sizeof($pages) . " pages "); $count = 0; foreach ($pages as $page_id) { $revisions[$page_id] = selectField($table, array("min(rev_id)"), array("rev_page" => $page_id)); $count++; if ($count % 100 == 0) { debugMsg("done {$count}"); } } $users = array(); debugMsg("getting users on newly created pages " . sizeof($revisions) . " revisions "); $count = 0; foreach ($revisions as $page_id => $rev_id) { if (empty($rev_id)) { #echo "<!---uh oh: {$page_id} has no min rev!-->"; continue; } $u = selectField($dbw, "select rev_user_text from {$table} where rev_id={$rev_id}"); if (!isset($users[$u])) { $users[$u] = 1; } else { $users[$u]++; } $count++; if ($count % 100 == 0) { debugMsg("done {$count}"); } } debugMsg("sorting " . sizeof($users) . " users"); asort($users, SORT_NUMERIC); $users = array_reverse($users); array_splice($users, 20); $yy = 0; debugMsg("outputting all of this now " . sizeof($users) . " users"); foreach ($users as $u => $c) { $x = User::newFromName($u); $c = nf($c); if (!$x) { $result .= "<li>{$u} - {$c} new articles created</li>\n"; } else { $result .= "<li> " . getUserLink($x) . " - {$c} new articles created" . getUserToolLinks($x) . "</li>\n"; } $yy++; if ($yy == 20) { break; } } $result .= "</ol>"; return $result; }
function success_booking_details() { if (is_empty_booking()) { empty_booking(); redirect_js_script(get_bloginfo('url')); } $d = get_booking_by_id(booking_data('booking_ID')); $room_price = $d['room_price']; $nights = $d['no_of_night']; $output = ''; $output .= '<div id="successBookingDetails">'; $output .= '<a href="#" class="pull-right print-booking"><i class="fa fa-print"></i></a>'; $output .= '<div id="bookingDetailContent">'; $output .= '<div class="success-booking-details">'; $output .= '<div class="row">'; $output .= '<div class="col-md-4 col-lg-3">'; $output .= '<div class="reservation-sidebar">'; $output .= '<div class="reservation-date">'; $output .= '<h2 class="reservation-heading">Dates</h2>'; $output .= '<ul>'; $output .= '<li>'; $output .= '<span>Check-In</span>'; $output .= '<span>' . format_date($d['date_in']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Check-Out</span>'; $output .= '<span>' . format_date($d['date_out']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Total Nights</span>'; $output .= '<span>' . count_nights($d['date_in'], $d['date_out']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Total Guests</span>'; $output .= '<span>' . $d['no_of_adult'] . ' Adults ' . $d['no_of_child'] . ' Children</span>'; $output .= '</li>'; $output .= '</ul>'; $output .= '</div>'; $output .= '<div class="reservation-room-selected">'; $output .= '<h2 class="reservation-heading">Selected Room</h2>'; $output .= '<div class="reservation-room-seleted_item">'; $output .= '<div class="reservation-room-seleted_name has-package">'; $output .= '<h2><a>' . get_the_title($d['room_type_ID']) . '</a></h2>'; $output .= '</div>'; $output .= '<ul>'; $output .= '<li>'; $output .= '<span>Max</span>'; $output .= '<span>' . get_field('max_person', $d['room_type_ID']) . ' Person(s)</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Size</span>'; $output .= '<span>' . get_field('room_size', $d['room_type_ID']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Bed</span>'; $output .= '<span>' . get_field('bed', $d['room_type_ID']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Occupancy</span>'; $output .= '<span>' . get_field('occupancy', $d['room_type_ID']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Room Price</span>'; $output .= '<span>' . nf($room_price) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Total Nights</span>'; $output .= '<span>x ' . count_nights($d['date_in'], $d['date_out']) . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Total Room</span>'; $output .= '<span>x ' . booking_data('no_of_room') . '</span>'; $output .= '</li>'; $output .= '</ul>'; $output .= '</div>'; $output .= '<div class="reservation-room-seleted_total">'; $output .= '<label>TOTAL</label>'; $output .= '<span class="reservation-total">' . format_price($d['amount'], false) . '</span>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '<div class="col-md-8 col-lg-9">'; $output .= '<div class="reservation_content">'; $output .= '<div class="reservation-billing-detail success-details">'; $output .= '<h4>BILLING DETAILS</h4>'; $output .= '<ul>'; $output .= '<li>'; $output .= '<span>Booking #</span>'; $output .= '<span>' . $d['booking_no'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Country</span>'; $output .= '<span>' . $d['country'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Full Name</span>'; $output .= '<span>' . $d['salutation'] . ' ' . $d['first_name'] . ' ' . $d['middle_name'] . ' ' . $d['last_name'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Date of Birth</span>'; $output .= '<span>' . $d['birth_date'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Nationality</span>'; $output .= '<span>' . $d['nationality'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Email Address</span>'; $output .= '<span>' . $d['email_address'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Phone</span>'; $output .= '<span>' . $d['primary_phone'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Address</span>'; $output .= '<span>' . $d['address_1'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Apartment, suite, unit etc.</span>'; $output .= '<span>' . $d['address_2'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Town / City</span>'; $output .= '<span>' . $d['city'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Province</span>'; $output .= '<span>' . $d['province'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Zip Code</span>'; $output .= '<span>' . $d['zipcode'] . '</span>'; $output .= '</li>'; $output .= '<li>'; $output .= '<span>Notes</span><br />'; $output .= '<span>' . $d['notes'] . '</span>'; $output .= '</li>'; $output .= '</ul>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</form>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; empty_booking(); return $output; }
<div class="data"> <span class="number"><?php echo $items['orders']; ?> </span> orders </div> <span class="date"><?php echo $items['type']; ?> </span> </div> <div class="span3 stat last"> <div class="data"> <span class="number">$<?php echo nf($items['sales']); ?> </span> sales </div> <span class="date"><?php echo $items['type']; ?> </span> </div> </div> </div> <!-- end upper main stats --> <div id="pad-wrapper">
$cpt_tmp++; } } //} } if(($legendy[2]=='Toutes_les_périodes')&&(isset($_GET['affiche_moy_annuelle']))){ if($cpt_tmp>0){ $mgen_annuelle=round($total_tmp/$cpt_tmp,1); } else{ $mgen_annuelle="-"; } $ytmp=$ytmp+15; $largeur_texte = mb_strlen(nf($mgen_annuelle)) * ImageFontWidth($taille_police); imagettftext($img, $taille_police*$rapport_imageString_imagettftext, 0, $x1+round($largeurMat/2)+round((($x2-$x1)-$largeur_texte)/2), $ytmp+10, $couleureleve[$nb_series_bis], dirname(__FILE__)."/../fpdf/font/unifont/DejaVuSansCondensed.ttf", $mgen_annuelle); } } //=================================================================================== //======================================================================= // On positionne les noms d'élèves en haut de l'image: y=5 // Pour en bas, ce serait: y=$hauteur+$hauteurMoy+25 if($legendy[2]=='Toutes_les_périodes'){
function bulletin_classe($tab_moy, $total, $periode1, $periode2, $nom_periode, $gepiYear, $id_classe, $test_coef, $affiche_categories, $couleur_lignes = NULL) { global $nb_notes, $nombre_eleves, $type_etablissement, $type_etablissement2; global $affiche_colonne_moy_classe; //$affiche_colonne_moy_classe="n"; // 20121209 global $avec_moy_min_max_classe; //global $avec_rapport_effectif; $avec_rapport_effectif = "y"; $alt = 1; // données requises : //- $total : nombre total d'élèves //- $periode1 : numéro de la première période à afficher //- $periode2 : numéro de la dernière période à afficher //- $nom_periode : tableau des noms de période //- $gepiYear : année //- $id_classe : identifiant de la classe. //==================== $affiche_coef = sql_query1("SELECT display_coef FROM classes WHERE id='" . $id_classe . "'"); //echo "\$affiche_coef=$affiche_coef<br />\n"; //==================== //========================= // AJOUT: boireaus 20080316 //global $tab_moy_gen; //global $tab_moy_cat_classe; global $display_moy_gen; //========================= global $affiche_deux_moy_gen; global $bull_simp_larg_tab, $bull_simp_larg_col1, $bull_simp_larg_col2, $bull_simp_larg_col3, $bull_simp_larg_col4; //echo "\$affiche_categories=$affiche_categories<br />"; if (!getSettingValue("bull_intitule_app")) { $bull_intitule_app = "Appréciations/Conseils"; } else { $bull_intitule_app = getSettingValue("bull_intitule_app"); } $nb_periodes = $periode2 - $periode1 + 1; //============================ // Liste des profs principaux: $data_profsuivi = mysqli_query($GLOBALS["mysqli"], "SELECT DISTINCT u.login FROM utilisateurs u, j_eleves_professeurs j WHERE (j.professeur = u.login AND j.id_classe='{$id_classe}') "); $current_profsuivi_login = array(); if (mysqli_num_rows($data_profsuivi) > 0) { while ($lig_profsuivi = mysqli_fetch_object($data_profsuivi)) { $current_profsuivi_login[] = $lig_profsuivi->login; } } //============================ unset($tab_acces_app); $tab_acces_app = array(); $tab_acces_app = acces_appreciations($periode1, $periode2, $id_classe); $call_classe = mysqli_query($GLOBALS["mysqli"], "SELECT * FROM classes WHERE id='{$id_classe}'"); $classe = old_mysql_result($call_classe, 0, "classe"); //------------------------------- // On affiche l'en-tête : Les données de la classe //------------------------------- echo "<span class='bull_simpl'><span class='bold'>Classe de {$classe}</span>"; echo ", année scolaire {$gepiYear}<br />\n"; if ($periode1 < $periode2) { echo "Résultats de : "; $nb = $periode1; while ($nb < $periode2 + 1) { echo $nom_periode[$nb]; if ($nb < $periode2) { echo " - "; } $nb++; } echo ".</span>"; } else { $temp = my_strtolower($nom_periode[$periode1]); echo "Résultats du {$temp}.</span>"; } // //------------------------------- // Fin de l'en-tête //echo "\$test_coef=$test_coef<br />"; // On initialise le tableau : $bull_simp_larg_tab_defaut = 680; $bull_simp_larg_col1_defaut = 120; $bull_simp_larg_col2_defaut = 38; $bull_simp_larg_col3_defaut = 38; $bull_simp_larg_col4_defaut = 20; $larg_tab = $bull_simp_larg_tab_defaut; $larg_col1 = $bull_simp_larg_col1_defaut; $larg_col2 = $bull_simp_larg_col3_defaut; $larg_col3 = $bull_simp_larg_col3_defaut; $larg_col4 = $bull_simp_larg_col4_defaut; if (preg_match("/^[0-9]{1,}\$/", $bull_simp_larg_tab)) { $larg_tab = $bull_simp_larg_tab; } if (preg_match("/^[0-9]{1,}\$/", $bull_simp_larg_col1)) { $larg_col1 = $bull_simp_larg_col1; } if (preg_match("/^[0-9]{1,}\$/", $bull_simp_larg_col2)) { $larg_col2 = $bull_simp_larg_col2; } if (preg_match("/^[0-9]{1,}\$/", $bull_simp_larg_col3)) { $larg_col3 = $bull_simp_larg_col3; } if (preg_match("/^[0-9]{1,}\$/", $bull_simp_larg_col4)) { $larg_col4 = $bull_simp_larg_col4; } if ($bull_simp_larg_tab < $bull_simp_larg_col1 + $bull_simp_larg_col2 + $bull_simp_larg_col3 + $bull_simp_larg_col4) { $larg_tab = $bull_simp_larg_tab_defaut; $larg_col1 = $bull_simp_larg_col1_defaut; $larg_col2 = $bull_simp_larg_col2_defaut; $larg_col3 = $bull_simp_larg_col3_defaut; $larg_col4 = $bull_simp_larg_col4_defaut; } $larg_col5 = $larg_tab - $larg_col1 - $larg_col2 - $larg_col3 - $larg_col4; //echo "<table width=$larg_tab border=1 cellspacing=1 cellpadding=1>\n"; echo "<table width='{$larg_tab}' class='boireaus' cellspacing='1' cellpadding='1' summary=''>\n"; echo "<tr><td width=\"{$larg_col1}\" class='bull_simpl'>{$total} élèves"; echo "</td>\n"; //==================== if ($affiche_coef == 'y') { if ($test_coef != 0) { echo "<td width=\"{$larg_col2}\" align=\"center\"><p class='bull_simpl'>Coef.</p></td>\n"; } } //==================== if ($avec_rapport_effectif == "y") { echo "<td width=\"{$larg_col2}\" align=\"center\" class='bull_simpl'>Effectif</td>\n"; } if ($affiche_colonne_moy_classe != 'n') { echo "<td width=\"{$larg_col2}\" align=\"center\" class='bull_simpl'>Classe</td>\n"; } echo "<td width=\"{$larg_col5}\" class='bull_simpl'>{$bull_intitule_app}</td></tr>\n"; // Récupération des noms de categories $get_cat = mysqli_query($GLOBALS["mysqli"], "SELECT id FROM matieres_categories"); $categories = array(); while ($row = mysqli_fetch_array($get_cat, MYSQLI_ASSOC)) { $categories[] = $row["id"]; } $cat_names = array(); foreach ($categories as $cat_id) { $cat_names[$cat_id] = old_mysql_result(mysqli_query($GLOBALS["mysqli"], "SELECT nom_complet FROM matieres_categories WHERE id = '" . $cat_id . "'"), 0); } // Nombre de groupes sur la classe $nombre_groupes = count($tab_moy['current_group']); $prev_cat_id = null; //while ($j < $nombre_groupes) { for ($j = 0; $j < $nombre_groupes; $j++) { $inser_ligne = 'no'; // On récupère le groupe depuis $tab_moy $current_group = $tab_moy['current_group'][$j]; $ligne_groupe_visible = "y"; if ($_SESSION['statut'] == 'eleve') { $sql = "SELECT 1=1 FROM j_eleves_groupes WHERE id_groupe='" . $current_group['id'] . "' AND login='******'login'] . "';"; $test_grp = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($test_grp) == 0) { $ligne_groupe_visible = "n"; } } elseif ($_SESSION['statut'] == 'responsable') { $sql = "SELECT 1=1 FROM j_eleves_groupes WHERE id_groupe='" . $current_group['id'] . "' AND login IN (SELECT e.login FROM eleves e, resp_pers rp, responsables2 r WHERE e.ele_id=r.ele_id AND rp.pers_id=r.pers_id AND (r.resp_legal='1' OR r.resp_legal='2') AND rp.login='******'login'] . "');"; //echo "$sql<br />"; $test_grp = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($test_grp) == 0) { $ligne_groupe_visible = "n"; } } if ($ligne_groupe_visible == 'y') { // Coefficient pour le groupe $current_coef = $current_group["classes"]["classes"][$id_classe]["coef"]; $current_matiere_professeur_login = $current_group["profs"]["list"]; //$current_matiere_nom_complet = $current_group["matiere"]["nom_complet"]; if (getSettingValue('bul_rel_nom_matieres') == 'nom_groupe') { $current_matiere_nom_complet = $current_group["name"]; } elseif (getSettingValue('bul_rel_nom_matieres') == 'description_groupe') { $current_matiere_nom_complet = $current_group["description"]; } else { $current_matiere_nom_complet = $current_group["matiere"]["nom_complet"]; } //echo "\$current_matiere_nom_complet=$current_matiere_nom_complet<br />\n"; $nb = $periode1; while ($nb < $periode2 + 1) { $current_classe_matiere_moyenne[$nb] = $tab_moy['periodes'][$nb]['current_classe_matiere_moyenne'][$j]; // 20121209 $moy_min_classe_grp[$nb] = $tab_moy['periodes'][$nb]['moy_min_classe_grp'][$j]; $moy_max_classe_grp[$nb] = $tab_moy['periodes'][$nb]['moy_max_classe_grp'][$j]; // On teste si des notes de une ou plusieurs boites du carnet de notes doivent être affichées $test_cn = mysqli_query($GLOBALS["mysqli"], "select c.nom_court, c.id from cn_cahier_notes cn, cn_conteneurs c\n\t\t\twhere (cn.periode = '{$nb}' and cn.id_groupe='" . $current_group["id"] . "' and cn.id_cahier_notes = c.id_racine and c.id_racine!=c.id and c.display_bulletin = 1) "); $nb_ligne_cn[$nb] = mysqli_num_rows($test_cn); $n = 0; while ($n < $nb_ligne_cn[$nb]) { $cn_id[$nb][$n] = old_mysql_result($test_cn, $n, 'id'); $cn_nom[$nb][$n] = old_mysql_result($test_cn, $n, 'nom_court'); $n++; } //echo "\$nb=$nb<br />\n"; $nb++; } $nb = $periode1; while ($nb < $periode2 + 1) { $current_grp_appreciation_query = mysqli_query($GLOBALS["mysqli"], "SELECT * FROM matieres_appreciations_grp WHERE (id_groupe='" . $current_group["id"] . "' AND periode='{$nb}')"); $current_grp_appreciation[$nb] = @old_mysql_result($current_grp_appreciation_query, 0, "appreciation"); //echo "\$current_grp_appreciation[$nb]=$current_grp_appreciation[$nb]<br />\n"; $nb++; } if ($affiche_categories) { // On regarde si on change de catégorie de matière if ($current_group["classes"]["classes"][$id_classe]["categorie_id"] != $prev_cat_id) { $prev_cat_id = $current_group["classes"]["classes"][$id_classe]["categorie_id"]; // On est dans une nouvelle catégorie // On récupère les infos nécessaires, et on affiche une ligne // On détermine le nombre de colonnes pour le colspan //$nb_total_cols = 4; if ($affiche_colonne_moy_classe != 'n') { $nb_total_cols = 2; } else { $nb_total_cols = 3; } //==================== if ($affiche_coef == 'y') { if ($test_coef != 0) { $nb_total_cols++; } } //==================== if ($avec_rapport_effectif == 'y') { $nb_total_cols++; } //==================== // On regarde s'il faut afficher la moyenne de l'élève pour cette catégorie $affiche_cat_moyenne_query = mysqli_query($GLOBALS["mysqli"], "SELECT affiche_moyenne FROM j_matieres_categories_classes WHERE (classe_id = '" . $id_classe . "' and categorie_id = '" . $prev_cat_id . "')"); if (mysqli_num_rows($affiche_cat_moyenne_query) == "0") { $affiche_cat_moyenne = false; } else { $affiche_cat_moyenne = old_mysql_result($affiche_cat_moyenne_query, 0); } // On a toutes les infos. On affiche ! echo "<tr>\n"; echo "<td colspan='" . $nb_total_cols . "'>\n"; echo "<p style='padding: 0; margin:0; font-size: 10px;'>" . $cat_names[$prev_cat_id] . "</p></td>\n"; echo "</tr>\n"; } } //echo "<tr>\n"; if ($couleur_lignes == 'y') { $alt = $alt * -1; echo "<tr class='lig{$alt}'>\n"; $alt2 = $alt; } else { echo "<tr>\n"; } echo "<td "; if ($nb_periodes > 1) { echo " rowspan= " . $nb_periodes; } //echo" width=\"$larg_col1\" class='bull_simpl'><b>$current_matiere_nom_complet</b>"; echo " width=\"{$larg_col1}\" class='bull_simpl'><b>" . htmlspecialchars($current_matiere_nom_complet) . "</b>"; $k = 0; while ($k < count($current_matiere_professeur_login)) { echo "<br /><i>" . affiche_utilisateur($current_matiere_professeur_login[$k], $id_classe) . "</i>"; $k++; } echo "</td>\n"; //==================== if ($affiche_coef == 'y') { if ($test_coef != 0) { $print_coef = number_format($current_coef, 1, ',', ' '); echo "<td width=\"{$larg_col2}\""; if ($nb_periodes > 1) { echo " rowspan= " . $nb_periodes; } echo " align=\"center\"><p class='bull_simpl'>" . $print_coef . "</p></td>\n"; } } //==================== $nb = $periode1; $print_tr = 'no'; while ($nb < $periode2 + 1) { if ($print_tr == 'yes') { //echo "<tr style='border-width: 5px;'>\n"; if ($couleur_lignes == 'y') { $alt2 = $alt2 * -1; echo "<tr class='lig{$alt2}' style='border-width: 5px;'>\n"; } else { echo "<tr>\n"; } } //========================= if ($nb == $periode1) { if ($nb == $periode2) { $style_bordure_cell = "border: 1px solid black"; } else { $style_bordure_cell = "border: 1px solid black; border-bottom: 1px dashed black"; } } elseif ($nb == $periode2) { $style_bordure_cell = "border: 1px solid black; border-top: 1px dashed black;"; } else { $style_bordure_cell = "border: 1px solid black; border-top: 1px dashed black; border-bottom: 1px dashed black;"; } //========================= if ($avec_rapport_effectif == "y") { //$sql="SELECT 1=1 FROM j_eleves_classes jec, $sql = "SELECT DISTINCT jeg.login FROM j_eleves_classes jec,\n\t\t\t\t\t\t\t\t\tj_eleves_groupes jeg,\n\t\t\t\t\t\t\t\t\tj_groupes_classes jgc\n\t\t\t\t\t\t\t\tWHERE jec.id_classe='{$id_classe}' AND\n\t\t\t\t\t\t\t\t\t\tjec.periode='{$nb}' AND\n\t\t\t\t\t\t\t\t\t\tjec.periode=jeg.periode AND\n\t\t\t\t\t\t\t\t\t\tjec.login=jeg.login AND\n\t\t\t\t\t\t\t\t\t\tjeg.id_groupe=jgc.id_groupe AND\n\t\t\t\t\t\t\t\t\t\tjeg.id_groupe='" . $current_group["id"] . "';"; //$sql0=$sql; $res_effectif = mysqli_query($GLOBALS["mysqli"], $sql); $effectif_grp_classe = mysqli_num_rows($res_effectif); $sql = "SELECT 1=1 FROM j_eleves_groupes jeg\n\t\t\t\t\t\t\t\tWHERE jeg.periode='{$nb}' AND\n\t\t\t\t\t\t\t\t\t\tjeg.id_groupe='" . $current_group["id"] . "';"; $res_effectif_tot = mysqli_query($GLOBALS["mysqli"], $sql); $effectif_grp_total = mysqli_num_rows($res_effectif_tot); echo "<td width=\"{$larg_col2}\" align=\"center\" class='bull_simpl' style='{$style_bordure_cell}'>"; //echo "$sql0<br /><br />"; //echo "$sql<br /><br />"; if ($effectif_grp_classe == $effectif_grp_total) { echo $effectif_grp_classe . ' él.'; } else { echo "{$effectif_grp_classe} él. /{$effectif_grp_total}"; } echo "</td>\n"; } if ($affiche_colonne_moy_classe != 'n') { echo "<td width=\"{$larg_col2}\" align=\"center\" class='bull_simpl' style='{$style_bordure_cell}'>\n"; // 20121209 //$note=number_format($current_classe_matiere_moyenne[$nb],1, ',', ' '); $note = nf($current_classe_matiere_moyenne[$nb]); if ($note != "0,0") { if ($avec_moy_min_max_classe == 'y') { echo "<span title=\"Moyenne minimale sur l'enseignement\">" . nf($moy_min_classe_grp[$nb]) . "</span> "; } echo "<span style='font-weight:bold' title=\"Moyenne du groupe sur l'enseignement\">" . $note . "</span>"; if ($avec_moy_min_max_classe == 'y') { echo " <span title=\"Moyenne maximale sur l'enseignement\">" . nf($moy_max_classe_grp[$nb]) . "</span>"; } } else { echo "-"; } echo "</td>\n"; } // Affichage des cases appréciations echo "<td width=\"{$larg_col5}\" class='bull_simpl' style='text-align:left; {$style_bordure_cell}'>\n"; //if ($current_grp_appreciation[$nb]) { if ($current_grp_appreciation[$nb] && $tab_acces_app[$nb] == "y") { if ($current_grp_appreciation[$nb] == "-1") { echo "<span class='noprint'>-</span>\n"; } else { if (strstr($current_grp_appreciation[$nb], ">") || strstr($current_grp_appreciation[$nb], "<")) { echo "{$current_grp_appreciation[$nb]}"; } else { echo nl2br($current_grp_appreciation[$nb]); } } //====================================== } else { echo " -"; } echo "</td></tr>\n"; $print_tr = 'yes'; $nb++; } } } // Affichage des moyennes générales if ($display_moy_gen == "y") { if ($test_coef != 0) { echo "<tr>\n<td"; if ($nb_periodes > 1) { echo " rowspan=" . $nb_periodes; } echo ">\n<p class='bull_simpl'><b>Moyenne générale</b></p>\n</td>\n"; //==================== if ($affiche_coef == 'y') { echo "<td"; if ($nb_periodes > 1) { echo " rowspan=" . $nb_periodes; } echo " align=\"center\">-</td>\n"; } //==================== $nb = $periode1; $print_tr = 'no'; while ($nb < $periode2 + 1) { //============================= //if($nb==$periode1){echo "<tr>\n";} if ($print_tr == 'yes') { echo "<tr style='border-width: 5px;'>\n"; } //============================= //========================= if ($nb == $periode1) { if ($nb == $periode2) { $style_bordure_cell = "border: 1px solid black"; } else { $style_bordure_cell = "border: 1px solid black; border-bottom: 1px dashed black"; } } elseif ($nb == $periode2) { $style_bordure_cell = "border: 1px solid black; border-top: 1px dashed black;"; } else { $style_bordure_cell = "border: 1px solid black; border-top: 1px dashed black; border-bottom: 1px dashed black;"; } //========================= if ($avec_rapport_effectif == "y") { $sql = "SELECT 1=1 FROM j_eleves_classes WHERE periode='{$nb}' AND id_classe='{$id_classe}';"; $res_eff_classe = mysqli_query($GLOBALS["mysqli"], $sql); echo "<td class='bull_simpl' align=\"center\" style='{$style_bordure_cell}'>\n"; //echo "$sql<br />"; echo mysqli_num_rows($res_eff_classe) . ' él.'; echo "</td>\n"; } if ($affiche_colonne_moy_classe != 'n') { echo "<td class='bull_simpl' align=\"center\" style='{$style_bordure_cell}'>\n"; /* if ($total_points_classe[$nb] != 0) { //$moy_classe=number_format($total_points_classe[$nb]/$total_coef[$nb],1, ',', ' '); //========================= // MODIF: boireaus 20080316 //$moy_classe=number_format($total_points_classe[$nb]/$total_coef_classe[$nb],1, ',', ' '); $moy_classe=$tab_moy_gen[$nb]; //========================= } else { $moy_classe = '-'; } */ // 20121209 if ($avec_moy_min_max_classe == 'y') { echo "<span title=\"Moyenne générale minimale\">" . nf($tab_moy['periodes'][$nb]['moy_min_classe'], 2) . "</span> "; } echo "<span style='font-weight:bold' title=\"Moyenne des moyennes générales de la classe\">" . nf($tab_moy['periodes'][$nb]['moy_generale_classe'], 2) . "</span>"; if ($avec_moy_min_max_classe == 'y') { echo " <span title=\"Moyenne générale maximale\">" . nf($tab_moy['periodes'][$nb]['moy_max_classe'], 2) . "</span>"; } if ($affiche_deux_moy_gen == 1) { echo "<br />\n"; echo "<i>"; /* if($avec_moy_min_max_classe=='y') { echo "<span title=\"Moyenne générale minimale avec tous les coefficients à 1\">".nf($tab_moy['periodes'][$nb]['moy_min_classe1'],2)."</span> "; } */ echo "<span style='font-weight:bold' title=\"Moyenne des moyennes générales de la classe avec tous les coefficients à 1\">" . nf($tab_moy['periodes'][$nb]['moy_generale_classe1']) . "</span>"; /* if($avec_moy_min_max_classe=='y') { echo " <span title=\"Moyenne générale maximale avec tous les coefficients à 1\">".nf($tab_moy['periodes'][$nb]['moy_max_classe1'],2)."</span>"; } */ echo "</i>\n"; } echo "</td>\n"; } /* echo "<td class='bull_simpl' align=\"center\">\n"; if ($total_points_eleve[$nb] != '0') { //$moy_eleve=number_format($total_points_eleve[$nb]/$total_coef[$nb],1, ',', ' '); $moy_eleve=number_format($total_points_eleve[$nb]/$total_coef_eleve[$nb],1, ',', ' '); } else { $moy_eleve = '-'; } echo "<b>".$moy_eleve."</b>\n</td>\n"; if ($affiche_rang == 'y') { $rang = sql_query1("select rang from j_eleves_classes where ( periode = '".$nb."' and id_classe = '".$id_classe."' and login = '******' ) "); if (($rang == 0) or ($rang == -1)) $rang = "-"; else $rang .="/".$nombre_eleves; echo "<td class='bull_simpl' align=\"center\">".$rang."</td>\n"; } */ if ($affiche_categories) { echo "<td class='bull_simpl' style='text-align:left; {$style_bordure_cell}'>\n"; foreach ($categories as $cat_id) { // MODIF: boireaus 20070627 ajout du test et utilisation de $total_cat_coef_eleve, $total_cat_coef_classe // Tester si cette catégorie doit avoir sa moyenne affichée $affiche_cat_moyenne_query = mysqli_query($GLOBALS["mysqli"], "SELECT affiche_moyenne FROM j_matieres_categories_classes WHERE (classe_id = '" . $id_classe . "' and categorie_id = '" . $cat_id . "')"); if (mysqli_num_rows($affiche_cat_moyenne_query) == "0") { $affiche_cat_moyenne = false; } else { $affiche_cat_moyenne = old_mysql_result($affiche_cat_moyenne_query, 0); } if ($affiche_cat_moyenne) { /* //if ($total_cat_coef[$nb][$cat_id] != "0") { //if ($total_cat_coef_eleve[$nb][$cat_id] != "0") { //$moy_eleve=number_format($total_cat_eleve[$nb][$cat_id]/$total_cat_coef[$nb][$cat_id],1, ',', ' '); //$moy_classe=number_format($total_cat_classe[$nb][$cat_id]/$total_cat_coef[$nb][$cat_id],1, ',', ' '); //$moy_eleve=number_format($total_cat_eleve[$nb][$cat_id]/$total_cat_coef_eleve[$nb][$cat_id],1, ',', ' '); //echo "\$total_cat_coef_classe[$nb][$cat_id]=".$total_cat_coef_classe[$nb][$cat_id]."<br />"; if ($total_cat_coef_classe[$nb][$cat_id] != "0") { $moy_classe=number_format($total_cat_classe[$nb][$cat_id]/$total_cat_coef_classe[$nb][$cat_id],1, ',', ' '); } else{ $moy_classe="-"; } //echo $cat_names[$cat_id] . " - <b>$moy_eleve</b> (classe : " . $moy_classe . ")<br/>\n"; echo $cat_names[$cat_id] . " - <b>$moy_classe</b><br />\n"; //} */ $moy_classe = "-"; $loop_i = 0; while ($loop_i < count($tab_moy['periodes'][$nb]['current_eleve_login'])) { if (isset($tab_moy['periodes'][$nb]['moy_cat_classe'][$loop_i][$cat_id])) { $moy_classe = $tab_moy['periodes'][$nb]['moy_cat_classe'][$loop_i][$cat_id]; break; } $loop_i++; } echo $cat_names[$cat_id] . " - <b>" . nf($moy_classe, 2) . "</b><br/>\n"; } } echo "</td>\n</tr>\n"; } else { echo "<td class='bull_simpl' style='text-align:left; {$style_bordure_cell}'>-</td>\n</tr>\n"; } $nb++; $print_tr = 'yes'; } } } echo "</table>\n"; /* // Les absences echo "<table width=$larg_tab border=1 cellspacing=1 cellpadding=1>\n"; $nb=$periode1; while ($nb < $periode2+1) { $current_eleve_absences_query = mysql_query("SELECT * FROM absences WHERE (login='******' AND periode='$nb')"); $eleve_abs[$nb] = @old_mysql_result($current_eleve_absences_query, 0, "nb_absences"); $eleve_abs_nj[$nb] = @old_mysql_result($current_eleve_absences_query, 0, "non_justifie"); $eleve_retards[$nb] = @old_mysql_result($current_eleve_absences_query, 0, "nb_retards"); $current_eleve_appreciation_absences = @old_mysql_result($current_eleve_absences_query, 0, "appreciation"); if (($eleve_abs[$nb] != '') and ($eleve_abs_nj[$nb] != '')) { $eleve_abs_j[$nb] = $eleve_abs[$nb]-$eleve_abs_nj[$nb]; } else { $eleve_abs_j[$nb] = "?"; } $eleve_app_abs[$nb] = @old_mysql_result($current_eleve_absences_query, 0, "appreciation"); if ($eleve_abs_nj[$nb] == '') { $eleve_abs_nj[$nb] = "?"; } if ($eleve_retards[$nb] == '') { $eleve_retards[$nb] = "?"; } echo "<tr>\n<td valign=top class='bull_simpl'>$nom_periode[$nb]</td>\n"; echo "<td valign=top class='bull_simpl'>\n"; if ($eleve_abs_j[$nb] == "1") { echo "Absences justifiées : une demi-journée"; } else if ($eleve_abs_j[$nb] != "0") { echo "Absences justifiées : $eleve_abs_j[$nb] demi-journées"; } else { echo "Aucune absence justifiée"; } echo "</td>\n"; echo "<td valign=top class='bull_simpl'>\n"; if ($eleve_abs_nj[$nb] == '1') { echo "Absences non justifiées : une demi-journée"; } else if ($eleve_abs_nj[$nb] != '0') { echo "Absences non justifiées : $eleve_abs_nj[$nb] demi-journées"; } else { echo "Aucune absence non justifiée"; } echo "</td>\n"; echo "<td valign=top class='bull_simpl'>Nb. de retards : $eleve_retards[$nb]</td>\n</tr>\n"; //Ajout Eric if ($current_eleve_appreciation_absences != "") { echo "<tr>\n"; echo "<td valign=top class='bull_simpl'> </td>\n"; echo "<td valign=top class='bull_simpl' colspan=\"3\">"; echo " Observation(s) : $current_eleve_appreciation_absences</td>\n</tr>\n"; } $nb++; } echo "</table>\n"; */ // Maintenant, on met l'avis du conseil de classe : echo "<span class='bull_simpl'><b>Avis du conseil de classe </b> "; $gepi_prof_suivi = ucfirst(retourne_denomination_pp($id_classe)); /* if ($current_eleve_profsuivi_login) { echo "<b>(".ucfirst(getSettingValue("gepi_prof_suivi"))." : <i>".affiche_utilisateur($current_eleve_profsuivi_login,$id_classe)."</i>)</b>"; } */ if (empty($current_profsuivi_login)) { //echo "Pas de $gepi_prof_suivi désigné."; //echo "(-)"; echo ""; } else { echo "<b>({$gepi_prof_suivi} <i>"; for ($loop = 0; $loop < count($current_profsuivi_login); $loop++) { if ($loop > 0) { echo ", "; } echo affiche_utilisateur($current_profsuivi_login[$loop], $id_classe); } echo "</i></b>)"; } echo " :</span>\n"; $larg_col1b = $larg_tab - $larg_col1; echo "<table width=\"{$larg_tab}\" class='boireaus' cellspacing='1' cellpadding='1' summary=''>\n"; $nb = $periode1; while ($nb < $periode2 + 1) { $sql = "SELECT * FROM synthese_app_classe WHERE (id_classe='{$id_classe}' AND periode='{$nb}');"; //echo "$sql<br />"; $res_current_synthese = mysqli_query($GLOBALS["mysqli"], $sql); $current_synthese[$nb] = @old_mysql_result($res_current_synthese, 0, "synthese"); if ($current_synthese[$nb] == '') { $current_synthese[$nb] = ' -'; } //========================= if ($nb == $periode1) { if ($nb == $periode2) { $style_bordure_cell = "border: 1px solid black"; } else { $style_bordure_cell = "border: 1px solid black; border-bottom: 1px dashed black"; } } elseif ($nb == $periode2) { $style_bordure_cell = "border: 1px solid black; border-top: 1px dashed black;"; } else { $style_bordure_cell = "border: 1px solid black; border-top: 1px dashed black; border-bottom: 1px dashed black;"; } //========================= echo "<tr>\n<td valign=\"top\" width =\"{$larg_col1}\" class='bull_simpl' style='{$style_bordure_cell}'>{$nom_periode[$nb]}</td>\n"; echo "<td valign=\"top\" width = \"{$larg_col1b}\" class='bull_simpl' style='text-align:left; {$style_bordure_cell}'>"; if ($tab_acces_app[$nb] == "y") { echo nl2br($current_synthese[$nb]); } echo "</td>\n"; //===================== echo "</tr>\n"; //===================== $nb++; } echo "</table>\n"; }
echo $d['max_person']; ?> Person(s)</span></li> <li style="font-family: 'Hind', sans-serif;display: block;clear: both;padding: 10px 0;"> <span style="float:left;font-size:12px;font-family: 'Hind', sans-serif;">Size:</span><span style="float:right;font-size:12px;color:#333;font-weight: 600;font-family: 'Hind', sans-serif;"> <?php echo $d['room_size']; ?> </span></li> <li style="font-family: 'Hind', sans-serif;display: block;clear: both;padding: 10px 0;"> <span style="float:left;font-size:12px;font-family: 'Hind', sans-serif;">Bed:</span><span style="float:right;font-size:12px;color:#333;font-weight: 600;font-family: 'Hind', sans-serif;"> <?php echo $d['bed']; ?> </span></li> <li style="font-family: 'Hind', sans-serif;display: block;clear: both;padding: 10px 0;"> <span style="float:left;font-size:12px;font-family: 'Hind', sans-serif;">Room Price:</span><span style="float:right;font-size:12px;color:#333;font-weight: 600;font-family: 'Hind', sans-serif;"> <?php echo nf($d['room_price']); ?> </span></li> <li style="font-family: 'Hind', sans-serif;display: block;clear: both;padding: 10px 0;"> <span style="float:left;font-size:12px;font-family: 'Hind', sans-serif;">Total Nights :</span><span style="float:right;font-size:12px;color:#333;font-weight: 600;font-family: 'Hind', sans-serif;"> x <?php echo $d['no_of_night']; ?> </span></li> <li style="font-family: 'Hind', sans-serif;display: block;clear: both;padding: 10px 0;"> <span style="float:left;font-size:12px;font-family: 'Hind', sans-serif;">No of Room :</span><span style="float:right;font-size:12px;color:#333;font-weight: 600;font-family: 'Hind', sans-serif;"> x <?php echo $d['no_of_room']; ?> </span></li>
echo " <br />\n"; ?> </td><td valign=top align=right class=text> <?php $sum = 0; foreach ($configs as $inst => $config) { $mt_q[$inst] = XPathValue("gateway/sms/sent/queued", $status[$inst]); $sum += $mt_q[$inst]; echo "({$inst}) " . nf($mt_q[$inst]) . " msgs<br />\n"; } echo "<hr size=1>\n"; echo "(all) "; if ($sum > $CONST_QUEUE_ERROR) { echo "<span class=red>" . nf($sum) . " msgs</span>"; } else { echo nf($sum) . " msgs"; } echo " <br />\n"; ?> </td></tr> </table> </p> <h4>Box connections</h4> <p id=bord> <table width=100% cellspacing=0 cellpadding=1 border=0> <tr><td valign=top align=center class=text> Instance </td><td valign=top class=text> Type
} /* // Le test sur le rang ne concerne que la courbe, pas les nombres affichés sous la ligne matière if(($k==2)&&(isset($nom_eleve[2]))&&(($nom_eleve[2]=="Rang eleve")||($nom_eleve[2]=="Rang élève"))) { $afficher_la_serie_courante="n"; } */ if(($avec_moy_classe=='n')&&($k>1)&&(isset($eleve2))&&(($eleve2=='moyclasse')||($eleve2=='moymax')||($eleve2=='moymin'))) { $afficher_la_serie_courante="n"; } if($afficher_la_serie_courante=="y") { $xtmp=$xtmp+$espace; if($mgen[$k]!="") { if(($k!=2)||((isset($nom_eleve[2]))&&($nom_eleve[2]!="Rang eleve")&&($nom_eleve[2]!="Rang élève"))) {$texte_courant=nf($mgen[$k]);} else {$texte_courant=$mgen[$k];} $chaine_mgen=" (".$texte_courant.")"; } else { $chaine_mgen=""; } imagettftext($img, $tmp_taille_police*$rapport_imageString_imagettftext, 0, $xtmp, 12, $couleureleve[$k], dirname(__FILE__)."/../fpdf/font/unifont/DejaVuSansCondensed.ttf", strtr($chaine[$k],"_"," ").$chaine_mgen); $xtmp=$xtmp+$largeur_chaine[$k]; } } } //================================= imagePNG($img);
?> <tr> <td class="noresize"><?php echo \Form::checkbox('products[remove][]', $related->id); ?> </td> <td class="noresize"><?php echo $product_data['code']; ?> </td> <td><?php echo $related->title; ?> </td> <td class="noresize"><?php echo $product_data['price'] ? nf($product_data['price']) : '-'; ?> </td> </tr> <?php } ?> <?php $no_items = 'style="display: none;"'; ?> <?php } else { ?> <?php $no_items = '';
//$col[$nb_col][$nb_lignes_tableau+$ligne_supl] = number_format($tmp_moy_cat_classe,1, ',', ' '); $col[$nb_col][$nb_lignes_tableau + $ligne_supl] = nf($tmp_moy_cat_classe, 1); } else { $col[$nb_col][$nb_lignes_tableau + $ligne_supl] = "-"; } $tmp_moy_cat_min = $tab_moy['periodes'][$num_periode]['moy_cat_min'][$indice_j_ele][$cat_id]; if ($tmp_moy_cat_min != '' && $tmp_moy_cat_min != '-') { //$col[$nb_col][$nb_lignes_tableau+1+$ligne_supl] = number_format($tmp_moy_cat_min,1, ',', ' '); $col[$nb_col][$nb_lignes_tableau + 1 + $ligne_supl] = nf($tmp_moy_cat_min, 1); } else { $col[$nb_col][$nb_lignes_tableau + 1 + $ligne_supl] = "-"; } $tmp_moy_cat_max = $tab_moy['periodes'][$num_periode]['moy_cat_max'][$indice_j_ele][$cat_id]; if ($tmp_moy_cat_max != '' && $tmp_moy_cat_max != '-') { //$col[$nb_col][$nb_lignes_tableau+2+$ligne_supl] = number_format($tmp_moy_cat_max,1, ',', ' '); $col[$nb_col][$nb_lignes_tableau + 2 + $ligne_supl] = nf($tmp_moy_cat_max, 1); } else { $col[$nb_col][$nb_lignes_tableau + 2 + $ligne_supl] = "-"; } } else { // Mode Année entière // Moyennes de catégories en mode année entière: 20140527: Il faudrait un autre mode de calcul if ($mode_calcul_moy_annee == "moyenne_des_moy_gen_periodes") { $moy_annee_somme_moy_ele_categorie_courante = array(); $moy_annee_nb_moy_ele_categorie_courante = array(); $moy_annee_moy_ele_categorie_courante = array(); $j = 0; while ($j < $nb_lignes_tableau) { $moy_annee_somme_moy_ele_categorie_courante[$j] = 0; $moy_annee_nb_moy_ele_categorie_courante[$j] = 0; $j++;
} else{ $mgen_annuelle="-"; } $ytmp=$ytmp+15; $largeur_texte = mb_strlen(nf($mgen_annuelle)) * $l_txt_px; $xtext=$x1+round($largeurMat/2)+round((($x2-$x1)-$largeur_texte)/2); //$ytext=$ytmp; $ytext=$ytmp+$fontsizetext; //$fontsizetext=Floor($taille_police*3.5); //echo "<text x=\"$xtext\" y=\"$ytext\" style=\"fill:".$couleureleve[$nb_series_bis]."; font-size:$fontsizetext;\">".$mgen_annuelle."</text>\n"; $texte_courant=nf($mgen_annuelle); echo "<text x=\"$xtext\" y=\"$ytext\" style=\"fill:".$couleureleve[$nb_series_bis]."; font-size:$fontsizetext;\">".$texte_courant."</text>\n"; } } //=================================================================================== //======================================================================= // On positionne les noms d'élèves en haut de l'image: y=5
<td align="right" style="font-size: 14px;">$<?php echo nf($a_order['shipping_price']); ?> </td> </tr> <tr> <td align="right" style="font-weight: bold; font-size: 14px;">GST (Included)</td> <td align="right" style="font-size: 14px;">$<?php echo nf($gst); ?> </td> </tr> <tr> <td align="right" style="font-weight: bold; font-size: 14px;">Total</td> <td align="right" style="font-size: 14px;">$<?php echo nf($grand_total); ?> </td> </tr> </tbody> </table> <?php } ?> </p> <?php } ?>
?> </h4> <p class="box_sub"> <?php echo tt('Upward of'); ?> 1.000 l:</p> <h5 class="no-margin">€ <?php echo nf($prices['Lamppetroleum']['official_1000l_price'], 4); ?> </h5> <p class="box_sub"><?php echo tt('Upward of'); ?> 2.000 L:</p> <h5 class="no-margin">€ <?php echo nf($prices['Lamppetroleum']['official_2000l_price'], 4); ?> </h5> <span>* <?php echo tt('Prices of'); ?> <?php echo $fd($prices['Lamppetroleum']['modified']); ?> , <?php echo tt('btw incl.'); ?> <?php echo tt('btw incl.'); ?> </span>
function smsc_details($inst, $xml) { global $config; $x = XPathValue("gateway/smscs", $xml); /* loop the smsc */ $i = 0; while (($y = XPathValue("smsc", $x)) != "") { $i++; echo "<tr><td colspan=9><hr/></td></tr>\n"; echo "<tr><td valign=top align=center class=text>\n"; echo "({$inst})"; echo "</td><td valign=top class=text>\n"; $smsc = XPathValue("id", $y); echo "<b>" . $smsc . "</b> <br />"; echo XPathValue("name", $y) . " <br />"; echo "</td><td valign=top class=text nowrap>\n"; $a = explode(" ", XPathValue("status", $y)); switch ($a[0]) { case "online": echo "<span class=green>online</span> <br />"; echo " (" . $z . "s)"; break; case "disconnected": echo "<span class=red>disconnected</span>"; break; case "connecting": echo "<span class=red>connecting</span>"; break; case "re-connecting": echo "<span class=red>re-connecting</span>"; break; case "dead": echo "<span class=text>dead</span>"; break; case "unkown": echo "<span class=text>unknown</span>"; break; } echo "</td><td valign=top class=text nowrap>\n"; if (ereg("online (.*)s", XPathValue("status", $y), $regs)) { $z = $regs[1]; echo date("Y-m-d H:i:s", mktime() - $z) . "<br />"; echo "uptime " . display_uptime($z); } echo "</td><td valign=top align=right class=text nowrap>\n"; echo nf(XPathValue("received", $y)); echo "</td><td valign=top align=right class=text nowrap>\n"; echo nf(XPathValue("sent", $y)); echo "</td><td valign=top align=right class=text nowrap>\n"; echo nf(XPathValue("failed", $y)); echo "</td><td valign=top align=right class=text nowrap>\n"; echo nf(XPathValue("queued", $y)); echo "</td><td valign=top align=right class=text nowrap>\n"; echo "<a class=href href=\"#\" onClick=\"admin_smsc_url('stop-smsc', '"; echo $config["base_url"] . "/stop-smsc?smsc={$smsc}','"; echo "{$smsc}', '" . $config["admin_passwd"] . "');\">stop</a> <br />"; echo "<a class=href href=\"#\" onClick=\"admin_smsc_url('start-smsc', '"; echo $config["base_url"] . "/start-smsc?smsc={$smsc}','"; echo "{$smsc}', '" . $config["admin_passwd"] . "');\">start</a>"; echo "</td></tr>\n"; $a = substr($x, strpos($x, "</smsc>") + 7); $x = $a; } return $n; }
?> </td> <td><?php echo nf($smsc['sms'][0]['sent']); ?> </td> <td><?php echo nf($smsc['dlr'][0]['sent']); ?> </td> <td><?php echo nf($smsc['failed']); ?> </td> <td><?php echo nf($smsc['queued']); ?> </td> <td> <a class="href" href="#" onClick="admin_smsc_url('stop-smsc', '<?php echo $config["base_url"]; ?> /stop-smsc?smsc=<?php echo $smsc['admin-id']; ?> ', '<?php echo $smsc['admin-id']; ?> ',