<?php require_once('Connections/model.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];

$maxRows_all_models = 300;
$pageNum_all_models = 0;
if (isset($_GET['pageNum_all_models'])) {
  $pageNum_all_models = $_GET['pageNum_all_models'];
}
$startRow_all_models = $pageNum_all_models * $maxRows_all_models;

mysql_select_db($database_model, $model_conn);
$query_all_models = "select model, url from allmodels where 1 and pdesc regexp ('^REMOTE') and url regexp ('^http') order by model asc";
$query_limit_all_models = sprintf("%s LIMIT %d, %d", $query_all_models, $startRow_all_models, $maxRows_all_models);
$all_models = mysql_query($query_limit_all_models, $model_conn) or die(mysql_error());
$row_all_models = mysql_fetch_assoc($all_models);

if (isset($_GET['totalRows_all_models'])) {
  $totalRows_all_models = $_GET['totalRows_all_models'];
} else {
  $all_all_models = mysql_query($query_all_models);
  $totalRows_all_models = mysql_num_rows($all_all_models);
}
$totalPages_all_models = ceil($totalRows_all_models/$maxRows_all_models)-1;

$queryString_all_models = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_all_models") == false && 
        stristr($param, "totalRows_all_models") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_all_models = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_all_models = sprintf("&totalRows_all_models=%d%s", $totalRows_all_models, $queryString_all_models);
$modelbrand = "select distinct brand from allmodels order by brand asc";
$mbq = mysql_query($modelbrand);
while($mbr = mysql_fetch_assoc($mbq)){
	$mbrlist .= "<li>$mbr[brand]</li>";
}
for($pi=0; $pi<$totalPages_all_models+1;){
	if($pi == $pageNum_all_models){
		$pilist .= "<span class=\"ding\">&gt;&gt;</span>$pi<span class=\"ding\">&lt;&lt;</span><br>";
	}else{
	$pilist .= "<a href=\"http://www.links.newremotecontrol.com/models.php?pageNum_all_models=$pi\">$pi</a><br>";
	}
	$pi++;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Remote Control Links by Model Number</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript"><!--  //
	function go() {  
	window.location = document.form1.Brands.options[document.form1.Brands.selectedIndex].value
		}
	//-->
	<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
	</script>
<style type="text/css">
<!--
td {
	font-family: Verdana, Courier, mono;
	font-size: 9px;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	color: #ffffff;
	-moz-user-select: none;
	-khtml-user-select: none;
	user-select: none;
}
a {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #ffffff;
	text-decoration: none;
	background-color: #000000;
}
th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-variant: small-caps;
	color: #FFFFFF;
}
.avale {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
.bvale {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
	-moz-user-select: none;
	-khtml-user-select: none;
	user-select: none;
}
.whtbar {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #FFFFFF;
}
.copy {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
.ding {
	font-family: Courier;
	font-size: 12px;
	font-weight: bold;
	color: #FF0000;
}

-->
</style>
<!--[if IE]> 
<style type="text/css">
html { 
scrollbar-arrow-color:#101010; 
scrollbar-track-color:#CCFFFF; 
scrollbar-face-color:#6C9FA3; 
scrollbar-highlight-color:#FFFFFF; 
scrollbar-3dlight-color:#93C0BB; 
scrollbar-darkshadow-color:#2F6565; 
scrollbar-shadow-color:#548A8C; 
} 

</style>
<![endif]-->
</head>
<body bgcolor="#000000" leftmargin="2" topmargin="2" rightmargin="2" bottommargin="2" onLoad="MM_preloadImages('http://www.vcrremotecontrols.com/images/navbar/ohomebt.gif','http://www.vcrremotecontrols.com/images/navbar/obrandbt.gif','http://www.vcrremotecontrols.com/images/navbar/osrchbt.gif','http://www.vcrremotecontrols.com/images/navbar/ospec.gif','http://www.vcrremotecontrols.com/images/navbar/oused.gif','http://www.vcrremotecontrols.com/images/navbar/ogen.gif','http://www.vcrremotecontrols.com/images/navbar/okleen.gif','http://www.vcrremotecontrols.com/images/navbar/oman.gif','http://www.vcrremotecontrols.com/images/navbar/ounl.gif','http://www.vcrremotecontrols.com/images/navbar/orep.gif','http://www.vcrremotecontrols.com/images/navbar/opol.gif','http://www.vcrremotecontrols.com/images/navbar/ocont.gif','http://www.vcrremotecontrols.com/images/navbar/ofaq.gif','http://www.vcrremotecontrols.com/images/navbar/oshop.gif')" onselectstart="return false;"><table bgcolor="#CCFFFF" width="100%"  border="0" cellspacing="0" cellpadding="1" summary="NewRemoteControl.com"><tr><td width="468" bgcolor="#CCFFFF" colspan="1"><img src="http://www.newremotecontrol.com/images/1117.jpg"></td><td colspan="2" align="center" nowrap bgcolor="#CCFFFF" class="avale">New Original Equipment Remote Controls<br><small>From<br>Electronic Repair Service<br>Thomasville, Ga</small></td></tr><tr><td colspan="1" align="center" bgcolor="#330099" class="whtbar" width="468">The One Stop Shop For Most Brands Of Replacement Remote Controls<br>    <strong>TV, VCR, TV/VCR Combo, DVD, Audio</strong></td><td colspan="1" align="right" bgcolor="#330099"><form name="form1" method="post" action="">
    <span class="whtbar">Select Brand</span>
    <select name="Brands" onChange="go()">
      <option value="default">Brand</option>
      <script language="JavaScript" type="text/JavaScript" src="http://www.newremotecontrol.com/catalog/static_list.php"></script>
    </select>      
    </form></td></tr>
<tr><td colspan="3">
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="http://www.vcrremotecontrols.com/images/navbar/bkgrnd.gif"> 
  <tr> 
    <td><a href="http://www.newremotecontrol.com/index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','http://www.vcrremotecontrols.com/images/navbar/ohomebt.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/homebt.gif" alt="HOME" name="home" width="47" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/BrandIndex.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('brand','','http://www.vcrremotecontrols.com/images/navbar/obrandbt.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/brandbt.gif" alt="BRAND INDEX" name="brand" width="51" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/catalog/newremsearch.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('search','','http://www.vcrremotecontrols.com/images/navbar/osrchbt.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/srchbt.gif" alt="SEARCH" name="search" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/catalog/RemoteSpecials.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('spec','','http://www.vcrremotecontrols.com/images/navbar/ospec.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/spec.gif" alt="REMOTE SPECIALS" name="spec" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.ersweb.com/catalog/RemotesUsed.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('used','','http://www.vcrremotecontrols.com/images/navbar/oused.gif',1)" target="_blank"><img src="http://www.vcrremotecontrols.com/images/navbar/used.gif" alt="USED REMOTES" name="used" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newtvremotes.com/Mfrs/Generic/index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('generic','','http://www.vcrremotecontrols.com/images/navbar/ogen.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/gen.gif" alt="GENERIC REMOTES" name="generic" width="52" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/ScreenKleen.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('kleen','','http://www.vcrremotecontrols.com/images/navbar/okleen.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/kleen.gif" alt="SCREEN KLEEN" name="kleen" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/NewModel.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('newmod','','http://www.vcrremotecontrols.com/images/navbar/ounl.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/unl.gif" alt="UNLISTED REMOTE" name="newmod" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/shipping_info.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('repair','','http://www.vcrremotecontrols.com/images/navbar/orep.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/rep.gif" alt="REMOTE REPAIRS" name="repair" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/Policies.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('policies','','http://www.vcrremotecontrols.com/images/navbar/opol.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/pol.gif" alt="POLICIES" name="policies" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/Contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','http://www.vcrremotecontrols.com/images/navbar/ocont.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/cont.gif" alt="CONTACT" name="contact" width="57" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/FAQ.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('faq','','http://www.vcrremotecontrols.com/images/navbar/ofaq.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/faq.gif" alt="FAQ" name="faq" width="40" height="30" border="0"></a></td> 
    <td><a href="http://www.newremotecontrol.com/Shopping/RemShopCart.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('cart','','http://www.vcrremotecontrols.com/images/navbar/oshop.gif',1)" target="_parent"><img src="http://www.vcrremotecontrols.com/images/navbar/shop.gif" alt="SHOPPING CART" name="cart" width="57" height="30" border="0"></a></td> 
  </tr> 
</table></td></tr></table><br><div align="center" oncontextmenu="alert('Copying Prohibited by Law\nContents of this page contains proprietary information intended for consumer use.\nŠ Electronic Repair Service\nThomasville, Ga.\nAnd\nwww.newremotecontrol.com'); return false;"> <table width="100%" border="0"><tr><td valign="top">  <table border="0" width="150" align="left"><tr><th>Models listed for<br>the following brands:</th></tr><tr><td align="left"><ul style="list-style-type:circle "><?php echo "$mbrlist"; ?></ul></td></tr></table> </td><td valign="top">   <table border="0" width="350" align="center">    <tr>      <?php if ($pageNum_all_models > 0) { // Show if not first page ?>      <td><a href="<?php printf("%s?pageNum_all_models=%d%s", $currentPage, 0, $queryString_all_models); ?>">|&lt; First</a></td>      <td><a href="<?php printf("%s?pageNum_all_models=%d%s", $currentPage, max(0, $pageNum_all_models - 1), $queryString_all_models); ?>">&lt; Previous</a></td>	  <?php } // Show if not first page ?>  <td>Page <?php echo $pageNum_all_models ?> of <?php echo $totalPages_all_models ?></td>    <?php if ($pageNum_all_models < $totalPages_all_models) { // Show if not last page ?>	  <td><a href="<?php printf("%s?pageNum_all_models=%d%s", $currentPage, min($totalPages_all_models, $pageNum_all_models + 1), $queryString_all_models); ?>">Next &gt;</a></td>     <td><a href="<?php printf("%s?pageNum_all_models=%d%s", $currentPage, $totalPages_all_models, $queryString_all_models); ?>">Last &gt;|</a></td>	  <?php } // Show if not last page ?>    </tr>  </table>  <br>  <table border="0" width="100%" align="center">  <?php while ($row_all_models = mysql_fetch_assoc($all_models)){ 		echo "<tr><td align=\"center\"><a href=\"$row_all_models[url]\">"; echo "$row_all_models[model]</a> </td></tr>"; 	} ?>  </table>  </td><td valign="top">  <table align="right" width="90" border="1">	<tr><th>Jump to page:</th></tr><tr>		<td align="center"><?php echo "$pilist"; ?></td>	</tr>  </table>  </td></tr></table> <br clear="all"><table><tr><td>
<p>&copy;2008<script language="JavaScript">
		var d=new Date();
		yr=d.getFullYear();
		if (yr!=2008)
				document.write("- "+yr);
		</script> Electronic Repair Service, Thomasville, Ga.</p></td></tr></table>
</div>
</body>
</html>
<?php
mysql_free_result($all_models);
?>
