PHP Classes

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

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

Contents

Class file image Download
<?php

function bb_account_save_privacy()
{
   
$cookie_username=isset(Configs::$_['user_data']['user_id'])?Configs::$_['user_data']['user_id']:'';

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

   
$allow_view_profile=addslashes(getPost('allow_view_profile',''));
   
$allow_other_write_on_profile=addslashes(getPost('allow_other_write_on_profile',''));
   
$allow_receive_message=addslashes(getPost('allow_receive_message',''));
   
$is_show_online_status=addslashes(getPost('is_show_online_status',''));
   
$is_show_activites=addslashes(getPost('is_show_activites',''));
   
$is_show_birthday=addslashes(getPost('is_show_birthday',''));

   
$db=new Database();

   
$queryStr="update bb_user_data set ";
   
$queryStr.=" allow_view_profile='".$allow_view_profile."',allow_other_write_on_profile='".$allow_other_write_on_profile."', ";
   
$queryStr.=" allow_receive_message='".$allow_receive_message."',is_show_online_status='".$is_show_online_status."',is_show_activites='".$is_show_activites."',is_show_birthday='".$is_show_birthday."'";
   
$queryStr.=" where user_id='".Configs::$_['user_data']['user_id']."'; ";

   
$db->nonquery($queryStr);

    return
'OK';
}