Example #1
0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<div id="">
			<h3>ALBUMS</h3>
		<a href="javascript:;" onClick="get('insert/albums.php','content')" class="agregar">Agregar album</a><br />

		  <?
		  
		  	$order="";
		  	$pag="";
		  	
		  	if(isset($_GET['order']) && $_GET['order']!="") $order=$_GET['order'];
		  	if(isset($_GET['pag']) && $_GET['pag']!="") $pag=$_GET['pag'];
		  	 
			$sql = "SELECT * FROM albums";	
			$g = new Grid();
			GridDataSource::Fill($g, GridSorter::SortQuery($sql, $order));
			//$a = new htmlLink("../select/userinfo.php?id=","Detalles",0,"?id=","newWindow('../usersinfo.php?id=*','windowTittle')");
			$b = new htmlLink("javascript:;","Editar",0,"", "get('update/albums.php?id=*','content')");
			$c = new htmlLink("javascript:;", "Eliminar", 0, "", "get('delete/albums.php?id=*','content'); get('select/albums.php','content'); $('#mensajes').empty(); $('#mensajes').show(); desaparece('mensajes'); ");
			$links = array( $b, $c);
			
			echo GridSortPage::Render($sql, $links, $order, 25, $pag);
		?>
	<a href="javascript:;" onClick="get('select/fotos.php','content')" class="agregar">Administrador de Fotos</a><br />
	</div>
</body>
</html>
Example #2
0
#include("../../infopix.core.php5/Security/SecurityManager.class.php");
include("../../infopix.core.php5/Utilities/Application.class.php");
#include("../../includes/lock.php");

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<div id="">
			<h3>Sites</h3>
		<a href="../insert/sites.php" class="agregar">Agregar</a><br />

		  <?
			$sql = "SELECT * FROM sites";	
			$g = new Grid();
			GridDataSource::Fill($g, GridSorter::SortQuery($sql, $_REQUEST[order]));
			$a = new htmlLink("../select/userinfo.php?id=","Detalles",0,"?id=","newWindow('../usersinfo.php?id=*','windowTittle')");
			$b = new htmlLink("../update/sites.php?id=","Editar",0,"", "");
			$c = new htmlLink("../delete/delete.php?tabla=sites&redirect=../select/sites.php&id=", "Eliminar", 0, "", "");
			$links = array($a, $b, $c);

			echo GridSortPage::Render($sql, $links, $_REQUEST['order'], 50, $_REQUEST['pag']);
		?>

	</div>
</body>
</html>
	public static function Render($qry, $list, $orderby, $tampag = 50, $pag){

	$original_qry = $qry;
	$qry = GridSortPage::SortQuery($qry, $orderby);
	$qry =  GridSortPage::PaginateQuery($qry, $pag, $tampag);

	
	$matrix = DataBase::ExecuteQuery($qry);

		$html = "\n<table>\n";
		$html .= GridSortPage::GetHeader($qry);
					 
		foreach($matrix as $key => $rows){	
			$html .= "<tr>";
							
			foreach($rows as $index => $column){					
					if($key%2 == 0)		$html .= "<td>".$column."</td>";
					else				$html .= "<td class=\"selectedRow\">".$column."</td>";
			}		

			#============================================================================
			
			#============================================================================
			
			#-------
			$html .= "<td>";
			if(isset($has_header) && $key == 0){
				$html .= "Opciones";
			}else{
			
			/*$html .= "<ul id=\"sddm\">
					    <li>
						<a href=\"#\" onmouseover=\"mopen('m$key')\" onmouseout=\"mclosetime()\">Opciones</a> 
						<div id=\"m$key\" onmouseover=\"mcancelclosetime()\" onmouseout=\"mclosetime()\">";*/
			
				foreach($list as $url)
				{
					if(get_class($url)=='HTMLCheckBox')
						$html.=$url->fillfromColumn($rows,"msgs[]",0)."\n";
					else 
						$html .= $url->Render($rows)."\n";
				}
					
			$html .= "</div>
					</li>
				</ul>
				<div style=\"clear:both\"></div>";
			}
			$html .= "</td>";
			#-------				
			$html .= "\n</tr>\n";	
			if(isset($has_header) && $key ==0) $html .= "</thead>";
	
		}
		$html .= "</table>\n";	
		$html .= GridSortPage::GetNavigationControlsHTML($original_qry, $tampag, $orderby);
		return $html;
	 } #GetHTMLTable