Changeset 380 for beta/inc/server.php
- Timestamp:
- Sep 23, 2008, 7:40:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
beta/inc/server.php
r377 r380 5 5 { 6 6 $this -> db = $db; 7 } 8 // -- 9 public function HumanDate ($date) 10 { 11 // input date is 0000-00-00 00:00:00 12 $date_arr = explode(" ",$date); 13 $date = explode("-",$date_arr[0]); 14 $time_stp = explode(":",$date_arr[1]); 15 $time = mktime($time_stp[0],$time_stp[1],$time_stp[2],$date[1],$date[2],$date[0]); 16 $human_date = date ("d.m.Y H:i:s",$time); 17 return $human_date; 7 18 } 8 19 // -- … … 78 89 $row = $this -> db -> query("SELECT COUNT(*) FROM account") -> fetch_array(); 79 90 return($row[0]); 80 }81 // --82 public function FindDrop ($item)83 {84 $this -> db -> select_db("mangos");85 $sql = $this -> db -> query("SELECT * FROM `creature_loot_template` WHERE `item` = '".$item."' ORDER BY ;");86 while ($row = $sql -> fetch_array())87 {88 echo "89 <table>90 <tr>91 <td>Šance</td>92 <td></td>93 </tr>94 </table>95 ";96 }97 98 99 }100 // --101 public function FindNpc ($npc)102 {103 $this -> db -> select_db("mangos");104 91 } 105 92 // -- … … 141 128 else 142 129 {$sel_name = "";} 143 $date_arr = explode(" ",$edited_arr[0]); 144 $date = explode("-",$date_arr[0]); 145 $time_stp = explode(":",$date_arr[1]); 146 $time = mktime($time_stp[0],$time_stp[1],$time_stp[2],$date[1],$date[2],$date[0]); 147 $human_date = date ("d.m.Y H:i:s",$time); 130 $human_date = $this -> HumanDate ($edited_arr[0]); 148 131 echo " 149 132 <tr> … … 163 146 $edited = str_replace(")", "", $edited); 164 147 $edited_arr = explode(";",$edited); 165 166 $date_arr = explode(" ",$edited_arr[0]); 167 $date = explode("-",$date_arr[0]); 168 $time_stp = explode(":",$date_arr[1]); 169 $time = mktime($time_stp[0],$time_stp[1],$time_stp[2],$date[1],$date[2],$date[0]); 170 $human_date = date ("d.m.Y H:i:s",$time); 171 148 $human_date = $this -> HumanDate ($edited_arr[0]); 172 149 echo " 173 150 <tr> … … 189 166 $edited_arr = explode(";",$edited); 190 167 191 $date_arr = explode(" ",$edited_arr[0]); 192 $date = explode("-",$date_arr[0]); 193 $time_stp = explode(":",$date_arr[1]); 194 $time = mktime($time_stp[0],$time_stp[1],$time_stp[2],$date[1],$date[2],$date[0]); 195 $human_date = date ("d.m.Y H:i:s",$time); 168 $human_date = $this -> HumanDate ($edited_arr[0]); 196 169 echo " 197 170 <tr>
Note:
See TracChangeset
for help on using the changeset viewer.