'BEL', 'Dänemark' => 'DNK', 'Deutschland' => 'DEU', 'Frankreich' => 'FRA', 'Großbritannien' => 'GBR', 'Italien' => 'ITA', 'Liechtenstein' => 'LIE', 'Luxemburg' => 'LUX', 'Niederlande' => 'NLD', 'Norwegen' => 'NOR', 'Österreich' => 'AUT', 'Portugal' => 'PRT', 'Schweden' => 'SWE', 'Schweiz' => 'CHE', 'Spanien' => 'ESP', 'Albanien' =>"ALB", 'Andorra' =>"AND", 'Armenien'=>"ARM", 'Aserbaidschan'=>"AZE", 'Bosnien-Herzegowina'=>"BIH", 'Bulgarien'=>"BGR", 'Estland'=>"EST", 'Faroer Inseln'=>"FRO", 'Finnland'=>"FIN", 'Georgien'=>"GEO", 'Gibraltar'=>"GIB", 'Griechenland'=>"GRC", 'Irland'=>"IRL", 'Island'=>"ISL", 'Kroatien'=>"HRV", 'Lettland'=>"LVA", 'Litauen'=>"LTU", 'Malta'=>"MLT", 'Makedonien'=>"MKD", 'Moldawien'=>"MDA", 'Monaco'=>"MCO", 'Polen'=>"POL", 'Rumänien'=>"ROM", 'Russland'=>"RUS", 'San Marino'=>"SMR", 'Serbien und Montenegro'=>"SCG", 'Slowakische Republik'=>"SVK", 'Slowenien'=>"SVN", 'Tschechische Republik'=>"CZE", 'Türkei'=>"TUR", 'Ukraine'=>"UKR", 'Ungarn'=>"HUN", 'Vatikanstadt'=>"VAT", 'Weißrussland'=>"BLR", 'Zypern'=>"CYP" ); /** * return some info */ function getInfo(){ return array( 'author' => 'Deshi, Jaloma', 'email' => 'deshi@web.de, jaloma.ac@googlemail.com', 'date' => '17/10/2008', 'name' => 'Routenplaner Plugin', 'desc' => 'plan your route using lycos or web.de', 'url' => 'http://jaloma.ac.googlepages.com/plugin:routenplaner' ); } /** * Syntax-Beispiel: {{routeplaner> Hubert Meier, Mustergasse 3, 80756, München, Deutschland}} */ /** * Plugin Type */ function getType(){ return 'substition'; } function getSort(){ return 314; } function connectTo($mode) { $this->Lexer->addSpecialPattern("\{\{routenplaner>.*?\}\}",$mode,'plugin_routenplaner_routenplaner'); } function matchLength() { return 15; } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ // strip markup //12345678901234567890123 //{{routenplaner> //{{routenplaner_webde> //{{routenplaner_lycosde> $match = html_entity_decode(substr($match,$this->matchLength(),-2)); // split into pieces list($company,$street,$zip, $town, $country) = explode(',',$match,5); // beautify strings if (trim($company, " \t\n") != '') { $company = trim($company, " \t\n"); } else { $company = 'Firma'; } if (trim($street, " \t\n") != '') { $street = trim($street, " \t\n"); } else { $street = ' ';//missing street'; } if (trim($zip, " \t\n") != '') { $zip = trim($zip, " \t\n"); } else { $zip = ' ';//'missing zip'; } if (trim($town, " \t\n") != '') { $town = trim($town, " \t\n"); } else { $town = ' ';//'missing town'; } if (trim($country, " \t\n") != '') { $country = trim($country, " \t\n"); } else { $country = ' ';//'missing country'; } return array($company,$street,$zip,$town,$country); } /** * Create output */ function render($mode, &$renderer, $data) { if($mode == 'xhtml'){ $renderer->doc .= $this->_contact($data); return true; } return false; } /** * Does the contact form xhtml creation. Adds some javascript to validate the form * and creates the input form. */ /** * Does the contact form xhtml creation. Adds some javascript to validate the form * and creates the input form. */ function _contact($data){ if ($this->getConf('modus') == 'lycosde') { return $this->lycosDeFormular($data); } elseif ($this->getConf('modus') == 'webde') { return $this->webDeFormular($data); } else { return 'Modus nicht unterstützt'; } } function lycosDeFormular($data) { $company = $data[0]; @$street = $data[1]; @$zip = $data[2]; @$town = $data[3]; @$country = $data[4]; $ret = ''; // $ret .= ''; $ret .= '
'; $ret .= '
'; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= '

'; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ' '; $ret .= ''; $ret .= '
Ziel:
Start:
'; $ret .= ' '; $ret .= '
'; $ret .= '
'; $ret .= '
'; $ret .= '
'; $ret .= '
'; return $ret; } function webDeFormular($data) { @$company = $data[0]; @$street = $data[1]; @$zip = $data[2]; @$town = $data[3]; @$country = $data[4]; $txt .='
'; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .=''; $txt .='
'; $txt .=''; $txt .=''; $txt .=''; $txt .=' '; $txt .=' '; $txt .=' '; $txt .=' '; $txt .=' '; $txt .=' '; $txt .=' '; $txt .=' '; if ($this->getConf('showwebdefooter') == true) { $txt .=' '; $txt .=' '; $txt .=' '; } $txt .='
'; $txt .='
'; $txt .=''; $txt .='
'; $txt .=''; $txt .='
'; $txt .=''; $txt .=' '; $txt .=' '; $txt .=' '; $txt .=' '; $txt .='

'; $txt .='

'.$street.'

'; $txt .='

'.$country.' - '.$zip.' '.$town.'

'; $txt .=''; $txt .='
Der WEB.DE Routenplaner auch auf Ihrer Homepage
'; $txt .='
'; $txt .='
'; return $txt; } // Function } // CLASS