<!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=iso-8859-1" /><style type="text/css">
#apDiv1 {
position:absolute;
left:225px;
top:17px;
width:530px;
height:161px;
z-index:1;
}
</style>
<div id="apDiv1">
<form action="/untitledcopia.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p>
<label for="ubicacion"></label>
Sección :
<select name="seccion" id="select2">
<option value="Seleccionar" selected="selected">Seleccionar</option>
<option value="Compra y Venta">Compra y Venta</option>
<option value="Vehiculos ">Vehiculos</option>
</select>
Ubicacion :
<select name="ubicacion" id="select3">
<option value="Seleccionar">Seleccionar</option>
<option value="Montevideo">Montevideo</option>
<option value="Canelones">Canelones</option>
<option value="Maldonado">Maldonado</option>
</select>
</p>
<p>
<label for="moneda"></label>
Precio :
<input type="text" name="precio" id="textfield2" />
<label for="moneda">Moneda : </label>
<select name="moneda" id="moneda">
<option value="Seleccionar">Seleccionar</option>
<option value="Pesos">Pesos</option>
<option value="Dolares">Dolares</option>
<option value="Euros">Euros</option>
</select>
</p>
<p>
<label for="content"></label>
Descripción :</p>
<p>
<textarea name="content" id="content" cols="45" rows="10"></textarea>
</p>
<p>
<label for="textfield3"></label>
Titulo :
<label for="titulo"></label>
<input type="text" name="titulo" id="titulo" />
</p>
<p>
<label for="telefono">Télefono</label>
:
<input type="text" name="telefono" id="telefono" />
</p>
<p>
<label for="email">Email</label>
:
<input type="text" name="email" id="email" />
<label for="repetir">Repetir Email : </label>
<input type="text" name="repetir" id="repetir" />
</p>
<p>
<label for="textfield2"></label>
<label for="imagen"></label>
Imagen :
<input type="file" name="imagen" id="imagen" />
</p>
<p>
<input type="submit" name="button" id="button" value="Enviar" />
<input type="reset" name="button2" id="button2" value="Restablecer" />
</p>
</form>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<?php require_once('Connections/anuncios.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
"'" . doubleval($theValue) . "'" : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); }
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO formulario (id_rubro, seccion, ubicacion, precio, moneda, titulo, content, email, repetir_email, telefono, imagen,) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['id_rubro'], "id_rubro"),
GetSQLValueString($_POST['seccion'], "seccion"),
GetSQLValueString($_POST['ubicacion'], "ubicacion"),
GetSQLValueString($_POST['precio'], "precio"),
GetSQLValueString($_POST['moneda'], "moneda"),
GetSQLValueString($_POST['titulo'], "titulo"),
GetSQLValueString($_POST['content'], "content"),
GetSQLValueString($_POST['email'], "email"),
GetSQLValueString($_POST['repetir'], "repetir"),
GetSQLValueString($_POST['telefono'], "telefono"),
GetSQLValueString($_POST['imagen'], "imagen"));
$insertGoTo = "untitledcopia.php";
if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ?
"&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING'];
}
}
?>
<script language="javascript"
type="text/javascript" src="../editor/scripts/tiny_mce.js"></script>
</label>
<p>
<script language="javascript" type="text/javascript" src="../editor/scripts/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
});
</script>