/[dolibarr]/dolibarr/htdocs/includes/boxes/modules_boxes.php
ViewVC logotype

Diff of /dolibarr/htdocs/includes/boxes/modules_boxes.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by eldy, Sun Oct 30 14:08:17 2005 UTC revision 1.14 by ccomb, Tue Nov 15 15:41:54 2005 UTC
# Line 98  class ModeleBoxes Line 98  class ModeleBoxes
98                      if (isset($contents[$i][$j]['colspan'])) $tdparam.=' colspan="'. $contents[$i][$j]['colspan'].'"';                      if (isset($contents[$i][$j]['colspan'])) $tdparam.=' colspan="'. $contents[$i][$j]['colspan'].'"';
99                      if (isset($contents[$i][$j]['class'])) $tdparam.=' class="'. $contents[$i][$j]['class'].'"';                      if (isset($contents[$i][$j]['class'])) $tdparam.=' class="'. $contents[$i][$j]['class'].'"';
100                    
101                      if ($contents[$i][$j]['text']) {                      if (!$contents[$i][$j]['text']) $contents[$i][$j]['text']="";
102                          $texte=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:'';                      $texte=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:'';
103                          $textewithnotags=eregi_replace('<[^>]+>','',$texte);                      $textewithnotags=eregi_replace('<[^>]+>','',$texte);
104                          $texte2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:'';                      $texte2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:'';
105                          $texte2withnotags=eregi_replace('<[^>]+>','',$texte2);                      $texte2withnotags=eregi_replace('<[^>]+>','',$texte2);
106                          //print "xxx $textewithnotags y";                      //print "xxx $textewithnotags y";
107    
108                        if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo']) print '<td width="16">';
109                        else print '<td '.$tdparam.'>';
110            
111                          if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo']) print '<td width="16">';                      if (isset($contents[$i][$j]['url'])) print '<a href="'.$contents[$i][$j]['url'].'" title="'.$textewithnotags.'">';
112                          else print '<td '.$tdparam.'>';                      if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo'])
113                                {
114                          if (isset($contents[$i][$j]['url'])) print '<a href="'.$contents[$i][$j]['url'].'" title="'.$textewithnotags.'">';                          $logo=eregi_replace("^object_","",$contents[$i][$j]['logo']);
115                          if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo'])                          print img_object($langs->trans("Show"),$logo);
116                          {                          print '</a></td><td '.$tdparam.'><a href="'.$contents[$i][$j]['url'].'"';
117                              $logo=eregi_replace("^object_","",$contents[$i][$j]['logo']);                          print ' title="'.$textewithnotags.'"';
118                              print img_object($langs->trans("Show"),$logo);                          //print ' alt="'.$textewithnotags.'"';      // Pas de alt sur un "<a href>"
119                              print '</a></td><td '.$tdparam.'><a href="'.$contents[$i][$j]['url'].'"';                          print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';
120                              print ' title="'.$textewithnotags.'"';                          print '>';
121                              //print ' alt="'.$textewithnotags.'"';      // Pas de alt sur un "<a href>"                      }
122                              print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';                      $maxlength=$this->MAXLENGTHBOX;
123                              print '>';                      if (isset($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
124                          }                                          
125                          $maxlength=$this->MAXLENGTHBOX;                      if ($maxlength && strlen($textewithnotags) > $maxlength)
126                          if (isset($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];                      {
127                                                                        $texte=substr($texte,0,$maxlength)."...";
128                          if ($maxlength && strlen($textewithnotags) > $maxlength)                      }
129                          {                      if ($maxlength && strlen($texte2withnotags) > $maxlength)
130                              $texte=substr($texte,0,$maxlength)."...";                      {
131                          }                          $texte2=substr($texte2,0,$maxlength)."...";
                         if ($maxlength && strlen($texte2withnotags) > $maxlength)  
                         {  
                             $texte2=substr($texte2,0,$maxlength)."...";  
                         }  
                         print $texte;  
                         if ($contents[$i][$j]['url']) print '</a>';  
                         print $texte2;  
           
                         print "</td>";  
132                      }                      }
133                        print $texte;
134                        if ($contents[$i][$j]['url']) print '</a>';
135                        print $texte2;
136                        print "</td>";
137                  }                  }
138            
139                  if (sizeof($contents[$i])) print '</tr>';                  if (sizeof($contents[$i])) print '</tr>';

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26