Location: PHPKode > projects > MySonar > mysonar-gui-1.0/mysonar-1.0.php
<?php
/**
 * mySonar GUI - Version 1.0
 * mySonar (reachable under mySonar.de) is a platform for Location Based Mobile Networking. 
 * Users can find friends, flirts, partys and places arround by uses their mobile devices.
 * The application has several components. One of the components is the graphical user interface 
 * to access a XML Web Service layer, the services, kernel and database behind. This source file
 * belongs to that component.
 * 
 * Copyright (C) 2008 mySonar GbR, Markus Heussen
 * 
 * This program is free software; you can redistribute it and/or modify it under the terms of the 
 * GNU General Public License as published by the Free Software Foundation; only GPLv2.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program; 
 * if not, see <http://www.gnu.org/licenses/>.
 */

defined("ACCESS") or die("Direct access to this resource is not allowed.");

class MySonar {
	var $properties = array();
	
	public function __construct($standalone = true, $APIKey) {
		$this->setProperty("mobile_device_emulator_url", "http://www.mysonar.de"); // url to the webite which can start the mobile device emulator
		$this->setProperty("fatal_error_email_address", "hide@address.com"); // fatal errors with code 500 will be send by mail to this address
		$this->setProperty("title", "mySonar.de - Spass so nah!"); // title of the screens
		$this->setProperty("description", "mySonar.de ist Deutschlands erste standortbezogene Handy-Community mit eigener W&auml;hrung. mySonar findet kostenlos Freunde, Flirts, Partys und Pl&auml;tze in deiner Umgebung."); // a short description of the service
		$this->setProperty("keywords", "mySonar, mySonar.de, Handy-Community, lokal, regional, Region, Freunde, Flirts, Party, Partys, Parties, Locations, Location Based Service, Location Based Mobile Networking, Point of Interest, POI, Location Based Mobile Community, Location Based Dating, Location Based Advertising, mobiles Internet, Mobile Internet, Handy, Suche, Ortung, Handyortung, Mobile Marketing, Community, Web 2.0, Social Network, Standort, D&uuml;sseldorf, K&ouml;ln, Berlin, M&uuml;nchen, Hamburg, Frankfurt, Essen, Dortmund, Stuttgart, Dresden, Leipzip"); // keywords for search engines
		$this->setProperty("company_name", "Firma"); // your company name to use for imprint
		$this->setProperty("company_street", "Anschrift"); // your company's address (street and house number) to use for imprint
		$this->setProperty("company_location", "12345 Ort"); // your company's zip code and city name
		$this->setProperty("company_phone", "Phone +49.12345.12345-0"); // your company's phone number
		$this->setProperty("company_fax", "Fax +49.12345.12345-1"); // your company's telefax
		$this->setProperty("company_email", "Email name(&auml;t)domain(.)tld"); // your company's email address
		$this->setProperty("company_slogan", '<span class="my">my</span><span class="sonar">Sonar</span> ist Deutschlands erste Location Based Mobile Networking-Plattform mit eigener W&auml;hrung.'); // short description of your company
		$this->setProperty("ceo_name", "Max Muster"); // the name of your managing director
		$this->setProperty("ceo_phone", "+49.12345.12345-10"); // the phone number of your managing director
		$this->setProperty("ceo_email", "name(&auml;t)domain(.)tld"); // the email address of your managing director
		$this->setProperty("ceo_username", "muster"); // the username of the ceo
		$this->setProperty("cso_name", "Rita Muster"); // the name of your company's sales officer
		$this->setProperty("cso_phone", "+49.12345.12345-20"); // the phone number of your company's sales officer
		$this->setProperty("cso_email", "name(&auml;t)domain(.)tld"); // the email address of your company's sales officer
		$this->setProperty("cso_username", "rita"); // the username of your company's sales officer
		$this->setProperty("defaultapikey", "ffba124051e6c1d9389b020cfb0c");  // please enter your API key here
		$this->setProperty("wsdl", "http://server.mysonar.de/mysonar-1.0.wsdl"); // please enter the url of the web service description file here
		$this->setProperty("wsdlcache", "0"); // 1 = activate cache for performance reasons
		$this->setProperty("encoding" , "ISO-8859-1"); // default character encoding for germany
		$this->setProperty("tempdir", "D:/dev/workspace/tmp/"); // path to an existing folder for temporarily storing binary data files
		$this->setProperty("uploaddir", "".$this->getProperty("tempdir")); // path to an existing folder for temporarily uploading binary files by users
		$this->setProperty("ranges", array ( // german translation for ranges in kilometers
			250=>"250 m", 
			500=>"500 m", 
			1000=>"1 km", 
			2000=>"2 km", 
			5000=>"5 km", 
			10000=>"10 km", 
			50000=>"50 km", 
			100000=>"100 km", 
			1000000=>"1.000 km")
		); 
		$this->setProperty("flirts", array ( // german translation for yes and no in case of flirts
			"true"=>"ja", 
			"false"=>"nein")
		); 
		$this->setProperty("visibility", array ( // german translation for visibility
			"VISIBLE"=>"sichtbar f&uuml;r alle", 
			"FRIENDS"=>"sichtbar f&uuml;r Kontakte", 
			"BEF"=>"sichtbar f&uuml;r BEFs", 
			"HIDDEN"=>"unsichtbar f&uuml;r alle")
		); 
		$this->setProperty("mapwidths", array ( // german translation for map width
			150=>"150 px", 
			175=>"175 px", 
			200=>"200 px", 
			225=>"225 px", 
			250=>"250 px", 
			275=>"275 px", 
			300=>"300 px", 
			350=>"350 px", 
			400=>"400 px")
		); 
		$this->setProperty("mapheights", array ( // german translation for map height
			200=>"200 px", 
			225=>"225 px", 
			250=>"250 px", 
			275=>"275 px", 
			300=>"300 px", 
			350=>"350 px", 
			400=>"400 px")
		); 
		$this->setProperty("objecttypes", array ( // german translation for type of objects to search for
			"ALL"=>"Alles", 
			"USER"=>"nur Mitglieder", 
			"POI"=>"nur Partys &amp; Pl&auml;tze")
		); 
		$this->setProperty("poitypes", array ( // german translation for search categories
			"PARTY"=>"Partys", 
			"EVENT"=>"Events, Konzerte &amp; Gigs", 
			"RESTAURANT"=>"Restaurants &amp; Bistros", 
			"CLUB"=>"Discos &amp; Clubs", 
			"CAFE"=>"Cafes &amp; Eiscafes", 
			"BAR"=>"Bars &amp; Kneipen", 
			"CASHPOINT"=>"Geldautomaten", 
			"CINEMA"=>"Kinos &amp; Autokinos", 
			"GASSTATION"=>"Tankstellen", 
			"SHOP"=>"Shops", 
			"SUPERMARKET"=>"Superm&auml;rkte", 
			"BOWLING"=>"Bowling-Center", 
			"BATHS"=>"Schwimmb&auml;der",
			"FASTFOOD"=>"Fastfood-Restaurants", 
			"SNACK"=>"Imbisse", 
			"DRUGSTORE"=>"Apotheken &amp; Drogerien", 
			"HOTSPOT"=>"WLAN-Hotspots", 
			"POST"=>"Post", 
			"PARKINGLOT"=>"Parkpl&auml;tze &amp; -h&auml;user", 
			"TAXISTOP"=>"Taxihaltestellen", 
			"CAMPINGGROUND"=>"Campingpl&auml;tze", 
			"YOUTHHOSTEL"=>"Jugendherbergen", 
			"GYM"=>"Fitness-Studios", 
			"HORSEFARM"=>"Reiterh&ouml;fe", 
		));
		$this->setProperty("usersexes", array ( // german translation for users sex to search for
			"ALL"=>"Frauen &amp; M&auml;nner", 
			"FEMALE"=>"nur Frauen", 
			"MALE"=>"nur M&auml;nner")
		); 
		$this->setProperty("ages", array( // german translation for age categories; add or remove categories by your own
			0=>"egal", 
			16=>"16 bis 19 Jahre", 
			20=>"20 bis 24 Jahre", 
			25=>"25 bis 29 Jahre", 
			30=>"30 bis 39 Jahre", 
			40=>"40 bis 49 Jahre", 
			50=>"&uuml;ber 50 Jahre")
		); 
		$this->setProperty("status", array ( // german translation for user status on- oder offline
			""=>"???", 
			"ONLINE"=>'<span class="online">ON</span>', 
			"OFFLINE"=>'<span class="offline">OFF</span>')
		); 
		$this->setProperty("sex", array ( // short german form for the users sex
			""=>"???", 
			"FEMALE"=>'<span class="female">W</span>', 
			"MALE"=>'<span class="male">M</span>')
		); 
		$this->setProperty("sexlong", array ( // correct writing for the users sex in german language
			""=>"???", 
			"FEMALE"=>'<span class="female">weiblich</span>', 
			"MALE"=>'<span class="male">m&auml;nnlich</span>')
		); 
		$this->setProperty("days", array ( // weekdays in german
			0=>"Sonntag", 
			1=>"Montag", 
			2=>"Dienstag", 
			3=>"Mittwoch", 
			4=>"Donnerstag", 
			5=>"Freitag", 
			6=>"Samstag")
		); 
		$this->setProperty("grades", array ( // german translation for grades from 1 to 6 (school)
			1=>"sehr gut", 
			2=>"gut", 
			3=>"befriedigend", 
			4=>"ausreichend", 
			5=>"mangelhaft", 
			6=>"ungen&uuml;gend")
		); 
		$this->setProperty("countries", array("DE" => "Deutschland")); // at the moment only german language is supported
		$this->setProperty("nopicfilename", "nopicture.gif"); // do only touch if necessary; configure the images directory here 
		$this->setProperty("imagesdir", "images/"); // do only touch if necessary; configure the images directory here 
		// please to not change the following properties
		$this->setProperty("backlink", '<a accesskey="Z" href="'.str_replace('&', '&amp;', $_SERVER["HTTP_REFERER"]).'" title="Zur&uuml;ck">Zur&uuml;ck</a>'); // please do not touch except for translation
		$this->setProperty("homelink", '<a accesskey="0" href="index.php" title="Startseite">Home</a>'); // please do not touch except for translation
		$this->setProperty("messagemaxchars", 255); // to not touch
		$this->setProperty("smsmaxchars", 150); // to not touch
		$this->setProperty("apikey", ($APIKey!="" ? $APIKey:$this->getProperty("defaultapikey"))); // do not touch here
		$this->setProperty("admin_username", ($_SESSION["Security"]->Group->Owner!="" ? $_SESSION["Security"]->Group->Owner:"mySonar")); // do not touch; auto-evaluated by API key
		$this->setProperty("standalone", $standalone); // do not touch
		$this->setProperty("security", $_SESSION["Security"]); // please do not touch
		$this->setProperty("location", $_SESSION["Location"]); // please do not touch
		$this->setProperty("group", $_SESSION["Group"]); // please do not touch
		$this->setProperty("user", $_SESSION["User"]); // please do not touch
		$this->setProperty("preferences", $_SESSION["SonarPreferences"]); // please do not touch
		$this->setProperty("icons", array( // to not touch here
			1=>"A", 
			2=>"B", 
			3=>"C", 
			4=>"D", 
			5=>"E", 
			6=>"F", 
			7=>"G", 
			8=>"H", 
			9=>"I", 
			10=>"J", 
			11=>"K", 
			11=>"L", 
			12=>"M", 
			13=>"N", 
			14=>"O", 
			15=>"P")
		); 
	}
	
	public function setProperty($name, $value) {
		$this->properties[$name] = $value;
	}
		
	public function getProperty($name) {
		return $this->properties[$name];
	}	
	
}
?>
Return current item: MySonar