"Gimnaziu", "2"=>"Liceu", "3"=>"Facultate"); include "_config.php"; include (BASE."functii/conectare.php"); //include (BASE."functii/rezolva_belele.php"); include (BASE."functii/fo_sesiune.php"); include (BASE."functii/luna.php"); include (BASE."functii/inceput_str.php"); include (BASE."functii/tip_fisier.php"); //conectareala baza de date include (BASE."include/fa_conectare.php"); include BASE."include/paginatie_bamse.php";//nu este include BASE."functii/data_romaneasca.php"; include BASE."functii/scoatere.php"; //verificare sid daca exista tratare_sesiune($db); //include BASE."referate/_switch_subdom.php"; // daca e sesiune, schimba calea if (!isset($id_referat) || $id_referat < 0 || !is_numeric($id_referat)){ header("location:referate.php"); } $detalii_referat = get_referat_by_id($id_referat); if (!$detalii_referat){ header("location:referate.php"); } // scoatem din fisier o descriere; $filename = explode(".zip", $detalii_referat->fisier); $filename = "/var/www/html/referat-scoala.ro/salvare/txt/".$filename[0].".txt"; $handle = fopen($filename,"r"); if ($handle){ $textual = trim(fread($handle, 500)."..."); }else{ $textual = "Descrierea nu este disponibila"; } $nume_materie = get_materie($detalii_referat->materie); $data_referat = data_romaneasca($detalii_referat->data); $nota = number_format($detalii_referat->media, 2); // pentru meta $description_plus = substr($textual, 0, 100); // include "htm_referat.php"; ?>