コード例 #1
0
ファイル: menueselector.php プロジェクト: srueegger/1zu12bB
 /**
  *
  * @return string 
  */
 public function getCode()
 {
     $res = "<select name=\"" . $this->name . "\" style=\"" . $this->style . "\">";
     foreach (sys::getAllMenues() as $menue) {
         if ($menue->id == $this->value) {
             $res .= "<option value=\"" . $menue->id . "\" selected=\"1\">" . $menue->name . "</option>";
         } else {
             $res .= "<option value=\"" . $menue->id . "\">" . $menue->name . "</option>";
         }
     }
     $res .= "</select>";
     return $res;
 }