Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/08/2009, 10:43
niikee
 
Fecha de Ingreso: agosto-2009
Mensajes: 12
Antigüedad: 14 años, 8 meses
Puntos: 0
Exclamación Donde pego esto??

Hola.. Estoy copiando un codigo pero no se donde va estoo...

Este si se donde va:

Chat.js
Código PHP:
flag=0;
function 
addTex(let){
    var 
forms="mensaje";
    var 
story = $(forms).value;
    if(
let=="BACK"){
        
story=story.substring(0story.length-1);
        $(
forms).value=story;
        $(
forms).focus();
    }else if(
flag==1){
if(
texto==null || texto==""){
        
alert("Nada");
        }
else{
addTex('[b]'+texto+'[/b]');
}
}
function 
it(){
texto prompt('Texto:',"");
if(
texto==null || texto==""){
        
alert("Nada");
        }
else{
addTex('[i]'+texto+'[/i]');
}
}
function 
u(){
texto prompt('Texto subrayado:',"");
if(
texto==null || texto==""){
        
alert("Nada");
        }
else{
addTex('[u]'+texto+'[/u]');
}
}
function 
imagen(){
image prompt('Direcion de la imagen:',"");
if(
image==null || image==""){
        
alert("Nada");
        }
else{
addTex('[img]'+image+'[/img]');
}
}
function 
colo(){
    
texto prompt('Texto:',"");
        if(
texto==null || texto==""){
        
alert("Nada");
        }
else{
color prompt('Color:  (Ej.: red,blue o puede ser html)',"");
if(
color==null || color==""){
}else{
addTex('[color='+color+']'+texto+'[/color]');
}
}
}
/////////////////////////////////////////////////
function html(d,t){
    $(
d).innerHTML=t;
}
function 
restartClass(){
var 
lis document.getElementById("sala").getElementsByTagName("div");
        for (
i=0i<lis.lengthi++) {
            
lis[i].className "sala";
        }
}
function 
selecSala(){
    var 
lis document.getElementById("sala").getElementsByTagName("div");
    for (
i=0i<lis.lengthi++) {
        
lis[i].onclick=function() {
            
restartClass();
            
this.className="sala_ac";
            
sala=this.getAttribute('sala');
            
verGET('cargando');
            
ir('inter.php','r='+Math.random()+'&t=ver&sala='+sala,'coment_tr','POST',false,null,true,'cargando',true,actualizarList());
            
ir('inter.php','r='+Math.random()+'&t=user&sala='+sala,'usuarios','POST',false,null,true,'cargando');
            
ir('inter.php','r='+Math.random()+'&t=conectar&name='+user+'&sala='+sala,null,'POST',false,null,true,'cargando',false,null,true);
            
html('salaET',sala);
        }
    }
}
function 
envAUT(e) { 
tecla = (document.all) ? e.keyCode :e.which
    if(
tecla==13 && !e.shiftKey){
    
enviarGET($('mensaje'));
    return 
false;
    }
return 
true;
}
function 
verSalGET(){
    $(
'users').className="tabs";
    $(
'salas').className="tabs_ac";
    $(
'sala').style.display="block";
    $(
'usuarios').style.display="none";
}
function 
verUGET(){
    $(
'users').className="tabs_ac";
    $(
'salas').className="tabs";
    $(
'usuarios').style.display="block";
    $(
'sala').style.display="none";
}
window.onload=function(){
makeDraggable('bbcode'); 
makeDraggable('config'); 
$(
'mensaje').disabled = !this.checked;
$(
'enviar').disabled = !this.checked;
$(
'nik').innerHTML=" <strong>Nick: </strong>"+user;
addEvent($('users'),'click',verUGET,false);
addEvent($('salas'),'click',verSalGET,false);
selecSala();
verGET('box');
cerrarGET('cargando');


PERO ESTE NO SE DONDE VA:
Tablas
Código PHP:
CREATE TABLE `contenido` (
  `
idint(10NOT NULL AUTO_INCREMENT,
  `
namevarchar(100NOT NULL,
  `
contlongtext NOT NULL,
  `
fechavarchar(100NOT NULL,
  `
salavarchar(100NOT NULL,
  
PRIMARY KEY (`id`)
ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=136 ;


CREATE TABLE `online` (
  `
idint(10NOT NULL AUTO_INCREMENT,
  `
timevarchar(100NOT NULL,
  `
uservarchar(100NOT NULL,
  `
salavarchar(100NOT NULL,
  
PRIMARY KEY (`id`)
ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=173 
Donde pongo "Tablas".?