diff options
| author | Antonio Gallo <tonicucoz@gmail.com> | 2011-01-27 18:18:23 +0000 | 
|---|---|---|
| committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-01-27 18:18:23 +0000 | 
| commit | 4ace8344cfd8769ef059ec5c920ac663c8c1d4ce (patch) | |
| tree | 14427de964a8a0abb2596e97c50a37d5d979f16e | |
| parent | 4e4b0e82b62d9a5bdce92b3caa2ab18e16122ba0 (diff) | |
improved search and impagination with CSS
| -rw-r--r-- | h-source/Application/Controllers/SearchController.php | 29 | ||||
| -rw-r--r-- | h-source/Application/Include/languages.php | 2 | ||||
| -rw-r--r-- | h-source/Application/Include/myFunctions.php | 5 | ||||
| -rw-r--r-- | h-source/Application/Views/Search/form.php | 30 | ||||
| -rw-r--r-- | h-source/Application/Views/header.php | 19 | ||||
| -rw-r--r-- | h-source/Config/Route.php | 2 | ||||
| -rw-r--r-- | h-source/Public/Css/explorer6.css (renamed from h-source/Public/Css/explorer.css) | 7 | ||||
| -rw-r--r-- | h-source/Public/Css/explorer7.css | 12 | ||||
| -rwxr-xr-x | h-source/Public/Css/website.css | 47 | ||||
| -rwxr-xr-x | h-source/Public/Img/Glaze/viewmag.png | bin | 0 -> 980 bytes | 
10 files changed, 128 insertions, 25 deletions
diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php index f2f2abc..6f96595 100644 --- a/h-source/Application/Controllers/SearchController.php +++ b/h-source/Application/Controllers/SearchController.php @@ -67,8 +67,6 @@ class SearchController extends BaseController  				'-deleted'	=>	"no",  			); -// 			echo $this->viewArgs['type']; -			  			$recordNumber =  $this->m['HardwareModel']->clear()->where($whereClause)->orderBy("id_hard desc")->rowNumber();  			$data['recordNumber'] = $recordNumber; @@ -91,4 +89,31 @@ class SearchController extends BaseController  	} +	public function pciid($lang = 'en') +	{ +		if (isset($_POST['pciid'])) +		{ +			$clean['pciid'] = $this->request->post('pciid','','sanitizePciid'); +			$data['table'] = $this->m['HardwareModel']->clear()->select()->where(array('pci_id'=>$clean['pciid']))->send(); +			$data['recordNumber'] = 0; +			 +			$this->append($data); +			$this->cleverLoad('results'); +			$this->right(); +		} +	} + +	public function lspci($lang = 'en') +	{ +		if (isset($_POST['lspci'])) +		{ +// 			$clean['pciid'] = $this->request->post('lspci','','sanitizePciid'); +// 			$data['table'] = $this->m['HardwareModel']->clear()->select()->where(array('pci_id'=>$clean['pciid']))->send(); +// 			$data['recordNumber'] = 0; +//  +// 			$this->append($data); +// 			$this->cleverLoad('results'); +// 			$this->right(); +		} +	}  }
\ No newline at end of file diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 2dbc5fa..602e13d 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -145,6 +145,8 @@ class Lang  				"No sound cards found"	=>	"Non รจ stata trovata alcuna scheda audio",  				"LAST UPDATE"	=>	"ULTIMA MODIFICA",  				"search by"	=>	"cerca per", +				"analyze the output of the lspci command"	=>	"analizza l'output del comando lscpi", +				"paste the output of the lspci command"	=>	"incolla l'output del comand lspci",  			),  		'es'	=>	array  			( diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 5c64317..55fbd9b 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -60,6 +60,11 @@ function sanitizeAlphanum($string)  	return $string;  } +function sanitizePciid($string) +{ +	$string = preg_match('/^[a-zA-Z0-9]{4}(\:)[a-zA-Z0-9]{4}$/',$string) ? sanitizeAll($string) : '0'; +	return $string; +}  function getOrderByClause($string)  { diff --git a/h-source/Application/Views/Search/form.php b/h-source/Application/Views/Search/form.php index 9303b81..cd5b00a 100644 --- a/h-source/Application/Views/Search/form.php +++ b/h-source/Application/Views/Search/form.php @@ -54,7 +54,7 @@  		<div class="search_form">  			<div class="search_form_label"> -				<?php echo gtext("search by");?> <b><?php echo gtext("model name");?></b> +				<img class="search_img" src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/viewmag.png"> <span class="span_search_desc"><?php echo gtext("search by");?> <b><?php echo gtext("model name");?></b></span>  			</div>  			<noscript>  				<div class="noscript_notice"> @@ -75,15 +75,35 @@  			</form>  		</div> -		<div class="search_form_2"> +		<div class="search_form_pciid">  			<div class="search_form_label"> -				<?php echo gtext("search by");?> <b>vendorid:productid</b> +				<img class="search_img" src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/viewmag.png"> <span class="span_search_desc"><?php echo gtext("search by");?> <b>vendorid:productid</b></span>  			</div> -			<form method="GET"> +			<form action="<?php echo $this->baseUrl."/search/pciid/".Lang::$current;?>" method="POST">  				<table>  					<tr>  						<td><?php echo gtext("VendorID:ProductID code of the device");?>:</td> -						<td><?php echo Html_Form::input('vendorid','','input_entry_search',"search_model_input");?></td> +						<td><?php echo Html_Form::input('pciid','','input_entry_search');?></td> +					</tr> +					<tr> +						<td><input type="submit" name="search_pci" value="search"></td> +					</tr> +				</table> +			</form> +		</div> + +		<div class="search_form_lspci"> +			<div class="search_form_label"> +				<img class="search_img" src="<?php echo $this->baseUrl;?>/Public/Img/Glaze/viewmag.png"> <span class="span_search_desc"><?php echo gtext("analyze the output of the lspci command");?></span> +			</div> +			<form action="<?php echo $this->baseUrl."/search/lspci/".Lang::$current;?>" method="POST"> +				<table> +					<tr> +						<td valign="top"><?php echo gtext("paste the output of the lspci command");?>:<div class="lspci_notice">lspci -vmmnn</div></td> +						<td><?php echo Html_Form::textarea('lspci','insert the output of lspci -vmmnn','textarea_entry_search');?></td> +					</tr> +					<tr> +						<td><input type="submit" name="search_pci" value="search"></td>  					</tr>  				</table>  			</form> diff --git a/h-source/Application/Views/header.php b/h-source/Application/Views/header.php index b7f094d..6b20ccc 100644 --- a/h-source/Application/Views/header.php +++ b/h-source/Application/Views/header.php @@ -1,5 +1,6 @@  <?php if (!defined('EG')) die('Direct access not allowed!'); ?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//IT"> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//IT" "http://www.w3.org/TR/html4/loose.dtd"> +<html>  <?php  // h-source, a web software to build a community of people that want to share their hardware information.  // Copyright (C) 2010  Antonio Gallo (h-source-copyright.txt) @@ -10,17 +11,16 @@  // it under the terms of the GNU General Public License as published by  // the Free Software Foundation, either version 3 of the License, or  // (at your option) any later version. -//  +//  // h-source is distributed in the hope that it will be useful,  // but WITHOUT ANY WARRANTY; without even the implied warranty of  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  // GNU General Public License for more details. -//  +//  // You should have received a copy of the GNU General Public License  // along with h-source.  If not, see <http://www.gnu.org/licenses/>.  ?>  <?php $u = new UsersModel();?> -<html>  <head>  	<title><?php echo $title;?></title> @@ -30,10 +30,13 @@  	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl?>/Public/Css/website.css">  	<link rel="Shortcut Icon" href="<?php echo $this->baseUrl?>/Public/Img/tab_icon_2.ico" type="image/x-icon"> - -	<!--[if IE]> -	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl?>/Public/Css/explorer.css"> -	<![endif] --> +	<!--[if IE 6]> +    <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl;?>/Public/Css/explorer6.css"> +	<![endif]--> +	 +	<!--[if IE 7]> +    <link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl;?>/Public/Css/explorer7.css"> +	<![endif]-->  	<script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/jquery/jquery-1.4.2.min.js"></script>  	<script type="text/javascript" src="<?php echo $this->baseUrl;?>/Public/Js/functions.js"></script> diff --git a/h-source/Config/Route.php b/h-source/Config/Route.php index c90f99d..f86faf0 100644 --- a/h-source/Config/Route.php +++ b/h-source/Config/Route.php @@ -85,6 +85,8 @@ class Route  		'scanners,talk',  		'search,form',  		'search,results', +		'search,pciid', +		'search,lspci',  		'generic,del',  		'news,index',  		'download,index', diff --git a/h-source/Public/Css/explorer.css b/h-source/Public/Css/explorer6.css index 0c3e7b6..dcdc4b0 100644 --- a/h-source/Public/Css/explorer.css +++ b/h-source/Public/Css/explorer6.css @@ -69,7 +69,8 @@ ul#menuBlock li ul {  }  .viewall_popup_menu_status_item  { -	padding-left:10px; +	padding-left:2px; +/* 	background:red; */  }  .copyright_notice_box  { @@ -95,4 +96,8 @@ ul#menuBlock li ul {  .talk_numb_ext a  {  	margin-bottom:0px; +} +.language_links_box a.current_lang +{ +	background:#6495ED;  }
\ No newline at end of file diff --git a/h-source/Public/Css/explorer7.css b/h-source/Public/Css/explorer7.css new file mode 100644 index 0000000..11c9f02 --- /dev/null +++ b/h-source/Public/Css/explorer7.css @@ -0,0 +1,12 @@ +.viewall_popup_menu_status_item +{ +	width:129px; +} +.talk_numb_ext +{ +	margin-top:-30px; +} +.language_links_box a.current_lang +{ +	background:#6495ED; +}
\ No newline at end of file diff --git a/h-source/Public/Css/website.css b/h-source/Public/Css/website.css index 45b0dc9..d9672bd 100755 --- a/h-source/Public/Css/website.css +++ b/h-source/Public/Css/website.css @@ -834,6 +834,7 @@ ins  .panelApplicationList  {  	padding:0px; +	margin:0px;  }  .panelApplicationList li  { @@ -1098,21 +1099,24 @@ ins  .search_form  {  	clear:both; -	margin:5px 5px 35px 5px; +	margin:5px 5px 50px 5px;  } -.search_form_2 +.search_form_pciid  {  	clear:both; -	margin:5px 5px 35px 5px; +	margin:5px 5px 50px 5px;  }  .search_form_label  { -	padding:3px 10px; -	background:#B7F18C; -	color:#000; -	margin-bottom:1em; +	overflow:hidden; +	height:22px; +	margin:15px 5px 20px 5px; +/* 	background:#90EE90; */ +	padding:5px 0px; +	border-bottom:1px solid #228B22; +	font-weight:bold;  } -.search_form .input_entry_search +.input_entry_search  {  	width:250px;  	border: 1px solid #CECECE; @@ -1530,9 +1534,34 @@ td.text_item_date  .noscript_notice  { -	margin:10px 0px; +	margin:10px 5px;  	padding:5px 10px;  	background:#B0E0E6;  	border:1px solid #4169E1;  	color:#4169E1; +} +.search_img +{ +	float:left; +} +.span_search_desc +{ +	float:left; +	margin-left:10px; +	padding-top:0px; +} +.textarea_entry_search +{ +	width:450px; +	height:200px; +	padding:3px; +	border: 1px solid #CECECE; +} +.lspci_notice +{ +	margin:10px 0px; +	padding:5px 10px; +	background:#B7F18C; +	font-weight:bold; +/* 	border: 1px solid #CECECE; */  }
\ No newline at end of file diff --git a/h-source/Public/Img/Glaze/viewmag.png b/h-source/Public/Img/Glaze/viewmag.png Binary files differnew file mode 100755 index 0000000..c3976ee --- /dev/null +++ b/h-source/Public/Img/Glaze/viewmag.png  | 
