first init
This commit is contained in:
34
application/model/home.php
Normal file
34
application/model/home.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
class Home extends Database{
|
||||
|
||||
function __construct(){
|
||||
$this->connect();
|
||||
}
|
||||
|
||||
function getAllmember(){
|
||||
if ($this->select('profile','avatar,username',$where = null,'0,6')){
|
||||
return $this->getQueryResult();
|
||||
}
|
||||
}
|
||||
|
||||
function getAllpost(){
|
||||
$where='post.user = profile.username';
|
||||
if ($this->select('profile,post','profile.avatar,post.status,profile.nama,post.date,profile.username,post.toUser',$where, $limit = null, 'date desc')){
|
||||
return $this->getQueryResult();
|
||||
}
|
||||
}
|
||||
|
||||
function getAllcomm(){
|
||||
if ($this->select('community','photo,id,type,name')){
|
||||
return $this->getQueryResult();
|
||||
}
|
||||
}
|
||||
|
||||
function getNotiffriend(){
|
||||
$where = "friend.user2='".$_SESSION['username']."' AND friend.status=0 AND friend.user1=profile.username";
|
||||
if ($this->select('friend,profile','friend.id,profile.nama,profile.username',$where)){
|
||||
return $this->getQueryResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user