- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
//header.php
<div id="search-box">
<form action="<?=$_SERVER["REQUEST_URI"]?>" method="get" style="padding:0;margin:0;">
<?php
$sql="SELECT * FROM wp_gorod ORDER BY name_gorod ASC ";
$res=mysql_query($sql);
$g=array();if($_GET['gorod']!=""){
$id=$_GET['gorod'];
$_SESSION['gorod_id']=$id;
$ig=$_REQUEST['gorod_id'];}
$ig=$_SESSION['gorod_id'];
echo "<select onchange='return this.form.submit()' name='gorod'>\n"; echo "<option value='0'>Выберите город</option>\n";
while($row=mysql_fetch_array($res)){
if($row['id_gorod']==$_SESSION['gorod_id']){
echo "<option value='".$row['id_gorod']."' selected='selected'>".$row['name_gorod']."</option>\n"; }else{
echo "<option value='".$row['id_gorod']."'>".$row['name_gorod']."</option>\n";
}
}echo "</select> <font size=\"4\" color=\"#F46F2A\">".$_SESSION['number']."</font>\n";if(isset($_SESSION['gorod_id'])){
echo "<br>\n";
$sql1="Select * from wp_gorod where id_gorod=".$ig;
$r=mysql_query($sql1);
$rw=mysql_fetch_array($r);
echo "<div class=tel><b> ".$rw['telephone']. "<br /></b></div>\n";
echo "<div class=adres align=right>".$rw['adres']."<br/>\n";
echo "".$rw['email']."</div>\n";
}
?>
<noscript><input type="submit" value="View" /></noscript>
</form></div>
//index.php
if ($_SERVER['REQUEST_URI'] == '/doneck/') {
header("Location: /doneck/?gorod=15");
return;
}
if ($_SERVER['REQUEST_URI'] == '/vinnica/') {
header("Location: /vinnica/?gorod=13");
return;
}
if ($_SERVER['REQUEST_URI'] == '/dnepropetrovsk/') {
header("Location: /dnepropetrovsk/?gorod=14");
return;
}
if ($_SERVER['REQUEST_URI'] == '/zhitomir/') {
header("Location: /zhitomir/?gorod=17");
return;
}
if ($_SERVER['REQUEST_URI'] == '/zaporozhe/') {
header("Location: /zaporozhe/?gorod=18");
return;
}
if ($_SERVER['REQUEST_URI'] == '/ivano-frankovsk/') {
header("Location: /ivano-frankovsk/?gorod=19");
return;
}
if ($_SERVER['REQUEST_URI'] == '/kiev/') {
header("Location: /kiev/?gorod=20");
return;
}
if ($_SERVER['REQUEST_URI'] == '/kirovograd/') {
header("Location: /kirovograd/?gorod=37");
return;
}
if ($_SERVER['REQUEST_URI'] == '/lugansk/') {
header("Location: /lugansk/?gorod=21");
return;
}
if ($_SERVER['REQUEST_URI'] == '/luck/') {
header("Location: /luck/?gorod=22");
return;
}
if ($_SERVER['REQUEST_URI'] == '/lvov/') {
header("Location: /lvov/?gorod=23");
return;
}
if ($_SERVER['REQUEST_URI'] == '/nikolaev/') {
header("Location: /nikolaev/?gorod=24");
return;
}
if ($_SERVER['REQUEST_URI'] == '/odessa/') {
header("Location: /odessa/?gorod=25");
return;
}
if ($_SERVER['REQUEST_URI'] == '/poltava/') {
header("Location: /poltava/?gorod=26");
return;
}
if ($_SERVER['REQUEST_URI'] == '/rovno/') {
header("Location: /rovno/?gorod=27");
return;
}
if ($_SERVER['REQUEST_URI'] == '/krym/') {
header("Location: /krym/?gorod=28");
return;
}
if ($_SERVER['REQUEST_URI'] == '/sumy/') {
header("Location: /sumy/?gorod=29");
return;
}