/[phpcompta]/phpcompta/include/fiche_inc.php
ViewVC logotype

Diff of /phpcompta/include/fiche_inc.php

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

revision 1.21 by sparkyx, Mon Jul 25 10:08:42 2005 UTC revision 1.22 by sparkyx, Wed Oct 26 13:18:22 2005 UTC
# Line 408  function GetBaseFicheDefault($p_cn,$p_ty Line 408  function GetBaseFicheDefault($p_cn,$p_ty
408   *   *
409   */   */
410  function ViewFiche($p_cn,$p_type) {  function ViewFiche($p_cn,$p_type) {
411      require_once("user_common.php");
412    echo '<H2 class="info">'.getFicheDefName($p_cn,$p_type).'</H2>';    echo '<H2 class="info">'.getFicheDefName($p_cn,$p_type).'</H2>';
413    
414       $step=$_SESSION['g_pagesize'];
415       $sql_limit="";
416       $sql_offset="";
417       if ( $step != -1 ) {
418         $page=(isset($_GET['page']))?$_GET['page']:1;
419         $offset=(isset($_GET['offset']))?$_GET['offset']:0;
420         $max_line=CountSql($p_cn,"select f_id,av_text  from
421                              fiche join jnt_fic_att_value using (f_id)
422                                    join attr_value using (jft_id)
423                           where fd_id='".$p_type."' and ad_id=".ATTR_DEF_NAME." order by f_id");
424         $sql_limit=" limit ".$step;
425         $sql_offset=" offset ".$offset;
426         $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
427       }
428      
429    // Get all name the cards of the select category    // Get all name the cards of the select category
430    // 1 for attr_def.ad_id is always the name    // 1 for attr_def.ad_id is always the name
431      $Res=ExecSql($p_cn,"select f_id,av_text  from      $Res=ExecSql($p_cn,"select f_id,av_text  from
432                            fiche join jnt_fic_att_value using (f_id)                            fiche join jnt_fic_att_value using (f_id)
433                                  join attr_value using (jft_id)                                  join attr_value using (jft_id)
434                         where fd_id='".$p_type."' and ad_id=".ATTR_DEF_NAME." order by f_id");                         where fd_id='".$p_type."' and ad_id=".ATTR_DEF_NAME." order by f_id $sql_offset $sql_limit ");
435      $Max=pg_NumRows($Res);      $Max=pg_NumRows($Res);
436        echo $bar;
437    
438      for ( $i = 0; $i < $Max; $i++) {      for ( $i = 0; $i < $Max; $i++) {
439        $l_line=pg_fetch_array($Res,$i);        $l_line=pg_fetch_array($Res,$i);
# Line 434  function ViewFiche($p_cn,$p_type) { Line 452  function ViewFiche($p_cn,$p_type) {
452      echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';      echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
453      echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">';      echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">';
454      echo '</FORM>';      echo '</FORM>';
455        echo $bar;
456    
457  }  }
458  /* function GetNextFiche  /* function GetNextFiche

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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