| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare SiteMgr - Web Content Management * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 /* $Id: class.module_google.inc.php 20295 2006-02-15 12:31:25Z $ */ 13 14 class module_google extends Module 15 { 16 function module_google() 17 { 18 $this->arguments = array( 19 'sitesearch' => array( 20 'type' => 'textfield', 21 'params' => array('size' => 40), 22 'default' => str_replace(array('localhost','127.0.0.1'),'',$_SERVER['HTTP_HOST']), 23 'label' => lang('Domain-name (offical DNS-name eg. www.eGroupWare.org) if you want to give the user a choice between searching this site or the whole web. Leaving it empty allows to search the web only.') 24 ), 25 ); 26 $this->properties = array(); 27 $this->title = lang('Google'); 28 $this->description = lang('Interface to Google website'); 29 } 30 31 function get_content(&$arguments,$properties) 32 { 33 $content = '<form action="http://www.google.com/search" name="f" target="_blank">'."\n"; 34 $content .= '<img src="images/Google_25wht.gif" border="0" align="middle" hspace="0" vspace="0"><br />'."\n"; 35 $content .= '<input type="hidden" name="hl" value="'.$GLOBALS['sitemgr_info']['userlang'].'">'."\n"; 36 $content .= '<input type="hidden" name="ie" value="'.$GLOBALS['egw']->translation->charset().'">'."\n"; 37 $content .= '<input maxLength="256" size="15" name="q" value="">'."\n"; 38 $content .= '<input type="submit" value="' . lang('Search') . '" name="btnG" title="'.lang('Google Search').'">'."\n"; 39 if ($arguments['sitesearch']) 40 { 41 $content .= '<div style="margin-top: 5px;">'."\n"; 42 $content .= '<input id="this_site" type="radio" checked="1" name="sitesearch" value="'.$arguments['sitesearch'].'" />'."\n"; 43 $content .= '<label for="this_site">'.lang('this site')."</label>\n"; 44 $content .= '<input id="the_web" type="radio" name="sitesearch" value="" />'."\n"; 45 $content .= '<label for="the_web">'.lang('the web')."</label>\n"; 46 $content .= "</div>\n"; 47 } 48 $content .= "</form>\n"; 49 50 return $content; 51 } 52 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |