Changeset 76
Legend:
- Unmodified
- Added
- Removed
-
aa/aa.php
r68 r76 8 8 } 9 9 10 if (isset($_GET["start"])) { 11 $start = $_GET["start"]; 12 setcookie("start", $start); 13 } else { 14 $start = $_COOKIE["start"]; 15 } 16 10 17 $order = isset_or($_GET["order"], "pillage_at"); 11 18 $shownin = isset_or($_GET["shownin"], "desc"); 19 //$start = isset_or($_GET["start"], 0); 20 21 $start_village = new Village; 22 if ($start) { 23 $start_village->Find($start); 24 } 12 25 ?> 13 26 <html> … … 27 40 <p class="notice">공격 ëì ë§ì ìŽëŠì ëë¬ì ë§ì ì 볎륌 ì 28 41 ë ¥íìžì. ëšì ìì ììëì ë°ëŒ ë€ë¥ž ìê¹ë¡ íìíŽì€ëë€.<br /> 29 <a href="http://www.mozilla.or.kr/ko/">íìŽìŽíì€</a>ìì ë ë§ì êž°ë¥ìŽ ì§ìë©ëë€. :)<br />42 <a href="http://www.mozilla.or.kr/ko/">íìŽìŽíì€</a>ìì ë ë§ì êž°ë¥ìŽ ì§ìë©ëë€. :)<br /> 30 43 <a href="/tw">귞늬ì€ëªœí€ ì ëìš</a>ì ìì볎ìžì!</p> 31 44 ëšì êž°ë§ ì: <input id="light" size="6" /> | … … 34 47 <input type="submit" value="go" onclick="walk_target()" /> 35 48 <p> 36 ì¶ì ë§ì: 37 <select name="start"> 38 <option value="0" default>Ʞ볞 ê·žëë¡</option> 39 <?=show_villages_option($owner, "")?> 40 </select> 49 <form method="get"> 50 ì¶ì ë§ì: 51 <select name="start"> 52 <option value='0'>Ʞ볞 ê·žëë¡</option> 53 <?=show_villages_option($owner, $start_village->name)?> 54 </select> 55 <input type="submit" value="ë³ê²œ" /> 56 <input type="hidden" name="order" value="<?=$order?>" /> 57 <input type="hidden" name="shownin" value="<?=$shownin?>" /> 58 </form> 41 59 </p> 42 60 <?=show_target_list($owner, $order, $shownin)?> -
aa/show.php
r38 r76 94 94 $default = ""; 95 95 if ($name == $villageName) { 96 $default = " default";96 $default = " selected"; 97 97 } 98 98 echo "<option value='$vid'$default>$name</option>"; 99 99 } 100 echo "\n"; 100 101 } 101 102 -
aa/show.target.php
r68 r76 46 46 47 47 function unserialize($record) { 48 global $start, $start_village; 49 48 50 $this->record["tid"] = $record['tid']; 49 51 $x = $record['x']; … … 51 53 $this->record["x"] = $x; 52 54 $this->record["y"] = $y; 53 $village = get_village($record['village']); 55 if ($start) { 56 $village = $start_village; 57 } else { 58 $village = get_village($record['village']); 59 } 54 60 $this->record["village"] = $village; 55 61 $this->record["direction"] = $this->record["village"]->direction($x, $y); 56 $distance = $record['distance']; 57 if ($distance == 0) { 58 $distance = calc_distance($village, $x, $y); 59 db_update_distance($this->at("tid"), $distance); 60 } 62 $distance = calc_distance($village, $x, $y); 61 63 $this->record["distance"] = $distance; 62 64 $this->record["name"] = $record['name']; … … 195 197 <tr{$target->styleClass()}> 196 198 <td><input style='font-size: smaller' type='button' value=' go ' onClick='aa({$target->at("tid")}, {$target->at("expected")})'> | <input style='font-size: smaller' type='button' value=' auto ' onClick='aaa({$target->at("tid")}, {$target->at("expected")})'></td> 197 <td name='village'>{$target->at("village")->name}</ a></td>199 <td name='village'>{$target->at("village")->name}</td> 198 200 <td name=''> -> </td> 199 201 <td name='name'><a href='resource.php?name={$target->at("name")}&tid={$target->at("tid")}&x={$target->at("x")}&y={$target->at("y")}' title='$title'>{$target->at("name")}</a></td>
