示例#1
0
 public function executeAjaxSearch(sfWebRequest $request)
 {
     $query = $request->getGetParameter('query');
     $profiles = ProfileTable::findProfilesByNameSimilarTo($query);
     $display_string = "<table>";
     foreach ($profiles as $profile) {
         $display_string .= "<tr>";
         $url = $this->generateUrl('profile', array('uid' => $profile['uid']));
         $display_string .= "<td><img src = http://rks.ath.cx:8080/nexus+/web/images/" . $profile['pic'] . " width = '30' height = '30'/><a class = 'ajax_search_result' href = {$url}>" . $profile['name'] . "</a></td>";
         $display_string .= "</tr>";
     }
     $display_string .= "</table>";
     $this->renderText($display_string);
     //sleep(1);
     return sfView::NONE;
 }