Viewing file: select_multiple.php (3.73 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//prevents caching
//header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
//header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
//header("Cache-Control: post-check=0, pre-check=0",false);
//session_cache_limiter();
//session_start();
//require('config.php');
//require('functions.php');
//this is group name or username of the group or person that you wish to allow access to
// - please be advise that the Administrators Groups has access to all pages.
/*
if (allow_access(gestores) != "yes")
{
include ('no_access.php');
exit;
}
*/
?>
<!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=utf-8" />
<title>Documento sin título</title>
<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
function showgenero(str)
{
if (str=="")
{
document.getElementById("listado").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("listado").innerHTML=xmlhttp.responseText;
}
}
//xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.open("GET","?q="+str,true);
xmlhttp.send();
}
</script>
<center>
<table border="1">
<?php
$link=mysql_connect($server,$dbusername,$dbpassword);
$select=mysql_select_db($db_name) or die('No hay BD');
$cadena="select * from reg_organizaciones";
$sql=mysql_query($cadena);
?>
<tr><td>
<?php
//if (!$_POST)
//{
if($reg=mysql_fetch_array($sql))
{
echo "<form name='abc' method='POST'>";
echo "Seleccionar participantes"."<BR><BR>";
echo "Nombre instancia: " . "<input type='text' name='instanpart' id='instanpart1'> <BR><BR>";
echo "<select multiple size='10' id='cbogenero1' name='organismo[]'>";
echo "<option value='X'>SELECCIONA</option>";
do
{
echo "<option value='".$reg['user']." [".$reg['identi']."][".$reg['web']."], "."'>".$reg['user']." [".$reg['identi']."][".$reg['web']."], "."</option>";
}while($reg=mysql_fetch_array($sql));
echo "</select>";
echo "<BR><BR>"."Para seleccionar varios, utilizar" . "<BR>"."simultáneamente " . "la tecla Control y el Botón" . "<BR>". "izquierdo del mouse.";
echo "<BR><BR><input type='submit' name='boton' value='Seleccionar'>";
echo "<input type='hidden' name='abc' value='1'/>";
echo "</form>";
};
?>
</td><td>
<?php
$sql ="SELECT * FROM participantes WHERE nombrepart= '$_POST[instanpart]'";
$result = @mysql_query($sql,$link) or die(mysql_error());
$num = mysql_num_rows($result);
if ($num != 0){
echo "<P>Lo sentimos ya se encuentra registrado en el sistema</P>";
echo "<P><a href=\"#\" onClick=\"history.back()\">Regresar</a></p>";
exit;
}else{
if (isset($_POST['organismo']))
{
$instanpart=$_POST["instanpart"];
$instancia=$_POST["organismo"];
$organismo=implode(" ",$instancia);
} else{
$organismo = "";
}
echo "<form name='cba' action='registro_participacion_F_InstanPart.php' method='POST'>";
$solucionA= $instanpart;
$solucionB= $organismo;
echo "Integrantes de la Instancia"."<BR><BR>";
echo "Nombre instancia: " . "<input type='text' name='nominstancia' id='nominstancia' value='" . $solucionA . "'> <BR><BR>";
echo "<textarea name='comentarios' rows='10' cols='30' value='Integrantes: ". $solucionB."'>"."". $solucionB."</textarea>";
echo "<BR><BR><input type='submit' name='boton1' value='Guardar Instancia'></form>";
}
?>
</td></tr>
<tr></table>
|