Esempio n. 1
0
 function getPostDataForInsert()
 {
     $model = $this->getModelForInsert();
     $typeTexts = $model->getTypeTexts();
     $place = new Place();
     $places = $place->getList(array(), " WHERE `deleted`='n' ", false);
     return array('name' => '', 'locationText' => '', 'typeTexts' => $typeTexts, 'model' => '', 'description' => '', 'remark' => '', 'amount' => 1, 'place' => 0, 'photo_path' => '', 'places' => $places['rows']);
 }
 function execute()
 {
     $place = new Place();
     $list = $place->getList(array(), " WHERE `deleted`='n' ", false);
     header("Content-Type:text/html;charset=utf-8");
     $optionTpl = '<option value="%s">%s(%s)</option>';
     if ($list) {
         foreach ($list as $row) {
             $row['locationText'] = $place->getLocationText($row['location']);
             echo sprintf($optionTpl, $row['id'], $row['name'], $row['locationText']);
         }
     }
 }