-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreport.php
38 lines (32 loc) · 2.11 KB
/
report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
// Configuration settings for Abusedesk plugin for Yourls - URL Shortener
// Copyright (c) 2010, Florian Overkamp <[email protected]>
global $ydb;
?>
<p><h2>Report abuse</h2>
<p>If you feel any short URL's is posted to support abusive purposes such as spam, you can report the URL as Abusive using the form below.
Just enter the last part of the short URL, add your comments and a contact address.
<p><b>The offending URL will be disabled automatically.</b>
<?
$alias = "";
$reporttext = "";
$reportemail = "";
if(isset($_POST['alias'])) $alias=mysql_escape_string($_POST['alias']);
if(isset($_POST['report'])) $reporttext=mysql_escape_string($_POST['report']);
if(isset($_POST['contact'])) $reportemail=mysql_escape_string($_POST['contact']);
if (!empty($alias)) {
$table = YOURLS_DB_TABLE_BLOCKED;
$insert = $ydb->query("REPLACE INTO `$table` (keyword, ip, reason, addr) VALUES ('$alias', '".$_SERVER['REMOTE_ADDR']."', '$reporttext', '$reportemail')");
echo "<font color=red>Short URL <b>$alias</b> has been marked as bad.</font><br/>\n";
}
?>
<form method="post" action="report">
<table border=0 cellspacing=0 cellpadding=0>
<tr><td valign=top>Short URL:</td><td valign=top><input type="text" name="alias" size="10" /></td></tr>
<tr><td valign=top>Reason to disable:<br/><b>(public info)</b></td><td valign=top><textarea rows=6 cols=60 name="report"><? echo $reporttext ?></textarea></td></tr>
<tr><td valign=top>Your email:<br/><b>(private info)</b></td><td valign=top><input type="text" name="contact" size="40" value="<? echo $reportemail ?>"/></td></tr>
<tr><td colspan=2><input type="submit" value="Report Abuse" /></td></tr>
</table>
</form>
<p><i>Please be advised: <b>Your report will be visible to visitors</b> of the shortlink (Reason to disable) but your contact details will remain confidential. We will only use your contact details if exchange of additional information is required.</i>
<p><i>However, if you mention the word 'Phishing' in the Reason to disable field, we will redirect visitors of the offending page to the <a href="http://education.apwg.org/r/" target="_blank">Antiphishing education</a> page.</i>