[CMS - Xoa v2/Obbo EMU] Profile Page/:Purchase command

Results 1 to 4 of 4
  1. #1
    Apprentice KurtBrown is offline
    MemberRank
    Jul 2012 Join Date
    13Posts

    [CMS - Xoa v2/Obbo EMU] Profile Page/:Purchase command

    Hello,

    I am currently having a issue with my EMU & CMS.

    My EMU doesn't have the :purchase command for changing clothes within its coding, can anyone help me with that? I've tried adding a profile page that changes clothes but you can change clothes but then it doesnt save. Code for that is below;

    Thanks in advance,
    Kurt

    require_once('./includes/core.php');
    require_once('./includes/session.php');
    $data = new profile_sql;
    $lang->addLocale("home.profile");

    $page['id'] = "profile";
    $page['name'] = $lang->loc['pagename.profile'];
    $page['bodyid'] = "profile";
    $page['cat'] = "home";

    if(isset($_GET['tab'])){
    if($_GET['tab'] < 1 || $_GET['tab'] > 5 ){
    header("Location: ".PATH."/profile?tab=1"); exit;
    }else{
    $tab = $_GET['tab'];
    }
    }elseif(isset($_POST['tab'])){
    if($_POST['tab'] < 1 || $_POST['tab'] > 5 ){
    header("Location: ".PATH."/profile?tab=1"); exit;
    }else{
    $tab = $_POST['tab'];
    }
    }else{
    $tab = "1";
    }

    switch($tab){
    case "1":
    $lang->addLocale("profile.tab1");
    if(isset($_POST['figureData'])){
    $new_figure = $input->FilterText($_POST['figureData']);
    $new_gender = $input->FilterText($_POST['newGender']);
    if($new_gender !== "M" && $new_gender !== "F"){
    $result = $lang->loc['error.general'];
    $error = "1";
    } else {
    $check = new HoloFigureCheck($new_figure,$new_gender,$user->IsHCMember("self"));
    if($check->error > 0){
    $result = $lang->loc['error.general'];
    $error = "1";
    } else {
    $data->update1($new_figure,$new_gender,$user->id);
    $user->refresh();
    $result = $lang->loc['success.profile'];
    $mylook1 = $input->FilterText($_POST['figureData']);
    $mysex1 = $input->FilterText($_POST['newGender']);
    @SendMUSData('UPRA' . $user->id);
    }
    }
    } else {
    $mylook1 = $user->user("figure");
    $mysex1 = $user->user("sex");
    }

    $slot1 = $db->query("SELECT figure,gender FROM ".PREFIX."wardrobe WHERE slotid = '1' AND userid = '".$user->id."' LIMIT 1");
    $slot1 = $db->fetch_assoc($slot1);
    if(!empty($slot1['figure'])){ $slot1_url = $user->avatarURL($slot1['figure'],"s,4,4,sml,1,0"); }
    $slot2 = $db->query("SELECT figure,gender FROM ".PREFIX."wardrobe WHERE slotid = '2' AND userid = '".$user->id."' LIMIT 1");
    $slot2 = $db->fetch_assoc($slot2);
    if(!empty($slot2['figure'])){ $slot2_url = $user->avatarURL($slot2['figure'],"s,4,4,sml,1,0"); }
    $slot3 = $db->query("SELECT figure,gender FROM ".PREFIX."wardrobe WHERE slotid = '3' AND userid = '".$user->id."' LIMIT 1");
    $slot3 = $db->fetch_assoc($slot3);
    if(!empty($slot3['figure'])){ $slot3_url = $user->avatarURL($slot3['figure'],"s,4,4,sml,1,0"); }
    $slot4 = $db->query("SELECT figure,gender FROM ".PREFIX."wardrobe WHERE slotid = '4' AND userid = '".$user->id."' LIMIT 1");
    $slot4 = $db->fetch_assoc($slot4);
    if(!empty($slot4['figure'])){ $slot4_url = $user->avatarURL($slot4['figure'],"s,4,4,sml,1,0"); }
    $slot5 = $db->query("SELECT figure,gender FROM ".PREFIX."wardrobe WHERE slotid = '5' AND userid = '".$user->id."' LIMIT 1");
    $slot5 = $db->fetch_assoc($slot5);
    if(!empty($slot5['figure'])){ $slot5_url = $user->avatarURL($slot5['figure'],"s,4,4,sml,1,0"); }

    break;

    case "3":
    $lang->addLocale("profile.tab3");
    if(isset($_POST['email'])){
    if(($_SESSION['register-captcha-bubble'] == $_POST['captcha'] && !empty($_SESSION['register-captcha-bubble'])) || $settings->find("site_capcha") == "0"){
    unset($_SESSION['register-captcha-bubble']);
    $pass1 = $_POST['password'];
    $pass1_hash = $input->HoloHash($pass1, $user->name);
    $day1 = $_POST['day'];
    $month1 = $_POST['month'];
    $year1 = $_POST['year'];
    $formatted_dob = "".$day1."-".$month1."-".$year1."";
    $mail1 = $input->FilterText($_POST['email']);
    if($_POST['directemail'] == "on"){ $newsletter = "checked=\"checked\""; }else{ $newsletter = ""; }
    if($pass1_hash == $user->user("password") && $formatted_dob == $user->user("birth")){
    $email_check = preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $mail1);
    if($email_check == "1"){
    if($_POST['directemail'] == "on"){ $newsletter = "1"; }else{ $newsletter = "0"; }
    $serverdb->query("UPDATE ".PREFIX."users SET newsletter = '".$newsletter."', email_verified = '-1' WHERE id = '".$user->id."' LIMIT 1");
    $sendemail = true;
    $result = $lang->loc['email.changed']." ".$mail1;
    } else {
    $result = $lang->loc['invalid.email'];
    $error = "1";
    }
    } else {
    $result = $lang->loc['record.not.match'];
    $error = "1";
    }
    }else{
    $result = $lang->loc['invalid.captcha'];
    $error = "1";
    }
    }elseif(isset($_POST['resendconfirmation'])){
    $mail1 = $user->user("email");
    $sendemail = true;
    $result = $lang->loc['email.verify.sent'];
    }else{
    if($settings->find("email_verify_enabled") == 1 && $settings->find("email_verify_reward") > 0){ $email_settings['reward_text'] = " ".$lang->loc['email.reward.text']."<strong>".$settings->find("email_verify_reward")."</strong> ".$lang->loc['credits']; }
    $mail1 = $user->user("email");
    if($user->user("newsletter") == "1"){ $email_settings['newsletter'] = "checked=\"checked\""; }else{ $email_settings['newsletter'] = ""; }
    }
    if($settings->find("email_verify_enabled") == 1 && $sendemail == true){
    $hash = "";
    $length = 8;
    $possible = "0123456789qwertyuiopasdfghjkzxcvbnm";
    $i = 0;
    while ($i < $length) {
    $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);
    if (!strstr($hash, $char)) {
    $hash .= $char;
    $i++;
    }
    }
    $hash = sha1($hash);
    $num = $key;
    $sql = $db->query("SELECT * FROM ".PREFIX."verify WHERE id = '".$user->id."' LIMIT 1");
    if($db->num_rows($sql) > 0){
    $sql1 = "UPDATE ".PREFIX."verify SET key_hash = '".$hash."', email = '".$mail1."' WHERE id = '".$user->id."' LIMIT 1";
    }else{
    $sql1 = "INSERT INTO ".PREFIX."verify (id,email,key_hash) VALUES ('".$user->id."','".$mail1.",'".$hash."')";
    }
    $db->query($sql1);

    $lang->addLocale("email.confirmationemail");
    if($settings->find("email_verify_reward") != "0"){ $reward_text = $lang->loc['email.reward']." ".$settings->find("email_verify_reward")." ".$lang->loc['credits']; }else{ $reward_text = ""; }
    $subject = $lang->loc['email.subject']." ".SHORTNAME;
    $to = $mail1;
    $html =
    '<h1 style="font-size: 16px">'.$lang->loc['email.verify.1'].'</h1>

    <p>
    '.$reward_text.'
    '.$lang->loc['email.verify.2'].' <a href="'.PATH.'/email?key='.$hash.'">'.$lang->loc['email.verify.2.b'].'</a>
    </p>

    <p>
    '.$lang->loc['email.verify.3'].'
    </p>

    <blockquote>
    <p>
    <b>'.$lang->loc['email.verify.4'].'</b> '.$user->name.'<br>
    <b>'.$lang->loc['email.verify.5'].'</b> '.$user->user("birth").'
    </p>
    </blockquote>

    <p>
    '.$lang->loc['email.verify.6'].'
    </p>

    <p>'.$lang->loc['email.verify.7'] .'<br><br>
    '.$lang->loc['email.verify.8'].'<p>
    '.PATH.'/</p>

    <p>
    '.$lang->loc['email.verify.9'].' <a href="'.PATH.'/email?remove='.$hash.'">'.$lang->loc['email.verify.9.b'].'</a>.
    </p>

    <p>
    '.$lang->loc['email.verify.11'].'<a href="'.PATH.'/help">'.$lang->loc['email.verify.12'].'</a>.
    </p>';
    $mailer = new HoloMail;
    $mailer->sendSimpleMessage($to,$subject,$html);
    }else{
    $serverdb->query("UPDATE ".PREFIX."users SET email_verified = '1' WHERE id = '".$row[0]."' LIMIT 1");
    }
    break;
    case "4":
    $lang->addLocale("profile.tab4");
    if(isset($_POST['currentpassword'])){
    if(($_SESSION['register-captcha-bubble'] == $_POST['captcha'] && !empty($_SESSION['register-captcha-bubble'])) || $settings->find("site_capcha") == "0"){
    unset($_SESSION['register-captcha-bubble']);
    $pass1 = $_POST['currentpassword'];
    $pass1_hash = $input->HoloHash($pass1, $user->name);
    $day1 = $_POST['day'];
    $month1 = $_POST['month'];
    $year1 = $_POST['year'];
    $formatted_dob = "".$day1."-".$month1."-".$year1."";
    $newpass = $_POST['newpassword'];
    $newpass_hash = $input->HoloHash($newpass, $user->name);
    $newpass_conf = $_POST['newpasswordconfirm'];
    if($pass1_hash == $user->user("password") && $formatted_dob == $user->user("birth")){
    if($newpass == $newpass_conf){
    if(strlen($newpass) < 6){
    $result = $lang->loc['error.password.1'];
    $error = "1";
    } else {
    if(strlen($newpass) > 25){
    $result = $lang->loc['error.password.2'];
    $error = "1";
    } else {
    $data->update4($newpass_hash,$user->id);
    $user->refresh();
    $result = $lang->loc['change.password.success'];
    }
    }
    } else {
    $result = $lang->loc['error.password.3'];
    $error = "1";
    }
    } else {
    $result = $lang->loc['record.not.match'];
    $error = "1";
    }
    }else{
    $result = $lang->loc['invalid.captcha'];
    $error = "1";
    }
    }
    }

    require_once('./templates/community_header.php');

    ?>

    <div id="container">
    <div id="content" style="position: relative" class="clearfix">
    <div>
    <div class="content">
    <div class="habblet-container" style="float:left; width:210px;">
    <div class="cbb settings">

    <h2 class="title"><span style="float: left; background: url(../images/background.gif)"><?php echo $lang->loc['account.settions']; ?></h2></span>
    <div class="box-content">
    <div id="settingsNavigation">
    <ul>
    <?php
    if($tab == "1"){
    echo "<li class=\"selected\">".$lang->loc['my.clothing']."
    </li>";
    } else {
    echo "<li><a href=\"".PATH."/profile?tab=1\">".$lang->loc['my.clothing']."</a>
    </li>";
    }
    if($tab == "3"){
    echo "<li class=\"selected\">".$lang->loc['my.email']."
    </li>";
    } else {
    echo "<li><a href=\"".PATH."/profile?tab=3\">".$lang->loc['my.email']."</a>
    </li>";
    }
    if($tab == "4"){
    echo "<li class=\"selected\">".$lang->loc['my.password']."
    </li>";
    } else {
    echo "<li><a href=\"".PATH."/profile?tab=4\">".$lang->loc['my.password']."</a>
    </li>";

    }
    ?>
    </ul>
    </div>
    </div></div>
    </div>

    <?php switch($tab){
    case "1": ?>
    <div class="habblet-container" style="float:left; width: 560px;">
    <div class="cbb clearfix settings">

    <h2 class="title"><span style="background: url(../images/background.gif)"><?php echo $lang->loc['change.looks']; ?></span></h2>
    <div class="box-content">

    <?php
    if(!empty($result)){
    if($error == "1"){
    echo "<div class=\"rounded rounded-red\">";
    } else {
    echo "<div class=\"rounded rounded-green\">";
    }
    echo "".$result."<br />
    </div><br />";
    }
    ?>
    <div>&nbsp;</div>

    <div id="settings-editor">
    <?php echo $lang->loc['no.flash']; ?>: <a target="_blank" href="http://www.adobe.com/go/getflashplayer">http://www.adobe.com/go/getflashplayer</a>
    </div>

    <?php if($user->IsHCMember("self")){ ?><div id="settings-wardrobe" style="display: none">
    <ol id="wardrobe-slots">
    <li>
    <p id="wardrobe-slot-1" style="background-image: url(<?php echo $slot1_url; ?>)">
    <span id="wardrobe-store-1" class="wardrobe-store"></span>
    <span id="wardrobe-dress-1" class="wardrobe-dress"></span>
    </p>
    </li>
    <li>
    <p id="wardrobe-slot-2" style="background-image: url(<?php echo $slot2_url; ?>)">
    <span id="wardrobe-store-2" class="wardrobe-store"></span>
    <span id="wardrobe-dress-2" class="wardrobe-dress"></span>
    </p>
    </li>
    <li>
    <p id="wardrobe-slot-3" style="background-image: url(<?php echo $slot3_url; ?>)">
    <span id="wardrobe-store-3" class="wardrobe-store"></span>
    <span id="wardrobe-dress-3" class="wardrobe-dress"></span>
    </p>
    </li>
    <li>
    <p id="wardrobe-slot-4" style="background-image: url(<?php echo $slot4_url; ?>)">
    <span id="wardrobe-store-4" class="wardrobe-store"></span>
    <span id="wardrobe-dress-4" class="wardrobe-dress"></span>
    </p>
    </li>
    <li>
    <p id="wardrobe-slot-5" style="background-image: url(<?php echo $slot5_url; ?>)">
    <span id="wardrobe-store-5" class="wardrobe-store"></span>
    <span id="wardrobe-dress-5" class="wardrobe-dress"></span>
    </p>
    </li>
    </ol>

    <script type="text/javascript">
    <?php if(!empty($slot1['figure'])){ ?>
    Wardrobe.add(1, "<?php echo $slot1['figure']; ?>", "<?php echo $slot1['gender']; ?>", true);
    $("wardrobe-dress-" + 1).show();
    <?php } ?>
    <?php if(!empty($slot2['figure'])){ ?>
    Wardrobe.add(2, "<?php echo $slot2['figure']; ?>", "<?php echo $slot2['gender']; ?>", true);
    $("wardrobe-dress-" + 2).show();
    <?php } ?>
    <?php if(!empty($slot3['figure'])){ ?>
    Wardrobe.add(3, "<?php echo $slot3['figure']; ?>", "<?php echo $slot3['gender']; ?>", true);
    $("wardrobe-dress-" + 3).show();
    <?php } ?>
    <?php if(!empty($slot4['figure'])){ ?>
    Wardrobe.add(4, "<?php echo $slot4['figure']; ?>", "<?php echo $slot4['gender']; ?>", true);
    $("wardrobe-dress-" + 4).show();
    <?php } ?>
    <?php if(!empty($slot5['figure'])){ ?>
    Wardrobe.add(5, "<?php echo $slot5['figure']; ?>", "<?php echo $slot5['gender']; ?>", true);
    $("wardrobe-dress-" + 5).show();
    <?php } ?>
    L10N.put("profile.figure.wardrobe_replace.title", "<?php echo $lang->loc['replace?']; ?>");
    L10N.put("profile.figure.wardrobe_replace.dialog", "<p\>\n<?php echo $lang->loc['replace.old.wardrobe'] ?>\n</p\>\n\n<p\>\n<a href=\"#\" class=\"new-button\" id=\"wardrobe-replace-cancel\"\><b\><?php echo $lang->loc['cancel']; ?></b\><i\></i\></a\>\n<a href=\"#\" class=\"new-button\" id=\"wardrobe-replace-ok\"\><b\><?php echo $lang->loc['ok']; ?></b\><i\></i\></a\>\n</p\>\n\n<div class=\"clear\"\></div\>\n");
    L10N.put("profile.figure.wardrobe_invalid_data", "<?php echo $lang->loc['cannot.save.wardrobe']; ?>");
    L10N.put("profile.figure.wardrobe_instructions", "<?php echo $lang->loc['wardrobe.error']; ?>");
    Wardrobe.init();
    </script>
    </div><?php } ?>

    <div id="settings-hc" style="display: none">
    <div class="rounded rounded-hcred clearfix">
    <a href="<?php echo PATH; ?>/club" id="settings-hc-logo"></a>
    <?php echo $lang->loc['marked.with.hc.symbol'][0]; ?> <img src="<?php echo PATH; ?>/web-gallery/v2/images/habboclub/hc_mini.png" /> <?php echo $lang->loc['marked.with.hc.symbol'][1]; ?> <a href="<?php echo PATH; ?>/club"><?php echo $lang->loc['join.now']; ?></a>
    </div>
    </div>

    <div id="settings-oldfigure" style="display: none">
    <div class="rounded rounded-lightbrown clearfix">
    <?php echo $lang->loc['things.not.selectable.anymore']; ?>
    </div>
    </div>

    <form method="post" action="<?php echo PATH; ?>/profile/characterupdate" id="settings-form" style="display: none">
    <input type="hidden" name="tab" value="1" />
    <input type="hidden" name="__app_key" value="PHPRetro" />
    <input type="hidden" name="figureData" id="settings-figure" value="<?php echo $mylook1; ?>" />
    <input type="hidden" name="newGender" id="settings-gender" value="<?php echo $mysex1; ?>" />
    <input type="hidden" name="editorState" id="settings-state" value="" />
    <a href="#" id="settings-submit" class="new-button disabled-button"><b><?php echo $lang->loc['save.changes']; ?></b><i></i></a>

    <script type="text/javascript" language="JavaScript">
    var swfobj = new SWFObject("<?php echo PATH; ?>/flash/HabboRegistration.swf", "habboreg", "435", "400", "8");
    swfobj.addParam("base", "<?php echo PATH; ?>/flash/");
    swfobj.addParam("wmode", "opaque");
    swfobj.addParam("AllowScriptAccess", "always");
    swfobj.addVariable("figuredata_url", "<?php echo PATH; ?>/xml/figuredata.xml");
    swfobj.addVariable("draworder_url", "<?php echo PATH; ?>/xml/draworder.xml");
    swfobj.addVariable("localization_url", "<?php echo PATH; ?>/xml/figure_editor.xml");
    swfobj.addVariable("figure", "<?php echo $mylook1; ?>");
    swfobj.addVariable("gender", "<?php echo $mysex1; ?>");

    swfobj.addVariable("showClubSelections", "1");
    <?php if( $user->IsHCMember("self") ){ ?>swfobj.addVariable("userHasClub", "1");<?php } ?>

    if (deconcept.SWFObjectUtil.getPlayerVersion()["major"] >= 8) {
    <?php if( !$user->IsHCMember("self")){ ?>$("settings-editor").setStyle({ textAlign: "center"});<?php } ?>
    swfobj.write("settings-editor");
    $("settings-form").show();
    <?php if( $user->IsHCMember("self")){ ?>$("settings-wardrobe").show();<?php } ?>
    }
    </script>

    </form>

    </div>

    </div>
    </div>
    </div>
    </div>
    Last edited by KurtBrown; 03-04-13 at 04:35 AM. Reason: Title Change


  2. #2
    scream my name ParadiseRel is offline
    MemberRank
    Jun 2012 Join Date
    clitLocation
    600Posts

    Re: [CMS - Xoa v2/Obbo EMU] Profile Page/:Purchase command

    Oh you have obbo emu? Please PM a download too me. :)

    This is off-topic but oh well.

  3. #3
    Apprentice Connor Wright is offline
    MemberRank
    Sep 2013 Join Date
    9Posts

    Re: [CMS - Xoa v2/Obbo EMU] Profile Page/:Purchase command

    I need the download link as well please.

  4. #4
    Account Upgraded | Title Enabled! PR0 is offline
    MemberRank
    Mar 2007 Join Date
    1,206Posts

    Re: [CMS - Xoa v2/Obbo EMU] Profile Page/:Purchase command

    Quote Originally Posted by Connor Wright View Post
    I need the download link as well please.
    Next time try googling some key words to find it. Such as "Xoa emu download" or "Xoa cms download". Not sure if this emu is Xoa V2 or not. I'm pretty sure Xoa requires a license anyhow and that would be really hard to find and I doubt the license server is still working.

    Here's a link for Xoa V1? EMU: http://www.mediafire.com/?mkqtw09o00oesjr
    Here's a link for the DB: http://www.mediafire.com/?n0ph6e1yhc46rmh

    Here's a download link for the CMS: http://www.2shared.com/file/htcK_iMp/hotel.html



Advertisement