Inheritance diagram for Admin:
Public Member Functions | |
Admin ($p_cn, $p_id=0) | |
Constructor /* only a db connection is needed. | |
Summary ($p_search) | |
Data Fields | |
$name | |
$street | |
$country | |
$cp | |
$vat_number |
Definition at line 39 of file class_admin.php.
|
Constructor /* only a db connection is needed.
Definition at line 49 of file class_admin.php. References fiche::fiche(). 00049 { 00050 $this->fiche_def_ref=FICHE_TYPE_ADM_TAX; 00051 fiche::fiche($p_cn,$p_id) ; 00052 00053 }
|
|
Summary show the default screen parm :
Definition at line 65 of file class_admin.php. References $bar, $e, $offset, $page, $r, $search, $url, fiche::CountByDef(), FormatString(), fiche::GetAll(), jrn_navigation_bar(), and table. 00066 { 00067 $p_search=FormatString($p_search); 00068 $url=urlencode($_SERVER['REQUEST_URI']); 00069 $script=$_SERVER['SCRIPT_NAME']; 00070 // Creation of the nav bar 00071 // Get the max numberRow 00072 $all_admin=$this->CountByDef($this->fiche_def_ref,$p_search); 00073 // Get offset and page variable 00074 $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0; 00075 $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; 00076 $bar=jrn_navigation_bar($offset,$all_admin,$_SESSION['g_pagesize'],$page); 00077 // set a filter ? 00078 $search=""; 00079 if ( trim($p_search) != "" ) 00080 { 00081 $search=" and f_id in 00082 (select f_id from jnt_fic_att_value 00083 join fiche using (f_id) 00084 join attr_value using (jft_id) 00085 where 00086 ad_id=1 and av_text ~* '$p_search')"; 00087 } 00088 // Get The result Array 00089 $step_admin=$this->GetAll($offset,$search); 00090 if ( $all_admin == 0 ) return ""; 00091 $r=$bar; 00092 $r.='<table> 00093 <TR style="background-color:lightgrey;"> 00094 <TH>Quick Code</TH> 00095 <th>Nom</th> 00096 <th>Adresse</th> 00097 <th>Action </th> 00098 </TR>'; 00099 if ( sizeof ($step_admin ) == 0 ) 00100 return $r; 00101 foreach ($step_admin as $admin ) { 00102 $r.="<TR>"; 00103 $e=sprintf('<A HREF="%s?p_action=admin&sa=detail&f_id=%d&url=%s" title="Détail"> ', 00104 $script,$admin->id,$url); 00105 00106 $r.="<TD> $e".$admin->strAttribut(ATTR_DEF_QUICKCODE)."</A></TD>"; 00107 $r.="<TD>".$admin->strAttribut(ATTR_DEF_NAME)."</TD>"; 00108 $r.="<TD>".$admin->strAttribut(ATTR_DEF_ADRESS). 00109 " ".$admin->strAttribut(ATTR_DEF_CP). 00110 " ".$admin->strAttribut(ATTR_DEF_PAYS). 00111 "</TD>"; 00112 $r.="<td>"; 00113 $r.=sprintf('<A class="mtitle" HREF="%s?p_action=contact&qcode=%s&url=%s" title="Contact">C</A> - ', 00114 $script,$admin->strAttribut(ATTR_DEF_QUICKCODE),$url); 00115 $r.=sprintf('<A class="mtitle" HREF="%s?p_action=suivi_courrier&sa=list&qcode=%s&url=%s" title="Action">A</A> - ', 00116 $script,$admin->strAttribut(ATTR_DEF_QUICKCODE) ,$url); 00117 00118 $r.='</TD>'; 00119 00120 $r.="</TR>"; 00121 00122 } 00123 $r.="</TABLE>"; 00124 $r.=$bar; 00125 return $r; 00126 }
|
|
Country Definition at line 43 of file class_admin.php. |
|
Zip code Definition at line 44 of file class_admin.php. |
|
name of the company Definition at line 41 of file class_admin.php. |
|
Street Definition at line 42 of file class_admin.php. |
|
vat number Definition at line 45 of file class_admin.php. |