<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
require_once("DFJQUERY.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php

if(!isset($_REQUEST['bot']))$_REQUEST['bot']="";
if ($_REQUEST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=cat_segmento_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('cat_segmento_CL.php');
		$varible_clase = new clase();
		$res=$varible_clase->lista_busqueda($_REQUEST["bot"]);
		$reg=mysqli_fetch_array($res);
		$_REQUEST['tap2']=$reg['descripcion'];
		$_REQUEST['n_reg']=$reg['n_reg'];
		$_REQUEST['stipodaily']=$reg['stipodaily'];
		}
?>
<style type="text/css">
<!--
.Estilo19 {font-size: 16px}
-->
</style>
	
<body>
<form name="frm1" method="post" action="" enctype="multipart/form-data">
  <p>
    <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'];?>"> 
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="431" align="center">
    <tr>
      <th colspan="4">CONSULTAR SEGMENTO</th>
    </tr>
    <tr>
      <th width="85"><strong>CODIGO</strong></th>
      <td width="330" colspan="3" style="#A15E8D"><span class="Estilo19">
        <input name="tclave" type="text" id="tclave" tabindex="20" size="15" disabled="disabled" value="<?php
 echo $_REQUEST['n_reg'];?>">
      </span></td>
    </tr>
      <tr>
        <th width="85"><strong>DESCRIPCION</strong></th>
        <td width="330" colspan="3" style="#A15E8D"><label>
        <input name="tap2" id="tap2" type="text" tabindex="2" disabled="disabled" value="<?php
 echo $_REQUEST['tap2'];?>"
		  onBlur="may(this)" size="50"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['descripcion'].'"';
		}
		?>>
        </label></td>
      </tr>
      <tr>
        <th height="29"><strong>TIPO DE MERCADO </strong></th>
        <td height="29" colspan="3" style="#A15E8D"><select name="stipodaily" id="stipodaily" disabled="disabled">
          <?php
 
$sql = mysqli_query($con ,"SELECT * FROM tipmerca");
while($reg=mysqli_fetch_array($sql)){
	if($_REQUEST['stipodaily']==$reg['tdescrip'] ){
		echo '<option value="' . $reg['tdescrip'] . '" selected>' . $reg['tdescrip'] . '</option>';
	}else{
		echo '<option value="' . $reg['tdescrip'] . '">' . $reg['tdescrip'] . '</option>';
	}
}
?>
        </select></td> </tr>
      <tr>
        <th height="29" colspan="4">
          <div align="center">
            <input name="bot4" type="button" class="bot_WsW" onClick="openpage('cat_segmento_PR.php','_self')" value="Regresar"/>
          </div></th>
      </tr>
    </table>
</form>
 <?php
 
}
?>
<?php
 mysqli_close($con);//168-->109?>
</body>
</html>
