First commit 31/12/2001
This commit is contained in:
		
							
								
								
									
										98
									
								
								gestion-pidiendo.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										98
									
								
								gestion-pidiendo.php
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,98 @@
 | 
			
		||||
<?
 | 
			
		||||
			session_name( "SYNCRO" );
 | 
			
		||||
			$v1="user_id";
 | 
			
		||||
			$v2="user_name";
 | 
			
		||||
			$v3="user_auth";
 | 
			
		||||
			session_register($v1,$v2,$v3);
 | 
			
		||||
			session_start();
 | 
			
		||||
 | 
			
		||||
require ("common/config.inc.php");
 | 
			
		||||
require ("common/dbnav_bar.php");
 | 
			
		||||
 | 
			
		||||
  // Segun TIPO selecionamos las pelis
 | 
			
		||||
  $conexion = mysql_connect( 'localhost', 'syncro_users', '29dic2001' ) OR die("No puedo conectar");
 | 
			
		||||
  $id = mysql_select_db( 'SYNCRO', $conexion ) OR die("No puedo abrir Base de Datos");
 | 
			
		||||
  
 | 
			
		||||
  if ( $user_auth )
 | 
			
		||||
  {
 | 
			
		||||
    if ( isset( $peli_id ) ) {
 | 
			
		||||
	 $solo_esta_peli = "pu.peli=$peli_id AND "; 
 | 
			
		||||
	 $parse_options = "peli_id=$peli_id";
 | 
			
		||||
    } else {
 | 
			
		||||
	 $solo_esta_peli="pu.user <> $user_id AND ";
 | 
			
		||||
	 $parse_options = "";
 | 
			
		||||
    }
 | 
			
		||||
    $qFROM = "users u, pelis_user pu, pelis_user mu WHERE $solo_esta_peli pu.user = u.id AND pu.status='PEDIR' AND mu.user=$user_id AND pu.peli=mu.peli AND mu.status='OK'"; 
 | 
			
		||||
    $consulta = "SELECT DISTINCT u.id, u.Apodo FROM $qFROM";
 | 
			
		||||
  } else {
 | 
			
		||||
    die("<META CONTENT=\"0; URL=index.htm\" HTTP-EQUIV=\"REFRESH\">");
 | 
			
		||||
  }
 | 
			
		||||
  $res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
 | 
			
		||||
  if ( isset( $uid ) )
 | 
			
		||||
    $resp = mysql_query( "SELECT p.Titulo FROM pelis_user pu, pelis_user mu, pelis p WHERE pu.user='$uid' AND pu.status='PEDIR' AND mu.user='$user_id' AND mu.status='OK' AND pu.peli=mu.peli AND p.id=pu.peli ORDER BY p.Titulo", $conexion ) OR die("No puedo realizar la consulta<br>$consulta<br>".mysql_error($conexion));
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<html>
 | 
			
		||||
<head>
 | 
			
		||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 | 
			
		||||
<title>SYNCRO: Listado de usuarios que solicitan una pelicula</title>
 | 
			
		||||
<link href="syncro.ico" rel="SHORTCUT ICON">
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="syncro.css" body="syncro.css">
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body bgcolor="#57A44D">
 | 
			
		||||
<br><div align="center"><center><table border="1" cellpadding="0"
 | 
			
		||||
    cellspacing="0" width="600" bgcolor="#427B42"
 | 
			
		||||
    bordercolor="#000000" bordercolordark="#000000"
 | 
			
		||||
    bordercolorlight="#000000" >
 | 
			
		||||
        <tr><td valign="top" width="200"><table border="0" width="100%"  cellspacing="0"  >
 | 
			
		||||
                <tr>
 | 
			
		||||
                	<td bgcolor="#000000">> Usuario</td>
 | 
			
		||||
                	<td bgcolor="#000000" colspan="3" align="center">+</td>
 | 
			
		||||
		</tr>
 | 
			
		||||
<?
 | 
			
		||||
  $numrows = mysql_num_rows( $res );
 | 
			
		||||
  if (  $numrows > 0 )
 | 
			
		||||
  {
 | 
			
		||||
   while ( $datos = mysql_fetch_array($res) )
 | 
			
		||||
   { 
 | 
			
		||||
	if ( $linea_color ) 
 | 
			
		||||
	   echo "<tr>";
 | 
			
		||||
	else
 | 
			
		||||
	   echo "<tr bgcolor=\"#488048\">";
 | 
			
		||||
	$linea_color = !$linea_color;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	echo "<td><a href=\"miFicha.php?info_user=$datos[0]\">$datos[1]</a></td><td>+</td><td>+</td><td><a href=\"$PHP_SELF?$parse_options&uid=$datos[0]\" onmouseover=\"javascript:document['mi$datos[0]'].src='images/minfo.gif'\" onmouseout=\"javascript:document['mi$datos[0]'].src='images/minfo-.gif'\"><img name=\"mi$datos[0]\" src=\"images/minfo-.gif\" border=\"0\"></a></td></tr>";
 | 
			
		||||
   };
 | 
			
		||||
  } else {
 | 
			
		||||
	echo "-= ERROR =- La consulta no produjo resultados";
 | 
			
		||||
  }
 | 
			
		||||
?></table>
 | 
			
		||||
	     </td>
 | 
			
		||||
	     <td>
 | 
			
		||||
<? if ( !isset( $uid ) ) { ?>
 | 
			
		||||
		Para ver que otras peliculas (de las que tu ya tienes), esta pidiendo otro usuario, pica sobre el icono correspondiente.<br><br>[ ESTO AUN NO ESTA ]
 | 
			
		||||
<? } else { ?>
 | 
			
		||||
<blockquote>
 | 
			
		||||
<?
 | 
			
		||||
  $numrows = mysql_num_rows( $resp );
 | 
			
		||||
  if (  $numrows > 0 )
 | 
			
		||||
  {
 | 
			
		||||
   while ( $datos = mysql_fetch_array($resp) )
 | 
			
		||||
   { 
 | 
			
		||||
	echo $datos[0] . "<br>";
 | 
			
		||||
   }
 | 
			
		||||
  }
 | 
			
		||||
?>
 | 
			
		||||
</blockquote>
 | 
			
		||||
<? } ?>
 | 
			
		||||
<br><br><a href="<?echo $PHP_SELF?>"><img src="images/!.gif" border="0" align="right" ALT="Mostrar todos los usuarios a los que le puedo prestar algo"></a>
 | 
			
		||||
	     </td>
 | 
			
		||||
         </tr></table></center></div>
 | 
			
		||||
 | 
			
		||||
<p align="center"> </p>
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user