Pokaż wyniki od 1 do 9 z 9

Wątek: Błąd w kodzie

  1. #1
    Zarejestrowany
    Dołączył
    Dec 2008
    Posty
    6

    Post Błąd w kodzie

    Przy wejściu na opcje konta wyświetla sie tylko ponizszy komunikata...prosiłbym o pomoc.

    Parse error: syntax error, unexpected $end in /home/Viperx/domains/somalis.pdg.pl/public_html/account.php on line 717


    Kod php:
    <?php
    $title 
    'Opcje konta';
    require_once(
    "includes/head.php");

    /**
    * Get the localization for game
    */
    require_once("languages/".$player -> lang."/account.php");

    /**
    * Assign variable to template
    */
    $smarty -> assign("Avatar"'');

    /**
     * Links
     */
    if (isset($_GET['view']) && $_GET['view'] == 'links')
    {
        
    $objLinks $db -> Execute("SELECT `id`, `file`, `text` FROM `links` WHERE `owner`=".$player -> id." ORDER BY `id` ASC");
        
    $arrId = array(0);
        
    $arrFile = array();
        
    $arrText = array();
        
    $i 0;
        while (!
    $objLinks -> EOF)
        {
            
    $arrId[$i] = $objLinks -> fields['id'];
            
    $arrFile[$i] = $objLinks -> fields['file'];
            
    $arrText[$i] = $objLinks -> fields['text'];
            
    $i ++;
            
    $objLinks -> MoveNext();
        }
        
    $objLinks -> Close();
        if (!isset(
    $_GET['lid']))
        {
            
    $strFormaction A_ADD;
            
    $intLinkid 0;
        }
            else
        {
           if (!
    ereg("^[0-9]*$"$_GET['lid']))
           {
               
    error(ERROR);
           }
           if (
    $_GET['lid'] == 0)
           {
               
    $strFormaction A_ADD;
           }
               else
           {
               
    $strFormaction A_EDIT;
           }
           
    $intLinkid $_GET['lid'];
        }
        
    $smarty -> assign(array("Linksinfo" => LINKS_INFO,
                                
    "Tfile" => T_FILE,
                                
    "Tname" => T_NAME,
                                
    "Tactions" => T_ACTIONS,
                                
    "Adelete" => A_DELETE,
                                
    "Aedit" => A_EDIT,
                                
    "Aform" => $strFormaction,
                                
    "Linksid" => $arrId,
                                
    "Linksfile" => $arrFile,
                                
    "Linkstext" => $arrText,
                                
    "Linkid" => $intLinkid,
                                
    "Linkfile" => '',
                                
    "Linkname" => ''));

        
    /**
         * Add/edit links
         */
        
    if (isset($_GET['step']) && $_GET['step'] == 'edit')
        {
            if (!isset(
    $_GET['action']) && $_GET['lid'] > 0)
            {
                
    $objLink $db -> Execute("SELECT `id`, `file`, `text` FROM `links` WHERE `id`=".$_GET['lid']." AND `owner`=".$player -> id);
                if (!
    $objLink -> fields['id'])
                {
                    
    error(NOT_YOUR);
                }
                
    $smarty -> assign(array("Linkfile" => $objLink -> fields['file'],
                                        
    "Linkname" => $objLink -> fields['text']));
                
    $objLink -> Close();
            }
            if (isset(
    $_GET['action']) && $_GET['action'] == 'change')
            {
                
    $strFile strip_tags($_POST['linkadress']);
                
    $strText strip_tags($_POST['linkname']);
                if (empty(
    $strFile) || empty($strText))
                {
                    
    error(EMPTY_FIELDS);
                }
                
    $arrForbidden = array('config.php''session.php''reset.php''resets.php''quest''portal');
                foreach (
    $arrForbidden as $strForbidden)
                {
                    
    $intPos strpos($strFile$strForbidden);
                    if (
    $intPos !== false)
                    {
                        
    error(ERROR);
                    }
                }
                if (
    $_GET['lid'] > 0)
                {
                    
    $db -> Execute("UPDATE `links` SET `file`='".$strFile."', `text`='".$strText."' WHERE `id`=".$_GET['lid']." AND `owner`=".$player -> id);
                    
    $strMessage YOU_CHANGE;
                }
                    else
                {
                    
    $db -> Execute("INSERT INTO `links` (`owner`, `file`, `text`) VALUES(".$player -> id.", '".$strFile."', '".$strText."')");
                    
    $strMessage YOU_ADD;
                }
                
    error($strMessage);
            }
        }

        
    /**
         * Delete links
         */
        
    if (isset($_GET['step']) && $_GET['step'] == 'delete')
        {
            
    $objLink $db -> Execute("SELECT `id` FROM `links` WHERE `id`=".$_GET['lid']." AND `owner`=".$player -> id);
            if (!
    $objLink -> fields['id'])
            {
                
    error(NOT_YOUR);
            }
            
    $objLink -> Close();
            
    $db -> Execute("DELETE FROM `links` WHERE `id`=".$_GET['lid']." AND `owner`=".$player -> id);
            
    error(LINK_DELETED);
        }
    }

    /**
     * Bugtrack
     */
    if (isset($_GET['view']) && $_GET['view'] == 'bugtrack')
    {
        
    $objBugs $db -> Execute("SELECT `id`, `title`, `type`, `location` FROM `bugreport` WHERE `resolution`=0 ORDER BY `id` ASC");
        
    $arrId = array();
        
    $arrTitle = array();
        
    $arrType = array();
        
    $arrLocation = array();
        
    $i 0;
        while (!
    $objBugs -> EOF)
        {
            
    $arrId[$i] = $objBugs -> fields['id'];
            
    $arrTitle[$i] = $objBugs -> fields['title'];
            
    $arrLocation[$i] = $objBugs -> fields['location'];
            if (
    $objBugs -> fields['type'] == 'text')
            {
                
    $arrType[$i] = BUG_TEXT;
            }
                else
            {
                
    $arrType[$i] = BUG_CODE;
            }
            
    $i++;
            
    $objBugs -> MoveNext();
        }
        
    $objBugs -> Close();
        
    $smarty -> assign(array("Bugtype" => BUG_TYPE,
                                
    "Bugloc" => BUG_LOC,
                                
    "Bugid" => BUG_ID,
                                
    "Bugname" => BUG_NAME,
                                
    "Bugtrackinfo" => BUGTRACK_INFO,
                                
    "Bugstype" => $arrType,
                                
    "Bugsloc" => $arrLocation,
                                
    "Bugsid" => $arrId,
                                
    "Bugsname" => $arrTitle));
    }

    /**
     * Bug report
     */
    if (isset($_GET['view']) && $_GET['view'] == 'bugreport')
    {
        
    $smarty -> assign(array("Bugtype" => BUG_TYPE,
                                
    "Bugtext" => BUG_TEXT,
                                
    "Bugcode" => BUG_CODE,
                                
    "Bugloc" => BUG_LOC,
                                
    "Bugdesc" => BUG_DESC,
                                
    "Areport" => A_REPORT,
                                
    "Bugname" => BUG_NAME,
                                
    "Buginfo" => BUG_INFO));
        
    /**
         * Report bug
         */
        
    if (isset($_GET['step']) && $_GET['step'] == 'report')
        {
            
    $arrFields = array($_POST['bugtitle'], $_POST['type'], $_POST['location'], $_POST['desc']);
            require_once(
    'includes/bbcode.php');
            foreach (
    $arrFields as $strField)
            {
                
    $strField strip_tags($strField);
                
    $strField bbcodetohtml($strField);
                if (!
    ereg("[[:graph:]]"$strField))
                {
                    
    error(EMPTY_FIELDS);
                }
            }
            if (!
    in_array($arrFields[1], array('text''code')))
            {
                
    error(ERROR);
            }
            
    $intDesc strlen($arrFields[3]);
            if (
    $intDesc 100)
            {
                
    error(TOO_SHORT);
            }
            
    $db -> Execute("INSERT INTO `bugreport` (`sender`, `title`, `type`, `location`, `desc`) VALUES(".$player -> id.", '".$arrFields[0]."', '".$arrFields[1]."', '".$arrFields[2]."', '".$arrFields[3]."')");
            
    error(B_REPORTED);
        }
    }

    /**
    * Select game localization
    */
    if (isset ($_GET['view']) && $_GET['view'] == "lang"
    {
        
    /**
        * Check avaible languages
        */    
        
    $path 'languages/';
        
    $dir opendir($path);
        
    $arrLanguage = array();
        
    $i 0;
        while (
    $file readdir($dir))
        {
            if (!
    ereg(".htm*$"$file))
            {
                if (!
    ereg("\.$"$file))
                {
                    
    $arrLanguage[$i] = $file;
                    
    $i $i 1;
                }
            }
        }
        
    closedir($dir);
        
        
    /**
        * Show select menu
        */
        
    $smarty -> assign(array("Langinfo" => LANG_INFO,
                                
    "Flang" => F_LANG,
                                
    "Slang" => S_LANG,
                                
    "Aselect" => A_SELECT,
                                
    "Lang" => $arrLanguage));

        
    /**
        * Write selected information to database
        */
        
    if (isset ($_GET['step']) && $_GET['step'] == 'lang'
        {
            if (!isset(
    $_POST['mainlang']) || !isset($_POST['seclang']))
            {
                
    error(EMPTY_FIELDS);
            }
            if (!
    in_array($_POST['mainlang'], $arrLanguage) || !in_array($_POST['seclang'], $arrLanguage))
            {
                
    error(ERROR);
            }
            
    $db -> Execute("UPDATE players SET lang='".$_POST['mainlang']."' WHERE id=".$player -> id);
            
    $strMessage YOU_SELECT.$_POST['mainlang'];
            if (
    $_POST['seclang'] != $_POST['mainlang'] || isset($player -> seclang))
            {
                
    $db -> Execute("UPDATE players SET seclang='".$_POST['seclang']."' WHERE id=".$player -> id);
                
    $strMessage $strMessage.AND_SECOND.$_POST['seclang'];
            }
            
    $strMessage $strMessage." <a href=\"account.php\">".A_REFRESH."</a>";
            
    $smarty -> assign("Message"$strMessage);
        }

    }

    Pierwsza część kodu...
    Ostatnio edytowane przez Viperx ; 22-12-2008 o 19:05

  2. #2
    Zarejestrowany
    Dołączył
    Dec 2008
    Posty
    6

    Domyślnie

    Kod php:
    /**
     * Display info about changes in game
     */
    if (isset($_GET['view']) && $_GET['view'] == 'changes')
    {
        
    $objChanges $db -> SelectLimit("SELECT `author`, `location`, `text`, `date` FROM `changelog` WHERE `lang`='".$player -> lang."' ORDER BY `id` DESC"30);
        
    $i 0;
        
    $arrAuthor = array();
        
    $arrDate = array();
        
    $arrText = array();
        
    $arrLocation = array();
        while (!
    $objChanges -> EOF)
        {
            
    $arrAuthor[$i] = $objChanges -> fields['author'];
            
    $arrDate[$i] = $objChanges -> fields['date'];
            
    $arrLocation[$i] = $objChanges -> fields['location'];
            
    $arrText[$i] = $objChanges -> fields['text'];
            
    $i ++;
            
    $objChanges -> MoveNext();
        }
        
    $objChanges -> Close();
        
    $smarty -> assign(array("Changesinfo" => CHANGES_INFO,
                                
    "Changeloc" => CHANGE_LOC,
                                
    "Changeauthor" => $arrAuthor,
                                
    "Changedate" => $arrDate,
                                
    "Changelocation" => $arrLocation,
                                
    "Changetext" => $arrText));
    }

    /**
    * Additional options
    */
    if (isset($_GET['view']) && $_GET['view'] == 'options')
    {
        if (
    $player -> battlelog == 'Y')
        {
            
    $strChecked 'checked';
        }
            else
        {
            
    $strChecked '';
        }
        if (
    $player -> graphbar == 'Y')
        {
            
    $strChecked2 'checked';
        }
            else
        {
            
    $strChecked2 '';
        }
        
    $smarty -> assign(array("Toptions" => T_OPTIONS,
                                
    "Tbattlelog" => T_BATTLELOG,
                                
    "Tgraphbar" => T_GRAPHBAR,
                                
    "Anext" => A_NEXT,
                                
    "Checked" => $strChecked,
                                
    "Checked2" => $strChecked2));
        if (isset(
    $_GET['step']) && $_GET['step'] == 'options')
        {
            if (isset(
    $_POST['battlelog']))
            {
                
    $db -> Execute("UPDATE `players` SET `battlelog`='Y' WHERE `id`=".$player -> id);
            }
                else
            {
                
    $db -> Execute("UPDATE `players` SET `battlelog`='N' WHERE `id`=".$player -> id);
            }
            if (isset(
    $_POST['graphbar']))
            {
                
    $db -> Execute("UPDATE `players` SET `graphbar`='Y' WHERE `id`=".$player -> id);
            }
                else
            {
                
    $db -> Execute("UPDATE `players` SET `graphbar`='N' WHERE `id`=".$player -> id);
            }
            
    $smarty -> assign("Message"A_SAVED);
        }
    }

    /**
    * Account freeze
    */
    if (isset($_GET['view']) && $_GET['view'] == 'freeze')
    {
        
    $smarty -> assign(array("Freezeinfo" => FREEZE_INFO,
                                
    "Howmany" => HOW_MANY,
                                
    "Afreeze2" => A_FREEZE2));
        if (isset(
    $_GET['step']) && $_GET['step'] == 'freeze')
        {
            if (!
    ereg("^[1-9][0-9]*$"$_POST['amount']))
            {
                
    error(ERROR);
            }
            if (
    $_POST['amount'] > 21)
            {
                
    error(TOO_MUCH);
            }
            
    $db -> Execute("UPDATE players SET freeze=".$_POST['amount']." WHERE id=".$player -> id);
            
    $smarty -> assign("Message"YOU_BLOCK.$_POST['amount'].NOW_EXIT);
            
    session_unset();
            
    session_destroy();
        }
    }

    /**
    * Assign immunited
    */
    if (isset ($_GET['view']) && $_GET['view'] == "immu") {
        if (isset (
    $_GET['step']) && $_GET['step'] == 'yes') {
            if (
    $player -> immunited == 'Y') {
                
    error ("Posiadasz już immunitet!");
            }
            if (
    $player -> clas == '') {
             
    error ("Musisz najpierw wybrać klasÄ™ postaci");
            }
            
    $db -> Execute("UPDATE players SET immu='Y' WHERE id=".$player -> id);
        }
    }

    /**
    * Player reset
    */
    if (isset ($_GET['view']) && $_GET['view'] == "reset") {
        if (isset (
    $_GET['step']) && $_GET['step'] == 'make') {
            
    $code rand(1,1000000);
         
    $message "DostaÅ‚eÂ? ten list ponieważ chciaÅ‚eÂ? zresetować postać. Jeżeli nadal pragniesz zresetować swojÂ? postać na ".$gamename." (".$player -> user." ID: ".$player -> id.") wejdÄ? w ten link ".$gameadress."/preset.php?id=".$player -> id."&code=".$code." Jeżeli jednak nie chcesz resetować postaci (bÂ?dÄ? ktoÂ? inny za ciebie zgÅ‚osiÅ‚ takÂ? chęć) wejdÄ? w ten link ".$gameadress."/preset.php?id=".$player -> id." Pozdrawiam Thindil";
         
    $adress $_SESSION['email'];
         
    $subject "Reset konta gracza na ".$gamename;
         require_once(
    'mailer/mailerconfig.php');
            if (!
    $mail -> Send()) {
               
    error("WiadomoÂ?ć nie zostaÅ‚a wysÅ‚ana. BÅ‚Â?d:<br> ".$mail -> ErrorInfo);
            }
            
    $db -> Execute("INSERT INTO reset (player, code) VALUES(".$player -> id.",".$code.")") or error("nie mogÄ™ wykonać zapytania");        
        }
    }

    /**
    * Avatar options
    */
    if (isset($_GET['view']) && $_GET['view'] == "avatar") {
        
    $file 'avatars/'.$player -> avatar;
        if (
    is_file($file)) {
            
    $smarty -> assign (array ("Value" => $player -> avatar"Avatar" => $file));
        }
        if (isset(
    $_GET['step']) && $_GET['step'] == 'usun') {
     
    $plik 'avatars/'.$_POST['av'];
     if (
    is_file($plik)) {
         
    unlink($plik);
         
    $db -> Execute("UPDATE players SET avatar='' WHERE id=".$player -> id) or error("nie mogÄ™ skasować");
         
    error ("Avatar usuniÄ™ty. <a href=\"account.php?view=avatar\">OdÂ?wież</a><br>");
     } else {
         
    error ("Nie ma takiego pliku!");
     }
        }
        if (isset(
    $_GET['step']) && $_GET['step'] == 'dodaj') {
            if (!(
    $_FILES['plik']['name'])) {
                
    error("Nie podaÅ‚eÂ? nazwy pliku!");
            }
     
    $plik $_FILES['plik']['tmp_name'];
     
    $nazwa $_FILES['plik']['name'];
     
    $typ $_FILES['plik']['type'];
     if (
    $typ != 'image/pjpeg' && $typ != 'image/jpeg' && $typ != 'image/gif') {
         
    error ("ZÅ‚y typ pliku!");
     }
     if (
    $typ == 'image/pjpeg' || $typ == 'image/jpeg') {
         
    $liczba rand(1,1000000);
         
    $newname md5($liczba).'.jpg';
         
    $miejsce 'avatars/'.$newname;
     }
     if (
    $typ == 'image/gif') {
         
    $liczba rand(1,1000000);
         
    $newname md5($liczba).'.gif';
         
    $miejsce 'avatars/'.$newname;
     }
     if (
    is_uploaded_file($plik)) {
         if (!
    move_uploaded_file($plik,$miejsce)) {
      
    error ("Nie skopiowano pliku!");
         }
     } else {
         
    error ("Zapomij o tym");
     }
     
    $db -> Execute("UPDATE players SET avatar='".$newname."' WHERE id=".$player -> id) or error("nie mogÄ™ dodać!");
     
    error ("Avatar zaÅ‚adowany! <a href=\"account.php?view=avatar\">OdÂ?wież</a><br>");
        }
    }

    /**
    * Change nick for player
    */
    if (isset($_GET['view']) && $_GET['view'] == "name") {
        if (isset(
    $_GET['step']) && $_GET['step'] == "name") {
         if (empty (
    $_POST['name'])) {
             
    error ("Podaj imiÄ™.");
         } else {
             
    $_POST['name'] = str_replace("'","",strip_tags($_POST['name']));
             if (
    $_POST['name'] == 'Admin' || $_POST['name'] == 'Staff') {
              
    error ("Zapomnij o tym");
             } else {
              
    $query $db -> Execute("SELECT id FROM players WHERE user='".$_POST['name']."'");
              
    $dupe $query -> RecordCount();
              
    $query -> Close();
              if (
    $dupe 0) {
                  
    error ("To imiÄ™ jest już zajÄ™te.");
              } else {
                  
    $db -> Execute("UPDATE players SET user='".$_POST['name']."' WHERE id=".$player -> id);
                  
    error ("ZmieniÅ‚eÂ? imiÄ™ na <b>".$_POST['name']."</b>.");
              }
             }
         }
        }

    Druga część kodu...
    Ostatnio edytowane przez Viperx ; 22-12-2008 o 19:09

  3. #3
    Zarejestrowany
    Dołączył
    Dec 2008
    Posty
    6

    Domyślnie

    Kod php:
    // zmiana opisu na liÅ›cie graczy
    if (isset($_GET['view']) && $_GET['view'] == "opis") {
        if (isset(
    $_GET['step']) && $_GET['step'] == "opis") {
         if (empty (
    $_POST['opis'])) {
             
    error ("Podaj opis.");
         } else {
             
    $_POST['opis'] = str_replace("'","",strip_tags($_POST['opis']));
             if (
    $_POST['opis'] == 'Admin' || $_POST['opis'] == 'Staff') {
              
    error ("Zapomnij o tym");
             } else {
              
    $query $db -> Execute("SELECT id FROM players WHERE user='".$_POST['opis']."'");
              
    $dupe $query -> RecordCount();
              
    $query -> Close();
              if (
    $dupe 0) {
                  
    error ("To imiÄ™ jest już zajÄ™te.");
              } else {
                  
    $db -> Execute("UPDATE players SET opis='".$_POST['opis']."' WHERE id=".$player -> id);
                  
    error ("ZmieniÅ‚eÂ? opis na <b>".$_POST['opis']."</b>.");
              }
             }
         }
        }
    }

    /**
    * Change password to account
    */
    if (isset($_GET['view']) && $_GET['view'] == "pass") {
        if (isset(
    $_GET['step']) && $_GET['step'] == "cp") {
         if (empty (
    $_POST['np'])) {
             
    error ("WypeÅ‚nij wszystkie pola.");
            }
         if (empty (
    $_POST['cp'])) {
             
    error ("WypeÅ‚nij wszystkie pola.");
         }
            require_once(
    'includes/verifypass.php');
            
    verifypass($_POST['np'],'account');     
         
    $_POST['np'] = str_replace("'","",strip_tags($_POST['np']));
         
    $_POST['cp'] = str_replace("'","",strip_tags($_POST['cp']));
         
    $db -> Execute("UPDATE players SET pass = MD5('".$_POST['np']."') WHERE pass = MD5('".$_POST['cp']."') AND id=".$player -> id);
         
    $_SESSION['pass'] = $_POST['np'];     
         
    error ("ZmieniÅ‚eÂ? hasÅ‚o z ".$_POST['cp']." na ".$_POST['np']);
        }
    }

    /**
    * Profile edit
    */
    if (isset($_GET['view']) && $_GET['view'] == "profile") {
        require_once(
    'includes/bbcode.php');
        
    $profile htmltobbcode($player -> profile);
        
    $smarty -> assign ("Profile"$profile);
        if (isset(
    $_GET['step']) && $_GET['step'] == "profile") {
         if (empty (
    $_POST['profile'])) {
             
    error ("WypeÅ‚nij wszystkie pola.");
         }
         require_once(
    'includes/bbcode.php');
                
    $_POST['profile'] = bbcodetohtml($_POST['profile']);
         
    $db -> Execute("UPDATE players SET profile = '".$_POST['profile']."' WHERE id = '".$player -> id."'");
            
    $smarty -> assign ("Profile",$_POST['profile']);
        }
    }

    /**
    * Email and comunicators edit
    */
    if (isset($_GET['view']) && $_GET['view'] == 'eci'
    {
        
    $arrComname = array(COMM1COMM2COMM3T_DELETE);
        
    $arrComlink = array(COMLINK1COMLINK2COMLINK3T_DELETE);
        
    $smarty -> assign(array("Oldemail" => OLD_EMAIL,
                                
    "Newemail" => NEW_EMAIL,
                                
    "Newgg" => NEW_GG,
                                
    "Change" => CHANGE,
                                
    "Tcommunicator" => T_COMMUNICATOR,
                                
    "Tcom" => $arrComname,
                                
    "Comm" => $arrComlink));

        
    /**
         * Change communicator
         */
        
    if (isset($_GET['view']) && $_GET['view'] == 'eci') {
        if (empty(
    $player -> gg)) {
         
    $player -> gg '';
        }
        
    $smarty -> assign("GG"$player -> gg);
        if (isset(
    $_GET['step']) && $_GET['step'] == "gg") {
         if (!
    ereg("^[0-9]*$"$_POST['gg'])) {
             
    error ("Zapomnij o tym");
         }
         
    $query$db -> Execute("SELECT id FROM players WHERE gg='".$_POST['gg']."'");
         
    $dupe $query -> RecordCount();
         
    $query -> Close();
         if (
    $dupe && $_POST['gg'] != 0) {
             
    error ("KtoÂ? już posiada taki adres gadu-gadu.");
         }
         
    $db -> Execute("UPDATE players SET gg=".$_POST['gg']." WHERE id=".$player -> id) or error ("Nie mogÄ™ dodać");
         
    error ("ZmieniÅ‚eÂ? numer gadu-gadu na ".$_POST['gg']."<br>");
        }
        if (isset(
    $_GET['step']) && $_GET['step'] == "ce") {
         if (empty (
    $_POST["ne"])) {
             
    error ("WypeÅ‚nij wszystkie pola.");
         }
         if (empty (
    $_POST["ce"])) {
             
    error ("WypeÅ‚nij wszystkie pola.");
         }
            require_once(
    'includes/verifymail.php');
            if (
    MailVal($_POST['ne'], 2)) {
                
    error("NieprawidÅ‚owy adres email.");
            }     
         
    $query $db -> Execute("SELECT id FROM players WHERE email='".$_POST['ne']."'");
         
    $dupe $query -> RecordCount();
         
    $query -> Close();     
         if (
    $dupe 0) {
             
    error ("KtoÂ? już posiada taki adres email.");
         }
         
    $db -> Execute("UPDATE players SET email = '".$_POST['ne']."' WHERE email = '".$_POST['ce']."' AND id = '".$player -> id."'") or error ("ZÅ‚y mail");
         
    error ("ZmieniÅ‚eÂ? adres e-mail z ".$_POST['ce']." na ".$_POST['ne'].". Zamknij to okno przeglÂ?darki i zaloguj siÄ™ ponownie.");
        }
    }

    /**
    * Graphic style change
    */
    if (isset($_GET['view']) && $_GET['view'] == 'style') {
        
    /**
        * Wybór stylu tekstowego
        */
        
    $path 'css/';
        
    $dir opendir($path);
        
    $arrname = array();
        
    $i 0;
        while (
    $file readdir($dir)) 
        {
            if (
    ereg(".css*$"$file)) 
            {
                
    $arrname[$i] = $file;
                
    $i $i 1;
            }
        }
        
    closedir($dir); 
        
    /**
        * Check avaible layouts
        */    
         
    $path 'templates/';
        
    $dir opendir($path);
        
    $arrname1 = array();
        
    $i 0;
        while (
    $file readdir($dir))
        {
            if (!
    ereg(".htm*$"$file) && !ereg(".tpl*$"$file))
            {
                if (!
    ereg("\.$"$file))
                {
                    
    $arrname1[$i] = $file;
                    
    $i $i 1;
                }
            }
        }
        
    closedir($dir);
        
    /**
        * Assign variables to template
        */
         
    $smarty -> assign(array("Stylename" => $arrname"Layoutname" => $arrname1));
        
    /**
        * If player choice text style
        */
       
    if (isset($_GET['step']) && $_GET['step'] == 'style') {
            
    $_POST['newstyle'] = strip_tags($_POST['newstyle']);
            if (
    $player -> graphic)
            {
                
    $db -> Execute("UPDATE players SET graphic='' WHERE id=".$player -> id);
            }
            
    $db -> Execute("UPDATE players SET style='".$_POST['newstyle']."' where id=".$player -> id);
        }
        
    /**
        * If player choice graphic layout
        */
        
    if (isset($_GET['step']) && $_GET['step'] == 'graph')
        {
            
    $_POST['graphserver'] = strip_tags($_POST['graphserver']);
            
    $db -> Execute("UPDATE players SET graphic='".$_POST['graphserver']."' WHERE id=".$player -> id) or error("BÅ‚Â?d!".$path." ".$player -> id);
        }

    /**
    * Initialization of variables
    */
    if (!isset($_GET['view'])) {
        
    $_GET['view'] = '';
    }
    if (!isset(
    $_GET['step'])) {
        
    $_GET['step'] = '';
    }

    /**
    * Assign variables and display page
    */
    $smarty -> assign (array ("View" => $_GET['view'], "Step" => $_GET['step']));
    $smarty -> display('account.tpl');

    require_once(
    "includes/foot.php");
    $db -> Close();
    ?> 
    Linijka 717 to ?> a więc zamkniecie PHP
    Ostatnio edytowane przez Viperx ; 22-12-2008 o 19:10

  4. #4
    Pesymista :( Awatar Harrocan
    Dołączył
    Sep 2007
    Posty
    1,663

    Domyślnie

    Zaraz wyjdÄ™ z siebie i stanÄ™ obok....
    Kolega słyszał o cgvi'owskim wklej kodzie, albo o zwykłym wklejto? Jeśli nie to polecam usłyszeć.
    24h na poprawÄ™ albo kosz i warn.

  5. #5
    Grupa MmoCenter Awatar Kiri
    Dołączył
    Sep 2007
    Posty
    1,741

    Domyślnie

    GDZIE?? nie domknąłeś klamry i się pluje, jakieś modyfikacje na account.php były?

  6. #6
    Zarejestrowany
    Dołączył
    Dec 2008
    Posty
    6

    Domyślnie

    Zgadza się ostatnio wprowadzałem opisy i overlib i to jest powód wystąpienia tego komunikatu jednakże żadnej "usterki" się niedpatrzyłem...potrzebuje świeżego spojrzenia...

  7. #7
    Grupa MmoCenter Awatar Kiri
    Dołączył
    Sep 2007
    Posty
    1,741

    Domyślnie

    ehhh... opisy na podstawie imienia... i po co sprawdzać czy opis jest pusty, czy nie jest czasem słowem "admin" lub "staff" oraz czy się powtarza... -_-'


    Zmień te Swoje opisy na:

    Kod php:
    // zmiana opisu na liÅ›cie graczy
    if(isset($_GET['view']) && $_GET['view'] == "opis")
    {
        if (isset(
    $_GET['step']) && $_GET['step'] == "opis"
        {
            
    $_POST['opis'] = str_replace("'","",strip_tags($_POST['opis']));
            
    $strOpis $db -> qstr($_POST['opis'], get_magic_quotes_gpc());
            
    $db -> execute('UPDATE players SET opis='.$strOpis.' WHERE id='.$player -> id);
            
    error ('ZmieniÅ‚eÅ› opis na <b>'.$_POST['opis'].'</b>.');
        }


    Aha, i jak dobrze widzę to klamra wyparowała po:


    Kod php:
        /**
        * If player choice graphic layout
        */
        
    if (isset($_GET['step']) && $_GET['step'] == 'graph')
        {
            
    $_POST['graphserver'] = strip_tags($_POST['graphserver']);
            
    $db -> Execute("UPDATE players SET graphic='".$_POST['graphserver']."' WHERE id=".$player -> id) or error("BÅ‚Â?d!".$path." ".$player -> id);
        } 
    Prawie na samym końcu.

  8. #8
    Zarejestrowany
    Dołączył
    Dec 2008
    Posty
    6

    Domyślnie

    Zamknąłem jedną klamrę...lecz nadal występuje ten sam problem...czy przeoczyłem coś jeszcze...?

  9. #9
    Zarejestrowany
    Dołączył
    Dec 2008
    Posty
    6

    Domyślnie

    Już sobie poradziłem ....Dziękuje za udzieloną mi pomoc Kiri...

Informacje o wÄ…tku

Użytkownicy przeglądający ten wątek

Aktualnie 1 użytkownik(ów) przegląda ten wątek. (0 zarejestrowany(ch) oraz 1 gości)

Podobne wÄ…tki

  1. Sklep i ekwipunek. Błędy w kodzie i konstrukcja tabeli.
    Przez Croos w dziale Problemy przy tworzeniu własnej gry
    Odpowiedzi: 4
    Ostatni post / autor: 27-08-2010, 05:11
  2. Błąd w kodzie \radio i post
    Przez haxigi w dziale Problemy przy tworzeniu własnej gry
    Odpowiedzi: 4
    Ostatni post / autor: 25-04-2010, 13:20
  3. Funkcje czy w kodzie
    Przez Armed79 w dziale PHP / MySql
    Odpowiedzi: 12
    Ostatni post / autor: 04-06-2009, 20:22

Zakładki

Uprawnienia umieszczania postów

  • Nie możesz zakÅ‚adać nowych tematów
  • Nie możesz pisać wiadomoÅ›ci
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów
  •