PHP Classes

File: upload/plugins/bulletinboard/api_libs/bb_account_get_list_following.php

Recommend this page to a friend!
  Classes of James Brows   PHP Bulletin Board   upload/plugins/bulletinboard/api_libs/bb_account_get_list_following.php   Download  
File: upload/plugins/bulletinboard/api_libs/bb_account_get_list_following.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Bulletin Board
Manage and post messages in multi-user forums
Author: By
Last change:
Date: 2 years ago
Size: 1,109 bytes
 

Contents

Class file image Download
<?php

function bb_account_get_list_following()
{
   
//Ki?m tra Cookie, n?u ko ??ng nh?p thì tr? v? false
   
$cookie_username=isset(Configs::$_['user_data']['user_id'])?Configs::$_['user_data']['user_id']:'';

    if(!isset(
$cookie_username[1]))
    {
        return
'NG';
    }
   
   
$limit=addslashes(getPost('limit','30'));
   
$page_no=addslashes(getPost('page_no','1'));

    if((int)
$page_no > 0)
    {
       
$page_no=(int)$page_no-1;
    }
    if((int)
$page_no<=0)
    {
       
$page_no=0;
    }

   
$offset=(int)$page_no*30;

   
$queryStr='';

   
$queryStr=" select a.*,b.username,b.fullname,b.avatar,c.title as group_title";
   
$queryStr.=" from bb_user_follow_data as a";
   
$queryStr.=" left join user_mst as b ON a.followed_user_id=b.user_id";
   
$queryStr.=" left join user_group_mst as c ON b.group_c=c.group_c";
   
$queryStr.=" where a.user_id='".Configs::$_['user_data']['user_id']."'";
   
$queryStr.=" order by a.ent_dt desc limit ".$offset.",".$limit;

   
$db=new Database();
   
$result=$db->query($queryStr);

    echo
responseData($result,'no');die();
}