';
echo "Datele dumneavoastra au fost trimise.Va vom contacta in cel mai scurt timp.";
echo '
';
mail($to, $subject, $message, $headers);
#cariere
}elseif ($id == cariere) {
require_once("core/template/cariere.tpl");
#domenii
}elseif ($id == domenii ) {
require_once("core/template/domenii.tpl");
#avocati
}elseif ($id == avocati) {
require_once("core/mysql.php");
require_once("core/template/avocati.tpl");
echo '
Articole publicate:
';
$result1 = mysql_query("SELECT * FROM `articole` LIMIT 0,3");
while ($r = mysql_fetch_array($result1))
{
echo '
'.$r['titlu'].'
publicat in '.$r['sursa'].'
';
}
echo '
Cum ne ajuta Europa?
Ordonanta de urgentã a Guvernului nr. 67/2006 privind gestionarea fondurilor nerambursabile destinate finantãrii politicii agricole comune alocate de la Comunitatea Europeanã, precum si a fondurilor de co-finantare si pre-finantare alocate de la bugetul de stat.
Publicata în M.Of. nr. 787/18-09-2006
[citeste tot articolul]
';
#about
}elseif ($id == about) {
require_once("core/template/about.tpl");
#sitemap
#articole
}elseif ($id == sitemap) {
require_once("core/template/sitemap.tpl");
#articole
}elseif ($id == articole) {
require_once("core/mysql.php");
$table = 'articole';//Table name here
$limit = 2;//Limit of results here
$page = $_GET['page'];//Gets the page
$totalrows = mysql_num_rows(mysql_query("SELECT id FROM $table"));//Get the total rows of the table
if(empty($page))//If the page is empty
{
$page = '1';//sets the page to 1
};
$start = ($page-1)*$limit;//set the start page
$start = round($start,0);//rounds it
$result = mysql_query("SELECT * FROM $table LIMIT $start, $limit");//makes the query, here you can add for example
//WHERE something='somethingelse'
echo '';
while ($r = mysql_fetch_array($result))
{
echo '
Articole
';
echo '
'.$r['titlu'].'
';
echo 'Publicat in: '.$r['sursa'].'
';
echo '
Pe data de:'.$r['data'].'';
echo '
'.$r['Continut'].'
';
#echo '
Intrebareasdasaa
';
echo $r['continut'].'

';
};
$totalpages = $totalrows / $limit;//Gets the totalpages
$totalpages = ceil($totalpages);//rounds them to the bigger number, so if the limit is 10 and there are 11 results it will show 2 paegs instead of 1 :)
if($page == 1)//if the page is 1
{
$actualpage = '[1]';//actial page 1
}
else
{
$actualpage = "[$page]";//else actualpage is the one we get using the $_GET
}
if($page < $totalpages)//if the page is smaller than totalpages
{
$nv = $page+1;//next page
$pv = $page-1;//prev page
$nextpage = "
>Articolele urmatoare";//next page link
$prevpage = "
Articolele precedente<";//preg page link
$firstpage = "
«";//first page
$finalpage = "
»";//last page
}
if($page == '1')//if the page is 1
{
$nv = $page+1;
$nextpage = "
> ";
$prevpage = "<";
$firstpage = "«";
$finalpage = "
»";
}elseif($page == $totalpages){//is the page is equal than the totalpages
$pv = $page-1;
$nextpage = ">";
$prevpage = "
<";
$firstpage = "
«";
$finalpage = "»";
}
if($totalpages == '1' || $totalpages == '0'){//if totalpages is 1 or 0
$nextpage = ">";
$prevpage = "<";
$firstpage = "«";
$finalpage = "»";
}
echo "$firstpage $prevpage $actualpage $nextpage $finalpage
Pagini: $totalpages";//echoes the pages at the botton of the file
echo '
Clientul lunii:

Cum ne ajuta Europa?
Ordonanta de urgentã a Guvernului nr. 67/2006 privind gestionarea fondurilor nerambursabile destinate finantãrii politicii agricole comune alocate de la Comunitatea Europeanã, precum si a fondurilor de co-finantare si pre-finantare alocate de la bugetul de stat.
Publicata în M.Of. nr. 787/18-09-2006
[citeste tot articolul]
Parteneri:
www.1000contracte.ro
';
}
?>