First commit ~0,10

This commit is contained in:
José David Guillén 2021-09-12 22:43:41 +02:00
commit bf5a636f7a
140 changed files with 13185 additions and 0 deletions

BIN
PortalMusica.rar Normal file

Binary file not shown.

9
README.md Normal file
View File

@ -0,0 +1,9 @@
#PortalMusica.com
*~0,10*
ToDo: wwtcf?
![screenshot](/PortalMusica.com.png "Screenshot")

59
addons/autenticate.php Normal file
View File

@ -0,0 +1,59 @@
<?php
session_name( "PMUSICAwebsite" );
$v1="user_id";
$v2="user_nick";
$v3="user_auth";
$v4="user_usaCorreo";
$v5="user_level";
$v6="user_idg";
session_register($v1,$v2,$v3,$v4,$v5, $v6);
session_start();
if ( !isset( $user_auth ) || empty( $user_auth ) )
{
$user_auth = false;
if ( ! ( empty( $ulogin ) || empty( $upass ) ) )
checkUser( $ulogin, $upass, true );
}
if ( isset( $db_login ) && isset( $db_pass ) )
checkUser( $db_login, $db_pass, $db_autolog );
function checkUser( $user, $pass, $rem )
{
global $conexion, $id, $user_auth, $user_nick, $user_id, $user_usaCorreo, $user_level, $user_idg;
$dev = false;
$consulta = "SELECT id, pass, level, usaCorreo, idg FROM users WHERE nick = '$user' AND pass='$pass'";
$res = mysql_query( $consulta, $conexion ) OR die("No puedo realizar la consulta");
if ( mysql_num_rows($res) > 0 )
{
$user_id = mysql_result( $res, 0, "id" );
$user_nick = $user;
$user_auth = true;
$user_usaCorreo = mysql_result( $res, 0, "usaCorreo" );
$user_level = mysql_result( $res, 0, "level" );
$user_idg = mysql_result( $res, 0, "idg" );
mysql_query( "UPDATE users SET ultimaEntrada=NOW() WHERE id=$user_id", $conexion ) OR die("No puedo actualizar tu ficha");
if ( $rem )
{
setcookie( "ulogin", "$user", time()+2592000 );
setcookie( "upass", "$pass", time()+2592000 );
}
$dev = true;
}
mysql_free_result($res);
return $dev;
}
// ***********
function getNumNews()
{
global $conexion;
$res = mysql_query( "SELECT COUNT(*) num FROM news", $conexion ) OR die("No puedo realizar la consulta");
$dev = mysql_result( $res, 0, "num" );
mysql_free_result($res);
return $dev;
}
?>

0
addons/autenticate.php~ Normal file
View File

35
addons/email.php Normal file
View File

@ -0,0 +1,35 @@
<h1>Correo interno</h1>
<p class=remark> Actualmente las cuentas de correo internas estan bloqueadas.</p>
No obstante las cuentas de correo antiguas, siguen en perfecto funcionamiento.
Para acceder a ellas, utiliza el siguiente formulario:
<div align="center"><center><table border="1"
cellpadding="3" cellspacing="0" bordercolor="#000000"
bordercolorlight="#000000">
<tr>
<td bgcolor="#800000"><font color="#FFFFFF"
size="2" face="Arial,Helvetica,sans-serif">Email
Login</font><br>
<input type="text" size="15" maxlength="32"
name="loginName"> </td>
<td bgcolor="#800000"><font color="#FFFFFF"
size="2" face="Arial,Helvetica,sans-serif">Password</font><br>
<input type="password" size="15"
maxlength="32" name="user_pwd"> </td>
</tr>
<tr>
<td align="center" bgcolor="#C0C0C0"
style="text-align:center;"><input
type="submit" name="login" value="Login"></td>
<td align="center" bgcolor="#C0C0C0"
style="text-align:center;"><font
color="#000000">Nuevos usuarios</font><br>
<a
href="http://infdj.mail.everyone.net/email/scripts/useragreement.pl"
class="wcMenu">alta GRATIS</a>!</td>
</tr>
</table>
</center></div>

120
addons/estilo.css Normal file
View File

@ -0,0 +1,120 @@
/* Enlaces */
a {
color: #000000;
font: 8pt verdana, arial, helvetica, sans-serif;
font-weight: bold;
text-decoration: none;
fade: true;
}
a:hover {color: #FF0000;}
/* Enlaces grandes (Usados en ver_discos) */
.eBig {
color: #0000FF;
font: 12pt verdana, arial, helvetica, sans-serif;
font-weight: bold;
font-size: 12pt;
fade: -1;
text-decoration: none;
}
.eBig:hover {color: #FF0000;}
/* Cuerpo */
BODY {
scrollbar-face-color:#66CC66;
scrollbar-highlight-color:#66CC66;
scrollbar-3dlight-color:#000000;
scrollbar-darkshadow-color:#000000;
scrollbar-shadow-color:#66CC66;
scrollbar-arrow-color:none;
scrollbar-track-color:#40BF30;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 10pt;
text-align: justify;
color: #000000;
}
td, tr {
font: 10pt verdana, arial;
text-align: justify;
font-weight: bold;
}
.colIzq {
BACKGROUND: #FFCC33;
}
.td_lista {
BACKGROUND: #EEEEEE;
}
.td_estilos {
BORDER-RIGHT: black 2px solid;
BORDER-LEFT: black 1px solid;
BORDER-TOP: black 1px solid;
BORDER-BOTTOM: #000000 3px solid;
BACKGROUND: white;
width: 100%;
}
.lmenu {
/*
BORDER-TOP: #66CC66 1px solid;
BORDER-BOTTOM: #66CC66 1px solid;
*/
font: 8pt verdana, arial;
text-align: center;
}
.lmenuo {
/*
BORDER-RIGHT: black 1px solid;
BORDER-LEFT: black 3px solid
BORDER-TOP: #FF0000 1px solid;
BORDER-BOTTOM: #FF0000 1px solid;
*/
font: 8pt verdana, arial;
font-color: black;
text-align: center;
BACKGROUND: #FFA600;
}
.menuB {
font: 10pt verdana, arial;
text-align: center;
BACKGROUND: #FFCC66;
COLOR: #FFCC66;
}
.menuL {
color:#FFFFFF;
background:#800000;
font-size: 10pt;
border-style : solid;
border-left-width : 0;
border-top-width : 0;
border-bottom-width : 0;
border-right-width : 0;
}
/* formularios */
input {
background-color: #FFFFFF;
border-width: 1;
border-color: #cccccc;
border-style: solid;
color: #CC3333;
font-size: 10pt;
}
select {
background-color: #FFFFFF;
border-width: 1;
border-color: #cccccc;
border-style: solid;
color: #CC3333;
font-size: 10pt;
}

0
addons/estilo.css~ Normal file
View File

119
addons/fade.js Normal file
View File

@ -0,0 +1,119 @@
/*************
**** <config>
**/
startColor = "#000000"; // MouseOut link color
endColor = "#ff0000"; // MouseOver link color
stepIn = 20; // delay when fading in
stepOut = 20; // delay when fading out
/*
** set to true or false; true will
** cause all links to fade automatically
***/
autoFade = false;
/*
** set to true or false; true will cause all CSS
** classes with "fade" in them to fade onmouseover
***/
sloppyClass = true;
/**
**** </config>
**************/
/*************
**** <install>
**
**
**** </install>
**************/
hexa = new makearray(16);
for(var i = 0; i < 10; i++)
hexa[i] = i;
hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
hexa[13]="d"; hexa[14]="e"; hexa[15]="f";
document.onmouseover = domouseover;
document.onmouseout = domouseout;
startColor = dehexize(startColor.toLowerCase());
endColor = dehexize(endColor.toLowerCase());
var fadeId = new Array();
function dehexize(Color){
var colorArr = new makearray(3);
for (i=1; i<7; i++){
for (j=0; j<16; j++){
if (Color.charAt(i) == hexa[j]){
if (i%2 !=0)
colorArr[Math.floor((i-1)/2)]=eval(j)*16;
else
colorArr[Math.floor((i-1)/2)]+=eval(j);
}
}
}
return colorArr;
}
function domouseover() {
if(document.all){
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className ==
"fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
fade(startColor,endColor,srcElement.uniqueID,stepIn);
}
}
function domouseout() {
if (document.all){
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className ==
"fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
fade(endColor,startColor,srcElement.uniqueID,stepOut);
}
}
function makearray(n) {
this.length = n;
for(var i = 1; i <= n; i++)
this[i] = 0;
return this;
}
function hex(i) {
if (i < 0)
return "00";
else if (i > 255)
return "ff";
else
return "" + hexa[Math.floor(i/16)] + hexa[i%16];}
function setColor(r, g, b, element) {
var hr = hex(r); var hg = hex(g); var hb = hex(b);
element.style.color = "#"+hr+hg+hb;
}
function fade(s,e, element,step){
var sr = s[0]; var sg = s[1]; var sb = s[2];
var er = e[0]; var eg = e[1]; var eb = e[2];
if (fadeId[0] != null && fade[0] != element){
setColor(sr,sg,sb,eval(fadeId[0]));
var i = 1;
while(i < fadeId.length){
clearTimeout(fadeId[i]);
i++;
}
}
for(var i = 0; i <= step; i++) {
fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - "
+i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +
step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + "
+eg+ " * (" +i+ "/" +step+
")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * ("
+i+ "/" +step+ ")),"+element+");",i*step);
}
fadeId[0] = element;
}

0
addons/fade.js~ Normal file
View File

8
addons/index.htm Normal file
View File

@ -0,0 +1,8 @@
<html>
<head>
<title>:: No dispone de permisos para acceder a esta carpeta ::</title>
<META CONTENT="0; URL=/" HTTP-EQUIV="REFRESH">
</head>
<body>
</body>
</html>

38
addons/misc.js Normal file
View File

@ -0,0 +1,38 @@
function hidestatus(){
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
function high(which2)
{
theobject=which2;
highlighting=setInterval("highlightit(theobject)",50);
}
function low(which2)
{
clearInterval(highlighting);
which2.filters.alpha.opacity=50;
}
function highlightit(cur2)
{
if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if(window.highlighting)
clearInterval(highlighting)
}
function abreVentana( hVentana, url, W, H )
{
if ( hVentana.location && !hVentana.closed )
{
hVentana.location.href = url;
} else {
hVentana = window.open( url,"PMweb","width="+W+",height="+H+",top=50,left=50,resizable=no,scrollbars=no,menubar=no,toolbar=no,status=no,location=no");
if ( !hVentana.opener ) hVentana.opener = self;
}
if ( window.focus ) hVentana.focus();
}

5
addons/open_db.php Normal file
View File

@ -0,0 +1,5 @@
<?
global $conexion, $id;
$conexion = mysql_connect( 'localhost', 'PMUSICA_users', 'pmusica_password' ) OR die("No puedo conectar");
$id = mysql_select_db( 'PMUSICA', $conexion ) OR die("No puedo abrir Base de Datos");
?>

30
addons/rpublicidad.php Normal file
View File

@ -0,0 +1,30 @@
<?
// funciones para la rotación de la publicidad
if ( isset( $show ) )
{
require("open_db.php");
$res = @mysql_query( "SELECT url FROM publicidad WHERE id=$show", $conexion );
if ( mysql_num_rows($res)>0 )
{
$datos = @mysql_fetch_array($res);
@mysql_query( "UPDATE publicidad SET nVisitas=nVisitas+1 WHERE id=$show", $conexion );
header("location:$datos[0]\n\n");
}
}
function MuestraBanner( $tipo, $conexion )
{
$res = @mysql_query( "SELECT id, filename FROM publicidad WHERE tipo='$tipo' ORDER BY rand()", $conexion );
if ( mysql_num_rows($res) > 0 )
{
$datos = @mysql_fetch_array($res);
echo "<a href=\"addons/rpublicidad.php?show=$datos[0]\" target=_blank><img src=\"db/publicidad/$datos[0]"."_i001@$datos[1]\" border=0></a>";
@mysql_query( "UPDATE publicidad SET nVistos=nVistos+1 WHERE id=$datos[0]", $conexion );
} else {
echo "<center>Se produjo algun error en el sistema de publicidad</center>";
}
}
?>

0
addons/rpublicidad.php~ Normal file
View File

337
adm/artistas.php Normal file
View File

@ -0,0 +1,337 @@
<?
if ( $user_auth && $user_level <= -1 )
{
$blq1 ="Nombre,Apellido,Instrumento,url,comentario";
$blq2 ="e_Mail,NIF,Calle,Localidad,Provincia,CP,Telefono1,Telefono2,FechaNacimiento";
$list = true;
if ( isset( $sins ) )
{
displayForm( "./?dgo=adm/artistas.php&ins=new" );
$list = false;
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT id,$blq1,$blq2 FROM artistas WHERE id=$smod", $conexion );
$datos = @mysql_fetch_array( $res );
list( $db_id, $db_nombre,$db_apellidos,$db_instrumento,$db_url,$db_comentario,
$db_email,$db_nif,$db_calle,$db_localidad,$db_provincia,$db_cp,$db_tlf1,$db_tlf2,$db_fechaN ) = $datos;
displayForm( "./?dgo=adm/artistas.php&mod=$smod" );
$list = false;
}
if ( isset( $mod ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto_mime='$imgData_name', Foto_w='$db_Foto_w', Foto_h='$db_Foto_h'";
}
$sql = "UPDATE artistas SET ".
"Nombre='$db_nombre' ".
",Apellido='$db_apellidos' ".
",Instrumento='$db_instrumento' ".
",url='$db_url' ".
",comentario='".urlencode($db_comentario)."' ".
",e_Mail='$db_email' ".
",NIF='$db_nif' ".
",Calle='$db_calle' ".
",Localidad='$db_localidad' ".
",Provincia='$db_provincia' ".
",CP='$db_cp' ".
",Telefono1='$db_tlf1' ".
",Telefono2='$db_tlf2' ".
",FechaNacimiento='$db_ano/$db_mes/$db_dia' $addsql_p1".
" WHERE id=$mod";
$res = @mysql_query( $sql, $conexion );
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
$imgDEL = "db/artistas/$mod"."_i001@*";
echo `rm -rf $imgDEL`;
fwrite( fopen("db/artistas/".$mod."_i001@$imgData_name", "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
$list = true;
}
if( isset( $ins ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto_mime, Foto_w, Foto_h";
$addsql_p2 = ",'$imgData_name', '$db_Foto_w', '$db_Foto_h'";
}
$sql = "INSERT INTO artistas (FAlta, $blq1,$blq2 $addsql_p1) VALUES (NOW(),'$db_nombre','$db_apellidos','$db_instrumento','$db_url','".urlencode($db_comentario).
"','$db_email','$db_nif','$db_calle','$db_localidad','$db_provincia','$db_cp','$db_tlf1','$db_tlf2','$db_ano/$db_mes/$db_dia' $addsql_p2)";
$res = @mysql_query( $sql, $conexion ) OR die( "Error<br>".@mysql_error($conexion) );
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
fwrite( fopen("db/artistas/".$last_id."_i001@$imgData_name", "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
echo "<h1>Artista insertado</h1><br><br><br>";
echo "<p class=remark>ID asignado = ".@mysql_insert_id($conexion)."</p>";
$list = true;
}
if( isset( $del ) )
{
$imgDEL = "db/artistas/$del"."_i001*";
echo `rm -rf $imgDEL`;
$res = @mysql_query( "DELETE FROM artistas WHERE id=$del" );
$list = true;
}
if ( isset( $list ) && $list )
{
if ( !isset($orderBy) ) $orderBy ="id";
if ( !isset($orderDir) ) $orderDir ="ASC";
displayList($conexion, $orderBy, $orderDir);
}
displayMenu();
}
function displayList($cnx, $orderBy, $orderDir)
{
$thisLOCATION = "./?dgo=adm/artistas.php";
$res = @mysql_query( "SELECT id, CONCAT(Apellido,', ',Nombre) Nombre, Telefono1, Telefono2 FROM artistas ORDER BY $orderBy $orderDir" );
echo "<br><br><br><table width=100% cellpadding=0 cellspacing=0 class=td_lista>";
echo "<td class=menuL>id <a href=\"$thisLOCATION&oderBy=id&orderDir=DESC\"><img src=\"images/actions/down.gif\" border=0></a><a href=\"$thisLOCATION&oderBy=id&orderDESC=ASC\"><img src=\"images/actions/up.gif\" border=0></a></td>".
"<td class=menuL>Nombre <a href=\"$thisLOCATION&oderBy=Apellidos+Nombre&orderDir=DESC\"><img src=\"images/actions/down.gif\" border=0></a><a href=\"$thisLOCATION&oderBy=Apellidos+Nombre&orderDESC=ASC\"><img src=\"images/actions/up.gif\" border=0></a></td>".
"<td class=menuL>Telefonos</td>".
"<td class=menuL>Borrar</td>";
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_nombre, $db_tlf1, $db_tlf2 )= $datos;
echo "<tr><td><a href=\"./?dgo=adm/artistas.php&smod=$db_id\">$db_id</a></td><td>$db_nombre</td><td>$db_tlf1 # $db_tlf2</td><td><a href=\"javascript::deleteUser($db_id)\"><img src=\"images/actions/cancel.gif\" border=0></a></td></tr>";
}
echo "</table>";
echo '<script language="JavaScript">
function deleteUser( which )
{
var submitOK = confirm("Atencion: Esta a punto de eliminar al artista.");
if ( submitOK )
document.location.href = "'.$thisLOCATION.'&orderBy='.$orderBy.'&orderDir='.$orderDir.'&del="+which;
}
</script>';
}
function displayMenu()
{
echo '<hr noshade color="#800000">';
echo '<p align="center"><a href="./?dgo=adm/artistas.php&sins=new">Insertar nuevo artista</a></p>';
echo '<hr noshade color="#800000">';
}
function displayForm( $form_action )
{
global $db_nombre, $db_apellidos, $db_instrumento, $db_url, $db_comentario;
global $db_email, $db_nif, $db_calle, $db_localidad, $db_provincia, $db_cp, $db_tlf1, $db_tlf2, $db_fechaN;
global $imgData;
// Dividimos la fecha de nacimiento en DIA/MES/AÑO
$db_dia = substr($db_fechaN, 8, 2 );
$db_mes = substr($db_fechaN, 5, 2 );
$db_ano = substr($db_fechaN, 0, 4 );
echo '<form action="'.$form_action.'" method="POST" name="register" enctype="multipart/form-data" onsubmit="return validateform( this.form )">';
echo '<p align="center">&nbsp;</p><div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="100%">';
echo '<tr>
<td><h1>Datos del artista</h1>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%" bgcolor="#800000">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="30%">Nombre:</td>
<td width="20%"><input type="text" size="15"
name="db_nombre"
value="'.$db_nombre.'"></td>
<td valign="top" rowspan="5" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
del artista</strong><p>Estos son los datos
que cualquier usuario de la página puede
consultar. <br>
(Cuando Escoja un disco y/o se muestre la
información de un Grupo, saldran sus
componentes y esta es la información de cada
uno de ellos).</p>
<p>ATENCION: ¡¡ Se admiten controles HTML
!!, por lo que aconsejamos sea muy cuidadoso
con los mismos.</p>
</td>
</tr>
<tr>
<td width="30%">Apellidos:</td>
<td width="20%"><input type="text" size="15"
name="db_apellidos"
value="'. $db_apellidos .'"></td>
</tr>
<tr>
<td width="30%">Instrumento:</td>
<td width="20%"><input type="text" size="15"
name="db_instrumento"
value="'. $db_instrumento .'"></td>
</tr>
<tr>
<td width="30%" colspan=2>Fotografia:
<input type="file" size="15"
name="imgData"
value=""></td>
</tr>
<tr>
<td>url:</td>
<td><input type="text" size="15"
name="db_url" value="'.$db_url.'"></td>
</tr>
<tr>
<td colspan="3" width="30%">Comentarios
adicionales:<p><textarea name="db_comentario" rows="5"
cols="40">'.urldecode($db_comentario).'</textarea></p>
</td>
</tr>
</table>
<hr noshade color="#800000">
<table border="0" width="100%">
<tr>
<td width="30%">email:</td>
<td width="20%"><input type="text" size="15"
name="db_email"
value="'.$db_email.'"></td>
<td valign="top" rowspan="9" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
de contacto</strong><p>Estos datos solo son
accesibles por el administrador/es de la página.
Por lo que nadie mas tendrá acceso a los
mismos.</p>
</td>
</tr>
<tr>
<td width="30%">NIF:</td>
<td width="20%"><input type="text" size="15"
name="db_nif"
value="'.$db_nif.'"></td>
</tr>
<tr>
<td width="30%">Dirección:</td>
<td width="20%"><input type="text" size="15"
name="db_calle"
value="'.$db_calle.'"></td>
</tr>
<tr>
<td width="30%">Localidad:</td>
<td width="20%"><input type="text" size="15"
name="db_localidad"
value="'.$db_localidad.'"></td>
</tr>
<tr>
<td width="30%">Provincia:</td>
<td width="20%"><input type="text" size="15"
name="db_provincia"
value="'.$db_provincia.'"></td>
</tr>
<tr>
<td width="30%">Cód. Postal:</td>
<td width="20%"><input type="text" size="15"
name="db_cp" value="'.$db_cp.'"></td>
</tr>
<tr>
<td width="30%">Telefono</td>
<td width="20%"><input type="text" size="15"
name="db_tlf1"
value="'.$db_tlf1.'"></td>
</tr>
<tr>
<td>Movil:</td>
<td><input type="text" size="15"
name="db_tlf2"
value="'.$db_tlf2.'"></td>
</tr>
<tr>
<td>Cumpleaños:</td>
<td><select name="db_dia" size="1">
<option>Dia...</option>';
for ( $i=1;$i<32; $i++)
{
echo "<option "; if ( $i==$db_dia ) echo " SELECTED "; echo ">$i"; echo "</option>";
}
echo ' </select>
<br>
<select name="db_mes" size="1">
<option>Mes...</option>
<option value="1"'; if($db_mes==1)echo" selected "; echo '>Enero</option>
<option value="2"'; if($db_mes==2)echo" selected "; echo '>Febrero</option>
<option value="3"'; if($db_mes==3)echo" selected "; echo '>Marzo</option>
<option value="4"'; if($db_mes==4)echo" selected "; echo '>Abril</option>
<option value="5"'; if($db_mes==5)echo" selected "; echo '>Mayo</option>
<option value="6"'; if($db_mes==6)echo" selected "; echo '>Junio</option>
<option value="7"'; if($db_mes==7)echo" selected "; echo '>Julio</option>
<option value="8"'; if($db_mes==8)echo" selected "; echo '>Agosto</option>
<option value="9"'; if($db_mes==9)echo" selected "; echo '>Septiembre</option>
<option value="10"'; if($db_mes==10)echo" selected "; echo '>Octubre</option>
<option value="11"'; if($db_mes==11)echo" selected "; echo '>Noviembre</option>
<option value="12"'; if($db_mes==12)echo" selected "; echo '>Diciembre</option>
</select><br>
<select name="db_ano" size="1">
<option>Año...</option>';
for($i=2003;$i>1900;$i--)
{
echo "<option"; if ( $i==$db_ano ) echo " SELECTED "; echo ">$i";echo "</option>";
}
echo '</select></td>
<td>&nbsp;</td>
</tr>
</table>
<hr noshade color="#800000">
<p align="center"><input type="button" name="btCancelar" value="Cancelar"><input
type="submit" name="B2" value="Enviar &gt;&gt;"></p>
<p><script language="JavaScript"><!--
function validateform(wf)
{
if (document.register.db_nombre.value=="")
{
window.alert ("Por favor, introduce el nombre")
return false;
}
if (document.register.db_nif.value=="")
{
window.alert ("Por favor, introduce el NIF")
return false;
}
}
// --></script><br>
</p>
</td>
</tr>
</table>
</center></div>
</form>';
}
?>

0
adm/artistas.php~ Normal file
View File

BIN
adm/discos.php Normal file

Binary file not shown.

0
adm/discos.php~ Normal file
View File

145
adm/editC.php Normal file
View File

@ -0,0 +1,145 @@
<?
require( "../addons/open_db.php" );
require( "../addons/autenticate.php" );
if ( ! $user_auth ) die( "<META CONTENT=\"0; URL=..\error.htm\" HTTP-EQUIV=\"REFRESH\"> ");
$showF = "";
if ( isset( $delFt ) )
{
`rm -rf db/discos/$idd_c_$smod_$delFt_*`;
@mysql_query( "UPDATE cancionesDisco SET $FIELD_T='' WHERE id=$smod");
}
if ( isset( $idd ) )
{
if ( isset( $sins ) )
$showF = "$PHP_SELF?idd=$idd&ins=new";
if ( isset( $ins ) )
{
$FIELDS = "idd, posicion, duracion, titulo, autorMusica, autorLetra";
$FVALUES= "'$idd', '$db_posicion', '$db_duracion', '$db_titulo', '$db_autorMusica', '$db_autorLetra'";
$res = @mysql_query( "INSERT INTO cancionesDisco ($FIELDS) VALUES ($FVALUES)", $conexion );
$ins = @mysql_insert_id($conexion);
$showF = "$PHP_SELF?idd=$idd&mod=$ins";
$smod = $ins;
}
if ( isset( $mod ) )
{
$VALUES = "posicion='$db_posicion', duracion='$db_duracion', titulo='$db_titulo', autorMusica='$db_autorMusica', autorLetra='$db_autorLetra'";
$res = @mysql_query( "UPDATE cancionesDisco SET $VALUES WHERE id=$mod", $conexion ) OR Die("error ".mysql_error($conexion));
$smod = $mod;
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT id, posicion, titulo, duracion, autorMusica, autorLetra, f_partitura, f_audio, f_letra, f_midi FROM cancionesDisco WHERE id=$smod", $conexion );
$datos = @mysql_fetch_array($res);
$showF = "$PHP_SELF?idd=$idd&mod=$smod";
}
if ( isset( $del ) )
{
`rm -rf db/discos/$idd_c_*`;
@mysql_query( "DELETE FROM cancionesDisco WHERE id=$del", $conexion );
echo "<html><head><script>self.close();</script></head></html>";
}
}
if ( !empty( $showF ) )
{
print_header();
showForm($showF, $datos);
print_footer();
}
mysql_close($conexion);
function showForm( $action, $datos )
{
global $idd;
list( $db_id, $db_posicion, $db_titulo, $db_duracion, $db_autorMusica, $db_autorLetra, $db_fp, $db_fa, $db_fl, $db_fm ) = $datos;
echo '<form method="POST" action="'.$action.'">
<p><strong><u>Datos de la canción:</u></strong></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Posición:</td>
<td><input type="text" size="15" name="db_posicion" value="'.$db_posicion.'"></td>
</tr>
<tr>
<td>Titulo:</td>
<td><input type="text" size="15" name="db_titulo" value="'.$db_titulo.'"></td>
</tr>
<tr>
<td>Duración</td>
<td><input type="text" size="15" name="db_duracion" value="'.$db_duracion.'"></td>
</tr>
<tr>
<td>Autor Letra</td>
<td><input type="text" size="15" name="db_autorLetra" value="'.$db_autorLetra.'"></td>
</tr>
<tr>
<td>Autor Musica</td>
<td><input type="text" size="15" name="db_autorMusica" value="'.$db_autorMusica.'"></td>
</tr>
<tr>
<td align="center" colspan="2"><br><center>';
if ( !empty($db_fp) ) echo "[ <a href='$PHP_SELF?idd=$idd&mod=$db_id&delFt=P'>-</a>".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=P', 320, 200);\">+</a>".
" <a href='../db/discos/$idd"."_c_".$db_id."_P_"."$db_fp' target='_blank'>Partitura</a>".
"] ";
else if ( isset( $db_id ) )
echo "[ - ".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft==P', 320, 200);\">+</a>".
" Partitura ".
" ] ";
if ( !empty($db_fa) ) echo "[ <a href='$PHP_SELF?idd=$idd&mod=$db_id&delFt=A'>-</a>".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=A', 320, 200 );\">+</a>".
" <a href='../db/discos/$idd"."_c_".$db_id."_A_"."$db_fa' target='_blank'>Audio</a>".
"] ";
else if ( isset( $db_id) )
echo "[ - ".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=A', 320, 200 );\">+</a>".
" Audio ".
" ] ";
if ( !empty($db_fl) ) echo "[ <a href='$PHP_SELF?idd=$idd&mod=$db_id&delFt=L'>-</a>".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=L', 320, 200 );\">+</a>".
" <a href='../db/discos/$idd"."_c_".$db_id."_L_"."$db_fl' target='_blank'>Letra</a>".
"] ";
else if ( isset( $db_id ) )
echo "[ - ".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=L', 320, 200 );\">+</a>".
" Letra ".
" ] ";
if ( !empty($db_fm) ) echo "[ <a href='$PHP_SELF?idd=$idd&mod=$db_id&delFt=M'>-</a>".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=M', 320, 200 );\">+</a>".
" <a href='../db/discos/$idd"."_c_".$db_id."_M_"."$db_fm' target='_blank'>Midi</a>".
"] ";
else if ( isset( $db_id ) )
echo "[ - ".
" <a href=\"javascript:abreVentana( selectFT, 'insertFC.php?idd=$idd&idc=$db_id&ft=M', 320, 200 );\">+</a>".
" Midi ".
" ] ";
echo '</center></td>
</tr>
</table><br><center><input type="submit" value="enviar &gt;&gt;"></center>
</form>';
}
function print_header()
{
echo '<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Portal -web- --------------------------------------------------------------www.infdj.com-----------------------------------------------------------------------------------------------------</title>
<link rel="stylesheet" type="text/css" href="../addons/estilo.css" body="../addons/estilo.css">
<script language="JavaScript" src="../addons/misc.js"></script>
<script language="JavaScript">var selectFT="selectFT";</script>
</head>
<body background="../images/bg.gif" text="#000000">';
}
function print_footer()
{
echo '</body></html>';
}

0
adm/editC.php~ Normal file
View File

249
adm/estilos.php Normal file
View File

@ -0,0 +1,249 @@
<?
if ( $user_auth && $user_level <= -1 )
{
$blq1 ="parent,titulo,descr";
$list = true;
if ( isset( $sins ) )
{
displayForm( "./?dgo=adm/estilos.php&ins=new" );
$list = false;
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT id,$blq1 FROM estilos WHERE id=$smod", $conexion );
$datos = @mysql_fetch_array( $res );
list( $db_id, $db_parent,$db_titulo,$db_descr ) = $datos;
displayForm( "./?dgo=adm/estilos.php&mod=$smod" );
$list = false;
}
if ( isset( $mod ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto_mime='$imgData_type', Foto_w='$db_Foto_w', Foto_h='$db_Foto_h'";
}
$sql = "UPDATE estilos SET ".
"parent='$db_parent' ".
",titulo='$db_titulo' ".
",descr='".urlencode($db_descr)."' $addsql_p1".
" WHERE id=$mod";
$res = @mysql_query( $sql, $conexion );
$last_id = $mod;
echo "Algunos datos:<br>";
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
fwrite( fopen("db/estilos/".$last_id."_i001", "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
$list = true;
}
if( isset( $ins ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto_mime, Foto_w, Foto_h";
$addsql_p2 = ",'$imgData_type', '$db_Foto_w', '$db_Foto_h'";
}
$sql = "INSERT INTO estilos ($blq1 $addsql_p1) VALUES ('$db_parent','$db_titulo','$db_descr' $addsql_p2)";
$res = @mysql_query( $sql, $conexion ) OR die( "Error<br>".@mysql_error($conexion) );
$last_id = @mysql_insert_id($conexion);
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
fwrite( fopen("db/estilos/".$last_id."_i001", "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
echo "<h1>Estilo insertado</h1><br><br><br>";
echo "<p class=remark>ID asignado = ".$last_id."</p>";
$list = true;
}
if( isset( $del ) )
{
if ( !unlink( "estilos/".$del."_i001" ) )
echo "<h1>No he podido eliminar la imagen asociada:</h1><br><p class=remark>Borre el fichero: estilos/$del"."_i001 manualmente por favor...<br>";
else
echo "<li>Ficheros asociados eliminados</li>";
$res = @mysql_query( "UPDATE estilos SET parent='0' WHERE parent=$del", $conexion );
echo "<li>Estilos heredados, descompuestos</li>";
$res = @mysql_query( "DELETE FROM estilos WHERE id=$del", $conexion );
echo "<li>Estilo $del, ELIMINADO</li><br>";
$list = true;
}
if ( isset( $list ) && $list )
{
if ( !isset($orderBy) ) $orderBy ="id";
if ( !isset($orderDir) ) $orderDir ="ASC";
echo "Listado de Estilos >> Ver listado<br><br>";
displayList($conexion, $orderBy, $orderDir);
}
displayMenu();
}
function cambiaProporciones()
{
global $db_Foto_w, $db_Foto_h;
$W = 150; $H=150;
// Las proporciones correctas seran de 100x100
// $db_Foto_w=50;
// $db_Foto_h=50;
if ( $db_Foto_w > 0 )
{
if ( $db_Foto_w > $db_Foto_h )
{
$db_Foto_h = intval(($db_Foto_h/$db_Foto_w)*$W); $db_Foto_w=$W;
} else {
$db_Foto_w = intval(($db_Foto_w/$db_Foto_h)*$H); $db_Foto_h=$H;
}
}
}
function displayList($cnx, $orderBy, $orderDir)
{
global $db_Foto_w, $db_Foto_h;
$thisLOCATION = "./?dgo=adm/estilos.php";
$res = @mysql_query( "SELECT e.id, ep.titulo, e.titulo, e.descr, e.Foto_mime, e.Foto_w, e.Foto_h FROM estilos AS e LEFT JOIN estilos AS ep ON (ep.id=e.parent) ORDER BY e.$orderBy $orderDir", $cnx ) OR die( "Error<br>".@mysql_error($conexion) );;
$parity = true;
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_ptitulo, $db_titulo, $db_descr, $db_Foto_mime, $db_Foto_w, $db_Foto_h )= $datos;
$parity = !$parity;
cambiaProporciones(/* $db_Foto_w, $db_Foto_h*/);
$lBlq1 = "<img src=\"gimage.php?db=estilos&db_id=$db_id&db_mime=$db_Foto_mime\" width=\"$db_Foto_w\" height=\"$db_Foto_h\"><br>$db_titulo";
$lBlq2 = "<p><a href=\"javascript:deleteUser($db_id)\" class=lmenuo>&gt;&gt; &gt;Eliminar Estilo</a> ## "
."<a href=\"$thisLOCATION&smod=$db_id\" class=lmenuo>&gt;&gt; &gt;Modificar Estilo</a><br></p>";
if ( $parity )
echo "<table class=td_estilos><tr><td>$lBlq1</td><td>".urldecode($db_descr)."$lBlq2</td></tr></table><br><br>";
else
echo "<table class=td_estilos><tr><td>".urldecode($db_descr)."$lBlq2</td><td>$lBlq1</td></tr></table><br><br>";
}
echo '<script language="JavaScript">
function deleteUser( which )
{
var submitOK = confirm("Atencion: Esta a punto de eliminar el estilo.");
if ( submitOK )
document.location.href = "'.$thisLOCATION.'&orderBy='.$orderBy.'&orderDir='.$orderDir.'&del="+which;
}
</script>';
}
function displayMenu()
{
echo '<hr noshade color="#800000">';
echo '<p align="center"><a href="./?dgo=adm/estilos.php&sins=new">Insertar nuevo estilo</a></p>';
echo '<hr noshade color="#800000">';
}
function displayForm( $form_action )
{
global $db_parent, $db_titulo, $db_descr, $imgData;
echo '<form action="'.$form_action.'" method="POST" name="register" enctype="multipart/form-data" onsubmit="return validateform( this.form )">';
echo '<p align="center">&nbsp;</p><div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="100%">';
echo '<tr>
<td><h1>Datos del estilo</h1>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%" bgcolor="#800000">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="30%">Titulo:</td>
<td width="20%"><input type="text" size="15"
name="db_titulo"
value="'.$db_titulo.'"></td>
<td valign="top" rowspan="3" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
del estilo</strong><p>Aqui van el titulo y descripción del estilo que esta definiendo. <br>
Tambien puede agregar una imagen que represente este estilo. Recuerde que deberia ser JPG con un tamaño de 50x50 máximo.</p>
<p>ATENCION: ¡¡ Se admiten controles HTML
!!, por lo que aconsejamos sea muy cuidadoso
con los mismos.</p>
</td>
</tr>
<tr>
<td width="30%">Padre:</td>
<td width="20%"><select name="db_parent" size="1">
<option value="0">ninguno</option>';
global $conexion;
$resp = @mysql_query( "SELECT id, titulo FROM estilos WHERE parent ='0' Order By titulo", $conexion );
while( $datos=@mysql_fetch_array($resp) )
{
list ( $epid, $eptit ) = $datos;
echo "<option value=\"$epid\">$eptit</option>";
}
echo '</select></td>
</tr>
<tr>
<td colspan="2" width="30%">Comentarios
adicionales:<p><textarea name="db_descr" rows="5"
cols="20">'.urldecode($db_descr).'</textarea></p>
</td>
</tr>
<tr>
<td width="30%"> Imagen:</td>
<td width="20%" colspan="2">
<input type="file" size="15" name="imgData"></td>
</tr> </table>
<hr noshade color="#800000">
<p align="center"><input type="button" name="btCancelar" value="Cancelar"><input
type="submit" name="B2" value="Enviar &gt;&gt;"></p>
<p><script language="JavaScript"><!--
function validateform(wf)
{
if (document.register.db_titulo.value=="")
{
window.alert ("Por favor, introduce el titulo")
return false;
}
if (document.register.db_descr.value=="")
{
window.alert ("Por favor, introduce la descripcion")
return false;
}
}
// --></script><br>
</p>
</td>
</tr>
</table>
</center></div>
</form>';
}
?>

344
adm/grupos.php Normal file
View File

@ -0,0 +1,344 @@
<?
if ( $user_auth && $user_level <= -1 )
{
$blq1 ="ide, nombre, comentario, cache, equipoSonidoLuces, estadisticas, croquiMusicos, sugerenciasGrupo, contratacion";
$list = true;
if ( isset( $sins ) )
{
displayForm( "./?dgo=adm/grupos.php&ins=new" );
$list = false;
}
if( isset( $ins ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto, Foto_w, Foto_h";
$addsql_p2 = ",'$imgData_name', '$db_Foto_w', '$db_Foto_h'";
}
$sql = "INSERT INTO grupos (FAlta, $blq1 $addsql_p1) VALUES (NOW(), '$db_ide','$db_nombre','".urlencode($db_comentario)."','$db_cache','$db_equipoSonidoLuces', '$db_estadisticas', '$db_croquiMusicos', '$db_sugerenciasGrupo', '".urlencode($db_contratacion)."' $addsql_p2)";
$res = @mysql_query( $sql, $conexion ) OR die( "Error<br>".@mysql_error($conexion) );
$last_id = @mysql_insert_id($conexion);
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
fwrite( fopen("db/grupos/".$last_id."_i001@".$imgData_name, "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
echo "<h1>Grupo insertado</h1><br><br><br>";
echo "<p class=remark>ID asignado = ".$last_id."<br>Agrege ahora los componentes del Grupo</p>";
displayForm( "./?dgo=adm/grupos.php&mod=$smod" );
$list = false;
}
if ( isset( $insc ) )
{
if ( isset( $db_ida ) && !empty( $db_ida ) )
{
$res = @mysql_query( "SELECT id FROM artistas WHERE id='$db_ida'", $conexion );
if ( @mysql_num_rows( $res ) > 0 )
@mysql_query( "INSERT INTO componentesGrupo (idg, idp) VALUES ('$insc','$db_ida')", $conexion );
}
$smod = $insc;
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT id,$blq1 FROM grupos WHERE id=$smod", $conexion );
$datos = @mysql_fetch_array( $res );
list( $db_id, $db_ide, $db_nombre, $db_comentario, $db_cache,
$db_equipoSonidoLuces, $db_estadisticas, $db_croquiMusicos,
$db_sugerenciasGrupo, $db_contratacion ) = $datos;
echo "<a href='./?dgo=adm/grupos.php'>Listado de Grupos</a>-&gt;<a href='./?dgo=adm/discos.php&filter=$smod'>Sus Discos</a>-&gt;[<a href='./?dgo=adm/grupos.php&smod=$smod'>Refrescar</a>]";
displayForm( "./?dgo=adm/grupos.php&mod=$smod" );
displayListC( $conexion, $smod, "./?dgo=adm/grupos.php&insc=$smod" );
$list = false;
}
if ( isset( $mod ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto='$imgData_name', Foto_w='$db_Foto_w', Foto_h='$db_Foto_h'";
}
$sql = "UPDATE grupos SET ".
"nombre='$db_nombre' ".
",comentario='".urlencode($db_comentario)."' ".
",cache='$db_cache'".
",equipoSonidoLuces='$db_equipoSonidoLuces'".
",estadisticas='$db_estadisticas'".
",croquiMusicos='$db_croquiMusicos'".
",sugerenciasGrupo='$db_sugerenciasGrupo'".
",contratacion='".urlencode($db_contratacion)."'".
" $addsql_p1".
" WHERE id=$mod";
$res = @mysql_query( $sql, $conexion );
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
fwrite( fopen("db/grupos/".$mod."_i001@".$imgData_name, "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
$list = true;
}
if( isset( $del ) )
{
if ( !unlink( "grupos/".$del."_i001*" ) )
echo "<h1>No he podido eliminar la imagen asociada:</h1><br><p class=remark>Borre el fichero: grupos/$del"."_i001 manualmente por favor...<br>";
else
echo "<li>Ficheros asociados eliminados</li>";
$res = @mysql_query( "UPDATE grupos SET parent='0' WHERE parent=$del", $conexion );
echo "<li>grupos heredados, descompuestos</li>";
$res = @mysql_query( "DELETE FROM grupos WHERE id=$del", $conexion );
echo "<li>Estilo $del, ELIMINADO</li><br>";
$list = true;
}
if ( isset( $list ) && $list )
{
if ( !isset($orderBy) ) $orderBy ="id";
if ( !isset($orderDir) ) $orderDir ="ASC";
echo "Listado de grupos >> Ver listado<br><br>";
displayList($conexion, $orderBy, $orderDir);
}
displayMenu();
}
function cambiaProporciones()
{
global $db_Foto_w, $db_Foto_h;
$W = 150; $H=150;
// Las proporciones correctas seran de 100x100
// $db_Foto_w=50;
// $db_Foto_h=50;
if ( $db_Foto_w > 0 )
{
if ( $db_Foto_w > $db_Foto_h )
{
$db_Foto_h = intval(($db_Foto_h/$db_Foto_w)*$W); $db_Foto_w=$W;
} else {
$db_Foto_w = intval(($db_Foto_w/$db_Foto_h)*$H); $db_Foto_h=$H;
}
}
}
function displayListC( $cnx, $idg, $url_form )
{
$res = @mysql_query( "SELECT a.id, CONCAT(a.nombre, ' ', a.apellido) AS Artista FROM componentesGrupo AS c LEFT JOIN artistas a ON( a.id=c.idp ) WHERE c.idg = " . $idg, $cnx );
echo "<br><br><br>";
echo "<a name=\"componentes\"></a><form name='comp' method=POST action=$url_form"."#componentes><table width=100% cellpadding=0 cellspacing=0 class=\"td_lista\"><tr>";
echo "<td class=menuL>id</td>";
echo "<td class=menuL>Nombre del Artista</td>";
echo "<td class=menuL>Borrar</td>";
echo "</tr>";
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_ida, $db_nomb ) = $datos;
echo "<tr><td><a href=\"./?dgo=adm/artistas.php&smod=$db_ida\">$db_ida</a></td>";
echo "<td>$db_nomb</td>";
echo "<td><a href=\"./?dgo=adm/grupos.php$delc=$db_id\"><img src=\"images/actions/cancel.gif\" border=0></a></td>";
echo "</tr>";
}
echo "<tr><td><br><br></td><td></td><td></td></tr>";
echo "<tr><td>&nbsp</td><td><input type=submit value=\"Nuevo artista\"> -= ID: <input type=text name=\"db_ida\" value=\"\"></td><td></td></tr>";
echo "</table></form>";
}
function displayList($cnx, $orderBy, $orderDir, $filter)
{
$thisLOCATION = "./?dgo=adm/grupos.php";
$res = @mysql_query( "SELECT g.id, g.nombre, e.titulo FROM grupos AS g LEFT JOIN estilos AS e ON (g.ide=e.id) $filter ORDER BY e.$orderBy $orderDir", $cnx ) OR die( "Error<br>".@mysql_error($cnx) );
$parity = true;
echo "<br><br><br><table width=100% cellpadding=0 cellspacing=0 class=td_lista><tr>";
echo "<td class=menuL>id <a href=\"$thisLOCATION&oderBy=id&orderDir=DESC\"><img src=\"images/actions/down.gif\" border=0></a><a href=\"$thisLOCATION&oderBy=id&orderDESC=ASC\"><img src=\"images/actions/up.gif\" border=0></a></td>".
"<td class=menuL>Nombre del Grupo <a href=\"$thisLOCATION&oderBy=nombre&orderDir=DESC\"><img src=\"images/actions/down.gif\" border=0></a><a href=\"$thisLOCATION&oderBy=nombre&orderDESC=ASC\"><img src=\"images/actions/up.gif\" border=0></a></td>".
"<td class=menuL>Estilo <a href=\"$thisLOCATION&oderBy=ide&orderDir=DESC\"><img src=\"images/actions/down.gif\" border=0></a><a href=\"$thisLOCATION&oderBy=ide&orderDESC=ASC\"><img src=\"images/actions/up.gif\" border=0></a></td>".
"<td class=menuL>Borrar</td></tr>";
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_nombre, $db_estilo )= $datos;
$parity = !$parity;
echo "<tr><td><a href=\"$thisLOCATION&smod=$db_id\">$db_id</a></td>" .
"<td>$db_nombre</td>".
"<td>$db_estilo</td>".
"<td><a href=\"javascript::deleteID($db_id)\"><img src=\"images/actions/cancel.gif\" border=0></a></td></tr>";
}
echo "</table>";
echo '<script language="JavaScript">
function deleteID( which )
{
var submitOK = confirm("Atencion: Esta a punto de eliminar el grupo.");
if ( submitOK )
document.location.href = "'.$thisLOCATION.'&orderBy='.$orderBy.'&orderDir='.$orderDir.'&del="+which;
}
</script>';
}
function displayMenu()
{
echo '<hr noshade color="#800000">';
echo '<p align="center"><a href="./?dgo=adm/grupos.php&sins=new">Insertar nuevo grupo</a></p>';
echo '<hr noshade color="#800000">';
}
function displayForm( $form_action )
{
global $db_ide, $db_nombre, $db_comentario, $db_cache,
$db_equipoSonidoLuces, $db_estadisticas, $db_croquiMusicos,
$db_sugerenciasGrupo, $db_contratacion;
global $imgData;
echo '<form action="'.$form_action.'" method="POST" name="register" enctype="multipart/form-data" onsubmit="return validateform( this.form )">';
echo '<p align="center">&nbsp;</p><div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="100%">';
echo '<tr>
<td><h1>Datos del grupo</h1>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%" bgcolor="#800000">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td width="30%">Grupo:</td>
<td width="20%"><input type="text" size="15"
name="db_nombre"
value="'.$db_nombre.'"></td>
<td valign="top" rowspan="3" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
del grupo</strong><p>Aqui van el nombre del grupo y descripción del mismo. <br>
Tambien puede agregar una imagen que represente a este grupo. Recuerde que deberia ser JPG con un tamaño de 50x50 máximo. <br><br>No se olvide de asociar un estilo al grupo para que este pueda ser clasificado.</p>
<p>ATENCION: ¡¡ Se admiten controles HTML
!!, por lo que aconsejamos sea muy cuidadoso
con los mismos.</p>
</td>
</tr>
<tr>
<td width="30%">Estilo:</td>
<td width="20%"><select name="db_ide" size="1">
<option value="0">ninguno</option>';
global $conexion;
$resp = @mysql_query( "SELECT id, titulo FROM estilos WHERE parent ='0' Order By titulo", $conexion );
while( $datos=@mysql_fetch_array($resp) )
{
list ( $epid, $eptit ) = $datos;
echo "<option value=\"$epid\"";
if ( $epid == $db_ide ) echo " SELECTED";
echo ">$eptit</option>";
}
echo '</select></td>
</tr>
<tr>
<td colspan="2" width="30%">Comentarios
adicionales:<p><textarea name="db_comentario" rows="5"
cols="20">'.urldecode($db_comentario).'</textarea></p>
</td>
</tr>
<tr>
<td width="30%"> Foto:</td>
<td width="70%" colspan="2">
<input type="file" size="15" name="imgData"></td>
<td></td>
</tr>
<tr>
<td width="30%"> Cache:</td>
<td width="70%" colspan="2">
<input type="text" size="30" name="db_cache" value="'.$db_cache.'"></td>
</tr>
<tr>
<td width="30%"> Equipo de sonido y luces:</td>
<td width="70%" colspan="2">
<input type="text" size="30" name="db_equipoSonidoLuces" value="'.$db_equipoSonidoLuces.'"></td>
</tr>
<tr>
<td width="30%"> Estadisticas:</td>
<td width="70%" colspan="2">
<input type="text" size="30" name="db_estadisticas" value="'.$db_estadisticas.'"></td>
</tr>
<tr>
<td width="30%"> Croquis Musicos:</td>
<td width="70%" colspan="2">
<input type="text" size="30" name="db_croquiMusicos" value="'.$db_croquiMusicos.'"></td>
</tr>
<tr>
<td width="30%"> Sugerencias del Grupo:</td>
<td width="70%" colspan="2">
<input type="text" size="30" name="db_sugerenciasGrupo" value="'.$db_sugerenciasGrupo.'"></td>
</tr>
<tr>
<td width="30%"> Contratacion:</td>
<td width="70%" colspan="2">
<textarea name="db_contratacion" rows="5" cols="30">'.urldecode($db_contratacion).'</textarea>
</td>
</tr>
</table>
<hr noshade color="#800000">
<p align="center"><input type="button" name="btCancelar" value="Cancelar"><input
type="submit" name="B2" value="Enviar &gt;&gt;"></p>
<p><script language="JavaScript"><!--
function validateform(wf)
{
if (document.register.db_nombre.value=="")
{
window.alert ("Por favor, introduce el nombre del grupo")
return false;
}
if (document.register.db_comentario.value=="")
{
window.alert ("Por favor, introduce algun comentario sobre este grupo")
return false;
}
}
// --></script><br>
</p>
</td>
</tr>
</table>
</center></div>
</form>';
}
?>

78
adm/insertFC.php Normal file
View File

@ -0,0 +1,78 @@
<?
require( "../addons/open_db.php" );
require( "../addons/autenticate.php" );
if ( ! $user_auth ) die( "<META CONTENT=\"0; URL=..\error.htm\" HTTP-EQUIV=\"REFRESH\"> ");
if ( !empty($imgData_name) && isset( $idd ) && isset( $idc ) && isset( $ft ) )
{
if ( $imgData_size > 0 )
{
copy( $imgData, "../db/discos/".$idd."_c_".$idc."_".$ft."_".$imgData_name );
/*
fwrite( fopen( "../db/discos/".$idd."_c_".$idc."_".$ft."_".$imgData_name, "wb" ),
fread(fopen($imgData,"rb"), $fsize), $fsize);
*/
} else {
if ( strcmp($imgData_name, "ninguna" ) != 0 ) die("<script language=\"javascript\">window.close();</script>");
}
if ( strcmp( $ft, "A" ) == 0 ) $fte="f_audio";
if ( strcmp( $ft, "P" ) == 0 ) $fte="f_partitura";
if ( strcmp( $ft, "L" ) == 0 ) $fte="f_letra";
$res=@mysql_query( "SELECT $fte FROM cancionesDisco WHERE id='$idc'", $conexion ) OR die( mysql_error($conexion) );
if ( @mysql_num_rows( $res ) > 0 )
{
$db_file = mysql_fetch_array( $res );
unlink("../db/discos/".$idd."_c_".$idc."_".$ft."_".$db_file[0] );
}
$sql_upd = "UPDATE cancionesDisco SET $fte = '$imgData_name'" .
" WHERE id = ".$idc;
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo modificar esta foto<br>$sql_upd<br>".mysql_error($conexion));
mysql_close($conexion);
echo "<html><head></head><body onload='window.close();'><p>Procesando petición.<br>Por favor, espere...<br></body></html>";
} else {
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Portal -web- -FT------------------------------------------------------------ -www.infdj.com- ---------------------------------------------------------------------------------------------------- </title>
<link href="skins/articulos.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="../addons/estilo.css" body="../addons/estilo.css">
<body background="../images/bg.gif" bgcolor="<?echo $bg_color ?>" text="#000000">
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="340">
<?
if ( !isset( $idd ) )
{
echo "<tr><td>";
echo "<br>Error procesando su petición.<br><li>ACCESO DENEGADO</li>";
echo "</td></tr>";
} else {
echo "<tr></tr>";
?>
<u>Cambiar o Agregar archivo:</u><img src="../images/box.gif"
align="left" hspace="0" width="100" height="98"><br><br>
<li>Pulse examinar y busque la imagen en su
equipo.</li>
<li>Envie la imagen al servidor.</li>
<br><br>Este proceso puede tardar varios minutos
dependiendo de su conexión y el tráfico.
<?
echo "<tr><td><form ACTION=\"$PHP_SELF?idd=$idd&idc=$idc&ft=$ft\" method=\"POST\" enctype=\"multipart/form-data\">";
echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"3000000\"><input type=\"file\" size=\"15\" name=\"imgData\">";
echo "&nbsp;&nbsp;<input type=\"image\" name=\"I2\" src=\"../images/enviar.gif\" align=\"absmiddle\" width=\"69\" height=\"14\" border=\"0\">";
echo "</form></td></tr>";
}
?>
</table>
</center></div>
</body>
</html>
<? } ?>

162
adm/publicidad.php Normal file
View File

@ -0,0 +1,162 @@
<?
if ( $user_auth && $user_level <= -1 )
{
$blq1 ="anunciante, descr, url, tipo, nVistos, nVisitas, filename";
$list = true;
if ( isset( $sins ) )
{
displayForm( "./?dgo=adm/publicidad.php&ins=new" );
$list = false;
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT id,$blq1 FROM publicidad WHERE id=$smod", $conexion );
$datos = @mysql_fetch_array( $res );
list( $db_id, $db_anunciante, $db_descr, $db_url, $db_tipo, $db_nVistos, $db_nVisitas, $db_filename ) =$datos;
displayForm( "./?dgo=adm/publicidad.php&mod=$smod" );
$list = false;
}
if ( isset( $mod ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
/*
$img_prop = GetImageSize($imgData);
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
*/
$addsql_p1 = ",filename='$imgData_name'"; //, Foto_w='$db_Foto_w', Foto_h='$db_Foto_h'";
}
$sql = "UPDATE publicidad SET ".
"anunciante='$db_anunciante' ".
",url='$db_url' ".
",tipo='$db_tipo' ".
",descr='$db_descr' $addsql_p1".
" WHERE id=$mod";
$res = @mysql_query( $sql, $conexion ) OR die("eror");
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
$imgDEL = "db/publicidad/$mod"."_i001@*";
echo `rm -rf $imgDEL`;
fwrite( fopen("db/publicidad/".$mod."_i001@$imgData_name", "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
$list = true;
}
if( isset( $ins ) )
{
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
/*
$db_Foto_w = $img_prop[0];
$db_Foto_h = $img_prop[1];
$addsql_p1 = ",Foto_mime, Foto_w, Foto_h";
*/
$addsql_p2 = ",'$imgData_name'";//, '$db_Foto_w', '$db_Foto_h'";
}
$sql = "INSERT INTO publicidad (FAlta, $blq1 $addsql_p1) VALUES ".
"(NOW(),'$db_anunciante','$db_descr','$db_url','$db_tipo','0','0','$imgData_name')";
$res = @mysql_query( $sql, $conexion ) OR die( "Error<br>".@mysql_error($conexion) );
if ( !empty($imgData_name) && $imgData_size > 0 )
{
$file_size = filesize($imgData);
$last_id = @mysql_insert_id($conexion);
fwrite( fopen("db/publicidad/".$last_id."_i001@$imgData_name", "wb"),
fread(fopen($imgData,"rb"),$file_size), $file_size);
}
echo "<h1>Publicidad insertada</h1><br><br><br>";
echo "<p class=remark>ID asignado = ".@mysql_insert_id($conexion)."</p>";
$list = true;
}
if( isset( $del ) )
{
$imgDEL = "db/publicidad/$del"."_i001*";
echo `rm -rf $imgDEL`;
$res = @mysql_query( "DELETE FROM artistas WHERE id=$del" );
$list = true;
}
if ( isset( $list ) && $list )
displayList($conexion);
displayMenu();
}
function displayList($cnx, $orderBy, $orderDir)
{
$thisLOCATION = "./?dgo=adm/publicidad.php";
$res = @mysql_query( "SELECT id, anunciante, descr, nVistos, nVisitas FROM publicidad", $cnx );
echo "<br><br><br><table width=100% cellpadding=0 cellspacing=0 class=td_lista>";
echo "<td class=menuL>id</td>".
"<td class=menuL>Anunciante</td>".
"<td class=menuL>Descripci&oacuten</td>".
"<td class=menuL>Vistos / Visitas</td>".
"<td class=menuL>Borrar</td>";
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_anunciante, $db_descr, $db_nVistos, $db_nVisitas )= $datos;
echo "<tr><td><a href=\"./?dgo=adm/publicidad.php&smod=$db_id\">$db_id</a></td>".
"<td>$db_anunciante</td><td>$db_descr</td><td>$db_nVistos / $db_nVisitas</td><td><a href=\"javascript::deleteUser($db_id)\"><img src=\"images/actions/cancel.gif\" border=0></a></td></tr>";
}
echo "</table>";
echo '<script language="JavaScript">
function deleteUser( which )
{
var submitOK = confirm("Atencion: Esta a punto de eliminar al artista.");
if ( submitOK )
document.location.href = "'.$thisLOCATION.'&del="+which;
}
</script>';
}
function displayMenu()
{
echo '<hr noshade color="#800000">';
echo '<p align="center"><a href="./?dgo=adm/publicidad.php&sins=new">Insertar nuevo banner</a></p>';
echo '<hr noshade color="#800000">';
}
function displayForm( $form_action )
{
global $db_id, $db_url, $db_anunciante, $db_descr, $db_tipo, $db_nVistos, $db_nVisitas, $db_filename;
global $imgData;
echo '<form action="'.$form_action.'" method="POST" name="register" enctype="multipart/form-data">
<table width=100%>
<tr><td>ID: '.$db_id.'</td><td></td></tr>
<tr><td>Anunciante:</td><td><input type=text name=db_anunciante value="'.$db_anunciante.'"></td></tr>
<tr><td>Descripci&oacute;n:</td><td><input type=text name=db_descr value="'.$db_descr.'"></td></tr>
<tr><td>Tipo:</td><td><select name=db_tipo>
<option value="H">Horizontal</option>
<option value="V">Vertical</option>
</select>
</td></tr>
<tr><td>Visionados:</td><td>'.$db_nVistos.'</td></tr>
<tr><td>Visitas:</td><td>'.$db_nVisitas.'</td></tr>
<tr><td>url Publicidad:</td><td><input name=db_url value="'.$db_url.'"></td></tr>
<tr><td>Fichero imagen:</td><td><input name="imgData" value="" type=file></td>
<tr><td colspan=2><img src="db/publicidad/'.$db_id.'_i001@'.$db_filename.'"></td></tr>
</table><center><input type=submit value=Enviar></center></form>';
}
?>

0
adm/publicidad.php~ Normal file
View File

79
adm/selectIMGd.php Normal file
View File

@ -0,0 +1,79 @@
<?
require( "../addons/open_db.php" );
require( "../addons/autenticate.php" );
if ( ! $user_auth ) die( "<META CONTENT=\"0; URL=..\error.htm\" HTTP-EQUIV=\"REFRESH\"> ");
if ( !empty($imgData_name) && isset( $idd ) && isset( $img ) )
{
if ( $imgData_size > 0 )
{
$img_prop = GetImageSize($imgData);
$imgW = $img_prop[0]; $p_imgW = $imgW;
$imgH = $img_prop[1]; $p_imgH = $imgH;
$fsize = filesize($imgData);
fwrite( fopen( "../db/discos/".$idd."_".$img."_".$imgData_name, "wb" ),
fread(fopen($imgData,"rb"), $fsize), $fsize);
} else {
if ( strcmp($imgData_name, "ninguna" ) != 0 ) die("<script language=\"javascript\">window.close();</script>");
$data = "";
$imgW = 0;
$imgH = 0;
$img_prop = "";
}
$res = @mysql_query( "SELECT file FROM extrasDiscos WHERE idd=$idd AND tipo='F' AND id_data='$img'", $conexion );
if ( @mysql_num_rows( $res ) > 0 )
{
$db_file = mysql_fetch_array( $res );
unlink("../db/discos/".$idd."_".$img."_".$db_file[0] );
$sql_upd = "UPDATE extrasDiscos SET file = '$imgData_name', W='$imgW', H='$imgH'" .
" WHERE id = ".$idd;
$res = mysql_query( $sql_upd, $conexion ) OR die("No puedo modificar esta foto<br>$sql_upd<br>".mysql_error($conexion));
}else{
@mysql_query( "INSERT INTO extrasDiscos (file, W, H, idd, tipo, id_data) VALUES ".
" ('$imgData_name', '$imgW', '$imgH', '$idd', 'F', '$img') ", $conexion );
}
mysql_close($conexion);
echo "<html><head></head><body onload='window.close();'><p>Procesando petición.<br>Por favor, espere...<br></body></html>";
} else {
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Portal -web- ------------------------------------------------------------- -www.infdj.com- ---------------------------------------------------------------------------------------------------- </title>
<link href="skins/articulos.ico" rel="SHORTCUT ICON">
<link rel="stylesheet" type="text/css" href="../addons/estilo.css" body="../addons/estilo.css">
<body background="../images/bg.gif" bgcolor="<?echo $bg_color ?>" text="#000000">
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="340">
<?
if ( !isset( $idd ) )
{
echo "<tr><td>";
echo "<br>Error procesando su petición.<br><li>ACCESO DENEGADO</li>";
echo "</td></tr>";
} else {
echo "<tr></tr>";
?>
<u>Cambiar o Agregar foto:</u><img src="../images/box.gif"
align="left" hspace="0" width="100" height="98"><br><br>
<li>Pulse examinar y busque la imagen en su
equipo.</li>
<li>Envie la imagen al servidor.</li>
<br><br>Este proceso puede tardar varios minutos
dependiendo de su conexión y el tráfico.
<?
echo "<tr><td><form ACTION=\"$PHP_SELF?idd=$idd&img=$img\" method=\"POST\" enctype=\"multipart/form-data\">";
echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"300000\"><input type=\"file\" size=\"15\" name=\"imgData\">";
echo "&nbsp;&nbsp;<input type=\"image\" name=\"I2\" src=\"../images/enviar.gif\" align=\"absmiddle\" width=\"69\" height=\"14\" border=\"0\">";
echo "</form></td></tr>";
}
?>
</table>
</center></div>
</body>
</html>
<? } ?>

113
adm/tdiscos.php Normal file
View File

@ -0,0 +1,113 @@
<?
if ( $user_auth && $user_level <= -1 )
{
$blq1 ="pvp,descrCorta,descrLarga";
$list = true;
if ( isset( $sins ) )
{
displayForm( "./?dgo=adm/tdiscos.php&ins=new" );
$list = false;
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT id,$blq1 FROM TiposDiscos WHERE id=$smod", $conexion );
$datos = @mysql_fetch_array( $res );
list( $db_id, $db_pvp, $db_descrCorta, $db_descrLarga ) = $datos;
displayForm( "./?dgo=adm/tdiscos.php&mod=$smod" );
$list = false;
}
if ( isset( $mod ) )
{
$sql = "UPDATE TiposDiscos SET ".
"pvp='$db_pvp' ".
",descrCorta='$db_descrCorta' ".
",descrLarga='".urlencode($db_descrLarga)."' ".
" WHERE id=$mod";
$res = @mysql_query( $sql, $conexion );
$list = true;
}
if( isset( $ins ) )
{
$sql = "INSERT INTO TiposDiscos ($blq1) VALUES ('$db_pvp','$db_descrCorta','$db_descrLarga')";
$res = @mysql_query( $sql, $conexion ) OR die( "Error<br>".@mysql_error($conexion) );
echo "<h1>Nuevo tipo insertado</h1><br><br><br>";
echo "<p class=remark>ID asignado = ".@mysql_insert_id($conexion)."</p>";
$list = true;
}
if( isset( $del ) )
{
$res = @mysql_query( "DELETE FROM TiposDisco WHERE id=$del" );
$list = true;
}
if ( isset( $list ) && $list )
{
displayList($conexion);
}
displayMenu();
}
function displayList($cnx)
{
$thisLOCATION = "./?dgo=adm/tdiscos.php";
$res = @mysql_query( "SELECT id, pvp, descrCorta FROM TiposDiscos", $cnx );
echo "<br><br><br><table width=100% cellpadding=0 cellspacing=0 class=td_lista>";
echo "<tr><td class=menuL>id</td>".
"<td class=menuL>Descripci&oacute;n</td>".
"<td class=menuL>PVP</td>".
"<td>Borrar</td></tr>";
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_pvp, $db_descrCorta )= $datos;
echo "<tr><td><a href=\"./?dgo=adm/tdiscos.php&smod=$db_id\">$db_id</a></td>".
"<td>$db_descrCorta</td>".
"<td>$db_pvp # $db_tlf2</td>".
"<td><a href=\"javascript::deleteUser($db_id)\">X</a></td></tr>";
}
echo "</table>";
echo '<script language="JavaScript">
function deleteUser( which )
{
var submitOK = confirm("Atencion: Esta a punto de eliminar el Tipo de Disco.");
if ( submitOK )
document.location.href = "'.$thisLOCATION.'&del="+which;
}
</script>';
}
function displayMenu()
{
echo '<hr noshade color="#800000">';
echo '<p align="center"><a href="./?dgo=adm/tdiscos.php&sins=new">Insertar nuevo tipo</a></p>';
echo '<hr noshade color="#800000">';
}
function displayForm( $form_action )
{
global $db_id, $db_pvp, $db_descrCorta, $db_descrLarga;
echo '<form action="'.$form_action.'" method="POST" name="register">';
echo '<p align="center">&nbsp;</p><div align="center"><center>';
echo '<table>';
echo '<tr><td>Breve Descripci&oacute;n:</td><td><input type=text name=db_descrCorta value="'.$db_descrCorta.'"></td></tr>';
echo '<tr><td>PVP</td><td><input type=text name=db_pvp value="'.$db_pvp.'"></td></tr>';
echo '<tr><td valign=top>Descripci&oacute;n Larga:</td><td><textarea name=db_descrLarga rows=5 cols=20>'.urldecode($db_descrLarga).'</textarea></td></tr>';
echo '</table>';
echo '<p align="center"><input type="button" name="btCancelar" value="Cancelar"><input
type="submit" name="B2" value="Enviar &gt;&gt;"></p>';
echo '</center></div></form>';
}
?>

0
adm/tdiscos.php~ Normal file
View File

66
default.php Normal file
View File

@ -0,0 +1,66 @@
<?
if ( !isset($orderBy) ) $orderBy ="id";
if ( !isset($orderDir) ) $orderDir ="ASC";
if ( !isset($parent) ) $parent='';
// echo "Listado de Estilos<br><br>";
displayList($conexion, $orderBy, $orderDir, $parent);
function cambiaProporciones()
{
global $db_Foto_w, $db_Foto_h;
$W = 125; $H=125;
if ( $db_Foto_w > 0 )
{
if ( $db_Foto_w > $db_Foto_h )
{
$db_Foto_h = intval(($db_Foto_h/$db_Foto_w)*$W); $db_Foto_w=$W;
} else {
$db_Foto_w = intval(($db_Foto_w/$db_Foto_h)*$H); $db_Foto_h=$H;
}
}
}
function displayList($cnx, $orderBy, $orderDir, $parent)
{
global $db_Foto_w, $db_Foto_h;
$thisLOCATION = "./?dgo=ver_grupo.php";
$res = @mysql_query( "SELECT e.id, e.titulo, e.descr, e.Foto_mime, e.Foto_w, e.Foto_h FROM estilos AS e WHERE e.parent='$parent' ORDER BY e.$orderBy $orderDir", $cnx ) OR die( "Error<br>".@mysql_error($cnx) );;
$numBloq = 0;
echo "<STYLE type=text/css>#im {
FILTER: alpha(opacity=50)
}
</STYLE>";
echo "<center><table>";
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_titulo, $db_descr, $db_Foto_mime, $db_Foto_w, $db_Foto_h )= $datos;
$numBloq++;
cambiaProporciones();
$lBlq1 = "<a href=\"$thisLOCATION&ide=$db_id\"><img src=\"gimage.php?db=estilos&db_id=$db_id&db_mime=$db_Foto_mime\" width=\"$db_Foto_w\" height=\"$db_Foto_h\"
border=\"0\" alt=\"".urldecode($db_descr)."\" id=im onmouseover=high(this)
onmouseout=low(this)><br>$db_titulo</a>";
if ( $numBloq == 1 )
echo "<tr>";
echo "<td><table class=td_estilos><tr><td>$lBlq1</td></tr></table></td>";
if ( $numBloq == 3 )
echo "</tr>";
}
if ($numBloq == 1) echo "<td></td><td></td>";
else if ($numBloq==2) echo "<td></td>";
echo "</table></center><hr><br><br><br>";
}
?>

113
encuesta.php Normal file
View File

@ -0,0 +1,113 @@
<?
if ( isset( $ins ) && $user_auth && $user_level <= -1 )
{
$res = mysql_query( "INSERT INTO encuestas (fecha, validaHasta, pregunta, resp1, resp2, resp3, resp4) VALUES ( CURDATE(), '".addslashes($db_validaHasta)."', '".addslashes($db_pregunta)."', '".addslashes($db_resp1)."', '".addslashes($db_resp2)."', '".addslashes($db_resp3)."', '".addslashes($db_resp4)."')", $conexion ) OR die( "Error<br>".mysql_error($conexion) );
echo "Su encuesta, ha sido insertada<br><br>";
}
if ( isset( $sins ) && $user_auth && $user_level <= -1 )
{
echo "<h1>Crear nueva encuesta</h1>";
?>
<hr noshade color="#800000">
<form name="enc" method="POST" action="./?dgo=encuesta.php&ins=1">
<table border="0">
<tr>
<td width="30%">FechaLimite</td>
<td width="20%"><input type="text" size="6"
name="db_validaHasta" value="<? echo $db_validaHasta ?>"></td>
<td valign="top" rowspan="6" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
sobre la encuesta</strong><p>Puede especificar una fecha
limite para la encuesta (AAAA-MM-DD), de forma, que esta tenga una
caducidad.</p>
<p>Dispone de un máximo de cuatro respuestas para cada
encuesta, no tiene porque rellenarlas todas. (Puede que
su pregunta solo necesite dos respuestas, p.ejem. SI/NO)</p>
</td>
</tr>
<tr>
<td width="30%">Pregunta<br>
</td>
<td width="20%"><input type="text" size="15"
name="db_pregunta" value="<? echo $db_pregunta ?>"><br>
</td>
</tr>
<tr>
<td width="30%">Respuesta 1</td>
<td width="20%"><input type="text" size="15"
name="db_resp1" value="<?echo $db_resp1 ?>"></td>
</tr>
<tr>
<td width="30%">Respuesta 2</td>
<td width="20%"><input type="text" size="15"
name="db_resp2" value="<?echo $db_resp2 ?>"></td>
</tr>
<tr>
<td width="30%">Respuesta 3</td>
<td width="20%"><input type="text" size="15"
name="db_resp3" value="<?echo $db_resp3 ?>"></td>
</tr>
<tr>
<td>Respuesta 4</td>
<td><input type="text" size="15"
name="db_resp4" value="<?echo $db_resp4 ?>"></td>
<td>&nbsp;</td>
</tr>
<tr><td align="center" colspan="2"><center><input type="submit" name="B1" value="Enviar"></center>
<td></td>
</tr>
</table>
<hr noshade color="#800000"></form>
<?
} else {
if ( isset($vota) )
{
$res = mysql_query( "SELECT uip FROM encuestas WHERE id=$eid", $conexion );
$numrows = mysql_num_rows( $res );
if ( $numrows > 0 )
{
$datos = mysql_fetch_array($res);
// Insertamos la votación
if ( strcmp( $REMOTE_ADDR, $datos[0] ) != 0 )
{
$sql_upd = "UPDATE encuestas SET vresp$vota=(vresp$vota+1), uip='$REMOTE_ADDR' WHERE id=$eid";
$res = mysql_query( $sql_upd, $conexion ) OR die( "$sql_upd<br><br>".mysql_error($conexion) );
}
} else {
echo "NO ENCUENTRO ESA ENCUESTA EN EL SISTEMA<br><br>";
}
}
$res = mysql_query( "SELECT id, pregunta, resp1, vresp1, resp2, vresp2, resp3, vresp3, resp4, vresp4 FROM encuestas ORDER BY fecha+id DESC LIMIT 0, 1", $conexion );
$numrows = mysql_num_rows( $res );
if ( $numrows > 0 )
{
$datos = mysql_fetch_array($res);
echo "<h1>Recuento de la encuesta</h1><br>";
echo "<table class=td_estilos><tr><td><p class=lmenuo><b>La pregunta era:</b></p>";
echo "$datos[1]<br><br>";
$totalVotos = ($datos[3]+$datos[5]+$datos[7]+$datos[9] );
$preBar = '<img src="images/stat/bar_left.gif"><img src="images/stat/bar_middle.gif" height="16" width="';
$postBar = '"><img src="images/stat/bar_right.gif">';
if ( !empty( $datos[2] ) )
echo "1.- ".stripslashes($datos[2])."<br>$preBar".(($datos[3]*300) / $totalVotos )."$postBar $datos[3] Votos<br><br>";
if ( !empty( $datos[4] ) )
echo "2.- ".stripslashes($datos[4])."<br>$preBar".(($datos[5]*300) / $totalVotos )."$postBar $datos[5] Votos<br><br>";
if ( !empty( $datos[6] ) )
echo "3.- ".stripslashes($datos[6])."<br>$preBar".(($datos[7]*300) / $totalVotos )."$postBar $datos[7] Votos<br><br>";
if ( !empty( $datos[8] ) )
echo "4.- ".stripslashes($datos[8])."<br>$preBar".(($datos[9]*300) / $totalVotos )."$postBar $datos[9] Votos<br><br>";
echo "Total VOTOS: " . $totalVotos;
echo "</td></tr></table>";
} else {
echo "No se encontraron encuestas en el sistema";
}
}
?>

105
eventos.php Normal file
View File

@ -0,0 +1,105 @@
<?
$displayList = true;
// Solo si esta autenticado puede EDITAR/ELIMINAR/INSERTAR
$eventAccess = ( $user_auth &&
( $user_level <= -1 || ( isset( $idg ) && $user_idg == $idg ) )
);
if ( $eventAccess )
{
//echo "<p><b1>SI ESTAS AUTENTICADO</b1></p>";
if ( isset( $del ) )
{
@mysql_query( "DELETE FROM eventos WHERE id=$del", $conexion );
}
if ( isset( $sins ) )
{
displayFORM( "./?dgo=eventos.php&ins=new&idg=$idg", $datos, $conexion );
$displayList = false;
}
if ( isset( $ins ) )
{
$FIELDS = "idg, FAlta, FEvento, HEvento, Lugar, Titulo, Notas";
$FVALUES = "$idg, NOW(), '$db_FEvento', '$db_HEvento', '$db_Lugar', '$db_Titulo', '".urlencode($db_Notas)."'";
@mysql_query( "INSERT INTO eventos ($FIELDS) VALUES ($FVALUES)", $conexion );
}
if ( isset( $smod ) )
{
$res = @mysql_query( "SELECT FEvento, HEvento, Lugar, Titulo, Notas FROM eventos WHERE id = $smod", $conexion );
$datos = @mysql_fetch_array( $res );
displayFORM( "./?dgo=eventos.php&mod=$smod&idg=$idg", $datos, $conexion );
$displayList = false;
}
if ( isset( $mod ) )
{
@mysql_query("UPDATE eventos SET FEvento='$db_FEvento', HEvento='HEvento', Lugar='$db_Lugar', Titulo='$db_Titulo', Notas='".urlencode($db_Notas)."' WHERE id=$mod", $conexion );
}
}
if ( isset( $view ) )
{
$res = @mysql_query( "SELECT FEvento, HEvento, Lugar, Titulo, Notas FROM eventos WHERE id = $view", $conexion );
$datos = @mysql_fetch_array( $res );
displayFORM( "", $datos, $conexion );
$displayList = true;
}
if ( $displayList )
displayListEvnt();
function displayFORM( $ACTION, $datos, $conexion )
{
list( $db_FEvento, $db_HEvento, $db_Lugar, $db_Titulo, $db_Notas ) = $datos;
echo '<br><br><h1>Eventos del Grupo</h1><br><br>';
echo '<center>';
if ( !empty($ACTION) )
echo '<form method="POST" action="'.$ACTION.'">';
echo '<table border="0"><tr>
<td>Fecha: <input type="text" size="12"
name="db_FEvento" value="'.$db_FEvento.'"></td>
<td>Hora: <input type="text" size="12"
name="db_HEvento" value="'.$db_HEvento.'"></td>
</tr>
<tr>
<td>Descripción:</td>
<td><input type="text" size="18" name="db_Titulo" value="'.$db_Titulo.'"></td>
</tr>
<tr>
<td>Lugar:</td>
<td><input type="text" size="18" name="db_Lugar" value="'.$db_Lugar.'"></td>
</tr>
<tr>
<td colspan="2">Mas información:<br>
<textarea name="db_Notas" rows="5" cols="34">'.urldecode($db_Notas).'</textarea></td>
</tr>
</table><br>';
if ( !empty($ACTION) )
echo '<input type="reset" name="B1" value="Cancelar"><input
type="submit" name="B2" value="Enviar &gt;&gt; &gt;">
</form>';
echo '</center>';
}
function displayListEvnt( )
{
global $conexion, $idg, $eventAccess;
$res = @mysql_query( "SELECT id, FEvento, HEvento, Titulo FROM eventos WHERE idg=$idg", $conexion );
echo '<center><table width="90%" class="td_estilos"><tr><td>Fecha y Hora</td><td>Descripción del evento</td><td>&nbsp;</td></tr>';
echo '<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
while( $datos=@mysql_fetch_array($res) )
{
list ( $db_id, $db_FEvento, $db_HEvento, $db_Titulo )= $datos;
echo "<tr><td>$db_FEvento &nbsp; $db_HEvento</td><td><a href=\"./?dgo=eventos.php&view=$db_id&idg=$idg\">$db_Titulo</a></td>";
echo "<td>[<a href=\"./?dgo=eventos.php&del=$db_id&idg=$idg\"> - </a>]</td></tr>";
}
echo '</table></center>';
if ( $eventAccess )
echo '<a href="./?dgo=eventos.php&sins='.$idg.'&idg='.$idg.'">Nuevo Evento</a>';
}
?>

20
gimage.php Normal file
View File

@ -0,0 +1,20 @@
<?
// Parametros: db / db_id / db_mime
if (!isset( $db_fid ) ) $db_fid="001";
$filename = "db/$db/$db_id"."_i".$db_fid;
$fp = fopen($filename, "rb");
if ( $fp )
{
Header( "Content-type: $db_mime" );
echo fread($fp,filesize($filename));
fclose($fp);
} else {
Header("Content-type: image/gif");
$fp = fopen("images/simagen.gif","rb");
echo fread($fp,filesize("images/simagen.gif"));
fclose($fp);
}
?>

BIN
images/-bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/-logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/actions/cancel.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 B

BIN
images/actions/down.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

BIN
images/actions/up.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

BIN
images/admin.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/apache.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/bg.jpg- Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
images/box.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/box_tder.gif- Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

BIN
images/bt-jdsoft0.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/bt-jdsoft1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/empresa.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/encontrar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/encuestas.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/enviar.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
images/fusionlogomenu.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
images/let.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

BIN
images/let1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

BIN
images/logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
images/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
images/mid.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

BIN
images/mid1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

BIN
images/mysql.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
images/no_group.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
images/par.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/par1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

BIN
images/php2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/registrate.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/secciones.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/snd.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

BIN
images/snd1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

BIN
images/stat/bar_left.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

BIN
images/stat/bar_middle.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

BIN
images/stat/bar_right.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

BIN
images/td_divv.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

BIN
images/tder.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

BIN
images/tizq.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
images/tmed.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

BIN
images/tmusica.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/tmusica.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/tnexo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/tvacio.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/tvacio.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

459
index.php Normal file
View File

@ -0,0 +1,459 @@
<!-- main.htm -->
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Informática D.J. programadores :: w w w . i n f d j . c o m ::</title>
<link rel="stylesheet" type="text/css" href="addons/estilo.css"
body="addons/estilo.css">
</head>
<body background="images/bg.jpg" bgcolor="#FFFFFF">
<p><!--webbot bot="HTMLMarkup" startspan -->
<?php
/**
* infdj.com
* Funciones necesarias para el portal de musica...
*
* email: comercial@infdj.com
*
*/
require( "addons/open_db.php" );
require( "addons/autenticate.php" );
require( "addons/rpublicidad.php" );
$anchoCaja=140;
$parteIzq='bgcolor="#FFC600"';
?>
<!--webbot
bot="HTMLMarkup" endspan --></p>
<script src="addons/misc.js"></script><script
language="JavaScript" src="addons/fade.js"></script><!-- Listado de temas --><div
align="left">
<table border="0" cellpadding="0" cellspacing="0" width="760">
<tr>
<td width="169"><img src="images/logo.gif">
<!--
width="170"
height="120">
-->
</td>
<td valign="top"><!--webbot bot="HTMLMarkup" startspan -->
<center>
<?
MuestraBanner( "H", $conexion );
?>
</center>
<!--webbot
bot="HTMLMarkup" endspan --> </td>
</tr>
</table>
</div><!-- BEGIN: PORTAL --><!--width="760"--><div align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="12">&nbsp;</td>
<td valign="top" width="146" class="colIzq"><form
method="post" name="find">
<p><img src="images/fusionlogomenu.gif" width="146"
height="32"><!-- LEFT MENU: BUSCADOR --></p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td class="tmenu">:: Buscador</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1"
width="100%" bgcolor="#66CC66" class="menuB">
<!-- bgcolor="#CCFFCC" --> <tr>
<td align="center" class="lmenu"><br>
<select name="queBuscar" size="1">
<option value="autor">Artista</option>
<option>grupo</option>
<option value="disco">Disco</option>
<option value="cancion">Canción</option>
<option value="idg">ID del grupo</option>
</select><br>
<input type="text" size="10" name="T1"><input
type="submit" name="B1" value="&gt;"><p>Busqueda
Avanzada</p>
</td>
</tr>
</table>
</form>
<p><!-- LEFT MENU: SECCIONES --> </p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td>:: Secciones</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0"
width="100%" class="menuB">
<tr>
<td align="center"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?">Listado de Temas</a></td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=registro.php">Inscripción y
bases</a></td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?go=faq.htm">Preguntas comunes</a></td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=noticias.php">Noticiero</a></td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Ideas</td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Chat</td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Estadísticas</td>
</tr>
<tr>
<td align="center" class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Ranking</td>
</tr>
</table>
</td>
</tr>
</table>
<p><br>
</p>
<p><!-- LEFT MENU: EMPRESA --> </p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td>:: Empresa</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1"
width="100%" bgcolor="#66CC66" class="menuB">
<tr>
<td align="center"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Informacion
General</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Objetivos</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Contratación</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Management</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">&nbsp;</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';">Tus
Quejas</td>
</tr>
</table>
</td>
</tr>
</table>
<p><br>
</p>
</td>
<td valign="top" width="470"><!--webbot bot="HTMLMarkup"
startspan -->
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td>
<!-- BEGIN: ZONA DE PAGINA -->
<?
global $go;
if ( isset($go) )
{
if ( file_exists( "pages/$go" ) )
{
$ruta = dirname( $go );
$repl = "src=\"pages/$ruta/";
$repl2= "href=\"./?go=$ruta/";
$desc = fopen( "pages/$go", "r" );
while ( !feof( $desc ) )
{
echo eregi_replace( "\href=\"", $repl2,
eregi_replace( "\src=\"", $repl, fgets( $desc, 256 ) ) );
}
fclose( $desc );
// require("pages/$go");
} else
echo "<CENTER>la pagina no esta disponible</center>";
} else {
if ( isset( $dgo ) )
require($dgo);
else
require('./default.php');
}
?>
</td></tr></table>
<!-- BEGIN: RIGHT MENU -->
<!--webbot bot="HTMLMarkup" endspan --> </td>
<td align="center" valign="top" width="150"
style="text-align:center"><!-- RIGHT MENU: REGISTRO --> <!--webbot bot="HTMLMarkup"
startspan -->
<? if ( !$user_auth ) { ?>
<!--webbot bot="HTMLMarkup" endspan --> <form
action="index.php" method="POST" name="vuser">
<table border="0" cellpadding="0" cellspacing="0"
width="140">
<tr>
<td><img src="images/registrate.gif"
width="120" height="35"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1"
width="100%" background="images/td_bg.gif"
bgcolor="#66CC66">
<tr>
<td bgcolor="#CCFFCC"><table border="0"
width="100%">
<tr>
<td>Usuario:<br>
Clave:<br>
<br>
AutoLog</td>
<td align="right"><input type="text"
size="5" name="db_login"><br>
<input type="password" size="5"
name="db_pass"><br>
<input type="checkbox"
name="db_autolog"><input type="image"
name src="images/sep.gif"
align="bottom" border="0" width="1"
height="1"></td>
</tr>
</table>
<p class="lmenu"><a
href="./?dgo=registro.php">Registrate</a> y
podras acceder a secciones vetadas a usuarios
anónimos, enviar noticias y comentarios con
tu nombre.</p>
</td>
</tr>
</table>
</form>
<p><!--webbot bot="HTMLMarkup" startspan -->
<?} else {
if ( $user_level <= -1 )
{
?>
<!--webbot
bot="HTMLMarkup" endspan --> </p>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><img src="images/admin.gif" width="120"
height="35"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1"
width="100%" bgcolor="#FF0000">
<tr>
<td bgcolor="#FFBBBB"><table border="0"
cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=registro/list_user.php">Listado
de Usuarios</a></td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=noticias.php&amp;sadd=new">Nueva
Noticia</a></td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=encuesta.php&amp;sins=enc">Nueva
Encuesta</a></td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=adm/publicidad.php">Publicidad
(Banners)</a></td>
</tr>
<tr>
<td><hr>
</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=adm/artistas.php">Listado de
Artistas</a></td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=adm/grupos.php">Listado de
Grupos</a></td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=adm/tdiscos.php">Tipos de
Discos</a></td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=adm/discos.php">Listado de
Discos</a></td>
</tr>
<tr>
<td><hr>
</td>
</tr>
<tr>
<td class="lmenu"
onmouseover="this.className='lmenuo';"
onmouseout="this.className='lmenu';"><a
href="./?dgo=adm/estilos.php">Listado de
Estilos</a></td>
</tr>
</table>
</td>
</tr>
</table>
<p><!--webbot bot="HTMLMarkup" startspan -->
<?}}?>
<!-- RIGHT MENU: ENCUESTAS -->
<!--webbot
bot="HTMLMarkup" endspan --> </p>
<form action="index.php?dgo=encuesta.php&amp;ins=true"
method="POST" name="fenc">
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td><img src="images/encuestas.gif"
width="120" height="35"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1"
width="100%" bgcolor="#66CC66" class="menuB">
<tr>
<td class="lmenu" style="text-align:left;"><!--webbot
bot="HTMLMarkup" startspan -->
<?
$res = mysql_query( "SELECT id, pregunta, resp1, resp2, resp3, resp4 FROM encuestas WHERE CURDATE() <= validaHasta ORDER BY fecha+id DESC LIMIT 0, 1", $conexion );
$numrows = mysql_num_rows( $res );
if ( $numrows > 0 )
{
$datos = mysql_fetch_array($res);
echo "$datos[1]<br><br>";
if ( !empty( $datos[2] ) )
echo "1.- <a href=\"./?dgo=encuesta.php&vota=1&eid=$datos[0]\">$datos[2]</a><br><br>";
if ( !empty( $datos[3] ) )
echo "2.- <a href=\"./?dgo=encuesta.php&vota=2&eid=$datos[0]\">$datos[3]</a><br><br>";
if ( !empty( $datos[4] ) )
echo "3.- <a href=\"./?dgo=encuesta.php&vota=3&eid=$datos[0]\">$datos[4]</a><br><br>";
if ( !empty( $datos[5] ) )
echo "4.- <a href=\"./?dgo=encuesta.php&vota=4&eid=$datos[0]\">$datos[5]</a><br><br>";
} else {
echo "Esta semana aun no hay encuestas disponibles";
}
?>
<!--webbot
bot="HTMLMarkup" endspan --> <p
align="center">--= <a
href="./?dgo=encuesta.php">Votos</a> =--</p>
</td>
</tr>
</table>
</form>
<p><!-- RIGHT MENU: BANNER VERTICAL --> </p>
<p><!--webbot bot="HTMLMarkup" startspan -->
<?
MuestraBanner( "V", $conexion );
?>
<!--webbot
bot="HTMLMarkup" endspan --> <br>
</p>
<p><img src="images/php2.gif" width="102" height="47"><br>
<br>
<img src="images/mysql.gif" width="100" height="46"><br>
<br>
<!--webbot bot="HTMLMarkup" startspan --> <a href="http://jd.infdj.com/credits.htm" target="_blank"><img src="images/bt-jdsoft0.gif" alt="&nbsp;&nbsp;&nbsp;Portal de Música&#013;&nbsp;Diseñado por JDsoft&#013;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www.infdj.com" border="0" hspace="0" width="95" height="27"
name="bt-jdsoft"
onmouseout="javascript:document['bt-jdsoft'].src='images/bt-jdsoft0.gif'"
onmouseover="javascript:document['bt-jdsoft'].src='images/bt-jdsoft1.gif'"></a><!--webbot
bot="HTMLMarkup" endspan --></p>
</td>
</tr>
</table>
</div>
<p><!--webbot bot="HTMLMarkup" startspan -->
<?
mysql_close($conexion);
?>
<!--webbot
bot="HTMLMarkup" endspan --></p>
</body>
</html>

3
leeme.txt Normal file
View File

@ -0,0 +1,3 @@
Este portal solo funcionará en un servidor web, con soporte PHP y mySQL.
Antes de arrancar el portal, debe estar configurada la base de datos, y el archivo correspondiente con as contraseñasd de acceso al la misma.

80
noticias.php Normal file
View File

@ -0,0 +1,80 @@
<?
if ( !empty( $db_asunto ) && !empty( $db_noticia ) )
{
if ( isset( $add ) && $user_auth && $user_level == -2)
$res = mysql_query( "INSERT INTO news (fecha, uid, asunto, noticia) VALUES (CURDATE(), '$user_id', '".addslashes($db_asunto)."','".addslashes($db_noticia)."')", $conexion ) OR die("No puedo insertar la noticia");
if ( isset( $mod ) && ( $user_auth ) && $user_level == -2 )
$res = mysql_query( "UPDATE news SET uid='$user_id', asunto='".addslashes($db_asunto)."', noticia='".addslashes($db_noticia)."' WHERE id=$mod", $conexion ) OR die("No puedo modificar la noticia");
}
if ( !isset( $go ) )
$go = 1;
$go--;
if ( isset( $smod ) )
$res = mysql_query( "SELECT fecha, asunto, noticia, id FROM news WHERE id=$smod", $conexion ) OR die("No puedo realizar la consulta<br>$sql_upd<br>".mysql_error($conexion));
else
$res = mysql_query( "SELECT fecha, asunto, noticia, id FROM news ORDER BY fecha+id DESC LIMIT $go, 5", $conexion ) OR die("No puedo realizar la consulta<br>$sql_upd<br>".mysql_error($conexion));
?>
<? if ( isset( $sadd ) || isset( $smod ) ) { ?>
<br><br>
<form method="post" action="<? if ( isset( $sadd ) ) echo "./?dgo=noticias.php&add=this"; else echo "./?dgo=noticias.php&mod=$smod"; ?>"><p>
<input type=text maxlength=60 name="db_asunto"
<?
if ( isset( $smod ) )
{
$datos = mysql_fetch_array($res);
echo "value=\"$datos[1]\" ";
}
?>
style="width: 100%; font-family: arial, serif;font-size: 12pt;background-color:#CFFFCF;color: #000000;border: 1px solid #000000;">
<textarea name="db_noticia" style="overflow: auto;
background-color:#CFFFCF;
LAYER-BACKGROUND-COLOR:#CFFFCF;
color: #000000;
font-family: arial, serif;
font-size: 12pt;
line-height: 105%;
left: 0px;
font-weight: medium;
scrollbar-base-color: #000000;
scrollbar-arrow-color: #FFFFFF;
scrollbar-face-color: #gray;
scrollbar-shadow-color: #444444;
border: 1px solid black; height: 100px; width: 100%;
CLIP: rect(0,100%,100,0)"><? if ( isset( $smod ) ) echo "$datos[2]"; ?></textarea>
<input type="image" name src="images/enviar.gif" border="0" width="71" height="14"></p>
</form>
<?} else {
echo '<br><br>';
//<p style="font-family: verdana, arial, serif; font-size: 8pt;">';
$numrows = mysql_num_rows( $res );
if ( $numrows > 0 )
{
while( ($datos = mysql_fetch_array($res)) )
{
echo '<div align="center"><center><table border="0" bordercolor="#000000" cellpadding="0" cellspacing="0" width="90%" >';
echo "<tr><td width=24>";
echo "<img src=\"images/td_divv.gif\" align=\"absmiddle\"></td><td bgcolor=\"#000000\" style=\"color:#FFFFFF\">";
if ( $user_auth && $user_level == -2 )
echo "<a href=\"./?dgo=noticias.php&smod=$datos[3]\">[ E ]</a> ";
echo"<b>$datos[0] &gt;&gt &gt; ".stripslashes($datos[1])."</b></td></tr>";
echo '</table><table border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" width="90%" >';
echo "<tr><td bgcolor=\"#FFFFFF\">".nl2br(stripslashes($datos[2]))."</td></tr>";
echo "</table><br><br></center></div>";
}
} else {
echo "No hay noticias en el sistema";
}
mysql_free_result($res);
// echo "</p>";
}
?>

292
registro.php Normal file
View File

@ -0,0 +1,292 @@
<?
if ( isset( $insertUser ) )
{
if ( empty( $db_usaCorreo ) ) $db_usaCorreo = "N";
$consulta = "INSERT into users (nick, level, ultimaEntrada, primeraEntrada, pass, Nombre, Apellidos, fechaNacimiento, calle, ciudad, provincia, nacionalidad, cp, email, usaCorreo, preguntaSecreta, respuestaPregunta ) values".
" ('$db_nick',0, NOW(), NOW(), '$db_passwd', '$db_nombre', '$db_apellidos', '$db_ano/$db_mes/$db_dia', '$db_calle', '$db_ciudad', '$db_provincia', '$db_nacionalidad', '$db_cp', '$db_email', '$db_usaCorreo', '$db_preguntaSecreta', '$db_respuestaPregunta')";
mysql_query( $consulta, $conexion ) OR die("No puedo insertar tu ficha<br>$consulta<br>".mysql_error($conexion));
mysql_free_result($res);
// insertamos al usuario
require("registro/welcome.htm");
} else {
if ( isset( $updateUser ) )
{
if ( empty( $db_usaCorreo ) ) $db_usaCorreo = "N";
if ( $updateUser != $user_id && $user_level != -2 )
die("IP capturada.<br>Ataque ilegal contra nuestro sistema detectado");
$consulta = "UPDATE users SET ".
" pass='$db_passwd', preguntaSecreta='$preguntaSecreta', respuestaPregunta='$db_respuestaPregunta', ".
" Nombre='$db_nombre', Apellidos='$db_apellidos', calle='$db_calle', ciudad='$db_ciudad', provincia='$db_provincia', cp='$db_cp', nacionalidad='$db_nacionalidad', ".
" fechaNacimiento='$db_ano/$db_mes/$db_dia'".
" WHERE id='$updateUser'";
mysql_query( $consulta, $conexion ) OR die("No puedo actualizar tu ficha<br>$consulta<br>".mysql_error($conexion));
$showUser = $updateUser;
}
if ( $user_auth && isset( $showUser ) )
{
if ( $user_level != -2 ) $showUser = $user_id;
$consulta = "SELECT * FROM users WHERE id='$showUser'";
$res = mysql_query( $consulta, $conexion ) OR die("No puedo consultar la ficha");
if ( mysql_num_rows($res) > 0 )
{
$db_nick = mysql_result( $res, 0, "nick" );
$db_preguntaSecreta = mysql_result( $res, 0, "preguntaSecreta" );
$db_respuestaPregunta = mysql_result( $res, 0, "respuestaPregunta" );
$db_passwd = mysql_result( $res, 0, "pass" );
$db_nombre = mysql_result( $res, 0, "Nombre" );
$db_apellidos = mysql_result( $res, 0, "Apellidos" );
$db_calle = mysql_result( $res, 0, "calle" );
$db_ciudad = mysql_result( $res, 0, "ciudad" );
$db_provincia = mysql_result( $res, 0, "provincia" );
$db_cp = mysql_result( $res, 0, "cp" );
$db_nacionalidad = mysql_result( $res, 0, "nacionalidad" );
$db_usaCorreo = mysql_result( $res, 0, "usaCorreo" );
$db_email = mysql_result( $res, 0, "email" );
$db_fechaNacimiento = mysql_result( $res, 0, "fechaNacimiento" );
// Dividimos la fecha de nacimiento en DIA/MES/AÑO
$db_dia = substr($db_fechaNacimiento, 8, 2 );
$db_mes = substr($db_fechaNacimiento, 5, 2 );
$db_ano = substr($db_fechaNacimiento, 0, 4 );
mysql_free_result($res);
}
}
?>
<form method="POST" name="register"
onsubmit="return validateform( this.form )"
<? if ( !isset($showUser) ) echo " ACTION=$PHP_SELF?dgo=registro.php&insertUser=this";
else echo " ACTION=$PHP_SELF?dgo=registro.php&updateUser=$showUser";
?>>
<div align="center"><center><table border="0" cellpadding="0"
cellspacing="0" width="100%" >
<!-- width="580" -->
<tr>
<td><? if ( !isset( $showUser ) ) echo "<h1>Nuevo usuario</h1>"; else echo "<h1>Datos del usuario</h1>"; ?>
<table border="0" cellpadding="0" cellspacing="0"
width="100%" bgcolor="#800000">
<tr>
<td><font color="#FFFFFF"><strong>
<?
if ( !isset( $showUser ) ) echo "Unete a PortalMusica ahora!!!";
else echo "Verificando datos de registro";
?></strong></font></td>
</tr>
</table>
<table border="0">
<tr>
<td width="30%">Nick:</td>
<td width="20%"><input type="text" size="6"
name="db_nick" value="<? echo $db_nick ?>"></td>
<td valign="top" rowspan="5" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
de validación</strong><p>Selecciona el
nombre de usuario para tu cuenta.</p>
<p>Ejemplo: sac@infdj.com</p>
<p>La pregunta secreta y su respuesta, será
usada para verificar su identidad.</p>
</td>
</tr>
<tr>
<td width="30%">Password:</td>
<td width="20%"><input type="password"
size="15" name="db_passwd" value="<?echo $db_passwd?>"></td>
</tr>
<tr>
<td width="30%">Reescriba el Password:</td>
<td width="20%"><input type="password"
size="15" name="db_passwd2"></td>
</tr>
<tr>
<td width="30%">Pregunta secreta:</td>
<td width="20%"><input type="text" size="15"
name="db_preguntaSecreta" value="<? echo $db_preguntaSecreta ?>"></td>
</tr>
<tr>
<td width="30%">Respuesta pregunta:</td>
<td width="20%"><input type="text" size="15"
name="db_respuestaPregunta" value="<? echo $db_respuestaPregunta ?>"></td>
</tr>
</table>
<hr noshade color="#800000">
<table border="0">
<tr>
<td width="30%">Nombre:</td>
<td width="20%"><input type="text" size="15"
name="db_nombre" value="<? echo $db_nombre ?>"></td>
<td valign="top" rowspan="6" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>Información
de contacto</strong><p>Tu privacidad es
importante para nosotros.<br>Nos comprometemos a mantener tu información a
salvo y segura.<br>Por favor, lea nuestra <a
href="registro/privacyPolicy.htm"
target="_blank">Politica de Privacidad</a>
para saber más.</p>
</td>
</tr>
<tr>
<td width="30%">Apellidos:</td>
<td width="20%"><input type="text" size="15"
name="db_apellidos" value="<? echo $db_apellidos ?>"></td>
</tr>
<tr>
<td width="30%">Dirección:</td>
<td width="20%"><input type="text" size="15"
name="db_calle" value="<? echo $db_calle ?>"></td>
</tr>
<tr>
<td width="30%">Ciudad:</td>
<td width="20%"><input type="text" size="15"
name="db_ciudad" value="<? echo $db_ciudad ?>"></td>
</tr>
<tr>
<td width="30%">Provincia:</td>
<td width="20%"><input type="text" size="15"
name="db_provincia" value="<? echo $db_provincia ?>"></td>
</tr>
<tr>
<td width="30%">Cód. Postal:</td>
<td width="20%"><input type="text" size="15"
name="db_cp" value="<? echo $db_cp ?>"></td>
</tr>
<tr>
<td width="30%">Nacionalidad:</td>
<td width="20%"><input type="text" size="15"
name="db_nacionalidad" value="<?echo $db_nacionalidad ?>"></td>
</tr>
</table>
<hr noshade color="#800000">
<table border="0">
<tr>
<td colspan="2" width="50%"><input
type="checkbox" name="db_usaCorreo"
<? if ( strcmp($db_usaCorreo, "Y" )==0 ) echo " checked "; ?> VALUE="Y">Quiero un correo con <strong>infdj.com</strong></td>
<td valign="top" rowspan="7" width="50%"
bgcolor="#B4CCE9" class="tdSuave"><strong>¿Quieres estar al dia?</strong><p>Si deseas que
te informemos de eventos y modificaciones de este portal, indicanos tu e-mail,
para que podamos estar en contacto.<br><br>Actualmente esta opción no esta disponible</p>
</td>
</tr>
<tr>
<td width="30%">Correo actual:</td>
<td width="20%"><input type="text" size="15"
name="db_email" value="<? echo $db_email ?>"></td>
</tr>
<tr>
<td width="30%">Cumpleaños:</td>
<td width="20%"><select name="db_dia"
size="1">
<option>Dia...</option>
<?
for ( $i=1; $i<32; $i++)
{
echo "<option ";
if ( $i==$db_dia ) echo " SELECTED ";
echo ">$i</option>";
}
?>
</select><br>
<select name="db_mes" size="1">
<option>Mes...</option>
<option <?if ($db_mes==1) echo "SELECTED";?> value="1">Enero</option>
<option <?if ($db_mes==2) echo "SELECTED";?> value="2">Febrero</option>
<option <?if ($db_mes==3) echo "SELECTED";?> value="3">Marzo</option>
<option <?if ($db_mes==4) echo "SELECTED";?> value="4">Abril</option>
<option <?if ($db_mes==5) echo "SELECTED";?> value="5">Mayo</option>
<option <?if ($db_mes==6) echo "SELECTED";?> value="6">Junio</option>
<option <?if ($db_mes==7) echo "SELECTED";?> value="7">Julio</option>
<option <?if ($db_mes==8) echo "SELECTED";?> value="8">Agosto</option>
<option <?if ($db_mes==9) echo "SELECTED";?> value="9">Septiembre</option>
<option <?if ($db_mes==10) echo "SELECTED";?> value="10">Octubre</option>
<option <?if ($db_mes==11) echo "SELECTED";?> value="11">Noviembre</option>
<option <?if ($db_mes==12) echo "SELECTED";?> value="12">Diciembre</option>
</select><br>
<select name="db_ano" size="1">
<option>Año...</option>
<?
for($i=2003;$i>1900;$i--)
{
echo "<option";
if ( $i==$db_ano ) echo " SELECTED ";
echo ">$i</option>";
}
?>
</select></td>
</tr>
<tr>
<td width="30%">Ciudad:</td>
<td width="20%"><input type="text" size="15"
name="db_ciudad" value="<?echo $db_ciudad ?>"></td>
</tr>
</table>
<hr noshade color="#800000">
<?
if ( $user_level == -2 )
{
echo '<table border="0">
<tr>
<td width="30%">ID del Grupo</td>
<td width="20%"><input
type="text" size="15" name="db_idg" value="'.$db_idg.'"; ?>"</td>
<td valign="top" rowspan="7" width="50%"
bgcolor="#B4CCE9" class="tdSuave">Datos de control<br><br>Si este usuario puede "POSTEAR" noticias referente a un grupo, indique cual.
</td>
</tr>
</table>';
}
?>
<table border="0" cellpadding="0" cellspacing="0"
width="100%" bgcolor="#800000">
<tr>
<td><font color="#FFFFFF">&nbsp;</font></td>
</tr>
</table>
<? if ( ($user_auth && isset($showUser)) || !isset($showUser) ) { ?>
<p align="center"><input type="button" name="btCancelar" value="Cancelar"><input
type="submit" name="B2" value="Enviar &gt;&gt;"></p>
<? } ?>
<p align="center">Si envias este formulario,
significa que estas de acuerdo con el &quot;<a
href="registro/endUserAgreement.htm" target="_blank">Acuerdo de
usuario final</a>&quot; y la &quot;<a
href="registro/privacyPolicy.htm" target="_blank">Política de
Privacidad</a>&quot;.</p>
<p><script language="JavaScript"><!--
function validateform()
{
if (document.register.db_nick.value=="")
{
window.alert ("Por favor, introduce tu NICK (nombre de usuario)")
return false;
}
if (document.register.db_passwd.value=="")
{
window.alert ("Por favor, introduce tu Password (contraseña)")
return false;
}
if (document.register.db_passwd.value != document.register.db_passwd2.value )
{
window.alert ("La contraseña no coincide, vuelva a introducirla")
return false;
}
}
// --></script><br>
</p>
</td>
</tr>
</table>
</center></div>
</form>
<?}?>

View File

@ -0,0 +1,6 @@
<html>
<head><title>Licencia del usuario final</title></head>
<body>
<h1><center>Aqui va la Licencia del usuario Final de la empresa</center></h1>
</body>
</html>

8
registro/index.htm Normal file
View File

@ -0,0 +1,8 @@
<html>
<head>
<title>:: No dispone de permisos para acceder a esta carpeta ::</title>
<META CONTENT="0; URL=/" HTTP-EQUIV="REFRESH">
</head>
<body>
</body>
</html>

97
registro/list_user.php Normal file
View File

@ -0,0 +1,97 @@
<?
$thisLOCATION = "./?dgo=registro/list_user.php";
if ( $user_auth && $user_level == -2 )
{
if ( isset( $deleteUser ) )
{
if ( $usaCorreo )
echo "Abria que eliminar al usuario del correo aqui. <br><h1>Esto esta pendiente</h1><br>";
$res = mysql_query( "DELETE FROM users WHERE id=$deleteUser", $conexion ) OR die( "No puedo eliminar al usuario" );
}
if ( !isset( $orderBy ) ) $orderBy = "id";
if ( !isset( $orderDir ) ) $orderDir = "ASC";
$consulta = "SELECT id, nick, Nombre, Apellidos, usaCorreo, primeraEntrada, ultimaEntrada, email FROM users ORDER BY $orderBy $orderDir";
$res = mysql_query( $consulta, $conexion ) OR die("No puedo consultar los usuarios");
if ( mysql_num_rows($res) <= 0 )
{
echo "<center>No se encontraron usuarios en el sistema</center>";
} else {
echo "<!-- BEGIN: LISTADO DE USUARIOS -->";
?>
<style>
td.menu
{
color:#FFFFFF;
background-color:#800000;
font-size: 9pt;
border-style : solid;
border-left-width : 0;
border-top-width : 0;
border-bottom-width : 0;
border-right-width : 0;
}
</style>
<div align="center"><center><table border="0" cellpadding="0"
cellspacing="0" width="580">
<tr>
<td><h1>Listado de usuarios</h1>
<p></p>
<hr noshade color="#800000">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td class="menu"><b>id</b> <a href="<?echo "$thisLOCATION&oderBy=id&orderDir=DESC"?>"><img src="images/actions/down.gif" border=0></a><a href="<?echo "$thisLOCATION&oderBy=id&orderDESC=ASC"?>"><img src="images/actions/up.gif" border=0></a></td>
<td class="menu"><b>Nick</b> <a href="<?echo "$thisLOCATION&oderBy=nick&orderDir=DESC"?>"><img src="images/actions/down.gif" border=0></a><a href="<?echo "$thisLOCATION&oderBy=nick&orderDESC=ASC"?>"><img src="images/actions/up.gif" border=0></a></td>
<td class="menu"><b>Nombre</b> <a href="<?echo "$thisLOCATION&oderBy=Nombre,Apellidos&orderDir=DESC"?>"><img src="images/actions/down.gif" border=0></a><a href="<?echo "$thisLOCATION&oderBy=Nombre,Apellidos&orderDESC=ASC"?>"><img src="images/actions/up.gif" border=0></a></td>
<td class="menu"><b>Alta</b> <a href="<?echo "$thisLOCATION&oderBy=primeraEntrada&orderDir=DESC"?>"><img src="images/actions/down.gif" border=0></a><a href="<?echo "$thisLOCATION&oderBy=primeraEntrada&orderDESC=ASC"?>"><img src="images/actions/up.gif" border=0></a></td>
<td class="menu"><b>ultimaEntrada</b> <a href="<?echo "$thisLOCATION&oderBy=ultimaEntrada&orderDir=DESC"?>"><img src="images/actions/down.gif" border=0></a><a href="<?echo "$thisLOCATION&oderBy=ultimaEntrada&orderDESC=ASC"?>"><img src="images/actions/up.gif" border=0></a></td>
<td class="menu">-[:]-</td>
</tr>
<?
while ( $datos = mysql_fetch_array($res) )
{
echo "<tr>";
echo "<td><a href=\"./?dgo=registro.php&showUser=$datos[0]\">$datos[0]</a></td>";
echo "<td>";
if ( strcmp( $datos[4], "Y") == 0 ) echo "<a href=\"mailto:$datos[1]@musica.com\">$datos[1]</a>";
else {
if ( empty($datos[7]) ) echo "$datos[1]";
else echo "<a href=\"mailto:$datos[7]\">$datos[1]</a>";
}
echo "</td>";
echo "<td>$datos[2] $datos[3]</td>";
echo "<td>".substr($datos[5], 6, 2 )."/".substr($datos[5], 4, 2 )."/".substr($datos[5], 0, 4 )."</td>";
echo "<td>".substr($datos[6], 6, 2 )."/".substr($datos[6], 4, 2 )."/".substr($datos[6], 0, 4 )."</td>";
echo "<td><a href=\"javascript:deleteUser($datos[0])\"><img src=\"images/actions/cancel.gif\" border=0></a></td>";
echo "</tr>";
}
mysql_free_result($res);
?>
</table>
<hr noshade color="#800000">
<p><br>
</p>
</td>
</tr>
</table>
</center></div>
</form>
<script language="JavaScript">
function deleteUser( which )
{
var submitOK = confirm("Atencion: Esta a punto de eliminar al usuario.");
if ( submitOK )
document.location.href = "<?echo "$thisLOCATION&orderBy=$orderBy&orderDir=$orderDir&usaCorreo=$usaCorreo"?>&deleteUser="+which;
}
</script>
<?
echo "<!-- END: LISTADO DE USUARIOS -->";
}
} else echo "<!-- ACCESO NO AUTORIZADO -->";
?>

View File

@ -0,0 +1,6 @@
<html>
<head><title>Politica de privacidad</title></head>
<body>
<h1><center>Aqui va la politica de privacidad de la empresa</center></h1>
</body>
</html>

6
registro/welcome.htm Normal file
View File

@ -0,0 +1,6 @@
<html>
<head><title>Welcome!!!</title></head>
<body>
<h1><center>Mensaje de bienvenida al nuevo usuario</center></h1>
</body>
</html>

223
sql/PMusica.ddl Normal file
View File

@ -0,0 +1,223 @@
CREATE TABLE news (
id INTEGER NOT NULL AUTO_INCREMENT,
fecha DATE NOT NULL,
uid INTEGER,
asunto VARCHAR(50),
noticia TEXT,
PRIMARY KEY (id),
CONSTRAINT news_users FOREIGN KEY (uid)
REFERENCES users (id)
);
CREATE TABLE users (
id INTEGER NOT NULL AUTO_INCREMENT,
idg INTEGER,
nick VARCHAR(15),
level INTEGER NOT NULL DEFAULT 0,
ultimaEntrada DATE,
primeraEntrada DATE,
pass VARCHAR(15),
Nombre VARCHAR(15),
Apellidos VARCHAR(25),
fechaNacimiento DATETIME,
calle VARCHAR(30),
ciudad VARCHAR(15),
provincia VARCHAR(15),
nacionalidad VARCHAR(15),
cp INTEGER,
telefono VARCHAR(15),
mobil VARCHAR(15),
email VARCHAR(50),
usaCorreo ENUM('Y','N') DEFAULT 'N',
preguntaSecreta VARCHAR(25),
respuestaPregunta VARCHAR(25),
PRIMARY KEY (id),
CONSTRAINT usuario_controla_grupo FOREIGN KEY
(idg) REFERENCES grupos (id)
);
CREATE TABLE miniChat (
id INTEGER,
fecha DATE,
hora TIME,
uid INTEGER DEFAULT 0,
msg VARCHAR(80),
CONSTRAINT users_miniChat FOREIGN KEY (uid)
REFERENCES users (id)
);
CREATE TABLE encuestas (
id INTEGER NOT NULL,
fecha DATE,
validaHasta DATE,
pregunta VARCHAR(50),
resp1 VARCHAR(35),
vresp1 SMALLINT DEFAULT 0,
resp2 VARCHAR(35),
vresp2 SMALLINT DEFAULT 0,
resp3 VARCHAR(35),
vresp3 SMALLINT DEFAULT 0,
resp4 VARCHAR(35),
vresp4 SMALLINT DEFAULT 0,
uip VARCHAR(15),
PRIMARY KEY (id)
);
CREATE TABLE useronline (
hora INTEGER NOT NULL,
ip VARCHAR(15) NOT NULL,
uid INTEGER NOT NULL,
PRIMARY KEY (hora),
INDEX (ip),
INDEX (uid),
CONSTRAINT users_useronline FOREIGN KEY (uid)
REFERENCES users (id)
);
CREATE TABLE artistas (
id INTEGER NOT NULL AUTO_INCREMENT,
FAlta DATETIME NOT NULL,
Nombre VARCHAR(15),
Apellido VARCHAR(40),
Instrumento VARCHAR(50),
Foto_mime VARCHAR(50),
Foto_W INTEGER,
Foto_H INTEGER,
Telefono1 VARCHAR(15),
Telefono2 VARCHAR(15),
NIF VARCHAR(20),
Calle VARCHAR(50),
Localidad VARCHAR(20),
Provincia VARCHAR(20),
CP INTEGER,
url VARCHAR(50),
e_Mail VARCHAR(30),
FechaNacimiento DATE,
comentario TEXT,
PRIMARY KEY (id),
INDEX (FAlta)
);
CREATE TABLE grupos (
id INTEGER NOT NULL AUTO_INCREMENT,
ide INTEGER,
FAlta DATE,
nombre VARCHAR(50),
comentario TEXT,
cache VARCHAR(50),
equipoSonidoLuces VARCHAR(50),
estadisticas TINYTEXT,
croquiMusicos VARCHAR(100),
sugerenciasGrupo VARCHAR(50),
contratacion TINYTEXT,
imagen VARCHAR(50),
PRIMARY KEY (id),
CONSTRAINT estilos_grupo FOREIGN KEY (ide)
REFERENCES estilos (id)
);
CREATE TABLE componentesGrupo (
idg INTEGER NOT NULL,
idp INTEGER NOT NULL,
PRIMARY KEY (idg),
INDEX (idp),
CONSTRAINT artistas_componentesGrupo FOREIGN
KEY (idp) REFERENCES artistas (id)
);
CREATE TABLE estilos (
id INTEGER NOT NULL AUTO_INCREMENT,
parent INTEGER NOT NULL DEFAULT 0,
titulo VARCHAR(50),
descr TINYTEXT,
Foto_mime VARCHAR(50),
Foto_w SMALLINT,
Foto_h SMALLINT,
PRIMARY KEY (id),
INDEX (parent)
);
CREATE TABLE discos (
id INTEGER NOT NULL AUTO_INCREMENT,
idg INTEGER,
ide INTEGER,
FAlta DATE,
FEdicion DATE,
ids SMALLINT DEFAULT 3,
titulo VARCHAR(50),
pv NUMERIC(6,2),
comentario TEXT,
PRIMARY KEY (id),
CONSTRAINT discos_grupo FOREIGN KEY (idg)
REFERENCES grupos (id),
CONSTRAINT estilo_disco FOREIGN KEY (ide)
REFERENCES estilos (id),
CONSTRAINT tipo_del_disco FOREIGN KEY (pv)
REFERENCES TiposDiscos (id)
);
CREATE TABLE extrasDiscos (
id INTEGER NOT NULL AUTO_INCREMENT,
idd INTEGER,
tipo CHAR DEFAULT 'O',
id_data INTEGER,
file VARCHAR(50),
W INTEGER,
H INTEGER,
PRIMARY KEY (id),
CONSTRAINT extras_de_un_disco FOREIGN KEY
(idd) REFERENCES discos (id)
);
CREATE TABLE cancionesDisco (
id INTEGER NOT NULL AUTO_INCREMENT,
idd INTEGER,
posicion SMALLINT NOT NULL,
duracion TIME,
titulo VARCHAR(50),
f_partitura VARCHAR(50),
f_audio VARCHAR(50),
f_letra VARCHAR(50),
INDEX (id),
INDEX (id, posicion),
PRIMARY KEY (id),
CONSTRAINT canciones_del_disco FOREIGN KEY
(idd) REFERENCES discos (id)
);
CREATE TABLE eventos (
id INTEGER NOT NULL AUTO_INCREMENT,
idg INTEGER NOT NULL,
FAlta DATE,
FEvento DATE NOT NULL,
HEvento TIME,
Lugar VARCHAR(30),
Titulo VARCHAR(50),
Notas TEXT,
PRIMARY KEY (id),
INDEX (idg, FEvento),
CONSTRAINT eventos_grupo FOREIGN KEY (idg)
REFERENCES grupos (id)
);
CREATE TABLE TiposDiscos (
id INTEGER NOT NULL AUTO_INCREMENT,
pvp NUMERIC(8,2),
descrCorta VARCHAR(20),
descrLarga TEXT,
PRIMARY KEY (id)
);
CREATE TABLE publicidad (
id INTEGER NOT NULL AUTO_INCREMENT,
FAlta DATE,
anunciante VARCHAR(50),
descr VARCHAR(50),
url VARCHAR(90),
tipo CHAR DEFAULT 'H',
nVistos INTEGER DEFAULT 0,
nVisitas INTEGER DEFAULT 0,
filename VARCHAR(30),
PRIMARY KEY (id)
);

58
sql/PMusica.drp Normal file
View File

@ -0,0 +1,58 @@
################################################################################
# (c) copyrights 1999 - 2002 JDsoft
# Project: Portal de Musica
# Author(s): José David Guillén
# Target SQL: MySql
# Date:
# Description:
# Tablas usadas por el portal infdj.com
#
# Generated by: Zeos Database Designer, version 1.0.0
################################################################################
################################ Dropping Tables ###############################
################################################################################
# Almacena las noticias posteadas
################################################################################
DROP TABLE news;
################################################################################
# Informacion sobre los usuarios
################################################################################
DROP TABLE users;
################################################################################
# miniChat para dejar miniMensajes
################################################################################
DROP TABLE miniChat;
DROP TABLE encuestas;
DROP TABLE useronline;
################################################################################
# Datos personales de un artista concreto
################################################################################
DROP TABLE artistas;
################################################################################
# Contiene información de los grupos...
################################################################################
DROP TABLE grupos;
################################################################################
# Indica los componentes de un grupo
################################################################################
DROP TABLE componentesGrupo;
################################################################################
# Estilos musicales
################################################################################
DROP TABLE estilos;
################################################################################
# Describe los eventos de los distintos grupos.
################################################################################
DROP TABLE eventos;

1619
sql/PMusica.prj Normal file

File diff suppressed because it is too large Load Diff

1120
sql/PMusica.prj- Normal file

File diff suppressed because it is too large Load Diff

0
sql/leeme.txt Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More