Beiträge von ηєѕтєα.

    Hallo

    Ich versuche schon lange ein Radio in mein Hotel einzufügen. Bis jetzt hab ich immer so ein online Radio benutzt wie z.B Deefjay.
    Aber ich würde gerne meinen eigenen Radio haben mit eigenen Lieder die ich einfügen kann, wie z.B HabboST im Client hat:

    Die haben ja auch eigene Musik und DJ's.

    Meine Frage ist nun, wie erstelle ich so einen, hat jemand eine Anleitung/Tutorial würde sehr Dankbar!

    Liebe Grüsse
    ohSparklez

    Nein ich meine nicht das, dass weiss ich. Ich möchte das wenn man sich registriert einen Raum wählen kann,

    Spoiler anzeigen

    denn dann nach der registrierung bekommt mit den Möbel die drinn sind. Das heisst also ein SQL Querry den Raum in die Datenbank einfügt: $q2 = $MySQLi->query('INSERT INTO rooms (caption, owner, model_name) VALUES (\'Raum von ' . $userName . '\', \'' . $userName . '\', \'model_b\')'); Und dann die items die im Raum sind einfügt: $q3 = $MySQLi->query('INSERT INTO items (user_id, room_id, base_item) VALUES (\'' . $userid . '\', \'' . $roomid . '\', \'155\')');

    Aber das Problem ist, dass der SQL der die Items importieren soll nicht die RaumID einfügt sondern einfach eine 0. Und um das zu lösen hab ich das gemacht: $roomid = $MySQLi->query('SELECT id FROM rooms WHERE owner = \'' . $userName . '\'')->fetch_assoc()['id']; Dann sollte es ja die Raum ID von Raum nehmen die dann dem Benutzer gehört der sich gerade am registrieren ist. Aber er fügt nicht die Raum ID ein sondern einfach eine 0


    Wenn jemand nicht genau weiss was ich meine könnt ihr mich auch bei Skype adden @sparklesdesigns um Bildschirmübertragung zu machen oder besser mit TeamViewer.

    Guten Tag!

    Ich versuche schon seit einigen Tagen einen Startroom zu machen. Das heisst, dass man während der Registration einen Raum wählen kann mit Möbel drin, und nach der Registrierung direkt in den Client kommt und dort in seinen Raum.
    Ich weiss aber nicht wie das geht ich habe schon sowas versucht:

    Code
    $roomid = $MySQLi->query('SELECT id FROM rooms WHERE owner = \'' . $userName . '\'')->fetch_assoc()['id'];
    
    
    $q2 = $MySQLi->query('INSERT INTO rooms (caption, owner, model_name) VALUES (\'Raum von ' . $userName . '\', \'' . $userName . '\', \'model_b\')');
    $q3 = $MySQLi->query('INSERT INTO items (user_id, room_id, base_item) VALUES (\'' . $userid . '\', \'' . $roomid . '\', \'155\')');

    Aber anstatt die Raum ID von Raum einzufügen da wo ' . $roomid . ' ist, fügt er einfach eine 0 ein.

    Spoiler anzeigen

    Hoffentlich kann mir jemand bei meinem Problem weitehelfen.


    Liebe Grüsse
    ohSparklez

    Also diese \ im Code braucht es weil es in php oder so geschriben ist.


    Das ist die Datei:

    Spoiler anzeigen

    <?php
    if(!isset($_POST['next'], $_POST['registrationBean_month'], $_POST['registrationBean_day'], $_POST['registrationBean_year'], $_POST['registrationBean_email'], $_POST['registrationBean_password'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'], $_POST['registrationBean_parentEmail'])):
    echo '{"registrationErrors":{"registration_password":"Escribe una contraseña porfavor.","registration_birthday_format":"Please supply a valid birthdate","registration_termsofservice":"Please accept the terms of service","registration_email":"Please enter a valid email address","registration_captcha":"The security code was invalid, please try again."}}';
    exit;
    endif;

    $responseJson = ['registrationErrors' => ['empty_field_error_message' => 'Hey, you forgot to fill me!']];

    if(empty($_POST['registrationBean_password'])):
    $responseJson['registrationErrors']['registration_password'] = 'Please enter a password';
    elseif(strlen($_POST['registrationBean_password']) < 6):
    $responseJson['registrationErrors']['registration_password'] = 'Your password needs be at least 6 characters long';
    elseif(strlen($_POST['registrationBean_password']) > 32):
    $responseJson['registrationErrors']['registration_password'] = 'Your password is too long';
    elseif(!preg_match('`[0-9]`', $_POST['registrationBean_password'])):
    $responseJson['registrationErrors']['registration_password'] = 'Your password must also include numbers';
    endif;

    if(!USER::CheckAge($_POST['registrationBean_day'], $_POST['registrationBean_month'], $_POST['registrationBean_year'])):
    $responseJson['registrationErrors']['registration_birthday_format'] = 'Please supply a valid birthdate';
    endif;

    if(!isset($_POST['registrationBean_termsOfServiceSelection']) || $_POST['registrationBean_termsOfServiceSelection'] != 'true'):
    $responseJson['registrationErrors']['registration_termsofservice'] = 'Please accept the terms of service';
    endif;

    $_POST['registrationBean_email'] = str_replace('%40', '@', strtolower($_POST['registrationBean_email']));

    if(empty($_POST['registrationBean_email']) || strlen($_POST['registrationBean_email']) > 50 || preg_match('/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i', $_POST['registrationBean_email']) !== 1):
    $responseJson['registrationErrors']['registration_email'] = 'Please enter a valid email address';
    else:
    $r = USER::SomeRegistered($_POST['registrationBean_email']);
    if($r === null):
    $responseJson["registrationErrors"]['registration_password'] = 'Error 505 L29. Try later.';
    elseif($r === true):
    $responseJson['registrationErrors']['registration_email'] = 'Someone (probably you) has requested we do not send email to the address you tried to use. Please use another email address.';
    endif;
    endif;

    if($responseJson['registrationErrors'] != ['empty_field_error_message' => 'Hey, you forgot to fill me!']):
    echo json_encode($responseJson);
    exit;
    endif;

    $RegisterSettings = CACHE::GetAIOConfig('Register');
    if(!$RegisterSettings['register_enabled']):
    $responseJson["registrationErrors"]['registration_password'] = 'Register is disabled, try later.';
    echo json_encode($responseJson);
    exit;
    endif;

    $userName = USER::GenerateName($_POST['registrationBean_email']);
    if($userName === null):
    $responseJson["registrationErrors"]['registration_password'] = 'Error 505 L48. Try later.';
    echo json_encode($responseJson);
    exit;
    endif;

    $birth = $_POST['registrationBean_day'] . '-' . $_POST['registrationBean_month'] . '-' . $_POST['registrationBean_year'];

    $_IpExists = true;
    if($MySQLi->query("SELECT null FROM users WHERE (ip_last = '" . MY_IP . "' OR ip_reg = '" . MY_IP . "')")->num_rows == 0):
    $_IpExists = false;
    endif;

    if($RegisterSettings['onelimitip_enabled'] && $_IpExists):
    $responseJson["registrationErrors"]["registration_password"] = 'Only one user per IP';
    echo json_encode($responseJson);
    exit;
    endif;

    $q = $MySQLi->query('INSERT INTO users (username, rank, vip_points, credits, activity_points, seasonal_currency, loyalty_points, look, gender, motto, mail, account_created, ip_last, vip) VALUES (\'' . $userName . '\', \'2\', \'500\', \'25000\', \'3000\', \'125\', \'250\', \'lg-270-82.hd-180-1.sh-290-91.ch-210-66.hr-100-42\', \'M\', \'Willkommen im ' . $shortname . ' Hotel!\', \'UNDEFINED\', ' . time() . ', \'' . MY_IP . '\', \'1\')');


    if(!$q || $MySQLi->affected_rows !== 1):
    $responseJson['registrationErrors']['registration_password'] = 'Error MySQLi';
    echo json_encode($responseJson);
    exit;
    endif;

    $getroomsID = $MySQLi->query("SELECT id FROM rooms WHERE owner = '" . $userName . "'");
    $userid = $MySQLi->insert_id;
    $MySQLi->query('REPLACE INTO xdrcms_users_data (id, mail, password, birth, rpx_id, rpx_type, web_online, AddonData, RememberMeToken, AccountID, AccountIdentifier, AccountPhoto, securityTokens) VALUES (' . $userid . ', \'' . $_POST["registrationBean_email"] . '\', \'' . METHOD::HASH($_POST["registrationBean_password"]) . '\', \'' . $birth . '\', ' . METHOD::RANDOM(12, true, false) . ', \'habboid\', \'--\', \'\', \'\', \'\', \'\', \'\', \'\')');

    if(isset($_SESSION['Register']['RefId']) && is_numeric($_SESSION['Register']['RefId']) && !$_IpExists):
    $Users::NewRefer($userid, $_SESSION['Register']['RefId']);
    endif;

    ITEM::CREATE($userid, 0, '180', '366', '11', '', 's_paper_clip_1', '', 'sticker');
    ITEM::CREATE($userid, 0, '130', '22', '10', '', 's_needle_3', '', 'sticker');
    ITEM::CREATE($userid, 0, '280', '343', '3', '', 's_sticker_spaceduck', '', 'sticker');
    ITEM::CREATE($userid, 0, '593', '11', '9', '', 's_sticker_arrow_down', '', 'sticker');

    ITEM::CREATE($userid, 0, '107', '402', '8', '', 'n_skin_notepadskin', 'note.myfriends', 'stickie');
    ITEM::CREATE($userid, 0, '57', '229', '6', '', 'n_skin_speechbubbleskin', 'note.welcome', 'stickie');
    ITEM::CREATE($userid, 0, '148', '41', '7', '', 'n_skin_noteitskin', 'note.remember.security', 'stickie');

    ITEM::CREATE($userid, 0, '457', '26', '4', 'ProfileWidget', 'w_skin_defaultskin', '', 'widget');
    ITEM::CREATE($userid, 0, '450', '319', '1', 'RoomsWidget', 'w_skin_notepadskin', '', 'widget');


    //if($SiteSettings['initial.credits.int'] > 0):
    // newTransaction($userid, $date_full, $SiteSettings['initial.credits.int'], $System->CorrectStr('¡Bienvenido a ' . $shortname . '!'));
    //endif;

    unset($_SESSION["Registration"]);
    $_SESSION['client_login'] = true;
    $_SESSION['next_login'] = true;

    $q = $MySQLi->query('INSERT INTO rooms (caption, owner, model_name, wallpaper, floor) VALUES (\'Raum von ' . $userName . '\', \'' . $userName . '\', \'model_b\', \'903\', \'110\')');
    $q = $MySQLi->query('INSERT INTO user_badges (user_id, badge_id, badge_slot) VALUES (\'' . $userid . '\', \'HH1\', \'1\')');
    $q = $MySQLi->query('INSERT INTO items (user_id, room_id, base_item, extra_data, x, y, z, rot) VALUES (\'' . $userid . '\', \'' . $getroomsID . '\', \'3062\', \'1\', \'6\', \'1\', \'0\', \'0\')');

    USER::LOGIN($userid, $_POST['registrationBean_email'], METHOD::HASH($_POST['registrationBean_password']), 'habboid', false);
    echo '{"registrationCompletionRedirectUrl":"' . str_replace("/", "\\/", PATH) . '\/client"}';
    exit;
    ?>

    Guten Tag!

    Ich habe ein kleines problem mit diesem Code, ich weiss nicht was daran falsch ist. Es sollte eine Funktion sein, dass die Room ID vom User X findet:

    Spoiler anzeigen

    $getroomsID = $MySQLi->query("SELECT id FROM rooms WHERE owner = '" . $userName . "'");

    Und dann in einer anderen Funktion es in die Datenbank einfügt und die Room ID automatisch erkennt und in die richtige Stelle einsetzt:

    Spoiler anzeigen

    $q = $MySQLi->query('INSERT INTO items (user_id, room_id, base_item, extra_data, x, y, z, rot) VALUES (\'' . $userid . '\', \'' . $getroomsID . '\', \'3062\', \'1\', \'6\', \'1\', \'0\', \'0\')');

    Vielleicht kann mir jemand weiterhelfen.

    EDIT:
    Das ist noch die Datei indem der Code drinn ist.

    Spoiler anzeigen

    <?php
    if(!isset($_POST['next'], $_POST['registrationBean_month'], $_POST['registrationBean_day'], $_POST['registrationBean_year'], $_POST['registrationBean_email'], $_POST['registrationBean_password'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'], $_POST['registrationBean_parentEmail'])):
    echo '{"registrationErrors":{"registration_password":"Escribe una contraseña porfavor.","registration_birthday_format":"Please supply a valid birthdate","registration_termsofservice":"Please accept the terms of service","registration_email":"Please enter a valid email address","registration_captcha":"The security code was invalid, please try again."}}';
    exit;
    endif;

    $responseJson = ['registrationErrors' => ['empty_field_error_message' => 'Hey, you forgot to fill me!']];

    if(empty($_POST['registrationBean_password'])):
    $responseJson['registrationErrors']['registration_password'] = 'Please enter a password';
    elseif(strlen($_POST['registrationBean_password']) < 6):
    $responseJson['registrationErrors']['registration_password'] = 'Your password needs be at least 6 characters long';
    elseif(strlen($_POST['registrationBean_password']) > 32):
    $responseJson['registrationErrors']['registration_password'] = 'Your password is too long';
    elseif(!preg_match('`[0-9]`', $_POST['registrationBean_password'])):
    $responseJson['registrationErrors']['registration_password'] = 'Your password must also include numbers';
    endif;

    if(!USER::CheckAge($_POST['registrationBean_day'], $_POST['registrationBean_month'], $_POST['registrationBean_year'])):
    $responseJson['registrationErrors']['registration_birthday_format'] = 'Please supply a valid birthdate';
    endif;

    if(!isset($_POST['registrationBean_termsOfServiceSelection']) || $_POST['registrationBean_termsOfServiceSelection'] != 'true'):
    $responseJson['registrationErrors']['registration_termsofservice'] = 'Please accept the terms of service';
    endif;

    $_POST['registrationBean_email'] = str_replace('%40', '@', strtolower($_POST['registrationBean_email']));

    if(empty($_POST['registrationBean_email']) || strlen($_POST['registrationBean_email']) > 50 || preg_match('/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i', $_POST['registrationBean_email']) !== 1):
    $responseJson['registrationErrors']['registration_email'] = 'Please enter a valid email address';
    else:
    $r = USER::SomeRegistered($_POST['registrationBean_email']);
    if($r === null):
    $responseJson["registrationErrors"]['registration_password'] = 'Error 505 L29. Try later.';
    elseif($r === true):
    $responseJson['registrationErrors']['registration_email'] = 'Someone (probably you) has requested we do not send email to the address you tried to use. Please use another email address.';
    endif;
    endif;

    if($responseJson['registrationErrors'] != ['empty_field_error_message' => 'Hey, you forgot to fill me!']):
    echo json_encode($responseJson);
    exit;
    endif;

    $RegisterSettings = CACHE::GetAIOConfig('Register');
    if(!$RegisterSettings['register_enabled']):
    $responseJson["registrationErrors"]['registration_password'] = 'Register is disabled, try later.';
    echo json_encode($responseJson);
    exit;
    endif;

    $userName = USER::GenerateName($_POST['registrationBean_email']);
    if($userName === null):
    $responseJson["registrationErrors"]['registration_password'] = 'Error 505 L48. Try later.';
    echo json_encode($responseJson);
    exit;
    endif;

    $birth = $_POST['registrationBean_day'] . '-' . $_POST['registrationBean_month'] . '-' . $_POST['registrationBean_year'];

    $_IpExists = true;
    if($MySQLi->query("SELECT null FROM users WHERE (ip_last = '" . MY_IP . "' OR ip_reg = '" . MY_IP . "')")->num_rows == 0):
    $_IpExists = false;
    endif;

    if($RegisterSettings['onelimitip_enabled'] && $_IpExists):
    $responseJson["registrationErrors"]["registration_password"] = 'Only one user per IP';
    echo json_encode($responseJson);
    exit;
    endif;

    $q = $MySQLi->query('INSERT INTO users (username, rank, vip_points, credits, activity_points, seasonal_currency, loyalty_points, look, gender, motto, mail, account_created, ip_last, vip) VALUES (\'' . $userName . '\', \'2\', \'500\', \'25000\', \'3000\', \'125\', \'250\', \'lg-270-82.hd-180-1.sh-290-91.ch-210-66.hr-100-42\', \'M\', \'Willkommen im ' . $shortname . ' Hotel!\', \'UNDEFINED\', ' . time() . ', \'' . MY_IP . '\', \'1\')');


    if(!$q || $MySQLi->affected_rows !== 1):
    $responseJson['registrationErrors']['registration_password'] = 'Error MySQLi';
    echo json_encode($responseJson);
    exit;
    endif;

    $getroomsID = $MySQLi->query("SELECT id FROM rooms WHERE owner = '" . $userName . "'");
    $userid = $MySQLi->insert_id;
    $MySQLi->query('REPLACE INTO xdrcms_users_data (id, mail, password, birth, rpx_id, rpx_type, web_online, AddonData, RememberMeToken, AccountID, AccountIdentifier, AccountPhoto, securityTokens) VALUES (' . $userid . ', \'' . $_POST["registrationBean_email"] . '\', \'' . METHOD::HASH($_POST["registrationBean_password"]) . '\', \'' . $birth . '\', ' . METHOD::RANDOM(12, true, false) . ', \'habboid\', \'--\', \'\', \'\', \'\', \'\', \'\', \'\')');

    if(isset($_SESSION['Register']['RefId']) && is_numeric($_SESSION['Register']['RefId']) && !$_IpExists):
    $Users::NewRefer($userid, $_SESSION['Register']['RefId']);
    endif;

    ITEM::CREATE($userid, 0, '180', '366', '11', '', 's_paper_clip_1', '', 'sticker');
    ITEM::CREATE($userid, 0, '130', '22', '10', '', 's_needle_3', '', 'sticker');
    ITEM::CREATE($userid, 0, '280', '343', '3', '', 's_sticker_spaceduck', '', 'sticker');
    ITEM::CREATE($userid, 0, '593', '11', '9', '', 's_sticker_arrow_down', '', 'sticker');

    ITEM::CREATE($userid, 0, '107', '402', '8', '', 'n_skin_notepadskin', 'note.myfriends', 'stickie');
    ITEM::CREATE($userid, 0, '57', '229', '6', '', 'n_skin_speechbubbleskin', 'note.welcome', 'stickie');
    ITEM::CREATE($userid, 0, '148', '41', '7', '', 'n_skin_noteitskin', 'note.remember.security', 'stickie');

    ITEM::CREATE($userid, 0, '457', '26', '4', 'ProfileWidget', 'w_skin_defaultskin', '', 'widget');
    ITEM::CREATE($userid, 0, '450', '319', '1', 'RoomsWidget', 'w_skin_notepadskin', '', 'widget');


    //if($SiteSettings['initial.credits.int'] > 0):
    // newTransaction($userid, $date_full, $SiteSettings['initial.credits.int'], $System->CorrectStr('¡Bienvenido a ' . $shortname . '!'));
    //endif;

    unset($_SESSION["Registration"]);
    $_SESSION['client_login'] = true;
    $_SESSION['next_login'] = true;

    $q = $MySQLi->query('INSERT INTO rooms (caption, owner, model_name, wallpaper, floor) VALUES (\'Raum von ' . $userName . '\', \'' . $userName . '\', \'model_b\', \'903\', \'110\')');
    $q = $MySQLi->query('INSERT INTO user_badges (user_id, badge_id, badge_slot) VALUES (\'' . $userid . '\', \'HH1\', \'1\')');
    $q = $MySQLi->query('INSERT INTO items (user_id, room_id, base_item, extra_data, x, y, z, rot) VALUES (\'' . $userid . '\', \'' . $getroomsID . '\', \'3062\', \'1\', \'6\', \'1\', \'0\', \'0\')');

    USER::LOGIN($userid, $_POST['registrationBean_email'], METHOD::HASH($_POST['registrationBean_password']), 'habboid', false);
    echo '{"registrationCompletionRedirectUrl":"' . str_replace("/", "\\/", PATH) . '\/client"}';
    exit;
    ?>

    Liebe Grüsse
    ohSparklez

    Guten Tag!


    Ich habe mir vor zirka 2 Monaten das TRITTON PRO+ 5.1 SURROUND HEADSET gekauft für die Xbox 360. Und ich möchte später mal zur Xbox One umsteigen, aber ich weiss nicht ob mein Headset auch für die Xbox One geht oder ob ich einen Adaptor kaufen muss.

    Vielleicht kann mir das jemand beantworten,


    Liebe Grüsse
    ohSparklez