Rechercher
Derniers sujets
Tuto pour faire fonctionner tout les badges Holo
Page 1 sur 1
Tuto pour faire fonctionner tout les badges Holo
1:allez sur "http://localhost/phpmyadmin"
2:allez sur votre database (holodb)
3:en haut il y a un bouton avec marqué "sql"
4:dans la grande case mettez le code suivant:
DROP TABLE `users_badges`;
CREATE TABLE IF NOT EXISTS `users_badges` (
`userid` int(15) NOT NULL,
`badgeid` varchar(5) collate latin1_general_ci NOT NULL default '',
`iscurrent` enum('0','1') collate latin1_general_ci NOT NULL default '0',
`slotid` varchar(255) collate latin1_general_ci NOT NULL default '0',
`badge` varchar(255) collate latin1_general_ci default NULL,
PRIMARY KEY (`userid`,`badgeid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
5:allez dans "C:/xampp/htdoc/housekeeping/ et ouvrez le fichier "badgetool.php" avec le bloc-note
6:supprimez tout le contenue de "badgetool.php"
7:mettez ce code a la place:
/*===================================================+
|| # HoloCMS - Website and Content Management System
|+===================================================+
|| # Copyright 2008 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|+===================================================+
|| # HoloCMS is provided "as is" and comes without
|| # warrenty of any kind. HoloCMS is free software!
|| # Thanks to Wil & Pure for Release of the Badge System
|+===================================================*/
require_once('../core.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }
if(function_exists(SendMUSData) !== true){ include('../includes/mus.php'); }
$pagename = "User Badge Management";
if(isset($_POST['badge'])){
$badge = $_POST['badge'];
$key = addslashes($_POST['name']);
$check = mysql_query("SELECT id FROM users WHERE name = '".$key."' LIMIT 1") or die(mysql_error());
$exists = mysql_num_rows($check);
if($exists > 0){
if(strlen($badge) > 2 && strlen($badge) < 5){
$row = mysql_fetch_assoc($check);
$userid = $row['id'];
$check = mysql_query("SELECT * FROM users_badges WHERE userid = '".$userid."' AND badgeid = '".$badge."' LIMIT 1") or die(mysql_error());
$already_has_badge = mysql_num_rows($check);
if($already_has_badge < 1){
mysql_query("UPDATE users SET badge_status = '1' WHERE name = '".$key."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO users_badges (userid,badgeid,iscurrent,badge) VALUES ('".$userid."','".$badge."','1','".$badge."')") or die(mysql_error());
$msg = "Gave the user this badge (" . $badge . ") and set it as current badge successfully.";
mysql_query("INSERT INTO system_stafflog (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Gave user ".$badge." badge','badgetool.php','".$my_id."','".$userid."','".$date_full."')") or die(mysql_error());
@SendMusData('UPRS' . $userid);
} else {
mysql_query("UPDATE users_badges SET iscurrent = '0' WHERE userid = '" . $userid . "'");
mysql_query("UPDATE users_badges SET iscurrent = '1' WHERE badgeid = '" . $badge . "' AND userid = '" . $userid . "' LIMIT 1") or die(mysql_error());
$msg = "This user already has this badge; the badge (" . $badge . ") has been set as the user's current badge successfully.";
mysql_query("INSERT INTO system_stafflog (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Set current badge to ".$badge."','badgetool.php','".$my_id."','".$userid."','".$date_full."')") or die(mysql_error());
@SendMusData('UPRS' . $userid);
}
} else {
$msg = "Invalid badge. Badge codes may only be 3-4 characters long.";
}
} else {
$msg = "An user with this name/id does not exist!";
}
}
@include('subheader.php');
@include('header.php');
?>
Badge Manager
Username
The username of who this action will apply to.
Badgecode
The bage code, eg. 'ADM' or 'XM8'.
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>
2:allez sur votre database (holodb)
3:en haut il y a un bouton avec marqué "sql"
4:dans la grande case mettez le code suivant:
DROP TABLE `users_badges`;
CREATE TABLE IF NOT EXISTS `users_badges` (
`userid` int(15) NOT NULL,
`badgeid` varchar(5) collate latin1_general_ci NOT NULL default '',
`iscurrent` enum('0','1') collate latin1_general_ci NOT NULL default '0',
`slotid` varchar(255) collate latin1_general_ci NOT NULL default '0',
`badge` varchar(255) collate latin1_general_ci default NULL,
PRIMARY KEY (`userid`,`badgeid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
5:allez dans "C:/xampp/htdoc/housekeeping/ et ouvrez le fichier "badgetool.php" avec le bloc-note
6:supprimez tout le contenue de "badgetool.php"
7:mettez ce code a la place:
/*===================================================+
|| # HoloCMS - Website and Content Management System
|+===================================================+
|| # Copyright 2008 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|+===================================================+
|| # HoloCMS is provided "as is" and comes without
|| # warrenty of any kind. HoloCMS is free software!
|| # Thanks to Wil & Pure for Release of the Badge System
|+===================================================*/
require_once('../core.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }
if(function_exists(SendMUSData) !== true){ include('../includes/mus.php'); }
$pagename = "User Badge Management";
if(isset($_POST['badge'])){
$badge = $_POST['badge'];
$key = addslashes($_POST['name']);
$check = mysql_query("SELECT id FROM users WHERE name = '".$key."' LIMIT 1") or die(mysql_error());
$exists = mysql_num_rows($check);
if($exists > 0){
if(strlen($badge) > 2 && strlen($badge) < 5){
$row = mysql_fetch_assoc($check);
$userid = $row['id'];
$check = mysql_query("SELECT * FROM users_badges WHERE userid = '".$userid."' AND badgeid = '".$badge."' LIMIT 1") or die(mysql_error());
$already_has_badge = mysql_num_rows($check);
if($already_has_badge < 1){
mysql_query("UPDATE users SET badge_status = '1' WHERE name = '".$key."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO users_badges (userid,badgeid,iscurrent,badge) VALUES ('".$userid."','".$badge."','1','".$badge."')") or die(mysql_error());
$msg = "Gave the user this badge (" . $badge . ") and set it as current badge successfully.";
mysql_query("INSERT INTO system_stafflog (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Gave user ".$badge." badge','badgetool.php','".$my_id."','".$userid."','".$date_full."')") or die(mysql_error());
@SendMusData('UPRS' . $userid);
} else {
mysql_query("UPDATE users_badges SET iscurrent = '0' WHERE userid = '" . $userid . "'");
mysql_query("UPDATE users_badges SET iscurrent = '1' WHERE badgeid = '" . $badge . "' AND userid = '" . $userid . "' LIMIT 1") or die(mysql_error());
$msg = "This user already has this badge; the badge (" . $badge . ") has been set as the user's current badge successfully.";
mysql_query("INSERT INTO system_stafflog (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','Set current badge to ".$badge."','badgetool.php','".$my_id."','".$userid."','".$date_full."')") or die(mysql_error());
@SendMusData('UPRS' . $userid);
}
} else {
$msg = "Invalid badge. Badge codes may only be 3-4 characters long.";
}
} else {
$msg = "An user with this name/id does not exist!";
}
}
@include('subheader.php');
@include('header.php');
?>
Badge Manager
Username
The username of who this action will apply to.
Badgecode
The bage code, eg. 'ADM' or 'XM8'.
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>
unedent- VIP
- Messages : 10
Habbox : 2147483647
Date d'inscription : 30/12/2009
Age : 34
Localisation : Ordi
Sujets similaires
» Tuto pour avoir tout les espaces publics (Holo)
» Tuto pour avoir tout les espaces publics (Holo)
» Voici Un tuto Pour Créer Un Retro Holo V26 Sans Hamachi Mais En No-IP !
» Mobi scifi [ holo et non holo
» repack WX [Holo&v.18
» Tuto pour avoir tout les espaces publics (Holo)
» Voici Un tuto Pour Créer Un Retro Holo V26 Sans Hamachi Mais En No-IP !
» Mobi scifi [ holo et non holo
» repack WX [Holo&v.18
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
Ven 19 Mar - 20:49 par lmodo-gabboworld
» NOUVEAU CREATEUR
Sam 27 Fév - 11:30 par jabran
» L'equipe Hebodo.net
Sam 27 Fév - 11:20 par jabran
» Nouvelle version .?
Sam 16 Jan - 13:29 par Nokia
» Recrutement close
Sam 16 Jan - 11:55 par jabran
» Un Nouveau Administrateur ?
Ven 15 Jan - 19:45 par jabran
» Le forum évolue ?!
Lun 11 Jan - 19:30 par jabran
» un retro va ouvrire
Jeu 31 Déc - 12:58 par jabran
» [Layout] Index v39 [Théme]
Jeu 31 Déc - 12:47 par xMusiic