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']);
         }
     }
 }
예제 #2
0
 function formatListForList($params)
 {
     $model = $this->getModelForList();
     $placeModel = new Place();
     foreach ($params as $k => $row) {
         $params[$k]['typeText'] = $model->getTypeText($row['type']);
         $params[$k]['stateText'] = $model->getStateText($row['state']);
         $extra = " WHERE `id`='{$row['p_id']}' ";
         $place = $placeModel->getOne(array(), 'ASC', $extra);
         $params[$k]['placeText'] = $placeModel->getLocationText($place['location']);
     }
     return $params;
 }