<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 2/3/2014
//
	
	include ("check_session.php");
		
	$query = "SELECT `language_folder` FROM " . BWB_TABLE_PREFIX . "plugins WHERE `name` = 'Calendar Grid v2'";
	$result = $bwb_dbh->query($query);
	$row = $result->fetch(PDO::FETCH_ASSOC);
	$language_folder = $row['language_folder'];
		
	$document_root = $_SERVER['DOCUMENT_ROOT'];
	if ((defined("BWB_LANG")) && (file_exists($document_root . "/" . $language_folder . "/" . BWB_LANG . ".php")))
		include_once ($document_root . "/" . $language_folder . "/" . BWB_LANG . ".php");
	else
		include_once ($document_root . "/" . $language_folder . "/en.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Event Management Console</title>

<link rel="stylesheet" href="../../theme/<?php echo $theme; ?>/manager.css" type="text/css">
<link rel="stylesheet" href="theme/<?php echo $theme; ?>/manage_events.css" type="text/css">
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">

<style type="text/css">
#help_button	{
	position:relative;
	display:block;
	top:-15px;
	left:215px;
	height:31px;
	width:31px;
	z-index:100;
}

#close_btn_div	{
	top: 3px;
	right: 5px;
	display: block;
}

#edit_btn	{
	float: right;
	margin-top: -32px;
}

#cloak_div	{
	left: 22%;
}

#new_btn_top	{
	width:100px;
	margin-left:100px;
}

#new_btn_bottom	{
	width:100px;
	margin-left:auto;
	margin-right:auto;
	margin-top:15px;
}
</style>

<script src="../../js/ajax.js"> </script>
<script src="../../js/mouse_position.js"></script>
<script src="../../js/popup_msg.js"> </script>
<script src="../../js/browser_detect.js"> </script>
<script src="js/manage_locations.js"> </script>
<script src="../../js/jquery.min.js"></script>
<script src="../../js/ajaxupload.js"></script>
<script src="js/nicEdit.js"></script>

<script>
<?php
	echo "	var theme = '$theme';\n\n";
	echo "	var EDIT_WORD = \"" . EDIT_WORD . "\";\n";
	echo "	var ADD_WORD = \"" . ADD_WORD . "\";\n";
	echo "	var EDITOR_DELETE = \"" . EDITOR_DELETE . "\";\n";
	echo "	var YES_WORD = \"" . YES_WORD . "\";\n";
	echo "	var NO_WORD = \"" . NO_WORD . "\";\n";
	echo "	var CALENDAR_EVENTS_RETRIEVING_LOCATION_MSG = \"" . CALENDAR_EVENTS_RETRIEVING_LOCATION_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_EDIT_LOCATION = \"" . MANAGE_LOCATION_EDIT_LOCATION . "\";\n";
	echo "	var RECORD_NOT_FOUND = \"" . RECORD_NOT_FOUND . "\";\n";
	echo "	var MANAGE_LOCATION_POPULATE_LOCATION_COMPLETED_MSG = \"" . MANAGE_LOCATION_POPULATE_LOCATION_COMPLETED_MSG . "\";\n";
	echo "	var QUERY_READY_TO_SEND = \"" . QUERY_READY_TO_SEND . "\";\n";
	echo "	var QUERY_SENT = \"" . QUERY_SENT . "\";\n";
	echo "	var QUERYING = \"" . QUERYING . "\";\n";
	echo "	var CALENDAR_EVENTS_POPULATING_LOCATION_MSG = \"" . CALENDAR_EVENTS_POPULATING_LOCATION_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_SAVING_LOCATION_MSG = \"" . MANAGE_LOCATION_SAVING_LOCATION_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_FILTERING_LOCATIONS_MSG = \"" . MANAGE_LOCATION_FILTERING_LOCATIONS . "\";\n";
	echo "	var CALENDAR_EVENTS_DELETE_EVENT_CONFIRM_1_MSG = \"" . CALENDAR_EVENTS_DELETE_EVENT_CONFIRM_1_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_DELETE_LOCATION_MSG_2 = \"" . MANAGE_LOCATION_DELETE_LOCATION_MSG_2 . "\";\n";
	echo "	var MANAGE_LOCATION_DELETING_LOCATION_MSG = \"" . MANAGE_LOCATION_DELETING_LOCATION_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_CLEARING_FORM_NOW_LOCATION_MSG = \"" . MANAGE_LOCATION_CLEARING_FORM_NOW_LOCATION_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_PLEASE_ENTER_NAME_MSG = \"" . MANAGE_LOCATION_PLEASE_ENTER_NAME_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_PLEASE_ENTER_ADDRESS_MSG = \"" . MANAGE_LOCATION_PLEASE_ENTER_ADDRESS_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_PLEASE_ENTER_CITY_MSG = \"" . MANAGE_LOCATION_PLEASE_ENTER_CITY_MSG . "\";\n";
	echo "	var MANAGE_LOCATION_PLEASE_ENTER_ZIP_MSG = \"" . MANAGE_LOCATION_PLEASE_ENTER_ZIP_MSG . "\";\n";
	echo "	var CALENDAR_EVENTS_NO_CATEGORIES_FOUND_MSG = \"" . CALENDAR_EVENTS_NO_CATEGORIES_FOUND_MSG . "\";\n";
	echo "	var CALENDAR_EVENTS_LOCATION = \"" . CALENDAR_EVENTS_LOCATION . "\";\n";
	echo "	var DESCRIPTION_WORD = \"" . DESCRIPTION_WORD . "\";\n";
	echo "	var MANAGE_LOCATION_ADDRESS = \"" . MANAGE_LOCATION_ADDRESS . "\";\n";
	echo "	var CALENDAR_EVENTS_CITY = \"" . CALENDAR_EVENTS_CITY . "\";\n";
	echo "	var CALENDAR_EVENTS_STATE = \"" . CALENDAR_EVENTS_STATE . "\";\n";
	echo "	var CALENDAR_EVENTS_COUNTRY = \"" . CALENDAR_EVENTS_COUNTRY . "\";\n";
	echo "	var MANAGE_LOCATION_PHONE = \"" . MANAGE_LOCATION_PHONE . "\";\n";
	echo "	var MANAGE_LOCATION_EMAIL = \"" . MANAGE_LOCATION_EMAIL . "\";\n";
	echo "	var MANAGE_LOCATION_WEBSITE = \"" . MANAGE_LOCATION_WEBSITE . "\";\n";
	echo "	var CALENDAR_EVENTS_CATEGORIES = \"" . CALENDAR_EVENTS_CATEGORIES . "\";\n";
	echo "	var STATUS_WORD = \"" . STATUS_WORD . "\";\n";
	echo "	var ACTIVE_WORD = \"" . ACTIVE_WORD . "\";\n";
	echo "	var PENDING_WORD = \"" . PENDING_WORD . "\";\n";
	echo "	var PUBLISHED_WORD = \"" . PUBLISHED_WORD . "\";\n";
	echo "	var DECLINED_WORD = \"" . DECLINED_WORD . "\";\n";
	echo "	var MANAGE_LOCATION_CREATE_NEW_LOCATION = \"" . MANAGE_LOCATION_CREATE_NEW_LOCATION . "\";\n";
	echo "	var MANAGE_LOCATIONS_ALL_CITIES = \"" . MANAGE_LOCATIONS_ALL_CITIES . "\";\n";
	echo "	var _NOT_SELECTED_ = \"" . _NOT_SELECTED_ . "\";\n";
	
	if ($_SERVER['SERVER_NAME'] == "beearoundtown.com")
		echo "	var show_status = true;\n";
	else
		echo "	var show_status = false;\n";
		
	echo "	var http = '$http';\n";
?>
</script>
</head>

<body id="workspace_body" onLoad="InitializeConsole();">

<div class='button_console_go_back' style="width:250px; position:absolute; right:40px; top:0px;" onClick="window.location.href='manage_events.php'"><span class='button_console_text_w_icon'><?php echo MANAGE_EVENT_CATEGORIES_BACK_BTN; ?></span></div>

<div class="button_heading_sub_level_1" id="manage_events_heading"><div class="button_heading_text_sub_level_1"><?php echo MANAGE_LOCATIONS_HEADING; ?></div><div class="help_button" id="help_button" onClick="OpenHelpWindow();">&nbsp;</div></div>

<div style="width:50%; margin-left:auto; margin-right:auto; padding-bottom:5px;">
<form action="manage_locations.php" id="frmFilter" method="post" name="frmFilter">
    <table id="filter_table">
     <tbody>
      <tr>
        <td class="sub_title"><?php echo MANAGE_LOCATION_FILTER_BY_CITY; ?>:</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>
         <select name='filter_city' id='filter_city' onChange="Filter();">
         <option value='-not selected-'><?php echo MANAGE_LOCATIONS_ALL_CITIES; ?></option>
          </select>                
         <?php if ($_SERVER['SERVER_NAME'] == "beearoundtown.com")	{	?>
         </td>
         <td>
         	<input type="checkbox" name="show_pending" id="show_pending" <?php if ($show_pending) echo "checked='checked'"; ?> onChange="Filter();" /> <?php echo CALENDAR_EVENTS_SHOW_PENDING; ?>
         <?php }	else	{	?>
         	<input type="hidden" name="show_pending" id="show_pending" value="0" />
         <?php }	?>
         </td>
         <td>
         	<div class='button_console_add_sm' id='new_btn_top' onClick='CreateLocation();'><span class='button_console_text_w_sm_icon'><?php echo ucfirst(NEW_WORD); ?></span></div>
         </td>
      </tr>
     </tbody>
   </table>
</form>
</div>

<div id="LocationsTable" style="width:100%;">&nbsp;</div>

<div class='button_console_add_sm' id='new_btn_bottom' onClick='CreateLocation();'><span class='button_console_text_w_sm_icon'><?php echo ucfirst(NEW_WORD); ?></span></div>

<div id="cloak_div">

<form action="save_location.php" id="frmLocation" method="post" name="frmLocation">
<table class="mail_form_table">
    <tbody>
        <tr>
        <td class="sub_title" id="action_heading"><?php echo MANAGE_LOCATION_CREATE_NEW_LOCATION; ?>:</td>
        <td><div id="close_btn_div"><img src="../../theme/<?php echo $theme; ?>/images/close-button.png" alt="<?php echo CLOSE_WORD; ?>" onClick="CloseEditForm();" /></div></div>
        </tr>
      </tbody>
     </table>
     <hr style="border-width:2px; border-style:solid; width:100%;" />
     <table id="edit_table">
       <tbody>
        <tr id="location_categories_heading_row">
          <td class="bold" colspan="2">
            &nbsp; <?php echo CALENDAR_EVENTS_CATEGORIES; ?>
          </td>
        </tr>
        <tr id="location_categories_row">
            <td colspan="2">
            <table border="0" width="80%">
                <tbody>
                    <tr>
                        <td id="location_categories_cell">&nbsp;
                        
                        </td>
                    </tr>
                </tbody>
            </table>
            <input id="location_categories" name="location_categories" type="hidden" /></td>
        </tr>
        <tr>
            <td class="bold" width="300" id="business_name_cell"><strong><span style="color:#FF0000;">*</span></strong> <?php echo CALENDAR_EVENTS_BUSINESS_NAME; ?>: </td>
            <td><input id="location_name" name="location_name" style="width:320px;" type="text" /></td>
        </tr>
        <tr>
            <td valign="top" class="bold">&nbsp;&nbsp; <?php echo DESCRIPTION_WORD; ?>: </td>
            <td bgcolor="#FFFFFF"><textarea cols="75" id="location_description" name="location_description" rows="5"></textarea></td>
        </tr>
        <tr>
            <td class="bold"><strong><span style="color:#FF0000;">*</span></strong> <?php echo CALENDAR_EVENTS_BUSINESS_ADDRESS; ?>: </td>
            <td><input id="address" name="address" style="width:320px;" type="text" /></td>
        </tr>
        <tr>
            <td >&nbsp;</td>
            <td><input id="address2" name="address2" style="width:320px;" type="text" /></td>
        </tr>
        <tr>
            <td class="bold" style="vertical-align:top;"><strong><span style="color:#FF0000;">*</span></strong> <?php echo CALENDAR_EVENTS_CITY; ?>: </td>
            <td>
            <select id="city_select" name="city_select" size="1" onChange="document.getElementById('city').value = this.value;">
            <option><?php echo _NOT_SELECTED_; ?></option>
            </select>
            <br />
              <input id="city" name="city" style="width:320px;" type="text" />
            </td>
        </tr>
        <tr>
            <td class="bold" style="vertical-align:top;"><strong><span style="color:#FF0000;">*</span></strong> <?php echo CALENDAR_EVENTS_STATE; ?>: </td>
            <td>
                <select name="state_select" id="state_select" onChange="document.getElementById('state').value = this.value;">
                <option><?php echo _NOT_SELECTED_; ?></option>
                <option value="AL">Alabama</option>
                <option value="AK">Alaska</option>
                <option value="AZ">Arizona</option>
                <option value="AR">Arkansas</option>
                <option value="CA">California</option>
                <option value="CO">Colorado</option>
                <option value="CT">Connecticut</option>
                <option value="DE">Delaware</option>
                <option value="DC">Dist of Columbia</option>
                <option value="FL">Florida</option>
                <option value="GA">Georgia</option>
                <option value="HI">Hawaii</option>
                <option value="ID">Idaho</option>
                <option value="IL">Illinois</option>
                <option value="IN">Indiana</option>
                <option value="IA">Iowa</option>
                <option value="KS">Kansas</option>
                <option value="KY">Kentucky</option>
                <option value="LA">Louisiana</option>
                <option value="ME">Maine</option>
                <option value="MD">Maryland</option>
                <option value="MA">Massachusetts</option>
                <option value="MI">Michigan</option>
                <option value="MN">Minnesota</option>
                <option value="MS">Mississippi</option>
                <option value="MO">Missouri</option>
                <option value="MT">Montana</option>
                <option value="NE">Nebraska</option>
                <option value="NV">Nevada</option>
                <option value="NH">New Hampshire</option>
                <option value="NJ">New Jersey</option>
                <option value="NM">New Mexico</option>
                <option value="NY">New York</option>
                <option value="NC">North Carolina</option>
                <option value="ND">North Dakota</option>
                <option value="OH">Ohio</option>
                <option value="OK">Oklahoma</option>
                <option value="OR">Oregon</option>
                <option value="PA">Pennsylvania</option>
                <option value="RI">Rhode Island</option>
                <option value="SC">South Carolina</option>
                <option value="SD">South Dakota</option>
                <option value="TN">Tennessee</option>
                <option value="TX">Texas</option>
                <option value="UT">Utah</option>
                <option value="VT">Vermont</option>
                <option value="VA">Virginia</option>
                <option value="WA">Washington</option>
                <option value="WV">West Virginia</option>
                <option value="WI">Wisconsin</option>
                <option value="WY">Wyoming</option>
                </select>
                <br />
              <input id="state" name="state" style="width:320px;" type="text" />
            </td>
        </tr>
        <tr>
            <td class="bold" style="vertical-align:top;">&nbsp; <?php echo CALENDAR_EVENTS_COUNTRY; ?>: </td>
            <td>
                <select name="country_select" id="country_select" onChange="document.getElementById('country').value = this.value;">
                    <option value=""><?php echo _NOT_SELECTED_; ?></option>
                    <option value="AF">Afghanistan</option>
                    <option value="AL">Albania</option>
                    <option value="DZ">Algeria</option>
                    <option value="AS">American Samoa</option>
                    <option value="AD">Andorra</option>
                    <option value="AG">Angola</option>
                    <option value="AI">Anguilla</option>
                    <option value="AG">Antigua &amp; Barbuda</option>
                    <option value="AR">Argentina</option>
                    <option value="AA">Armenia</option>
                    <option value="AW">Aruba</option>
                    <option value="AU">Australia</option>
                    <option value="AT">Austria</option>
                    <option value="AZ">Azerbaijan</option>
                    <option value="BS">Bahamas</option>
                    <option value="BH">Bahrain</option>
                    <option value="BD">Bangladesh</option>
                    <option value="BB">Barbados</option>
                    <option value="BY">Belarus</option>
                    <option value="BE">Belgium</option>
                    <option value="BZ">Belize</option>
                    <option value="BJ">Benin</option>
                    <option value="BM">Bermuda</option>
                    <option value="BT">Bhutan</option>
                    <option value="BO">Bolivia</option>
                    <option value="BL">Bonaire</option>
                    <option value="BA">Bosnia &amp; Herzegovina</option>
                    <option value="BW">Botswana</option>
                    <option value="BR">Brazil</option>
                    <option value="BC">British Indian Ocean Ter</option>
                    <option value="BN">Brunei</option>
                    <option value="BG">Bulgaria</option>
                    <option value="BF">Burkina Faso</option>
                    <option value="BI">Burundi</option>
                    <option value="KH">Cambodia</option>
                    <option value="CM">Cameroon</option>
                    <option value="CA">Canada</option>
                    <option value="IC">Canary Islands</option>
                    <option value="CV">Cape Verde</option>
                    <option value="KY">Cayman Islands</option>
                    <option value="CF">Central African Republic</option>
                    <option value="TD">Chad</option>
                    <option value="CD">Channel Islands</option>
                    <option value="CL">Chile</option>
                    <option value="CN">China</option>
                    <option value="CI">Christmas Island</option>
                    <option value="CS">Cocos Island</option>
                    <option value="CO">Colombia</option>
                    <option value="CC">Comoros</option>
                    <option value="CG">Congo</option>
                    <option value="CK">Cook Islands</option>
                    <option value="CR">Costa Rica</option>
                    <option value="CT">Cote D'Ivoire</option>
                    <option value="HR">Croatia</option>
                    <option value="CU">Cuba</option>
                    <option value="CB">Curacao</option>
                    <option value="CY">Cyprus</option>
                    <option value="CZ">Czech Republic</option>
                    <option value="DK">Denmark</option>
                    <option value="DJ">Djibouti</option>
                    <option value="DM">Dominica</option>
                    <option value="DO">Dominican Republic</option>
                    <option value="TM">East Timor</option>
                    <option value="EC">Ecuador</option>
                    <option value="EG">Egypt</option>
                    <option value="SV">El Salvador</option>
                    <option value="GQ">Equatorial Guinea</option>
                    <option value="ER">Eritrea</option>
                    <option value="EE">Estonia</option>
                    <option value="ET">Ethiopia</option>
                    <option value="FA">Falkland Islands</option>
                    <option value="FO">Faroe Islands</option>
                    <option value="FJ">Fiji</option>
                    <option value="FI">Finland</option>
                    <option value="FR">France</option>
                    <option value="GF">French Guiana</option>
                    <option value="PF">French Polynesia</option>
                    <option value="FS">French Southern Ter</option>
                    <option value="GA">Gabon</option>
                    <option value="GM">Gambia</option>
                    <option value="GE">Georgia</option>
                    <option value="DE">Germany</option>
                    <option value="GH">Ghana</option>
                    <option value="GI">Gibraltar</option>
                    <option value="GB">Great Britain</option>
                    <option value="GR">Greece</option>
                    <option value="GL">Greenland</option>
                    <option value="GD">Grenada</option>
                    <option value="GP">Guadeloupe</option>
                    <option value="GU">Guam</option>
                    <option value="GT">Guatemala</option>
                    <option value="GN">Guinea</option>
                    <option value="GY">Guyana</option>
                    <option value="HT">Haiti</option>
                    <option value="HW">Hawaii</option>
                    <option value="HN">Honduras</option>
                    <option value="HK">Hong Kong</option>
                    <option value="HU">Hungary</option>
                    <option value="IS">Iceland</option>
                    <option value="IN">India</option>
                    <option value="ID">Indonesia</option>
                    <option value="IA">Iran</option>
                    <option value="IQ">Iraq</option>
                    <option value="IR">Ireland</option>
                    <option value="IM">Isle of Man</option>
                    <option value="IL">Israel</option>
                    <option value="IT">Italy</option>
                    <option value="JM">Jamaica</option>
                    <option value="JP">Japan</option>
                    <option value="JO">Jordan</option>
                    <option value="KZ">Kazakhstan</option>
                    <option value="KE">Kenya</option>
                    <option value="KI">Kiribati</option>
                    <option value="NK">Korea North</option>
                    <option value="KS">Korea South</option>
                    <option value="KW">Kuwait</option>
                    <option value="KG">Kyrgyzstan</option>
                    <option value="LA">Laos</option>
                    <option value="LV">Latvia</option>
                    <option value="LB">Lebanon</option>
                    <option value="LS">Lesotho</option>
                    <option value="LR">Liberia</option>
                    <option value="LY">Libya</option>
                    <option value="LI">Liechtenstein</option>
                    <option value="LT">Lithuania</option>
                    <option value="LU">Luxembourg</option>
                    <option value="MO">Macau</option>
                    <option value="MK">Macedonia</option>
                    <option value="MG">Madagascar</option>
                    <option value="MY">Malaysia</option>
                    <option value="MW">Malawi</option>
                    <option value="MV">Maldives</option>
                    <option value="ML">Mali</option>
                    <option value="MT">Malta</option>
                    <option value="MH">Marshall Islands</option>
                    <option value="MQ">Martinique</option>
                    <option value="MR">Mauritania</option>
                    <option value="MU">Mauritius</option>
                    <option value="ME">Mayotte</option>
                    <option value="MX">Mexico</option>
                    <option value="MI">Midway Islands</option>
                    <option value="MD">Moldova</option>
                    <option value="MC">Monaco</option>
                    <option value="MN">Mongolia</option>
                    <option value="MS">Montserrat</option>
                    <option value="MA">Morocco</option>
                    <option value="MZ">Mozambique</option>
                    <option value="MM">Myanmar</option>
                    <option value="NA">Nambia</option>
                    <option value="NU">Nauru</option>
                    <option value="NP">Nepal</option>
                    <option value="AN">Netherland Antilles</option>
                    <option value="NL">Netherlands (Holland, Europe)</option>
                    <option value="NV">Nevis</option>
                    <option value="NC">New Caledonia</option>
                    <option value="NZ">New Zealand</option>
                    <option value="NI">Nicaragua</option>
                    <option value="NE">Niger</option>
                    <option value="NG">Nigeria</option>
                    <option value="NW">Niue</option>
                    <option value="NF">Norfolk Island</option>
                    <option value="NO">Norway</option>
                    <option value="OM">Oman</option>
                    <option value="PK">Pakistan</option>
                    <option value="PW">Palau Island</option>
                    <option value="PS">Palestine</option>
                    <option value="PA">Panama</option>
                    <option value="PG">Papua New Guinea</option>
                    <option value="PY">Paraguay</option>
                    <option value="PE">Peru</option>
                    <option value="PH">Philippines</option>
                    <option value="PO">Pitcairn Island</option>
                    <option value="PL">Poland</option>
                    <option value="PT">Portugal</option>
                    <option value="PR">Puerto Rico</option>
                    <option value="QA">Qatar</option>
                    <option value="ME">Republic of Montenegro</option>
                    <option value="RS">Republic of Serbia</option>
                    <option value="RE">Reunion</option>
                    <option value="RO">Romania</option>
                    <option value="RU">Russia</option>
                    <option value="RW">Rwanda</option>
                    <option value="NT">St Barthelemy</option>
                    <option value="EU">St Eustatius</option>
                    <option value="HE">St Helena</option>
                    <option value="KN">St Kitts-Nevis</option>
                    <option value="LC">St Lucia</option>
                    <option value="MB">St Maarten</option>
                    <option value="PM">St Pierre &amp; Miquelon</option>
                    <option value="VC">St Vincent &amp; Grenadines</option>
                    <option value="SP">Saipan</option>
                    <option value="SO">Samoa</option>
                    <option value="AS">Samoa American</option>
                    <option value="SM">San Marino</option>
                    <option value="ST">Sao Tome &amp; Principe</option>
                    <option value="SA">Saudi Arabia</option>
                    <option value="SN">Senegal</option>
                    <option value="SC">Seychelles</option>
                    <option value="SL">Sierra Leone</option>
                    <option value="SG">Singapore</option>
                    <option value="SK">Slovakia</option>
                    <option value="SI">Slovenia</option>
                    <option value="SB">Solomon Islands</option>
                    <option value="OI">Somalia</option>
                    <option value="ZA">South Africa</option>
                    <option value="ES">Spain</option>
                    <option value="LK">Sri Lanka</option>
                    <option value="SD">Sudan</option>
                    <option value="SR">Suriname</option>
                    <option value="SZ">Swaziland</option>
                    <option value="SE">Sweden</option>
                    <option value="CH">Switzerland</option>
                    <option value="SY">Syria</option>
                    <option value="TA">Tahiti</option>
                    <option value="TW">Taiwan</option>
                    <option value="TJ">Tajikistan</option>
                    <option value="TZ">Tanzania</option>
                    <option value="TH">Thailand</option>
                    <option value="TG">Togo</option>
                    <option value="TK">Tokelau</option>
                    <option value="TO">Tonga</option>
                    <option value="TT">Trinidad &amp; Tobago</option>
                    <option value="TN">Tunisia</option>
                    <option value="TR">Turkey</option>
                    <option value="TU">Turkmenistan</option>
                    <option value="TC">Turks &amp; Caicos Is</option>
                    <option value="TV">Tuvalu</option>
                    <option value="UG">Uganda</option>
                    <option value="UA">Ukraine</option>
                    <option value="AE">United Arab Emirates</option>
                    <option value="GB">United Kingdom</option>
                    <option value="US">United States of America</option>
                    <option value="UY">Uruguay</option>
                    <option value="UZ">Uzbekistan</option>
                    <option value="VU">Vanuatu</option>
                    <option value="VS">Vatican City State</option>
                    <option value="VE">Venezuela</option>
                    <option value="VN">Vietnam</option>
                    <option value="VB">Virgin Islands (Brit)</option>
                    <option value="VA">Virgin Islands (USA)</option>
                    <option value="WK">Wake Island</option>
                    <option value="WF">Wallis &amp; Futana Is</option>
                    <option value="YE">Yemen</option>
                    <option value="ZR">Zaire</option>
                    <option value="ZM">Zambia</option>
                    <option value="ZW">Zimbabwe</option>
                    </select>
                <br />
              <input id="country" name="country" style="width:320px;" type="text" />
            </td>
        </tr>
        <tr>
            <td class="bold"><strong><span style="color:#FF0000;">*</span></strong> <?php echo CALENDAR_EVENTS_ZIP_CODE; ?>: </td>
            <td><input id="postal_code" name="postal_code" style="width:80px;" type="text" /></td>
        </tr>
        <tr>
            <td class="bold">&nbsp;&nbsp; <?php echo CALENDAR_EVENTS_BIZ_PHONE; ?>: </td>
            <td><input id="phone" name="phone" type="text" style="width:140px;" /></td>
        </tr>
        <tr>
            <td class="bold">&nbsp;&nbsp; <?php echo MANAGE_LOCATION_PHONE_2; ?>: </td>
            <td><input id="phone2" name="phone2" type="text" style="width:140px;" /></td>
        </tr>
        <tr>
            <td class="bold">&nbsp;&nbsp; <?php echo MANAGE_LOCATION_FAX; ?>: </td>
            <td><input id="fax" name="fax" type="text" style="width:140px;" /></td>
        </tr>
        <tr>
            <td class="bold">&nbsp;&nbsp; <?php echo CALENDAR_EVENTS_WEB_ADDRESS; ?>: </td>
            <td><input id="website" name="website" style="width:320px;" type="text" /></td>
        </tr>
        <tr>
            <td class="bold">&nbsp;&nbsp; <?php echo CALENDAR_EVENTS_WEB_ADDRESS_TEXT ?>: </td>
            <td><input id="web_link_text" name="web_link_text" style="width:320px;" type="text" /></td>
        </tr>
        <tr>
            <td class="bold">&nbsp;&nbsp; <?php echo CALENDAR_EVENTS_EMAIL; ?>: </td>
            <td><input id="email" name="email" style="width:320px;" type="text" /></td>
        </tr>
        <tr>
            <td colspan="2">
                <table width="100%">
                <tr>
                 <td class="bold" align="right" width="25%"><?php echo ACTIVE_WORD; ?>: </td>
                <td width="25%">
                <input type="checkbox" name="location_active" id="location_active" value="1" />
                <?php	if ($_SERVER['SERVER_NAME'] == "beearoundtown.com")	{	?>
                </td>
                <td class="bold" align="right" width="25%"><?php echo STATUS_WORD; ?>: </td>
                <td width="25%">
                <select name="location_status" id="location_status">
                <option value="0"><?php echo PENDING_WORD; ?></option>
                <option value="1"><?php echo PUBLISHED_WORD; ?></option>
                <option value="-1"><?php echo DECLINED_WORD; ?></option>
                </select>
                <?php }	else	{	?>
                <input type="hidden" name="location_status" id="location_status" value="0" />
                <?php }	?>
                </td>
                </tr>
                </table>
            </td>
        </tr>
        <tr>
          <td colspan="2">
            <table border="0" width="100%">
                <tbody>
                    <tr>
                        <td align="left">
                        <div class='button_console_delete_sm' style='width:100px;' onClick="DeleteConfirm(document.getElementById('select_location').value, document.getElementById('location_name').value);" id="delete_btn"><span class='button_console_text_w_sm_icon'><?php echo EDITOR_DELETE; ?></span></div>
                        </td>
                        <td align="right">
                        <div class='button_console_save_sm' style='width:100px;' onClick='SaveLocation(false);' id="save_btn"><span class='button_console_text_w_sm_icon'><?php echo EDITOR_SAVE; ?></span></div>
                        </td>
                        <td align="right">
                        <div class='button_console_save_sm' style='width:170px;' onclick='SaveLocation(true);' id="save_close_btn"><span class='button_console_text_w_sm_icon'><?php echo CALENDAR_EVENTS_SAVE_AND_CLOSE; ?></span></div>
                        </td>
                    </tr>
                </tbody>
            </table>
          </td>
        </tr>
    </tbody>
</table>
<input type="hidden" name="location_id" id="location_id" value="<?php echo location_id; ?>" />
<input type="hidden" name="location_owner" id="location_owner" value="<?php echo $userid; ?>" />
</form>
</div>

<?php include("../../lib/popup_msg.html"); ?>
</body>
</html>