Location: PHPKode > projects > PHP Enter > www/index.php
<?php
//PHP Enter 3.0.
//Copyright (C) 2011  Predrag Rukavina hide@address.com
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either version 2
//of the License, or (at your option) any later version.
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
include('settings.php');
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$tmp = mysql_query("SELECT * FROM categori ORDER BY name ASC") 
or die("A MySQL error has occurred.<br />Your Query: " . $tmp . "<br /> Error: (" . mysql_errno() . ") " . mysql_error());
while ($aclrow = mysql_fetch_assoc($tmp))
{
$ccval[] = $aclrow;
}
$smarty->assign('rewrite',$rewrite);
$smarty->assign('path',$path);
$smarty->assign('title',$title);
$smarty->assign('temp',$temp);
$smarty->assign('categori', $ccval);
$smarty->display('menus.php');
$resulty = mysql_query("select * from newser order by blogid desc limit 12")
or die("A MySQL error has occurred.<br />Your Query: " . $tmp . "<br /> Error: (" . mysql_errno() . ") " . mysql_error());
while($nrow=mysql_fetch_array($resulty)){
$val[] = $nrow;
}
$incres = mysql_query("select * from publictime order by commid desc limit 10")
or die("A MySQL error has occurred.<br />Your Query: " . $tmp . "<br /> Error: (" . mysql_errno() . ") " . mysql_error());
while($incrow=mysql_fetch_array($incres)){
$incval[] = $incrow;
}
$galres = mysql_query("select * from vgalery order by galid desc LIMIT 4")
or die(mysql_error()); 
while($gevrow=mysql_fetch_array($galres)){
$geval[] = $gevrow;
}
$smarty->assign('newser', $val);
$smarty->assign('comment', $incval);
$smarty->assign('vgalery', $geval);
$smarty->caching = 1;
$smarty->display('main.php');
$smarty->display('footer.php');
?>
Return current item: PHP Enter