| 1 |
<html> |
| 2 |
<head> |
| 3 |
<title>vCard SMS Sender</title> |
| 4 |
</head> |
| 5 |
<body bgcolor="#FFFFFF" text="#000000"> |
| 6 |
|
| 7 |
<?php |
| 8 |
include("config.inc"); |
| 9 |
include("functions.inc"); |
| 10 |
|
| 11 |
if ($submit) |
| 12 |
{ |
| 13 |
$text = "BEGIN:VCARD\r\n"; |
| 14 |
$text .= "VERSION:2.1\r\n"; |
| 15 |
$text .= "N:".$lastname.";".$firstname."\r\n"; |
| 16 |
$text .= "TEL;PREF:+".$telephone."\r\n"; |
| 17 |
$text .= "END:VCARD\r\n"; |
| 18 |
echo "Sending the vCard SMS message <b>\"$text\"</b> to the phone <b>$to</b>...<br>\n"; |
| 19 |
$URL = "/cgi-bin/sendsms?username=".USERNAME."&password=".PASSWORD."&from=".GLOBAL_SENDER."&to=$to&udh=%06%05%04%23%F4%00%00&text=".urlencode($text); |
| 20 |
// echo "URL: $URL<br>\n"; |
| 21 |
http_send($URL,SENDSMS_PORT); |
| 22 |
echo "<address><a href=\"$PHP_SELF\">Back to Send vCard SMS</a></address>\n"; |
| 23 |
} else { |
| 24 |
|
| 25 |
?> |
| 26 |
|
| 27 |
<h1>vCard SMS Sender</h1> |
| 28 |
<form name="sendvcard" method="post" action="<?php echo "$PHP_SELF" ?>"> |
| 29 |
<p> |
| 30 |
Telephone number to send the SMS to: |
| 31 |
<br> |
| 32 |
<input type="text" size="30" name="to"> |
| 33 |
</p> |
| 34 |
<p> |
| 35 |
vCard: |
| 36 |
<br> |
| 37 |
<table border=0> |
| 38 |
<tr><td>First name</td><td><input type=text" size="30" name="firstname"> <i>(ie. John)</i></td></tr> |
| 39 |
<tr><td>Last name</td><td><input type=text" size="30" name="lastname"> <i>(ie. Doe)</i></td></tr> |
| 40 |
<tr><td>Telephone</td><td><input type=text" size="30" name="telephone"> <i>(ie. 4512345678)</i></td></tr> |
| 41 |
</table> |
| 42 |
</p> |
| 43 |
<input type="submit" value="Send Message" name="submit"> |
| 44 |
<input type="reset" value="Reset"> |
| 45 |
<br> |
| 46 |
</form> |
| 47 |
|
| 48 |
<?php |
| 49 |
} |
| 50 |
?> |
| 51 |
|
| 52 |
<p> |
| 53 |
</p> |
| 54 |
<hr> |
| 55 |
<table border="0" width="100%"> |
| 56 |
<tr> |
| 57 |
<td width="50%"><address><a href="index.html">Back to admin</a></address></td> |
| 58 |
<td width="50%" align="right"><address>Visit the Kannel homepage at <a href="http://www.kannel.org">www.kannel.org</a>.</address></td> |
| 59 |
</tr> |
| 60 |
</table> |
| 61 |
</body> |
| 62 |
</html> |