Changeset 61 for trunk/client_files/Generate/search_var.php
- Timestamp:
- Feb 4, 2009, 9:51:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client_files/Generate/search_var.php
r40 r61 14 14 15 15 function set_name($text) 16 { // BEGIN function get_name16 { 17 17 global $buffer; 18 18 $text = substr($text, strpos($text, '$g')+2, strlen($text)-strpos($text, '$g')); … … 20 20 $men = substr($text, 0, strpos($text, ':')); 21 21 $women = substr($text, strpos($text, ':')+1, strlen($text)-strpos($text, ':')+1); 22 if (isset($buffer[$men]) == false and ($men <> '') and ($women <> '') and (strlen($men) < 10) and (strlen($women) < 10)) { 22 if (isset($buffer[$men]) == false and ($men <> '') and ($women <> '') and (strlen($men) < 10) and (strlen($women) < 10)) 23 { 23 24 $buffer[$men] = $women; 24 25 // echo $men.' '.$women.'<br />'; 25 26 } 26 } // END function get_name27 } 27 28 28 29 … … 31 32 // echo $sql.'<br /><br />'; 32 33 $ID = $Database->SQLCommand($sql); 33 while ($Line = mysql_fetch_array($ID)) { 34 while ($Line = mysql_fetch_array($ID)) 35 { 34 36 // $language = $Line['Language']; 35 37 $text = strtolower($Line['Details']); … … 47 49 48 50 $sql = 'SELECT '; 49 for ($i=0;$i<8 ;++$i ) { 50 for ($j=0;$j<2 ;++$j ) { 51 for ($i=0;$i<8 ;++$i ) 52 { 53 for ($j=0;$j<2 ;++$j ) 54 { 51 55 $sql = $sql."text".$i."_$j,"; 52 56 } 53 57 } 54 58 $sql = substr($sql, 0, strlen($sql)-1); 55 $sql = $sql." FROM npc_text WHERE "; 56 for ($i=0;$i<8 ;++$i ) { 57 for ($j=0;$j<2 ;++$j ) { 59 $sql = $sql." FROM npc WHERE "; 60 for ($i=0;$i<8 ;++$i ) 61 { 62 for ($j=0;$j<2 ;++$j ) 63 { 58 64 $sql = $sql."text".$i."_$j LIKE '%\$G%' OR "; 59 65 } 60 66 } 61 for ($i=0;$i<8 ;++$i ) { 62 for ($j=0;$j<2 ;++$j ) { 67 for ($i=0;$i<8 ;++$i ) 68 { 69 for ($j=0;$j<2 ;++$j ) 70 { 63 71 $sql = $sql."text".$i."_$j LIKE '%\$g%' OR "; 64 72 } 65 73 } 66 $sql = substr($sql, 0, strlen($sql) -3);74 $sql = substr($sql, 0, strlen($sql) - 3); 67 75 68 76 69 77 $ID = $Database->SQLCommand($sql); 70 while ($Line = mysql_fetch_array($ID)) { 78 while ($Line = mysql_fetch_array($ID)) 79 { 71 80 // $language = $Line['Language']; 72 81 73 for ($i=0;$i<8 ;++$i ) { 74 for ($j=0;$j<2 ;++$j ) { 82 for ($i = 0; $i < 8 ;++$i ) 83 { 84 for ($j = 0; $j < 2 ;++$j ) 85 { 75 86 $text = strtolower($Line["text".$i."_$j"]); 76 87 set_name($text); … … 80 91 81 92 echo '$var_g = array(<br />'; 82 foreach ($buffer as $key=>$value) { 93 foreach ($buffer as $key => $value) 94 { 83 95 // echo $key.'-'.$value.'<br />'; 84 96 echo " array('$key','$value'),<br />";
Note:
See TracChangeset
for help on using the changeset viewer.