Habbo Dreams Forum Index
Habbo Dreams
Tes rêves deviennent réalités
 
Habbo Dreams Forum IndexFAQSearchRegisterLog in

:: Faire fonctionner les badges dans un retro V.26 ::

 
Post new topic   Reply to topic    Habbo Dreams Forum Index -> Discutions & astuces -> Astuces.
Previous topic :: Next topic  
Author Message
Admin
Administrateur ™
Administrateur ™

Offline

Joined: 15 Jan 2010
Posts: 226
Localisation: Cité alma
Masculin Bélier (21mar-19avr)

PostPosted: Mon 1 Feb - 15:42 (2010)    Post subject: Faire fonctionner les badges dans un retro V.26 Reply with quote

Bonjour ou bonsoir,
Je vais vous montrer comment faire fonctionner les badges dans un V.26.

1) Allez sur "http://localhost/phpmyadmin"
2) Allez sur votre base de données (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 / ménage / et Ouvrez le fichier" badgetool.php "avec le bloc-note
6) supprimez tout le contenue de "badgetool.php"
7) mettez ce code à la place:

Code:


<?php
/*===================================================+
|| # xSkatexCMS - Website and Content Management System
|+===================================================+
|| # Copyright © 2010 xSkatex. All rights reserved.
|| # http://xSkatex.tk
|+===================================================+
|| # xSkatexCMS 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');
?>
<table cellpadding='0' cellspacing='8' width='100%' id='tablewrap'>
<tr> <td width='22%' valign='top' id='leftblock'>


<!-- LEFT CONTEXT SENSITIVE MENU -->
<?php @include('usermenu.php'); ?>
<!-- / LEFT CONTEXT SENSITIVE MENU -->


</td>
<td width='78%' valign='top' id='rightblock'>

<!-- RIGHT CONTENT BLOCK -->

<?php if(isset($msg)){ ?>
<strong><?php echo $msg; ?>
</strong><?php } ?>

<form action='index.php?p=badgetool&do=something' method='post' name='theAdminForm' id='theAdminForm'>



Badge Manager


<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'><strong>Username</strong>
The username of who this action will apply to.
</td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='name' value="" size='30' class='textinput'></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><strong>Badgecode</strong>
The bage code, eg. 'ADM' or 'XM8'.
</td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='badge' value="" size='30' class='textinput'></td>
</tr>

<tr>
<tr><td align='center' class='tablesubheader' colspan='2'><input type='submit' value='Give badge' class='realbutton' accesskey='s'></td></tr>
</form></table>




<!-- / RIGHT CONTENT BLOCK -->
</td></tr>
</table>

<!-- / OUTERDIV -->



<?php
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>



Back to top
Visit poster’s website MSN
Publicité






PostPosted: Mon 1 Feb - 15:42 (2010)    Post subject: Publicité

PublicitéSupprimer les publicités ?
Back to top
-.M.i.a.m.i.-


Offline

Joined: 11 Apr 2010
Posts: 6
Localisation: Devant l'ordinateur.
Masculin Scorpion (23oct-21nov) 龍 Dragon

PostPosted: Sun 11 Apr - 14:13 (2010)    Post subject: Faire fonctionner les badges dans un retro V.26 Reply with quote

Salut Very Happy

Back to top
Admin
Administrateur ™
Administrateur ™

Offline

Joined: 15 Jan 2010
Posts: 226
Localisation: Cité alma
Masculin Bélier (21mar-19avr)

PostPosted: Sun 11 Apr - 14:15 (2010)    Post subject: Faire fonctionner les badges dans un retro V.26 Reply with quote

Salut ^^

Back to top
Visit poster’s website MSN
haris1471
Modérateur
Modérateur

Offline

Joined: 26 May 2010
Posts: 51
Localisation: Devant mon ordi XD
Masculin Taureau (20avr-20mai) 虎 Tigre

PostPosted: Wed 26 May - 15:26 (2010)    Post subject: Faire fonctionner les badges dans un retro V.26 Reply with quote

Nicolas je veut etre modérateurs ilfaut faire un cv ?

Back to top
Admin
Administrateur ™
Administrateur ™

Offline

Joined: 15 Jan 2010
Posts: 226
Localisation: Cité alma
Masculin Bélier (21mar-19avr)

PostPosted: Sun 30 May - 22:09 (2010)    Post subject: Faire fonctionner les badges dans un retro V.26 Reply with quote

Oui il faut faire un cv ou être souvent présent sur le forum

Back to top
Visit poster’s website MSN
Display posts from previous:   
Post new topic   Reply to topic    Habbo Dreams Forum Index -> Discutions & astuces -> Astuces. All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  

Index | Administration Panel | Create a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
Thème By xSkatex.
Merci de respecter le travaille du créateur.