Guest User

Untitled

a guest
Mar 9th, 2015
587
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.59 KB | None | 0 0
  1. <?php
  2.  
  3. function generateqr($titel, $name, $firma, $firma2, $funktion1, $funktion2, $funktion3, $funktion4, $strasse, $stadt, $plz, $land, $telefon, $fax, $mobile, $mail, $website) {
  4.  
  5.     $generateqrtext = "BEGIN:VCARD"."<br />".
  6.               "VERSION:4.0"."<br />".
  7.               "N:".$titel." ".$name."<br />".  
  8.                       "FN:".$titel." ".$name."<br />".
  9.                       "ORG:".$firma." ".$firma2."<br />".
  10.                       "TITLE:".$funktion1." ".$funktion2." ".$funktion3." ".$funktion4."<br />".
  11.                       "ADR;TYPE=work:;;".$strasse.";".$stadt.";;".$plz.";".$land."<br />".
  12.                       "TEL;TYPE=work;TYPE=voice:".$telefon."<br />".
  13.                       "TEL;TYPE=fax:".$fax."<br />".
  14.                       "TEL;TYPE=cell;TYPE=work:".$mobile."<br />".
  15.                       "EMAIL;TYPE=work:".$mail."<br />".
  16.                       "URL:".$website."<br />".
  17.                       "END:VCARD";
  18.  
  19.     return $generateqrtext;
  20.  
  21. }
  22.  
  23. $titel = 'B.Sc.';
  24. $name  = 'Max Mustermann';
  25. $firma  = 'Musterfirma';
  26. $firma2 = 'Zentrale Süd';
  27. $funktion1 = 'Leading';
  28. $funktion2 = 'Architect of';
  29. $funktion3 = 'very special';
  30. $funktion4 = 'Problems';
  31. $strasse = 'Musterstr. 1';
  32. $stadt = 'Musterstadt';
  33. $plz = '12345';
  34. $land = 'Germany';
  35. $telefon = '0123-456789';
  36. $fax = '0123-456789-99';
  37. $mobile = '0123-45 45 67';
  38. $website = 'www.musterfirma.com';
  39.  
  40. echo generateqr($titel, $name, $firma, $firma2, $funktion1, $funktion2, $funktion3, $funktion4, $strasse, $stadt, $plz, $land, $telefon, $fax, $mobile, $mail, $website);
  41.  
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment