Location: PHPKode > projects > QUICKLYWEB > quicklyweb/admin/configuration.php
<?
session_start();
header("Cache-control: private");

require("quicklyweb.php");
require("security/secure.php");
adminify($_SESSION['sess_user'], $_SESSION['sess_admin']);

beginDocument($lConfiguration, $_SESSION['sess_user']);

$db = getDBConnection(); 

if ($_POST['updater'] == "config") {
 $result = DBquery("UPDATE Configuration SET SmtpServer='$_POST[SmtpServer]', State='$_POST[State]', Country='$_POST[Country]', TicketNotifier='$_POST[TicketNotifier]'", $db);
 checkDBerror($db);
 
 if(!(is_integer($result)) or ($result == 1)) {
  beginPrettyTable("1", $lConfigurationUpdate);
  echo "<tr>\n";
  echo " <td>\n";
  echo "   <div class=data>$lConfigUpdateSuccess <a href='settings.php'>$lAdminPage</a></div>\n";
  echo "  </td>\n";
  echo "</tr>\n";
  endPrettyTable();
 } else {
  beginPrettyTable("1", $lConfigurationUpdate);
  echo "<tr> <td><div class=data>$lConfigUpdateFail: ";
  echo mysql_error();
  echo "</div></td></tr>\n";
  endPrettyTable();
 }
} else {

 $result = DBquery("SELECT * FROM BillingInfo", $db);
 $billrow = DBfetch_array($result);
 $result = DBquery("SELECT * from Configuration", $db);
 $myrow = DBfetch_array($result);

 openForm("config", $_SERVER['PHP_SELF']);
  makeHiddenField("updater", "config");
  beginPrettyTable("2", $lConfiguration);
  beginBorderedTable("2");
   makeStaticField($lVersion, $VERSION);
   makeTextField($lSmtpServer, "SmtpServer", $myrow["SmtpServer"]);
   makeTextField($lDefaultState, "State", $myrow["State"]);
   makeDropBox($lDefaultCountry, "Country", $myrow["Country"], "Afghanistan", "Algeria", "Andorra", "Angola", "Anguila", "Antigua", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "The Bahamas", "Bahrain", "Bangladesh", "Barbados", "Barbuda", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bolivia", "Bosnia", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Columbia", "Congo", "DR Congo", "Cook Islands", "Costa Rica", "Cote D'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Dijbouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Estonia", "Ethiopia", "Faroe Islands", "Fiji Islands", "Finland", "France", "French Guiana", "French Polynesia", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Herzegovina", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea", "Kuwait", "Kyrgyzstan", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania",  "Luxembourg", "Macao Sar", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montenegro", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nepal", "Netherlands Antilles", "The Netherlands", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norfolk Island", "North Korea", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russia", "Rwanda", "St. Kitts & Nevis", "St. Lucia", "St. Vincent & Grenadines", "Samoa", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Tobago", "Togo", "Tonga", "Trinidad", "Tunisia", "Turkey", "Turkmenistan", "Turks & Caicos islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "Uruguay", "USA", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin islands", "Wallis & Futuna", "Yemen", "Zambia", "Zimbabwe");
   makeTextField("Ticket Notifier", "TicketNotifier", $myrow["TicketNotifier"]);
   makeStaticField($lPersistentConnections, $PERSISTENT);
   makeSubmitter();
  endBorderedTable();
  endPrettyTable();
 closeForm();
}
endDocument();
?>
Return current item: QUICKLYWEB