PHP Classes

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

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

Contents

Class file image Download
<?php

function bb_account_save_bookmark()
{

    if(
Configs::$_['user_data']['user_id']=='GUEST')
    {
        return
'NG';
    }
   
   
$cookie_username=isset(Configs::$_['user_data']['user_id'])?Configs::$_['user_data']['user_id']:'';

    if(!isset(
$cookie_username[1]))
    {
        return
'NG';
    }

   
$url=addslashes(getPost('url',''));
 
   
$insertData=array(
       
'user_id'=>Configs::$_['user_data']['user_id'],
       
'url'=>addslashes(getPost('url')),
    );

   
$queryStr=arrayToInsertStr('bb_user_bookmarks_data',$insertData);

   
$db=new Database();

   
$db->nonquery("delete from bb_user_bookmarks_data where user_id='".Configs::$_['user_data']['user_id']."' AND url='".$url."'");
   
$db->nonquery($queryStr);

    return
'OK';
}