Please, I need your help fixing this code...

Discussion in 'Programming' started by Divvy, Feb 27, 2011.

  1. #1
    Hello friends,

    Can someone help me fix some bugs that my template have...

    my website:
    http://www.celebridadesdespidas.com (adult content)

    1- strange character in the top middle... If I choose Russian language, the character disappears... but If I choose English, appears!
    2- when you click in "open", shows a menu popup full of code lines... is a mess!

    Please, can someone help me?

    I think that the problem is in login.tpl file:
    <?php
    if ($is_logged == TRUE){
    
    $login_panel = <<<HTML
                        <div class="login-link">
                                    
    HTML;
    
    if ($user_group[$member_id['user_group']]['allow_admin']) {
    $login_panel .= <<<HTML
                                     <a href="{$adminlink}" class="admin-link" target="_blank">Àäìèíöåíòð</a>
    HTML;
    }
    else {
    $login_panel .= <<<HTML
    
    HTML;
    }
    $login_panel .= <<<HTML
                                
                                    <a href="{$link_addnews}" class="add-link">Îïóáëèêîâàòü</a>
                                     <a href="{$link_profile}" class="profile-link">Èíôîðìàöèÿ î Âàñ</a>
                                     <a href="{$link_pm}" class="pm-link">Ñîîáùåíèÿ ({$member_id['pm_unread']} | {$member_id['pm_all']})</a>                                
    
                                     <a href="{$link_logout}" class="lu-link">Âûõîä</a>
                                     <div style="clear: both; height: 1px;"></div>
                                </div>
    HTML;
    
    } else {
    $login_panel = <<<HTML
                                
                                    
                                  
                                        <div class="l-color">   
                                            <form method="post" action='' style="margin: 0; padding: 0;">
                                                <table width="200" cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td valign="top" width="140">
                                                            Âàøå èìÿ
                                                        </td>
                                                        <td valign="top" width="140">
                                                            Ïàðîëü
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top" style="padding-top: 5px;">
                                                            <input name="login_name" type="text" class="login-input-text" title="Âàøå èìÿ íà ñàéòå" value="ëîãèí" onblur="if(this.value=='') this.value='ëîãèí';" onfocus="if(this.value=='ëîãèí') this.value='';" />
                                                        </td>
                                                        <td valign="top" style="padding-top: 5px;">
                                                            <input name="login_password" type="password" class="login-input-text" title="Âàø ïàðîëü" value="ïàðîëü" onblur="if(this.value=='') this.value='ïàðîëü';" onfocus="if(this.value=='ïàðîëü') this.value='';" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top" colspan="2" style="padding-top: 7px;">
                                                            <input onclick="submit();" type="image" class="enter" src="{THEME}/images/enter.jpg" value="âõîä" /><input name="login" type="hidden" id="login" value="submit" />
                                                            <div style="float: left;padding: 7px 0 0 5px;" class="fix-moz"><a href="{$link_regist}" title="ðåãèñòðàöèÿ íà ñàéòå">Ðåãèñòðàöèÿ</a> / <a href="{$link_lost}" title="âîññòàíîâëåíèå ïàðîëÿ">Âñå çàáûë?</a></div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </form>
                                        </div>
                                    
    HTML;
    }
    ?>
    PHP:
     
    Divvy, Feb 27, 2011 IP
  2. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Please, someone...
     
    Divvy, Feb 28, 2011 IP
  3. biiccs

    biiccs Member

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    Hi. Do you use
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    Code (markup):
    in your HTLM? and one more thing, what collation is of you mysql tables for content?

    Edited:
    I see you use:
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
    
    Code (markup):
    change it to:
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    Code (markup):
     
    Last edited: Feb 28, 2011
    biiccs, Feb 28, 2011 IP
  4. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #4
    Thank you biiccs, but didnt work :(

    I changed from UTF-8 to windows-1251 only to translate the template language from Russian to English.

    See the differences with UTF-8 and windows-1251:

    windows-1251:
    [​IMG]

    UTF-8:
    [​IMG]

    Any more ideas? :)
     
    Divvy, Mar 1, 2011 IP