"._REG.":
\n"; echo ""; $rlist = $xoopsDB->query("SELECT region_title, region_id from ".$xoopsDB->prefix("region")." ORDER BY region_title"); echo "
\n"; } function frmCountry($utype, $regionid, $countryid = 0) { global $xoopsDB; echo "
"._WCNTRY.":
\n"; echo ""; $clist = $xoopsDB->query("SELECT country_title, country_id from ".$xoopsDB->prefix("country")." where region_id='$regionid' ORDER BY country_title"); echo "
\n"; } function frmSubDiv($utype, $countryid, $subdivid = 0) { global $xoopsDB; echo "
"._WSUBDIV.":
\n"; echo ""; $slist = $xoopsDB->query("SELECT subdiv_title, subdiv_id from ".$xoopsDB->prefix("subdiv")." where country_id='$countryid' ORDER BY subdiv_title"); echo "
\n"; } function frmCity($utype, $subdivid, $newaccid = 'NA', $regionid = 0) { global $xoopsDB; echo "
"._WCITY.":
\n"; echo ""; //Japan if ($subdivid == 66){ $ctylist = $xoopsDB->query("SELECT station_name as city_title, icao_code as accid, city_name from ".$xoopsDB->prefix("xpweather_city_jp")." where subdiv_id='$subdivid' ORDER BY city_name"); } else { if (($regionid >= 4 and $regionid <= 6) or $regionid == 10) { $ctylist = $xoopsDB->query("SELECT city_title, accid from ".$xoopsDB->prefix("city")." where subdiv_id='$subdivid' ORDER BY city_title"); } else { $ctylist = $xoopsDB->query("SELECT station_name as city_title, icao_code as accid from ".$xoopsDB->prefix("wmo_stations")." where subdiv_id='$subdivid' ORDER BY station_name"); } } echo "
\n"; } function frmStation($utype, $subdivid, $newaccid, $wcid='NA', $regionid=0) { global $xoopsDB, $cache_time, $wcdata_url; //$_root="SearchResult"; //$_node="Location"; //$_locid="LocID"; //$_name="DisplayName"; $cache_file = "".XOOPS_ROOT_PATH."/modules/XP-Weather/cache/wcdata.$newaccid"; $time = split(" ", microtime()); srand((double)microtime()*1000000); $cache_time_rnd = 300 - rand(0, 600); $simpleXML = new phpSimpleXML(); echo "
"._WSTATION.":
\n"; echo ""; echo ""; // if ( $regionid == 11 || $regionid == 10 || $regioninid == 9 || ($regionid >=4 && $regionid <=6) ) { // if ( $regionid < 4 && $regionid >= 6 && $regionid != 10 ) { if ( $regionid >= 0 ) { list($subdiv_title) = mysql_fetch_row($xoopsDB->query("SELECT subdiv_title from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); } else { list($country_title) = mysql_fetch_row($xoopsDB->query("SELECT country_title from ".$xoopsDB->prefix("country")." where region_id='$regionid'")); } //Japan if ($subdivid == 66){ list($city_title) = mysql_fetch_row($xoopsDB->query("SELECT station_name as city_title from ".$xoopsDB->prefix("xpweather_city_jp")." where icao_code='$newaccid'")); $station_type = "JPN"; } else { // North/Central/South America Region if (($regionid >= 4 && $regionid <= 6) || $regionid == 10 || $regionid == 9) { list($city_title) = mysql_fetch_row($xoopsDB->query("SELECT city_title from ".$xoopsDB->prefix("city")." where accid='$newaccid'")); $station_type = "TWC"; } else { // The rest of the World list($city_title) = mysql_fetch_row($xoopsDB->query("SELECT station_name as city_title from ".$xoopsDB->prefix("wmo_stations")." where icao_code='$newaccid'")); $station_type = "WMO"; } } if ( $subdiv_title != "" ) { $area = ",$subdiv_title"; } else { $area = ",$country_title"; } echo "
"; echo ""; echo "
$failuremessage\n"; } function SelRegion($utype, $wuid=0) { global $xoopsDB, $username, $module_name; global $weatherop,$wcity,$Selection,$newtpc,$newtps,$accid; if ($utype=="Anon") { echo "

$module_name "._SETTINGS."

"; echo "
  • "._WNOTLOGGEDON."  ["._WLOGIN."]

    \n"; echo ""._IFYOU." "._WREGISTER.".

    \n"; echo ""._WJOIN."

    \n"; } else { list($saved_accid, $saved_wcid, $station_type, $saved_tpc, $saved_tps) = mysql_fetch_row($xoopsDB->query("select accid, wcid, station_type, tpc, tps from ".$xoopsDB->prefix("userweather")." where userid='$wuid'")); if (!$saved_accid) { list($saved_accid, $saved_wcid, $station_type, $saved_tpc, $saved_tps) = mysql_fetch_row($xoopsDB->query("select accid, wcid, station_type, tpc, tps from ".$xoopsDB->prefix("userweather")." where userid='0'")); } if ($station_type == "TWC") { $saved_stationid = $saved_wcid; list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select city_title, subdiv_id from ".$xoopsDB->prefix("city")." where accid='$saved_accid'")); } if (!$wcity || $station_type == "JPN") $saved_stationid = $saved_wcid; list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id from ".$xoopsDB->prefix("xpweather_city_jp")." where icao_code='$saved_accid'")); if (!$wcity || $station_type == "WMO") { $saved_stationid = $saved_wcid; list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id from ".$xoopsDB->prefix("wmo_stations")." where icao_code='$saved_accid'")); } list($wsubdiv, $countryid) = mysql_fetch_row($xoopsDB->query("select subdiv_title, country_id from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._PLSCHNGLOC."

    \n"; echo ""._CURSETT.":\n"; echo "\n"; echo "
    "._REG.":$wregion
    \n"; echo ""._WCNTRY.":$wcountry
    \n"; echo ""._WSUBDIV.":$wsubdiv
    \n"; echo ""._WCITY.":$wcity ($saved_stationid)
    \n"; if ($saved_tpc == 0) { echo ""._WTEMP.":°C
    \n"; } else { echo ""._WTEMP.":°F
    \n"; } if ($saved_tps == 0) { echo ""._WINDSPD.":m/s
    \n"; } else { echo ""._WINDSPD.":mph \n"; } echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, $subdivid); echo ""; frmCity($utype, $subdivid, $saved_accid, $regionid); echo "

    \n"; echo "
    "._WVIEWPREF."

    \n"; echo ""._WTEMP." "._IN.":
    \n"; echo " "._CELSIUS."
    \n"; echo " "._FAHREN."

    \n"; echo ""._WINDSPD." "._IN.":
    \n"; echo " m/s ("._KPH.")
    \n"; echo " mph ("._MPH.")
    \n"; echo "
    \n"; echo "\n"; echo "\n"; echo "
    \n"; } } function SelCountry($utype, $regionid, $wuid = 0) { global $xoopsDB, $username, $module_name; if ($utype=="Anon") { echo ""._WNOTLOGGEDON."
    \n"; echo ""._IFYOU.""._WMEMBER.""._UCANCHNG."
    \n"; echo ""._SOWHATRU.""._WJOIN.""._ALREADY."
    \n"; } else { list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); $result1 = $xoopsDB->query("SELECT country_id from ".$xoopsDB->prefix("country")." where region_id='$regionid'"); if(mysql_num_rows($result1) > 1) { echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._WSELECT._WCNTRY."
    \n"; echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, 0); echo "

    \n"; } else { list($countryid) = mysql_fetch_row($result1); echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._WSELECT._WSUBDIV."
    \n"; echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, 0); echo "

    \n"; } } } function SelSubDiv($utype, $countryid, $wuid = 0) { global $xoopsDB, $username, $module_name; if ($utype=="Anon") { echo ""._WNOTLOGGEDON."
    \n"; echo ""._IFYOU.""._WMEMBER.""._UCANCHNG."
    \n"; echo ""._SOWHATRU.""._WJOIN.""._ALREADY."
    \n"; } else { list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); $result1 = $xoopsDB->query("SELECT subdiv_id from ".$xoopsDB->prefix("subdiv")." where country_id='$countryid'"); if(mysql_num_rows($result1) > 1) { echo ""._WSELECT._WSUBDIV."
    \n"; echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, 0); echo "

    \n"; } else { echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._WSELECT._WCITY."
    \n"; list($subdivid) = mysql_fetch_row($result1); echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, $subdivid); echo ""; frmCity($utype, $subdivid, 0, $regionid); echo "

    \n"; } } } function SelCity($utype, $subdivid, $wuid = 0) { global $xoopsDB, $username, $module_name; if ($utype=="Anon") { echo ""._WNOTLOGGEDON."
    \n"; echo ""._IFYOU.""._WMEMBER.""._UCANCHNG."
    \n"; echo ""._SOWHATRU.""._WJOIN.""._ALREADY."
    \n"; } else { list($wsubdiv, $countryid) = mysql_fetch_row($xoopsDB->query("select subdiv_title, country_id from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._WSELECT._WCITY."
    \n"; echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, $subdivid); echo ""; frmCity($utype, $subdivid, 'NA', $regionid); echo "

    \n"; } } function SelStation($utype, $accid, $wuid = 0) { global $xoopsDB, $username, $module_name; if ($utype=="Anon") { echo ""._WNOTLOGGEDON."
    \n"; echo ""._IFYOU.""._WMEMBER.""._UCANCHNG."
    \n"; echo ""._SOWHATRU.""._WJOIN.""._ALREADY."
    \n"; } else { list($subdivid) = mysql_fetch_row($xoopsDB->query("select subdiv_id from ".$xoopsDB->prefix("city")." where accid='$accid'")); if ( !IsSet($subdivid) || empty($subdivid) ) { list($subdivid) = mysql_fetch_row($xoopsDB->query("select subdiv_id from ".$xoopsDB->prefix("xpweather_city_jp")." where icao_code='$accid'")); if (!$subdivid){ list($subdivid) = mysql_fetch_row($xoopsDB->query("select subdiv_id from ".$xoopsDB->prefix("wmo_stations")." where icao_code='$accid'")); } } list($wsubdiv, $countryid) = mysql_fetch_row($xoopsDB->query("select subdiv_title, country_id from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._WSELECT._WSTATION."
    \n"; echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, $subdivid); echo ""; frmCity($utype, $subdivid, $accid, $regionid); echo ""; frmStation($utype, $subdivid, $accid, "NA", $regionid); echo "

    \n"; } } function PreSave($utype, $accid, $wcid, $stype, $wuid=0) { global $xoopsDB, $username, $module_name; global $weatherop,$wcity,$Selection,$newtpc,$newtps,$accid; if ($utype=="Anon") { echo ""._WNOTLOGGEDON."
    \n"; echo ""._IFYOU.""._WMEMBER.""._UCANCHNG."
    \n"; echo ""._SOWHATRU.""._WJOIN.""._ALREADY."
    \n"; } else { list($saved_accid, $saved_wcid, $saved_tpc, $saved_tps) = mysql_fetch_row($xoopsDB->query("select accid, wcid, tpc, tps from ".$xoopsDB->prefix("userweather")." where userid='$wuid'")); if (!$saved_accid) { list($saved_accid, $saved_wcid, $saved_tpc, $saved_tps) = mysql_fetch_row($xoopsDB->query("select accid, wcid, tpc, tps from ".$xoopsDB->prefix("userweather")." where userid='0'")); } if ($stype == "TWC" ) { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select city_title, subdiv_id from ".$xoopsDB->prefix("city")." where accid='$saved_accid'")); } if (!$wcity || $stype == "JPN" ) { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id from ".$xoopsDB->prefix("xpweather_city_jp")." where icao_code='$saved_accid'")); } if (!$wcity || $stype == "WMO" ) { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id from ".$xoopsDB->prefix("wmo_stations")." where icao_code='$saved_accid'")); } list($wsubdiv, $countryid) = mysql_fetch_row($xoopsDB->query("select subdiv_title, country_id from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); echo "

    $module_name "._SETTINGS."

    "; echo "
  • "._PLSCHNGLOC."

    \n"; echo ""._CLICKSAVE."

    \n"; echo ""._CURSETT.":\n"; echo "\n"; echo "
    "._REG.":$wregion
    \n"; echo ""._WCNTRY.":$wcountry
    \n"; echo ""._WSUBDIV.":$wsubdiv
    \n"; echo ""._WCITY.":$wcity ($saved_accid)
    \n"; echo ""._WSTATION.":$saved_wcid
    \n"; if ($saved_tpc == 0) { echo ""._WTEMP.":°C
    \n"; } else { echo ""._WTEMP.":°F
    \n"; } if ($saved_tps == 0) { echo ""._WINDSPD.":m/s
    \n"; } else { echo ""._WINDSPD.":mph \n"; } echo "

    \n"; $wcity = ""; $subdivid = 0; if ($stype == "TWC" ) { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select city_title, subdiv_id from ".$xoopsDB->prefix("city")." where accid='$accid'")); } if (!$wcity || $stype == "JPN") { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id from ".$xoopsDB->prefix("xpweather_city_jp")." where icao_code='$accid'")); } if (!$wcity || $stype == "WMO") { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id from ".$xoopsDB->prefix("wmo_stations")." where icao_code='$accid'")); } list($wsubdiv, $countryid) = mysql_fetch_row($xoopsDB->query("select subdiv_title, country_id from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); $station_name = "$wcity,"; if ( !IsSet($wsubdiv) || empty($wsubdiv) ) { $station_name .= "$wcountry"; } else { $station_name .= "$wsubdiv"; } echo ""._NEWSET.":
    \n"; echo "
    \n"; frmRegion($utype, $regionid); echo ""; frmCountry($utype, $regionid, $countryid); echo ""; frmSubDiv($utype, $countryid, $subdivid); echo ""; frmCity($utype, $subdivid, $accid, $regionid); echo ""; frmStation($utype, $subdivid, $accid, $wcid, $regionid); echo "

    \n"; echo "
    "._WVIEWPREF."

    \n"; echo ""._WTEMP." "._IN.":
    \n"; echo " "._CELSIUS."
    \n"; echo " "._FAHREN."

    \n"; echo ""._WINDSPD." "._IN.":
    \n"; echo " m/s ("._KPH.")
    \n"; echo " mph ("._MPH.")
    \n"; echo "
    \n"; echo "
    \n"; echo "
    \n"; echo "
    \n"; echo "\n"; echo "\n"; echo "
    \n"; } } function SaveSet($utype, $tpc, $tps, $accid, $wcid, $wstype, $wstation, $wuid=0) { global $xoopsDB, $userid, $username, $admin, $module_name, $xoopsUser; global $weatherop,$wcity,$Selection,$newtpc,$newtps,$accid; if ($utype=="Anon") { echo ""._WNOTLOGGEDON."
    \n"; echo ""._IFYOU.""._WMEMBER.""._UCANCHNG."
    \n"; echo ""._SOWHATRU.""._WJOIN.""._ALREADY."
    \n"; } else { if (!$xoopsUser->isAdmin() and $utype=="Admin") { echo ""._SORRYNOTADMIN."
    \n"; echo ""._ENSURELOGGEDON."
    \n"; } else { list($testaccid) = mysql_fetch_row($xoopsDB->query("select accid from ".$xoopsDB->prefix("userweather")." where userid='$wuid'")); if(!$testaccid) { $newquery = "INSERT ".$xoopsDB->prefix("userweather")." set accid='$accid', wcid='$wcid', station_type='$wstype', station_name='$wstation', tpc='$tpc', tps='$tps', userid='$wuid'"; } else { $newquery = "UPDATE ".$xoopsDB->prefix("userweather")." set accid='$accid', wcid='$wcid', station_type='$wstype', station_name='$wstation', tpc='$tpc', tps='$tps' where userid='$wuid'"; } if(!$xoopsDB->queryF($newquery)) { echo "
    ".mysql_errno().": ".mysql_error(); echo "
    "._ERRORCADMIN."
    "; } else { list($saved_accid, $saved_wcid, $saved_tpc, $saved_tps) = mysql_fetch_row($xoopsDB->query("select accid, wcid, tpc, tps from ".$xoopsDB->prefix("userweather")." where userid='$wuid'")); if ($wstype == "TWC") { list($wcity, $subdivid) = mysql_fetch_row($xoopsDB->query("select city_title, subdiv_id from ".$xoopsDB->prefix("city")." where accid='$saved_accid'")); } if (!$wcity || $wstype == "JPN") { list($wcity, $subdivid, $wregion) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id, region_id from ".$xoopsDB->prefix("xpweather_city_jp")." where icao_code='$saved_accid'")); } if (!$wcity || $wstype == "WMO") { list($wcity, $subdivid, $wregion) = mysql_fetch_row($xoopsDB->query("select station_name, subdiv_id, region_id from ".$xoopsDB->prefix("wmo_stations")." where icao_code='$saved_accid'")); } list($wsubdiv, $countryid) = mysql_fetch_row($xoopsDB->query("select subdiv_title, country_id from ".$xoopsDB->prefix("subdiv")." where subdiv_id='$subdivid'")); list($wcountry, $regionid) = mysql_fetch_row($xoopsDB->query("select country_title, region_id from ".$xoopsDB->prefix("country")." where country_id='$countryid'")); list($wregion) = mysql_fetch_row($xoopsDB->query("select region_title from ".$xoopsDB->prefix("region")." where region_id='$regionid'")); echo "

    $module_name "._SETTINGS."

    "; echo ""._SETSAVED."

    \n"; echo ""._SAVEDSETR.":

    \n"; echo "\n"; echo "
    "._REG.":$wregion
    \n"; echo ""._WCNTRY.":$wcountry
    \n"; echo ""._WSUBDIV.":$wsubdiv
    \n"; echo ""._WCITY.":$wcity ($saved_accid)
    \n"; echo ""._WSTATION.":$saved_wcid
    \n"; if ($saved_tpc == 0) { echo ""._WTEMP.":°C
    \n"; } else { echo ""._WTEMP.":°F
    \n"; } if ($saved_tps == 0) { echo ""._WINDSPD.":m/s
    \n"; } else { echo ""._WINDSPD.":mph \n"; } echo "

    \n"; if ($utype=="Admin") { echo "
  • "._TOVIEW."

    \n"; } else { echo "
  • "._TOVIEW."

    \n"; } echo "
  • "._TOGOBACK."

    \n"; } } } } function checkadmin() { global $userid, $username, $admin, $xoopsUser, $xoopsDB, $module_name, $wcdata_url; if ( $xoopsUser ) { if (!$wcdata_url) { echo "

    Setting ERROR!

    "; echo "

    An administrator needs to set the value of \$wcdata_url in ".XOOPS_ROOT_PATH."/modules/XP-Weather/include/config.php

    "; return; } if ( $xoopsUser->isAdmin() ) { echo "

    $module_name "._WADMINMENU."

    "; echo "
  • "._NOTESTATION."

    "; echo "
  • "._WANT2CHNG.":

    \n"; echo ""._WDEFAULTSET."

    "._OR."

    \n"; echo "
    "._WYOURSET."

    \n"; }else { SelRegion("User", $userid); } } if ( !$xoopsUser ) { SelRegion("Anon"); } } // GET?f?[?^??????i?[ foreach($HTTP_GET_VARS as $k => $v){ $$k = $v; } // POST?f?[?^??????i?[ foreach($HTTP_POST_VARS as $k => $v){ $$k = $v; } $weatherop = (isset($weatherop))? $weatherop : ""; $wcity = (isset($wcity))? $wcity : ""; $Selection = (isset($Selection))? $Selection : ""; $newtpc = (isset($newtpc))? $newtpc : ""; $newtps = (isset($newtps))? $newtps : ""; $accid = (isset($accid))? $accid : ""; if ($xoopsUser) { $username = $xoopsUser->uname(); list($userid) = mysql_fetch_row($xoopsDB->query("select uid from ".$xoopsDB->prefix("users")." where uname='$username'")); } $xoopsOption['show_rblock'] =0; include(XOOPS_ROOT_PATH."/header.php"); //OpenTable(); echo "\n"; echo "
    \n"; switch($weatherop) { case "AdminRegion": SelRegion("Admin", 0); break; case "UserRegion": SelRegion("User", $userid); break; case "AdminCountry": SelCountry("Admin", $Selection, 0); break; case "UserCountry": SelCountry("User", $Selection, $userid); break; case "AdminSubDiv": SelSubDiv("Admin", $Selection, 0); break; case "UserSubDiv": SelSubDiv("User", $Selection, $userid); break; case "AdminCity": SelCity("Admin", $Selection, 0); break; case "UserCity": SelCity("User", $Selection, $userid); break; case "AdminStation": SelStation("Admin", $Selection, 0); break; case "UserStation": SelStation("User", $Selection, $userid); break; case "AdminPreSave": PreSave("Admin", $accid, $Selection, $stype, $userid); break; case "UserPreSave": PreSave("User", $accid, $Selection, $stype, $userid); break; case "AdminSave": SaveSet("Admin", $newtpc, $newtps, $accid, $wcid, $wstype, $wstation, 0); break; case "UserSave": SaveSet("User", $newtpc, $newtps, $accid, $wcid, $wstype, $wstation, $userid); break; default: checkadmin(); break; } echo "
    "; //CloseTable(); include(XOOPS_ROOT_PATH."/footer.php"); ?>