KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/logicswapweb/aplicaciones/admon/catalogo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/logicswapweb/aplicaciones/admon/catalogo/add_producto_old.php
<?php 
include('./../fnc/DBConnect.php');
include('./../fnc/componente.php');
include('./../fnc/parametro.php');
include('./../fnc/vinculo.php');
include('./../fnc/UsuarioPanel.php');
include('./../fnc/bitacora.php');
include('./../fnc/aplicacion.php');
include('./../fnc/panel.php');
include('./../fnc/utileria.php');
include('./../usuariosWeb/fnc/usuarioWeb.php');
include('fnc/ParametrosCatalogo.php');
include('fnc/Producto.php');
include('fnc/Catalogo.php');
include('fnc/Categoria.php');

session_start('PanelAzulDigial');

if(!session_is_registered("panel")){
	echo "<div style=\"	font-family: Verdana, Arial, Helvetica, sans-serif;	color: #0066CC;	font-size: 16px;font-weight: bolder;\">Invalid User</div>";
}

$panel->reactivarDB();
$panel->setFilesPanel(2);
$tipo_u=$panel->usuario->tipo;
$user_u=$panel->usuario->id;
$estado_u=$panel->usuario->estado;


$userModificar = "";
$userEliminar = "";
$userAdicionar = "";
$userAdministrar="";
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->modificar=="NO" && $panel->usuario->vinculo->administrador=="NO"){
	$userModificar = "disabled";
}
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->eliminar=="NO" && $panel->usuario->vinculo->administrador=="NO"){
	$userEliminar= "disabled";
}
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->adicionar=="NO" && $panel->usuario->vinculo->administrador=="NO"){
	$userAdicionar= "disabled";
}
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->administrador=="NO"){
	$userAdministrar= "disabled";
}

$nivel =              (array_key_exists('nivel', $_REQUEST))              ? $_REQUEST['nivel']: 0;

$id_ =                (array_key_exists('id', $_REQUEST))                 ? $_REQUEST['id']: NULL;
$name_categoria =     (array_key_exists('name_categoria', $_REQUEST))     ? $_REQUEST['name_categoria']: NULL;
$ids =                (array_key_exists('ids', $_REQUEST))                ? $_REQUEST['ids']: NULL;
$name_subcategoria =  (array_key_exists('name_subcategoria', $_REQUEST))  ? $_REQUEST['name_subcategoria']: NULL;
$idss =               (array_key_exists('idss', $_REQUEST))               ? $_REQUEST['idss']: NULL;
$name_subcategorias = (array_key_exists('name_subcategorias', $_REQUEST)) ? $_REQUEST['name_subcategorias']: NULL;

$nombre =             (array_key_exists('nombre', $_REQUEST))             ? $_REQUEST['nombre']: NULL;
$referencia =         (array_key_exists('referencia', $_REQUEST))         ? $_REQUEST['referencia']: NULL;
$valor =              (array_key_exists('valor', $_REQUEST))              ? $_REQUEST['valor']: NULL;
$estado =             (array_key_exists('estado', $_REQUEST))             ? $_REQUEST['estado']: NULL;
$estado_oferta =      (array_key_exists('estado_oferta', $_REQUEST))      ? $_REQUEST['estado_oferta']: NULL;
$fecha_fin =          (array_key_exists('fecha_fin', $_REQUEST))          ? $_REQUEST['fecha_fin']: "2005-01-01";
$valor_oferta =       (array_key_exists('valor_oferta', $_REQUEST))       ? $_REQUEST['valor_oferta']: NULL;
$titulo =             (array_key_exists('titulo', $_REQUEST))             ? $_REQUEST['titulo']: NULL;
$img_pri =            (array_key_exists('img_pri', $_REQUEST))            ? $_REQUEST['img_pri']: NULL;
$img_sec =            (array_key_exists('img_sec', $_REQUEST))            ? $_REQUEST['img_sec']: NULL;
$descripcion =        (array_key_exists('descripcion', $_REQUEST))        ? $_REQUEST['descripcion']: NULL;
$permiso =            (array_key_exists('permiso', $_REQUEST))            ? $_REQUEST['permiso']: NULL;
$tipo_pro =          (array_key_exists('tipo_pro', $_REQUEST))            ? $_REQUEST['tipo_pro']: 'p';
$id_pro =             (array_key_exists('id_pro', $_REQUEST))             ? $_REQUEST['id_pro']: NULL;
$parametros_catalogo = $panel->aplicativo->parametro->getParametros($panel->aplicativo->id,$panel->aplicativo->nombre);

$parametros=new Parametros();
$name_pro ="";

if($tipo_pro == 's')
{
	$name_pro = $panel->aplicativo->getNombreProducto($id_pro);
}

?>

<link href="css/panel2Contenido.css" rel="stylesheet" type="text/css">
<script src="js/validaciones.js"></script>
<script>

function fncCancel() {
	var nivel =  document.frm.nivel.value;

	var id =     document.frm.id.value;
	var ids =    document.frm.ids.value;
	var idss =   document.frm.idss.value;
	var id_pro= document.frm.id_pro.value;
	var tipo_pro= document.frm.tipo_pro.value;
	
	if(confirm("Desea Cancel el registro ?")){
		if(nivel==0){
			document.location.href = 'index.php';
		}else{
			if(tipo_pro=='p')
			{
				document.location.href = 'listar_categoria.php?nivel='+nivel+'&id='+id+'&ids='+ids+'&idss='+idss;

			}else
			{
				document.location.href = 'listar_subproductos.php?nivel='+nivel+'&id='+id+'&ids='+ids+'&idss='+idss+"&id_pro="+id_pro;
			}
		}
    }
}

function validarOferta()
{
	estado = document.frm.estado.value;
	if(estado == 'promocion')
	{
		document.frm.valor_oferta.disabled = false;
	}else
	{
		document.frm.valor_oferta.value = '';
		document.frm.valor_oferta.disabled = true;
	}

}

function fncCheckform(){
	var nombre = document.frm.nombre.value;
	var field1 = new Object();
	field1 = document.frm.nombre;
	
	if( field1.value.length==0){
		alert("Debe de ingresar un nombre valido!");
		field1.focus();
		return false;
	}else{
		if(spaceString(nombre)){
			alert("No se permiten espacios en blanco al inicio del campo nombre!");
			document.frm.nombre.focus;
			return false;
		}
	}
	if(specialChar(nombre, true, true,true)){
			alert("No se permiten caracteres especiales en el campo nombre!");
			document.frm.nombre.focus;
			return false;
	}

	var referencia = document.frm.referencia.value;
	var field2 = new Object();
	field2 = document.frm.referencia;
	
	if(field2.value.length==0){
		alert("Debe de ingresar una referencia valida!");
		field2.focus();
		return false;
	}else{
		if(spaceString(referencia)){
			alert("No se permiten espacios en blanco al inicio del campo referencia!");
			document.frm.referencia.focus;
			return false;
		}
	}
	if(specialChar(referencia, true, true,true)){
			alert("No se permiten caracteres especiales en el campo referencia!");
			document.frm.referencia.focus;
			return false;
	}	
	
	var valor = document.frm.valor.value;
	var field3 = new Object();
	field3 = document.frm.valor;
	
	if(field3.value.length==0 || parseInt(valor)<1){
		alert("Debe ingresar un valor valido!");
		field3.focus();
		return false;
	}else{
		if(spaceString(valor)){
			alert("No se permiten espacios en blanco al inicio del campo valor!");
			document.frm.valor.focus;
			return false;
		}
	}
	if(specialChar(valor, true, true,true)){
			alert("No se permiten caracteres especiales en el campo valor!");
			document.frm.valor.focus;
			return false;
	}
	if(solo_numeros(valor)){
			alert("No se permiten letras en el campo valor!");
			document.frm.valor.focus;
			return false;
	}
	<? if($parametros_catalogo['num_imagen'] > 0 ){ ?>
	var titulo = document.frm.titulo.value;
	var field = new Object();
	field = document.frm.titulo;
	
	if(field.value.length==0){
		alert("Debe de ingresar un titulo valido!");
		field.focus();
		return false;
	}else{
		if(spaceString(titulo)){
			alert("No se permiten espacios en blanco al inicio del campo t�tulo imagen!");
			document.frm.titulo.focus;
			return false;
		}
	}
	if(specialChar(titulo, true, true,true)){
			alert("No se permiten caracteres especiales en el campo t�tulo imagen!");
			document.frm.titulo.focus;
			return false;
	}
	
	var img_pri = document.frm.img_pri.value;
	var field4 = new Object();
	field4 = document.frm.img_pri;
	
	if(field4.value.length==0){
		alert("Debe de ingresar una imagen valida!");
		field4.focus();
		return false;
	}else{
		if(spaceString(img_pri)){
			alert("No se permiten espacios en blanco al inicio del campo imagen principal!");
			document.frm.img_pri.focus;
			return false;
		}
	}
	
	var img_sec = document.frm.img_sec.value;
	var field5 = new Object();
	field5 = document.frm.img_sec;
	
	if(field5.value.length==0){
		alert("Debe de ingresar una imagen valida!");
		field5.focus();
		return false;
	}else{
		if(spaceString(img_sec)){
			alert("No se permiten espacios en blanco al inicio del campo imagen reducida!");
			document.frm.img_sec.focus;
			return false;
		}
	}
	<? }?>			
	var descripcion = document.frm.descripcion.value;
	
	if(descripcion==""){
		alert("Debe de ingresar una descripcion valida!");
		document.frm.descripcion.focus();
		return false;
	}else{
		if(spaceString(descripcion)){
			alert("No se permiten espacios en blanco al inicio del campo descripcion!");
			document.frm.descripcion.focus;
			return false;
		}
	}
	if(specialChar(descripcion, true, true,true)){
			alert("No se permiten caracteres especiales en el campo descripcion!");
			return false;
	}
	if( document.frm.descripcion.length>1000){
		alert("Debe de ingresar una descripcion menor a 1000 caracteres!");
		document.frm.descripcion.focus;
		return false;
	}
	
	document.frm.estado_oferta.value="vencida";
	var estado = document.frm.estado.value;
	
	if(estado=="promocion"){
		
		document.frm.estado_oferta.value="vigente";

		var mes = document.frm.mes.value;
		var actual =new Date();
		var fecha = new Date(document.frm.anio.value,parseInt(mes)-1,document.frm.dia.value);

		if (fecha<=actual){		
			alert("La fecha de vencimiento no puede ser menor o igual a la fecha actual");
			document.frm.dia.focus
			return false;
		}
		
		var valor_oferta = document.frm.valor_oferta.value;
		var field6 = new Object();
		field6 = document.frm.valor_oferta;
	
		if(field6.value.length==0 || parseInt(valor_oferta)<1){
			alert("Debe de ingresar un valor de oferta valido!");
			field6.focus();
			return false;
		}else{
			if(spaceString(valor_oferta)){
				alert("No se permiten espacios en blanco al inicio del campo valor oferta!");
				document.frm.valor_oferta.focus;
				return false;
			}
		}
		if(specialChar(valor_oferta, true, true,true)){
			alert("No se permiten caracteres especiales en el campo valor oferta!");
			document.frm.valor_oferta.focus;
			return false;
		}
		if(solo_numeros(valor_oferta)){
			alert("No se permiten letras en el campo valor oferta!");
			document.frm.valor_oferta.focus;
			return false;
		}	
		
		var aux1=parseInt(valor);
		var aux2=parseInt(valor_oferta);
		if(aux1<=aux2){
			alert("El valor oferta no puede ser igual o mayor al valor base!");
			document.frm.valor_oferta.focus;
			return false;
		}
		
	}else{
		document.frm.estado_oferta.value="";
		document.frm.valor_oferta.value="";
	}	
	
	return true;
}
function reLoad(obj){
	var ind = obj.selectedIndex;
	var est = obj.options[ind].value;
	document.location.href= 'l_productos.php?seleccion=<?=$seleccion?>&estado='+est;
}
function fncCheckFormSearch(form) {

	var busc = form.buscar.value;
	if(busc == '')
	{
		alert('The search field can not be empty');
		return false;
	}
	if ( !lengSpaceNess(busc) || specialChar(busc,true,true,true)) {
				alert("El campo buscar no debe de empezar o terminar con espacios en blanco, o contener caracteres diferentes a los imprimibles directamente por el teclado!");
				return false;
	}

	return true;
} 
</script>
<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a{
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	color: #0033CC;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
</style>
<table width="610" border="0" align="left" cellpadding="2" cellspacing="2" class="texto1">
    <tr align="left">
        
    <td height="14" colspan="2" bgcolor="cccccc" class="migas"> <div align="left" class="migas"><a id="migainicio" href="../contenido.php" class="migas" style="cursor:hand" title="Indice de Aplicaciones" onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);">Start</a> 
      / <span class="migas"><a id="migacat" href="menu.php" class="migas" style="cursor:hand" title="Indice de Aplicaciones" onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);"> 
      <?=ucfirst(strtolower($panel->aplicativo->nombre))?>
      </a></span> / <a id="migaslist"  href="index.php?" class="migas" style="cursor:hand" onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);"> 
      catalogue list</a>
      <?php if($nivel==1){?>
      / <a href="listar_categoria.php?nivel=1&id=<?=$id_?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_categoria))?>
      </a> 
      <? }		
		if($nivel==2){?>
      / <a href="listar_categoria.php?nivel=1&id=<?=$id_?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_categoria))?>
      </a> / <a href="listar_categoria.php?nivel=2&id=<?=$id_?>&ids=<?=$ids?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_subcategoria))?>
      </a> 
      <? }?>
      <?php if($nivel==3){?>
      / <a href="listar_categoria.php?nivel=1&id=<?=$id_?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_categoria))?>
      </a> / <a href="listar_categoria.php?nivel=2&id=<?=$id_?>&ids=<?=$ids?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_subcategoria))?>
      </a> / <a href="listar_categoria.php?nivel=3&id=<?=$id_?>&ids=<?=$ids?>&idss=<?=$idss?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_subcategorias))?>
      </a> 
      <? }?>
      <? if($tipo_pro == "s"){ ?>
      / <a href="mod_producto.php?nivel=<?=$nivel ?>&id=<?=$id_?>&ids=<?=$ids?>&idss=<?=$idss?>&id_pro=<?=$id_pro ?>" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';" title="Categoria"> 
      <?=ucfirst(strtolower($name_pro))?>
      </a> 
      <? }?>
    </td>
    </tr>
    <tr>
      
    <td height="14" colspan="2"><img src="img/menu.gif" width="49" height="22" align="top"> 
      <input name="tem2" type="button" class="boton1" style="width:80 "onClick="javascript: document.location.href= 'index.php'" value="Catalog"> 
      <input name="tem22" type="button" class="boton1" style="width:58 "onClick="javascript: document.location.href= 'listUsuarios.php'" value="Users"> 
      <input name="tem222" type="button" class="boton1" style="width:90 " onClick="javascript: document.location.href= 'valores_config/index.php'" value="Parameters" <?=$userAdministrar?>></td>
    </tr>
	<tr  width="610">
				<td colspan="3" class="texto1">
				<table width="604">
				  <tr><td width="316">
				<form name="listar"  method="get" onSubmit="<?=$PHP_SELF?>">
				
              <div align="left" class="texto1">Products 
                <select name="estado" class="listado" onChange="javascript: reLoad(this);" style="width:80px ">
					<option value="cat" <? if (!$estado){echo "selected";}?>></option>
					<option value="todos" <? if ($estado=="todos"){echo "selected";}?>>All</option>
					<option value="disponible" <? if ($estado=="disponible"){echo "selected";}?>>Available</option>
					<option value="nuevo" <? if ($estado=="nuevo"){echo "selected";}?>>News</option>
					<option value="destacado" <? if ($estado=="destacado"){echo "selected";}?>>Outstanding</option>
					<option value="promocion" <? if ($estado=="oferta"){echo "selected";}?>>Supply</option>
					
					<option value="no_disponible" <? if ($estado=="no_disponible"){echo "selected";}?>>NonAvailable</option>

				  </select> 
				  </div>
				</form>

				</td><td width="276">
				<form name="buscar" method="post" action="l_productos.php" onSubmit="return fncCheckFormSearch(this)">
				   <div align="right">
					<input type="hidden" name="seleccion" value="<?=$seleccion?>">
					<input name="buscar" type="text" class="listado" style="width:100px " value="<?=$buscar?>">
					
					
                <input name="bbuscar" type="submit" class="boton1" value="Find">
				  </div>
				</form>
				</td></tr></table>
				</td>

	</tr>
	<form action="fnc/main.php" method="post" enctype="multipart/form-data" name="frm" id="frm" onSubmit="return fncCheckform()">
    <tr>
      <td height="30" colspan="2" class="texto1"><div class="vinculos" align="center">Add 
          Product</div>
        <br>
        <div align="center"> Note: (*) Obligatoty Field</div></td>
    </tr>
	<tr>
        <td align="left" colspan="2" valign="top">
			<table cellspacing=1 cellpadding=0 width="100%" align="left" bgcolor=000099 border=0 id="campos">
			   <tbody>
						<tr>
							<td bgcolor=#0099CC>
								<table cellspacing=0 cellpadding=0 width="100%" border=0 align="left">
									<tbody>
										<tr bgcolor="000099" class="titular1">
											<td width="32%" align="left" class="filatitulo">&nbsp;				 				 
						                    </td>
											<td width="68%" align=right class="nombreColum">
											<div align="left"> Product Information</div>										  </td>
									  </tr></tbody>
							  </table>
							</td></tr>
						<tr>
					<td valign="top" bgcolor=#ffffff class="texto1"><br>
						<table cellspacing=0 cellpadding=0 width="100%" align="left" border=0>
						    <!--DWLayoutTable-->
						  <tbody>
							
							<tr>
								<td align=left width="6">&nbsp;</td>
								
                      <td width="149" height="22" valign="top" class="listado">Name:</td>
								<td width="370" valign="top" class="texto1">
                             
							  <input name="nombre" type="text" class="listado" id="nombre" style="width:340 " value="<?=$nombre?>" maxlength="100">
							  *						    </tr>
							<tr>
								<td align=left width="6">&nbsp;</td>
								<td colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
							</tr>																	
							<tr>
								<td align=left width="6">&nbsp;</td>
								
                      <td height="19" valign="top" class="texto1">Reference:</td>
								<td valign="top" class="texto1">
								<input name="referencia" type="text" class="listado" id="referencia" style="width:340 " value="<?=$referencia?>" maxlength="100">
							  *								</td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>								
							<tr>
							    <td align=left>&nbsp;								</td>
							    
                      <td height="22" valign="top" class="texto1"> Price: </td>
						        <td valign="top" class="texto1">
							  <input name="valor" type="text" class="listado" id="valor" style="width:340 " onKeyPress="return solo_numeros(event)" value="<?=$valor?>" maxlength="100">
							  *							  </td>
						    </tr>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>

							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								
                      <td valign="top" class="texto1">State:</td>
							    <td valign="top" class="texto1">
								<select name="estado" class="listado" id="estado" style="width:340 " onChange="validarOferta()">
							      <? if($estado=="disponible"){?>
									  	<option value="disponible" selected>Available Product</option>
							      <? }else{?>
									  	<option value="disponible">Available Product</option>
								  <? }
								     if($estado=="no disponible"){?>
									  	<option value="no disponible">Not Available Product</option>
							      <? }else{?>
								  		<option value="no disponible">Not Available Product</option>
								  <? }
 									if($estado=="destacado"){?>
                                  <option value="destacado" selected>Outstanding Product</option>
                                  <? }else{?>
                                  <option value="destacado">Outstanding Product</option>
                                  <? }
								     if($estado=="nuevo"){?>	
										<option value="nuevo" selected>New Product</option>
							      <? }else{?>
								  		<option value="nuevo">New Product</option>
								  <? }
								     if($estado=="promocion"){?>
								  		<option value="promocion" selected>Promotion Product</option>
								  <? }else{?>
								  		<option value="promocion">Promotion Product</option>
								  <? }?>
						        </select>
						      *</td>
							</tr>

						  <td align=left width="6">&nbsp;
								
							</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								
                    <td class="texto1">End date ofert</td>
							    <td valign="top" class="texto1"><table width="327" cellpadding="0" cellspacing="0">
                                  <tr>
                                    
                          <td width="83"  valign="baseline" class="texto1"> Day: 
                            <select name="dia" class="listado" style=" outline-color:#000000; font-size:10px" title="Day">
                                          <?php 
					$j=substr(substr($fecha_fin,8),0,2);
					for($i=1;$i<=31;$i++){
						if($i==$j){
							echo "<option value=\"$i\" selected>$i</option>";
						}else{
							echo "<option value=\"$i\">$i</option>";
						}
					} ?>
                                      </select>                                    </td>
                                    
                          <td width="134"  valign="baseline" class="texto1"> Month: 
                            <select name="mes" class="listado" title="Month">
                                      <?php if(substr(substr($fecha_fin,5),0,2)=="01"){?>
                                      <option value="1" selected>January</option>
                                      <?php }else{?>
                                      <option value="1">January</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="02"){?>
                                      <option value="2" selected>February</option>
                                      <?php }else{?>
                                      <option value="2">February</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="03"){?>
                                      <option value="3" selected>March</option>
                                      <?php }else{?>
                                      <option value="3">March</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="04"){?>
                                      <option value="4" selected>April</option>
                                      <?php }else{?>
                                      <option value="4">April</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="05"){?>
                                      <option value="5" selected>May</option>
                                      <?php }else{?>
                                      <option value="5">May</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="06"){?>
                                      <option value="6" selected>June</option>
                                      <?php }else{?>
                                      <option value="6">June</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="07"){?>
                                      <option value="7" selected>July</option>
                                      <?php }else{?>
                                      <option value="7">July</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="08"){?>
                                      <option value="8" selected>August</option>
                                      <?php }else{?>
                                      <option value="8">August</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="09"){?>
                                      <option value="9" selected>September</option>
                                      <?php }else{?>
                                      <option value="9">September</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="10"){?>
                                      <option value="10" selected>Octuber</option>
                                      <?php }else{?>
                                      <option value="10">Octuber</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="11"){?>
                                      <option value="11" selected>November</option>
                                      <?php }else{?>
                                      <option value="11">November</option>
                                      <?php }if(substr(substr($fecha_fin,5),0,2)=="12"){?>
                                      <option value="12" selected>December</option>
                                      <?php }else{?>
                                      <option value="12">December</option>
                                      <?php }?>
                                      </select>                                    </td>
                                    
                          <td width="97" valign="top" class="texto1"> Year: 
                            <select name="anio" class="listado" title="Year">
                                          <?php
						$j=substr($fecha_fin,0,4);
						for($i=2005;$i<=2010;$i++){
							if($i==$j){
								echo "<option value=\"$i\" selected>$i</option>";
							}else{							
								echo "<option value=\"$i\">$i</option>";
							}
						}
						?>
                                      </select>                                    </td>
                                    <td align="center" width="11"><input name="estado_oferta" type="hidden" id="estado_oferta" value="<?=$estado_oferta?>"> </td>
                                  </tr>
                              </table>							  </td>
							</tr>							
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>							
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								
                    <td valign="top" class="texto1">Ofert price:</td>
							    <td valign="top" class="texto1"><input disabled name="valor_oferta" type="text" class="listado" id="valor_oferta" style="width:340 " onKeyPress="return solo_numeros(event)" value="<?=$valor_oferta?>" maxlength="100"></td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>

<? if($parametros_catalogo['num_imagen'] > 0 ){ ?>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								
                    <td valign="top" class="texto1">Image tittle: </td>
							    <td valign="top" class="texto1">
								<input name="titulo" type="text" class="listado" id="titulo" style="width:340 " value="<?=$titulo?>" maxlength="100">
							  *							  </td>
							</tr>														
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>								
							<tr>
							    <td align=left>&nbsp;								</td>
							    
                    <td valign="top" class="texto1"> Main Image: </td>
						        <td valign="top" class="texto1">							    
							  <input name="img_pri" type="file" class="listado" id="img_pri" style="width:340" onKeyPress="this.blur()" value="<?=$img_pri?>" maxlength="0">
*							    <br>
							  <?
								echo "width=".$parametros->getAncho()."px,height=".$parametros->getAlto()."px";
								?>							  </td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2" valign="top">&nbsp;
								
								</td>
							</tr>								
							<tr>
							    <td align=left>&nbsp;								</td>
							    
                    <td valign="top" class="texto1"> Secundary Image: </td>
					      	    <td valign="top" class="texto1">
								<input name="img_sec" type="file" class="listado" id="img_sec" style="width:340" onKeyPress="this.blur()" value="<?=$img_sec?>" maxlength="0">
								*<br>
							  <?
								$proporcion=$parametros->getAncho()/$parametros->getAlto();
								$ancho=314;
								$alto=$ancho/$proporcion;
								if($alto>=100){
									$alto=substr($alto,0,3);
								}else{
									$alto=substr($alto,0,2);
								}
								echo "width=".$ancho."px,height=".$alto."px";
								?>							
							</tr>

<? }else {?>
<input name="titulo" type="hidden" class="listado" id="titulo" style="width:340 " value="" maxlength="100">
<input name="img_pri" type="hidden" class="listado" id="img_pri" style="width:340" onKeyPress="this.blur()" value="none" maxlength="0">
<input name="img_sec" type="hidden" class="listado" id="img_sec" style="width:340" onKeyPress="this.blur()" value="none" maxlength="0">

<?		}?>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2"><!--DWLayoutEmptyCell-->&nbsp;								</td>
							</tr>								
							<tr>
							    <td align=left>&nbsp;								</td>
							    
                    <td valign="top" class="texto1"> About the product: </td>
							    <td valign="top" class="texto1"><textarea name="descripcion" cols="64" rows="6" class="listado" id="descripcion"><?=$descripcion?></textarea>
					          *</td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;								</td>
								<td colspan="2"><!--DWLayoutEmptyCell-->&nbsp;								
								</td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2">&nbsp;
								
								</td>
							</tr>								
							<tr>
								<td align=left width="6">&nbsp;</td>
								
                    <td class="texto1">Permission:</td>
							    <td>
								  <select name="permiso" class="listado" id="permiso">
                                    <? if($permiso!="publico"){?>
                                    <option value="<?=$panel->usuario->id?>" selected>Privado</option>
                                    <? }else{ ?>
                                    <option value="<?=$panel->usuario->id?>">Privado</option>
                                    <? }?>
                                    <? if($permiso=="publico"){?>
                                    <option value="publico" selected>Public</option>
                                    <? }else{?>
                                    <option value="publico">Public</option>
                                    <? }?>
                                  </select>
			</td>
							</tr>
							<tr>
								<td align=left width="6">&nbsp;
																
								</td>
								<td colspan="2">
								<input type="hidden" name="tarea"              value="add_producto">
								<input type="hidden" name="nivel"              value="<?=$nivel?>">
                                <input type="hidden" name="id"                value="<?=$id_?>">
                                <input type="hidden" name="ids"                value="<?=$ids?>">
                                <input type="hidden" name="idss"               value="<?=$idss?>">
                                <input type="hidden" name="name_categoria"     value="<?=$name_categoria?>">
                                <input type="hidden" name="name_subcategoria"  value="<?=$name_subcategoria?>">
                                <input type="hidden" name="name_subcategorias" value="<?=$name_subcategorias?>">		
                                <input type="hidden" name="tipo_pro" value="<?=$tipo_pro?>">								
						        <input type="hidden" name="id_pro" value="<?=$id_pro?>">								

								</td>
							</tr>								
							<tr>
								<td align=left width="6">&nbsp;
								
								</td>
								<td colspan="2">&nbsp;
								
								</td>
							</tr>							
							<tr>
							    <td align=left>&nbsp;								</td>
							    <td colspan="2">								<div align="center">
							    
                        <input name="adicionar" type="submit" class="boton1" value="Add">
							    
                        <input name="cancelar" type="button" class="boton1" onClick="fncCancel();" value="Cancel">
							    </div>
								</td>
							</tr>
							<tr>
							    <td align=left>&nbsp;								</td>
							    <td colspan="2">&nbsp;								</td>
							</tr>
					  </table>					</td>
					</tr>
			  </tbody>
		  </table>		
		</td>
    </tr>
    <tr>
        <td width="199" valign="top">
		</td>
		<td width="322">
		<iframe src="" name="_fraUsr" id="_fraUsr" height="0" frameborder="0"></iframe>
		</td>
    </tr>
		<script>document.frm.nombre.focus();</script>   
</form>
</table>

</body>
</html>

Anon7 - 2021