User:RFC posting script/source
Appearance
postingtool.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RfC posting tool</title>
<style type="text/css">
<!--
.style2 {
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 36px;
}
.style3 {
font-size: 45px;
font-family: "Trebuchet MS";
font-weight: bold;
}
.style6 {font-size: 27px}
.style7 {font-size: 42px}
.style8 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</head>
<body>
<div class="style2 style3" style="height:90px; padding:3px; background-image:url('./bg.png'); width:100%; margin-left:auto; margin-right:auto; text-align:left;"> <span class="style7">Requests for comment</span><br />
<span class="style6">RfC posting tool</span></div>
<br />
<div style="padding: 3px; border: 2px dashed #0000FF; font: 15px Arial, Helvetica, sans-serif">
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL ^ E_NOTICE);
include("./botclasses.php");
$rfctype = $_GET['rfctype'];
$page = $_GET['page'];
$section = $_GET['section'];
$reason = $_GET['reason'];
if (isset($_GET['submit'])) {
if (($_GET['rfctype'] != "") && ($_GET['page'] != "") && ($_GET['section'] != "") && ($_GET['reason'] != "")) {
echo "<b>You are almost done.</b> Click the \"Go to Wikipedia\" button, where you will be sent to an edit window with your RfC prepared.<br />";
echo "<form name='middleform' method='post' action='http://wiki.riteme.site/w/index.php?action=submit'>\n";
echo "<input type='hidden' name='title' id='title' value=\"" . $page . "\" />\n";
echo "<input type='hidden' name='wpSummary' id='wpSummary' value=\"" . $section . "\" />\n";
echo "<input type='hidden' name='wpTextbox1' id='wpTextbox1' value=\"{{rfctag|" . $rfctype . "}}\n\n" . $reason . "\" />\n";
echo "<input type='hidden' name='wpSave' id='wpSave' value='' />\n";
echo "<input type='hidden' name='wpSection' id='wpSection' value='new' />\n";
echo "<input type='hidden' name='wpStarttime' id='wpStarttime' value='" . date("YmdHis", time()) . "' />\n";
echo "<input type='submit' name='submit' id='submit' value='Go to Wikipedia' />\n";
echo "</form>";
}
else {
echo "You did not fill out every field. Go back and try again.";
}
}
else {
echo "<form id=\"postingtool\" name=\"postingtool\" method=\"get\" action=\"postingtool.php\">\n";
echo "<strong>Page for RFC discussion: </strong>\n";
echo "<label>\n";
echo "<input name=\"page\" type=\"text\" id=\"page\" value=\"Talk:\" size=\"40\" />\n";
echo "</label>\n";
echo "<em>Do not forget \"Talk:\" if you are posting to a talk page. Only write the page title, not the full URL.<br />\n";
echo "</em><strong>RFC category:\n";
echo "<select name=\"rfctype\" id=\"rfctype\">\n";
echo "<option selected=\"selected\" value='RFCbio'>Biographies</option>\n";
echo "<option value='econ'>Economy, trade, and companies</option>\n";
echo "<option value='hist'>History and geography</option>\n";
echo "<option value='lang'>Language and linguistics</option>\n";
echo "<option value='sci'>Maths, science, and technology</option>\n";
echo "<option value='art'>Art, architecture, literature, and media</option>\n";
echo "<option value='pol'>Politics, government, and law</option>\n";
echo "<option value='reli'>Religion and philosophy</option>\n";
echo "<option value='soc'>Society, sports, and culture</option>\n";
echo "<option value='style'>Wikipedia style and naming</option>\n";
echo "<option value='policy'>Wikipedia policies and guidelines</option>\n";
echo "<option value='proj'>WikiProjects and collaborations</option>\n";
echo "<option value='prop'>Wikipedia proposals</option>\n";
echo "</select>\n";
echo "</strong><br />\n";
echo "<strong>Name of RFC: \n";
echo "<label> \n";
echo "<input name=\"section\" type=\"text\" id=\"section\" size=\"56\" />\n";
echo "</label>\n";
echo "</strong> <em>This is the name of the new discussion section that will be created<br />\n";
echo "</em><strong>Description:</strong> <em>Keep it short and to the point. Don't forget to sign with four tildes: ~~~~</em><br />\n";
echo "<textarea name=\"reason\" id=\"reason\" cols=\"70\" rows=\"7\"></textarea>\n";
echo "<label></label>\n";
echo "</strong><br />\n";
echo "<br />\n";
echo "<label>\n";
echo "<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Submit\" />\n";
echo "</label>\n";
echo "<br />\n";
echo "</form>\n";
}
?>
</div>
<br />
<span class="style8">Copyright © 2009 James Hare.
</body>
</html>