Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/04/2010, 16:30
arieljbon
 
Fecha de Ingreso: enero-2009
Mensajes: 159
Antigüedad: 15 años, 4 meses
Puntos: 2
Respuesta: Problema de barras....

Cita:
Iniciado por Carxl Ver Mensaje
Cuál es el botón del problema?? Qué código tiene?
Aqui dejo el codigo:( fijensen en la linea que hace referencia al link, abajo de todo si por ahi es el problema..donde dice.. $salida..)

Código PHP:
<?php
    
class Categoria {
    function 
__construct($linea$sel=''){
        
$this->base $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
            
$this->coleccion $linea;
        
$this->selected $sel;
        
$this->linea $linea;

        
$this->getCategorias($linea);
    }
    
    function 
getCategorias($id){
        if (
$id != ''){
        
$sql "select * from CATEGORIAS where linea_id ='$id' order by idCategoria";
        
$rsconsulta($sql);
        
        while(
$row mysql_fetch_array($rs)){



            
$this->categorias$row['idCategoria']]= $row['nombre'];
            
$this->exists =true;
        }
        }
    }

        function 
currentClass($id){
            return 
$this->categorias[$id];
        }

    function 
display(){
        
$salida '';
        if (
$this->exists){

            if (isset(
$this->categorias)){
            
$salida .= '<div id="categorias">';

                    
$salida .= '<ul>';

            foreach (
$this->categorias as $N => $categ){
            
$sel '';

                        
$sql "select * from ARTICULOS where categoria_id= ".$N.' limit 1;';
                        
$rs2consulta($sql);
                        while(
$row2 mysql_fetch_array($rs2)){
                            
$art  $row2['idArticulo'];
                        }
                        
$class str_replace(' ''_'$categ);
            if (
$N == $this->selected$sel ' class="'.$class.'" ';
            
$salida .= '<li '.$sel.' ><a href="http://'.$this->base.'/'.$this->linea.'_1_'.$N.'/'.$art.'/'.$categ.'.html" >'.$categ.'</a></li>';[/COLOR]
            }
                
$salida .= '</ul>';
            
$salida .= '</div>';

        }
        
        
        }
        
        return 
$salida;
    }
    }
?>