From 5ced7f2bc57176f399d8964183bfe453b1b91eff Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 30 Mar 2012 13:48:34 +0200 Subject: add themes diabook-red & diabook-aerith --- view/theme/diabook-red/fpostit/fpostit.php | 135 +++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 view/theme/diabook-red/fpostit/fpostit.php (limited to 'view/theme/diabook-red/fpostit/fpostit.php') diff --git a/view/theme/diabook-red/fpostit/fpostit.php b/view/theme/diabook-red/fpostit/fpostit.php new file mode 100644 index 000000000..65c43a2b9 --- /dev/null +++ b/view/theme/diabook-red/fpostit/fpostit.php @@ -0,0 +1,135 @@ + + + + + + + + $content); + + // echo "posting to: $url
"; + + $c = curl_init(); + curl_setopt($c, CURLOPT_URL, $url); + curl_setopt($c, CURLOPT_USERPWD, "$username:$password"); + curl_setopt($c, CURLOPT_POSTFIELDS, $data); + curl_setopt($c, CURLOPT_RETURNTRANSFER, true); + curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); + $c_result = curl_exec($c); + if(curl_errno($c)){ + $error = curl_error($c); + showForm($error, $content); + } + + curl_close($c); + if (!isset($error)) { + echo ''; + } + + } else { + $error = "Missing account name and/or password...try again please"; + showForm($error, $content); + } + +} else { + showForm(null, $content); +} + +function showForm($error, $content) { + $username_cookie = $_COOKIE['username']; + $password_cookie = $_COOKIE['password']; + + echo << +

+ Friendika Bookmarklet

+ + +
+
+ Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Account ID:
+ Password:
+
+   $error +
+

+
+EOF; + +} +?> + + + \ No newline at end of file -- cgit v1.2.3