Ultimele stiri'; $news = mysql_query('SELECT * FROM `news` ORDER BY `UID` DESC LIMIT 2',$link); while ($new = mysql_fetch_array($news)) { if (strlen($new['TEXT'])>300) $new['TEXT'] = substr($new['TEXT'],0,300).'
citeste mai mult...'; echo '

'.date('d',$new['DATA']).' '.$luni[intval(date('m',$new['DATA']))].' '.date('Y',$new['DATA']).'
'.$new['TEXT'].'

'; }*/ echo '

Ultimele cursuri

'; $curs = mysql_query('SELECT * FROM `cursuri` WHERE `STARE` = \'0\' ORDER BY `UID` DESC LIMIT 2',$link); while ($new = mysql_fetch_array($curs)) { if (strlen($new['descriere'])>300) $new['descriere'] = substr($new['descriere'],0,300).'[...]
citeste mai mult...'; echo '

'.mb_convert_case($new['nume'],MB_CASE_TITLE,'utf8').'
'.date('d',$new['data']).' '.$luni[intval(date('m',$new['data']))].' '.date('Y',$new['data']).'

'.$new['descriere'].'

'; } echo '
'; } $pids = array( '1' => 'Organizare', '2' => 'Legislatie', '3' => 'Formulare', '4' => 'Malpraxis', ); $pids2 = array( '1' => 'organizare-', '2' => 'legislatie-', '3' => 'formulare-', '4' => 'malpraxis-', ); if (!isset($_GET['page']) && isset($_GET['id']) && isset($pids[$_GET['id']])) { $id = mysql_real_escape_string($_GET['id']); $res = mysql_query('SELECT `UID` FROM `pagini` WHERE `PID` = \''.$id.'\' ORDER BY `PRINCIPALA` DESC, `UID` ASC',$link); if ($res = mysql_fetch_array($res)) { $_GET['page'] = $res[0]; } unset($res); } if (isset($_GET['page'])){ $res = mysql_query('SELECT `TITLU`, `TEXT`, `PID` FROM `pagini` WHERE `UID` = \''.mysql_real_escape_string($_GET['page']).'\' LIMIT 1',$link); if ($res = mysql_fetch_array($res)) { $_GET['id'] = $res['PID']; $res2 = mysql_query('SELECT `UID`, `TITLU` FROM `pagini` WHERE `PID` = \''.mysql_real_escape_string($_GET['id']).'\' ORDER BY `PRINCIPALA` DESC, `TITLU` ASC',$link); if (mysql_num_rows($res2)) { $title = $res['TITLU']; $nc = true; $active = $_GET['id']+1; if ($_GET['id']=='5') $active='8'; include('header.php'); echo '
'; echo $res['TEXT']; echo '
'; echo '
'; if (mysql_num_rows($res2)>1) { echo 'Pagini din aceasta categorie
    '; while ($r2 = mysql_fetch_array($res2)) { $links = str_replace(' ','-',strtolower($r2['TITLU'])); $links = str_replace('ţ','t',$links); $links = str_replace('ț','t',$links); $links = str_replace('ş','s',$links); $links = str_replace('ș','s',$links); $links = str_replace('ă','a',$links); $links = str_replace('â','a',$links); $links = str_replace('î','i',$links); $links = mb_ereg_replace('[^A-Za-z\-]','',$links).'-'.$r2['UID']; echo '
  • '.$r2['TITLU'].'
  • '; } echo '
'; echo '
'; echo '
'; } stiri(); echo '
'; echo '
'; include('footer.php'); } else { $title = $res['TITLU']; include('header.php'); echo $res['TEXT']; include('footer.php'); } die(''); } } if (isset($_GET['id'])) { $active = $_GET['id']+1; if ($_GET['id']=='5') $active='8'; $res = mysql_query('SELECT `UID`, `TITLU`,`TEXT` FROM `pagini` WHERE `PID` = \''.mysql_real_escape_string($_GET['id']).'\' ORDER BY `TITLU` ASC',$link); if (mysql_num_rows($res)==0) { $nc = true; include('header.php'); echo '
'; echo '
Nu exista nicio pagina in aceasta categorie
'; echo '
'; echo '
'; stiri(); echo '
'; echo '
'; echo '
'; include('footer.php'); die(''); } } ?>