Location: PHPKode > projects > MyDB > mydata/displaytable.php3
<?php 
/*************************************************************
 * The MyDB librairy and applications are product of SQLFusion
 * It may be used and/or distributed under the terms of the Q Public
 * License (QPL) version 1.0, enclosed in the file licence.txt.
 ****************************************************************/
/** MyDATA Version 0.9    **/ 
/** Author Philippe Lewicki **/

	require("mydatalocal.inc.php3");
	require("acm_header.php3") ; 
	 
	$conx = new connect;
    $conx->start() ; 
    $conx->table = $table; 
    $conx->sql_query = stripslashes($sql_query);
    $conx->sql_order = stripslashes($sql_order) ; 
	
	if (isset($pos)) {
	    $conx->pos = $pos ;     
	}


?> 

<script language="javascript">

 <!--
browserName = navigator.appName;
browserVer  = parseInt(navigator.appVersion);

if (browserName == "Netscape" && browserVer >= 3)
  version = "ver1";
else
  version = "ver2";

     function StartAll() {
        MM_goToURL('parent','');
        return document.MM_returnValue
        }
<?php
   $filenameselfarray = explode("/", $PHP_SELF); 
   $filenameself = $filenameselfarray[count($filenameselfarray)-1];        
?>
     function OpenPopup() {
       var openpopup = window.open("tbl_sql_searchbuilder.php3?resultpage=<?php echo $filenameself; ?>&table=<?php echo $conx->table; ?>","popupwin","width=550,height=250,left=190,top=300,resizable=yes,scrollbars=yes");
       if ( version == "ver1" ) { 
	openpopup.focus(); 
       	window.main.name = "opener";
  	}
        return false; 
         }

function MM_goToURL() { //v2.0
  for (var i=0; i< (MM_goToURL.arguments.length - 1); i+=2) //with arg pairs
    eval(MM_goToURL.arguments[i]+".location='"+MM_goToURL.arguments[i+1]+"'");
  document.MM_returnValue = false;
}
//-->

</script>   <!--- 
<font size="+2" color="#000080"><? echo stripslashes($title); ?></font>
--->
<DIV align="center">
<TABLE width="620">
<TR>
<TD>

<?php	
              $tabledisp = new table;   
              $tabledisp->strNoRecords =  $strNoRecords ; 
              $tabledisp->strShowingRecords	= $strShowingRecords ;
              $tabledisp->strTotal		= $strTotal ;
              $tabledisp->strEdit		= $strEdit ;
              $tabledisp->strPrevious	=  $strPrevious;
              $tabledisp->strNext		= $strNext ; 
              $tabledisp->strDelete		= $strDelete  ;
              $tabledisp->strDeleted		= $strDeleted ;
              $tabledisp->strLinkedTable 	=  $strLinkedTable; 
              $tabledisp->strPos1                	=  $strPos1 ;
              $tabledisp->strEnd                 	= $strEnd;
              $tabledisp->strInsertNewRow	=  $strInsertNewRow ;
              $tabledisp->strYes		= $strYes ;
              $tabledisp->strNo		=  $strNo ;
              $tabledisp->strDoYouReallyDelete =  $strDoYouReallyDelete; 

              $tabledisp->cfgBgcolorOne = "#D0F5C5" ;
              $tabledisp->cfgBgcolorTwo = "#C7F5E7" ;
              $tabledisp->cfgShowBlob = true; 
			  $tabledisp->cfgLinkTableRecord = true ; 
              $result = $conx->query($conx) ; 
              $conx->getnum_rows() ;
			  $tabledisp->showpicture[bphoto] = 0 ;  
			  
/****** Exemple to personalise a display for a special database ******			  

			  if ($table == "exposant") {
			     $tabledisp->hidefield[description] = 1 ; 
				 $tabledisp->hidefield[sigle] = 1; 
				 $tabledisp->hidefield[denomination] = 1 ; 
				 $tabledisp->hidefield[siret] = 1 ; 
				 $tabledisp->hidefield[ape] = 1 ; 
				 $tabledisp->hidefield[idexposant] = 1 ;
			     $tabledisp->showpicture[photo] = 0 ; 
				 $tabledisp->cfgLinkTableRecord = true ; 
				 $tabledisp->strLinkedTable = "Les produits" ;
			  }
			  if ($table == "visiteur") {
			     $tabledisp->hidefield[idvisiteur] = 1 ; 			  
			     $tabledisp->hidefield[perms] = 1 ; 
			  	 $tabledisp->cfgLinkTableRecord = true ; 
				 $tabledisp->strLinkedTable = "Les logs" ;			  
			  }
***************************************************************************/
			  
              $tabledisp->displaytable($conx, $result) ; 

?><BR>
<A href="<?php echo $REQUEST_URI; ?>" onclick="OpenPopup();"><?php echo $strDoQuery; ?> </a><BR>

<A href="./tbl_spl_csv.php3?db=<? echo $conx->db; ?>&table=<? echo $conx->table; ?>&sql_query=<? echo urlencode($conx->sql_query); ?>"> <?php echo $strUploadRecord; ?></a><BR>

</TD>
</TR>
</TABLE>
</DIV>
<?
	require("acm_footer.php3") ; 

?>

Return current item: MyDB