linea21-utils
[ class tree: linea21-utils ] [ index: linea21-utils ] [ all elements ]

Source for file pdf.report.inc.php

Documentation is available at pdf.report.inc.php

  1. <?php
  2. /**
  3.  * @package linea21.utils
  4.  * @subpackage report_sdi
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  *  Define, compose and generate a SDI (Sustainable Development Indicators) PDF report
  10.  */
  11.  
  12. /**
  13. * DisplayOneSdi()
  14. * Affiche un IDD + infos satellites
  15. @param int $pointer 
  16. @return bool true
  17. */
  18. function DisplayOneSdi($pointer)
  19. {
  20.     global $sdi;
  21.     global $pdf;
  22.     global $report_settings;
  23.  
  24.     $pdf->AddPage();
  25.     // lien interne si actif
  26.     if ($report_settings['summary'=== true$pdf->SetLink($pointer+1);
  27.     DisplayGeneralsInfo($sdi[$pointer]);
  28.     DisplayValues($sdi[$pointer]['sdii_id']);
  29.     if ($report_settings['display_provider'=== trueDisplayProviderInfo($sdi[$pointer]);
  30.     if ($report_settings['display_reglementation'=== trueDisplayReglementationInfo($sdi[$pointer]);
  31.     if ($report_settings['display_evaluation'=== trueDisplayEvaluationInfo($sdi[$pointer]);
  32.  
  33.     return true;
  34.  
  35. /**
  36. * DisplayGeneralsInfo()
  37. * Affiche les infos générales d'un IDD
  38. @param int $current_record 
  39. @return bool true
  40. */
  41. function DisplayGeneralsInfo($current_record)
  42. {
  43.     global $pdf;
  44.     global $lang;
  45.     global $report_settings;
  46.     
  47.     // titre d'un indicateur
  48.     $out_title formatText(strtoupper($current_record['sdii_name']));
  49.     $pdf->SetColor('SDI_TITLE_COLOR');
  50.     $pdf->SetFont(DOC_POLICESDI_TITLE_STYLESDI_TITLE_SIZE);
  51.     $pdf->Bookmark(strtolower($out_title));
  52.     $pdf->Write(DOC_HEIGHT$out_title)
  53.     // si non publié
  54.     if ($current_record['sdii_statut'== 'D'{
  55.         $pdf->SetColor('DOC_ADVISE_COLOR');
  56.         $pdf->SetFont(DOC_POLICE''SDI_TITLE_SIZE);
  57.         $out_status ' :: ' strtolower($lang['statut']['draftpdf']);
  58.         $pdf->Write(DOC_HEIGHT$out_status);
  59.         $pdf->SetFont(DOC_POLICESDI_TITLE_STYLESDI_TITLE_SIZE);
  60.         $pdf->SetColor('DOC_COLOR');
  61.     
  62.     $pdf->Ln(DOC_HEIGHT)
  63.     // thème d'appartenance
  64.     $out_theme formatText('> > ' $lang['sdi']['theme'' : ' $current_record['theme_name'' (' $current_record['sdtheme_name'')'END_LINE;
  65.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  66.     $pdf->SetColor('SDI_TITLE_COLOR');
  67.     $pdf->Write(DOC_HEIGHT$out_theme);
  68.     $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  69.     $pdf->SetColor('DOC_COLOR')// ré-initialise la couleur de police   
  70.     // description
  71.     $out_desc formatText(strip_tags($current_record['sdii_description'])) END_LINE;
  72.     $pdf->Bookmark($lang['sdi']['description']1-1);
  73.     $pdf->MultiCell(0DOC_HEIGHT$out_desc);
  74.     $pdf->SetY($pdf->GetY(DOC_INTERVAL)
  75.     // objectif
  76.     $out_goal formatText(empty_nc(strip_tags($current_record['sdii_goal']))) END_LINE;
  77.     $out_goal_item formatText($lang['sdi']['goal']END_LINE;
  78.     $pdf->Bookmark($out_goal_item2-1);
  79.     $pdf->FormatSdiItem($out_goal_item);
  80.     $pdf->MultiCell(0DOC_HEIGHT$out_goal);
  81.     $pdf->SetY($pdf->GetY(DOC_INTERVAL)
  82.     // conseil d'amélioration
  83.     $out_consulting formatText(empty_nc(strip_tags($current_record['sdii_consulting']))) END_LINE;
  84.     $out_consulting_item formatText($lang['sdi']['consulting']END_LINE;
  85.     $pdf->Bookmark($out_consulting_item2-1);
  86.     $pdf->FormatSdiItem($out_consulting_item);
  87.     $pdf->MultiCell(0DOC_HEIGHT$out_consulting);
  88.     $pdf->SetY($pdf->GetY(DOC_INTERVAL)
  89.     // informations de mesure
  90.     $out_mesures_item formatText($lang['sdi']['info_mesure']END_LINE;
  91.     $out_mesures_behavior ($current_record['sdii_threshold_relative'== 'Y' $lang['sdi']['threshold_relative_Y']$lang['sdi']['threshold_relative_N']);
  92.     $out_mesures_unit formatText($lang['sdi']['unit']' : ' $current_record['sdii_unit'END_LINE;
  93.     $pdf->Bookmark($out_mesures_item2-1);
  94.     $pdf->FormatSdiItem($out_mesures_item)
  95.     // unitée de mesure
  96.     $pdf->SetFont(DOC_POLICEEM_STYLEMIN_SIZE);
  97.     $pdf->Write(DOC_HEIGHT$out_mesures_unit END_LINE)
  98.     // comportement
  99.     $pdf->Write(DOC_HEIGHT$out_mesures_behavior END_LINE);
  100.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE)
  101.     // tableau de valeurs
  102.     DrawMesuresArray($current_record);
  103.     $pdf->SetFont(DOC_POLICEEM_STYLEMIN_SIZE);
  104.     $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  105.  
  106. /**
  107. * DrawMesuresArray()
  108. * Dessine le tableau des valeurs IDD
  109. @param  $current_record 
  110. @return bool true
  111. */
  112. function DrawMesuresArray($current_record)
  113. {
  114.     global $pdf;
  115.     global $lang;
  116.  
  117.     $cell_width 40
  118.     // initialisation 6 cellules
  119.     $pdf->SetWidths(array_fill(06$cell_width));
  120.     $pdf->SetAligns(array_fill(06'C'));
  121.     $pdf->SetFont(DOC_POLICEARRAY_TITLE_STYLEARRAY_TITLE_SIZE);
  122.     $pdf->Row(array($lang['sdi']['max_value']$lang['sdi']['min_value']$lang['sdi']['threshold_value']$lang['sdi']['frequency']));
  123.     $pdf->SetFont(DOC_POLICEARRAY_DATA_STYLEARRAY_DATA_SIZE);
  124.     $pdf->Row(array($current_record['sdii_max_value']$current_record['sdii_min_value']$current_record['sdii_threshold_value']$current_record['sdii_frequency']));
  125.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  126.  
  127.     return true;
  128.  
  129. /**
  130. * DisplayProviderInfo()
  131. * Affiche les informations Fournisseurs d'un IDD
  132. @param  $current_record 
  133. @return bool true
  134. */
  135. function DisplayProviderInfo($current_record)
  136. {
  137.     global $pdf;
  138.     global $lang;
  139.  
  140.     $out_name formatText($current_record['sdip_name']);
  141.     if (!empty($current_record['sdip_service'])) $out_name .= ' - ' formatText($current_record['sdip_service']);
  142.     if (!empty($current_record['sdip_incharge'])) $out_name .= ' - ' formatText($current_record['sdip_incharge']' (' $lang['sdi']['p_incharge'')';
  143.     $out_name .= END_LINE;
  144.     $out_adress formatText(empty_nc(strip_tags($current_record['sdip_address'])));
  145.     $out_phone_fax $lang['sdi']['p_phone'' : ' formatText(empty_nc($current_record['sdip_phone']));
  146.     $out_phone_fax .= ' - ' $lang['sdi']['p_fax'' : ' formatText(empty_nc($current_record['sdip_fax'])) END_LINE;
  147.     $out_email_item $lang['sdi']['p_email'' : ';
  148.     $out_email formatText($current_record['sdip_email']);
  149.     $out_desc formatText(empty_nc(strip_tags($current_record['sdip_description']))) END_LINE;
  150.     $out_provider_item formatText($lang['sdi']['p_title'];
  151.  
  152.     $pdf->ParagraphBreak();
  153.     $pdf->Bookmark($out_provider_item1-1);
  154.     $pdf->FormatSdiInfo($out_provider_item);
  155.  
  156.     $firstcell_width 60;
  157.  
  158.     $pdf->SetX($pdf->GetX($firstcell_width);
  159.     $pdf->MultiCell(0DOC_HEIGHT$out_name);
  160.  
  161.     $pdf->SetX($pdf->GetX($firstcell_width);
  162.     $pdf->MultiCell(0DOC_HEIGHT$out_adress);
  163.  
  164.     $pdf->SetX($pdf->GetX($firstcell_width);
  165.     $pdf->MultiCell(0DOC_HEIGHT$out_phone_fax);
  166.  
  167.     $pdf->SetX($pdf->GetX($firstcell_width);
  168.     $pdf->Cell($pdf->GetStringWidth($out_email_item)DOC_HEIGHT$out_email_item);
  169.     if (empty($out_email)) $pdf->Cell(0DOC_HEIGHTempty_nc($out_email));
  170.     else $pdf->Cell(0DOC_HEIGHT$out_email00''0'mailto:' $out_email);
  171.     $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  172.  
  173.     return true;
  174.  
  175. /**
  176. * DisplayReglementationInfo()
  177. * Affiche la réglementation d'un IDD
  178. @param  $current_record 
  179. @return bool true
  180. */
  181. function DisplayReglementationInfo($current_record)
  182. {
  183.     global $pdf;
  184.     global $lang;
  185.  
  186.     $out_name formatText(empty_nc($current_record['sdir_title'])) END_LINE;
  187.     $out_body formatText(empty_nc(strip_tags($current_record['sdir_body']))) END_LINE;
  188.     $out_uri formatText($current_record['sdir_mask_uri']);
  189.     $out_uri_href $current_record['sdir_referer_uri'];
  190.  
  191.     $out_name_item $lang['sdi']['r_title'' : ';
  192.     $out_body_item $lang['sdi']['r_body'' : ';
  193.     $out_uri_item $lang['sdi']['r_referer_uri'' : ';
  194.  
  195.     $out_reglementation_item formatText($lang['sdi']['add_step4'];
  196.  
  197.     $pdf->ParagraphBreak();
  198.     $pdf->Bookmark($out_reglementation_item1-1);
  199.     $pdf->FormatSdiInfo($out_reglementation_item);
  200.  
  201.     $firstcell_width 60
  202.     // nom de l'organisme fournisseur
  203.     $pdf->SetFont(DOC_POLICEEM_STYLEDOC_SIZE);
  204.     $pdf->Cell($firstcell_widthDOC_HEIGHT$out_name_item00'R');
  205.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  206.     $pdf->MultiCell(0DOC_HEIGHT$out_name);
  207.     $pdf->SetY($pdf->GetY(DOC_INTERVAL)
  208.     // détail reglementation
  209.     $pdf->SetFont(DOC_POLICEEM_STYLEDOC_SIZE);
  210.     $pdf->Cell($firstcell_widthDOC_HEIGHT$out_body_item00'R');
  211.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  212.     $pdf->MultiCell(0DOC_HEIGHT$out_body);
  213.     $pdf->SetY($pdf->GetY(DOC_INTERVAL)
  214.     // lien internet reglementation
  215.     $pdf->SetFont(DOC_POLICEEM_STYLEDOC_SIZE);
  216.     $pdf->Cell($firstcell_widthDOC_HEIGHT$out_uri_item00'R');
  217.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  218.     if (!empty($out_uri_href)) {
  219.         if (!empty($out_uri)) $pdf->Cell(0DOC_HEIGHT$out_uri00''0$out_uri_href);
  220.         //if (!empty($out_uri)) $pdf->Cell(0, DOC_HEIGHT, ' (', 0, 0);
  221.         //$pdf->Cell(0, DOC_HEIGHT, $out_uri, 0, 0, '', 0, $out_uri_href);
  222.         //if (!empty($out_uri)) $pdf->Cell(0, DOC_HEIGHT, ')', 0, 0);
  223.     else $pdf->Write(DOC_HEIGHTempty_nc($out_uri));
  224.     $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  225.  
  226.     return true;
  227.  
  228. /**
  229. * DisplayEvaluationInfo()
  230. * Affiche le tableau de critères d'évaluation
  231. @param int $current_record 
  232. @return bool true
  233. */
  234. function DisplayEvaluationInfo($current_record)
  235. {
  236.     global $pdf;
  237.     global $lang;
  238.  
  239.     $out_eval_item formatText($lang['sdi']['e_title'];
  240.  
  241.     $pdf->ParagraphBreak();
  242.     $pdf->Bookmark($out_eval_item1-1);
  243.     $pdf->FormatSdiInfo($out_eval_item);
  244.  
  245.     $cell_width = (integer) 190 6;
  246.     $pdf->SetWidths(array_fill(06$cell_width));
  247.     $pdf->SetAligns(array_fill(06'C'));
  248.     $pdf->SetFont(DOC_POLICEARRAY_TITLE_STYLEARRAY_TITLE_SIZE);
  249.     $pdf->Row(array($lang['sdi']['e_scale_compare']$lang['sdi']['e_fiability']$lang['sdi']['e_accessibility']$lang['sdi']['e_lisibility']$lang['sdi']['e_relevance']$lang['sdi']['e_global_performance']));
  250.     $pdf->SetFont(DOC_POLICEARRAY_DATA_STYLEARRAY_DATA_SIZE);
  251.     $pdf->Row(array($current_record['sdie_scale_compare']$current_record['sdie_fiability']$current_record['sdie_accessibility']$current_record['sdie_lisibility']$current_record['sdie_relevance']$current_record['sdie_global_performance']));
  252.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  253.  
  254.     return true;
  255.  
  256. /**
  257.  * DisplayValues()
  258.  * Affiche les valeurs d'un IDD.
  259.  * 
  260.  * @param int $sdi_id 
  261.  * @return bool true
  262.  ***/
  263. function DisplayValues($sdi_id)
  264. {
  265.     global $pdf;
  266.     global $lang;
  267.     global $report_settings;
  268.     global $scale_array;
  269.     global $sql_object;
  270.  
  271.     if ($report_settings['graphic_values'=== true && $report_settings['table_values'=== true$mode 'TWICE';
  272.     elseif ($report_settings['graphic_values'=== true || $report_settings['table_values'=== true$mode 'ONE';
  273.     else return false;
  274.  
  275.     $out_values_item $lang['dashboard']['value'];
  276.     $pdf->ParagraphBreak();
  277.     $pdf->Bookmark($out_values_item1-1);
  278.     $pdf->FormatSdiInfo($out_values_item);
  279.  
  280.     $scale_no_values array()// recipient no values
  281.     $scale_insuffisant_values array()// recipient insuffisant values graph
  282.     for($i 0$i count($scale_array)$i++{
  283.         if ($report_settings['graphic_values'=== true{
  284.             if (DisplayGraphicValues($sdi_id$scale_array[$i]GetStatus($report_settings['status'])$mode=== falsearray_push($scale_insuffisant_values$scale_array[$i]);
  285.         
  286.  
  287.         if ($report_settings['table_values'=== true{
  288.             if (DisplayTableValues($sdi_id$scale_array[$i]GetStatus($report_settings['status'])$mode=== falsearray_push($scale_no_values$scale_array[$i]);
  289.         
  290.     
  291.     DisplayNoValuesFor($scale_no_values$lang['dashboard']['rap_no_values_for']);
  292.     DisplayNoValuesFor($scale_insuffisant_values$lang['dashboard']['rap_insuffisant_values']$mode$scale_no_values);
  293.  
  294.     return true;
  295.  
  296. /**
  297.  * GetStatus()
  298.  * Formattage du statut pour requête SQL
  299.  * 
  300.  * @param string $current_status 
  301.  * @return string $status
  302.  ***/
  303. function GetStatus($current_status)
  304. {
  305.     switch ($current_status{
  306.         case 'ALL':
  307.             $status 'SCA';
  308.             break;
  309.         case 'PUBLIC':
  310.             $status 'SCP';
  311.             break;
  312.     
  313.     return $status;
  314.  
  315. /**
  316.  * DisplayNoValuesFor()
  317.  * Affiche les échelles ne contenant pas de valeurs ou insuffisamment
  318.  * 
  319.  * @param array $array_scale 
  320.  * @param string $message 
  321.  * @param integer $mode 
  322.  * @param integer $array 
  323.  * @return bool true
  324.  ***/
  325. function DisplayNoValuesFor($array_scale$message$mode = -1$array = -1)
  326. {
  327.     global $pdf;
  328.     global $lang;
  329.     global $scale_denomination_array;
  330.     $content '';
  331.     $sep ''
  332.     // si mode TWICE et deuxi�me tableau fourni. On le soustriat au premier.
  333.     if ($array != -&& $mode == 'TWICE'$array_scale array_values(array_diff($array_scale$array));
  334.  
  335.     if (count($array_scale== 0return true;
  336.  
  337.     for($i 0$i count($array_scale)$i++{
  338.         $content .= $sep $scale_denomination_array[$array_scale[$i]];
  339.         $sep ', ';
  340.     
  341.     if (empty($content)) return true;
  342.     $margin 0;
  343.     $pdf->SetX($pdf->GetX($margin);
  344.     $pdf->SetFont(DOC_POLICEEM_STYLEDOC_SIZE);
  345.     $pdf->Cell(0DOC_HEIGHT$message01'L');
  346.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  347.     $margin 10;
  348.     $pdf->SetColor('DOC_ADVISE_COLOR');
  349.     $pdf->SetX($pdf->GetX($margin);
  350.     $pdf->MultiCell(0DOC_HEIGHT$content);
  351.     $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  352.     $pdf->SetColor('DOC_COLOR');
  353.  
  354.     return true;
  355.  
  356. /**
  357.  * DisplayGraphicValues()
  358.  * Gènère et affiche les valeurs sous forme graphique
  359.  * 
  360.  * @param int $sdi_id 
  361.  * @param int $current_scale 
  362.  * @param string $status 
  363.  * @param string $mode 
  364.  * @return bool true
  365.  ***/
  366. function DisplayGraphicValues($sdi_id$current_scale$status$mode)
  367. {
  368.     global $pdf;
  369.     global $sql_object;
  370.     global $scale_denomination_array;
  371.  
  372.     $values $sql_object->DBSelect(SQL_getAllValue($status$current_scale$sdi_id));
  373.     // renversement des valeurs pour affichage chronologique
  374.     if(is_array($values)) $values @array_reverse ($valuesfalse);
  375.  
  376.     $result_sdii $sql_object->DBSelect(SQL_getInfoSdi($sdi_id));
  377.  
  378.     if (count($values3return false
  379.     // on checke si le graph tient sur la page sinon Saut de page
  380.     $pdf->CheckPageBreak((GRAPH_HEIGHT 0.36DOC_INTERVAL)
  381.     // Affichage du titre seulement si $values>= 3
  382.     $out_scale_item $scale_denomination_array[$current_scale];
  383.     $pdf->Bookmark($out_scale_item2-1);
  384.     $pdf->FormatSdiItem($out_scale_item);
  385.     $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  386.     
  387.     // stockage de l'ordonnée initiale
  388.     $_y $pdf->GetY();
  389.     
  390.     // positionnement en fonction du mode.
  391.     
  392.     if ($mode == 'TWICE'$_x 94;
  393.     else $_x 50;
  394.  
  395.     require_once "../class/system/artichow/BarPlot.class.php";
  396.     require_once "../class/system/artichow/LinePlot.class.php";
  397.     
  398.     $unit $result_sdii[0]['sdii_unit']
  399.     
  400.     for ($i 0$i count($values)$i++{
  401.         $ydata[$i$values[$i]['sdiv_value'];
  402.         $ydata2[$i$result_sdii[0]['sdii_threshold_value'];
  403.         list($day$month$year)=explode('-'$values[$i]['date_p']);
  404.     $months[$i$day '-' .$month'-'substr($year22);    
  405.     }
  406.     
  407.     // Create the graph.
  408.     $graph new Graph(GRAPH_WIDTHGRAPH_HEIGHT);
  409.     if(function_exists('imageantialias')) {
  410.       $graph->setAntiAliasing(TRUE);
  411.     }
  412.     $graph->border->setColor(new Color(13313313350));
  413.  
  414.     $group new PlotGroup;
  415.     $group->setSpace(5550);
  416.     $group->setBackgroundColor(
  417.         new Color(244244244)
  418.     );
  419.     $group->grid->hideVertical();
  420.     $group->grid->setColor(new Color(00080));
  421.     $group->grid->setType(LINE_DOTTED );
  422.     $group->setPadding(40152050);
  423.     
  424.     $bplot new BarPlot($ydata);
  425.     //$bplot->setSpace(4, 4, 4, 0);
  426.     //$bplot->setPadding(15, 15, 5, 50);
  427.     $bplot->SetBarGradient(
  428.         new LinearGradient(
  429.             new Color(2072282520),
  430.             new Color(1461742060),
  431.             90
  432.         )
  433.     );    
  434.  
  435.     $group->axis->left->title->set($unit);
  436.     $group->axis->left->title->setFont(new Tuffy(10));
  437.     $group->axis->left->title->move(-40);
  438.     $group->axis->left->setTitleAlignment(LABEL_TOP);
  439.  
  440.     $bplot->label->border->setColor(new Color(20202020));
  441.     $bplot->label->setPadding(3110);
  442.     $bplot->barBorder->setColor(new Color(1611822060));
  443.  
  444.     $group->axis->bottom->setLabelText($months)
  445.     $group->axis->bottom->label->setAngle(55);
  446.     $group->axis->bottom->label->setFont(new Tuffy(7));
  447.  
  448.     $group->add($bplot);
  449.  
  450.  
  451.     $plot new LinePlot($ydata2LINEPLOT_MIDDLE);
  452.     $plot->setFillColor(new Color(2541486450));
  453.     $plot->setColor(new Color(254148640));
  454.     $plot->mark->setType(MARK_SQUARE);
  455.     $plot->mark->setSize(5);
  456.     $plot->mark->setFill(new Color(2461495520));
  457.     $plot->mark->border->show();
  458.     $plot->mark->border->setColor(new Color(254148640));
  459.  
  460.     $group->add($plot);
  461.     $graph->add($group);
  462.     if(!file_exists('tmp')) mkdir('tmp');
  463.     $graph->draw('tmp/'.$sdi_id.'_'.$current_scale.'.png');
  464.     // /////////////////////////////
  465.     // Affichage
  466.     $pdf->Image('tmp/'.$sdi_id.'_'.$current_scale.'.png'$_x$_y00);
  467.     // conversion px -> mm + replacement en ordonnée
  468.     if ($mode == 'TWICE'$pdf->SetY($_y);
  469.     else $pdf->SetY($_y (GRAPH_HEIGHT 0.36))//$pdf->SetY($_y + (GRAPH_HEIGHT * 0.36) + DOC_INTERVAL);
  470.     return true;
  471. }
  472.  
  473. /**
  474.  * DisplayTableValues()
  475.  * Affiche un tableau de valeurs a une échelle donnée
  476.  * 
  477.  * @param int $sdi_id 
  478.  * @param int $current_scale 
  479.  * @param string $status 
  480.  * @param string $mode 
  481.  * @return bool true
  482.  ***/
  483. function DisplayTableValues($sdi_id$current_scale$status$mode)
  484. {
  485.     global $pdf;
  486.     global $lang;
  487.     global $sql_object;
  488.     global $scale_denomination_array;
  489.  
  490.     $_y $pdf->GetY();
  491.     $sdi_values $sql_object->DBSelect(SQL_getAllValue($status$current_scale$sdi_id));
  492.  
  493.     if (count($sdi_values<= && $sdi_values[0== falsereturn false;
  494.  
  495.     if ($mode != 'TWICE' || (count($sdi_values>= && count($sdi_values3)) {
  496.         // Affichage du titre seulement si affichage des valeurs en standalone
  497.         $out_scale_item $scale_denomination_array[$current_scale];
  498.         $pdf->Bookmark($out_scale_item2-1);
  499.         $pdf->FormatSdiItem($out_scale_item);
  500.         $pdf->SetY($pdf->GetY(DOC_INTERVAL);
  501.     
  502.  
  503.     $pdf->Ln(DOC_INTERVAL);
  504.     if ($mode == 'TWICE'$_margin 20;
  505.     else $_margin 60;
  506.  
  507.     $pdf->SetX($_margin);
  508.  
  509.     $cell_width 30;
  510.     $pdf->SetWidths(array_fill(02$cell_width));
  511.     $pdf->SetAligns(array_fill(02'C'));
  512.     $pdf->SetFont(DOC_POLICEARRAY_TITLE_STYLEARRAY_TITLE_SIZE);
  513.     $pdf->Row(array($lang['dashboard']['name_pluriel']$lang['statut']['published_on']));
  514.     $pdf->SetFont(DOC_POLICEARRAY_DATA_STYLEARRAY_DATA_SIZE);
  515.     for($i 0$i count($sdi_values)$i++{
  516.         $pdf->SetX($_margin);
  517.         $current_value formatText($sdi_values[$i]['sdiv_value']);
  518.         if ($sdi_values[$i]['sdiv_statut'== 'D'$current_value .= ' *';
  519.         $current_date formatText($sdi_values[$i]['date_p']);
  520.         $pdf->Row(array($current_value$current_date));
  521.     
  522.     $pdf->SetX($_margin);
  523.     $pdf->SetFont(DOC_POLICEEM_STYLEMIN_SIZE);
  524.     $pdf->MultiCell(0DOC_HEIGHT'* ' strtolower($lang['statut']['draftpdf'])0'L'0);
  525.     $pdf->SetFont(DOC_POLICEDOC_STYLEDOC_SIZE);
  526.     $pdf->Ln(DOC_INTERVAL 2)
  527.     // conversion px -> mm + replacement en ordonnées
  528.     if ($mode == 'TWICE' && count($sdi_values>= && $pdf->GetY(($_y (GRAPH_HEIGHT 0.36))) $pdf->SetY($_y (GRAPH_HEIGHT 0.36DOC_INTERVAL);
  529.  
  530.     return true;
  531.  
  532. ?>

Documentation generated on Fri, 16 Oct 2009 09:37:59 +0200 by phpDocumentor 1.4.1