ClaveAudio_Web/admin/shoop/cate_caracteristicas_edit.php
2011-05-06 11:33:27 +00:00

101 lines
3.0 KiB
PHP

<?php
session_start();
if (!session_is_registered("clave_audio")) {
include("../login.php");
if (!$continuar) exit;
}
include('../db.php');
?>
<html>
<head>
<title>cate_caracteristicas</title>
<link href="../sformi.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function doSubmit() {
document.formulario.submit();
}
</script>
</head>
<body>
<?php
/*
if (!session_is_registered("sintogeo")) {
include("../login.php");
if (!$continuar) exit;
}
*/
if(isset($_REQUEST['op'])) {
$operacion = $_REQUEST['op'];
$id = $_REQUEST['id'];
} else {
$operacion = "add";
}
?>
<?php
switch($operacion)
{
case "add";
$catop_tipo = "";
$catop_label = "";
$catop_values = "";
$catop_orden = "";
break;
case "edit";
$conn = db_connect();
if($conn) {
$query = "SELECT catop_categoria, catop_tipo, catop_label, catop_values, catop_orden FROM shoop_cate_caracteristicas WHERE catop_categoria = " . $id;
$result = mysql_query($query, $conn);
if (mysql_num_rows($result)) {
$row = mysql_fetch_array($result);
$catop_tipo = $row['catop_tipo'];
$catop_label = $row['catop_label'];
$catop_values = $row['catop_values'];
$catop_orden = $row['catop_orden'];
} else {
$catop_tipo = "";
$catop_label = "";
$catop_values = "";
$catop_orden = "";
}
}
break;
}
?>
<form method="post" action="cate_caracteristicas_db.php" name="formulario">
<input name="op" type="hidden" value="<?php echo $operacion; ?>">
<input name="id" type="hidden" value="<?php echo $id; ?>">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td width="200" class= "lbl">Tipo</td></tr>
<tr><td width="" class="data"><select name="catop_tipo" style="width:px"><option value="1">Sample Value 1</option><option value="2">Sample Value 2</option><option value="3">Sample Value 3</option> </select></td></tr>
<tr><td><img src="img/d.gif" width="100" height="10"></td></tr>
<tr><td width="200" class= "lbl">Label</td></tr>
<tr><td width="" class="data"><input name="catop_label" type="text" size="32" maxlength="32" value="<?php echo $catop_label; ?>"></td></tr>
<tr><td><img src="img/d.gif" width="100" height="10"></td></tr>
<tr><td width="200" class= "lbl">Valores</td></tr>
<tr><td width="" class="data"><textarea name="catop_values" cols="50" rows="2"><?php echo $catop_values; ?></textarea></td></tr>
<tr><td><img src="img/d.gif" width="100" height="10"></td></tr>
<tr><td width="200" class= "lbl">Orden</td></tr>
<tr><td width="" class="data"><input name="catop_orden" type="text" size="2" maxlength="2" value="<?php echo $catop_orden; ?>"></td></tr>
<tr><td><img src="img/d.gif" width="100" height="10"></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="javascript:history.go(-1)" class="button">[ back ]</a>&nbsp;&nbsp;
<a href="javascript:doSubmit();" class="button">[ <?php echo $operacion; ?> ]</a>
</td>
</tr>
</table>
</form>
</body>
</html>