<?
if (isset($location_error) && $location_error)
print "<center><b><span class=\"stop\">$location_error</span></b></center><br>";
aff_header("PhpMyPrepaid Setup Wizard", "Location setup and default configuration", 9);
if (!$_SESSION["pwdroot"])
$res = connexion('root', '', $_SESSION["dbLocation"]) or die ("Can't connect to Mysql Server : ".mysql_error());
else
$res = connexion('root', $_SESSION["pwdroot"], $_SESSION["dbLocation"]) or die ("Can't connect to Mysql Server : ".mysql_error()); //$_SESSION["pwdroot"]
@mysql_select_db($_SESSION["namePraDB"], $res) or die("Error : ".mysql_error());
echo '
<table cellpadding="0" cellspacing="0" border="0" width="80%" class="StyleDottedHr" align="center">
<tr>
<th align="left">Component</th>
<th style="text-align: right;">Status</th>
</tr>
<tr><td >';
echo '<b>Location name</b> </td><td align="right"> <input type="text" size="20" maxlength="20" name="location" value="'.$_SESSION["location"].'">';
echo '</td></tr>';
echo '<tr><td>';
echo '<b>Location Domain</b> </td><td align="right"> <input type="text" size="20" maxlength="20" name="domain" value="'.$_SESSION["domain"].'">';
echo '<tr><td><b>Location Country Code</b></td>';
$query="select iso_name from isocode";
$result=mysql_query($query) or die(mysql_error());
echo '<td align="right">';
echo ('<select name="isocode" id="isoname">');
while ($row = mysql_fetch_object($result))
{
if ($country==$row->iso_name)
echo ("<option selected=\"selected\" value=\"".$row->iso_name."\">".$row->iso_name);
else
echo ("<option value=\"".$row->iso_name."\">".$row->iso_name);
}
echo '</select></td>';
echo '<tr>
<td>
<b>Location Area code</b> </td>';
$query="select area_short_name from areacode";
$result=mysql_query($query) or die(mysql_error());
echo '<td align="right">';
echo ("<select name=\"areacode\" id=\"areacode\" >");
echo ("<option value=\"\">");
while ($row = mysql_fetch_object($result))
{
if ($_POST['areacode']==$row->area_short_name)
echo ("<option selected=\"selected\" value=\"".$row->area_short_name."\">".$row->area_short_name);
else
echo ("<option value=\"".$row->area_short_name."\">".$row->area_short_name);
}
echo "</select></td>";
echo '</tr><tr><td>';
echo '<b>Location City</b> </td><td align="right"> <input type="text" size="15" maxlength="15" name="city" >';
echo '</td></tr></table>';
aff_middle();
$str = "<input class='button' type='submit' name='goto' value='Next' id='button_next' />";
print $str;
aff_footer();
?>