Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
require_once('inc_library.php');
/* obtiene datos enviados */
$Page = (isset($_REQUEST['Page'])) ? intval($_REQUEST['Page']) : 0;
$Action = $_REQUEST['MainAction'];
$Id = $_REQUEST['Id'];
/* si el filtro esta aplicado mantiene el filtro */
$filterStyle = "display:none;";
$filterMostrar = "";
if ((isset($_REQUEST['filtroActivo'])) && ($_REQUEST['filtroActivo'] == 1))
{
$filterStyle = "";
$filterMostrar = "display:none;";
}
/* armamos el filtro */
$filter = array();
$filter['Nombre'] = $_REQUEST['FilterNombre'];
$filter['NumeroSocio'] = $_REQUEST['FilterNumeroSocio'];
/* declaracion de variables */
$arr = array();
$Socios = new Socios();
$oPage = new Page($Page);
/* SOLUCION TEMPORAL PARA EL PAGINADOR */
if ($Page > $Socios->GetPagesCount($oPage, $filter))
{
$Page = $Socios->GetPagesCount($oPage, $filter);
}
$oPage = new Page($Page);
$arr = $Socios->GetAll($filter, $oPage);
$CountRows = $Socios->GetCountRows($filter);
$Paginado = Pageable::PrintPaginator($oPage, $Socios->GetPagesCount($oPage,$filter), $CountRows);
$strParams = '';
$strParams.= '?IdSocio=' . $Id;
$strParams.= '&Page=' . $Page;
$strParams.= '&FilterNombre=' . $filter['Nombre'];
$strParams.= '&FilterNumeroSocio=' . $filter['NumeroSocio'];
/* ejecuta la accion solicitada... */
switch ($Action)
{
case 'Add':
header('Location: socios_add.php' . $strParams);
exit;
break;
case 'Edit':
header('Location: socios_mod.php' . $strParams);
exit;
break;
case 'Delete':
header('Location: socios_del.php' . $strParams);
exit;
break;
default:
break;
}
$strParamsExport = '';
$strParamsExport.= '?Page=' . $Page;
//$strParamsExport.= '&PageSize=' . $PageSize;
$strParamsExport.= '&filter=' . SendArray($filter);
?>
<?php Modules::WriteClientFunctions(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript">
function SetPage(Page)
{
var frmData = Get('frmData');
if (frmData == undefined)
return false;
frmData.Page.value = Page;
frmData.submit();
}
/*function ClearCampos()
{
var frmData = Get('frmData');
frmData.FilterNombre.value = '';
frmData.FilterProvincias .value = '';
}*/
function ClearFilter()
{
var frmData = Get('frmData');
frmData.FilterNombre.value = '';
frmData.FilterNumeroSocio.value = '';
location.href='socios.php';
}
function ShowFilter()
{
HideSection('ShownFilter');
ShowSection('HiddenFilter');
ShowSection('FilterMain');
}
function HideFilter()
{
ShowSection('ShownFilter');
HideSection('HiddenFilter');
HideSection('FilterMain');
}
function Add()
{
var frmData = Get('frmData');
var MainAction = Get('MainAction');
if (frmData == undefined)
return false;
MainAction.value = 'Add';
frmData.submit();
return true;
}
function Edit(IdProvincia)
{
var frmData = Get('frmData');
var MainAction = Get('MainAction');
var IdField = Get('Id');
if (frmData == undefined)
return false;
MainAction.value = 'Edit';
IdField.value = IdProvincia;
frmData.submit();
return true;
}
function Delete(IdProvincia)
{
var frmData = Get('frmData');
var MainAction = Get('MainAction');
var IdField = Get('Id');
if (frmData == undefined)
return false;
MainAction.value = 'Delete';
IdField.value = IdProvincia;
frmData.submit();
return true;
}
</script>
<?php include('include/head.inc.php'); ?>
</head>
<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
<tr>
<td width="20" height="40" class="TituloRubro"> </td>
<td height="40"><span class="tituloPagina">Socios</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="30" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" height="40"><div align="center"><img src="images/iconos/add.gif" alt="Agregar" border="0"></div></td>
<td height="40"><a href="#bottom" onClick="javascript: Add();">Agregar</a></td>
<td width="80%"> </td>
<td width="30" height="40"><div align="center"><img src="images/iconos/icono_csv.gif" alt="Agregar" border="0"></div></td>
<td height="40"><a href="socios_exportar.php<?=$strParamsExport?>">Exportar</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="30" valign="top">
<form name="frmData" id="frmData" method="post" action="socios.php">
<input type="hidden" name="Page" id="Page" value="<?=$Page?>">
<input type="hidden" name="MainAction" id="MainAction">
<input type="hidden" name="Id" id="Id">
<input type="hidden" name="filtroActivo" id="filtroActivo" value="1">
<!-- Aca van los filtros -->
<div id="ShownFilter" class="bordeGrisFondo" style="<?=$filterMostrar;?>padding: 5px">
[+] <a href="#bottom" class="linkMenu" onClick="javascript: ShowFilter();">
<b> Mostrar búsqueda y filtros</b>
</a>
</div>
<div id="HiddenFilter" style="<?=$filterStyle;?>padding: 5px;" class="bordeGrisFondo" >
[-] <a href="#bottom" class="linkMenu" onClick="javascript: HideFilter();">
<b>Ocultar búsqueda y filtros</b>
</a>
</div>
<div id="FilterMain" style="<?=$filterStyle;?>" class="">
<div id="Filter" >
<table width="100%" style="color:#FFFFFF;" >
<td><div style="color:#FFFFFF;"></div></td>
</table>
<table border="0" class="bordeGrisFondo" align="left" cellpadding="2" cellspacing="2" width="100%" >
<tr>
<td width="50" class="tituloMenu">Nombre:</td>
<td align="left">
<input name="FilterNombre" id="FilterNombre" type="text" class="camporFormularioSimple" value="<?=$filter['Nombre']?>" maxlength="128"> </td>
<td width="100" class="tituloMenu">Número de Socio:</td>
<td align="left">
<input name="FilterNumeroSocio" id="FilterNumeroSocio" type="text" class="camporFormularioSimple" value="<?=$filter['NumeroSocio']?>" maxlength="128"> </td>
<td align="right"><span class="tituloMenu">
<input type="submit" name="button" id="button" class="botonBasico" value="Buscar">
<input type="button" name="button2" id="button2" class="botonBasico" onClick="javascript: ClearFilter();" value="Cancelar">
</span></td>
</tr>
</table>
</div>
</div>
</form>
</td>
</tr>
<tr>
<td> </td>
</tr>
<?php if ($arr != NULL) { ?>
<tr>
<td>
<div align="right"><? print ($Paginado) ?></div>
<br>
<table width="100%" align="center" cellpadding="0" cellspacing="0" class="bordeGris">
<tr class="bordeGrisFondo">
<td width="10"> </td>
<td height="25"><strong>Nombre</strong></td>
<td width="272"><div align="center"><strong>Numero De Socio</strong></div></td>
<td width="273"><div align="center"><strong>Tipo de Socio</strong></div></td>
<td width="100"><div align="center"><strong>Acciones</strong></div></td>
</tr>
<?php foreach ($arr as $oSocio) { ?>
<tr onmouseover="bgColor='#f3f3f3'" onmouseout="bgColor='#FFFFFF'">
<td width="10"> </td>
<td height="20" width="313"><?=utf8_encode($oSocio->Nombre)?></td>
<td height="20"><div align="center"><?=$oSocio->NumeroSocio?></div></td>
<td height="20"><div align="center"><?=$oSocio->TipoSocio?></div></td>
<td width="100" height="20">
<div align="center">
<a href="#bottom" onClick="javascript: Edit(<?=$oSocio->IdSocio?>)">
<img src="images/iconos/mod.gif" alt="Modificar" border="0" /></a> -
<a href="#bottom" onClick="javascript: Delete(<?=$oSocio->IdSocio?>)">
<img src="images/iconos/del.gif" alt="Eliminar" border="0" />
</a>
</div>
</td>
</tr>
<tr>
<td colspan="6"><div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" background="images/linea_punteada.gif"><div align="center"></div></td>
</tr>
</table>
</div></td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
<tr>
<td>
<br>
<div align="right"><? print ($Paginado) ?></div>
<br>
</td>
</tr>
<?php } else { ?>
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="bordeGrisFondo">
<tr>
<td> </td>
</tr>
<tr>
<td><div align="center"> <img src="images/iconos/alerta.gif" border="0"> </div></td>
</tr>
<tr>
<td><div align="center"><strong>No hay registros disponibles.</strong></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
<?php } ?>
</table>
</body>
<script language="javascript">
HideFilter();
</script>
</html>
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat