Changeset 114 for db/post_read.php


Ignore:
Timestamp:
Oct 27, 2007, 10:36:03 PM (17 years ago)
Author:
hosiplan
Message:

+ chyba ve vyhledávání, opravil jsem ji

File:
1 edited

Legend:

Unmodified
Added
Removed
  • db/post_read.php

    r113 r114  
    9898          };
    9999
    100         $this->sql_select = SQLselect_Strankovani("SELECT * FROM `quest_template` WHERE ( $where`Title` LIKE '%$q%' ) ORDER BY `entry` ASC", $this->limit, $this->nastranu, "?id=questy&q=".$this->q."&lvl_d=".$this->lvl_d."&lvl_h=".$this->lvl_h, $this->sid);
     100        $this->sql_select = SQLselect_Strankovani("SELECT * FROM `quest_template` WHERE ( $where`Title` LIKE '%".$this->q."%' ) ORDER BY `entry` ASC", $this->limit, $this->nastranu, "?id=questy&q=".$this->q."&lvl_d=".$this->lvl_d."&lvl_h=".$this->lvl_h, $this->sid);
    101101        if( @mysql_num_rows($this->sql_select[1]) > 0 ){
    102102          $this->sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" cellspacing=\"0\" cellpadding=\"0\">\n";
     
    117117                $this->sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>";
    118118                };
     119              $startovni_dotaz_item = mysql_query("SELECT * FROM item_template WHERE startquest='".$result['entry']."' ");
     120                if( @mysql_num_rows($startovni_dotaz_item) > 0 ){
     121                  while($start_item = @MySQL_Fetch_Array($startovni_dotaz_item)){
     122                  switch($start_item['Quality']){
     123                    case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break;
     124                    case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break;
     125                    case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break;
     126                    case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break;
     127                    case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break;
     128                    case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break;
     129                    case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break;
     130                    };
     131                  $this->sql_select['other']['StartNPC'] .= "<a href=\"index.php?item=".$start_item['entry']."\"".$sql_select['other']['item_color'].">".$start_item['name']."</a><br>\n";
     132                  }; };
    119133
    120134            $this->sql_select['result'] .= "</td>";
     
    202216              while($start_NPC = @MySQL_Fetch_Array($startovni_dotaz_item)){
    203217              switch($start_NPC['Quality']){
    204                 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break;
    205                 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break;
    206                 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break;
    207                 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break;
    208                 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break;
    209                 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break;
    210                 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break;
     218                case 0: $item_color = "class=\"graylink\""; break;
     219                case 1: $item_color = "class=\"whitelink\""; break;
     220                case 2: $item_color = "class=\"greenlink\""; break;
     221                case 3: $item_color = "class=\"bluelink\""; break;
     222                case 4: $item_color = "class=\"purplelink\""; break;
     223                case 5: $item_color = "class=\"orangelink\""; break;
     224                case 6: $item_color = "class=\"redlink\""; break;
    211225                };
    212               $this->sql_select['other']['StartNPC'] .= "<a href=\"index.php?item=".$start_NPC['entry']."\"".$sql_select['other']['item_color'].">".$start_NPC['name']."</a><br>\n";
     226              $this->sql_select['other']['StartNPC'] .= "<a href=\"index.php?item=".$start_NPC['entry']."\"".$item_color.">".$start_NPC['name']."</a><br>\n";
    213227              }; };
    214228          if( empty($this->sql_select['other']['StartNPC']) ){
     
    236250          if( @mysql_num_rows($SrcItemId_dotaz) > 0 ){
    237251              $SrcItemId = @MySQL_Fetch_Array($SrcItemId_dotaz);
    238               $this->sql_select['other']['SrcItemId'] .= "<a href=\"index.php?item=".$SrcItemId['entry']."\">".$SrcItemId['name']."</a><br>\n";
     252              switch($SrcItemId['Quality']){
     253                case 0: $item_color = "class=\"graylink\""; break;
     254                case 1: $item_color = "class=\"whitelink\""; break;
     255                case 2: $item_color = "class=\"greenlink\""; break;
     256                case 3: $item_color = "class=\"bluelink\""; break;
     257                case 4: $item_color = "class=\"purplelink\""; break;
     258                case 5: $item_color = "class=\"orangelink\""; break;
     259                case 6: $item_color = "class=\"redlink\""; break;
     260                };
     261              $this->sql_select['other']['SrcItemId'] .= "<a href=\"index.php?item=".$SrcItemId['entry']."\"".$item_color.">".$SrcItemId['name']."</a><br>\n";
    239262              };
    240263
Note: See TracChangeset for help on using the changeset viewer.