From d76b052f90346b49d64aeef9024ab56f8be79f53 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 24 Mar 2012 04:05:21 +0100 Subject: add PostIt to right_aside, fixes in css --- view/theme/diabook/fpostit/fpostit.php | 135 +++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 view/theme/diabook/fpostit/fpostit.php (limited to 'view/theme/diabook/fpostit/fpostit.php') diff --git a/view/theme/diabook/fpostit/fpostit.php b/view/theme/diabook/fpostit/fpostit.php new file mode 100644 index 000000000..acf77a6c8 --- /dev/null +++ b/view/theme/diabook/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 From 8451b22d42d913d5f03b3598ed5772580844ac55 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 24 Mar 2012 08:56:26 +0100 Subject: small fix in css --- view/theme/diabook/fpostit/fpostit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/diabook/fpostit/fpostit.php') diff --git a/view/theme/diabook/fpostit/fpostit.php b/view/theme/diabook/fpostit/fpostit.php index acf77a6c8..65c43a2b9 100644 --- a/view/theme/diabook/fpostit/fpostit.php +++ b/view/theme/diabook/fpostit/fpostit.php @@ -21,7 +21,7 @@ if (($_POST["friendika_acct_name"] != '') && ($_POST["friendika_password"] != '' } .wrap1 { padding: 2px 5px; - background-color: #729FCF; + background-color: #000; margin-bottom: 10px; } .wrap2 { -- cgit v1.2.3