function page position database sql database- query SELECT FROM compon

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
function page($position, $database)
{
$sql=$database->query("SELECT * FROM components ORDER BY id");
while($row=mysqli_fetch_assoc($sql))
{
$typer=substr($row['path'], -3,3);
if(empty($row['path']) OR !file_exists(PATH.$row['path']))
{file_put_contents('modules_error.txt', $row['path'], FILE_APPEND);}
else
{ if($typer==='php') {require_once PATH.$row['path'];}else{$this->html = join('',file(PATH.$row['path']));} }
}
}