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

Documentation generated on Fri, 01 Apr 2011 09:33:46 +0200 by phpDocumentor 1.4.1