Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4ca23009ce
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 87 lines (66 sloc) 1.699 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
<?
$Page->Title = 'Actualiza Cliente';

include_once('./Security.inc.php');
include_once($Page->Prefix.'ajfwk/GetParameters.inc.php');
include_once($Page->Prefix.'ajfwk/Database.inc.php');
include_once($Page->Prefix.'ajfwk/Errors.inc.php');
include_once($Page->Prefix.'ajfwk/Pages.inc.php');
include_once($Page->Prefix.'ajfwk/Forms.inc.php');
include_once($Page->Prefix.'ajfwk/Translations.inc.php');

include_once($Page->Prefix.'includes/Enumerations.inc.php');
include_once($Page->Prefix.'includes/ClienteFunctions.inc.php');

DbConnect();

if (!ErrorHas() && isset($Id)) {
$rs = ClienteGetById($Id);
$Nombre = $rs['Nombre'];
$IdEmpresa = $rs['IdEmpresa'];

$IsNew = 0;
}
else if (isset($Id))
$IsNew = 0;
else {
$Page->Title = "Nuevo Cliente";
$IsNew = 1;
}

$rsIdEmpresa = TranslateQuery("$Cfg[SqlPrefix]empresas","Nombre as Nombre");

include_once($Page->Prefix.'includes/Header.inc.php');
?>

<center>

<p>
<a href="ClienteList.php">Clientes</a>
&nbsp;
&nbsp;
<?
if (!$IsNew) {
?>
<a href="ClienteView.php?Id=<? echo $Id; ?>">Cliente</a>
&nbsp;
&nbsp;
<?
}
?>
</p>


<?
ErrorRender();
?>

<p>

<form action="ClienteUpdate.php" method=post>

<table cellspacing=1 cellpadding=2 class="form">
<?
if (!$IsNew)
FieldStaticGenerate("Id",$Id);

FieldTextGenerate("Nombre","Nombre",$Nombre,30,False);
FieldComboRsGenerate("IdEmpresa","Empresa",$rsIdEmpresa,$IdEmpresa,"Id","Nombre",false,False);

FieldOkGenerate();
?>
</table>

<?
if (!$IsNew)
FieldIdGenerate($Id);
?>

</form>

</center>

<?
DbDisconnect();
include_once($Page->Prefix.'includes/Footer.inc.php');
?>
Something went wrong with that request. Please try again.