function drawSearchVideoList($searcTerm, $getParams) { $se = new VideoThing(); $searchFeed = $se->searchOnYT(iconv("windows-1251", "utf-8", $searcTerm)); $sercherArr = $se->printVideoEntry($searchFeed); if ($sercherArr == NULL) { return "По Вашему запросу ничего не найдено."; } foreach ($sercherArr as $key) { $img = "<img src = \"{$key['Preview']}\">"; $title = "{$key['VideoTitle']} \n <br /> VideoID: {$key['VideoId']} \n"; $flashUrl = $key["FlashPlayer"]; $div = $div . "<div style=\"border:1px solid #999999; height: auto; margin: 3px; height: 140px; width: auto;\">\n\t\t\t<div style=\"float:left; border-right: 1px solid #999999; width: auto; \">{$img}</div> \n\t\t\t<div style=\"float: left; height: auto; padding: 10px ;\"> {$title} \n <br /> \n\t\t\t<a href=\"/video/?v={$key['VideoId']}\"> просмотр</a>\n\t\t\t<br />\n\t\t\t{$flashUrl}\n\t\t\t<div id=\"added{$key['VideoId']}\"> </div>\n\t\t\t<div>\n\t\t\t<form>\n\t\t\t<input type=\"button\" id=\"addVideo{$key['VideoId']}\" value=\"Добавить к себе\" onClick=\"addVideo('{$key['VideoId']}','{$key['VideoTitle']}')\"> \n\t\t\t</form>\n\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>"; } return $div; }