find('#sf_admin_bar');
//edit the reset button
$form[0]->find('.sf_admin_action_reset_filter', 0)->type = 'reset';
$form[0]->find('.sf_admin_action_reset_filter', 0)->onclick = '';
//remove the teams textfield
$form[0]->find('label[for=teams]', 0)->parent()->outertext = '';
//remove the fieldset at the end
$form[0]->find('fieldset', 2)->outertext = "";
//remove publication
$form[0]->find('#publication_type_row', 0)->outertext = '';
//modify the action
$form[0] = str_replace('action="/pax/index.php/index"', 'action="index.php"', $form[0]);
//output the form
echo '';
echo $form[0];
echo '
';
}
else{
//serialize the parameters
$para = "";
foreach($_GET['filters'] as $key=>$val){
$para .= "filters[$key]=$val&";
}
$para .= 'filters[teams]=dbtg&filter=filter';
curl_setopt($ch, CURLOPT_REFERER, 'http://www.ifi.uzh.ch/pax/index.php/index');
curl_setopt($ch, CURLOPT_URL, "http://www.ifi.uzh.ch/pax/index.php/index?$para");
$contents = curl_exec($ch);
$contents = str_replace('/pax/', 'http://www.ifi.uzh.ch/pax/', $contents);
$html = str_get_html($contents);
//find the div that contains the results
$div = $html->find('#sf_admin_content', 0);
//remove the sorting list
$div->find('form',0)->outertext = '';
//remove the links
if($div->find('span[property=swrc:title]', 0)){
foreach($div->find('span[property=swrc:title]') as $link){
$link->find('a', 0)->outertext = $link->find('a', 0)->plaintext;
}
}
echo $div;
}
curl_close($ch);
?>
By Galal Aly.