[v1p][progessmod] promote user star badge account from guest to v
1 Attachment(s)
Snippets:
// promote user account from guest to v1p if userid=2
Code:
$updateflush = mysqli_query($qlconnect, "UPDATE users SET star_badge='vip' WHERE id='2' and star_badge='guest' limit 1"); // upgrade from guest badge to vip badge
return $updateflush; // updates status on badges depends how you conf your files line.
SQL
Code:
alter table users add star_badge enum('guest','newbie','sceneuser','poweruser','donor','ircdonor', 'upload','moderator','admin', 'banned') not null default 'newbie';
Bump:
/* everytime you refresh hopefully you obtain 00.05 auto bonus ontop of your current mybonus coins */
Code:
$updateflush = SQL_Query_exec("UPDATE users SET coins = “.$CURUSER[“coins”].”+0.05 WHERE id = ".$CURUSER["id"]."");
return $updateflush;
SQL:
Code:
--sql_file_to_obtain---
alter table users add coins decimals(8,2) not null default '10.00';
create a autoCleanup.php script so start a empty PHP script add above code an insert include('autoCleanup.php'); inside of takelogin for example or index.php other then include/cleanup.php we think
Blow zip is ranks taken from mybb just edit or create userdetails($badges);
Bump: Updated more features added class ranks colours next got an auto-generated IDs + usernames + emails + passwords function will need to overlook this code as it is still a mod in progress so though that have time to look here you go:
Code:
/*
* @package AJAX_Chat
* @author Sebastian Tschan
* @copyright (c) Sebastian Tschan
* @license Modified MIT License
* @link https://blueimp.net/ajax/
*/
// Suppress errors:
ini_set('display_errors', 0);
Path to the chat directory:
define('AJAX_CHAT_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
#!db_connect(); above just modded to run as mysql_query($dbconnection, 'select * from users where userid='?' set userid='44'); instead.
//>> now lets do a security for class so we can move within chatroom or page.
require(AJAX_CHAT_PATH.'include'.DIRECTORY_SEPARATOR.'class_check.php'); // so we can add,edit,remove +more
//require(AJAX_CHAT_PATH.'functions'.DIRECTORY_SEPARATOR.'user_function.php'); // class_star_badge,class_rank_color, +more
require(AJAX_CHAT_PATH.'functions'.DIRECTORY_SEPARATOR.'bbcode_functions.php'); // [bbcode]hello[/bbcode]
logged_in();
$ip=$_server["remote_addr"];
write_log("chat system, user is currently located at $ip");
site_header("Chat", false);
// /*if($row[0] == '6' || '15'){*/
//$userID = '01b2'; # userids for chat hack/mod to work. it should randomize userid with username every post shared.
//echo $userID;
//echo $_SERVER["REMOTE_ADDR"];
// who knows sceneaccess.org!+?
//echo $username = 'bob';
//let's begin
// AJAX Chat users parameters:
$users=array();
define('AJAX_CHAT_BANNED', 0); // demoted to banned status until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_GUEST', 1); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_CHATBOT', 2); // sys_bot account until autosys demotes or promotes account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_USER', 3); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_POWER_USER', 4); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_TRUSTEE', 6); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_UPLOADER', 6); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_VIPDONOR', 5); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_MODERATOR', 6); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_SUPER_MODERATOR', 7); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_ADMINISTRATOR', 8); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
define('AJAX_CHAT_SUPER_ADMINISTRATOR', 9); // default account until autosys promotes users account to user+ when criteria is met. - 1.0 maintained, 10 forum post, obtained 1 week status since activation, ip_chec etc. my need to edit autoCleanup to tweak class status
$users['userID'] = '$autotoken'; # autotoken should generate a userids for chat to work. so example> id=1 already taken so it should generate another number simular to 2 so in other words id= would now become 2 so it should work with every post shared. 2 become 2++ means 2 becomes 3,4,5,6 etc. if doesn't already exist inside our database.
//$users[0]['password'] = null;
//$users[0]['channels'] = array(0);
//hackitwithdescretion[=
//>>msg we want sent out on autoload:
/*'if you would like to become a team member just send a pm to xo.',*/
//so shall we begin...sql injection if needed. so lets begin
//$ifmsg = 'if you would like to become a team member just send a pm to xo.'; // botmsg to be relayed out to all within chat.
sql_query('UPDATE shoutbox
SET text = '.sqlesc($text).', text_parsed = '.sqlesc($text_parsed).'
WHERE id ='.sqlesc($_POST['id']));
unset ($text, $text_parsed);
}
// Power User+ Shout Edit --//
//-- Correction By Fireknight Added In theme_function.php --//
if (isset($_POST['text']) && (isset($_POST['user']) == $CURUSER['id']) && ($CURUSER['class'] >= UC_USER && $CURUSER['class'] < UC_SITE_EDITOR) && is_valid_id($_POST['id']))
{
$text = trim($_POST['text']);
$text_parsed = format_comment($text);
sql_query('UPDATE shoutbox
SET text = '.sqlesc($text).', text_parsed = '.sqlesc($text_parsed).'
WHERE userid='.sqlesc($_POST['user']).'
AND id='.sqlesc($_POST['id']));
$insert_bot_message = 'if you would like to become a team member just send a pm to xo.'; // botmsg to be relayed out to all within chat.
$que '".get_date_time()."'ry = "INSERT INTO shoutbox (msgid, userid, username, date, text, message, botmsg) VALUES (NULL, '$userName, '".get_date_time()."', $defaultmessage', 'you would like to become a team member just send a pm to xo', '$insert_bot_message')";
# should have by now inserted information required to get our bot system to execute our message.
#lets try now;
SQL_Query_exec($query);
/*
while($ifmsg > 0 ){
$htmlout = "";
print $htmlout;
} */
$username2 = $users[1]['userName'];
echo $username2; // to check if works
$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, '$username2','if you would like to become a team member just send a pm to xo.', '".get_date_time()."','$userID')";
SQL_Query_exec($query);