kopia lustrzana https://github.com/to3k/twittodon
Porównaj commity
5 Commity
79e4ba61c5
...
9db139a975
Autor | SHA1 | Data |
---|---|---|
to3k | 9db139a975 | |
to3k | fdd2fa9b7f | |
to3k | d753931992 | |
to3k | e387d7d770 | |
tymoteuszjozwiak | 377e315fde |
|
@ -35,6 +35,19 @@
|
|||
{
|
||||
if($_POST['consent'] == "agree")
|
||||
{
|
||||
if($_SERVER['HTTP_CLIENT_IP'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
}
|
||||
elseif($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
$message = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">
|
||||
<head>
|
||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
|
||||
|
@ -42,7 +55,7 @@
|
|||
<body>
|
||||
<b>Submitter's address:</b> ".$email."<br>
|
||||
<b>Submitter's name:</b> ".addslashes(strip_tags($_POST['form_name']))."<br>
|
||||
<b>IP:</b> ".addslashes(strip_tags($_POST['ip']))."<br>
|
||||
<b>IP:</b> ".$ip."<br>
|
||||
<b>Problem with:</b> ".addslashes(strip_tags($_POST['form_case']))."<br>
|
||||
<b>Message:</b><br>
|
||||
".addslashes(strip_tags($_POST['form_message']))."
|
||||
|
@ -67,19 +80,6 @@
|
|||
else { $alert = 4; }
|
||||
}
|
||||
|
||||
if($_SERVER['HTTP_CLIENT_IP'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
}
|
||||
elseif($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
mysqli_close($mysqli);
|
||||
|
||||
//Change language
|
||||
|
@ -320,8 +320,7 @@
|
|||
<div class="inputs">
|
||||
<form method="post" action="">
|
||||
<?php
|
||||
echo "<input type=\"hidden\" name=\"ip\" value=\"".$ip."\" />";
|
||||
echo "<input type=\"hidden\" name=\"form_case\" value=\"".$case_get."\" />";
|
||||
echo "<input type=\"hidden\" name=\"form_case\" value=\"".$case_get."\" />";
|
||||
?>
|
||||
<input type="text" name="form_address" placeholder="Enter your e-mail address, so I can write you back" <?php echo "value=\"".addslashes(strip_tags($_POST['form_address']))."\""; ?> size="30"><br>
|
||||
<input type="text" name="form_name" placeholder="Enter your name, so I know how to call you" <?php echo "value=\"".addslashes(strip_tags($_POST['form_name']))."\""; ?> size="30"><br>
|
||||
|
|
14
confirm.php
14
confirm.php
|
@ -30,7 +30,7 @@
|
|||
else { break; }
|
||||
}
|
||||
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_special_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
|
||||
if(!empty($phrase[0]))
|
||||
{
|
||||
|
@ -56,7 +56,7 @@
|
|||
else { break; }
|
||||
}
|
||||
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_special_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
|
||||
if(!empty($phrase[0]))
|
||||
{
|
||||
|
@ -82,7 +82,7 @@
|
|||
else { break; }
|
||||
}
|
||||
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_special_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
|
||||
if(!empty($phrase[0]))
|
||||
{
|
||||
|
@ -108,7 +108,7 @@
|
|||
else { break; }
|
||||
}
|
||||
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_special_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
|
||||
if(!empty($phrase[0]))
|
||||
{
|
||||
|
@ -134,7 +134,7 @@
|
|||
else { break; }
|
||||
}
|
||||
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_special_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
preg_match("(<div class=\"tweet-content media-body\" dir=\"auto\">.+?".$mastodon_link.".+?Twittodon.com)is", $site_source_code, $phrase);
|
||||
|
||||
if(!empty($phrase[0]))
|
||||
{
|
||||
|
@ -469,9 +469,9 @@
|
|||
echo "<label><b>Step 1</b><br>Check if this link directs to your Twitter account:<br><a href=\"https://twitter.com/".$twitter."\" target=\"_blank\">https://twitter.com/".$twitter."</a></label>";
|
||||
echo "<label><b>Step 2</b><br>To verify that you are a owner of this Twitter account you need to post a tweet with the specified content. You have two options to do that.</label>";
|
||||
echo "<label><b>Step 3 - <i>option 1</i></b><br>Button below will direct you to your Twitter account and prepare a proper tweet, the only thing you need to do is to confirm sending tweet (you must be logged into account which you are verifying and your account needs to be public!):</label>";
|
||||
echo "<button type=\"button\" onClick=\"window.open('https://twitter.com/share?text=This is my account on Mastodon - ".$mastodon_special_link." - verified by @twittodon_com Twittodon.com', '_blank');\">Prepare tweet</button><br>";
|
||||
echo "<button type=\"button\" onClick=\"window.open('https://twitter.com/share?text=This is my account on Mastodon - ".$mastodon_link." - verified by @twittodon_com Twittodon.com', '_blank');\">Prepare tweet</button><br>";
|
||||
echo "<label><b>Step 3 - <i>option 2</i></b><br>If above solution doesn't work for you or you don't want to do it that way, you can do it manually by copying the text below and tweeting it on your timeline (your account needs to be public!):</label>";
|
||||
echo "<textarea id=\"CopyInput1\" wrap=\"hard\" disabled>This is my account on Mastodon - ".$mastodon_special_link." - verified by @twittodon_com Twittodon.com</textarea>";
|
||||
echo "<textarea id=\"CopyInput1\" wrap=\"hard\" disabled>This is my account on Mastodon - ".$mastodon_link." - verified by @twittodon_com Twittodon.com</textarea>";
|
||||
echo "<button type=\"button\" id=\"CopyButton1\" onclick=\"CopyFunction1()\">Copy</button><br>";
|
||||
echo "<label id=\"twitter_step4\"><b>Step 4</b><br>After posting a tweet confirm using button below to perform verification:</label>";
|
||||
echo "<button type=\"submit\" id=\"verify_twitter\" name=\"verify_twitter\">Verify</button><br>";
|
||||
|
|
31
contact.php
31
contact.php
|
@ -23,6 +23,19 @@
|
|||
{
|
||||
if($_POST['consent'] == "agree")
|
||||
{
|
||||
if($_SERVER['HTTP_CLIENT_IP'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
}
|
||||
elseif($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
$message = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">
|
||||
<head>
|
||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
|
||||
|
@ -30,7 +43,7 @@
|
|||
<body>
|
||||
<b>Submitter's address:</b> ".$email."<br>
|
||||
<b>Submitter's name:</b> ".addslashes(strip_tags($_POST['form_name']))."<br>
|
||||
<b>IP:</b> ".addslashes(strip_tags($_POST['ip']))."<br>
|
||||
<b>IP:</b> ".$ip."<br>
|
||||
<b>Message:</b><br>
|
||||
".addslashes(strip_tags($_POST['form_message']))."
|
||||
</body>
|
||||
|
@ -54,19 +67,6 @@
|
|||
else { $alert = 4; }
|
||||
}
|
||||
|
||||
if($_SERVER['HTTP_CLIENT_IP'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
}
|
||||
elseif($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
{
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
mysqli_close($mysqli);
|
||||
|
||||
//Change language
|
||||
|
@ -306,9 +306,6 @@
|
|||
?>
|
||||
<div class="inputs">
|
||||
<form method="post" action="">
|
||||
<?php
|
||||
echo "<input type=\"hidden\" name=\"ip\" value=\"".$ip."\" />";
|
||||
?>
|
||||
<input type="text" name="form_address" placeholder="Enter your e-mail address, so I can write you back" <?php echo "value=\"".addslashes(strip_tags($_POST['form_address']))."\""; ?> size="30"><br>
|
||||
<input type="text" name="form_name" placeholder="Enter your name, so I know how to call you" <?php echo "value=\"".addslashes(strip_tags($_POST['form_name']))."\""; ?> size="30"><br>
|
||||
<textarea name="form_message" placeholder="Type your message here..." size="30" rows="15"><?php echo addslashes(strip_tags($_POST['form_message'])); ?></textarea><br>
|
||||
|
|
Ładowanie…
Reference in New Issue