PHP Classes

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

Recommend this page to a friend!
  Classes of James Brows   PHP Bulletin Board   upload/plugins/bulletinboard/api_libs/bb_get_threadads_url_info.php   Download  
File: upload/plugins/bulletinboard/api_libs/bb_get_threadads_url_info.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: 785 bytes
 

Contents

Class file image Download
<?php


function bb_get_threadads_url_info()
{
   
//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']:'';

    try {
       
isValidAccessAPI();
    } catch (\
Exception $e) {
        echo
responseData($e->getMessage(),'yes');return false;
    }

   
$url=addslashes(getPost('url',''));
 
   
$thread_id='';

    if(!
preg_match('/t\-.*?\_(\d+)\.html/i',$url,$match))
    {
       
// redirect to 404 page
       
return 'NG';
    }

   
$thread_id=$match[1];

   
$queryStr='';


   
$queryStr.=" select * from bb_threads_data where thread_id='".$thread_id."'";

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


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