/*$server="oculus.com.mx";
$username="oculus55a";
$pass="sistemocu34";
$db="oculus_db";
mysql_connect($server,$username,$pass) or die(mysql_error());
mysql_select_db($db); */
error_reporting(0);
DEFINE ('DB_USER', 'oculus55a');
DEFINE ('DB_PASSWORD', 'sistemocu34');
DEFINE ('DB_HOST', 'oculus.com.mx');
DEFINE ('DB_NAME', 'oculus_db');
// Make the connection.
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
// Select the database.
@mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
$repquery="select * from mxsalesreps where region = '$_GET[region]'";
$represult=mysql_query($repquery);
$repnum=mysql_num_rows($represult);
$counter=0;
while($counter < $repnum) {
$rep=mysql_fetch_array($represult);
if($rep['cellphone'] != "") {
$mobile="\n Mobile: ".$rep['cellphone']."\n";
} else {
$mobile="";
}
if($rep['phone'] != "") {
$phone="\n Tel: ".$rep['phone']."";
} else {
$phone="";
}
if($_GET['region'] != "") {
$replist.="".$rep['name']."
".$mobile."";
} else { $replist=""; }
$counter++;
}
// city list
$cityquery="select * from mxregions order by region asc";
$cityresult=mysql_query($cityquery);
$citynum=mysql_num_rows($cityresult);
$citycounter=0;
while($citycounter < $citynum) {
$city=mysql_fetch_array($cityresult);
$citylist.="".$city['region']."";
$citycounter++;
}
//$citylist.=" href='$PHP_SELF?region=".$city['recordid']."' class='bigLink'".$city['region']."";
// display the region title
$regionquery="select * from mxregions where recordid = '$_GET[region]'";
$regionresult=mysql_query($regionquery);
$region=mysql_fetch_array($regionresult);
?>
Oculus Innovative Sciences - Contact
| |
|
|

| Para ver la lista
de representantes, haga clic presionando la región a la
izquierda. |
Región
...............................................
echo $citylist; ?>
|
Representantes
............................................................................
echo $region[region]; ?>
echo $replist; ?> |
|
|
|
|