Jump to content

Recommended Posts

Posted

 

before all good afternoo I have a problem to create accounts on my website, the sql are fine but maybe I can't find the problem in the registration php .. I leave the code any help is welcome I searched but did not see anything strange and I already tried all the possible options Thank you in advance

 

 

 

 

<?php if(!$indexing) { echo "<script>document.location.replace('./');</script>"; exit; } ?>

<span id='accLoc'></span>

<h1>Account</h1>

<div class='horMenu'>
    <a href='javascript:void(0);' class='act'><?php echo $LANG[12032]; ?></a>
    <a href='?page=changepass#accLoc'><?php echo $LANG[12022]; ?></a>
    <a href='?page=forgot#accLoc'><?php echo $LANG[12034]; ?></a>
</div>

<div class='pddInner'>

    <?php
    $desativarReg = 0;
    $dateReg = mktime($reg['hr'],$reg['min'],0,$reg['mes'],$reg['dia'],$reg['ano']);
    if($dateReg > time()) {
        echo "<div class='rmsg error'>".$LANG[12977]."<br /> ".date('d F, Y \- H:i', $dateReg)."</div>";
        $desativarReg = 1;
    }
    ?>

    <div class='rulesbox'>
        <?php require('pages/rules.php'); ?>
    </div>

    <form class='usarJquery registerForm' method='POST' action='./?engine=create_account'>
        
        <?php $_SESSION['key'] = md5(time().rand(100,999).$uniqueKey); echo "<input type='hidden' name='key' value='".$_SESSION['key']."' />"; ?>
        
        <label class='rmsg warn'>
            <input type='checkbox' id='acceptrules' value='1' /> <b><?php echo $LANG[12994]; ?></b>
        </label>

        <?php echo $LANG[12067]; ?>

        <br /><br />

        <label class='formpadrao accr_login'>
            <div>
                <div class='desc'>* Login:</div>
                <div class='camp'><input type='text' name='login' id='login' maxlength='14' value='<?php echo ((isset($_GET['l'])) ? vCode($_GET['l']) : ''); ?>' autocomplete='off' /></div>
            </div>
        </label>

        <?php if($suffixActive == 1) { ?>
            
            <style>#finalLogin { font-weight: bold; font-size: 15px; }</style>
            <label class='formpadrao' id='the_suffix'>
                <div>
                    <div class='desc'>Login - <?php echo $LANG[10997]; ?>:</div>
                    <div class='camp'>
                        <select name='suffix' id='suffix'>
                            <?php
                            $subLetter = array(0 => 'C', 1 => 'D', 2 => 'Y', 3 => 'H', 4 => 'K', 5 => 'N', 6 => 'R', 7 => 'S', 8 => 'Z', 9 => 'X');
                            $_SESSION['suffix'][1] = (rand(100,996)+1);
                            $_SESSION['suffix'][2] = (rand(100,996)+2);
                            $_SESSION['suffix'][3] = (rand(100,996)+3);
                            $_SESSION['suffix'][4] = strtr(rand(100,996)+1, $subLetter);
                            $_SESSION['suffix'][5] = strtr(rand(100,996)+2, $subLetter);
                            $_SESSION['suffix'][6] = strtr(rand(100,996)+3, $subLetter);
                            echo "
                            <option value='1'>".$_SESSION['suffix'][1]."</option>
                            <option value='2'>".$_SESSION['suffix'][2]."</option>
                            <option value='3'>".$_SESSION['suffix'][3]."</option>
                            <option value='4'>".$_SESSION['suffix'][4]."</option>
                            <option value='5'>".$_SESSION['suffix'][5]."</option>
                            <option value='6'>".$_SESSION['suffix'][6]."</option>
                            ";
                            ?>
                        </select>
                    </div>
                </div>
            </label>
            
            <div class='rmsg warn' style='margin-bottom: 2px;'>
                <?php
                echo "<span id='sfxMsg1'>".$LANG[10995]."</span><span id='sfxMsg2' style='display:none;'>".$LANG[29004]."</span><br />
                <a href='#' id='whatIsPrefix' style='font-style:italic;'>".$LANG[30509]."</a>";
                if($forceSuffix != 1) { ?>
                    &nbsp;&nbsp;&nbsp;
                    <label><input id='disableSuffix' type='checkbox' name='nosuffix' value='1' /> <i><?php echo $LANG[10996]; ?></i></label>
                <?php } ?>
                <script>
                    $(function() {
                        
                        $('#disableSuffix').prop('checked', false);
                        
                        $('select#suffix option').eq(<?php echo intval(rand(0, 5)); ?>).attr('selected', 'selected');
                        
                        $('#finalLogin').text('_____'+$('select#suffix option:selected').text());
                        
                        $('select#suffix').change(function(){
                            if($('#login').val().length != 0) { var loginAtual = $('#login').val(); } else { var loginAtual = '_____'; }
                            $('#finalLogin').text(loginAtual+$('select#suffix option:selected').text());
                        });
                        
                        $('input#login').keyup(function(){
                            if($('#login').val().length != 0) { var loginAtual = $('#login').val(); } else { var loginAtual = '_____'; }
                            $('#finalLogin').text(loginAtual+$('select#suffix option:selected').text());
                        });
                        
                        $('#disableSuffix').change(function() {
                            if(!$('#the_suffix').hasClass('escondido')) {
                                $('#login').attr('maxlength', '14');
                                $('#the_suffix').addClass('escondido').css({ 'display': 'none' });
                                $('#sfxMsg1').css({ 'display': 'none' });
                                $('#sfxMsg2').css({ 'display': 'inline-block' });
                            } else {
                                $('#login').attr('maxlength', '11');
                                $('#the_suffix').removeClass('escondido').css({ 'display': 'table' });
                                $('#sfxMsg2').css({ 'display': 'none' });
                                $('#sfxMsg1').css({ 'display': 'inline-block' });
                            }
                        });
                        
                        $('a#whatIsPrefix').click(function(e){
                            e.preventDefault();
                            $('body').append("<div id='backblack'></div><div id='modal' style='display:none; height: auto !important;'><div><?php echo '<h1>'.$LANG[30509].'</h1>'.preg_replace('/\r?\n/','', $LANG[30510]); ?></div></div>");
                            $('#modal > div').css({ 'padding': '15px 20px 20px' });
                            $('#modal').css({ 'box-sizing': 'border-box', 'padding': '0', 'top': 'calc(50% - '+(($('#modal').height()+6)/2)+'px)' }).fadeIn('fast');
                        });
                        
                    });
                </script>
            </div>

        <?php } ?>

        <label class='formpadrao accr_pass'>
            <div>
                <div class='desc'> <?php echo $LANG[12049]; ?>:</div>
                <div class='camp'><input type='password' maxlength='25' name='pass' autocomplete='off' /></div>
            </div>
        </label>

        <label class='formpadrao accr_pass'>
            <div>
                <div class='desc'>* <?php echo $LANG[12048]; ?>:</div>
                <div class='camp'><input type='password' maxlength='25' name='pass2' autocomplete='off' /></div>
            </div>
        </label>

        <label class = 'formpadrao accr_email'>
            <div>
                <div class = 'desc'> * Correo electrónico: </div>
                <div class = 'camp'> <input type = 'text' maxlength = '100' name = valor 'email' = '<? php echo ((isset ($ _ GET [' l ']))? vCode ($ _ GET [' e ']):' '); ?> 'autocomplete =' off '/> </div>
            </div>
        </label>

        <label class = 'formpadrao accr_email'>
            <div>
                <div class = 'desc'> * <? php echo $ LANG [12010]; ?>: </div>
                <div class = 'camp'> <input type = 'text' maxlength = '100' name = 'email2' value = '' autocomplete = 'off' /> </div>
            </ div >
        </label>

        <? php if ($ captcha_register_on == 1) {?>
        <label class = 'formpadrao captcha'>
            <div>
                <div class = 'desc'> <img style = 'margin: 5px 0 0 0;' class = 'captchaImage' src = 'captcha / securimage_show.php? sid = <? php echo md5 (uniqid ())?>' /> </div>
                <div class = 'camp'> <input type = 'text' id = 'captchaInput' maxlength = '5' name = 'captcha' autocomplete = 'off' /> </div>
                <a tabindex='-1' href='#'> <img src = 'captcha / refresh.png '/> </a>
            </div>
        </label>
        <? php}?>

        <input type = 'submit' class = 'default dbig' value = '<? php echo $ LANG [12077]; ?> 'style =' margin: 20px auto; display: table; <? php echo ($ desativarReg == 1)? "opacidad: 0.6; cursor: predeterminado; ' discapacitado" : "'"; ?> />

    </form>
    
    <input type = 'hidden' id = 'l12004' value = '<? php echo $ LANG [12004]; ?> '/>
    
</div>

<? php
if ($ desativarReg == 1) {
    echo "<div class = 'rmsg error'>". $ LANG [12977]. "<br />" .date ('d F, Y \ - H: i ', $ dateReg). "</div>";
}
?>

<br /> <br />
 



  • Posts

    • “Hello, I’d like to present a short description of the server. Everyone starts equally at max level 80. The server includes a custom buffer, custom class master, custom weapons and armors, custom zones, custom teleporter, custom raid bosses, and much more. I’ll leave a link in the description for those who want to see how everything looks inside. The server is only open on weekends, and you can find more news via the Facebook link.”   https://www.facebook.com/profile.php?id=61578869175323
    • 1. You where subscriber 3 years ago. 2. There is no current L2jMobius 2.8 Seven Signs version. Subcriber or not. 3. You have your answer from multiple forums that more items is more delay.  
    • 1. Optimize Packet Serialization Look in ItemList.java or wherever the inventory packet is constructed. Instead of building the packet with inefficient string concatenation or repeated allocations, use a preallocated buffer and avoid creating new objects for each item. Mobius sources are Java-based, so profiling with something like VisualVM or YourKit can help see where most time is spent. 2. Avoid Sending the Full List Each Time Modify the server to send only changed items (diff packets) when the inventory window opens. Some newer forks implement this as “lazy loading” or paged inventory so the client only loads e.g. 100 items at a time. 3. Limit the Inventory Size Per Page Instead of showing all 500 slots at once, split the inventory into pages/tabs (100 slots each). When the user switches a tab, send only that page’s items. This requires some client-side editing, but it’s the most user-friendly long-term fix. 4. Database & Cache Optimizations Ensure your items table is indexed by owner_id to make the query for player items fast. Cache item templates and static data so they are not reloaded every time the inventory is shown. ⚠️ Things to Keep in Mind Increasing slots from 80 → 500 does not just change a number — it multiplies the workload for packet building and UI rendering. You can’t fully avoid some extra cost with 500 items, but you can keep it under a few milliseconds if you optimize how and when the data is sent.    
    • i think it's the auto sorting of the interface that sucks, check InventoryWnd script in interface.u, or completely disable the request item list packet when toggling the inventory window (also in InventoryWnd script or similar name)
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock