Foros del Web » Programando para Internet » PHP »

ayudaaaa php

Estas en el tema de ayudaaaa php en el foro de PHP en Foros del Web. buen dia PHP-eros tengo una duda sobre este codigo lo baje de internet y lo estaba modificando, pero no puedo modificar el delete a ver ...
  #1 (permalink)  
Antiguo 11/10/2010, 11:56
 
Fecha de Ingreso: septiembre-2010
Mensajes: 11
Antigüedad: 13 años, 7 meses
Puntos: 0
ayudaaaa php

buen dia PHP-eros
tengo una duda sobre este codigo lo baje de internet y lo estaba modificando, pero no puedo modificar el delete a ver si alguien puede ayudarme les dejo el codigo

el principal problema esta en esta linea
// Add standard control
$x->addStandardControl(EyeDataGrid::STDCTRL_EDIT, "%id_clients%");
$x->addStandardControl(EyeDataGrid::STDCTRL_DELETE, "id_clients" );

y los que quieran el codigo que estoy haciendo lo pueden descargar de
http://ordsystem.comxa.com/free-code

aver si me pueden ayudar graciasss


<?php
include '../../../aplicacion.php';
?>
<?php
require 'class.eyemysqladap.inc.php';
require 'class.eyedatagrid.inc.php';

// Load the database adapter
$db = new EyeMySQLAdap('localhost', 'root', '', 'a1417310_ord');

// Load the datagrid class
$x = new EyeDataGrid($db);

// Set the query
$x->setQuery("id_clients,firts,last,phone", "tbl_clients");

// Add a row selector
//$x->addRowSelect("alert('You have selected id # %id_clients%')");

// Apply a function to a row
function returnSomething($lastname)
{
return strrev($lastname);
}
$x->setColumnType('LastName', EyeDataGrid::TYPE_FUNCTION, 'returnSomething', '%id_clients%');

// Hide ID Column
$x->hideColumn('id_clients');

// Show reset grid control
//$x->showReset();

// Add standard control
$x->addStandardControl(EyeDataGrid::STDCTRL_EDIT, "%id_clients%");
$x->addStandardControl(EyeDataGrid::STDCTRL_DELETE, "id_clients" );

// Add create control
//$x->showCreateButton("alert('Code for creating a new person')", EyeDataGrid::TYPE_ONCLICK, 'Add New Person');

// Show checkboxes
//$x->showCheckboxes();

// Show row numbers
$x->showRowNumber();

// Change the amount of results per page
$x->setResultsPerPage(10);

// Stop ordering
//$x->hideOrder();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>:: CONTROL DE PRODUCCION ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="shortcut icon" href="../../model/images/os-conpro.ico" />
<link rel="stylesheet" type="text/css" href="../../model/css/Envision.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="../../model/css/uvumi-dropdown.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../../model/css/modal.css" />
<script type="text/javascript" src="../../model/js/mootools-for-dropdown.js"> </script>
<script type="text/javascript" src="../../model/js/UvumiDropdown-compressed.js"> </script>
<script type="text/javascript" src="../../model/js/js.js"> </script>
<script type="text/javascript">
var menu = new UvumiDropdown('dropdown-demo');
</script>

<link href="../../model/css/table.css" rel="stylesheet" type="text/css" />

</head>
<body>
<div id="wrap">
<div id="header">
<h1 id="logo-text">CONTROL</h1>
<h2 id="slogan">de Produccion V 0.1</h2>
<div id="header-links">
<p> <a href="../index.php">Home</a> | <a href="#">Contact</a> | <a href="#">Site Map</a> </p>
<p>Usted se ha autentificado como <samp><?php echo $_SESSION["login"]; ?></samp> (<a href="../../../salir.php"><samp>salir</samp></a>) </p>
</div>
</div>
<div id="menu">
<ul id="dropdown-demo" class="dropdown">
<li><a>Archivo</a>
<ul>
<li><a href="index.php">Clientes</a></li>
<li><a href="../suppliers">Proyeedores</a></li>
<li><a href="../employees">Trabajadores</a></li>
<li><a href="../inputs">Articulos</a></li>
<li><a href="../items">Insumos</a></li>
<li><a href="../sub_products">Sub. Productos</a></li>
<li><a href="../Pro_finished">Pro. Terminados</a></li>
</ul>
<li><a>Venta por Caja</a>
</ul>
</div>
<div id="content-wrap">

<table>
<tr>
<td><a href='add_clients.php' ><img src='../../model/images/add.gif' alt='nuevo' />Nuevo</a></td>
</tr>
<tr>
<td>
<?php
// Print the table
$x->printTable();
?>
</td>
</tr>
</table>



</div>
<div id="footer">
<p> &copy;<strong>All rights reserved.</strong> <br />Designed By :<a href="http://ordsystem.comxa.com">Ord system</a></p>
</div>
</div>
</body>
</html>
  #2 (permalink)  
Antiguo 11/10/2010, 14:48
Avatar de ferbux  
Fecha de Ingreso: mayo-2007
Ubicación: por ahí intentado ayudar
Mensajes: 823
Antigüedad: 16 años, 11 meses
Puntos: 6
Respuesta: ayudaaaa php

Hola ordsystem,

Posiblemente tengas que delimitarcon comillas simples las funciones.

Ej:

$x->addStandardControl('EyeDataGrid::STDCTRL_EDIT', "%id_clients%");
$x->addStandardControl('EyeDataGrid::STDCTRL_DELETE ', "id_clients" );

Saludos!!!
__________________
"Eres grande por que caminas entre gigantes"
  #3 (permalink)  
Antiguo 11/10/2010, 17:55
Avatar de Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: ayudaaaa php

Porque en EDIT tienes id_clients entre signos de porcentaje y en DELETE no?
__________________
- León, Guanajuato
- GV-Foto

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:29.