Initial commit
|
@ -0,0 +1,16 @@
|
|||
Rocksolid Light (rslight). Web based Usenet client.
|
||||
Copyright (C) 2017-2020 Retro_Guy
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
@ -0,0 +1,61 @@
|
|||
Installing Rocksolid Light (rslight) - a web based news client
|
||||
|
||||
rslight is based on NewsPortal, which discontinued development in 2008, and was
|
||||
developed by Florian Amrhein https://florian-amrhein.de/newsportal/
|
||||
|
||||
rslight contains some major code and feature changes, but would not exist
|
||||
without NewsPortal as a basis for development.
|
||||
|
||||
Requirements:
|
||||
|
||||
You will need a web server: rslight has been tested with apache2, lighttpd, nginx
|
||||
and synchronet web servers
|
||||
|
||||
php is required, and your web server must be configured to serve .php.
|
||||
|
||||
php-mbstring (to support other character sets), sharutils (for uudecode) and
|
||||
openssl are required.
|
||||
phpmailer is required if email confirmation is to be used.
|
||||
These are the names for Debian packages. Other distributions should
|
||||
also provide these in some way.
|
||||
|
||||
If you get errors, check your log files to see what packages I've failed to mention.
|
||||
|
||||
For FreeBSD:
|
||||
pkg install php72
|
||||
pkg install php72-extensions
|
||||
pkg install sharutils
|
||||
pkg install php72-pcntl
|
||||
pkg install php72-sockets
|
||||
pkg install php72-mbstring
|
||||
pkg install php72-openssl
|
||||
|
||||
Installation:
|
||||
|
||||
1. Set up your webserver to handle php files
|
||||
|
||||
2. Extract rslight into a temporary location
|
||||
|
||||
3. Run the provided install script (debian-install.sh or freebsd-install.sh) as root
|
||||
and answer the prompts. This will configure locations, create directories and move files
|
||||
into place.
|
||||
|
||||
4. Edit configuration file
|
||||
|
||||
Load common/setup.php in your browser to configure your site. The admin password
|
||||
was displayed during install but can also be found in your config directory in
|
||||
admin.inc.php
|
||||
|
||||
5. Add a cron job for the root user. Change the directories in this line to match your setup
|
||||
as shown in the installation script. Set the minutes as you wish. The paths must match your
|
||||
installation:
|
||||
|
||||
*/5 * * * * cd /usr/local/www/html/spoolnews ; bash -lc "php /etc/rslight/scripts/cron.php"
|
||||
This will start the nntp server, then drop privileges to your web user and begin pulling
|
||||
articles from the remote server to create your spool. You won't see articles immediately
|
||||
in rslight, please wait 15-30 minutes to begin to see articles appear.
|
||||
|
||||
If you have trouble, post to rocksolid.nodes.help and we'll try to help.
|
||||
|
||||
Retro Guy
|
||||
retroguy@rocksolidbbs.com
|
|
@ -0,0 +1,114 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
if (file_exists('../common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/style.css">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
|
||||
# $hostname: '{POPaddress:port/pop3}INBOX'
|
||||
$hostname = '{rocksolidbbs:110/pop3}INBOX';
|
||||
# $external: Using external POP auth?
|
||||
$external = 0;
|
||||
# $workpath: Where to cache users (must be writable by calling program)
|
||||
$workpath = $config_dir."users/";
|
||||
$keypath = $config_dir."userconfig/";
|
||||
|
||||
# DO NOT EDIT ANYTHING BELOW THIS LINE
|
||||
$ok = FALSE;
|
||||
$command = "Login";
|
||||
|
||||
$current = $_POST['current'];
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
$command = $_POST['command'];
|
||||
|
||||
echo '<center>';
|
||||
|
||||
$thisusername = $username;
|
||||
$username = strtolower($username);
|
||||
$userFilename = $workpath.$username;
|
||||
$keyFilename = $keypath.$username;
|
||||
|
||||
# Check all input
|
||||
if (empty($_POST['username'])) {
|
||||
echo "Please enter a Username\r\n";
|
||||
echo '<br /><a href="changepw.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if (!check_bbs_auth($username, $current)) {
|
||||
echo "Failed to authenticate\r\n";
|
||||
echo '<br /><a href="changepw.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ($_POST['password'] !== $_POST['password2']) {
|
||||
echo "Your passwords entered do not match\r\n";
|
||||
echo '<br /><a href="changepw.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
|
||||
$ok=true;
|
||||
# User is authenticated or to be created. Either way, create the file
|
||||
if ($ok || ($command == "Change") )
|
||||
{
|
||||
if ($userFileHandle = @fopen($userFilename, 'w+'))
|
||||
{
|
||||
fwrite($userFileHandle, password_hash($password, PASSWORD_DEFAULT));
|
||||
fclose($userFileHandle);
|
||||
chmod($userFilename, 0666);
|
||||
}
|
||||
|
||||
echo "User:".$thisusername." Password changed\r\n";
|
||||
echo '<br /><a href="../">Back</a>';
|
||||
exit(0);
|
||||
} else {
|
||||
echo "Authentication Failed\r\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
function make_key($username) {
|
||||
$key = openssl_random_pseudo_bytes(44);
|
||||
return base64_encode($key);
|
||||
}
|
||||
|
||||
function check_bbs_auth($username, $password) {
|
||||
global $config_dir;
|
||||
$workpath = $config_dir."users/";
|
||||
$username = strtolower($username);
|
||||
$userFilename = $workpath.$username;
|
||||
|
||||
if ($userFileHandle = @fopen($userFilename, 'r'))
|
||||
{
|
||||
$userFileInfo = fread($userFileHandle, filesize($userFilename));
|
||||
fclose($userFileHandle);
|
||||
if (password_verify ( $password , $userFileInfo))
|
||||
{
|
||||
touch($userFilename);
|
||||
$ok = TRUE;
|
||||
} else {
|
||||
$ok = FALSE;
|
||||
}
|
||||
} else {
|
||||
$ok = FALSE;
|
||||
}
|
||||
if ($ok)
|
||||
{
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<html>
|
||||
<?php include "head.inc";?>
|
||||
<table width=100% border="0" align="center" cellpadding="0" cellspacing="1">
|
||||
<tr>
|
||||
<form name="form1" method="post" action="change.php">
|
||||
<td>
|
||||
<table width="100%" border="0" cellpadding="3" cellspacing="1">
|
||||
<tr>
|
||||
<td colspan="3"><strong>Change Password </strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="78">Username</td>
|
||||
<td width="6">:</td>
|
||||
<td width="294"><input name="username" type="text" id="username"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Current Password</td>
|
||||
<td>:</td>
|
||||
<td><input name="current" type="password" id="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New Password</td>
|
||||
<td>:</td>
|
||||
<td><input name="password" type="password" id="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Re-enter Password</td>
|
||||
<td>:</td>
|
||||
<td><input name="password2" type="password" id="password2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="command" type="hidden" id="command" value="Change" readonly="readonly"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><input type="submit" name="Submit" value="Change Password"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
/* Location of configuration and spool */
|
||||
$config_dir = "<config_dir>";
|
||||
$spooldir = "<spooldir>";
|
||||
|
||||
if(isset($config_name) && file_exists($config_dir.$config_name.'.inc.php')) {
|
||||
$config_file = $config_dir.$config_name.'.inc.php';
|
||||
} else {
|
||||
$config_file = $config_dir.'rslight.inc.php';
|
||||
}
|
||||
/* Include main config file for rslight */
|
||||
$CONFIG = include $config_file;
|
||||
|
||||
ini_set('error_reporting', E_ERROR );
|
||||
?>
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
// setcookie("ts_limit",4096,time()+(3600*24*30),"/");
|
||||
include "config.inc.php";
|
||||
include "head.inc";
|
||||
$CONFIG = include($config_file);
|
||||
$workpath = $config_dir."users/";
|
||||
$keypath = $config_dir."userconfig/";
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
$user_email = $_POST['user_email'];
|
||||
$code = $_POST['code'];
|
||||
$userFilename = $workpath.$username;
|
||||
$keyFilename = $keypath.$username;
|
||||
@mkdir($workpath.'new/');
|
||||
$tmpFilename = $workpath."new/".$username;
|
||||
$verified = 0;
|
||||
|
||||
$no_verify=explode(' ', $CONFIG['no_verify']);
|
||||
foreach($no_verify as $no) {
|
||||
if (strlen($_SERVER['HTTP_HOST']) - strlen($no) === strrpos($_SERVER['HTTP_HOST'],$no)) {
|
||||
$CONFIG['verify_email'] = false;
|
||||
}
|
||||
}
|
||||
if($CONFIG['verify_email'] === true) {
|
||||
$saved_code = file_get_contents(sys_get_temp_dir()."/".$username);
|
||||
if((strcmp(trim($code), trim($saved_code))) !== 0) {
|
||||
echo "Code does not match. Try again.<br />";
|
||||
echo '<form name="create1" method="post" action="create.php">';
|
||||
echo '<input name="code" type="text" id="code"> ';
|
||||
echo '<input name="username" type="hidden" id="username" value="'.$username.'" readonly="readonly">';
|
||||
echo '<input name="password" type="hidden" id="password" value="'.$password.'" readonly="readonly">';
|
||||
echo '<input name="user_email" type="hidden" id="user_email" value="'.$user_email.'" readonly="readonly">';
|
||||
echo '<input type="submit" name="Submit" value="Click Here to Create"></td>';
|
||||
echo '<br/><br/><a href="'.$CONFIG['default_content'].'">Cancel and return to home page</a>';
|
||||
exit(2);
|
||||
}
|
||||
$verified = 1;
|
||||
}
|
||||
if ($userFileHandle = @fopen($userFilename, 'w+'))
|
||||
{
|
||||
fwrite($userFileHandle, password_hash($password, PASSWORD_DEFAULT));
|
||||
fclose($userFileHandle);
|
||||
chmod($userFilename, 0666);
|
||||
}
|
||||
if(isset($synch_create) && $synch_create === true) {
|
||||
$result = shell_exec('/sbbs/rscreate/createbbsuser '.$username.' '.$password);
|
||||
}
|
||||
if ($userFileHandle = @fopen($tmpFilename, 'w+'))
|
||||
{
|
||||
fwrite($userFileHandle, $password);
|
||||
fclose($userFileHandle);
|
||||
chmod($tmpFilename, 0666);
|
||||
}
|
||||
$newkey = make_key($username);
|
||||
if ($userFileHandle = @fopen($keyFilename, 'w+'))
|
||||
{
|
||||
fwrite($userFileHandle, 'encryptionkey:'.$newkey."\r\n");
|
||||
fwrite($userFileHandle, 'email:'.$user_email."\r\n");
|
||||
if($verified == 1) {
|
||||
fwrite($userFileHandle, "email_verified:true\r\n");
|
||||
}
|
||||
fclose($userFileHandle);
|
||||
chmod($userFilename, 0666);
|
||||
}
|
||||
unlink(sys_get_temp_dir()."/".$username);
|
||||
echo "User:".$username." Created\r\n";
|
||||
echo '<br /><a href="'.$CONFIG['default_content'].'">Back</a>';
|
||||
|
||||
function make_key($username) {
|
||||
$key = openssl_random_pseudo_bytes(44);
|
||||
return base64_encode($key);
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
q: what is this ?
|
||||
a: it is a node of the rocksolid forums.
|
||||
The rocksolid forums are technically some news
|
||||
servers running private newsgroups together and offering web frontends
|
||||
for user access. the intention is to have redundant web forums, which
|
||||
are always up and reachable in a way.
|
||||
a2: some nodes may carry other groups, including common usenet groups.
|
||||
|
||||
q: what are the tos ?
|
||||
a: don't irritate the admins. they/we run these sites because we want
|
||||
to. Don't troll, post crap, illegal stuff, and it should be fine.
|
||||
|
||||
q: will you tolerate links to cp ?
|
||||
a: no (see above).
|
||||
|
||||
q: why do you use stoneage technology ?
|
||||
a1: because it's fun.
|
||||
a2: because it saves you (the user) and me (the admin) from some
|
||||
security holes the newer stuff brings with it (having said that, of
|
||||
course there are security holes in the old stuff as well...)
|
||||
a3: because it handles the job well (even on old hardware and minimal
|
||||
systems)
|
||||
|
||||
q: what do i do when this node is down or unreachable ?
|
||||
a: use any other rocksolid site, they all carry the same message base
|
||||
(and some of them other groups as well, like usenet, dovenet or freenet
|
||||
groups).
|
||||
|
||||
q: i discovered a piece of information that should not be here. what do
|
||||
i do ?
|
||||
a: ask in rocksolid.nodes.help for the admin of the node you are using
|
||||
and how to contact them.
|
||||
a2: For novabbs or rocksolidbbs, email admin@novabbs.com
|
||||
|
||||
q: what is the point of all of this ?
|
||||
a: it's free anonymous speech, and the fun of running a service that
|
||||
supports it.
|
||||
|
||||
q: can i run my own node ?
|
||||
a: sure you can. it is easier then it might look. contact us in the
|
||||
rocksolid.shared.rocksolid group.
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlspecialchars($title); ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
|
||||
if (file_exists('mods/header.php')) {
|
||||
include "mods/header.php";
|
||||
} else {
|
||||
include "header.php";
|
||||
}
|
||||
|
||||
if (file_exists('mods/'.$style_css)) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="mods/'.$style_css.'">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="'.$style_css.'">';
|
||||
}
|
||||
?>
|
||||
<hr>
|
||||
</head>
|
||||
<body textcolor="black" bgcolor="white">
|
|
@ -0,0 +1,136 @@
|
|||
<html>
|
||||
<head>
|
||||
<?php
|
||||
if (basename(getcwd()) == 'mods') {
|
||||
$rootdir = "../../";
|
||||
} else {
|
||||
$rootdir = "../";
|
||||
}
|
||||
|
||||
include($rootdir.'common/config.inc.php');
|
||||
$CONFIG = include $config_file;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
if (navigator.cookieEnabled)
|
||||
document.cookie = "tzo="+ (- new Date().getTimezoneOffset());
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES);
|
||||
$linklist = file($config_dir."links.conf", FILE_IGNORE_NEW_LINES);
|
||||
|
||||
if (file_exists($rootdir.'common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="'.$rootdir.'common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="'.$rootdir.'common/style.css">';
|
||||
}
|
||||
if (file_exists($rootdir.'common/mods/images/rocksolidlight.png')) {
|
||||
$header_image=$rootdir.'common/mods/images/rocksolidlight.png';
|
||||
} else {
|
||||
$header_image=$rootdir.'common/images/rocksolidlight.png';
|
||||
}
|
||||
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<table width="100%" valign="middle">
|
||||
<tr>
|
||||
<td width="30%">
|
||||
<a href="<?php echo $CONFIG['default_content'];?>"><img src="<?php echo $header_image ?>" alt="Rocksolid Light" class="responsive_image"></a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
|
||||
<p align="left"><small>
|
||||
<font class="np_title">
|
||||
<?php echo $CONFIG['rslight_title']; ?>
|
||||
</font>
|
||||
</small></p>
|
||||
</td>
|
||||
<td align="right">
|
||||
<?php
|
||||
foreach($linklist as $link) {
|
||||
if($link[0] == '#') {
|
||||
continue;
|
||||
}
|
||||
$linkitem=explode(':', $link, 2);
|
||||
if($linkitem[1] == '0') {
|
||||
continue;
|
||||
}
|
||||
echo '<a href="'.trim($linkitem[1]).'">'.trim($linkitem[0]).'</a>  ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
// You can display fortunes if you have fortune installed. This is disabled by default
|
||||
$display_fortunes = true;
|
||||
|
||||
if($display_fortunes) {
|
||||
ob_start();
|
||||
|
||||
// Select fortunes
|
||||
// If you want different fortunes for different sections you can do that here
|
||||
|
||||
if($config_name == 'computers' || $config_name == 'programming') {
|
||||
passthru('/usr/games/fortune -s -n 100 linux debian perl linuxcookie computers');
|
||||
} else if ($config_name == 'arts' || $config_name == 'interests') {
|
||||
passthru('/usr/games/fortune -s -n 100 art magic tao cookie songs-poems work food miscellaneous literature pets science wisdom');
|
||||
} else if ($config_name =='sport') {
|
||||
passthru('/usr/games/fortune -s -n 100 sports');
|
||||
} else {
|
||||
passthru('/usr/games/fortune -s -n 100');
|
||||
}
|
||||
$motd = ob_get_contents();
|
||||
$motd = htmlentities($motd);
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
// If $config_dir/motd.txt is not blank, show it
|
||||
$m = file_get_contents($config_dir.'/motd.txt');
|
||||
if (trim($m) !== '' ) {
|
||||
$motd = $m;
|
||||
}
|
||||
|
||||
echo '<p align="center">';
|
||||
echo '<table cellpadding="0" cellspacing="0" class="np_header_bar_large"><tr>';
|
||||
foreach($menulist as $menu) {
|
||||
if($menu[0] == '#') {
|
||||
continue;
|
||||
}
|
||||
$menuitem=explode(':', $menu);
|
||||
if($menuitem[1] == '0') {
|
||||
continue;
|
||||
}
|
||||
echo '<td>';
|
||||
echo '<form target="'.$frame['menu'].'" action="'.$rootdir.$menuitem[0].'">';
|
||||
echo '<button class="np_header_button_link" type="submit">'.$menuitem[0].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr></table>';
|
||||
echo '<table cellpadding="0" cellspacing="0" class="np_header_bar_small"><tr>';
|
||||
|
||||
foreach($menulist as $menu) {
|
||||
if($menu[0] == '#') {
|
||||
continue;
|
||||
}
|
||||
$menuitem=explode(':', $menu);
|
||||
if($menuitem[1] == '0') {
|
||||
continue;
|
||||
}
|
||||
echo '<td>';
|
||||
echo '<form target="'.$frame['content'].'" action="'.$rootdir.$menuitem[0].'">';
|
||||
echo '<button class="np_header_button_link" type="submit">'.$menuitem[0].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
if(strlen($motd) > 0) {
|
||||
echo '<div class="np_last_posted_date"><h1 class="np_thread_headline">'.$motd.'</h1></div>';
|
||||
}
|
||||
echo '</tr></table>';
|
||||
echo '</p>';
|
||||
?>
|
||||
</body></html>
|
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.8 KiB |
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
include "head.inc";
|
||||
if (isset($_COOKIE["ts_limit"])) {
|
||||
echo "It appears you already have an active account<br/>";
|
||||
echo "More than one account may not be created in 30 days<br/>";
|
||||
echo '<br/><a href="/">Return to Home Page</a>';
|
||||
} else {
|
||||
?>
|
||||
<table width=100% border="0" align="center" cellpadding="0" cellspacing="1">
|
||||
<tr>
|
||||
<form name="form1" method="post" action="rsusers.php">
|
||||
<td>
|
||||
<table width="100%" border="0" cellpadding="3" cellspacing="1">
|
||||
<tr>
|
||||
<td colspan="3"><strong>Register Username </strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="78">Username</td>
|
||||
<td width="6">:</td>
|
||||
<td width="294"><input name="username" type="text" id="username"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="78">Email</td>
|
||||
<td width="6">:</td>
|
||||
<td width="294"><input name="user_email" type="text" id="user_email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password</td>
|
||||
<td>:</td>
|
||||
<td><input name="password" type="password" id="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Re-enter Password</td>
|
||||
<td>:</td>
|
||||
<td><input name="password2" type="password" id="password2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="command" type="hidden" id="command" value="Create" readonly="readonly"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><input type="submit" name="Submit" value="Create"></td>
|
||||
</tr>
|
||||
<tr><td><a href="changepw.php">Change current password</a></td></tr>
|
||||
<tr><td>
|
||||
<td></td><td></td>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
include "head.inc";
|
||||
?>
|
||||
<h4>
|
||||
<p align="left">Welcome
|
||||
to Rocksolid</p>
|
||||
<p align="left">How
|
||||
to access and what’s available:</p>
|
||||
</h4>
|
||||
<br />
|
||||
<font size='2em'>
|
||||
<p align="left">i2p
|
||||
Web forums: <a href="http://def2.i2p/">def2.i2p</a>
|
||||
<a href="http://def3.i2p/">def3.i2p</a> <a href="http://def2.i2p/">def4.i2p</a>
|
||||
<a href="http://def2.i2p/">def5.i2p</a> <a href="http://retrobbs.i2p/">retrobbs.i2p</a>
|
||||
<a href="http://novabbs.i2p/">novabbs.i2p</a> <a href="http://rslight.i2p/">rslight.i2p</a></p>
|
||||
<p align="left">Tor
|
||||
Web Forums: <a href="http://z5bqfv5v75kxy7pj.onion/">z5bqfv5v75kxy7pj.onion</a>
|
||||
<a href="http://dkzerogt6z6ybhcj.onion/">dkzerogt6z6ybhcj.onion</a>
|
||||
<a href="http://j7zbybfl5ho2rta3.onion/">j7zbybfl5ho2rta3.onion</a></p>
|
||||
<p align="left">Clearnet
|
||||
Web Forums:
|
||||
<a href="http://www.rocksolidbbs.com/">www.rocksolidbbs.com</a>
|
||||
<a href="http://www.novabbs.com/">www.novabbs.com</a>
|
||||
<a href="http://news.novabbs.com/">news.novabbs.com</a></p>
|
||||
<br />
|
||||
<p align="left">NNTP
|
||||
Newsreader Access:
|
||||
</p>
|
||||
<p align="left">wwcqkwfo5yhe6uribv5tzylk25j5hkdk6gdnyftzd3k7dawlzwca.b32.i2p</p>
|
||||
<p align="left">asq5mo52aghemn2i.onion:119</p>
|
||||
<p align="left">news.i2pn2.org:119, 563</p>
|
||||
<br />
|
||||
<p align="left">Create
|
||||
NNTP Account: <a href="http://rslight.i2p/">rslight.i2p</a>
|
||||
<a href="http://dkzerogt6z6ybhcj.onion/">dkzerogt6z6ybhcj.onion</a>
|
||||
<a href="http://news.novabbs.com/">news.novabbs.com</a>
|
||||
<p align="left"NNTP
|
||||
Peering and FTN Connections also available in i2p/tor/ clearnet</p>
|
||||
</p>
|
||||
<br />
|
||||
<p align="left" style="margin-bottom: 0.06in">Questions?
|
||||
Post in rocksolid.shared.rocksolid (Rocksolid)</p>
|
||||
<p align="left" style="margin-bottom: 0.06in"><br/>
|
||||
<br/>
|
||||
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,213 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<title>Welcome to Rocksolid</title>
|
||||
<?php
|
||||
if (file_exists('../common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/style.css">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body lang="en-US" dir="ltr">
|
||||
<p align="center"><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt">What
|
||||
is Rocksolid?</font></font></p>
|
||||
<p align="center" style="margin-bottom: 0in; font-weight: normal"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid
|
||||
is a network of sites running primarily in the i2p and Tor networks,
|
||||
but there are also nodes available via the regular internet.</font></font></p>
|
||||
<p align="center" style="margin-bottom: 0in; font-weight: normal"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Each
|
||||
site hosts all ‘Rocksolid’ forums, and may also provide other
|
||||
forums and features. While each site may have different features, the
|
||||
idea is that anything you post or see in the ‘Rocksolid’ forums
|
||||
is shared between all the sites.</font></font></p>
|
||||
<p align="center" style="margin-bottom: 0in; font-weight: normal"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Since
|
||||
all nodes synchronize these forums with eachother, one or more sites
|
||||
can be down temporarily, or even permanently, and the message base
|
||||
continues on with the balance of sites. So a user may post on one
|
||||
site and read on another. If your favorite node is down, just use
|
||||
another one and interact in the same forums.</font></font></p>
|
||||
<p align="left" style="margin-bottom: 0in"><br/>
|
||||
|
||||
</p>
|
||||
<p align="center" style="margin-bottom: 0in"><font face="Arial, sans-serif"><font size="4" style="font-size: 14pt">Current
|
||||
Rocksolid Nodes</font></font></p>
|
||||
<table width="100%" cellpadding="4" cellspacing="0">
|
||||
<col width="78*">
|
||||
<col width="60*">
|
||||
<col width="54*">
|
||||
<col width="64*">
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: 1px double #808080; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Dancing
|
||||
Elephants 2 (fudforum)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid
|
||||
forums</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: 1px double #808080; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://def2.i2p/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">def2.i2p</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: 1px double #808080; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
<td width="25%" style="border: 1px double #808080; padding: 0.04in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Dancing
|
||||
Elephants 3 (fudforum)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid
|
||||
forums</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://def3.i2p/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">def3.i2p</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
<td width="25%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: 1px double #808080; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">RocksolidTextboard
|
||||
(custom)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid
|
||||
forums</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://def4.i2p/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">def4.i2p</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
<td width="25%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: 1px double #808080; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">RetroBBS
|
||||
II (fudforum)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid,
|
||||
FMS, Usenet</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://retrobbs2.i2p/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">retrobbs2.i2p</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://dkzerogt6z6ybhcj.onion/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">dkzerogt6z6ybhcj.onion</font></font></a></p>
|
||||
</td>
|
||||
<td width="25%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: 1px double #808080; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in">
|
||||
<p align="left"><br/>
|
||||
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid
|
||||
Light (custom)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid,
|
||||
FMS, DoveNet, Usenet</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://rslight.i2p/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">rslight.i2p</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://bchz4vggexx63qvy.onion/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">bchz4vggexx63qvy.onion</font></font></a></p>
|
||||
</td>
|
||||
<td width="25%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: 1px double #808080; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in">
|
||||
<p align="left"><a href="http://rslight.novabbs.com/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">rslight.novabbs.com</font></font></a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid
|
||||
Light Mobile (custom)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid,
|
||||
FMS, Dovenet, Usenet</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://retrobbs.i2p/mobile" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">retrobbs.i2p/</font></font><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">mobile</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://j7zbybfl5ho2rta3.onion/mobile" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">j7zbybfl5ho2rta3.onion/</font></font><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">mobile</font></font></a></p>
|
||||
</td>
|
||||
<td width="25%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: 1px double #808080; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in">
|
||||
<p align="left"><a href="http://mobile.rocksolidbbs.com/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">mobile</font></font><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">.rocksolidbbs.com</font></font></a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="margin-bottom: 0.04in"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">RetroBBS
|
||||
(synchronet)</font></font></p>
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">Rocksolid,
|
||||
FMS, Dovenet, Usenet</font></font></p>
|
||||
</td>
|
||||
<td width="23%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://retrobbs.i2p/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">retrobbs.i2p</font></font></a></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><a href="http://j7zbybfl5ho2rta3.onion/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">j7zbybfl5ho2rta3.onion</font></font></a></p>
|
||||
</td>
|
||||
<td width="25%" style="border-top: none; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: 1px double #808080; padding-top: 0in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0.04in">
|
||||
<p align="left"><a href="http://retrobbs.rocksolidbbs.com/" target="_blank"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">retrobbs.rocksolidbbs.com</font></font></a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="margin-bottom: 0in"><br/>
|
||||
|
||||
</p>
|
||||
<p style="margin-bottom: 0in"><br/>
|
||||
|
||||
</p>
|
||||
<p align="center" style="margin-bottom: 0in"><font face="Arial, sans-serif"><font size="4" style="font-size: 14pt">NNTP
|
||||
access</font></font> <font face="Arial, sans-serif"><font size="4" style="font-size: 14pt">(requires</font></font>
|
||||
<font face="Arial, sans-serif"><font size="4" style="font-size: 14pt">an
|
||||
account on RetroBBS to post)</font></font></p>
|
||||
<table width="100%" cellpadding="4" cellspacing="0" style="page-break-before: auto; page-break-after: auto">
|
||||
<col width="78*">
|
||||
<col width="60*">
|
||||
<col width="54*">
|
||||
<col width="64*">
|
||||
<tr valign="top">
|
||||
<td width="30%" style="border-top: 1px double #808080; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">RetroBBS
|
||||
(synchronet)</font></font></p>
|
||||
</td>
|
||||
<td width="24%" style="border-top: 1px double #808080; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">retrobbs-nntp.i2p</font></font></p>
|
||||
</td>
|
||||
<td width="21%" style="border-top: 1px double #808080; border-bottom: 1px double #808080; border-left: 1px double #808080; border-right: none; padding-top: 0.04in; padding-bottom: 0.04in; padding-left: 0.04in; padding-right: 0in">
|
||||
<p align="left" style="background: transparent"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">j7zbybfl5ho2rta3.onion:119</font></font></p>
|
||||
</td>
|
||||
<td width="25%" style="border: 1px double #808080; padding: 0.04in">
|
||||
<p align="left"><font face="Arial, sans-serif"><font size="3" style="font-size: 12pt">retrobbs.rocksolidbbs.com:119</font></font></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p align="left" style="margin-bottom: 0in"><br/>
|
||||
|
||||
</p>
|
||||
<p align="center" style="margin-bottom: 0in"><font face="Arial, sans-serif"><font size="4" style="font-size: 14pt">Questions?
|
||||
Please post to a rocksolid group/forum and we’ll do our best to
|
||||
help.</font></font></p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,208 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
if (file_exists('../common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/style.css">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
include($config_dir.'/phpmailer.inc.php');
|
||||
|
||||
# The following line is required for phpmailer 6.0 or above
|
||||
#use PHPMailer\PHPMailer\PHPMailer;
|
||||
|
||||
include "head.inc";
|
||||
$CONFIG = include($config_file);
|
||||
|
||||
# $hostname: '{POPaddress:port/pop3}INBOX'
|
||||
$hostname = '{rocksolidbbs:110/pop3}INBOX';
|
||||
# $external: Using external POP auth?
|
||||
$external = 0;
|
||||
# $workpath: Where to cache users (must be writable by calling program)
|
||||
$workpath = $config_dir."users/";
|
||||
$keypath = $config_dir."userconfig/";
|
||||
|
||||
# DO NOT EDIT ANYTHING BELOW THIS LINE
|
||||
$ok = FALSE;
|
||||
$command = "Login";
|
||||
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
$command = $_POST['command'];
|
||||
$user_email = $_POST['user_email'];
|
||||
|
||||
echo '<center>';
|
||||
|
||||
$thisusername = $username;
|
||||
$username = strtolower($username);
|
||||
$userFilename = $workpath.$username;
|
||||
$keyFilename = $keypath.$username;
|
||||
|
||||
# Check all input
|
||||
if (empty($_POST['username'])) {
|
||||
echo "Please enter a Username\r\n";
|
||||
echo '<br /><a href="newuser.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ($_POST['password'] !== $_POST['password2']) {
|
||||
echo "Your passwords entered do not match\r\n";
|
||||
echo '<br /><a href="newuser.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
|
||||
/* Check for existing email address */
|
||||
$users = scandir($config_dir."/userconfig");
|
||||
foreach($users as $user) {
|
||||
if(!is_file($config_dir."/userconfig/".$user)) {
|
||||
continue;
|
||||
}
|
||||
if ($userFileHandle = @fopen($config_dir."/userconfig/".$user, 'r')) {
|
||||
while (!feof($userFileHandle))
|
||||
{
|
||||
$buffer = fgets($userFileHandle);
|
||||
if(strpos($buffer, 'email:') !== FALSE) {
|
||||
if(stripos($buffer, $user_email) !== FALSE) {
|
||||
fclose($userFileHandle);
|
||||
echo "Email exists in database\r\n";
|
||||
echo '<br /><a href="newuser.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose($userFileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
if (!preg_match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$^",$user_email)) {
|
||||
echo "Email must be in the form of an email address\r\n";
|
||||
echo '<br /><a href="newuser.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
|
||||
# Does user file already exist?
|
||||
if ($userFileHandle = @fopen($userFilename, 'r'))
|
||||
{
|
||||
if ($command == "Create")
|
||||
{
|
||||
echo "User:".$thisusername." Already Exists\r\n";
|
||||
echo '<br /><a href="newuser.php">Back</a>';
|
||||
exit(2);
|
||||
}
|
||||
$userFileInfo = fread($userFileHandle, filesize($userFilename));
|
||||
fclose($userFileHandle);
|
||||
|
||||
# User/Pass is correct
|
||||
if (password_verify ( $password , $userFileInfo))
|
||||
{
|
||||
touch($userFilename);
|
||||
$ok = TRUE;
|
||||
} else {
|
||||
$ok = FALSE;
|
||||
}
|
||||
} else {
|
||||
$ok = FALSE;
|
||||
}
|
||||
|
||||
# Ok to log in. User authenticated.
|
||||
if ($ok)
|
||||
{
|
||||
echo "User:".$thisusername."\r\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# Using external authentication
|
||||
if ($external)
|
||||
{
|
||||
$mbox = @imap_open ( $hostname , $username , $password );
|
||||
if ($mbox)
|
||||
{
|
||||
$ok = TRUE;
|
||||
imap_close($mbox);
|
||||
}
|
||||
}
|
||||
|
||||
# User is authenticated or to be created. Either way, create the file
|
||||
if ($ok || ($command == "Create") )
|
||||
{
|
||||
echo 'Create account: '.$_POST['username'].'<br/><br />';
|
||||
/* Generate email */
|
||||
$no_verify=explode(' ', $CONFIG['no_verify']);
|
||||
foreach($no_verify as $no) {
|
||||
if (strlen($_SERVER['HTTP_HOST']) - strlen($no) === strrpos($_SERVER['HTTP_HOST'],$no)) {
|
||||
$CONFIG['verify_email'] = false;
|
||||
}
|
||||
}
|
||||
if($CONFIG['verify_email']) {
|
||||
// Setup mailer
|
||||
$mail = new PHPMailer();
|
||||
|
||||
$mail->SMTPOptions = array(
|
||||
'ssl' => array(
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false,
|
||||
'allow_self_signed' => true
|
||||
)
|
||||
);
|
||||
|
||||
$mail->IsSMTP();
|
||||
$mail->CharSet = 'UTF-8';
|
||||
$mail->Host = $mailer['host'];
|
||||
$mail->SMTPAuth = true;
|
||||
|
||||
$mail->Port = $mailer['port'];
|
||||
$mail->Username = $mailer['username'];
|
||||
$mail->Password = $mailer['password'];;
|
||||
$mail->SMTPSecure = 'tls';
|
||||
|
||||
$mail->setFrom('no-reply@rocksolidbbs.com', 'no-reply');
|
||||
$mail->addAddress($user_email);
|
||||
|
||||
$mail->Subject = "Confirmation code for ".$_SERVER['HTTP_HOST'];
|
||||
|
||||
$mycode = create_code($username);
|
||||
$msg="A request to create an account on ".$_SERVER['HTTP_HOST']." has been made using ".$user_email.".\n\nIf you did not request this, please ignore and the request will fail.\n\nThis is your account creation code: ".$mycode."\n\nNote: replies to this email address are not monitored";
|
||||
$mail->Body = wordwrap($msg,70);
|
||||
|
||||
$mail->send();
|
||||
|
||||
echo 'An email has been sent to '.$user_email.'<br />';
|
||||
echo 'Please enter the code from the email below:<br />';
|
||||
}
|
||||
echo '<form name="create1" method="post" action="create.php">';
|
||||
if($CONFIG['verify_email'] === true) {
|
||||
echo '<input name="code" type="text" id="code"> ';
|
||||
}
|
||||
echo '<input name="username" type="hidden" id="username" value="'.$username.'" readonly="readonly">';
|
||||
echo '<input name="password" type="hidden" id="password" value="'.$password.'" readonly="readonly">';
|
||||
echo '<input name="user_email" type="hidden" id="user_email" value="'.$user_email.'" readonly="readonly">';
|
||||
echo '<input type="submit" name="Submit" value="Click Here to Create"></td>';
|
||||
echo '<br/><br/><a href="'.$CONFIG['default_content'].'">Cancel and return to home page</a>';
|
||||
} else {
|
||||
echo "Authentication Failed\r\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
function make_key($username) {
|
||||
$key = openssl_random_pseudo_bytes(44);
|
||||
return base64_encode($key);
|
||||
}
|
||||
|
||||
function create_code($username) {
|
||||
$permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$code = substr(str_shuffle($permitted_chars), 0, 16);
|
||||
$userfile = sys_get_temp_dir()."/".$username;
|
||||
file_put_contents($userfile, $code);
|
||||
return $code;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,62 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
if (file_exists('../common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/style.css">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
include "head.inc";
|
||||
include ($config_dir.'/admin.inc.php');
|
||||
|
||||
// Accept new config
|
||||
if(($_POST['configure'] == "Save Configuration") && ($_POST['configkey'] == $admin['key'])) {
|
||||
$configfile=$config_dir.'rslight.inc.php';
|
||||
$return = "<?php\n";
|
||||
$return.="return [\n";
|
||||
foreach($_POST as $key => $value) {
|
||||
if(($key !== 'configure') && ($key !== 'configkey')) {
|
||||
$value = preg_replace('/\'/', '\\\'', $value);
|
||||
$return.=' \''.$key.'\' => \''.trim($value).'\''.",\n";
|
||||
}
|
||||
}
|
||||
$return = rtrim(rtrim($return),',');
|
||||
$return.="\n];\n";
|
||||
$return.='?>';
|
||||
rename($configfile, $configfile.'.bak');
|
||||
file_put_contents($configfile, $return);
|
||||
echo '<center>';
|
||||
echo 'New Configuration settings saved in '.$configfile.'<br />';
|
||||
echo '<a href="'.$CONFIG['default_content'].'">Home</a>';
|
||||
echo '</center>';
|
||||
$CONFIG = $_POST;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (isset($_POST["password"]) && ($_POST["password"]==$admin["password"])) {
|
||||
include($config_dir.'/scripts/setup.inc.php');
|
||||
exit(0);
|
||||
} else{
|
||||
//Show the wrong password notice
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
echo '<center>';
|
||||
echo '<h2>Password Incorrect</h2>';
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'">Retry</a> <a href="'.$CONFIG['default_content'].'">Home</a>';
|
||||
echo '</center>';
|
||||
exit(0);
|
||||
}
|
||||
echo '<p align="left">';
|
||||
echo '<form id ="myForm" method="post"><p align="left">';
|
||||
echo 'Enter password to access configuration: ';
|
||||
echo '<input name="password" type="password" size="25" maxlength="20"><input value="Submit" type="submit"></p>';
|
||||
echo '</form>';
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,20 @@
|
|||
:root {
|
||||
--color-dark: #232334;
|
||||
--color-medium: #3E4147;
|
||||
--color-light: #343444;
|
||||
--color-bg-alt: #333545;
|
||||
--color-text-alt: #4488BB;
|
||||
--color-text-quote: teal;
|
||||
--color-title: #BBAAAA;
|
||||
--color-link: #00BFDF;
|
||||
--color-visited: #6688BB;
|
||||
--color-border: #828282;
|
||||
--color-row-border: black;
|
||||
|
||||
/* overboard title */
|
||||
--color-ob-title: #9966CC;
|
||||
|
||||
/* overboard date line */
|
||||
--color-ob-date: #9966CC;
|
||||
}
|
||||
|
|
@ -0,0 +1,625 @@
|
|||
@import "style-colors.css";
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.page {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px
|
||||
background-color: var(--color-dark);
|
||||
}
|
||||
|
||||
.header {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
width: 100%;
|
||||
height: 8%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: var(--color-light);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 2em;
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
.title_small {
|
||||
font-size: 0em;
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
.header_menu {
|
||||
font-size: 1em;
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: var(--color-light);
|
||||
}
|
||||
|
||||
.responsive_image {
|
||||
width: 100%;
|
||||
max-width: 80%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Title */
|
||||
.np_title {
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
/* Header frame */
|
||||
.np_frame_header {
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* Menu frame */
|
||||
.np_frame_menu {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* Content frame */
|
||||
.np_frame_content {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* Header table */
|
||||
.header_table {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
.np_button_hidden {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: 1px solid var(--color-title);
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
}
|
||||
/* Header buttons */
|
||||
.np_header_button_link {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: none;
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.np_header_button_link:hover {
|
||||
color: var(--color-dark);
|
||||
background: var(--color-text-alt);
|
||||
}
|
||||
|
||||
.np_header_bar_large {
|
||||
background: var(--color-dark);
|
||||
padding: 1px;
|
||||
margin-bottom: 1px;
|
||||
color: black;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
.np_header_bar_small {
|
||||
background: var(--color-dark);
|
||||
padding: 1px;
|
||||
margin-bottom: 1px;
|
||||
color: black;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
div.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Mobile Styles */
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
body {
|
||||
color: var(--color-title);
|
||||
background: var(--color-bg-alt);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(1em + 2vw);
|
||||
}
|
||||
.header {
|
||||
margin: 5px;
|
||||
height: 10%;
|
||||
}
|
||||
.menu {
|
||||
margin: 0px;
|
||||
width: 0%;
|
||||
height: 0%
|
||||
}
|
||||
.content {
|
||||
margin: 10px;
|
||||
width: 100%;
|
||||
height: 89%;
|
||||
}
|
||||
.title {
|
||||
font-size: 0em;
|
||||
}
|
||||
.title_small {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.header_menu {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
.np_header_button_link {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.np_header_bar_large {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablet Styles */
|
||||
@media only screen and (min-device-width: 481px) and (max-device-width: 820px) {
|
||||
body {
|
||||
color: var(--color-title);
|
||||
background: var(--color-bg-alt);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(1em + 1vw);
|
||||
}
|
||||
.header {
|
||||
margin: 5px;
|
||||
height: 10%;
|
||||
}
|
||||
.menu {
|
||||
margin: 0px;
|
||||
width: 0%;
|
||||
height: 0%
|
||||
}
|
||||
.content {
|
||||
margin: 10px;
|
||||
width: 100%;
|
||||
height: 89%;
|
||||
}
|
||||
.title {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.header_menu {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.np_header_button_link {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.np_header_bar_large {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop Styles */
|
||||
@media only screen and (min-device-width: 821px) {
|
||||
body {
|
||||
color: var(--color-title);
|
||||
background: var(--color-bg-alt);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(1em + 1vw);
|
||||
}
|
||||
.header {
|
||||
margin: 0px;
|
||||
height: 8%;
|
||||
}
|
||||
.menu {
|
||||
width: 20%;
|
||||
height: 92%
|
||||
}
|
||||
.content {
|
||||
width: 80%;
|
||||
height: 92%;
|
||||
}
|
||||
.title {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.header_menu {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.np_button_hidden {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
border: none;
|
||||
color: transparent;
|
||||
font-size: 0em;
|
||||
}
|
||||
.np_header_bar_small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* =========== Index Layout ============== */
|
||||
|
||||
/* headline */
|
||||
h1.np_index_headline {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* border around all groups */
|
||||
.np_index_groups {
|
||||
/* background: #eeeeee; */
|
||||
background: var(--color-dark);
|
||||
padding: 0px;
|
||||
border: solid 1px #26598f;
|
||||
}
|
||||
|
||||
/* a block of groups */
|
||||
.np_index_groupblock {
|
||||
margin-bottom: 20px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* headline of a group of blocks */
|
||||
.np_index_grouphead {
|
||||
border: solid 1px #26598f;
|
||||
/* background: #26598f; */
|
||||
background: var(--color-dark);
|
||||
color: var(--color-title);
|
||||
font-size: 0.7em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* a single group */
|
||||
.np_index_group {
|
||||
margin-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* =========== Thread Layout ============== */
|
||||
|
||||
/* Headline */
|
||||
h1.np_thread_headline {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
|
||||
/* Table around the thread */
|
||||
table.np_thread_table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border: solid 1px #26598f;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
/* Head of the table */
|
||||
tr.np_thread_head,td.np_thread_head {
|
||||
color: var(--color-text-alt);
|
||||
background: var(--color-light);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Even line numbers in the thread */
|
||||
tr.np_thread_line1,td.np_thread_line1 {
|
||||
padding-left: 3px;
|
||||
padding-top: 6px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
background: var(--color-dark);
|
||||
border: 1px solid #828282;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* Odd line numbers in the thread */
|
||||
tr.np_thread_line2,td.np_thread_line2 {
|
||||
padding-left: 3px;
|
||||
padding-top: 6px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
background: var(--color-light);
|
||||
border: 1px solid #828282;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* Text inside a Line */
|
||||
span.np_thread_line_text {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
/* The small images, a thread consists of */
|
||||
img.thread_image {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
/* =========== Article Layout ============= */
|
||||
|
||||
/* headline */
|
||||
h1.np_article_headline {
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
|
||||
/* Head of an article */
|
||||
div.np_article_header {
|
||||
background: var(--color-dark);
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
font-size: 0.55em;
|
||||
}
|
||||
|
||||
/* Layout of the Text-Body */
|
||||
div.np_article_body {
|
||||
background: var(--color-light);
|
||||
margin-top: 20px;
|
||||
/* font-family: "Lucida Console", "Courier New", Courier, "Andale Mono", monospace; */
|
||||
font-size: 0.55em;
|
||||
}
|
||||
|
||||
/* Layout of the Text-Body for Synchronet (to display ASCII art etc.*/
|
||||
div.np_article_body_synch {
|
||||
background: var(--color-light);
|
||||
margin-top: 20px;
|
||||
font-family: "Lucida Console", "Courier New", Courier, "Andale Mono", monospace;
|
||||
font-size: 0.55em;
|
||||
}
|
||||
|
||||
/* Layout of quoted text / graphic layout */
|
||||
blockquote.np_article_quote {
|
||||
border-left: #002255 solid 1px;
|
||||
padding-left: 5px;
|
||||
color: var(--color-text-quote);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* =========== Post layout =========== */
|
||||
|
||||
/* headline */
|
||||
h1.np_post_headline {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* Head with the input fields for subject, name and email */
|
||||
.np_post_header {
|
||||
background: var(--color-dark);
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
}
|
||||
|
||||
/* Body with the message-field and the post-button in it */
|
||||
.np_post_body {
|
||||
background: var(--color-light);
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* =========== specifically for rocksolid overboard =========== */
|
||||
|
||||
/* results table */
|
||||
table.np_results_table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border: solid 1px #26598f;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
/* posted_date */
|
||||
.np_ob_posted_date {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-date);
|
||||
text-align: left
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* header */
|
||||
.np_ob_header {
|
||||
margin-top: 0;
|
||||
margin-bottom: 15;
|
||||
margin-left: 20%;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-title);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
}
|
||||
.np_ob_group {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.np_ob_body {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.np_ob_subject {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
/* Even line numbers in the thread */
|
||||
.np_result_line1 {
|
||||
padding-left: 3px;
|
||||
padding-top: 6px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
background: var(--color-dark);
|
||||
border: 1px solid var(--color-text-alt);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* Odd line numbers in the thread */
|
||||
.np_result_line2 {
|
||||
padding-left: 3px;
|
||||
padding-top: 6px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
background: var(--color-light);
|
||||
border: 1px solid var(--color-text-alt);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.np_ob_tail {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
/* =========== navigation buttons on top of every page =========== */
|
||||
.np_buttonbar {
|
||||
background: var(--color-dark);
|
||||
padding: 1px;
|
||||
margin-bottom: 1px;
|
||||
color: black;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
.np_button_link {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: none;
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.np_button_link:hover {
|
||||
color: var(--color-dark);
|
||||
background: var(--color-text-alt);
|
||||
}
|
||||
|
||||
td.np_button {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border-right: solid white 1px;
|
||||
color: white;
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
a.np_button {
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.np_pages {
|
||||
color: var(--color-visited);
|
||||
}
|
||||
|
||||
.np_pages_selected {
|
||||
color: var(--color-title) !important;
|
||||
text-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.np_pages_unselected {
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
background-color: var(--color-medium);
|
||||
border: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
padding:5px;
|
||||
border:1px solid var(--color-title);
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
input[type=submit]:hover {
|
||||
color: var(--color-medium);
|
||||
background: var(--color-title);
|
||||
}
|
||||
|
||||
input[type=button] {
|
||||
padding:5px;
|
||||
border:1px solid var(--color-title);
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
input[type=button]:hover {
|
||||
color: var(--color-medium);
|
||||
background: var(--color-title);
|
||||
}
|
||||
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
color: var(--color-link);
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: var(--color-visited);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:active {
|
||||
text-decoration: underline;
|
||||
}
|
|
@ -0,0 +1,788 @@
|
|||
@import "style-colors.css";
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.page {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px
|
||||
background-color: var(--color-dark);
|
||||
}
|
||||
|
||||
.header {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
width: 100%;
|
||||
height: 8%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: var(--color-light);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 2em;
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
.title_small {
|
||||
font-size: 0em;
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
.header_menu {
|
||||
font-size: 1em;
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: var(--color-light);
|
||||
}
|
||||
|
||||
.responsive_image {
|
||||
width: 100%;
|
||||
max-width: 80%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.visited {
|
||||
color: var(--color-visited);
|
||||
}
|
||||
|
||||
/* Title */
|
||||
.np_title {
|
||||
text-decoration: none;
|
||||
color: var(--color-title);
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
/* Header frame */
|
||||
.np_frame_header {
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* Menu frame */
|
||||
.np_frame_menu {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* Content frame */
|
||||
.np_frame_content {
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* Header table */
|
||||
.header_table {
|
||||
border: none;
|
||||
padding: 2px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
.np_button_hidden {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: 1px solid var(--color-title);
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
}
|
||||
/* Header buttons */
|
||||
.np_header_button_link {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: none;
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
/* Username buttons */
|
||||
.np_username_button_link {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: none;
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.np_header_button_link:hover {
|
||||
color: var(--color-dark);
|
||||
background: var(--color-text-alt);
|
||||
}
|
||||
|
||||
.np_username_button_link:hover {
|
||||
color: var(--color-dark);
|
||||
background: var(--color-text-alt);
|
||||
}
|
||||
|
||||
.np_header_bar_large {
|
||||
background: var(--color-dark);
|
||||
padding: 1px;
|
||||
margin-bottom: 1px;
|
||||
color: black;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
.np_header_bar_small {
|
||||
background: var(--color-dark);
|
||||
padding: 1px;
|
||||
margin-bottom: 1px;
|
||||
color: black;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
.display_headers:active .display_headers_on {
|
||||
display:block;
|
||||
}
|
||||
|
||||
#trigger_headers:checked + .display_headers_on {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.display_headers_on {
|
||||
display: none; /* NEW */
|
||||
background: var(--color-dark);;
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
word-wrap: break-word;
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
width:98%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.display_headers_on:hover {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.display_headers {
|
||||
// margin:100px;
|
||||
}
|
||||
|
||||
div.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: var(--color-medium);
|
||||
border: none;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
textarea.postbody {
|
||||
background-color: var(--color-medium);
|
||||
border: none;
|
||||
color: var(--color-title);
|
||||
height: calc(1em * 1.5 * 20);
|
||||
width: calc(1em * 1.5 * 40);
|
||||
}
|
||||
|
||||
/* Mobile Styles */
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
body {
|
||||
color: var(--color-title);
|
||||
background: var(--color-bg-alt);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(1em + 2vw);
|
||||
}
|
||||
.header {
|
||||
margin: 5px;
|
||||
height: 10%;
|
||||
}
|
||||
.menu {
|
||||
margin: 0px;
|
||||
width: 0%;
|
||||
height: 0%
|
||||
}
|
||||
.content {
|
||||
margin: 10px;
|
||||
width: 100%;
|
||||
height: 89%;
|
||||
}
|
||||
.title {
|
||||
font-size: 0em;
|
||||
}
|
||||
.title_small {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.header_menu {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
.np_header_button_link {
|
||||
font-size: 1em;
|
||||
}
|
||||
.np_header_bar_large {
|
||||
display: none;
|
||||
}
|
||||
.np_title {
|
||||
font-size: 1em;
|
||||
}
|
||||
textarea.postbody {
|
||||
height: calc(1em *1.5 * 10);
|
||||
width: 100%;
|
||||
}
|
||||
input.post {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablet Styles */
|
||||
@media only screen and (min-device-width: 481px) and (max-device-width: 820px) {
|
||||
body {
|
||||
color: var(--color-title);
|
||||
background: var(--color-bg-alt);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(1em + 1vw);
|
||||
}
|
||||
.header {
|
||||
margin: 5px;
|
||||
height: 10%;
|
||||
}
|
||||
.menu {
|
||||
margin: 0px;
|
||||
width: 0%;
|
||||
height: 0%
|
||||
}
|
||||
.content {
|
||||
margin: 10px;
|
||||
width: 100%;
|
||||
height: 89%;
|
||||
}
|
||||
.title {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.header_menu {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.np_header_button_link {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.np_header_bar_large {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop Styles */
|
||||
@media only screen and (min-device-width: 821px) {
|
||||
body {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
color: var(--color-title);
|
||||
background: var(--color-bg-alt);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: calc(1em + 1vw);
|
||||
}
|
||||
.header {
|
||||
margin: 0px;
|
||||
height: 8%;
|
||||
}
|
||||
.menu {
|
||||
width: 20%;
|
||||
height: 92%
|
||||
}
|
||||
.content {
|
||||
width: 80%;
|
||||
height: 92%;
|
||||
}
|
||||
.title {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.header_menu {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.np_button_hidden {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
border: none;
|
||||
color: transparent;
|
||||
font-size: 0em;
|
||||
}
|
||||
.np_header_bar_small {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* =========== Index Layout ============== */
|
||||
|
||||
/* headline */
|
||||
h1.np_index_headline {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* Table around the groups */
|
||||
table.np_groups_table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
/* border: solid 1px #26598f; */
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
/* border around all groups */
|
||||
.np_index_groups {
|
||||
/* background: #eeeeee; */
|
||||
background: var(--color-dark);
|
||||
padding: 0px;
|
||||
border: solid 1px #26598f;
|
||||
}
|
||||
|
||||
/* a block of groups */
|
||||
.np_index_groupblock {
|
||||
margin-bottom: 20px;
|
||||
background: var(--color-dark);
|
||||
}
|
||||
|
||||
/* headline of a group of blocks */
|
||||
.np_index_grouphead {
|
||||
border: solid 1px #26598f;
|
||||
/* background: #26598f; */
|
||||
background: var(--color-dark);
|
||||
color: var(--color-title);
|
||||
font-size: 0.7em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* a single group */
|
||||
.np_index_group {
|
||||
margin-left: 10px;
|
||||
margin-bottom: 5px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* Text inside a Line */
|
||||
span.np_group_line_text {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: var(--color-text-alt) !important;
|
||||
}
|
||||
|
||||
/* =========== Thread Layout ============== */
|
||||
|
||||
/* Headline */
|
||||
h1.np_thread_headline {
|
||||
font-size: 0.6em;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* Table around the thread */
|
||||
table.np_thread_table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
/* border: solid 1px #26598f; */
|
||||
border: solid 1px var(--color-text-alt);
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
/* Head of the table */
|
||||
tr.np_thread_head,td.np_thread_head {
|
||||
color: var(--color-text-alt);
|
||||
background: var(--color-light);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Even line numbers in the thread */
|
||||
tr.np_thread_line1,td.np_thread_line1 {
|
||||
padding-left: 3px;
|
||||
padding-top: 3px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 3px;
|
||||
background: var(--color-dark);
|
||||
// border-top: 1px solid var(--color-medium);
|
||||
// border-bottom: 1px solid var(--color-text-alt);
|
||||
border-right: 1px solid var(--color-row-border);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* Odd line numbers in the thread */
|
||||
tr.np_thread_line2,td.np_thread_line2 {
|
||||
padding-left: 3px;
|
||||
padding-top: 3px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 3px;
|
||||
background: var(--color-light);
|
||||
border-top: 1px solid var(--color-row-border);
|
||||
border-bottom: 1px solid var(--color-row-border);
|
||||
border-right: 1px solid var(--color-row-border);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* Text inside a Line */
|
||||
span.np_thread_line_text {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
/* The small images, a thread consists of */
|
||||
img.thread_image {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
/* =========== Article Layout ============= */
|
||||
|
||||
/* headline */
|
||||
h1.np_article_headline {
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
|
||||
/* Head of an article */
|
||||
div.np_article_header {
|
||||
background: var(--color-dark);
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
font-size: 0.55em;
|
||||
}
|
||||
|
||||
/* Layout of the Text-Body */
|
||||
div.np_article_body {
|
||||
background: var(--color-light);
|
||||
margin-top: 20px;
|
||||
/* font-family: "Lucida Console", "Courier New", Courier, "Andale Mono", monospace; */
|
||||
font-size: 0.55em;
|
||||
}
|
||||
|
||||
/* Layout of the Text-Body for Synchronet (to display ASCII art etc.*/
|
||||
div.np_article_body_synch {
|
||||
background: var(--color-light);
|
||||
margin-top: 20px;
|
||||
font-family: "Lucida Console", "Courier New", Courier, "Andale Mono", monospace;
|
||||
font-size: 0.55em;
|
||||
}
|
||||
|
||||
/* Layout of quoted text / graphic layout */
|
||||
blockquote.np_article_quote {
|
||||
border-left: #002255 solid 1px;
|
||||
padding-left: 5px;
|
||||
color: var(--color-text-quote);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* =========== Post layout =========== */
|
||||
|
||||
/* headline */
|
||||
h1.np_post_headline {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* Head with the input fields for subject, name and email */
|
||||
.np_post_header {
|
||||
background: var(--color-dark);
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
}
|
||||
|
||||
/* Body with the message-field and the post-button in it */
|
||||
.np_post_body {
|
||||
background: var(--color-light);
|
||||
padding: 3px;
|
||||
border: solid 1px #26598f;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* =========== specifically for rocksolid overboard =========== */
|
||||
|
||||
/* results table */
|
||||
table.np_results_table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border: none;
|
||||
border-spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
/* overboard posted_date */
|
||||
.np_ob_posted_date {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-date);
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
/* posted_date */
|
||||
.np_posted_date {
|
||||
float: right;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-date);
|
||||
text-align: right;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
width:50%;
|
||||
}
|
||||
|
||||
/* posted_date left */
|
||||
.np_posted_date_left {
|
||||
float: left;
|
||||
margin-top: 5;
|
||||
margin-bottom: 0;
|
||||
margin-right: 10;
|
||||
margin-left: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-date);
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
// width:50%;
|
||||
}
|
||||
|
||||
#datebox {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* last posted_date */
|
||||
.np_last_posted_date {
|
||||
margin-top: 10;
|
||||
margin-bottom: 10;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-date);
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* group description */
|
||||
.np_group_desc {
|
||||
margin-top: 2;
|
||||
margin-bottom: 10;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-date);
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* header */
|
||||
.np_ob_header {
|
||||
margin-top: 0;
|
||||
margin-bottom: 15;
|
||||
margin-left: 20%;
|
||||
text-decoration: none;
|
||||
color: var(--color-ob-title);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
}
|
||||
.np_ob_group {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.np_ob_body {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.np_ob_subject {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-decoration: none;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
/* Even line numbers in the thread */
|
||||
.np_result_line1 {
|
||||
padding-left: 3px;
|
||||
padding-top: 6px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
background: var(--color-dark);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
/* Odd line numbers in the thread */
|
||||
.np_result_line2 {
|
||||
padding-left: 3px;
|
||||
padding-top: 6px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 6px;
|
||||
background: var(--color-light);
|
||||
border-top: 1px solid var(--color-row-border);
|
||||
border-bottom: 1px solid var(--color-row-border);
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.np_ob_tail {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
/* =========== navigation buttons on top of every page =========== */
|
||||
.np_buttonbar {
|
||||
background: var(--color-dark);
|
||||
padding: 1px;
|
||||
margin-bottom: 1px;
|
||||
width: 100%;
|
||||
color: black;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
|
||||
.np_button_link {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: none;
|
||||
margin-right: 10px;
|
||||
color: var(--color-text-alt);
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: var(--color-dark);
|
||||
border-radius: 5px;
|
||||
border: 1px solid var(--color-ob-date);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.np_button_link:hover {
|
||||
color: var(--color-dark);
|
||||
background: var(--color-text-alt);
|
||||
}
|
||||
|
||||
td.np_button {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border-right: solid white 1px;
|
||||
color: white;
|
||||
white-space: nowrap;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
a.np_button {
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.button_container {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.np_pages {
|
||||
color: var(--color-text-alt);
|
||||
}
|
||||
|
||||
.np_pages_selected {
|
||||
color: var(--color-ob-date) !important;
|
||||
text-weight: bold;
|
||||
margin-left: 5px;
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
.np_pages_unselected {
|
||||
color: var(--color-text-alt) !important;
|
||||
text-decoration: underline;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
padding:5px;
|
||||
border:1px solid var(--color-title);
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
input[type=submit]:hover {
|
||||
color: var(--color-medium);
|
||||
background: var(--color-title);
|
||||
}
|
||||
|
||||
input[type=button] {
|
||||
padding:5px;
|
||||
border:1px solid var(--color-title);
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
input[type=button]:hover {
|
||||
color: var(--color-medium);
|
||||
background: var(--color-title);
|
||||
}
|
||||
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
color: var(--color-link);
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: var(--color-visited);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:active {
|
||||
text-decoration: underline;
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
#!/bin/bash
|
||||
|
||||
webroot="/var/www/html"
|
||||
spoolpath="/var/spool/rslight"
|
||||
configpath="/etc/rslight"
|
||||
username="www-data"
|
||||
|
||||
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9{} | head -c${1:-16};echo;}
|
||||
site_key=$(randpw)
|
||||
anonymous_password=$(randpw)
|
||||
local_password=$(randpw)
|
||||
admin_password=$(randpw)
|
||||
admin_key=$(randpw)
|
||||
|
||||
echo
|
||||
echo "This is the main installation script for Rocksolid Light"
|
||||
echo "and must be run as root from the root directory of the extracted files"
|
||||
echo
|
||||
echo "Select installation directories"
|
||||
echo
|
||||
|
||||
echo "Choose a path for your web root for rslight"
|
||||
read -p "Use default web root $webroot (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter web root for rslight: " webroot; echo
|
||||
fi
|
||||
|
||||
echo "Choose a path for your spool files for rslight"
|
||||
read -p "Use default spool path $spoolpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter spool path for rslight: " spoolpath; echo
|
||||
fi
|
||||
echo "Choose a path for rslight configuration files"
|
||||
read -p "Use default config path $configpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter config path for rslight: " configpath; echo
|
||||
fi
|
||||
|
||||
echo "Choose username used by your web server"
|
||||
read -p "Use default username $username (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter username used by your web server: " username; echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "You have selected the following options:"
|
||||
echo
|
||||
echo "Web root: $webroot"
|
||||
echo "Spool dir: $spoolpath"
|
||||
echo "Config dir: $configpath"
|
||||
echo "Web user: $username"
|
||||
echo
|
||||
echo "Are you sure you wish to install to these directories now"
|
||||
echo "and change permissions as necessary to $username? "
|
||||
echo
|
||||
read -p "Type 'YES' to create the directories and move files into place: " default; echo
|
||||
|
||||
if [ "$default" != "YES" ]
|
||||
then
|
||||
echo exiting...
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Creating directories"
|
||||
echo -n "$webroot..."
|
||||
mkdir -p $webroot
|
||||
echo "done"
|
||||
echo -n "$spoolpath..."
|
||||
mkdir -p $spoolpath
|
||||
echo "done"
|
||||
echo -n "$configpath..."
|
||||
mkdir -p $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Moving files into place..."
|
||||
cp index.php $webroot
|
||||
cp -a common $webroot
|
||||
cp -a rocksolid $webroot
|
||||
cp -a spoolnews $webroot
|
||||
cp -a rslight/* $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Setting permissions..."
|
||||
chown $username $spoolpath
|
||||
chgrp $username $spoolpath
|
||||
chown $username "$configpath/users"
|
||||
chgrp $username "$configpath/users"
|
||||
chmod 700 "$configpath/users"
|
||||
chown $username "$configpath/userconfig"
|
||||
chgrp $username "$configpath/userconfig"
|
||||
chmod 700 "$configpath/userconfig"
|
||||
echo "done"
|
||||
|
||||
echo
|
||||
echo -n "Applying configuration..."
|
||||
sed -i '' -e "s|<spooldir>|$spoolpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<config_dir>|$configpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<webserver_user>|$username|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<site_key>|$site_key|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<local_password>|$local_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/admin.inc.php
|
||||
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/admin.inc.php
|
||||
echo "done"
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "******** YOUR ADMIN PASSWORD IS: '$admin_password'"
|
||||
echo "***************************************************"
|
||||
echo
|
||||
echo "Admin password can be changed in $configpath/admin.inc.php"
|
||||
echo
|
||||
echo "Next step is to visit your site in your browser: /common/setup.php"
|
||||
echo "to complete configuration"
|
||||
echo
|
||||
echo Add this to crontab for root to link with your remote server, start local
|
||||
echo server and manage other tasks:
|
||||
echo "*/5 * * * * cd $webroot/spoolnews ; bash -lc \"php $configpath/scripts/cron.php\""
|
||||
echo
|
||||
echo "Once your web server is configured to point to $webroot and serve .php files"
|
||||
echo "give it a try. If you have trouble, feel free to ask for help in rocksolid.nodes.help"
|
||||
echo
|
||||
echo "Note that it may take 10-20 minutes before groups appear on your main page"
|
||||
echo "If you see files starting to appear in $spoolpath, it should be working"
|
||||
echo
|
||||
echo "Installation complete"
|
|
@ -0,0 +1,129 @@
|
|||
#!/usr/local/bin/bash
|
||||
|
||||
webroot="/usr/local/www/html"
|
||||
spoolpath="/var/spool/rslight"
|
||||
configpath="/etc/rslight"
|
||||
username="www"
|
||||
|
||||
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9{} | head -c${1:-16};echo;}
|
||||
site_key=$(randpw)
|
||||
anonymous_password=$(randpw)
|
||||
local_password=$(randpw)
|
||||
admin_password=$(randpw)
|
||||
admin_key=$(randpw)
|
||||
|
||||
echo
|
||||
echo "This is the main installation script for Rocksolid Light"
|
||||
echo "and must be run as root from the root directory of the extracted files"
|
||||
echo
|
||||
echo "Select installation directories"
|
||||
echo
|
||||
|
||||
echo "Choose a path for your web root for rslight"
|
||||
read -p "Use default web root $webroot (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter web root for rslight: " webroot; echo
|
||||
fi
|
||||
|
||||
echo "Choose a path for your spool files for rslight"
|
||||
read -p "Use default spool path $spoolpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter spool path for rslight: " spoolpath; echo
|
||||
fi
|
||||
echo "Choose a path for rslight configuration files"
|
||||
read -p "Use default config path $configpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter config path for rslight: " configpath; echo
|
||||
fi
|
||||
|
||||
echo "Choose username used by your web server"
|
||||
read -p "Use default username $username (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter username used by your web server: " username; echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "You have selected the following options:"
|
||||
echo
|
||||
echo "Web root: $webroot"
|
||||
echo "Spool dir: $spoolpath"
|
||||
echo "Config dir: $configpath"
|
||||
echo "Web user: $username"
|
||||
echo
|
||||
echo "Are you sure you wish to install to these directories now"
|
||||
echo "and change permissions as necessary to $username? "
|
||||
echo
|
||||
read -p "Type 'YES' to create the directories and move files into place: " default; echo
|
||||
|
||||
if [ "$default" != "YES" ]
|
||||
then
|
||||
echo exiting...
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Creating directories"
|
||||
echo -n "$webroot..."
|
||||
mkdir -p $webroot
|
||||
echo "done"
|
||||
echo -n "$spoolpath..."
|
||||
mkdir -p $spoolpath
|
||||
echo "done"
|
||||
echo -n "$configpath..."
|
||||
mkdir -p $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Moving files into place..."
|
||||
cp index.php $webroot
|
||||
cp -a common $webroot
|
||||
cp -a rocksolid $webroot
|
||||
cp -a spoolnews $webroot
|
||||
cp -a rslight/* $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Setting permissions..."
|
||||
chown $username $spoolpath
|
||||
chgrp $username $spoolpath
|
||||
chown $username "$configpath/users"
|
||||
chgrp $username "$configpath/users"
|
||||
chmod 700 "$configpath/users"
|
||||
chown $username "$configpath/userconfig"
|
||||
chgrp $username "$configpath/userconfig"
|
||||
chmod 700 "$configpath/userconfig"
|
||||
echo "done"
|
||||
|
||||
echo
|
||||
echo -n "Applying configuration..."
|
||||
sed -i '' -e "s|<spooldir>|$spoolpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<config_dir>|$configpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<webserver_user>|$username|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<site_key>|$site_key|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<local_password>|$local_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/admin.inc.php
|
||||
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/admin.inc.php
|
||||
echo "done"
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "******** YOUR ADMIN PASSWORD IS: '$admin_password'"
|
||||
echo "***************************************************"
|
||||
echo
|
||||
echo "Admin password can be changed in $configpath/admin.inc.php"
|
||||
echo
|
||||
echo "Next step is to visit your site in your browser: /common/setup.php"
|
||||
echo "to complete configuration"
|
||||
echo
|
||||
echo Add this to crontab for root to link with your remote server, start local
|
||||
echo server and manage other tasks:
|
||||
echo "*/5 * * * * cd $webroot/spoolnews ; bash -lc \"php $configpath/scripts/cron.php\""
|
||||
echo
|
||||
echo "Once your web server is configured to point to $webroot and serve .php files"
|
||||
echo "give it a try. If you have trouble, feel free to ask for help in rocksolid.nodes.help"
|
||||
echo
|
||||
echo "Note that it may take 10-20 minutes before groups appear on your main page"
|
||||
echo "If you see files starting to appear in $spoolpath, it should be working"
|
||||
echo
|
||||
echo "Installation complete"
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
session_start();
|
||||
$_SESSION['isframed'] = 1;
|
||||
|
||||
$CONFIG = include('/etc/rslight/rslight.inc.php');
|
||||
|
||||
if (isset($_REQUEST['content'])) {
|
||||
$CONFIG['default_content']=$_REQUEST['content'];
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['menu'])) {
|
||||
$default_menu=$_REQUEST['menu'];
|
||||
}
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $CONFIG['rslight_title'] ?></title>
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<?php
|
||||
if (file_exists('common/mods/'.$style_css)) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="common/mods/'.$style_css.'">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="common/'.$style_css.'">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<div class='page'>
|
||||
<div class='section header'>
|
||||
<?php
|
||||
|
||||
if (file_exists('common/mods/header.php')) {
|
||||
echo '<iframe name="header" src="common/mods/header.php" class="np_frame_header" width=100% height=100%></iframe>';
|
||||
} else {
|
||||
echo '<iframe name="header" src="common/header.php" class="np_frame_header" width=100% height=100%></iframe>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='section menu'>
|
||||
<iframe name="menu" src="<?php echo $default_menu;?>" class='np_frame_menu' width=100% height=100%></iframe>
|
||||
</div>
|
||||
<div class='section content'>
|
||||
<iframe name="content" src="<?php echo $CONFIG['default_content'];?>" class='np_frame_content' width=100% height=100%></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?php
|
||||
} else {
|
||||
header('Location: '.$CONFIG['default_content']);
|
||||
}
|
||||
?>
|
||||
</html>
|
|
@ -0,0 +1,125 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
header("Expires: ".gmdate("D, d M Y H:i:s",time()+(3600*24))." GMT");
|
||||
header("Cache-Control: max-age=100");
|
||||
header("Pragma: cache");
|
||||
|
||||
include "config.inc.php";
|
||||
include "auth.inc";
|
||||
include "$file_newsportal";
|
||||
|
||||
// register parameters
|
||||
$id=$_REQUEST["id"];
|
||||
$group=_rawurldecode($_REQUEST["group"]);
|
||||
if(isset($_REQUEST["first"]))
|
||||
$first=$_REQUEST["first"];
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?content='+encodeURIComponent(contentURL);
|
||||
}
|
||||
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
$message=message_read($id,0,$group);
|
||||
|
||||
if (!$message) {
|
||||
header ("HTTP/1.0 404 Not Found");
|
||||
$subject=$title;
|
||||
$title.=' - Article not found';
|
||||
if($ns!=false)
|
||||
nntp_close($ns);
|
||||
} else {
|
||||
$subject=htmlspecialchars($message->header->subject);
|
||||
header("Last-Modified: ".date("r", $message->header->date));
|
||||
$title.= ' - '.$group.' - '.$subject;
|
||||
}
|
||||
include "head.inc";
|
||||
echo '<h1 class="np_thread_headline">';
|
||||
echo '<a href="'.$file_index.'" target='.$frame['menu'].'>'.basename(getcwd()).'</a> / ';
|
||||
echo '<a href="'.$file_thread.'?group='.rawurlencode($group).'" target='.$frame["content"].'>'.htmlspecialchars(group_display_name($group)).'</a> / '.$subject.'</h1>';
|
||||
|
||||
if($message) {
|
||||
// load thread-data and get IDs of the actual subthread
|
||||
$thread=thread_load($group);
|
||||
$subthread=thread_getsubthreadids($message->header->id,$thread);
|
||||
if($thread_articles == false) {
|
||||
sort($subthread);
|
||||
}
|
||||
// If no page is set, lets look, if we can calculate the page by
|
||||
// the message-number
|
||||
if(!isset($first)) {
|
||||
$first=intval(array_search($id,$subthread)/$articleflat_articles_per_page)*
|
||||
$articleflat_articles_per_page+1;
|
||||
}
|
||||
|
||||
// which articles are exactly on this page?
|
||||
$pageids=array();
|
||||
for($i=$first-1; (($i<count($subthread)) &&
|
||||
($i<$first+$articleflat_articles_per_page-1)); $i++) {
|
||||
$pageids[]=$subthread[$i];
|
||||
}
|
||||
|
||||
// display the thread on top
|
||||
// change some of the default threadstyle-values
|
||||
$thread_show["replies"]=true;
|
||||
$thread_show["threadsize"]=false;
|
||||
$thread_show["lastdate"]=false;
|
||||
$thread_show["latest"]=false;
|
||||
$thread_show["author"]=true;
|
||||
//message_thread($message->header->id,$group,$thread,$pageids);
|
||||
message_thread($message->header->id,$group,$thread,false);
|
||||
echo '<br>';
|
||||
echo '<a name="start"></a>';
|
||||
// navigation line
|
||||
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
|
||||
// Article List button
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_thread.'">';
|
||||
echo '<input type="hidden" name="group" value="'.rawurlencode($group).'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.htmlspecialchars(group_display_name($group)).'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
// Pages
|
||||
echo '<td class="np_pages" width="100%" align="right">';
|
||||
echo articleflat_pageselect($group,$id,count($subthread),$first);
|
||||
echo '</td></tr></table>';
|
||||
foreach($pageids as $subid) {
|
||||
flush();
|
||||
$message=message_read($subid,0,$group);
|
||||
echo '<a name="'.$subid.'"> </a>';
|
||||
message_show($group,$subid,0,$message,$articleflat_chars_per_articles);
|
||||
if ((!$CONFIG['readonly']) && ($message)) {
|
||||
echo '<form action="'.$file_post.'">'.
|
||||
'<input type="hidden" name="id" value="'.urlencode($subid).'">'.
|
||||
'<input type="hidden" name="type" value="reply">'.
|
||||
'<input type="hidden" name="group" value="'.urlencode($group).'">'.
|
||||
'<input type="submit" value="'.$text_article["button_answer"].
|
||||
'">'.
|
||||
'</form>';
|
||||
}
|
||||
}
|
||||
// navigation line
|
||||
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
|
||||
// Article List button
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_thread.'">';
|
||||
echo '<input type="hidden" name="group" value="'.rawurlencode($group).'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.htmlspecialchars(group_display_name($group)).'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
// Pages
|
||||
echo '<td class="np_pages" width="100%" align="right">';
|
||||
echo articleflat_pageselect($group,$id,count($subthread),$first);
|
||||
echo '</td></tr></table>';
|
||||
}
|
||||
include "tail.inc";
|
||||
?>
|
|
@ -0,0 +1,97 @@
|
|||
<?php
|
||||
header("Expires: ".gmdate("D, d M Y H:i:s",time()+(3600*24))." GMT");
|
||||
|
||||
include "config.inc.php";
|
||||
include "auth.inc";
|
||||
include "$file_newsportal";
|
||||
|
||||
// register parameters
|
||||
$id=$_REQUEST["id"];
|
||||
$group=_rawurldecode($_REQUEST["group"]);
|
||||
|
||||
$thread_show["replies"]=true;
|
||||
$thread_show["lastdate"]=false;
|
||||
$thread_show["threadsize"]=false;
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?content='+encodeURIComponent(contentURL);
|
||||
}
|
||||
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
$message=message_read($id,0,$group);
|
||||
if (!$message) {
|
||||
header ("HTTP/1.0 404 Not Found");
|
||||
$subject=$title;
|
||||
$title.=' - Article not found';
|
||||
if($ns!=false)
|
||||
nntp_close($ns);
|
||||
} else {
|
||||
$subject=htmlspecialchars($message->header->subject);
|
||||
header("Last-Modified: ".date("r", $message->header->date));
|
||||
$title.= ' - '.$group.' - '.$subject;
|
||||
}
|
||||
include "head.inc";
|
||||
|
||||
// has the user read-rights on this article?
|
||||
if((function_exists("npreg_group_has_read_access") &&
|
||||
!npreg_group_has_read_access($group)) ||
|
||||
(function_exists("npreg_group_is_visible") &&
|
||||
!npreg_group_is_visible($group))) {
|
||||
die("access denied");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<h1 class="np_article_headline"><?php echo htmlspecialchars(group_display_name($group)." / ".$subject) ?></h1>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>
|
||||
<?php
|
||||
if(!$frames_on) {
|
||||
echo '<td class="np_button"><a class="np_button" href="'.
|
||||
$file_index.'">'.$text_thread["button_grouplist"].'</a></td>';
|
||||
}
|
||||
echo '<td class="np_button"><a class="np_button" href="'.
|
||||
$file_thread.'?group='.urlencode($group).'">'.$text_article["back_to_group"].'</a></td>';
|
||||
if ((!$CONFIG['readonly']) && ($message) &&
|
||||
(!function_exists("npreg_group_has_write_access") ||
|
||||
npreg_group_has_write_access($group)))
|
||||
echo '<td class="np_button"> <a class="np_button" href="'.
|
||||
$file_post.'?type=reply&id='.urlencode($id).
|
||||
'&group='.urlencode($group).'">'.$text_article["button_answer"].
|
||||
'</a></td>';
|
||||
|
||||
if(function_exists(npreg_user_is_moderator) && npreg_user_is_moderator($group)) {
|
||||
echo '<td class="np_button"><a class="np_button" href="'.$file_cancel.'?type=reply&id='.urlencode($id).
|
||||
'&group='.urlencode($group).'">'.$text_article["button_cancel"].'</a></td>';
|
||||
}
|
||||
|
||||
?>
|
||||
<td width="100%"> </td></tr></table>
|
||||
|
||||
<?php
|
||||
if (!$message)
|
||||
// article not found
|
||||
echo $text_error["article_not_found"];
|
||||
else {
|
||||
if($article_showthread)
|
||||
$thread=thread_cache_load($group);
|
||||
//echo "<br>";
|
||||
message_show($group,$id,0,$message);
|
||||
if($article_showthread)
|
||||
message_thread($message->header->id,$group,$thread);
|
||||
|
||||
}
|
||||
include "tail.inc";
|
||||
?>
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
header("Expires: ".gmdate("D, d M Y H:i:s",time()+(3600*24))." GMT");
|
||||
$group=$_REQUEST["group"];
|
||||
$id=$_REQUEST["id"];
|
||||
$attachment=$_REQUEST["attachment"];
|
||||
include "config.inc.php";
|
||||
include "auth.inc";
|
||||
require("$file_newsportal");
|
||||
if (!isset($attachment))
|
||||
$attachment=0;
|
||||
$message=message_read($id,$attachment,$group);
|
||||
//print_r($message->header);
|
||||
if (!$message) {
|
||||
header ("HTTP/1.0 404 Not Found");
|
||||
echo "The Attachment doesn't exists";
|
||||
} else {
|
||||
header("Content-Disposition: inline; filename=".
|
||||
$message->header->content_type_name[$attachment]);
|
||||
header("Content-type: ".$message->header->content_type[$attachment]);
|
||||
message_show("",$id,$attachment,$message);
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
if(($iconv_enable==true) &&
|
||||
(!function_exists("iconv")))
|
||||
die('There is no iconv-extension in PHP. set <tt>$iconv_enable=false</tt>
|
||||
in config.inc.php to disable automatic charset recoding.');
|
||||
?>
|
|
@ -0,0 +1,243 @@
|
|||
<?php
|
||||
|
||||
include "../common/config.inc.php";
|
||||
|
||||
ini_set('memory_limit','1536M');
|
||||
|
||||
/* Config file name should be the basename
|
||||
* of your path where you installed rslight
|
||||
* plus .inc.php.
|
||||
* So if installed in /var/www/html/rocksolid
|
||||
* it's rocksolid.inc.php in $config_dir
|
||||
*/
|
||||
$config_name = basename(getcwd());
|
||||
if(file_exists($config_dir.$config_name.'.inc.php')) {
|
||||
$config_file = $config_dir.$config_name.'.inc.php';
|
||||
} else {
|
||||
$config_file = $config_dir.'rslight.inc.php';
|
||||
}
|
||||
|
||||
$installed_path = getcwd();
|
||||
|
||||
/* $config_path is a directory off the $config_dir
|
||||
* where specific files such as groups.txt
|
||||
* are located
|
||||
*/
|
||||
$config_path = $config_dir.$config_name."/";
|
||||
$script_path = $config_dir."/scripts/";
|
||||
$CONFIG = include($config_file);
|
||||
|
||||
$logdir=$spooldir.'/log';
|
||||
|
||||
ini_set('error_reporting', E_ERROR );
|
||||
|
||||
/* Permanent configuration changes */
|
||||
@mkdir($logdir,0755,'recursive');
|
||||
@mkdir($spooldir.'/upload',0755,'recursive');
|
||||
chown($logdir,$CONFIG['webserver_user']);
|
||||
chown($spooldir.'/upload',$CONFIG['webserver_user']);
|
||||
|
||||
date_default_timezone_set('UTC');
|
||||
$overboard=true;
|
||||
$spoolnews=true;
|
||||
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
|
||||
$server=$CONFIG['local_server'];
|
||||
$port=$CONFIG['local_port'];
|
||||
} else {
|
||||
$server=$CONFIG['remote_server'];
|
||||
$port=$CONFIG['remote_port'];
|
||||
$CONFIG['server_auth_user']=$CONFIG['remote_auth_user'];
|
||||
$CONFIG['server_auth_pass']=$CONFIG['remote_auth_pass'];
|
||||
}
|
||||
|
||||
/*
|
||||
* Frames (frames is not up to date and probably not so great)
|
||||
*/
|
||||
|
||||
// Set to true to use framed version of rslight
|
||||
$frames_on=false;
|
||||
|
||||
// The default content for the left side 'menu' frame
|
||||
$default_menu="/rocksolid/index.php";
|
||||
|
||||
if (isset($frames_on) && $frames_on === true) {
|
||||
$style_css="style-frames.css";
|
||||
$frame['content']="content";
|
||||
$frame['menu']="menu";
|
||||
$frame['header']="header";
|
||||
} else {
|
||||
$style_css="style.css";
|
||||
$frame['content']="_self";
|
||||
$frame['menu']="_self";
|
||||
$frame['header']="_self";
|
||||
}
|
||||
$frame_externallink="_blank";
|
||||
|
||||
/*
|
||||
* directories and files
|
||||
*/
|
||||
$imgdir="img";
|
||||
|
||||
$file_newsportal="newsportal.php";
|
||||
$file_index="index.php";
|
||||
$file_thread="thread.php";
|
||||
$file_article="article-flat.php";
|
||||
$file_article_full="article.php";
|
||||
$file_attachment="attachment.php";
|
||||
$file_post="post.php";
|
||||
$file_cancel="cancel.php";
|
||||
$file_language="lang/english.lang";
|
||||
$file_footer="footer.inc";
|
||||
$file_groups=$config_path."groups.txt";
|
||||
|
||||
$title = $CONFIG['title_full'];
|
||||
|
||||
/*
|
||||
* Grouplist Layout
|
||||
*/
|
||||
$gl_age=true;
|
||||
|
||||
/*
|
||||
* Thread layout
|
||||
*/
|
||||
# When viewing a thread should the articles be sorted by subthreads, or
|
||||
# simply by date, oldest to newest?
|
||||
# Set to false to sort by date, true to sort into subthreads.
|
||||
# Generally, false makes it easier to find the latest posts at the bottom.
|
||||
$thread_articles=false;
|
||||
|
||||
$thread_treestyle=7;
|
||||
$thread_show["date"]=false;
|
||||
$thread_show["subject"]=true;
|
||||
$thread_show["author"]=true;
|
||||
$thread_show["authorlink"]=false;
|
||||
$thread_show["replies"]=false;
|
||||
$thread_show["lastdate"]=true; // makes only sense with $thread_show["replies"]=false
|
||||
$thread_show["threadsize"]=true;
|
||||
$thread_show["latest"]=true;
|
||||
$thread_maxSubject=70;
|
||||
$maxfetch=1000;
|
||||
// If increasing $maxarticles over 10000 uncomment ini_set('memory_limit') above
|
||||
$maxarticles=50000;
|
||||
$maxarticles_extra=500000;
|
||||
$age_count=3;
|
||||
$age_time[1]=86400; //24 hours
|
||||
$age_color[1]="red";
|
||||
$age_time[2]=259200; //3 days
|
||||
$age_color[2]="darkgoldenrod";
|
||||
$age_time[3]=604800; //7 days
|
||||
$age_color[3]="darkgreen";
|
||||
$thread_sort_order=-1;
|
||||
$thread_sort_type="thread";
|
||||
$articles_per_page=200;
|
||||
$startpage="first";
|
||||
|
||||
/*
|
||||
* article layout
|
||||
*/
|
||||
$article_show["Subject"]=true;
|
||||
$article_show["From"]=true;
|
||||
$article_show["Newsgroups"]=true;
|
||||
$article_show["Followup"]=true;
|
||||
$article_show["Organization"]=true;
|
||||
$article_show["Date"]=true;
|
||||
$article_show["Message-ID"]=false;
|
||||
$article_show["User-Agent"]=false;
|
||||
$article_show["References"]=false;
|
||||
$article_show["From_link"]=false;
|
||||
$article_show["trigger_headers"]=true;
|
||||
//$article_show["From_rewrite"]=array('@',' (at) ');
|
||||
$article_showthread=true;
|
||||
$article_graphicquotes=true;
|
||||
|
||||
/*
|
||||
* settings for the article flat view, if used
|
||||
*/
|
||||
$articleflat_articles_per_page=25;
|
||||
$articleflat_chars_per_articles=10000;
|
||||
|
||||
/*
|
||||
* Message posting
|
||||
*/
|
||||
$send_poster_host=false;
|
||||
$testgroup=true; // don't disable unless you really know what you are doing!
|
||||
$validate_email=1;
|
||||
$setcookies=true;
|
||||
$anonym_address="AnonUser@retrobbs.rocksolidbbs.com";
|
||||
$msgid_generate="md5";
|
||||
$msgid_fqdn=$_SERVER["HTTP_HOST"];
|
||||
$post_autoquote=false;
|
||||
$post_captcha=false;
|
||||
|
||||
/*
|
||||
* Attachments
|
||||
*/
|
||||
$attachment_show=true;
|
||||
$attachment_delete_alternative=true; // delete non-text mutipart/alternative
|
||||
$attachment_uudecode=true; // experimental!
|
||||
|
||||
/*
|
||||
* Security settings
|
||||
*/
|
||||
$block_xnoarchive=false;
|
||||
|
||||
/*
|
||||
* User registration and database
|
||||
*/
|
||||
// $npreg_lib="lib/npreg.inc.php";
|
||||
|
||||
/*
|
||||
* Cache
|
||||
*/
|
||||
$cache_articles=false; // article cache, experimental!
|
||||
$cache_index=600; // cache the group index for ten minutes before reloading
|
||||
$cache_thread=60; // cache the thread for one minute reloading
|
||||
|
||||
/*
|
||||
* Misc
|
||||
*/
|
||||
$cutsignature=true;
|
||||
$compress_spoolfiles=false;
|
||||
|
||||
if(isset($spoolnews) && ($spoolnews === true)) {
|
||||
$spoolpath = $spooldir."/articles/";
|
||||
$localeol=PHP_EOL.PHP_EOL;
|
||||
} else {
|
||||
$spoolpath = "/var/spool/news/articles/";
|
||||
$localeol="\r\n\r\n";
|
||||
}
|
||||
|
||||
// website charset, "koi8-r" for example
|
||||
//$www_charset = "iso-8859-15";
|
||||
$www_charset = "utf-8";
|
||||
// Use the iconv extension for improved charset conversions
|
||||
$iconv_enable=true;
|
||||
/*
|
||||
* Group specific config
|
||||
*/
|
||||
//$group_config=array(
|
||||
// '^de\.alt\.fan\.aldi$' => "aldi.inc",
|
||||
// '^de\.' => "german.inc"
|
||||
//);
|
||||
|
||||
/*
|
||||
* Do not edit anything below this line
|
||||
*/
|
||||
// Load group specifig config files
|
||||
if((isset($group)) && (isset($group_config))) {
|
||||
foreach ($group_config as $key => $value) {
|
||||
if (ereg($key,$group)) {
|
||||
include $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check the settings
|
||||
include "lib/check.php";
|
||||
|
||||
// load the english language definitions first because some of the other
|
||||
// definitions are incomplete
|
||||
include("lang/english.lang");
|
||||
include($file_language);
|
||||
?>
|
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
header("Expires: ".gmdate("D, d M Y H:i:s",time()+(3600*24))." GMT");
|
||||
|
||||
|
||||
// register parameters
|
||||
$id=$_REQUEST["id"];
|
||||
$group=$_REQUEST["group"];
|
||||
|
||||
include "config.inc.php";
|
||||
|
||||
$thread_show["replies"]=true;
|
||||
$thread_show["lastdate"]=false;
|
||||
$thread_show["threadsize"]=false;
|
||||
|
||||
include "auth.inc";
|
||||
include "$file_newsportal";
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?content='+encodeURIComponent(contentURL);
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
$message=message_read($id,0,$group);
|
||||
if (!$message) {
|
||||
header ("HTTP/1.0 404 Not Found");
|
||||
$subject=$title;
|
||||
$title.=' - Article not found';
|
||||
if($ns!=false)
|
||||
nntp_close($ns);
|
||||
} else {
|
||||
$subject=htmlspecialchars($message->header->subject);
|
||||
header("Last-Modified: ".date("r", $message->header->date));
|
||||
$title.= ' - '.$subject;
|
||||
}
|
||||
include "head.inc";
|
||||
|
||||
// has the user read-rights on this article?
|
||||
if((function_exists("npreg_group_has_read_access") &&
|
||||
!npreg_group_has_read_access($group)) ||
|
||||
(function_exists("npreg_group_is_visible") &&
|
||||
!npreg_group_is_visible($group))) {
|
||||
die("access denied");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<h1 class="np_article_headline"><?php echo htmlspecialchars(group_display_name($group)." / ".$subject) ?></h1>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>
|
||||
<?php
|
||||
if(!$frames_on) {
|
||||
echo '<td class="np_button"><a class="np_button" href="'.
|
||||
$file_index.'">'.$text_thread["button_grouplist"].'</a></td>';
|
||||
}
|
||||
echo '<td class="np_button"><a class="np_button" href="'.
|
||||
$file_thread.'?group='.urlencode($group).'">'.$text_article["back_to_group"].'</a></td>';
|
||||
if ((!$CONFIG['readonly']) && ($message) &&
|
||||
(!function_exists("npreg_group_has_write_access") ||
|
||||
npreg_group_has_write_access($group)))
|
||||
echo '<td class="np_button"> <a class="np_button" href="'.
|
||||
$file_post.'?type=reply&id='.urlencode($id).
|
||||
'&group='.urlencode($group).'">'.$text_article["button_answer"].
|
||||
'</a></td>';
|
||||
|
||||
if(function_exists(npreg_user_is_moderator) && npreg_user_is_moderator($group)) {
|
||||
echo '<td class="np_button"><a class="np_button" href="'.$file_cancel.'?type=reply&id='.urlencode($id).
|
||||
'&group='.urlencode($group).'">'.$text_article["button_cancel"].'</a></td>';
|
||||
}
|
||||
|
||||
?>
|
||||
<td width="100%"> </td></tr></table>
|
||||
|
||||
<?php
|
||||
if (!$message)
|
||||
// article not found
|
||||
echo $text_error["article_not_found"];
|
||||
else {
|
||||
if($article_showthread)
|
||||
$thread=thread_cache_load($group);
|
||||
//echo "<br>";
|
||||
$ok = check_bbs_auth($_POST['decryptuser'], $_POST['decryptpass']);
|
||||
if ($ok === TRUE) {
|
||||
$key = get_user_config($_POST['decryptuser'],'encryptionkey');
|
||||
message_decrypt($key,$group,$id,0,$message);
|
||||
} else {
|
||||
echo "Failed to authenticate";
|
||||
}
|
||||
// if($article_showthread)
|
||||
// message_thread($message->header->id,$group,$thread);
|
||||
|
||||
}
|
||||
include "tail.inc";
|
||||
?>
|
|
@ -0,0 +1,23 @@
|
|||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlspecialchars($title); ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
include "config.inc.php";
|
||||
if(isset($frames_on) && $frames_on === false) {
|
||||
if (file_exists('../common/mods/header.php')) {
|
||||
include "../common/mods/header.php";
|
||||
} else {
|
||||
include "../common/header.php";
|
||||
}
|
||||
}
|
||||
if (file_exists('../common/mods/'.$style_css)) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/'.$style_css.'">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/'.$style_css.'">';
|
||||
}
|
||||
?>
|
||||
<hr>
|
||||
</head>
|
||||
<body textcolor="black" bgcolor="white">
|
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 67 B |
After Width: | Height: | Size: 71 B |
After Width: | Height: | Size: 42 B |
After Width: | Height: | Size: 61 B |
After Width: | Height: | Size: 66 B |
After Width: | Height: | Size: 55 B |
|
@ -0,0 +1,62 @@
|
|||
<?php header("Expires: ".gmdate("D, d M Y H:i:s",time()+7200)." GMT");
|
||||
session_start();
|
||||
$_SESSION['starttime'] = time();
|
||||
$_SESSION['views'] = 0;
|
||||
$_SESSION['isframed'] = 1;
|
||||
|
||||
include "config.inc.php";
|
||||
include "auth.inc";
|
||||
if (isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?menu='+encodeURIComponent(contentURL);
|
||||
}
|
||||
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
if (navigator.cookieEnabled)
|
||||
document.cookie = "tzo="+ (- new Date().getTimezoneOffset());
|
||||
</script>
|
||||
<?php
|
||||
$title.=' - '.basename(getcwd());
|
||||
include "head.inc";
|
||||
echo '<h1 class="np_thread_headline">'.basename(getcwd()).'</h1>';
|
||||
echo '<table cellpadding="0" cellspacing="0" class="np_buttonbar"><tr>';
|
||||
// View Latest button
|
||||
if (isset($overboard) && ($overboard == true)) {
|
||||
echo '<td>';
|
||||
echo '<form target="'.$frame['content'].'" action="overboard.php">';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_thread["button_overboard"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
} else {
|
||||
// echo htmlspecialchars($CONFIG['title_full']);
|
||||
}
|
||||
// Search button
|
||||
echo '<td>';
|
||||
echo '<form target="'.$frame['content'].'" action="search.php">';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_thread["button_search"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
echo '<td width=100%></td></tr></table>';
|
||||
|
||||
include("$file_newsportal");
|
||||
flush();
|
||||
$newsgroups=groups_read($server,$port);
|
||||
echo '<div class="np_index_groups">';
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
groups_show_frames($newsgroups);
|
||||
} else {
|
||||
groups_show($newsgroups);
|
||||
}
|
||||
echo '</div>';
|
||||
include "tail.inc";
|
||||
?>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>From:</b> ";
|
||||
$text_header["subject"]="<b>Subject:</b> ";
|
||||
$text_header["newsgroups"]="<b>Newsgroups:</b> ";
|
||||
$text_header["followup"]="<b>Followup:</b> ";
|
||||
$text_header["organization"]="<b>Organization:</b> ";
|
||||
$text_header["date"]="<b>Date:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Nema clanaka</b></p>";
|
||||
$text_thread["button_write"]="Pisi";
|
||||
$text_thread["button_grouplist"]="Lista grupa";
|
||||
$text_thread["button_top"]="Na vrh";
|
||||
$text_thread["date"]="<b>Date</b>";
|
||||
$text_thread["subject"]="<b>Datum</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="Takva grupa ne postoji.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Grupa</b>";
|
||||
$text_groups["description"]="<b>Opis</b>";
|
||||
|
||||
$text_article["button_answer"]="Odgovor";
|
||||
|
||||
$text_post["missing_message"]="Nedostaje vam poruka.";
|
||||
$text_post["missing_email"]="Nedostaje email adresa.";
|
||||
$text_post["missing_name"]="Nedostaje ime.";
|
||||
$text_post["missing_subject"]="Nedostaje subjekt.";
|
||||
$text_post["button_post"]="Salji";
|
||||
$text_post["remember"]="Zapamti ime i email adresu";
|
||||
$text_post["message"]="Message";
|
||||
$text_post["group_head"]="Sastavi poruku za ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Nije vam dozvoljeno slanje u grupe:";
|
||||
$text_post["message_posted"]="Poruka poslana";
|
||||
$text_post["message_posted2"]="Poruka uspjesno poslana.";
|
||||
$text_post["button_back"]="Nazad";
|
||||
$text_post["button_back2"]="na";
|
||||
$text_post["error_newsserver"]="Newsserver nije prihvatio poruku:";
|
||||
$text_post["error_readonly"]="Grupa je read-only";
|
||||
$text_post["error_wrong_email"]="Email adresa je pogresna";
|
||||
|
||||
$text_error["error:"]='<font color="red">Greska:</font>';
|
||||
$text_error["connection_failed"]="Nije uspjelo konektovanje na newsserver";
|
||||
$text_error["article_not_found"]="<p>Clanak ne postoji.</p>";
|
||||
$text_error["read_access_denied"]="<p>NEmate dozvolu za citanje!</p>";
|
||||
$text_error["post_failed"]="Konekcija prekinuta. Pokusajte kasnije.";
|
||||
$text_error["auth_error"]="Autorizacija kod newsservera nije prosla.";
|
||||
$text_error["spool_error"]="Greska u spoolfile-u. Pritisnite refresh (reload) dugme.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Odesílatel:</b> ";
|
||||
$text_header["subject"]="<b>Nadpis:</b> ";
|
||||
$text_header["newsgroups"]="<b>Diskusní skupiny:</b> ";
|
||||
$text_header["followup"]="<b>Followup:</b> ";
|
||||
$text_header["organization"]="<b>Organizace:</b> ";
|
||||
$text_header["date"]="<b>Datum:</b> ";
|
||||
$text_header["message-id"]="<b>ID zprávy:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Žádné èlánky k dispozici</b></p>";
|
||||
$text_thread["button_write"]="Pøidej zprávu";
|
||||
$text_thread["button_grouplist"]="Diskusní skupiny";
|
||||
$text_thread["button_top"]="Zpìt nahoru";
|
||||
$text_thread["date"]="<b>Datum</b>";
|
||||
$text_thread["subject"]="<b>Nadpis</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="Žádná taková skupina.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Skupina</b>";
|
||||
$text_groups["description"]="<b>Popis</b>";
|
||||
|
||||
$text_article["button_answer"]="Odpovìz";
|
||||
|
||||
$text_post["missing_message"]="Nezadal jste pøíspìvek.";
|
||||
$text_post["missing_email"]="Nezadal jste email.";
|
||||
$text_post["missing_name"]="Nezadal jste jméno.";
|
||||
$text_post["missing_subject"]="Nezadal jste nadpis.";
|
||||
$text_post["button_post"]="Odešli";
|
||||
$text_post["remember"]="Zapamatujte si jméno a emailovou adresu";
|
||||
$text_post["message"]="Zpráva";
|
||||
$text_post["group_head"]="Psaní zprávy do:<B> ";
|
||||
$text_post["group_tail"]="</B>";
|
||||
$text_post["followup_not_allowed"]="Nemáte povolení pøispívat do tìchto skupin:";
|
||||
$text_post["message_posted"]="Zpráva odeslána";
|
||||
$text_post["message_posted2"]="Zpráva úspìšnì odeslána.";
|
||||
$text_post["button_back"]="Zpìt";
|
||||
$text_post["button_back2"]="do";
|
||||
$text_post["error_newsserver"]="News-server nepøijal tuto zprávu:";
|
||||
$text_post["error_readonly"]="Tato skupina je chránìna proti zápisu";
|
||||
$text_post["error_wrong_email"]="Emailová adresa je chybná";
|
||||
|
||||
$text_error["error:"]='<font color="red">Chyba:</font>';
|
||||
$text_error["connection_failed"]="Spojení na news-server se nepodaøilo";
|
||||
$text_error["article_not_found"]="<p>Takový èlánek neexistuje.</p>";
|
||||
$text_error["read_access_denied"]="<p>Nemáte právo pro ètení!</p>";
|
||||
$text_error["post_failed"]="Nepovedlo se pøipojit. Zkuste po chvíli obnovit stránku.";
|
||||
$text_error["auth_error"]="Autentifikace na news-server se nepodaøila.";
|
||||
$text_error["spool_error"]="Chyba v spool-souboru. Obnovte, prosím stránku.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Fra:</b> ";
|
||||
$text_header["subject"]="<b>Emne:</b> ";
|
||||
$text_header["newsgroups"]="<b>Nyhedsgrupper:</b> ";
|
||||
$text_header["followup"]="<b>Opfølging:</b> ";
|
||||
$text_header["organization"]="<b>Organisation:</b> ";
|
||||
$text_header["date"]="<b>Dato:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>Referencer:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="d M Y H:i:s";
|
||||
$text_header["attachments"]="<b>Vedhæftning:</b> ";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Ingen artikler tilgængelige</b></p>";
|
||||
$text_thread["button_write"]="Skriv";
|
||||
$text_thread["button_grouplist"]="Nyhedsgrupper";
|
||||
$text_thread["button_top"]="Tilbage til toppen";
|
||||
$text_thread["date"]="<b>Dato</b>";
|
||||
$text_thread["subject"]="<b>Emne</b>";
|
||||
$text_thread["author"]="<b>Forfatter</b>";
|
||||
$text_thread["no_such_group"]="Gruppen findes ikke.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Nyhedsgruppe</b>";
|
||||
$text_groups["description"]="<b>Beskrivelse</b>";
|
||||
|
||||
$text_article["button_answer"]="Svar";
|
||||
$text_article["block-xnoarchive"]="Dette system er ikke et arkiv, men
|
||||
administratoren af systemet besluttede sig for at blokere artikler, hvor
|
||||
forfatteren ikke ønsker arkivering.";
|
||||
|
||||
$text_post["name"]="Dit navn:";
|
||||
$text_post["email"]="Din E-Mail:";
|
||||
$text_post["missing_message"]="Du skal inkludere et indlæg.";
|
||||
$text_post["missing_email"]="Du skal opgive en email-addresse.";
|
||||
$text_post["missing_name"]="Du skal opgive navn eller alias.";
|
||||
$text_post["missing_subject"]="Du skal skrive et emne.";
|
||||
$text_post["button_post"]="Post";
|
||||
$text_post["remember"]="Husk navn og e-mail addresse";
|
||||
$text_post["message"]="Artikel";
|
||||
$text_post["group_head"]="Skriv artikel til";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Du har ikke rettigheder til at poste her:";
|
||||
$text_post["message_posted"]="Artikel postet";
|
||||
$text_post["message_posted2"]="Artikel postet successfuldt.";
|
||||
$text_post["button_back"]="Tilbage";
|
||||
$text_post["button_back2"]="til";
|
||||
$text_post["error_newsserver"]="Nyhedsserveren accepterer ikke artiklen:";
|
||||
$text_post["error_readonly"]="Gruppen er skrivebeskyttet";
|
||||
$text_post["error_wrong_email"]="E-mail addressen er fejlagtig";
|
||||
$text_post["wrote_prefix"]="";
|
||||
$text_post["wrote_suffix"]=" skrev:";
|
||||
|
||||
$text_error["error:"]='<font color="red">Fejl:</font>';
|
||||
$text_error["connection_failed"]="Kunne ikke forbinde til serveren";
|
||||
$text_error["article_not_found"]="<p>Artiklen eksisterer ikke.</p>";
|
||||
$text_error["read_access_denied"]="<p>Ingen rettigheter til at læse!</p>";
|
||||
$text_error["post_failed"]="Kunne ikke koble til, prøv igen senere.";
|
||||
$text_error["auth_error"]="Godkendelse på nyhedsserveren fejlede.";
|
||||
$text_error["spool_error"]="Fejl i spolefil, prøv venligst igen.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Von:</b> ";
|
||||
$text_header["subject"]="<b>Betreff:</b> ";
|
||||
$text_header["newsgroups"]="<b>Gruppen:</b> ";
|
||||
$text_header["followup"]="<b>Antwort-An:</b> ";
|
||||
$text_header["organization"]="<b>Organisation:</b> ";
|
||||
$text_header["date"]="<b>Datum:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>Referenzen:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="d. M Y, H:i:s";
|
||||
$text_header["attachments"]="<b>Anhänge:</b> ";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Keine Artikel vorhanden</b></p>";
|
||||
$text_thread["button_write"]="Schreiben";
|
||||
$text_thread["button_grouplist"]="Zur Gruppenliste";
|
||||
$text_thread["button_top"]="Nach oben";
|
||||
$text_thread["date"]="<b>Datum</b>";
|
||||
$text_thread["subject"]="<b>Thema</b>";
|
||||
$text_thread["threadsize"]="<b>#</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="Die Gruppe existiert nicht.";
|
||||
$text_thread["pages"]="Seiten:";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Newsgruppe</b>";
|
||||
$text_groups["description"]="<b>Beschreibung</b>";
|
||||
|
||||
$text_article["button_answer"]="Beantworten";
|
||||
$text_article["button_cancel"]="Löschen";
|
||||
$text_article["block-xnoarchive"]='Der Autor dieses Artikels wünscht keine
|
||||
Veröffentlichung in Archiven. Obwohl dieses System kein Archiv ist, hat der
|
||||
Betreiber entschieden, solche Artikel trotzdem nicht anzuzeigen.';
|
||||
$text_article["full_article"]="Den ganzen Artikel anzeigen";
|
||||
|
||||
$text_post["name"]="Dein Name: ";
|
||||
$text_post["email"]="Deine E-Mail: ";
|
||||
$text_post["missing_message"]="Du mußt natürlich das Nachrichtenfeld ausfüllen.";
|
||||
$text_post["missing_email"]="Die E-Mailadresse muß angegeben werden.";
|
||||
$text_post["missing_name"]="Du mußt einen Namen angeben, wenigstens einen Spitznamen.";
|
||||
$text_post["missing_subject"]="Das Subject muß angegeben werden.";
|
||||
$text_post["button_post"]="Absenden";
|
||||
$text_post["remember"]="Name und eMail abspeichern";
|
||||
$text_post["message"]="Nachricht";
|
||||
$text_post["group_head"]="Artikel nach ";
|
||||
$text_post["group_tail"]=" schreiben";
|
||||
$text_post["followup_not_allowed"]="Du darfst auf den Artikel nicht antworten, da dieser in Folgende Gruppen geschrieben werden soll, zu denen Du kein Schreibrecht hast:";
|
||||
$text_post["message_posted"]="Nachricht verschickt";
|
||||
$text_post["message_posted2"]="Die Nachricht wurde erfolgreich verschickt.";
|
||||
$text_post["button_back"]="Zurück";
|
||||
$text_post["button_back2"]="nach";
|
||||
$text_post["error_newsserver"]="Die Nachricht wurde vom Newsserver mit folgender Fehlermeldung abgelehnt:";
|
||||
$text_post["error_readonly"]="keine Schreiberlaubnis";
|
||||
$text_post["error_wrong_email"]="Die angegebene eMail-Adresse ist ungültig";
|
||||
$text_post["wrote_prefix"]="";
|
||||
$text_post["wrote_suffix"]=" schrieb:";
|
||||
$text_post["quote"]="Zitieren";
|
||||
$text_post["captchafail"]='Du hast beim CAPTCHA-Test die falschen Zeichen abgetippt. Probiere es bitte erneut.';
|
||||
$text_post["captchainfo1"]='Bitte abtippen';
|
||||
$text_post["captchainfo2"]='Dieser Test dient als Schutz gegen Spammer. Falls Du die Zeichen nicht lesen kannst, klicke einfach auf "Abschicken" und versuche es dann erneut.';
|
||||
|
||||
|
||||
$text_error["error:"]='<font color="red">Fehler:</font>';
|
||||
$text_error["connection_failed"]="Der Verbindungsaufbau zum Newsserver ist fehlgeschlagen";
|
||||
$text_error["article_not_found"]="<p>Der Artikel ist nicht vorhanden</p>";
|
||||
$text_error["read_access_denied"]="<p>Keine Leseberechtigung!</p>";
|
||||
$text_error["post_failed"]="Verbindungsaufbau zum Newsserver fehlgeschlagen. Versuche es vielleicht später nochmal einen Reload.";
|
||||
$text_error["auth_error"]="Authentifikation beim Newsserver fehlgeschlagen.";
|
||||
$text_error["spool_error"]="Fehler in Spooldatei. Bitte neuladen.";
|
||||
|
||||
$text_register["must_register_group"]="Du musst registriert sein, um auf dieses Forum zugreifen zu können.";
|
||||
$text_register["must_register_post"]="Du musst registriert sein, um einen Artikel schreiben zu können.";
|
||||
$text_register["no_access_group"]="Auf dieses Forum darfst Du leider nicht zugreifen";
|
||||
$text_register["no_access_post"]="Du darfst in diesem Forum keinen Artikel schreiben.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Von:</b> ";
|
||||
$text_header["subject"]="<b>Betreff:</b> ";
|
||||
$text_header["newsgroups"]="<b>Gruppen:</b> ";
|
||||
$text_header["followup"]="<b>Antwort-An:</b> ";
|
||||
$text_header["organization"]="<b>Organisation:</b> ";
|
||||
$text_header["date"]="<b>Datum:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>Referenzen:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="d. M Y, H:i:s";
|
||||
$text_header["attachments"]="<b>Anhänge:</b> ";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Keine Artikel vorhanden</b></p>";
|
||||
$text_thread["button_write"]="Schreiben";
|
||||
$text_thread["button_grouplist"]="Zur Gruppenliste";
|
||||
$text_thread["button_top"]="Nach oben";
|
||||
$text_thread["date"]="<b>Datum</b>";
|
||||
$text_thread["subject"]="<b>Thema</b>";
|
||||
$text_thread["threadsize"]="<b>#</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="Die Gruppe existiert nicht.";
|
||||
$text_thread["pages"]="Seiten:";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Newsgruppe</b>";
|
||||
$text_groups["description"]="<b>Beschreibung</b>";
|
||||
|
||||
$text_article["button_answer"]="Beantworten";
|
||||
$text_article["block-xnoarchive"]='Der Autor dieses Artikels wünscht keine
|
||||
Veröffentlichung in Archiven. Obwohl dieses System kein Archiv ist, hat der
|
||||
Betreiber entschieden, solche Artikel trotzdem nicht anzuzeigen.';
|
||||
$text_article["full_article"]="Den ganzen Artikel anzeigen";
|
||||
|
||||
$text_post["name"]="Dein Name: ";
|
||||
$text_post["email"]="Deine E-Mail: ";
|
||||
$text_post["missing_message"]="Du mußt natürlich das Nachrichtenfeld ausfüllen.";
|
||||
$text_post["missing_email"]="Die E-Mailadresse muß angegeben werden.";
|
||||
$text_post["missing_name"]="Du mußt einen Namen angeben, wenigstens einen Spitznamen.";
|
||||
$text_post["missing_subject"]="Das Subject muß angegeben werden.";
|
||||
$text_post["button_post"]="Absenden";
|
||||
$text_post["remember"]="Name und eMail abspeichern";
|
||||
$text_post["message"]="Nachricht";
|
||||
$text_post["group_head"]="Artikel nach ";
|
||||
$text_post["group_tail"]=" schreiben";
|
||||
$text_post["followup_not_allowed"]="Du darfst auf den Artikel nicht antworten, da dieser in Folgende Gruppen geschrieben werden soll, zu denen Du kein Schreibrecht hast:";
|
||||
$text_post["message_posted"]="Nachricht verschickt";
|
||||
$text_post["message_posted2"]="Die Nachricht wurde erfolgreich verschickt.";
|
||||
$text_post["button_back"]="Zurück";
|
||||
$text_post["button_back2"]="nach";
|
||||
$text_post["error_newsserver"]="Die Nachricht wurde vom Newsserver mit folgender Fehlermeldung abgelehnt:";
|
||||
$text_post["error_readonly"]="keine Schreiberlaubnis";
|
||||
$text_post["error_wrong_email"]="Die angegebene eMail-Adresse ist ungültig";
|
||||
$text_post["wrote_prefix"]="";
|
||||
$text_post["wrote_suffix"]=" schrieb:";
|
||||
$text_post["quote"]="Zitieren";
|
||||
|
||||
$text_error["error:"]='<font color="red">Fehler:</font>';
|
||||
$text_error["connection_failed"]="Der Verbindungsaufbau zum Newsserver ist fehlgeschlagen";
|
||||
$text_error["article_not_found"]="<p>Der Artikel ist nicht vorhanden</p>";
|
||||
$text_error["read_access_denied"]="<p>Keine Leseberechtigung!</p>";
|
||||
$text_error["post_failed"]="Verbindungsaufbau zum Newsserver fehlgeschlagen. Versuche es vielleicht später nochmal einen Reload.";
|
||||
$text_error["auth_error"]="Authentifikation beim Newsserver fehlgeschlagen.";
|
||||
$text_error["spool_error"]="Fehler in Spooldatei. Bitte neuladen.";
|
||||
|
||||
$text_register["must_register_group"]="Sie müssen registriert sein, um auf dieses Forum zugreifen zu können.";
|
||||
$text_register["must_register_post"]="Sie müssen registriert sein, um einen Artikel schreiben zu können.";
|
||||
$text_register["no_access_group"]="Auf dieses Forum dürfen Sie leider nicht zugreifen";
|
||||
$text_register["no_access_post"]="Leider dürfen Sie in diesem Forum keinen Artikel schreiben.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Afzender:</b> ";
|
||||
$text_header["subject"]="<b>Onderwerp:</b> ";
|
||||
$text_header["newsgroups"]="<b>Nieuwsgroepen:</b> ";
|
||||
$text_header["followup"]="<b>Antwoord-naar:</b> ";
|
||||
$text_header["organization"]="<b>Organisatie:</b> ";
|
||||
$text_header["date"]="<b>Datum:</b> ";
|
||||
$text_header["message-id"]="<b>Bericht-ID:</b> ";
|
||||
$text_header["references"]="<b>Referenties:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="d M Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Geen artikelen beschikbaar</b></p>";
|
||||
$text_thread["button_write"]="Schrijf";
|
||||
$text_thread["button_grouplist"]="Nieuwsgroepen";
|
||||
$text_thread["button_top"]="Terug naar boven";
|
||||
$text_thread["date"]="<b>Datum</b>";
|
||||
$text_thread["subject"]="<b>Onderwerp</b>";
|
||||
$text_thread["author"]="<b>Auteur</b>";
|
||||
$text_thread["no_such_group"]="Groep bestaat niet.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Nieuwsgroep</b>";
|
||||
$text_groups["description"]="<b>Beschrijving</b>";
|
||||
|
||||
$text_article["button_answer"]="Antwoord";
|
||||
|
||||
$text_post["missing_message"]="Je moet een bericht schrijven om te posten.";
|
||||
$text_post["missing_email"]="Je moet een e-mailadres invullen.";
|
||||
$text_post["missing_name"]="Je moet je naam, of tenminste een alias invullen.";
|
||||
$text_post["missing_subject"]="Je moet een onderwerp invullen.";
|
||||
$text_post["button_post"]="Post";
|
||||
$text_post["remember"]="Onthoud naam en e-mailadres";
|
||||
$text_post["message"]="Bericht";
|
||||
$text_post["group_head"]="Schrijf bericht voor ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Je bent niet gemachtigd om te posten in de groepen:";
|
||||
$text_post["message_posted"]="Bericht gepost";
|
||||
$text_post["message_posted2"]="Het bericht is succesvol gepost.";
|
||||
$text_post["button_back"]="Terug";
|
||||
$text_post["button_back2"]="naar";
|
||||
$text_post["error_newsserver"]="De nieuwsserver accepteert het bericht niet:";
|
||||
$text_post["error_readonly"]="Deze groep is alleen-lezen.";
|
||||
$text_post["error_wrong_email"]="Het e-mail adres is verkeerd";
|
||||
|
||||
$text_error["error:"]='<font color="red">Fout:</font>';
|
||||
$text_error["connection_failed"]="De verbinding met nieuwsserver is mislukt";
|
||||
$text_error["article_not_found"]="<p>Dit artikel bestaat niet.</p>";
|
||||
$text_error["read_access_denied"]="<p>Geen rechten om te lezen!</p>";
|
||||
$text_error["post_failed"]="Verbinding mislukt. Probeer de pagine opnieuw in te laden.";
|
||||
$text_error["auth_error"]="Authenticatie op de nieuwsserver is mislukt.";
|
||||
$text_error["spool_error"]="Fout in het spooler bestand. Laad de pagina opnieuw.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>From:</b> ";
|
||||
$text_header["subject"]="<b>Subject:</b> ";
|
||||
$text_header["newsgroups"]="<b>Newsgroups:</b> ";
|
||||
$text_header["followup"]="<b>Followup:</b> ";
|
||||
$text_header["organization"]="<b>Organization:</b> ";
|
||||
$text_header["date"]="<b>Date:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="D, j M Y H:i T";
|
||||
$text_header["attachments"]="<b>Attachments:</b> ";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>No articles available</b></p>";
|
||||
$text_thread["button_write"]="new thread";
|
||||
$text_thread["button_grouplist"]="newsgroups";
|
||||
$text_thread["button_latest"]="view latest";
|
||||
$text_thread["button_overboard"]="overboard";
|
||||
$text_thread["button_search"]="search";
|
||||
$text_thread["button_top"]="Back to Top";
|
||||
$text_thread["date"]="<b>Date</b>";
|
||||
$text_thread["subject"]="<b>Subject</b>";
|
||||
$text_thread["threadsize"]="<b>Replies</b>";
|
||||
$text_thread["author"]="<b>Author</b>";
|
||||
$text_thread["lastmessage"]="<b>Last Message</b>";
|
||||
$text_thread["no_such_group"]="No such Group.";
|
||||
$text_thread["pages"]="Pages:";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Newsgroup</b>";
|
||||
$text_groups["description"]="<b>Description</b>";
|
||||
|
||||
$text_article["back_to_group"]="article list";
|
||||
$text_article["refresh"]="refresh";
|
||||
$text_article["button_answer"]="Reply";
|
||||
$text_article["button_cancel"]="Delete";
|
||||
$text_article["block-xnoarchive"]="This system is not an archive, but the
|
||||
administrator of this system decided to block postings, where the author
|
||||
doesn't want archivation.";
|
||||
$text_article["full_article"]="Click here to read the complete article";
|
||||
|
||||
$text_post["name"]="Username:";
|
||||
$text_post["password"]="Password:";
|
||||
$text_post["email"]="Your E-Mail:";
|
||||
$text_post["missing_message"]="You must include a message to post.";
|
||||
$text_post["missing_email"]="You must include an email address.";
|
||||
$text_post["missing_name"]="You must include a name or at least an alias.";
|
||||
$text_post["missing_subject"]="You must include a subject.";
|
||||
$text_post["button_post"]="Post Article";
|
||||
$text_post["remember"]="Remember name";
|
||||
$text_post["message"]="Message";
|
||||
$text_post["group_head"]="Compose article for ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="You aren't allowed to post to the groups:";
|
||||
$text_post["message_posted"]="Message posted";
|
||||
$text_post["message_posted2"]="The message was successfully posted.";
|
||||
$text_post["button_back"]="Back";
|
||||
$text_post["button_back2"]="to";
|
||||
$text_post["error_newsserver"]="The newsserver does not accept the message:";
|
||||
$text_post["error_readonly"]="The group is write protected";
|
||||
$text_post["error_wrong_email"]="The email adress is wrong";
|
||||
$text_post["wrote_prefix"]="";
|
||||
$text_post["wrote_suffix"]=" wrote:";
|
||||
$text_post["quote"]="Quote";
|
||||
$text_post["captchafail"]='You failed the CAPTCHA test. Please try again';
|
||||
$text_post["captchainfo1"]='retype that here';
|
||||
$text_post["captchainfo2"]='Enter the correct letters and numbers from the image into the text box. This small test serves as access restriction against spam-bots.';
|
||||
|
||||
|
||||
$text_error["error:"]='<font color="red">Error:</font>';
|
||||
$text_error["connection_failed"]="The connection to the Newsserver failed";
|
||||
$text_error["article_not_found"]="<p>The article doesn't exist.</p>";
|
||||
$text_error["read_access_denied"]="<p>No permission to read!</p>";
|
||||
$text_error["post_failed"]="Connection failed. Try to reload later.";
|
||||
$text_error["auth_error"]="Authentication at the Newsserver failed.";
|
||||
$text_error["spool_error"]="Error in spoolfile. Please reload.";
|
||||
|
||||
$text_register["must_register_group"]="You have to be registered to have access to this newsgroup";
|
||||
$text_register["must_register_post"]="You have to be registrered to post to this newsgroup";
|
||||
$text_register["no_access_group"]="You don't have access to this newsgroup";
|
||||
$text_register["no_access_post"]="You are not allowed to post to this newsgroup";
|
||||
|
||||
?>
|
|
@ -0,0 +1,75 @@
|
|||
<?
|
||||
$text_header["from"]="<b>From:</b> ";
|
||||
$text_header["subject"]="<b>Subject:</b> ";
|
||||
$text_header["newsgroups"]="<b>Newsgroups:</b> ";
|
||||
$text_header["followup"]="<b>Followup:</b> ";
|
||||
$text_header["organization"]="<b>Organization:</b> ";
|
||||
$text_header["date"]="<b>Date:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
$text_header["attachments"]="<b>Attachments:</b> ";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>No articles available</b></p>";
|
||||
$text_thread["button_write"]="New Thread";
|
||||
$text_thread["button_grouplist"]="Newsgroups";
|
||||
$text_thread["button_top"]="Back to Top";
|
||||
$text_thread["date"]="<b>Date</b>";
|
||||
$text_thread["subject"]="<b>Subject</b>";
|
||||
$text_thread["threadsize"]="<b>#</b>";
|
||||
$text_thread["author"]="<b>Author</b>";
|
||||
$text_thread["no_such_group"]="No such Group.";
|
||||
$text_thread["pages"]="Pages:";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Newsgroup</b>";
|
||||
$text_groups["description"]="<b>Description</b>";
|
||||
|
||||
$text_article["button_answer"]="Reply";
|
||||
$text_article["button_cancel"]="Delete";
|
||||
$text_article["block-xnoarchive"]="This system is not an archive, but the
|
||||
administrator of this system decided to block postings, where the author
|
||||
doesn't want archivation.";
|
||||
$text_article["full_article"]="Click here to read the complete article";
|
||||
|
||||
$text_post["name"]="Your Name:";
|
||||
$text_post["email"]="Your E-Mail:";
|
||||
$text_post["missing_message"]="You must include a message to post.";
|
||||
$text_post["missing_email"]="You must include an email address.";
|
||||
$text_post["missing_name"]="You must include a name or at least an alias.";
|
||||
$text_post["missing_subject"]="You must include a subject.";
|
||||
$text_post["button_post"]="Post";
|
||||
$text_post["remember"]="Remember name and email address";
|
||||
$text_post["message"]="Message";
|
||||
$text_post["group_head"]="Compose article for ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="You aren't allowed to post to the groups:";
|
||||
$text_post["message_posted"]="Message posted";
|
||||
$text_post["message_posted2"]="The message was successfully posted.";
|
||||
$text_post["button_back"]="Back";
|
||||
$text_post["button_back2"]="to";
|
||||
$text_post["error_newsserver"]="The newsserver does not accept the message:";
|
||||
$text_post["error_readonly"]="The group is write protected";
|
||||
$text_post["error_wrong_email"]="The email adress is wrong";
|
||||
$text_post["wrote_prefix"]="";
|
||||
$text_post["wrote_suffix"]=" wrote:";
|
||||
$text_post["quote"]="Quote";
|
||||
$text_post["captchafail"]='You failed the CAPTCHA test. Please try again';
|
||||
$text_post["captchainfo1"]='retype that here';
|
||||
$text_post["captchainfo2"]='Enter the correct letters and numbers from the image into the text box. This small test serves as access restriction against spam-bots.';
|
||||
|
||||
|
||||
$text_error["error:"]='<font color="red">Error:</font>';
|
||||
$text_error["connection_failed"]="The connection to the Newsserver failed";
|
||||
$text_error["article_not_found"]="<p>The article doesn't exist.</p>";
|
||||
$text_error["read_access_denied"]="<p>No permission to read!</p>";
|
||||
$text_error["post_failed"]="Connection failed. Try to reload later.";
|
||||
$text_error["auth_error"]="Authentifikation at the Newsserver failed.";
|
||||
$text_error["spool_error"]="Error in spoolfile. Please reload.";
|
||||
|
||||
$text_register["must_register_group"]="You have to be registered to have access to this newsgroup";
|
||||
$text_register["must_register_post"]="You have to be registrered to post to this newsgroup";
|
||||
$text_register["no_access_group"]="You don't have access to this newsgroup";
|
||||
$text_register["no_access_post"]="You are not allowed to post to this newsgroup";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Lähettäjä:</b> ";
|
||||
$text_header["subject"]="<b>Otsikko:</b> ";
|
||||
$text_header["newsgroups"]="<b>Uutisryhmät:</b> ";
|
||||
$text_header["followup"]="<b>Vastaa:</b> ";
|
||||
$text_header["organization"]="<b>Organisaatio:</b> ";
|
||||
$text_header["date"]="<b>Päivämäärä:</b> ";
|
||||
$text_header["message-id"]="<b>Viestin ID:</b> ";
|
||||
$text_header["references"]="<b>Referenssit:</b> ";
|
||||
$text_header["user-agent"]="<b>Käyttäjäohjelmisto:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Ei artikkeleita</b></p>";
|
||||
$text_thread["button_write"]="Kirjoita";
|
||||
$text_thread["button_grouplist"]="Uutisryhmät";
|
||||
$text_thread["button_top"]="Takaisin";
|
||||
$text_thread["date"]="<b>Päivämäärä</b>";
|
||||
$text_thread["subject"]="<b>Otsikko</b>";
|
||||
$text_thread["author"]="<b>Tekijä</b>";
|
||||
$text_thread["no_such_group"]="Ryhmää ei ole";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Uutisryhmä</b>";
|
||||
$text_groups["description"]="<b>Kuvaus</b>";
|
||||
|
||||
$text_article["button_answer"]="Vastaa";
|
||||
|
||||
$text_post["missing_message"]="Viestiosa on tyhjä";
|
||||
$text_post["missing_email"]="Sähköpostiosoitteesi puuttuu";
|
||||
$text_post["missing_name"]="Nimi tai alias puuttuu";
|
||||
$text_post["missing_subject"]="Otsikko puuttuu";
|
||||
$text_post["button_post"]="Lähetä";
|
||||
$text_post["remember"]="Muista nimi ja sähköpostiosoite";
|
||||
$text_post["message"]="Viesti";
|
||||
$text_post["group_head"]="Lähetä artikkeli ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Sinulla ei ole oikeuttaa lähettää viestejä ryhmiin:";
|
||||
$text_post["message_posted"]="Viesti lähetetty";
|
||||
$text_post["message_posted2"]="Viesti lähetetty onnistuneesti";
|
||||
$text_post["button_back"]="Takaisin";
|
||||
$text_post["button_back2"]="kenelle";
|
||||
$text_post["error_newsserver"]="Uutispalvelin ei hyväksy viestiä:";
|
||||
$text_post["error_readonly"]="Ryhmä on kirjoitussuojattu";
|
||||
$text_post["error_wrong_email"]="Virheellinen sähköpostiosoite";
|
||||
|
||||
$text_error["error:"]='<font color="red">Virhe:</font>';
|
||||
$text_error["connection_failed"]="Ei yhteyttä uutispalvelimeen";
|
||||
$text_error["article_not_found"]="<p>Artikkelia ei ole.</p>";
|
||||
$text_error["read_access_denied"]="<p>Ei oikeutta lukea!</p>";
|
||||
$text_error["post_failed"]="Yhteys epäonnistui. Kokeile myöhemmin uudelleen.";
|
||||
$text_error["auth_error"]="Käyttäjätunnistus palvelimella epäonnistui.";
|
||||
$text_error["spool_error"]="Virhe spool-tiedostossa. Lataa uudelleen (reload).";
|
||||
|
||||
?>
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>De:</b> ";
|
||||
$text_header["subject"]="<b>Sujet:</b> ";
|
||||
$text_header["newsgroups"]="<b>Groupes:</b> ";
|
||||
$text_header["followup"]="<b>Suivi-à:</b> ";
|
||||
$text_header["organization"]="<b>Organisation:</b> ";
|
||||
$text_header["date"]="<b>Date:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="d. M Y, H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Pas d'articles</b></p>";
|
||||
$text_thread["button_write"]="Poster";
|
||||
$text_thread["button_grouplist"]="Liste des Groupes";
|
||||
$text_thread["button_top"]="Haut de page";
|
||||
$text_thread["date"]="<b>Date</b>";
|
||||
$text_thread["subject"]="<b>Sujet</b>";
|
||||
$text_thread["author"]="<b>Auteur</b>";
|
||||
$text_thread["no_such_group"]="Aucun groupe.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Groupe</b>";
|
||||
$text_groups["description"]="<b>Description</b>";
|
||||
|
||||
$text_article["button_answer"]="Répondre";
|
||||
|
||||
$text_error["error:"]='<font color="red">Erreur:</font>';
|
||||
$text_error["connection_failed"]="La connexion au serveur de news a échoué";
|
||||
$text_error["article_not_found"]="<p>L'article n'existe pas.</p>";
|
||||
$text_error["read_access_denied"]="<p>Lecture non autorisée!</p>";
|
||||
$text_error["post_failed"]="Le serveur de news ne répond pas. Réessayez plus tard.";
|
||||
$text_error["auth_error"]="L'authentification auprès du serveur de news a échoué.";
|
||||
$text_error["spool_error"]="Erreur dans le fichier de spool. Rechargez la page.";
|
||||
|
||||
$text_post["missing_message"]="Vous devez inclure du texte dans votre message.";
|
||||
$text_post["missing_email"]="Vous devez préciser une adresse email.";
|
||||
$text_post["missing_name"]="Vous devez préciser un nom ou au moins un surnom.";
|
||||
$text_post["missing_subject"]="Vous devez préciser un sujet.";
|
||||
$text_post["button_post"]="Poster";
|
||||
$text_post["remember"]="Retenir le nom et l'adresse email";
|
||||
$text_post["message"]="Message";
|
||||
$text_post["group_head"]="Rédiger un article pour ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Vous n'êtes pas autorisé à poster dans les groupes :";
|
||||
$text_post["message_posted"]="Article posté";
|
||||
$text_post["message_posted2"]="L'article a été posté avec succès.";
|
||||
$text_post["button_back"]="Retour";
|
||||
$text_post["button_back2"]="à";
|
||||
$text_post["error_newsserver"]="Le serveur de news n'accepte pas l'article :";
|
||||
$text_post["error_readonly"]="Le groupe est protégé en écriture";
|
||||
$text_post["error_wrong_email"]="L'adresse email est invalide";
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Da:</b> ";
|
||||
$text_header["subject"]="<b>Subject:</b> ";
|
||||
$text_header["newsgroups"]="<b>Newsgroup:</b> ";
|
||||
$text_header["followup"]="<b>Followup:</b> ";
|
||||
$text_header["organization"]="<b>Organizzazione:</b> ";
|
||||
$text_header["date"]="<b>Data:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Non ci sono articoli</b></p>";
|
||||
$text_thread["button_write"]="Scrivi un messaggio";
|
||||
$text_thread["button_grouplist"]="Newsgroup";
|
||||
$text_thread["button_top"]="Torna su";
|
||||
$text_thread["date"]="<b>Data</b>";
|
||||
$text_thread["subject"]="<b>Subject</b>";
|
||||
$text_thread["author"]="<b>Mittente</b>";
|
||||
$text_thread["no_such_group"]="Gruppo inesistente";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Newsgroup</b>";
|
||||
$text_groups["description"]="<b>Descrizione</b>";
|
||||
|
||||
$text_article["button_answer"]="Rispondi al messaggio";
|
||||
|
||||
$text_post["missing_message"]="Errore: messaggio mancante";
|
||||
$text_post["missing_email"]="Errore: devi specificare l'email";
|
||||
$text_post["missing_name"]="Errore: devi specificare un nome od un alias";
|
||||
$text_post["missing_subject"]="Errore: subject mancante";
|
||||
$text_post["button_post"]="Inserisci";
|
||||
$text_post["remember"]="Ricorda nome ed email";
|
||||
$text_post["message"]="Messaggio";
|
||||
$text_post["group_head"]="Crea articolo per ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Non puoi scrivere nei newsgroup:";
|
||||
$text_post["message_posted"]="Messaggio inserito";
|
||||
$text_post["message_posted2"]="Messaggio inserito con successo.";
|
||||
$text_post["button_back"]="indietro";
|
||||
$text_post["button_back2"]="a";
|
||||
$text_post["error_newsserver"]="Il newsserver non accetta il messaggio:";
|
||||
$text_post["error_readonly"]="Il newsgroup e' protetto da scrittura";
|
||||
$text_post["error_wrong_email"]="e-mail inesistente";
|
||||
|
||||
$text_error["error:"]='<font color="red">Errore:</font>';
|
||||
$text_error["connection_failed"]="Connessione fallita al newsserver";
|
||||
$text_error["article_not_found"]="<p>L'articolo non esiste.</p>";
|
||||
$text_error["read_access_denied"]="<p>Non hai il permesso di lettura!</p>";
|
||||
$text_error["post_failed"]="Connessione fallita. Prova piu' tardi";
|
||||
$text_error["auth_error"]="Autenticazione fallita.";
|
||||
$text_error["spool_error"]="Errore nello spoolfile. Ricarica la pagina.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Fra:</b> ";
|
||||
$text_header["subject"]="<b>Tittel:</b> ";
|
||||
$text_header["newsgroups"]="<b>Nyhetsgrupper:</b> ";
|
||||
$text_header["followup"]="<b>Oppfølging:</b> ";
|
||||
$text_header["organization"]="<b>Organisasjon:</b> ";
|
||||
$text_header["date"]="<b>Dato:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>Referanser:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Ingen artikler tilgjenglig</b></p>";
|
||||
$text_thread["button_write"]="Skriv";
|
||||
$text_thread["button_grouplist"]="Nyhetsgrupper";
|
||||
$text_thread["button_top"]="Tilbake til toppen";
|
||||
$text_thread["date"]="<b>Dato</b>";
|
||||
$text_thread["subject"]="<b>Tittel</b>";
|
||||
$text_thread["author"]="<b>Forfatter</b>";
|
||||
$text_thread["no_such_group"]="Ingen slik gruppe.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Nyhetsgruppe</b>";
|
||||
$text_groups["description"]="<b>Beskrivelse</b>";
|
||||
|
||||
$text_article["button_answer"]="Svar";
|
||||
|
||||
$text_post["missing_message"]="Du må inkludere en melding.";
|
||||
$text_post["missing_email"]="Du må oppgi e-mail addresse.";
|
||||
$text_post["missing_name"]="Du må oppgi navn eller alias.";
|
||||
$text_post["missing_subject"]="Du må ha med tittel.";
|
||||
$text_post["button_post"]="Post";
|
||||
$text_post["remember"]="Husk navn og e-mail addresse";
|
||||
$text_post["message"]="Melding";
|
||||
$text_post["group_head"]="Skriv artikkel for";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Du har ikke rettigheter til å poste her:";
|
||||
$text_post["message_posted"]="Melding postet";
|
||||
$text_post["message_posted2"]="Melding velykket postet.";
|
||||
$text_post["button_back"]="Tilbake";
|
||||
$text_post["button_back2"]="til";
|
||||
$text_post["error_newsserver"]="Nyhets serveren aksepterer ikke meldingen:";
|
||||
$text_post["error_readonly"]="Gruppen er skrivebeskyttet";
|
||||
$text_post["error_wrong_email"]="E-mail addressen er feil";
|
||||
|
||||
$text_error["error:"]='<font color="red">Feil:</font>';
|
||||
$text_error["connection_failed"]="Kunne ikke koble til tjeneren";
|
||||
$text_error["article_not_found"]="<p>Artikkelen eksisterer ikke.</p>";
|
||||
$text_error["read_access_denied"]="<p>Ingen rettigheter til å lese!</p>";
|
||||
$text_error["post_failed"]="Kunne ikke koble til, venneligst prøv senere.";
|
||||
$text_error["auth_error"]="Authentifikation at the Newsserver failed.";
|
||||
$text_error["spool_error"]="Feil i Spoolfile, vennligst prøv igjen.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/* zmień $www_charset w config.inc.php na:
|
||||
* change $www_charset in config.inc.php to:
|
||||
* iso-8859-2
|
||||
*/
|
||||
$text_header["from"]="<b>Od:</b> ";
|
||||
$text_header["subject"]="<b>Temat:</b> ";
|
||||
$text_header["newsgroups"]="<b>Grupa:</b> ";
|
||||
$text_header["followup"]="<b>Odpowiedz do:</b> ";
|
||||
$text_header["organization"]="<b>Organizacja:</b> ";
|
||||
$text_header["date"]="<b>Data:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>Referencje:</b> ";
|
||||
$text_header["user-agent"]="<b>Czytnik:</b> ";
|
||||
$text_header["date_format"]="j.m.Y H:i:s";
|
||||
$text_header["attachments"]="<b>Załączniki:</b> ";
|
||||
|
||||
$text_index["newsgroup_not_avaiable"]="Niedostępna";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Brak artykułów</b></p>";
|
||||
$text_thread["button_write"]="Napisz";
|
||||
$text_thread["button_grouplist"]="Lista grup";
|
||||
$text_thread["button_top"]="Z powrotem na początek";
|
||||
$text_thread["date"]="<b>Data</b>";
|
||||
$text_thread["subject"]="<b>Temat</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="Nie ma takiej grupy.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Grupa</b>";
|
||||
$text_groups["description"]="<b>Opis</b>";
|
||||
|
||||
$text_article["button_answer"]="Odpowiedz";
|
||||
$text_article["button_rawview"]="Źródło wiadomości";
|
||||
$text_article["block-xnoarchive"]="Administrator strony zdecydował, że
|
||||
wiadomości, których autor nie chciał, aby były archiwizowane, nie będą
|
||||
udostępniane. Wiadomość nie może zostć wyświetlona.";
|
||||
|
||||
$text_post["name"]="Twoje Nazwisko:";
|
||||
$text_post["email"]="Twój E-Mail:";
|
||||
$text_post["missing_message"]="Musisz wpisać treść wiadomości.";
|
||||
$text_post["missing_email"]="Musisz podać swój e-mail.";
|
||||
$text_post["missing_name"]="Musisz wpisać imię i nazwisko (a przynajmniej ksywkę).";
|
||||
$text_post["missing_subject"]="Musisz podać temat wiadomości.";
|
||||
$text_post["button_post"]="Wyślij";
|
||||
$text_post["remember"]="Zapamiętaj nazwisko i e-mail";
|
||||
$text_post["message"]="Wiadomość";
|
||||
$text_post["group_head"]="Wyślij wiadomość na grupę ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Nie masz uprawnień do wysyłania wiadomości na grupy:";
|
||||
$text_post["message_posted"]="Wiadomość wysłana";
|
||||
$text_post["message_posted2"]="Wiadomość została wysłana.";
|
||||
$text_post["button_back"]="Z powrotem";
|
||||
$text_post["button_back2"]="do";
|
||||
$text_post["error_newsserver"]="Serwer nie przyjął wiadomości. Komunikat błędu:";
|
||||
$text_post["error_readonly"]="Ta grupa jest tylko do odczytu";
|
||||
$text_post["error_wrong_email"]="Podany adres e-mail jest nieprawidłowy";
|
||||
|
||||
$text_error["error:"]='<font color="red">Błąd:</font>';
|
||||
$text_error["connection_failed"]="Nie udało się nawiązanie połączenia z serwerem Usenetu";
|
||||
$text_error["article_not_found"]="<p>Wiadomość nie istnieje.</p>";
|
||||
$text_error["read_access_denied"]="<p>Brak uprawnień do odczytu!</p>";
|
||||
$text_error["post_failed"]="Połączenie zerwane. Spróbuj ponownie za jakiś czas.";
|
||||
$text_error["auth_error"]="Bład autoryzacji na serwerze.";
|
||||
$text_error["spool_error"]="Błąd w pliku wiadomości. Proszę przeładować stronę..";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>De:</b> ";
|
||||
$text_header["subject"]="<b>Assunto:</b> ";
|
||||
$text_header["newsgroups"]="<b>Newsgroups:</b> ";
|
||||
$text_header["followup"]="<b>Seguimento:</b> ";
|
||||
$text_header["organization"]="<b>Organização:</b> ";
|
||||
$text_header["date"]="<b>Data:</b> ";
|
||||
$text_header["message-id"]="<b>Menssagem-ID:</b> ";
|
||||
$text_header["references"]="<b>Referências:</b> ";
|
||||
$text_header["user-agent"]="<b>Utilizador-Agente:</b> ";
|
||||
$text_header["date_format"]="d M Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Não existem artigos disponiveis</b></p>";
|
||||
$text_thread["button_write"]="Escrever";
|
||||
$text_thread["button_grouplist"]="Newsgroups";
|
||||
$text_thread["button_top"]="Voltar acima";
|
||||
$text_thread["date"]="<b>Data</b>";
|
||||
$text_thread["subject"]="<b>Assunto</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="Grupo não existente.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Newsgroup</b>";
|
||||
$text_groups["description"]="<b>Descrição</b>";
|
||||
|
||||
$text_article["button_answer"]="Resposta";
|
||||
|
||||
$text_post["missing_message"]="Deve incluir uma menssagem para enviar";
|
||||
$text_post["missing_email"]="Deve incluir o seu endereço de Correio Electronico";
|
||||
$text_post["missing_name"]="Deve incluir o seu nome ou pseudonimo";
|
||||
$text_post["missing_subject"]="Deve incluir um assunto";
|
||||
$text_post["button_post"]="Enviar";
|
||||
$text_post["remember"]="Lembrar nome e Correio-E";
|
||||
$text_post["message"]="Menssagem";
|
||||
$text_post["group_head"]="Compor artigo para ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Não é permitido enviar artigos:";
|
||||
$text_post["message_posted"]="Menssagem enviada";
|
||||
$text_post["message_posted2"]="A menssagem foi enviada com sucesso";
|
||||
$text_post["button_back"]="Voltar";
|
||||
$text_post["button_back2"]="para";
|
||||
$text_post["error_newsserver"]="O servidor de news não aceita a menssagem:";
|
||||
$text_post["error_readonly"]="O grupo está protegido contra escrita";
|
||||
$text_post["error_wrong_email"]="O endereço do Correio-E está errado";
|
||||
|
||||
$text_error["error:"]='<font color="red">Erro:</font>';
|
||||
$text_error["connection_failed"]="A conexão com o servidor de news falhow";
|
||||
$text_error["article_not_found"]="<p>O artigo não existe.</p>";
|
||||
$text_error["read_access_denied"]="<p>Não tem permissão para ler!</p>";
|
||||
$text_error["post_failed"]="Conexão falhada. Tente novamente mais tarde.";
|
||||
$text_error["auth_error"]="Autenticação no servidor de news falhou";
|
||||
$text_error["spool_error"]="Erro no spoolfile. Por favor refresque o navegador.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>ïÔ:</b> ";
|
||||
$text_header["subject"]="<b>ôÅÍÁ:</b> ";
|
||||
$text_header["newsgroups"]="<b>çÒÕÐÐÙ ÎÏ×ÏÓÔÅÊ:</b> ";
|
||||
$text_header["followup"]="<b>Followup:</b> ";
|
||||
$text_header["organization"]="<b>ïÒÇÁÎÉÚÁÃÉÑ:</b> ";
|
||||
$text_header["date"]="<b>äÁÔÁ:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>óÓÙÌËÉ:</b> ";
|
||||
$text_header["user-agent"]="<b>ðÒÏÇÒÁÍÍÁ:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>óÏÏÂÝÅÎÉÊ ÎÅÔ</b></p>";
|
||||
$text_thread["button_write"]="ðÉÓÁÔØ";
|
||||
$text_thread["button_grouplist"]="çÒÕÐÐÙ ÎÏ×ÏÓÔÅÊ";
|
||||
$text_thread["button_top"]="îÁ×ÅÒÈ";
|
||||
$text_thread["date"]="<b>äÁÔÁ</b>";
|
||||
$text_thread["subject"]="<b>ôÅÍÁ</b>";
|
||||
$text_thread["author"]="<b>á×ÔÏÒ</b>";
|
||||
$text_thread["no_such_group"]="îÅÔ ÔÁËÏÊ ÇÒÕÐÐÙ.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>çÒÕÐÐÁ ÎÏ×ÏÓÔÅÊ</b>";
|
||||
$text_groups["description"]="<b>ïÐÉÓÁÎÉÅ</b>";
|
||||
|
||||
$text_article["button_answer"]="ïÔ×ÅÔÉÔØ";
|
||||
|
||||
$text_post["missing_message"]="ðÕÓÔÙÅ ÓÏÏÂÝÅÎÉÑ ÎÅ ÏÔÐÒÁ×ÌÑÀÔÓÑ.";
|
||||
$text_post["missing_email"]="îÅÏÂÈÏÄÉÍÏ ÕËÁÚÁÔØ ÁÄÒÅÓ üÌ. ðÏÞÔÙ.";
|
||||
$text_post["missing_name"]="îÅÏÂÈÏÄÉÍÏ ÕËÁÚÁÔØ éÍÑ ÉÌÉ ÈÏÔÑ-ÂÙ ðÓÅ×ÄÏÎÉÍ.";
|
||||
$text_post["missing_subject"]="îÅÏÂÈÏÄÉÍÏ ÕËÁÚÁÔØ ôÅÍÕ.";
|
||||
$text_post["button_post"]="ïÔÐÒÁ×ÉÔØ";
|
||||
$text_post["remember"]="úÁÐÏÍÎÉÔØ ÉÍÑ É E-Mail";
|
||||
$text_post["message"]="óÏÏÂÝÅÎÉÅ";
|
||||
$text_post["group_head"]="ðÏÄÇÏÔÏ×ËÁ ÓÏÏÂÝÅÎÉÑ × ÇÒÕÐÐÕ ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="÷ÁÍ ÎÅ ÒÁÚÒÅÛÅÎÏ ÏÔÐÒÁ×ÌÑÔØ × ÜÔÉ ÇÒÕÐÐÙ:";
|
||||
$text_post["message_posted"]="óÏÏÂÝÅÎÉÅ ÏÔÐÒÁ×ÌÅÎÏ";
|
||||
$text_post["message_posted2"]="÷ÁÛÅ ÓÏÏÂÝÅÎÉÅ ÂÙÌÏ ÕÓÐÅÛÎÏ ÏÔÐÒÁ×ÌÅÎÏ.";
|
||||
$text_post["button_back"]="îÁÚÁÄ";
|
||||
$text_post["button_back2"]="Ë";
|
||||
$text_post["error_newsserver"]="óÅÒ×ÅÒ ÎÏ×ÏÓÔÅÊ ÎÅ ÐÒÉÎÑÌ ÓÏÏÂÝÅÎÉÅ:";
|
||||
$text_post["error_readonly"]="üÔÁ ÇÒÕÐÐÁ ÎÏ×ÏÓÔÅÊ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ";
|
||||
$text_post["error_wrong_email"]="îÅÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ üÌ. ðÏÞÔÙ";
|
||||
|
||||
$text_error["error:"]='<font color="red">ïÛÉÂËÁ:</font>';
|
||||
$text_error["connection_failed"]="ïÔËÁÚ ÓÏÅÄÉÎÅÎÉÑ Ó ÓÅÒ×ÅÒÏÍ ÎÏ×ÏÓÔÅÊ";
|
||||
$text_error["article_not_found"]="<p>ôÁËÏÇÏ ÓÏÏÂÝÅÎÉÑ ÎÅÔ.</p>";
|
||||
$text_error["read_access_denied"]="<p>þÔÅÎÉÅ ÎÅ ÒÁÚÒÅÛÅÎÏ!</p>";
|
||||
$text_error["post_failed"]="ïÔËÁÚ ÓÏÅÄÉÎÅÎÉÑ. ðÏÐÒÏÂÕÊ ÏÂÎÏ×ÉÔØ (Reload) ÐÏÚÄÎÅÅ.";
|
||||
$text_error["auth_error"]="ïÔËÁÚ ÁÕÔÅÎÔÉÆÉËÁÃÉÉ ÎÁ ÓÅÒ×ÅÒÅ ÎÏ×ÏÓÔÅÊ.";
|
||||
$text_error["spool_error"]="ïÛÉÂËÁ × ÂÕÆÅÒÎÏÍ ÆÁÊÌÅ. ðÏÖÁÌÕÊÓÔÁ, ÏÂÎÏ×ÉÔÅ (Reload).";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Avtor:</b> ";
|
||||
$text_header["subject"]="<b>Tema:</b> ";
|
||||
$text_header["newsgroups"]="<b>Skupina:</b> ";
|
||||
$text_header["followup"]="<b>Odgovor v:</b> ";
|
||||
$text_header["organization"]="<b>Organizacija:</b> ";
|
||||
$text_header["date"]="<b>Datum:</b> ";
|
||||
$text_header["message-id"]="<b>Message-ID:</b> ";
|
||||
$text_header["references"]="<b>References:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Ni sporocil</b></p>";
|
||||
$text_thread["button_write"]="Novo sporocilo";
|
||||
$text_thread["button_grouplist"]="Skupine";
|
||||
$text_thread["button_top"]="Na vrh";
|
||||
$text_thread["date"]="<b>Datum</b>";
|
||||
$text_thread["subject"]="<b>Tema</b>";
|
||||
$text_thread["author"]="<b>Avtor</b>";
|
||||
$text_thread["no_such_group"]="Skupina ne obstaja";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Skupina</b>";
|
||||
$text_groups["description"]="<b>Opis</b>";
|
||||
|
||||
$text_article["button_answer"]="Odgovori";
|
||||
|
||||
$text_post["missing_message"]="Manjka vsebina sporocila.";
|
||||
$text_post["missing_email"]="Manjka vas postni naslov.";
|
||||
$text_post["missing_name"]="Manjka vase ime.";
|
||||
$text_post["missing_subject"]="Manjka tema sporocila.";
|
||||
$text_post["button_post"]="Poslji";
|
||||
$text_post["remember"]="Shrani ime in postni naslov";
|
||||
$text_post["message"]="Sporocilo:";
|
||||
$text_post["group_head"]="Napisi sporocilo v ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="V to skupino ne morete pisati:";
|
||||
$text_post["message_posted"]="Sporocilo poslano";
|
||||
$text_post["message_posted2"]="Sporocilo je bilo uspesno poslano.";
|
||||
$text_post["button_back"]="Nazaj";
|
||||
$text_post["button_back2"]="na";
|
||||
$text_post["error_newsserver"]="Streznik ne sprejme sporocila:";
|
||||
$text_post["error_readonly"]="Skupina je read-only";
|
||||
$text_post["error_wrong_email"]="Postni naslov je napacen";
|
||||
|
||||
$text_error["error:"]='<font color="red">Napaka:</font>';
|
||||
$text_error["connection_failed"]="Povezava z streznikom ni bila uspesna.";
|
||||
$text_error["article_not_found"]="<p>Sporocilo ne obstaja.</p>";
|
||||
$text_error["read_access_denied"]="<p>Branje ni dovoljeno!</p>";
|
||||
$text_error["post_failed"]="Povezava prekinjena. Poskusite kasneje.";
|
||||
$text_error["auth_error"]="Avtorizacija neuspesna.";
|
||||
$text_error["spool_error"]="Napaka na strezniku. Poskusite osveziti stran.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>De:</b> ";
|
||||
$text_header["subject"]="<b>Asunto:</b> ";
|
||||
$text_header["newsgroups"]="<b>Foro:</b> ";
|
||||
$text_header["followup"]="<b>Responder a:</b> ";
|
||||
$text_header["organization"]="<b>Organisación:</b> ";
|
||||
$text_header["date"]="<b>Fecha:</b> ";
|
||||
$text_header["message-id"]="<b>Mensage-ID:</b> ";
|
||||
$text_header["references"]="<b>Referencia:</b> ";
|
||||
$text_header["user-agent"]="<b>User-Agent:</b> ";
|
||||
$text_header["date_format"]="d. M Y, H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Ningún Artículo</b></p>";
|
||||
$text_thread["button_write"]="Escribir";
|
||||
$text_thread["button_grouplist"]="Al Foro-Lista";
|
||||
$text_thread["button_top"]="Hacia Arriba";
|
||||
$text_thread["date"]="<b>Fecha</b>";
|
||||
$text_thread["subject"]="<b>Tema</b>";
|
||||
$text_thread["author"]="<b>Autor</b>";
|
||||
$text_thread["no_such_group"]="El grupo no existe.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>News-grupo</b>";
|
||||
$text_groups["description"]="<b>Descripción</b>";
|
||||
|
||||
$text_article["button_answer"]="Responder";
|
||||
|
||||
$text_post["missing_message"]="Naturalmente debes ingresar un texto como cuerpo de la noticia.";
|
||||
$text_post["missing_email"]="La dirección de eMail debe ser ingresada.";
|
||||
$text_post["missing_name"]="Debes mínimo ingresar un nombre, puede ser tambien un NickName.";
|
||||
$text_post["missing_subject"]="El Asunto es necesario para enviar la noticia.";
|
||||
$text_post["button_post"]="Enviar";
|
||||
$text_post["remember"]="Nombre y eMail enviado";
|
||||
$text_post["message"]="Noticia";
|
||||
$text_post["group_head"]="Siguiete Artículo ";
|
||||
$text_post["group_tail"]=" Escribir";
|
||||
$text_post["followup_not_allowed"]="No tenes permisos en el grupo correspondiente a este Artículo. Por lo tanto no tenes tampoco permiso para contestar :";
|
||||
$text_post["message_posted"]="Noticia Enviada";
|
||||
$text_post["message_posted2"]="La noticia fue enviada exitosamente!";
|
||||
$text_post["button_back"]="Volver";
|
||||
$text_post["button_back2"]="siguiente";
|
||||
$text_post["error_newsserver"]="La noticia fue con el siguiente error del Newsserver devuelta:";
|
||||
$text_post["error_readonly"]="Sin permisos de escritura";
|
||||
$text_post["error_wrong_email"]="La dirección de Email ingresada no es correcta. Ingrese la misma nuevamente.";
|
||||
|
||||
$text_error["error:"]='<font color="red">Error:</font>';
|
||||
$text_error["connection_failed"]="Hubo problemas al intentar contactar el Newsserver";
|
||||
$text_error["article_not_found"]="<p>El Artículo no Existe.</p>";
|
||||
$text_error["read_access_denied"]="<p>Sin permisos de Lectura!</p>";
|
||||
$text_error["post_failed"]="Conexión al servidor con complicaciones. Por favor trate de cargar la Pagina nuevamente mas tarde.";
|
||||
$text_error["auth_error"]="Authentificación en el Newsserver con problemas. Intente nuevamente.";
|
||||
$text_error["spool_error"]="Error en Archivo Spool. Carge de nuevo la Página.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$text_header["from"]="<b>Kimden:</b> ";
|
||||
$text_header["subject"]="<b>Konu:</b> ";
|
||||
$text_header["newsgroups"]="<b>Haber gruplari:</b> ";
|
||||
$text_header["followup"]="<b>Üyelik:</b> ";
|
||||
$text_header["organization"]="<b>Organizasyon:</b> ";
|
||||
$text_header["date"]="<b>Gün:</b> ";
|
||||
$text_header["message-id"]="<b>Mesaj-ID:</b> ";
|
||||
$text_header["references"]="<b>Referanslar:</b> ";
|
||||
$text_header["user-agent"]="<b>Kullanici:</b> ";
|
||||
$text_header["date_format"]="M d Y H:i:s";
|
||||
|
||||
$text_thread["no_articles"]="<p><b>Makale mevcut degil</b></p>";
|
||||
$text_thread["button_write"]="Yaz";
|
||||
$text_thread["button_grouplist"]="Haber gruplari";
|
||||
$text_thread["button_top"]="Üste Dön";
|
||||
$text_thread["date"]="<b>Gün</b>";
|
||||
$text_thread["subject"]="<b>Konu</b>";
|
||||
$text_thread["author"]="<b>Yazar</b>";
|
||||
$text_thread["no_such_group"]="Böyle bir grup yok.";
|
||||
|
||||
$text_groups["newsgroup"]="<b>Haber Grubu</b>";
|
||||
$text_groups["description"]="<b>Tanimlama</b>";
|
||||
|
||||
$text_article["button_answer"]="Yanitla";
|
||||
|
||||
$text_post["missing_message"]="Mesaji postalamak için birsey yazmak zorundasiniz.";
|
||||
$text_post["missing_email"]="Bir e-posta adresi girmelisiniz.";
|
||||
$text_post["missing_name"]="Adinizi yada lakabinizi girmelisiniz.";
|
||||
$text_post["missing_subject"]="Bir konu basligi girmelisiniz.";
|
||||
$text_post["button_post"]="Postala";
|
||||
$text_post["remember"]="Adi ve e-posta adresini kaydet";
|
||||
$text_post["message"]="Mesaj";
|
||||
$text_post["group_head"]="Makale yaz ";
|
||||
$text_post["group_tail"]="";
|
||||
$text_post["followup_not_allowed"]="Bu gruplara postalamaya yetkili degilsiniz:";
|
||||
$text_post["message_posted"]="Mesaj gönderildi";
|
||||
$text_post["message_posted2"]="Mesaj basariyla gönderildi.";
|
||||
$text_post["button_back"]="Geri";
|
||||
$text_post["button_back2"]="Kime";
|
||||
$text_post["error_newsserver"]="Haber grubu sunucusu bu mesaji kabul etmedi:";
|
||||
$text_post["error_readonly"]="Bu Grup yazma korumalidir";
|
||||
$text_post["error_wrong_email"]="Geçerli bir e-posta adresi girmediniz";
|
||||
|
||||
$text_error["error:"]='<font color="red">Hata:</font>';
|
||||
$text_error["connection_failed"]="Haber Grubu sunucusuna baglanilamadi";
|
||||
$text_error["article_not_found"]="<p>Böyle bir makale yok.</p>";
|
||||
$text_error["read_access_denied"]="<p>Okuma izniniz yok!</p>";
|
||||
$text_error["post_failed"]="Baglanti koptu. Tekrar deneyin.";
|
||||
$text_error["auth_error"]="Kullanici kimligi denetimi basarisiz.";
|
||||
$text_error["spool_error"]="spoolfile dosyasinda hata. Lütfen tekrar yükleyin.";
|
||||
|
||||
?>
|
|
@ -0,0 +1,48 @@
|
|||
# Apply this patch to the 'captcha.php' script to get built-in
|
||||
# that disables the check automatically for two weeks (it sets
|
||||
# a validation cookie).
|
||||
#
|
||||
# patch < +cookie.patch
|
||||
#
|
||||
#
|
||||
--- captcha.php 2005-08-09 09:41:09.000000000 +0000
|
||||
+++ captcha+cookies.php 2005-08-09 09:42:36.000000000 +0000
|
||||
@@ -25,6 +25,7 @@
|
||||
define("CAPTCHA_INVERSE", 0); // white or black(=1)
|
||||
define("CAPTCHA_TIMEOUT", 5000); // in seconds (=max 4 hours)
|
||||
define("CAPTCHA_MAXSIZE", 4500); // preferred image size
|
||||
+define("CAPTCHA_COOKIE", "captcha_solved"); // to unlock captcha protection
|
||||
define("CAPTCHA_DATA_URLS", 0); // RFC2397-URLs exclude MSIE users
|
||||
define("CAPTCHA_TEMP_DIR", "/tmp/captcha");
|
||||
define("CAPTCHA_BASE_URL", "http://$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]/" . substr(realpath(__FILE__), strlen($_SERVER["DOCUMENT_ROOT"])));
|
||||
@@ -38,9 +39,17 @@
|
||||
verify input, @returns boolean
|
||||
*/
|
||||
function check() {
|
||||
+ $to = (int)(time()/1000000);
|
||||
+ if ($_COOKIE[CAPTCHA_COOKIE] == $to) {
|
||||
+ return(true);
|
||||
+ }
|
||||
if (($hash = $_REQUEST["captcha_hash"])
|
||||
and ($pw = trim($_REQUEST["captcha_input"]))) {
|
||||
- return((captcha::hash($pw)==$hash) || (captcha::hash($pw,-1)==$hash));
|
||||
+ $r = (captcha::hash($pw)==$hash) || (captcha::hash($pw,-1)==$hash);
|
||||
+ if ($r) {
|
||||
+ setcookie(CAPTCHA_COOKIE, $to, time()+1000000);
|
||||
+ }
|
||||
+ return($r);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +59,11 @@
|
||||
*/
|
||||
function form($title="→ retype that here", $more="<small>Enter the correct letters and numbers from the image into the text box. This small test serves as access restriction against malicious bots. Simply reload the page if this graphic is too hard to read.</small>") {
|
||||
|
||||
+ #-- stop if user already verified
|
||||
+ if ($_COOKIE[CAPTCHA_COOKIE] == (int)(time()/1000000)) {
|
||||
+ return "";
|
||||
+ }
|
||||
+
|
||||
#-- prepare image text
|
||||
$pw = captcha::mkpass();
|
||||
$hash = captcha::hash($pw);
|
|
@ -0,0 +1,205 @@
|
|||
|
||||
minimal CAPTCHA class
|
||||
---------------------
|
||||
|
||||
As you might know, this PHP script provides a graphical human
|
||||
verification test, which can be integrated into web submission
|
||||
forms. A CAPTCHA (Completely Automated Public Turing to tell
|
||||
Computers from Humans Apart) helps enormous to differentiate
|
||||
real people from unwanted bots/spiders.
|
||||
|
||||
Link spammers preferrably target unlocked/open web sites ("the
|
||||
editable and user-driven Web"), like comment features in blogs,
|
||||
forum software, boards and Wikis of course. Often simple check-
|
||||
boxes suffice to get rid of comment-spambots, but for really
|
||||
motivated attackers only such a CAPTCHA can prevent massive page
|
||||
corruption.
|
||||
|
||||
It should however be used as last resort only, because it hinders
|
||||
visually impaired from using your site. This variant throws out
|
||||
some readable text behind the generated image, but that won't
|
||||
help much.
|
||||
|
||||
|
||||
Integration
|
||||
-----------
|
||||
|
||||
The static class contained within the script is pretty easy to
|
||||
use.
|
||||
On a page that contains a form (maybe even just a login or
|
||||
registration mask), you simply call the ::form() function to get
|
||||
a CAPTCHA image and input box generated:
|
||||
|
||||
<form action="...
|
||||
<textarea>...
|
||||
...
|
||||
<?php
|
||||
echo captcha::form();
|
||||
?>
|
||||
...
|
||||
<input type="submit"...
|
||||
</form>
|
||||
|
||||
The generated graphic will be linked or directly embedded into the
|
||||
page (if you enabled the "data:"-URIs) and you do not need to care
|
||||
about the additional form fields either.
|
||||
|
||||
On the receiving CGI/PHP script, you then simply invoke the
|
||||
"captcha::check()" function, which will return a boolean value of
|
||||
true, if the user correctly specified the displayed letters and
|
||||
numbers.
|
||||
You then simply proceed with processing the submitted <form>
|
||||
data, and for example store the given text into the database or
|
||||
so.
|
||||
|
||||
The ::check() function knows the correct POST variables, you don't
|
||||
have to care here either.
|
||||
|
||||
Your application and form processing logic must however accomodate
|
||||
to not call the CAPTCHA form generation or check repeatedly, but
|
||||
that it also cannot be circumvented with another hidden form field
|
||||
(which holds a multi-page form processing state e.g.).
|
||||
|
||||
It is recommended to simply integrate this into existing forms, but
|
||||
you could also use it as a secondary pre-login form (= first the
|
||||
captcha, then the real form). But take care, that it's often safer
|
||||
and simpler to integrate the image+check() with another form.
|
||||
|
||||
|
||||
Customization
|
||||
-------------
|
||||
|
||||
Take care to prepare at least one .ttf (font) file. There is one
|
||||
distributed with the tarball, which you should use (it's a very
|
||||
small freeware font, which looks good for our purposes). It
|
||||
should be placed in the same directory as the "captcha.php" script
|
||||
so it can be found easily.
|
||||
Else define() the "EWIKI_FONT_DIR" constant to something else (the
|
||||
EWIKI here just refers to where it was first used, don't care).
|
||||
|
||||
Take note that the "captcha.php" script has some built-in defaults
|
||||
which filter out certain possible letters from the CAPTCHAs. This
|
||||
is because those don't look well with the default "COLLEGE.ttf"
|
||||
font. You may want to tweak the ::mkpass() function, if you choose
|
||||
a different font.
|
||||
|
||||
To make the CAPTCHA better match your site look and feel, you could
|
||||
set the CAPTCHA_INVERSE constant to 1. This will yield a dark
|
||||
image, whereas the default 0 would make it generate a bright/white
|
||||
graphic.
|
||||
|
||||
Moreover you can style the form field from within your stylesheet
|
||||
using simply the class ".captcha". There is a table within it, and
|
||||
of course the input box - though that has a few direct formatting
|
||||
styles set.
|
||||
|
||||
When invoking captcha::form() you could also override the default
|
||||
text strings. The first sets the "-> retype that here" title, and
|
||||
a second the explanaition on the right (you could for example use
|
||||
"" as ::form()s second param to remove it).
|
||||
|
||||
Because there is probably no need to upgrade this ever(!) again,
|
||||
you should do all customizations within the code. The size of the
|
||||
generated images can only be changed that way for example.
|
||||
|
||||
|
||||
Safety
|
||||
------
|
||||
|
||||
The colors choosen in the CAPTCHA make it easier to read, but of
|
||||
course also easy to scan in fact. Though dissecting such images
|
||||
proves difficult, it is actually possible to do. And for this
|
||||
captcha class it's easier, because of the easily distinguishable
|
||||
colorspaces used. You probably notice that with the _INVERSE
|
||||
version.
|
||||
|
||||
I don't want to scare you; this class will work - it's yet too
|
||||
difficult for link spammers to program bots which could overcome
|
||||
it; but be aware, that it is indeed possible.
|
||||
|
||||
What's more, the generated alt= text could be deciphered. As you
|
||||
will see in the source it's actually a rather weird text, and so
|
||||
decoding would be unpleasent; but it's possible nevertheless.
|
||||
|
||||
We use a MD5 hashsum for the actual text data, so that's surely
|
||||
the safest part of this script ;) The code, btw, will time out
|
||||
after a few hours - replay attacks are possible, but only within a
|
||||
limited time frame of ca. 3 hours. We skimp on a tracking database
|
||||
table by that.
|
||||
|
||||
|
||||
|
||||
Advanced integration
|
||||
--------------------
|
||||
|
||||
This captcha is likely to frustrate users, if you keep it enabled
|
||||
everywhere and always - you should take precautions to disable the
|
||||
captcha check automatically.
|
||||
|
||||
Set a cookie once it was solved, so your users only need to see
|
||||
it once in a month (hint: good cookies shouldn't have a lifetime
|
||||
longer than that, and sessions are evil, btw).
|
||||
|
||||
|
||||
Compatibility
|
||||
-------------
|
||||
|
||||
Since version 0.9 the generated CAPTCHA images get stored into
|
||||
temporary files - like everyone else does.
|
||||
|
||||
You can however still enable (CAPTCHA_DATA_URLS) the embedding of
|
||||
image data directly into pages. This is not compatible to all browsers
|
||||
and MSIE in particular, even though this was standardized back in 1998
|
||||
(see RFC2397).
|
||||
The JavaScript/ActiveX workaround for MSIE has been removed from this
|
||||
version, because the temporary file method is more reliable anyhow.
|
||||
|
||||
Other browsers (even text-based like 'w3m') do not have problems with
|
||||
data:-URLs, so if you do not need to support MSIE users, it is still
|
||||
recommended to enable it, because it enhances security slightly (does
|
||||
not allow to fill a servers hard disk with temporary files from extra
|
||||
page requests).
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This mini-script is Public Domain -> "free" as in dictionary.
|
||||
|
||||
If you rebrand, repackage and redistribute it, you're however politely
|
||||
asked to modify the fragments in the ::textual_riddle() function. Too
|
||||
widespread adoption would allow bot writers to overcome it else.
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
Some boringly technical implementation notes and lame excuses for how
|
||||
things were done here:
|
||||
|
||||
- downscaling the generated images to fit the desired $maxsize
|
||||
- needed for MSIE, which whines about lengthy <img src= URLs
|
||||
- works by accident - libgd's JPEG generation quality parameter scales
|
||||
down the file size nearly linearly
|
||||
- the * and - parameters are arbitrary, but now it mostly seems to
|
||||
need three trials only (that is really good)
|
||||
- matches the wanted length quite well (max 200 bytes away)
|
||||
- but regeneration of course adds to the overall wasted time
|
||||
|
||||
|
||||
Alternatives
|
||||
------------
|
||||
|
||||
There is a clean CAPTCHA test implementation in the PEAR collection,
|
||||
http://pear.php.net/ - which is already used in many web apps.
|
||||
|
||||
On the <blink>free registration</blink>-phpclasses.org-site another
|
||||
implementation (GPLed lib) can be read about. NucleusCMS ships with
|
||||
it freely.
|
||||
|
||||
_This_ captcha.php class is used with ewiki+ for example (or there's
|
||||
at least a plugin for it).
|
||||
|
||||
Other implementations are linked and documented on
|
||||
http://en.wikipedia.org/wiki/Captcha
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>captcha.php testing</title>
|
||||
<style>
|
||||
html {
|
||||
border-left: 30px solid #222222;
|
||||
}
|
||||
input,textarea {
|
||||
background: #333333;
|
||||
color: #dddddd;
|
||||
border: 2px solid #555555;
|
||||
}
|
||||
.captcha {
|
||||
border: 2px dashed: #331111;
|
||||
background: #110000;
|
||||
padding: 5px;
|
||||
}
|
||||
form {
|
||||
border: 1px dashed #551111;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#000000" text="#ffffff">
|
||||
<h1>CAPTCHA Test</h1>
|
||||
<?php
|
||||
define("CAPTCHA_INVERSE", 1);
|
||||
include "captcha.php";
|
||||
?>
|
||||
|
||||
<form action="_test.1.php" >
|
||||
(we have an example input <form> here)<br>
|
||||
<textarea cols=50 rows=3><?php
|
||||
$res = captcha::check();
|
||||
if (isset($res)) {
|
||||
if ($res) {
|
||||
$msg = "SUCCESS!!";
|
||||
}
|
||||
else {
|
||||
$msg = "FAILED.";
|
||||
}
|
||||
for ($n=0; $n<5; $n++) {
|
||||
echo "$msg\n";
|
||||
}
|
||||
}
|
||||
?></textarea>
|
||||
<br>
|
||||
<br>
|
||||
<?php
|
||||
echo captcha::form();
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Test & Save">
|
||||
</form>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
This is just an example. It's function-less form, which appears over
|
||||
and over again. You'd typically also want to provide a more senseful
|
||||
error message, if captcha::test() fails.
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,340 @@
|
|||
<?php
|
||||
/*
|
||||
Does emit a CAPTCHA graphic and form fields, which allows to tell real
|
||||
people from bots.
|
||||
Though a textual description is generated as well, this sort of access
|
||||
restriction will knock out visually impaired users, and frustrate all
|
||||
others anyhow. Therefore this should only be used as last resort for
|
||||
defending against spambots. Because of the readable text and the used
|
||||
colorspaces this is a weak implementation, not completely OCR-secure.
|
||||
|
||||
captcha::form() will return a html string to be inserted into textarea/
|
||||
[save] <forms> and alike. User input is veryfied with captcha::check().
|
||||
You should leave the sample COLLEGE.ttf next to this script, else you
|
||||
have to define the _FONT_DIR constant correctly. Use only 1 font type.
|
||||
|
||||
Creates temporary files, which however get purged automatically after
|
||||
four hours.
|
||||
|
||||
Public Domain, available via http://freshmeat.net/p/captchaphp
|
||||
*/
|
||||
|
||||
|
||||
#-- config
|
||||
define("EWIKI_FONT_DIR", dirname(__FILE__)); // which fonts to use
|
||||
define("CAPTCHA_INVERSE", 0); // white or black(=1)
|
||||
define("CAPTCHA_TIMEOUT", 5000); // in seconds (=max 4 hours)
|
||||
define("CAPTCHA_MAXSIZE", 4500); // preferred image size
|
||||
define("CAPTCHA_COOKIE", "captcha_solved"); // to unlock captcha protection
|
||||
define("CAPTCHA_DATA_URLS", 0); // RFC2397-URLs exclude MSIE users
|
||||
define("CAPTCHA_TEMP_DIR", "/tmp/captcha");
|
||||
define("CAPTCHA_BASE_URL", "http://$_SERVER[SERVER_NAME]:$_SERVER[SERVER_PORT]/" . substr(realpath(__FILE__), strlen($_SERVER["DOCUMENT_ROOT"])));
|
||||
|
||||
|
||||
/* static - (you could instantiate it, but...) */
|
||||
class captcha {
|
||||
|
||||
|
||||
/* gets parameter from $_REQUEST[] array (POST vars) and so can
|
||||
verify input, @returns boolean
|
||||
*/
|
||||
function check() {
|
||||
$to = (int)(time()/1000000);
|
||||
if ($_COOKIE[CAPTCHA_COOKIE] == $to) {
|
||||
return(true);
|
||||
}
|
||||
if (($hash = $_REQUEST["captcha_hash"])
|
||||
and ($pw = trim($_REQUEST["captcha_input"]))) {
|
||||
$r = (captcha::hash($pw)==$hash) || (captcha::hash($pw,-1)==$hash);
|
||||
if ($r) {
|
||||
setcookie(CAPTCHA_COOKIE, $to, time()+1000000);
|
||||
}
|
||||
return($r);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* yields <input> fields html string (no complete form), with captcha
|
||||
image already embedded as data:-URI
|
||||
*/
|
||||
function form($title="→ retype that here", $more="<small>Enter the correct letters and numbers from the image into the text box. This small test serves as access restriction against malicious bots. Simply reload the page if this graphic is too hard to read.</small>") {
|
||||
|
||||
#-- stop if user already verified
|
||||
if ($_COOKIE[CAPTCHA_COOKIE] == (int)(time()/1000000)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
#-- prepare image text
|
||||
$pw = captcha::mkpass();
|
||||
$hash = captcha::hash($pw);
|
||||
$alt = htmlentities(captcha::textual_riddle($pw));
|
||||
|
||||
#-- image
|
||||
$img = captcha::image($pw, 200, 60, CAPTCHA_INVERSE, CAPTCHA_MAXSIZE);
|
||||
if (CAPTCHA_DATA_URLS && !strpos("MSIE", $_SERVER["HTTP_USER_AGENT"])) {
|
||||
$img_fn = "data:image/jpeg;base64," . base64_encode($img);
|
||||
}
|
||||
else {
|
||||
$img_fn = CAPTCHA_BASE_URL . "?_tcf=" . captcha::store_image($img);
|
||||
}
|
||||
|
||||
#-- emit html form
|
||||
$html =
|
||||
'<table border="0" summary="captcha input"><tr>'
|
||||
. '<td><img name="captcha_image" id="captcha_image" src="' .$img_fn. '" height="60" width="200" alt="'.$alt. '" /></td>'
|
||||
. '<td>'.$title. '<br/><input name="captcha_hash" type="hidden" value="'.$hash. '" />'
|
||||
. '<input name="captcha_input" type="text" size="7" maxlength="16" style="height:46px; font-size:34px; font-weight:450;" />'
|
||||
. '</td><td>'.$more.'</td>'
|
||||
. '</tr></table>';
|
||||
$html = "<div class=\"captcha\">$html</div>";
|
||||
return($html);
|
||||
}
|
||||
|
||||
|
||||
/* generates alternative (non-graphic), human-understandable
|
||||
representation of the passphrase
|
||||
*/
|
||||
function textual_riddle($phrase) {
|
||||
$symbols0 = '"\'-/_:';
|
||||
$symbols1 = array("\n,", "\n;", ";", "\n&", "\n-", ",", ",", "\nand then", "\nfollowed by", "\nand", "\nand not a\n\"".chr(65+rand(0,26))."\",\nbut");
|
||||
$s = "Guess the letters and numbers\n(passphrase riddle)\n--\n";
|
||||
for ($p=0; $p<strlen($phrase); $p++) {
|
||||
$c = $phrase[$p];
|
||||
$add = "";
|
||||
#-- asis
|
||||
if (!rand(0,3)) {
|
||||
$i = $symbols0[rand(0,strlen($symbols0)-1)];
|
||||
$add = "$i$c$i";
|
||||
}
|
||||
#-- letter
|
||||
elseif ($c >= 'A') {
|
||||
$type = ($c >= 'a' ? "small " : "");
|
||||
do {
|
||||
$n = rand(-3,3);
|
||||
$c2 = chr((ord($c) & 0x5F) + $n);
|
||||
}
|
||||
while (($c2 < 'A') || ($c2 > 'Z'));
|
||||
if ($n < 0) {
|
||||
$n = -$n;
|
||||
$add .= "$type'$c2' +$n letters";
|
||||
}
|
||||
else {
|
||||
$add .= "$n chars before $type$c2";
|
||||
}
|
||||
}
|
||||
#-- number
|
||||
else {
|
||||
$add = "???";
|
||||
$n = (int) $c;
|
||||
do {
|
||||
do { $x = rand(1, 10); } while (!$x);
|
||||
$op = rand(0,11);
|
||||
if ($op <= 2) {
|
||||
$add = "($add * $x)"; $n *= $x;
|
||||
}
|
||||
elseif ($op == 3) {
|
||||
$x = 2 * rand(1,2);
|
||||
$add = "($add / $x)"; $n /= $x;
|
||||
}
|
||||
elseif ($sel % 2) {
|
||||
$add = "($add + $x)"; $n += $x;
|
||||
}
|
||||
else {
|
||||
$add = "($add - $x)"; $n -= $x;
|
||||
}
|
||||
}
|
||||
while (rand(0,1));
|
||||
$add .= " = $n";
|
||||
}
|
||||
$s .= "$add";
|
||||
$s .= $symbols1[rand(0,count($symbols1)-1)] . "\n";
|
||||
}
|
||||
return($s);
|
||||
}
|
||||
|
||||
|
||||
/* returns jpeg file stream with unscannable letters encoded
|
||||
in front of colorful disturbing background
|
||||
*/
|
||||
function image($phrase, $width=200, $height=60, $inverse=0, $maxsize=0xFFFFF) {
|
||||
|
||||
#-- initialize in-memory image with gd library
|
||||
srand(microtime()*21017);
|
||||
$img = imagecreatetruecolor($width, $height);
|
||||
$R = $inverse ? 0xFF : 0x00;
|
||||
imagefilledrectangle($img, 0,0, $width,$height, captcha::random_color($img, 222^$R, 255^$R));
|
||||
$c1 = rand(150^$R, 185^$R);
|
||||
$c2 = rand(195^$R, 230^$R);
|
||||
|
||||
#-- configuration
|
||||
$fonts = array(
|
||||
// "COLLEGE.ttf",
|
||||
);
|
||||
$fonts += glob(EWIKI_FONT_DIR."/*.ttf");
|
||||
|
||||
#-- encolour bg
|
||||
$wd = 20;
|
||||
$x = 0;
|
||||
while ($x < $width) {
|
||||
imagefilledrectangle($img, $x, 0, $x+=$wd, $height, captcha::random_color($img, 222^$R, 255^$R));
|
||||
$wd += max(10, rand(0, 20) - 10);
|
||||
}
|
||||
|
||||
#-- make interesting background I, lines
|
||||
$wd = 4;
|
||||
$w1 = 0;
|
||||
$w2 = 0;
|
||||
for ($x=0; $x<$width; $x+=(int)$wd) {
|
||||
if ($x < $width) { // verical
|
||||
imageline($img, $x+$w1, 0, $x+$w2, $height-1, captcha::random_color($img,$c1,$c2));
|
||||
}
|
||||
if ($x < $height) { // horizontally ("y")
|
||||
imageline($img, 0, $x-$w2, $width-1, $x-$w1, captcha::random_color($img,$c1,$c2));
|
||||
}
|
||||
$wd += rand(0,8) - 4;
|
||||
if ($wd < 1) { $wd = 2; }
|
||||
$w1 += rand(0,8) - 4;
|
||||
$w2 += rand(0,8) - 4;
|
||||
if (($x > $height) && ($y > $height)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#-- more disturbing II, random letters
|
||||
$limit = rand(30,90);
|
||||
for ($n=0; $n<$limit; $n++) {
|
||||
$letter = "";
|
||||
do {
|
||||
$letter .= chr(rand(31,125)); // random symbol
|
||||
} while (rand(0,1));
|
||||
$size = rand(5, $height/2);
|
||||
$half = (int) ($size / 2);
|
||||
$x = rand(-$half, $width+$half);
|
||||
$y = rand(+$half, $height);
|
||||
$rotation = rand(60, 300);
|
||||
$c1 = captcha::random_color($img, 130^$R, 240^$R);
|
||||
$font = $fonts[rand(0, count($fonts)-1)];
|
||||
imagettftext($img, $size, $rotation, $x, $y, $c1, $font, $letter);
|
||||
}
|
||||
|
||||
#-- add the real text to it
|
||||
$len = strlen($phrase);
|
||||
$w1 = 10;
|
||||
$w2 = $width / ($len+1);
|
||||
for ($p=0; $p<$len; $p++) {
|
||||
$letter = $phrase[$p];
|
||||
$size = rand(18, $height/2.2);
|
||||
$half = (int) $size / 2;
|
||||
$rotation = rand(-33, 33);
|
||||
$y = rand($size+3, $height-3);
|
||||
$x = $w1 + $w2*$p;
|
||||
$w1 += rand(-$width/90, $width/40); // @BUG: last char could be +30 pixel outside of image
|
||||
$font = $fonts[rand(0, count($fonts)-1)];
|
||||
$r=rand(30,99); $g=rand(30,99); $b=rand(30,99); // two colors for shadow
|
||||
$c1 = imagecolorallocate($img, $r*1^$R, $g*1^$R, $b*1^$R);
|
||||
$c2 = imagecolorallocate($img, $r*2^$R, $g*2^$R, $b*2^$R);
|
||||
imagettftext($img, $size, $rotation, $x+1, $y, $c2, $font, $letter);
|
||||
imagettftext($img, $size, $rotation, $x, $y-1, $c1, $font, $letter);
|
||||
}
|
||||
|
||||
#-- let JFIF stream be generated
|
||||
$quality = 67;
|
||||
$s = array();
|
||||
do {
|
||||
ob_start(); ob_implicit_flush(0);
|
||||
imagejpeg($img, "", (int)$quality);
|
||||
$jpeg = ob_get_contents(); ob_end_clean();
|
||||
$size = strlen($jpeg);
|
||||
$s_debug[] = ((int)($quality*10)/10) . "%=$size";
|
||||
$quality = $quality * ($maxsize/$size) * 0.93 - 1.7; // -($quality/7.222)*
|
||||
}
|
||||
while (($size > $maxsize) && ($quality >= 16));
|
||||
imagedestroy($img);
|
||||
#print_r($s_debug);
|
||||
return($jpeg);
|
||||
}
|
||||
|
||||
|
||||
/* helper code */
|
||||
function random_color($img, $a,$b) {
|
||||
return imagecolorallocate($img, rand($a,$b), rand($a,$b), rand($a,$b));
|
||||
}
|
||||
|
||||
|
||||
/* creates temporary file, returns basename */
|
||||
function store_image($data) {
|
||||
$dir = CAPTCHA_TEMP_DIR;
|
||||
$id = md5($data);
|
||||
|
||||
#-- create temp dir
|
||||
if (!file_exists($dir)) {
|
||||
mkdir($dir) && chmod($dir, 0777);
|
||||
}
|
||||
|
||||
#-- remove stale files
|
||||
if ($dh = opendir($dir)) {
|
||||
$t_kill = time() - CAPTCHA_TIMEOUT;
|
||||
while($fn = readdir($dh)) if ($fn[0] != ".") {
|
||||
if (filemtime("$dir/$fn") < $t_kill) {
|
||||
unlink("$dir/$fn");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-- store file
|
||||
fwrite($f = fopen("$dir/$id", "wb"), $data) && fclose($f);
|
||||
return($id);
|
||||
}
|
||||
|
||||
/* sends it */
|
||||
function get_image($id) {
|
||||
$dir = CAPTCHA_TEMP_DIR;
|
||||
$fn = "$dir/$id";
|
||||
|
||||
#-- find it
|
||||
if (preg_match('/^\w+$/', $id) && file_exists($fn)) {
|
||||
header("Content-Type: image/jpeg");
|
||||
header("Content-Length: " . filesize($fn));
|
||||
header("Last-Modified: " . gmstrftime("%a, %d %b %G %T %Z", filemtime($fn)));
|
||||
if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) {
|
||||
header("Status: 304 Unmodified");
|
||||
}
|
||||
else {
|
||||
readfile($fn);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* unreversable hash from passphrase, with time() slice encoded */
|
||||
function hash($text, $dtime=0) {
|
||||
$text = strtolower($text);
|
||||
$pfix = (int) (time() / CAPTCHA_TIMEOUT) + $dtime;
|
||||
return md5("captcha::$pfix:$text::".__FILE__.":$_SERVER[SERVER_NAME]:80");
|
||||
}
|
||||
|
||||
|
||||
/* makes string of random letters for embedding into image and for
|
||||
encoding as hash, later verification
|
||||
*/
|
||||
function mkpass() {
|
||||
$s = "";
|
||||
for ($n=0; $n<10; $n++) {
|
||||
$s .= chr(rand(0, 255));
|
||||
}
|
||||
$s = base64_encode($s); // base64-set, but filter out unwanted chars
|
||||
$s = preg_replace("/[+\/=IG0ODQR]/i", "", $s); // (depends on YOUR font)
|
||||
$s = substr($s, 0, rand(5,7));
|
||||
return($s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-- IE workaround
|
||||
if (isset($_REQUEST["_tcf"])) {
|
||||
captcha::get_image($_REQUEST["_tcf"]);
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -0,0 +1,785 @@
|
|||
<?php
|
||||
/* rslight NNTP<->HTTP Gateway
|
||||
* Version: 0.6.x
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* Based on Newsportal by Florian Amrhein
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
function message_parse($rawmessage) {
|
||||
global $attachment_delete_alternative,$attachment_uudecode,$www_charset;
|
||||
global $iconv_enable;
|
||||
// Read the header of the message:
|
||||
$count_rawmessage=count($rawmessage);
|
||||
$message = new messageType;
|
||||
$rawheader=array();
|
||||
$i=0;
|
||||
while ($rawmessage[$i] != "") {
|
||||
$rawheader[]=$rawmessage[$i];
|
||||
$i++;
|
||||
}
|
||||
// Parse the Header:
|
||||
$message->header=parse_header($rawheader);
|
||||
// Now we know if the message is a mime-multipart message:
|
||||
$content_type=explode("/",$message->header->content_type[0]);
|
||||
if ($content_type[0]=="multipart") {
|
||||
$message->header->content_type=array();
|
||||
// We have multible bodies, so we split the message into its parts
|
||||
$boundary="--".$message->header->content_type_boundary;
|
||||
// lets find the first part
|
||||
while($rawmessage[$i] != $boundary)
|
||||
$i++;
|
||||
$i++;
|
||||
$part=array();
|
||||
while($i<=$count_rawmessage) {
|
||||
if (($rawmessage[$i]==$boundary) || ($i==$count_rawmessage-1) ||
|
||||
($rawmessage[$i]==$boundary.'--')) {
|
||||
$partmessage=message_parse($part);
|
||||
// merge the content-types of the message with those of the part
|
||||
for ($o=0; $o<count($partmessage->header->content_type); $o++) {
|
||||
$message->header->content_type[]=
|
||||
$partmessage->header->content_type[$o];
|
||||
$message->header->content_type_charset[]=
|
||||
$partmessage->header->content_type_charset[$o];
|
||||
$message->header->content_type_name[]=
|
||||
$partmessage->header->content_type_name[$o];
|
||||
$message->header->content_type_format[]=
|
||||
$partmessage->header->content_type_format[$o];
|
||||
$message->body[]=$partmessage->body[$o];
|
||||
}
|
||||
$part=array();
|
||||
} else {
|
||||
if ($i<$count_rawmessage)
|
||||
$part[]=$rawmessage[$i];
|
||||
}
|
||||
if ($rawmessage[$i]==$boundary.'--') break;
|
||||
$i++;
|
||||
}
|
||||
// Is this a multipart/alternative multipart-message? Do we have to
|
||||
// delete all non plain/text parts?
|
||||
if (($attachment_delete_alternative) &&
|
||||
($content_type[1]=="alternative")) {
|
||||
$plaintext=false;
|
||||
for ($o=0; $o<count($message->header->content_type); $o++) {
|
||||
if ($message->header->content_type[$o]=="text/plain")
|
||||
$plaintext=true; // we found at least one text/plain
|
||||
}
|
||||
if ($plaintext) { // now we can delete the other parts
|
||||
for ($o=0; $o<count($message->header->content_type); $o++) {
|
||||
if ($message->header->content_type[$o]!="text/plain") {
|
||||
unset($message->header->content_type[$o]);
|
||||
unset($message->header->content_type_name[$o]);
|
||||
unset($message->header->content_type_charset[$o]);
|
||||
unset($message->header->content_type_format[$o]);
|
||||
unset($message->body[$o]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// No mime-attachments in the message:
|
||||
$body="";
|
||||
$uueatt=0; // as default we have no uuencoded attachments
|
||||
// Handle inline attachments
|
||||
for($i++;$i<$count_rawmessage; $i++) {
|
||||
// do we have an inlay uuencoded file?
|
||||
if ((strtolower(substr($rawmessage[$i],0,10))!="begin 644 ") ||
|
||||
($attachment_uudecode==false)) {
|
||||
$body.=$rawmessage[$i]."\n";
|
||||
// yes, it seems, we have!
|
||||
} else {
|
||||
$real=explode("begin 644 ", $rawmessage[$i]);
|
||||
if(trim($real[1]) != "") {
|
||||
$old_i=$i;
|
||||
$uue_infoline_raw=$rawmessage[$i];
|
||||
$uue_infoline=explode(" ",$uue_infoline_raw);
|
||||
$uue_data="";
|
||||
$i++;
|
||||
$no_end=0;
|
||||
while($rawmessage[$i]!="end") {
|
||||
if (strlen(trim($rawmessage[$i])) > 2)
|
||||
$uue_data.=$rawmessage[$i]."\n";
|
||||
$i++;
|
||||
if($i > $count_rawmessage) {
|
||||
$no_end=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// now write the data in an attachment
|
||||
if($no_end != 1) {
|
||||
$uueatt++;
|
||||
$message->body[$uueatt]=uudecode($uue_data);
|
||||
$message->header->content_type_name[$uueatt]="";
|
||||
for ($o=2; $o<count($uue_infoline); $o++)
|
||||
$message->header->content_type_name[$uueatt].=$uue_infoline[$o];
|
||||
$message->header->content_type[$uueatt]=
|
||||
get_mimetype_by_string($message->body[$uueatt]);
|
||||
}
|
||||
} else {
|
||||
$body.=$rawmessage[$i]."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
// Do not enable if supporting inline atachments
|
||||
// if ($message->header->content_type[0]=="text/plain") {
|
||||
|
||||
$body=decode_body($body,$message->header->content_transfer_encoding);
|
||||
$body=recode_charset($body,
|
||||
$message->header->content_type_charset[0],
|
||||
$www_charset);
|
||||
if ($body=="") $body=" ";
|
||||
// }
|
||||
$message->body[0]=$body;
|
||||
}
|
||||
if (!isset($message->header->content_type_charset))
|
||||
$message->header->content_type_charset=array($www_charset);
|
||||
if (!isset($message->header->content_type_name))
|
||||
$message->header->content_type_name=array("unnamed");
|
||||
if (!isset($message->header->content_type_format))
|
||||
$message->header->content_type_format=array("fixed");
|
||||
for ($o=0; $o<count($message->body); $o++) {
|
||||
if (!isset($message->header->content_type_charset[$o]))
|
||||
$message->header->content_type_charset[$o]=$www_charset;
|
||||
if (!isset($message->header->content_type_name[$o]))
|
||||
$message->header->content_type_name[$o]="unnamed";
|
||||
if (!isset($message->header->content_type_format[$o]))
|
||||
$message->header->content_type_format[$o]="fixed";
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* read an article from the newsserver or the spool-directory
|
||||
*
|
||||
* $id: the Message-ID of an article
|
||||
* $bodynum: the number of the attachment:
|
||||
* -1: return only the header without any bodies or attachments.
|
||||
* 0: the body
|
||||
* 1: the first attachment...
|
||||
*
|
||||
* The function returns an article as an messageType or false if the article
|
||||
* doesn't exists on the newsserver or doesn't contain the given
|
||||
* attachment.
|
||||
*/
|
||||
function message_read($id,$bodynum=0,$group="") {
|
||||
global $cache_articles,$spooldir,$spoolpath,$text_error,$ns;
|
||||
if (!testGroup($group)) {
|
||||
echo $text_error["read_access_denied"];
|
||||
return;
|
||||
}
|
||||
$message = new messageType;
|
||||
if ((isset($cache_articles)) && ($cache_articles == true)) {
|
||||
// Try to load a cached article
|
||||
if ((preg_match('/^[0-9]+$/',$id)) && ($group != ''))
|
||||
$filename=$group.'_'.$id;
|
||||
else
|
||||
$filename=base64_encode($id);
|
||||
$cachefilename_header=$spooldir."/".$filename.'.header';
|
||||
$cachefilename_body=$spooldir."/".$filename.'.body';
|
||||
if (file_exists($cachefilename_header)) {
|
||||
$cachefile=fopen($cachefilename_header,"r");
|
||||
$message->header=unserialize(fread($cachefile,filesize($cachefilename_header)));
|
||||
fclose($cachefile);
|
||||
} else {
|
||||
unset($message->header);
|
||||
}
|
||||
// Is a non-existing attachment of an article requested?
|
||||
if ((isset($message->header)) &&
|
||||
($bodynum!= -1) &&
|
||||
(!isset($message->header->content_type[$bodynum])))
|
||||
return false;
|
||||
if ((file_exists($cachefilename_body.$bodynum)) &&
|
||||
($bodynum != -1)) {
|
||||
$cachefile=fopen($cachefilename_body.$bodynum,"r");
|
||||
$message->body[$bodynum]=
|
||||
fread($cachefile,filesize($cachefilename_body.$bodynum));
|
||||
fclose($cachefile);
|
||||
}
|
||||
}
|
||||
if ((!isset($message->header)) ||
|
||||
((!isset($message->body[$bodynum])) &&
|
||||
($bodynum != -1))) {
|
||||
// Pull article from spool if exists, else from server
|
||||
$articlepath = $spoolpath.preg_replace('/\./', '/', $group)."/".$id;
|
||||
if (file_exists($articlepath)) {
|
||||
$rawmessage_fh = fopen($articlepath, "r");
|
||||
$rawmessage=array();
|
||||
$line=rtrim(fgets($rawmessage_fh), PHP_EOL);
|
||||
while(!feof($rawmessage_fh)) {
|
||||
if(strcmp($line,".") == 0) {
|
||||
break;
|
||||
}
|
||||
$rawmessage[]=$line;
|
||||
$line=rtrim(fgets($rawmessage_fh), PHP_EOL);
|
||||
}
|
||||
fclose($rawmessage_fh);
|
||||
} else {
|
||||
if (!isset($ns)) {
|
||||
$ns=nntp_open();
|
||||
}
|
||||
if ($group != "") {
|
||||
fputs($ns,"GROUP ".$group."\r\n");
|
||||
$line=line_read($ns);
|
||||
}
|
||||
fputs($ns,'ARTICLE '.$id."\r\n");
|
||||
$line=line_read($ns);
|
||||
if (substr($line,0,3) != "220") {
|
||||
// requested article doesn't exist on the newsserver. Now we
|
||||
// should check, if the thread stored in the spool-directory
|
||||
// also doesnt't contain that article...
|
||||
thread_cache_removearticle($group,$id);
|
||||
return false;
|
||||
}
|
||||
$rawmessage=array();
|
||||
$line=line_read($ns);
|
||||
while(strcmp($line,".") != 0) {
|
||||
$rawmessage[]=$line;
|
||||
$line=line_read($ns);
|
||||
}
|
||||
}
|
||||
$message=message_parse($rawmessage);
|
||||
if (preg_match('/^[0-9]+$/',$id)) $message->header->number=$id;
|
||||
// write header, body and attachments to the cache
|
||||
if ((isset($cache_articles)) && ($cache_articles == true)) {
|
||||
$cachefile=fopen($cachefilename_header,"w");
|
||||
if ($cachefile) {
|
||||
fputs($cachefile,serialize($message->header));
|
||||
}
|
||||
fclose($cachefile);
|
||||
for ($i=0; $i<count($message->header->content_type); $i++) {
|
||||
if (isset($message->body[$i])) {
|
||||
$cachefile=fopen($cachefilename_body.$i,"w");
|
||||
fwrite($cachefile,$message->body[$i]);
|
||||
fclose($cachefile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
|
||||
function textwrap($text, $wrap=80, $break="\n",$maxlen=false){
|
||||
$len = strlen($text);
|
||||
if ($len > $wrap) {
|
||||
$h = ''; // massaged text
|
||||
$lastWhite = 0; // position of last whitespace char
|
||||
$lastChar = 0; // position of last char
|
||||
$lastBreak = 0; // position of last break
|
||||
// while there is text to process
|
||||
while ($lastChar < $len && (($maxlen==false) || (strlen($h)<$maxlen))) {
|
||||
$char = substr($text, $lastChar, 1); // get the next character
|
||||
// if we are beyond the wrap boundry and there is a place to break
|
||||
if (($lastChar - $lastBreak > $wrap) && ($lastWhite > $lastBreak)) {
|
||||
$h .= substr($text, $lastBreak, ($lastWhite - $lastBreak)) . $break;
|
||||
$lastChar = $lastWhite + 1;
|
||||
$lastBreak = $lastChar;
|
||||
}
|
||||
// You may wish to include other characters as valid whitespace...
|
||||
if ($char == ' ' || $char == chr(13) || $char == chr(10)) {
|
||||
$lastWhite = $lastChar; // note the position of the last whitespace
|
||||
}
|
||||
$lastChar = $lastChar + 1; // advance the last character position by one
|
||||
}
|
||||
$h .= substr($text, $lastBreak); // build line
|
||||
} else {
|
||||
$h = $text; // in this case everything can fit on one line
|
||||
}
|
||||
return $h;
|
||||
}
|
||||
/*
|
||||
* Displays a (Sub)-Thread. Is used in article.php
|
||||
*
|
||||
* $id: Message-ID (not number!) of an article in the thread
|
||||
* $group: name of the newsgroup
|
||||
*/
|
||||
function message_thread($id,$group,$thread,$highlightids=false) {
|
||||
$current=$id;
|
||||
// set the highlightid, if not set
|
||||
if(!$highlightids)
|
||||
$highlightids=array($current);
|
||||
flush();
|
||||
// find the first article in the subthread of $id
|
||||
while(isset($thread[$id]->references)) {
|
||||
foreach($thread[$id]->references as $reference) {
|
||||
if((trim($reference)!='') && (isset($thread[$reference]))) {
|
||||
$id=$reference;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
$liste=array();
|
||||
$liste[]=$id;
|
||||
$tmp=0;
|
||||
thread_show_head(0);
|
||||
echo thread_show_recursive($thread,$liste,1,"",$group,0,100,$tmp,$highlightids,0);
|
||||
thread_show_tail();
|
||||
}
|
||||
|
||||
/*
|
||||
* Print the header of a message to the webpage
|
||||
*
|
||||
* $head: the header of the message as an headerType
|
||||
* $group: the name of the newsgroup, is needed for the links to post.php3
|
||||
* and the header.
|
||||
*/
|
||||
function show_header($head,$group,$local_poster=false) {
|
||||
global $article_show,$text_header,$file_article,$attachment_show;
|
||||
global $file_attachment,$anonym_address,$CONFIG;
|
||||
if(isset($_COOKIE['tzo'])) {
|
||||
$offset=$_COOKIE['tzo'];
|
||||
} else {
|
||||
$offset=$CONFIG['timezone'];
|
||||
}
|
||||
echo '<div class="np_article_header">';
|
||||
if ($article_show["Subject"]) echo $text_header["subject"].htmlspecialchars($head->subject)."<br>";
|
||||
if ($article_show["From"]) {
|
||||
echo $text_header["from"];
|
||||
if($head->from==$anonym_address) {
|
||||
// this is the anonymous address, so only show the name
|
||||
echo htmlspecialchars($head->name);
|
||||
} else {
|
||||
if($article_show["From_link"])
|
||||
echo '<a href="mailto:'.htmlspecialchars($head->from).'">';
|
||||
if(isset($article_show["From_rewrite"]))
|
||||
echo preg_replace('/{$article_show["From_rewrite"][0]}/',
|
||||
$article_show["From_rewrite"][1],
|
||||
htmlspecialchars($head->from));
|
||||
$before_at = explode('@', $head->from);
|
||||
$namelen = strlen($before_at[0]);
|
||||
if ($namelen > 3) {
|
||||
$endname = $namelen - 3;
|
||||
if($endname > 8)
|
||||
$endname = 8;
|
||||
if($endname < 3)
|
||||
$endname++;
|
||||
if($endname < 3)
|
||||
$endname++;
|
||||
} else {
|
||||
$endname = $namelen;
|
||||
}
|
||||
if($article_show["From_link"])
|
||||
echo '</a>';
|
||||
echo '<span class="visited">';
|
||||
if ($local_poster) {
|
||||
echo '<i>';
|
||||
}
|
||||
if ($head->name != "") {
|
||||
echo create_name_link($head->name);
|
||||
} else {
|
||||
if(isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true) {
|
||||
echo truncate_email($head->from);
|
||||
} else {
|
||||
echo htmlspecialchars($head->from);
|
||||
}
|
||||
}
|
||||
if ($local_poster) {
|
||||
echo '</i>';
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
if ($article_show["Newsgroups"])
|
||||
echo $text_header["newsgroups"].htmlspecialchars(str_replace(',',', ',$head->newsgroups))."<br>\n";
|
||||
if (isset($head->followup) && ($article_show["Followup"]) && ($head->followup != ""))
|
||||
echo $text_header["followup"].htmlspecialchars($head->followup)."<br>\n";
|
||||
if ((isset($head->organization)) && ($article_show["Organization"]) &&
|
||||
($head->organization != ""))
|
||||
echo $text_header["organization"].
|
||||
html_parse(htmlspecialchars($head->organization))."<br>\n";
|
||||
if ($article_show["Date"]) {
|
||||
$ts = new DateTime(date($text_header["date_format"], $head->date), new DateTimeZone('UTC'));
|
||||
$ts->add(DateInterval::createFromDateString($offset.' minutes'));
|
||||
if($offset != 0) {
|
||||
echo $text_header["date"].$ts->format('D, j M Y H:i')."<br>\n";
|
||||
} else {
|
||||
echo $text_header["date"].$ts->format($text_header["date_format"])."<br>\n";
|
||||
}
|
||||
unset($ts);
|
||||
}
|
||||
|
||||
// echo $text_header["date"].date($text_header["date_format"],$head->date)."<br>\n";
|
||||
if ($article_show["Message-ID"]) {
|
||||
echo ' '.$text_header["message-id"].htmlspecialchars($head->id)."<br>\n";
|
||||
}
|
||||
if (($article_show["References"]) && (isset($head->references[0]))) {
|
||||
echo $text_header["references"];
|
||||
for ($i=0; $i<=count($head->references)-1; $i++) {
|
||||
$ref=$head->references[$i];
|
||||
echo ' '.'<a href="'.$file_article.'?group='.urlencode($group).
|
||||
'&id='.urlencode($ref).'">'.($i+1).'</a>';
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
if (isset($head->user_agent)) {
|
||||
if ((isset($article_show["User-Agent"])) &&
|
||||
($article_show["User-Agent"])) {
|
||||
echo $text_header["user-agent"].htmlspecialchars($head->user_agent)."<br>\n";
|
||||
} else {
|
||||
echo "<!-- User-Agent: ".htmlspecialchars($head->user_agent)." -->\n";
|
||||
}
|
||||
}
|
||||
if ((isset($attachment_show)) && ($attachment_show==true) &&
|
||||
(isset($head->content_type[1]))) {
|
||||
echo $text_header["attachments"];
|
||||
for ($i=1; $i<count($head->content_type); $i++) {
|
||||
if(!strcmp($head->content_type[$i],"text/html")) {
|
||||
$contype = "HTML Version";
|
||||
} else {
|
||||
$contype = $head->content_type_name[$i];
|
||||
}
|
||||
echo '<a href="'.$file_attachment.'?group='.urlencode($group).'&'.
|
||||
'id='.urlencode($head->number).'&'.
|
||||
'attachment='.$i.'">'.
|
||||
$contype.'</a> ('.
|
||||
$head->content_type[$i].')';
|
||||
if ($i<count($head->content_type)-1) echo ', ';
|
||||
}
|
||||
}
|
||||
if ($article_show["trigger_headers"]) {
|
||||
echo '<div>';
|
||||
echo '<input type="checkbox" id="trigger_headers">';
|
||||
echo '<div class="display_headers_on">'.display_full_headers($head->number,$group,$head->name,$head->from).'</div>';
|
||||
echo ' View all headers'."<br>\n";
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
function display_full_headers($id,$group,$name,$from) {
|
||||
global $spoolpath, $CONFIG;
|
||||
$thisgroup = preg_replace('/\./', '/', $group);
|
||||
|
||||
$message=fopen($spoolpath.$thisgroup.'/'.$id, 'r');
|
||||
while($line=fgets($message)) {
|
||||
if(trim($line) == '') {
|
||||
break;
|
||||
}
|
||||
if(stripos($line, 'Xref: ') === 0) {
|
||||
continue;
|
||||
}
|
||||
if(stripos($line, 'From: ') === 0) {
|
||||
$return.='From: ';
|
||||
if(isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true) {
|
||||
$return.=truncate_email($from);
|
||||
} else {
|
||||
$return.=htmlspecialchars($from);
|
||||
}
|
||||
if ($name != "") {
|
||||
$return.=' ('.htmlspecialchars($name).')';
|
||||
}
|
||||
$return.='<br />';
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$return.=mb_decode_mimeheader(htmlspecialchars($line)).'<br />';
|
||||
}
|
||||
fclose($message);
|
||||
|
||||
return($return);
|
||||
}
|
||||
|
||||
/*
|
||||
* decodes a body. Splits the content of $body into an array of several
|
||||
* lines, respecting the special decoding issues of format=flowed
|
||||
* articles. Each returned line consists of two fields: text and
|
||||
* the quote depth (depth)
|
||||
*/
|
||||
function decode_textbody($body,$format="fixed") {
|
||||
$tmp = new \stdClass();
|
||||
$body=explode("\n",$body);
|
||||
$nbody=array();
|
||||
$depth=0;
|
||||
$paragraph=""; // empty paragraph
|
||||
$lastline="";
|
||||
for($i=0; $i<count($body)+1; $i++) {
|
||||
// calculate the quote depth of the actual line
|
||||
$ndepth=0;
|
||||
$tdepth=0;
|
||||
for($j=0; $j<=strlen(@$body[$i]); $j++) {
|
||||
$tdepth=$j;
|
||||
if(@$body[$i][$j]=='>') {
|
||||
$ndepth++;
|
||||
} else {
|
||||
if((@$body[$i][$j]!=' ') || (@$body[$i][$j-1]==' ') || ($j==0)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// generate a new paragraph?
|
||||
if(($i>0) && (($ndepth!=$depth) || $format!="flowed" ||
|
||||
(@$paragraph[strlen($paragraph)-1]!=' ')) || ($i==count($body))) {
|
||||
$tmp->text=$paragraph;
|
||||
$tmp->depth=$depth;
|
||||
$paragraph="";
|
||||
if(phpversion()>=5)
|
||||
$nbody[]=clone($tmp);
|
||||
else
|
||||
$nbody[]=$tmp;
|
||||
}
|
||||
if(@$body[$i]=="-- " && $format=="flowed") $body[$i]="--";
|
||||
$paragraph.=substr(@$body[$i],$tdepth);
|
||||
$depth=$ndepth;
|
||||
}
|
||||
return $nbody;
|
||||
}
|
||||
|
||||
/*
|
||||
* replaces multiple spaces in texts by es and convert special-chars
|
||||
* to their entities
|
||||
*/
|
||||
function text2html($text) {
|
||||
return preg_replace("/^ /i"," ",
|
||||
str_replace(" "," ",
|
||||
str_replace(" "," ",
|
||||
str_replace("\n","<br>",
|
||||
htmlspecialchars($text)))));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* print an article to the webpage
|
||||
*
|
||||
* $group: The name of the newsgroup
|
||||
* $id: the ID of the article inside the group or the message-id
|
||||
* $attachment: The number of the attachment of the article.
|
||||
* 0 means the normal textbody.
|
||||
*/
|
||||
function message_show($group,$id,$attachment=0,$article_data=false,$maxlen=false) {
|
||||
global $file_article,$file_article_full;
|
||||
global $text_header,$text_article,$article_showthread,$file_attachment,$attachment_show;
|
||||
global $block_xnoarchive,$article_graphicquotes;
|
||||
global $CONFIG;
|
||||
if ($article_data == false)
|
||||
$article_data=message_read($id,$attachment,$group);
|
||||
$head=$article_data->header;
|
||||
$local_poster=false;
|
||||
if(password_verify($CONFIG['thissitekey'].$head->id, $head->rslight_site)) {
|
||||
$local_poster=true;
|
||||
}
|
||||
$body=$article_data->body[$attachment];
|
||||
if ($head) {
|
||||
if (($block_xnoarchive) && (isset($head->xnoarchive)) &&
|
||||
($head->xnoarchive=="yes")) {
|
||||
echo $text_article["block-xnoarchive"];
|
||||
} else
|
||||
if (($head->content_type[$attachment]=="text/plain") &&
|
||||
($attachment==0)) {
|
||||
show_header($head,$group,$local_poster);
|
||||
//RSLIGHT Encryption
|
||||
$encrypted=false;
|
||||
if((isset($article_data->header->rslight_to)) && (password_verify($CONFIG['thissitekey'].$head->id, $head->rslight_site))) {
|
||||
echo 'This is an encrypted message for <b>'.$article_data->header->rslight_to.' </b>';
|
||||
echo '<form action="decrypt.php?id='.$id.'&group='.$group.'" method="post">';
|
||||
echo '<p>Enter Password: <input type="password" name="decryptpass" /> ';
|
||||
echo '<input type="hidden" name="decryptuser" value="'.$article_data->header->rslight_to.'">';
|
||||
echo '<input type="submit" value="Decrypt"></p>';
|
||||
echo '</form>';
|
||||
$encrypted=true;
|
||||
}
|
||||
if($encrypted === false) {
|
||||
$body=decode_textbody($body,
|
||||
$article_data->header->content_type_format[$attachment]);
|
||||
}
|
||||
/* FIXME
|
||||
if((isset($article_data->header->rslight_to)) && !(password_verify($CONFIG['thissitekey'].$head->id, $head->rslight_site))) {
|
||||
echo "<b>rslight encrypted message.</b>";
|
||||
$body="";
|
||||
}
|
||||
*/
|
||||
$depth=0;
|
||||
if (isset($CONFIG['synchronet']) && ($CONFIG['synchronet'] == true)) {
|
||||
echo '<div class="np_article_body_synch">';
|
||||
} else {
|
||||
echo '<div class="np_article_body">';
|
||||
}
|
||||
$currentlen=0; // needed if $maxlen is set
|
||||
for ($i=0; $i<=count($body) &&
|
||||
(($currentlen<$maxlen) || ($maxlen==false)); $i++) {
|
||||
// HTMLized Quotings instead of boring > ?
|
||||
if($article_graphicquotes) {
|
||||
// HTMLized Quotings
|
||||
for($j=$depth; $j<@$body[$i]->depth; $j++)
|
||||
echo '<blockquote class="np_article_quote">';
|
||||
for($j=@$body[$i]->depth; $j<$depth; $j++)
|
||||
echo '</blockquote>';
|
||||
$t=html_parse(text2html(@$body[$i]->text)).'<br>';
|
||||
echo $t;
|
||||
$currentlen+=strlen($t);
|
||||
echo "\n";
|
||||
$depth=@$body[$i]->depth;
|
||||
} else {
|
||||
// Boring old Quotings with >
|
||||
if($body[$i]->depth==0) {
|
||||
if(trim($body[$i]->text)=='')
|
||||
$t="<br>\n";
|
||||
else
|
||||
$t=html_parse(text2html($body[$i]->text))."<br>\n";
|
||||
} else {
|
||||
$t='<i>'.str_repeat('>',$body[$i]->depth).' '.
|
||||
html_parse(text2html(
|
||||
textwrap($body[$i]->text,72-$body[$i]->depth,
|
||||
"\n".str_repeat('>',$body[$i]->depth).' '))).
|
||||
"</i><br>\n";
|
||||
}
|
||||
echo $t;
|
||||
$currentlen+=strlen($t);
|
||||
}
|
||||
}
|
||||
if($maxlen!=false && $currentlen>=$maxlen) {
|
||||
echo '<br><a href="'.$file_article_full.'?id='.$id.'&group='.
|
||||
$group.'">'.$text_article["full_article"].'</a>';
|
||||
}
|
||||
// If attachment is image embed into article
|
||||
if ((isset($attachment_show)) && ($attachment_show==true) &&
|
||||
(isset($head->content_type[1]))) {
|
||||
echo $text_header["attachments"];
|
||||
for ($i=1; $i<count($head->content_type); $i++) {
|
||||
if(!strcmp($head->content_type[$i],"text/html")) {
|
||||
$contype = "HTML Version";
|
||||
} else {
|
||||
$contype = $head->content_type_name[$i];
|
||||
}
|
||||
$type=explode('/', $head->content_type[$i]);
|
||||
if(trim($type[0]) == "image") {
|
||||
echo '<a href="'.$file_attachment.'?group='.urlencode($group).'&'.
|
||||
'id='.urlencode($head->number).'&'.
|
||||
'attachment='.$i.'">'.
|
||||
'<img src="'.$file_attachment.'?group='.urlencode($group).'&'.
|
||||
'id='.urlencode($head->number).'&'.
|
||||
'attachment='.$i.'" title="'.$contype.'" alt="'.$contype.'" style="max-width: 20vw; max-height: 100px;"></a> ';
|
||||
} else {
|
||||
echo '<a href="'.$file_attachment.'?group='.urlencode($group).'&'.
|
||||
'id='.urlencode($head->number).'&'.
|
||||
'attachment='.$i.'">'.
|
||||
$contype.'</a> ('.
|
||||
$head->content_type[$i].')';
|
||||
}
|
||||
if ($i<count($head->content_type)-1) echo ', ';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
} else {
|
||||
echo $body;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function message_decrypt($key,$group,$id,$attachment=0,$article_data=false,$maxlen=false) {
|
||||
global $file_article,$file_article_full;
|
||||
global $text_header,$text_article,$article_showthread;
|
||||
global $block_xnoarchive,$article_graphicquotes;
|
||||
if ($article_data == false)
|
||||
$article_data=message_read($id,$attachment,$group);
|
||||
$head=$article_data->header;
|
||||
$body=$article_data->body[$attachment];
|
||||
if ($head) {
|
||||
if (($block_xnoarchive) && (isset($head->xnoarchive)) &&
|
||||
($head->xnoarchive=="yes")) {
|
||||
echo $text_article["block-xnoarchive"];
|
||||
} else
|
||||
if (($head->content_type[$attachment]=="text/plain") &&
|
||||
($attachment==0)) {
|
||||
show_header($head,$group);
|
||||
//RSLIGHT Decrypt here
|
||||
$body=str_replace("-- RSLIGHT DAT START\n","",$body);
|
||||
$body=str_replace("\n-- RSLIGHT DAT END","",$body);
|
||||
$body=rslight_decrypt($body,$key);
|
||||
$body=decode_textbody($body,
|
||||
$article_data->header->content_type_format[$attachment]);
|
||||
$depth=0;
|
||||
echo '<div class="np_article_body">';
|
||||
$currentlen=0; // needed if $maxlen is set
|
||||
for ($i=0; $i<=count($body) &&
|
||||
(($currentlen<$maxlen) || ($maxlen==false)); $i++) {
|
||||
// HTMLized Quotings instead of boring > ?
|
||||
if($article_graphicquotes) {
|
||||
// HTMLized Quotings
|
||||
for($j=$depth; $j<$body[$i]->depth; $j++)
|
||||
echo '<blockquote class="np_article_quote">';
|
||||
for($j=$body[$i]->depth; $j<$depth; $j++)
|
||||
echo '</blockquote>';
|
||||
$t=html_parse(text2html($body[$i]->text)).'<br>';
|
||||
echo $t;
|
||||
$currentlen+=strlen($t);
|
||||
echo "\n";
|
||||
$depth=$body[$i]->depth;
|
||||
} else {
|
||||
// Boring old Quotings with >
|
||||
if($body[$i]->depth==0) {
|
||||
if(trim($body[$i]->text)=='')
|
||||
$t="<br>\n";
|
||||
else
|
||||
$t=html_parse(text2html($body[$i]->text))."<br>\n";
|
||||
} else {
|
||||
$t='<i>'.str_repeat('>',$body[$i]->depth).' '.
|
||||
html_parse(text2html(
|
||||
textwrap($body[$i]->text,72-$body[$i]->depth,
|
||||
"\n".str_repeat('>',$body[$i]->depth).' '))).
|
||||
"</i><br>\n";
|
||||
}
|
||||
echo $t;
|
||||
$currentlen+=strlen($t);
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
if($maxlen!=false && $currentlen>=$maxlen) {
|
||||
echo '<br><a href="'.$file_article_full.'?id='.$id.'&group='.
|
||||
$group.'">'.$text_article["full_article"].'</a>';
|
||||
}
|
||||
} else {
|
||||
echo $body;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Shows the little menu on article-flat.php where you can select the
|
||||
* different pages with the articles on it
|
||||
*/
|
||||
function articleflat_pageselect($group,$id,$article_count,$first) {
|
||||
global $articleflat_articles_per_page,$file_article,$file_framethread,$name;
|
||||
global $text_thread,$thread_show;
|
||||
$pages=ceil($article_count / $articleflat_articles_per_page);
|
||||
$return="";
|
||||
if ($article_count > $articleflat_articles_per_page)
|
||||
$return.= $text_thread["pages"];
|
||||
for ($i = 0; $i < $pages; $i++) {
|
||||
if ($first != $i*$articleflat_articles_per_page+1)
|
||||
$return.= '<a class="np_pages_unselected" href="'.
|
||||
$file_article.'?group='._rawurlencode($group).
|
||||
'&id='.urlencode($id).
|
||||
'&first='.($i*$articleflat_articles_per_page+1).'&last='.
|
||||
($i+1)*$articleflat_articles_per_page.'#start">';
|
||||
else
|
||||
$return.= '<span class="np_pages_selected">';
|
||||
$return.= $i+1;
|
||||
if ($i == $pages-1) {
|
||||
// $return.= $article_count;
|
||||
}
|
||||
if ($first != $i*$articleflat_articles_per_page+1)
|
||||
$return.= '</a>';
|
||||
else
|
||||
$return.= '</span>';
|
||||
}
|
||||
return $return;
|
||||
}
|
|
@ -0,0 +1,364 @@
|
|||
<?php
|
||||
/* rslight NNTP<->HTTP Gateway
|
||||
* Version: 0.6.x
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* Based on Newsportal by Florian Amrhein
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
@session_start();
|
||||
/*
|
||||
* Encode lines with 8bit-characters to quote-printable
|
||||
*
|
||||
* $line: the to be encoded line
|
||||
*
|
||||
* the function returns a sting containing the quoted-printable encoded
|
||||
* $line
|
||||
*/
|
||||
function encode_subject($line) {
|
||||
$newstring=mb_encode_mimeheader(quoted_printable_decode($line));
|
||||
return $newstring;
|
||||
}
|
||||
|
||||
if(!function_exists('quoted_printable_encode'))
|
||||
{
|
||||
function quoted_printable_encode($line) {
|
||||
global $www_charset;
|
||||
$qp_table=array(
|
||||
'=00', '=01', '=02', '=03', '=04', '=05',
|
||||
'=06', '=07', '=08', '=09', '=0A', '=0B',
|
||||
'=0C', '=0D', '=0E', '=0F', '=10', '=11',
|
||||
'=12', '=13', '=14', '=15', '=16', '=17',
|
||||
'=18', '=19', '=1A', '=1B', '=1C', '=1D',
|
||||
'=1E', '=1F', '_', '!', '"', '#',
|
||||
'$', '%', '&', "'", '(', ')',
|
||||
'*', '+', ',', '-', '.', '/',
|
||||
'0', '1', '2', '3', '4', '5',
|
||||
'6', '7', '8', '9', ':', ';',
|
||||
'<', '=3D', '>', '=3F', '@', 'A',
|
||||
'B', 'C', 'D', 'E', 'F', 'G',
|
||||
'H', 'I', 'J', 'K', 'L', 'M',
|
||||
'N', 'O', 'P', 'Q', 'R', 'S',
|
||||
'T', 'U', 'V', 'W', 'X', 'Y',
|
||||
'Z', '[', '\\', ']', '^', '=5F',
|
||||
'', 'a', 'b', 'c', 'd', 'e',
|
||||
'f', 'g', 'h', 'i', 'j', 'k',
|
||||
'l', 'm', 'n', 'o', 'p', 'q',
|
||||
'r', 's', 't', 'u', 'v', 'w',
|
||||
'x', 'y', 'z', '{', '|', '}',
|
||||
'~', '=7F', '=80', '=81', '=82', '=83',
|
||||
'=84', '=85', '=86', '=87', '=88', '=89',
|
||||
'=8A', '=8B', '=8C', '=8D', '=8E', '=8F',
|
||||
'=90', '=91', '=92', '=93', '=94', '=95',
|
||||
'=96', '=97', '=98', '=99', '=9A', '=9B',
|
||||
'=9C', '=9D', '=9E', '=9F', '=A0', '=A1',
|
||||
'=A2', '=A3', '=A4', '=A5', '=A6', '=A7',
|
||||
'=A8', '=A9', '=AA', '=AB', '=AC', '=AD',
|
||||
'=AE', '=AF', '=B0', '=B1', '=B2', '=B3',
|
||||
'=B4', '=B5', '=B6', '=B7', '=B8', '=B9',
|
||||
'=BA', '=BB', '=BC', '=BD', '=BE', '=BF',
|
||||
'=C0', '=C1', '=C2', '=C3', '=C4', '=C5',
|
||||
'=C6', '=C7', '=C8', '=C9', '=CA', '=CB',
|
||||
'=CC', '=CD', '=CE', '=CF', '=D0', '=D1',
|
||||
'=D2', '=D3', '=D4', '=D5', '=D6', '=D7',
|
||||
'=D8', '=D9', '=DA', '=DB', '=DC', '=DD',
|
||||
'=DE', '=DF', '=E0', '=E1', '=E2', '=E3',
|
||||
'=E4', '=E5', '=E6', '=E7', '=E8', '=E9',
|
||||
'=EA', '=EB', '=EC', '=ED', '=EE', '=EF',
|
||||
'=F0', '=F1', '=F2', '=F3', '=F4', '=F5',
|
||||
'=F6', '=F7', '=F8', '=F9', '=FA', '=FB',
|
||||
'=FC', '=FD', '=FE', '=FF');
|
||||
// are there "forbidden" characters in the string?
|
||||
for($i=0; $i<strlen($line) && ord($line[$i])<=127 ; $i++);
|
||||
if ($i<strlen($line)) { // yes, there are. So lets encode them!
|
||||
$from=$i;
|
||||
for($to=strlen($line)-1; ord($line[$to])<=127; $to--);
|
||||
// lets scan for the start and the end of the to be encoded _words_
|
||||
for(;$from>0 && $line[$from] != ' '; $from--);
|
||||
if($from>0) $from++;
|
||||
for(;$to<strlen($line) && $line[$to] != ' '; $to++);
|
||||
// split the string into the to be encoded middle and the rest
|
||||
$begin=substr($line,0,$from);
|
||||
$middle=substr($line,$from,$to-$from);
|
||||
$end=substr($line,$to);
|
||||
// ok, now lets encode $middle...
|
||||
$newmiddle="";
|
||||
for($i=0; $i<strlen($middle); $i++)
|
||||
$newmiddle .= $qp_table[ord($middle[$i])];
|
||||
// now we glue the parts together...
|
||||
$line=$begin.'=?'.$www_charset.'?Q?'.$newmiddle.'?='.$end;
|
||||
}
|
||||
return $line;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* generate a message-id for posting.
|
||||
* $identity: a string containing informations about the article, to
|
||||
* make a md5-hash out of it.
|
||||
*
|
||||
* returns: a complete message-id
|
||||
*/
|
||||
function generate_msgid($identity) {
|
||||
global $msgid_generate,$msgid_fqdn;
|
||||
switch($msgid_generate) {
|
||||
case "no":
|
||||
// no, we don't want to generate a message-id.
|
||||
return false;
|
||||
break;
|
||||
case "md5":
|
||||
return '<'.md5($identity).'$1@'.$msgid_fqdn.'>';
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Post an article to a newsgroup
|
||||
*
|
||||
* $subject: The Subject of the article
|
||||
* $from: The authors name and email of the article
|
||||
* $newsgroups: The groups to post to
|
||||
* $ref: The references of the article
|
||||
* $body: The article itself
|
||||
*/
|
||||
function message_post($subject,$from,$newsgroups,$ref,$body,$encryptthis,$encryptto) {
|
||||
global $server,$port,$send_poster_host,$text_error,$CONFIG;
|
||||
global $www_charset,$spooldir;
|
||||
global $msgid_generate,$msgid_fqdn;
|
||||
flush();
|
||||
$msgid=generate_msgid($subject.",".$from.",".$newsgroups.",".$ref.",".$body);
|
||||
/*
|
||||
* SPAM CHECK
|
||||
*/
|
||||
if ((isset($CONFIG['spamassassin']) && ($CONFIG['spamassassin'] == true))) {
|
||||
$spam_result_array = check_spam($subject,$from,$newsgroups,$ref,$body,$msgid);
|
||||
$res = $spam_result_array['res'];
|
||||
$spamresult = $spam_result_array['spamresult'];
|
||||
$spamcheckerversion = $spam_result_array['spamcheckerversion'];
|
||||
$spamlevel = $spam_result_array['spamlevel'];
|
||||
$spam_fail = $spam_result_array['spam_fail'];
|
||||
}
|
||||
$ns=nntp_open($server,$port);
|
||||
if ($ns != false) {
|
||||
fputs($ns,"POST\r\n");
|
||||
$weg=line_read($ns);
|
||||
$t = explode(' ', $weg);
|
||||
if($t[0] != "340") {
|
||||
nntp_close($ns);
|
||||
return $weg;
|
||||
}
|
||||
fputs($ns,'Subject: '.encode_subject($subject)."\r\n");
|
||||
|
||||
// For Synchronet use
|
||||
if (isset($fromname) && (isset($CONFIG['synchronet']) && ($CONFIG['synchronet'] == true))) {
|
||||
// if ( isset($fromname) && isset($CONFIG['synchronet']) ) {
|
||||
fputs($ns,'To: '.$fromname."\r\n");
|
||||
$fromname="";
|
||||
}
|
||||
|
||||
// X-Rslight headers
|
||||
if ((isset($CONFIG['spamassassin']) && ($CONFIG['spamassassin'] == true))) {
|
||||
if(isset($res) && $spam_fail == 0) {
|
||||
fputs($ns,$spamcheckerversion."\r\n");
|
||||
if(strpos($spamlevel, '*') !== false)
|
||||
fputs($ns,$spamlevel."\r\n");
|
||||
if($res === 1) {
|
||||
fputs($ns,"X-Rslight-Original-Group: ".$newsgroups."\r\n");
|
||||
$newsgroups=$CONFIG['spamgroup'];
|
||||
}
|
||||
}
|
||||
}
|
||||
fputs($ns,'From: '.$from."\r\n");
|
||||
fputs($ns,'Newsgroups: '.$newsgroups."\r\n");
|
||||
$sitekey=password_hash($CONFIG['thissitekey'].$msgid, PASSWORD_DEFAULT);
|
||||
fputs($ns,'X-Rslight-Site: '.$sitekey."\r\n");
|
||||
if(isset($encryptthis)) {
|
||||
fputs($ns,'X-Rslight-To: '.$encryptto."\r\n");
|
||||
$CONFIG['postfooter']="";
|
||||
}
|
||||
fputs($ns,"Mime-Version: 1.0\r\n");
|
||||
fputs($ns,"Content-Type: text/plain; charset=".$www_charset."; format=flowed\r\n");
|
||||
fputs($ns,"Content-Transfer-Encoding: 8bit\r\n");
|
||||
fputs($ns,"User-Agent: Rocksolid Light (news.novabbs.com/getrslight)\r\n");
|
||||
if ($send_poster_host)
|
||||
@fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n");
|
||||
if (($ref!=false) && (count($ref)>0)) {
|
||||
// strip references
|
||||
if(strlen(implode(" ",$ref))>900) {
|
||||
$ref_first=array_shift($ref);
|
||||
do {
|
||||
$ref=array_slice($ref,1);
|
||||
} while(strlen(implode(" ",$ref))>800);
|
||||
array_unshift($ref,$ref_first);
|
||||
}
|
||||
fputs($ns,'References: '.implode(" ",$ref)."\r\n");
|
||||
}
|
||||
if (isset($CONFIG['organization']))
|
||||
fputs($ns,'Organization: '.quoted_printable_encode($CONFIG['organization'])."\r\n");
|
||||
if ((isset($CONFIG['postfooter'])) && ($CONFIG['postfooter']!="")) {
|
||||
$body.="\n-- \n".$CONFIG['postfooter']."\n".$_SERVER['HTTP_HOST'];
|
||||
}
|
||||
fputs($ns,'Message-ID: '.$msgid."\r\n");
|
||||
$body=str_replace("\n.\r","\n..\r",$body);
|
||||
$body=str_replace("\r",'',$body);
|
||||
$body=stripSlashes($body);
|
||||
// Encrypt?
|
||||
if(isset($encryptthis)) {
|
||||
$encryptkey=get_user_config($encryptto, "encryptionkey");
|
||||
|
||||
$body=chunk_split(rslight_encrypt($body, $encryptkey));
|
||||
$body="-- RSLIGHT DAT START\n".$body."-- RSLIGHT DAT END\n";
|
||||
}
|
||||
$body=rtrim($body);
|
||||
fputs($ns,"\r\n".$body."\r\n.\r\n");
|
||||
$message=line_read($ns);
|
||||
nntp_close($ns);
|
||||
} else {
|
||||
$message=$text_error["post_failed"];
|
||||
}
|
||||
// let thread.php ignore the cache for this group, so this new
|
||||
// article will be visible instantly
|
||||
$groupsarr=explode(",",$newsgroups);
|
||||
foreach($groupsarr as $newsgroup) {
|
||||
$cachefile=$spooldir.'/'.$newsgroup.'-cache.txt';
|
||||
@unlink($cachefile);
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
function message_post_with_attachment($subject,$from,$newsgroups,$ref,$body,$encryptthis,$encryptto) {
|
||||
global $server,$port,$send_poster_host,$CONFIG,$text_error;
|
||||
global $file_footer,$www_charset,$spooldir;
|
||||
global $msgid_generate,$msgid_fqdn;
|
||||
global $CONFIG;
|
||||
flush();
|
||||
$msgid=generate_msgid($subject.",".$from.",".$newsgroups.",".$ref.",".$body);
|
||||
/*
|
||||
* SPAM CHECK
|
||||
*/
|
||||
if (isset($CONFIG['spamassassin']) && ($CONFIG['spamassassin'] == true)) {
|
||||
$spam_result_array = check_spam($subject,$from,$newsgroups,$ref,$body,$msgid);
|
||||
$res = $spam_result_array['res'];
|
||||
$spamresult = $spam_result_array['spamresult'];
|
||||
$spamcheckerversion = $spam_result_array['spamcheckerversion'];
|
||||
$spamlevel = $spam_result_array['spamlevel'];
|
||||
}
|
||||
move_uploaded_file($_FILES["photo"]["tmp_name"], $spooldir."/upload/" . $_FILES["photo"]["name"]);
|
||||
$ns=nntp_open($server,$port);
|
||||
if ($ns != false) {
|
||||
fputs($ns,"POST\r\n");
|
||||
$weg=line_read($ns);
|
||||
fputs($ns,'Subject: '.encode_subject($subject)."\r\n");
|
||||
// X-Rslight headers
|
||||
if(isset($res)) {
|
||||
fputs($ns,$spamcheckerversion."\r\n");
|
||||
if(strpos($spamlevel, '*') !== false)
|
||||
fputs($ns,$spamlevel."\r\n");
|
||||
if($res === 1) {
|
||||
fputs($ns,"X-Rslight-Original-Group: ".$newsgroups."\r\n");
|
||||
$newsgroups=$CONFIG['spamgroup'];
|
||||
}
|
||||
}
|
||||
$sitekey=password_hash($CONFIG['thissitekey'].$msgid, PASSWORD_DEFAULT);
|
||||
fputs($ns,'X-Rslight-Site: '.$sitekey."\r\n");
|
||||
if(isset($encryptthis))
|
||||
fputs($ns,'X-Rslight-To: '.$encryptto."\r\n");
|
||||
fputs($ns,'From: '.$from."\r\n");
|
||||
fputs($ns,'Newsgroups: '.$newsgroups."\r\n");
|
||||
fputs($ns,"Mime-Version: 1.0\r\n");
|
||||
/*
|
||||
fputs($ns,"Content-Type: text/plain; charset=".$www_charset."; format=flowed\r\n");
|
||||
*/
|
||||
if ($send_poster_host)
|
||||
@fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n");
|
||||
if (($ref!=false) && (count($ref)>0)) {
|
||||
// strip references
|
||||
if(strlen(implode(" ",$ref))>900) {
|
||||
$ref_first=array_shift($ref);
|
||||
do {
|
||||
$ref=array_slice($ref,1);
|
||||
} while(strlen(implode(" ",$ref))>800);
|
||||
array_unshift($ref,$ref_first);
|
||||
}
|
||||
fputs($ns,'References: '.implode(" ",$ref)."\r\n");
|
||||
}
|
||||
if (isset($CONFIG['organization']))
|
||||
fputs($ns,'Organization: '.quoted_printable_encode($CONFIG['organization'])."\r\n");
|
||||
if ((isset($file_footer)) && ($file_footer!="")) {
|
||||
$footerfile=fopen($file_footer,"r");
|
||||
$body.="\n".fread($footerfile,filesize($file_footer));
|
||||
fclose($footerfile);
|
||||
}
|
||||
$boundary=uniqid('', true);
|
||||
$body.="\r\n--------------".$boundary."\r\n";
|
||||
fputs($ns,'Message-ID: '.$msgid."\r\n");
|
||||
fputs($ns,'Content-Type: multipart/mixed;boundary="------------'.$boundary.'"');
|
||||
fputs($ns,"\r\n");
|
||||
$contenttype = shell_exec('file -b --mime-type '.$spooldir.'/upload/'.$_FILES[photo][name]);
|
||||
$contenttype = rtrim($contenttype);
|
||||
$b64file = shell_exec('uuencode -m '.$spooldir.'/upload/'.$_FILES['photo']['name'].' '.$_FILES['photo']['name'].' | grep -v \'begin-base64\|====\'');
|
||||
$body.='Content-Type: '.$contenttype.';';
|
||||
$body.="\r\n name=".$_FILES['photo']['name'];
|
||||
$body.="\r\nContent-Transfer-Encoding: base64";
|
||||
$body.="\r\nContent-Disposition: attachment;";
|
||||
$body.="\r\n filename=".$_FILES['photo']['name'];
|
||||
$body.="\r\n";
|
||||
$body.="\r\n".$b64file;
|
||||
$body.="\r\n--------------".$boundary."--\r\n";
|
||||
|
||||
// Headers end here
|
||||
|
||||
$body=str_replace("\n.\r","\n..\r",$body);
|
||||
$body=str_replace("\r",'',$body);
|
||||
$body=stripSlashes($body);
|
||||
|
||||
fputs($ns,"\r\nThis is a multi-part message in MIME format.\r\n");
|
||||
fputs($ns,"--------------".$boundary."\r\n");
|
||||
fputs($ns,"Content-Type: text/plain; charset=utf-8\r\n");
|
||||
fputs($ns,"Content-Transfer-Encoding: 7bit\r\n");
|
||||
// Encrypt?
|
||||
if(isset($encryptthis)) {
|
||||
$encryptkey=get_user_config($encryptto, "encryptionkey");
|
||||
|
||||
$body=chunk_split(rslight_encrypt($body, $encryptkey));
|
||||
$body="-- RSLIGHT DAT START\n".$body."-- RSLIGHT DAT END\n";
|
||||
}
|
||||
// Body sent here
|
||||
fputs($ns,"\r\n".$body."\r\n.\r\n");
|
||||
|
||||
$message=line_read($ns);
|
||||
nntp_close($ns);
|
||||
// clean up attachment file
|
||||
unlink($spooldir.'/upload/'.$_FILES["photo"]["name"]);
|
||||
} else {
|
||||
$message=$text_error["post_failed"];
|
||||
}
|
||||
// let thread.php ignore the cache for this group, so this new
|
||||
// article will be visible instantly
|
||||
$groupsarr=explode(",",$newsgroups);
|
||||
foreach($groupsarr as $newsgroup) {
|
||||
$cachefile=$spooldir.'/'.$newsgroup.'-cache.txt';
|
||||
@unlink($cachefile);
|
||||
}
|
||||
return $message;
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/* rslight NNTP<->HTTP Gateway
|
||||
* Version: 0.6.x
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* Based on Newsportal by Florian Amrhein
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* the name and the description of a newsgroup
|
||||
*/
|
||||
class newsgroupType {
|
||||
var $name;
|
||||
var $description;
|
||||
var $count;
|
||||
var $text;
|
||||
}
|
||||
|
||||
/*
|
||||
* Stores a complete article:
|
||||
* - The parsed Header as an headerType
|
||||
* - The bodies and attachments as an array of array of lines
|
||||
*/
|
||||
class messageType {
|
||||
var $header;
|
||||
var $body;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Stores the Header of an article
|
||||
*/
|
||||
class headerType {
|
||||
var $number; // the Number of an article inside a group
|
||||
var $id; // Message-ID
|
||||
var $from; // eMail of the author
|
||||
var $name; // Name of the author
|
||||
var $subject; // the subject
|
||||
var $newsgroups; // the Newsgroups where the article belongs to
|
||||
var $followup;
|
||||
var $date; // timestamp of the article
|
||||
var $date_thread; // timestamp of the newest article in the thread
|
||||
var $organization;
|
||||
var $xnoarchive;
|
||||
var $references; // all references to the article
|
||||
var $bestreference; // nearest reference found
|
||||
var $content_transfer_encoding;
|
||||
var $mime_version;
|
||||
var $content_type; // array, Content-Type of the Body (Index=0) and the
|
||||
// Attachments (Index>0)
|
||||
var $content_type_charset; // like content_type
|
||||
var $content_type_name; // array of the names of the attachments
|
||||
var $content_type_boundary; // The boundary of an multipart-article.
|
||||
var $content_type_format; // array, is the body in flowed format?
|
||||
var $answers; // which articles are followups of this article?
|
||||
var $isAnswer; // is the article an answer to an other article?
|
||||
var $username;
|
||||
var $user_agent;
|
||||
var $isReply; // has this article "Re: " at the beginning of the subject?
|
||||
var $threadsize; // number of articles in this thread
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,243 @@
|
|||
<?php
|
||||
/*
|
||||
* Validator
|
||||
*
|
||||
* Validierung von Formulareingaben
|
||||
*
|
||||
* Autor: Florian Amrhein
|
||||
*/
|
||||
|
||||
class formvalidate {
|
||||
var $fields=array();
|
||||
/*
|
||||
* Überprüft ein komplettes Formular auf korrekte Eingaben, und liefert
|
||||
* false, falls irgendwo ein Fehler vorhanden ist.
|
||||
* Setzt intern die entsprechenden Daten, die show_error und
|
||||
* is_error zum Abfragen der Daten benötigen.
|
||||
*/
|
||||
function validate() {
|
||||
$errors=false;
|
||||
foreach($this->fields as $field) {
|
||||
switch($field->typ) {
|
||||
case "text":
|
||||
case "textarea":
|
||||
case "checkbox":
|
||||
case "radiobutton":
|
||||
// Basteln wegen scheiss PHP
|
||||
$valtmp=$field->validator;
|
||||
// feld_leer*feld_darf_leer +
|
||||
// nicht_feld_leer*(testfkt.ex.*testfkt +
|
||||
// nicht_testfkt.ex)
|
||||
if(
|
||||
(
|
||||
(
|
||||
(!isset($_REQUEST[$field->name])) ||
|
||||
(trim($_REQUEST[$field->name])=="")
|
||||
) &&
|
||||
(isset($field->empty)) &&
|
||||
($field->empty==true)
|
||||
) || (
|
||||
(isset($_REQUEST[$field->name])) &&
|
||||
(trim($_REQUEST[$field->name])!="") &&
|
||||
(
|
||||
($field->validator==false) ||
|
||||
($field->validator!=false) &&
|
||||
(($errmsg=$valtmp($_REQUEST[$field->name]))===true)
|
||||
)
|
||||
)
|
||||
) {
|
||||
// Feld leer und darf leer sein, oder
|
||||
// feld voll und (testfunktion existiert und testfkt.=true
|
||||
// oder testfunktion existiert nicht)
|
||||
$this->fields[$field->name]->error=false;
|
||||
} else {
|
||||
// Feld leer und darf nicht leer sein, oder
|
||||
// Feld voll und testfkt.ex und testfunktion=false
|
||||
$errors=true;
|
||||
$this->fields[$field->name]->error=true;
|
||||
if(isset($errmsg)) {
|
||||
$this->fields[$field->name]->errormessage=$errmsg;
|
||||
unset($errmsg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "pulldown":
|
||||
case "check-text":
|
||||
case "radio-text":
|
||||
if((isset($field->empty)) && (!$field->empty) &&
|
||||
((!isset($_REQUEST[$field->name])) ||
|
||||
(trim($_REQUEST[$field->name])=="") ||
|
||||
(($_REQUEST[$field->name]=="_frei") &&
|
||||
((!isset($_REQUEST[$field->name."_frei"])) ||
|
||||
(trim($_REQUEST[$field->name."_frei"])=="")
|
||||
)
|
||||
)
|
||||
)
|
||||
) {
|
||||
$errors=true;
|
||||
$this->fields[$field->name]->error=true;
|
||||
} else {
|
||||
$this->fields[$field->name]->error=false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// echo '<p>eval: '.$field->name.': '.$_REQUEST[$field->name].'</p>';
|
||||
}
|
||||
return !$errors;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* liefert true, falls $name fehlerhaft ausgefüllt wurde
|
||||
*/
|
||||
function is_error($name) {
|
||||
return $this->fields[$name]->error;
|
||||
}
|
||||
|
||||
/*
|
||||
* Liefert die individuelle Fehlermeldung, falls $name fehlerhaft
|
||||
* ausgefüllt wurde. Falls keine Meldung vorliegt, wird false
|
||||
* geliefert.
|
||||
*/
|
||||
function geterrormessage($name) {
|
||||
if(isset($this->fields[$name]->errormessage))
|
||||
return $this->fields[$name]->errormessage;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Zeigt gegebenenfalls eine Fehlermeldung an, falls $name nicht
|
||||
* korrekt ausgefüllt wurde
|
||||
*/
|
||||
function show_error($name) {
|
||||
if($this->is_error($name)) {
|
||||
echo "<p>fehler</p>";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Zeigt den Titel zu einem Feld an. Ist das zugehörige Feld fehlerhaft
|
||||
* ausgefüllt worden, wird es (z.B. farblich) markiert.
|
||||
*
|
||||
* $name: Name des Feldes
|
||||
* $text: auszugebener Text
|
||||
*/
|
||||
function show_title($name,$text) {
|
||||
if($this->is_error($name))
|
||||
echo '<font color="red"><b>'.$text.'</b></font>';
|
||||
else
|
||||
echo $text;
|
||||
}
|
||||
|
||||
/*
|
||||
* Zeigt die Daten an, die der Benutzer in das Formular, ob richtig oder
|
||||
* falsch ist egal, eingegeben hatte.
|
||||
*/
|
||||
function show_value($name) {
|
||||
echo stripslashes($_REQUEST[$name]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Liefert Variablenwerte ohne vorherige Umkodierung/Zusammenfassung
|
||||
* zurück
|
||||
*/
|
||||
function value($name) {
|
||||
if(is_array($_REQUEST[$name])) {
|
||||
$a=$_REQUEST[$name];
|
||||
return $a;
|
||||
}
|
||||
return stripslashes($_REQUEST[$name]);
|
||||
}
|
||||
|
||||
/* Liefert Variablenwerte mit vorheriger Umkodierung/Zusammenfassung
|
||||
* zurück. Vor allem wichtig bei Typ check-text und radio-text, wo
|
||||
* der eigentliche Inhalt über mehrere Variablen verteilt ist, bzw.
|
||||
* teilweise gar nicht zum Zuge kommt (freies Textfeld ausgefüllt,
|
||||
* aber nicht angeklickt)
|
||||
*/
|
||||
function get_value($name) {
|
||||
if(is_array($_REQUEST[$name])) {
|
||||
$a=$_REQUEST[$name];
|
||||
// Freies Textfeld?
|
||||
if(in_array("_frei",$a)) {
|
||||
if((isset($_REQUEST[$name.'_frei'])) &&
|
||||
($_REQUEST[$name.'_frei']!=""))
|
||||
$a[]=$_REQUEST[$name.'_frei'];
|
||||
unset($a[$name.'_frei']);
|
||||
}
|
||||
|
||||
return $a;
|
||||
} else if(($_REQUEST[$name]=='_frei') &&
|
||||
($this->fields[$name]->typ=='radio-text')) {
|
||||
return stripslashes($_REQUEST[$name.'_frei']);
|
||||
} else
|
||||
return stripslashes($_REQUEST[$name]);
|
||||
}
|
||||
|
||||
/*
|
||||
* gibt einfach nur " checked" aus, wenn $name den wert $value enthält.
|
||||
* Nötig für das Vorselektieren von Knöpfen
|
||||
*/
|
||||
function show_checked($name,$value) {
|
||||
global $fields;
|
||||
if(($this->fields[$name]->typ!="checkbox") &&
|
||||
($this->fields[$name]->typ!="check-text")) {
|
||||
if($this->value($name)==$value) {
|
||||
if($this->fields[$name]->typ=="pulldown")
|
||||
echo ' selected';
|
||||
else
|
||||
echo ' checked';
|
||||
}
|
||||
} else {
|
||||
if(in_array($value,$this->value($name)))
|
||||
echo ' checked';
|
||||
}
|
||||
}
|
||||
|
||||
function show_selected($name,$value) {
|
||||
global $fields;
|
||||
if(($this->fields[$name]->typ!="checkbox") &&
|
||||
($this->fields[$name]->typ!="check-text")) {
|
||||
if($this->value($name)==$value) {
|
||||
echo ' selected';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Registriert eine Variable als zum Formular gehörend
|
||||
*
|
||||
* $name: Name der Variablen
|
||||
* $typ: Art der Eingabe:
|
||||
* - text: Textfeld mit einfacher freier Eingabe
|
||||
* - textarea: Mehrzeiliger Text mit freier Eingabe
|
||||
* - checkbox: Ankreuzfelder, mehrere gleichzeitig
|
||||
* - radiobutton: Ankreuzfelder, nur eins gleichzeitig
|
||||
* - pulldown: Pulldown-Menu, nut eins gleichzeitig
|
||||
* - check-text: Ankreuzfelder+Textfeld, mehrere gleichzeitig
|
||||
* - radio-text: Ankreuzfelder+Textfeld, maximal eins
|
||||
* $empty: Darf das entsprechende Feld leer gelassen werden?
|
||||
* bzw. mindestens kein angekreuzt bzw. ausgefüllt?
|
||||
* $validator: Information, wie der Inhalt auf Korrektheit geprüft
|
||||
* werden soll
|
||||
* $errmsg: Fehlermeldung, die bei erkanntem Fehler ausgegeben
|
||||
* werden soll
|
||||
*/
|
||||
function register($name,$typ,$empty=true,$validator=false,$errmsg=false) {
|
||||
$var->name=$name;
|
||||
$var->typ=$typ;
|
||||
$var->empty=$empty;
|
||||
$var->validator=$validator;
|
||||
$var->errmsg=$errmsg;
|
||||
$this->fields[$name]=$var;
|
||||
}
|
||||
|
||||
/*
|
||||
* der Konstruktor
|
||||
*/
|
||||
function formvalidate() {
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,622 @@
|
|||
#!/usr/bin/php
|
||||
|
||||
<?php
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
/**
|
||||
* Listens for requests and forks on each connection
|
||||
*/
|
||||
|
||||
$__server_listening = true;
|
||||
|
||||
//error_reporting(E_ALL);
|
||||
set_time_limit(0);
|
||||
ob_implicit_flush();
|
||||
declare(ticks = 1);
|
||||
|
||||
become_daemon();
|
||||
|
||||
/* nobody/nogroup, change to your host's uid/gid of the non-priv user */
|
||||
|
||||
/* handle signals */
|
||||
pcntl_signal(SIGTERM, 'sig_handler');
|
||||
pcntl_signal(SIGINT, 'sig_handler');
|
||||
pcntl_signal(SIGCHLD, 'sig_handler');
|
||||
|
||||
/* change this to your own host / port */
|
||||
server_loop($local_server, $local_port);
|
||||
|
||||
/**
|
||||
* Change the identity to a non-priv user
|
||||
*/
|
||||
function change_identity( $uid, $gid )
|
||||
{
|
||||
if( !posix_setgid( $gid ) )
|
||||
{
|
||||
print "Unable to setgid to " . $gid . "!\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if( !posix_setuid( $uid ) )
|
||||
{
|
||||
print "Unable to setuid to " . $uid . "!\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates a server socket and listens for incoming client connections
|
||||
* @param string $address The address to listen on
|
||||
* @param int $port The port to listen on
|
||||
*/
|
||||
function server_loop($address, $port)
|
||||
{
|
||||
GLOBAL $__server_listening;
|
||||
GLOBAL $config_name,$webserver_uid,$webserver_gid,$installed_path,$config_path,$groupconfig,$workpath,$path,$spooldir,$group,$auth_ok;
|
||||
|
||||
$lockfile = sys_get_temp_dir() . '/'.$config_name.'-nntp.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting Rocksolid Light NNTP Server...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "Rocksolid Light NNTP Server currently running\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$auth_ok = 0;
|
||||
$user = "";
|
||||
$pass = "";
|
||||
if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0)
|
||||
{
|
||||
echo "failed to create socket: ".socket_strerror($sock)."\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
if(($ret = socket_bind($sock, $address, $port)) < 0)
|
||||
{
|
||||
echo "failed to bind socket: ".socket_strerror($ret)."\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
if( ( $ret = socket_listen( $sock, 0 ) ) < 0 )
|
||||
{
|
||||
echo "failed to listen to socket: ".socket_strerror($ret)."\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
socket_set_nonblock($sock);
|
||||
change_identity($webserver_uid,$webserver_gid);
|
||||
echo "waiting for clients to connect\n";
|
||||
|
||||
while ($__server_listening)
|
||||
{
|
||||
$connection = @socket_accept($sock);
|
||||
if ($connection === false)
|
||||
{
|
||||
usleep(100);
|
||||
}elseif ($connection > 0)
|
||||
{
|
||||
handle_client($sock, $connection);
|
||||
}else
|
||||
{
|
||||
echo "error: ".socket_strerror($connection);
|
||||
die;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Signal handler
|
||||
*/
|
||||
function sig_handler($sig)
|
||||
{
|
||||
switch($sig)
|
||||
{
|
||||
case SIGTERM:
|
||||
case SIGINT:
|
||||
exit();
|
||||
break;
|
||||
|
||||
case SIGCHLD:
|
||||
pcntl_waitpid(-1, $status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a new client connection
|
||||
*/
|
||||
function handle_client($ssock, $csock)
|
||||
{
|
||||
GLOBAL $__server_listening;
|
||||
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid == -1)
|
||||
{
|
||||
/* fork failed */
|
||||
echo "fork failure!\n";
|
||||
die;
|
||||
}elseif ($pid == 0)
|
||||
{
|
||||
/* child process */
|
||||
$__server_listening = false;
|
||||
socket_close($ssock);
|
||||
interact($csock);
|
||||
socket_close($csock);
|
||||
}else
|
||||
{
|
||||
socket_close($csock);
|
||||
}
|
||||
}
|
||||
|
||||
function interact($msgsock)
|
||||
{
|
||||
global $installed_path,$config_path,$config_name,$groupconfig,$workpath,$path,$spooldir,$group,$auth_ok,$user,$pass;
|
||||
|
||||
$workpath=$spooldir."/";
|
||||
$path=$workpath."articles/";
|
||||
$groupconfig=$config_path."groups.txt";
|
||||
|
||||
|
||||
/* END CONFIG */
|
||||
|
||||
$group="none";
|
||||
/* Send instructions. */
|
||||
$msg = "200 Rocksolid Light NNTP Server ready (no posting)\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
do {
|
||||
echo $msg."\r\n";
|
||||
if (false === ($buf = socket_read($msgsock, 2048, PHP_NORMAL_READ))) {
|
||||
echo "socket_read() failed: reason: " . socket_strerror(socket_last_error($msgsock)) . "\n";
|
||||
break;
|
||||
}
|
||||
if (!$buf = trim($buf)) {
|
||||
continue;
|
||||
}
|
||||
echo $buf."\r\n\r\n";
|
||||
$command = explode(' ', $buf);
|
||||
$command[0] = strtolower($command[0]);
|
||||
if(isset($command[1])) {
|
||||
$command[1] = strtolower($command[1]);
|
||||
}
|
||||
if ($command[0] == 'list') {
|
||||
if(isset($command[1])) {
|
||||
$msg = get_list($command[1]);
|
||||
} else {
|
||||
$msg = get_list("active");
|
||||
}
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'post') {
|
||||
if($auth_ok == 0) {
|
||||
$msg = "480 Posting not permitted\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
@mkdir($spooldir."/".$config_name."/outgoing/",0755,'recursive');
|
||||
$msg = "340 Send article to be posted\r\n";
|
||||
$postfilename = tempnam($spooldir.'/'.$config_name.'/outgoing', '');
|
||||
$postfilehandle = fopen($postfilename, 'wb');
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
$buf = socket_read($msgsock, 2048, PHP_NORMAL_READ);
|
||||
$buf = socket_read($msgsock, 2048, PHP_NORMAL_READ);
|
||||
while (trim($buf) != '.') {
|
||||
fwrite($postfilehandle, $buf);
|
||||
$buf = socket_read($msgsock, 2048, PHP_NORMAL_READ);
|
||||
}
|
||||
fclose($postfilehandle);
|
||||
$msg = "240 Article received OK\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'newgroups') {
|
||||
$msg = get_newgroups($command);
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'authinfo') {
|
||||
if($command[1] == 'user') {
|
||||
$user = $command[2];
|
||||
if(isset($command[3])) {
|
||||
$user = $user." ".$command[3];
|
||||
}
|
||||
$msg="381 Enter password\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[1] == 'pass') {
|
||||
if($user == "") {
|
||||
$msg="482 Authentication commands issued out of sequence\r\n";
|
||||
} else {
|
||||
$pass = $command[2];
|
||||
if (check_bbs_auth($user,$pass)) {
|
||||
$auth_ok = 1;
|
||||
$msg="281 Authentication succeeded\r\n";
|
||||
} else {
|
||||
$auth_ok = 0;
|
||||
$msg="481 Authentication failed\r\n";
|
||||
}
|
||||
}
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
$msg="501 Syntax error\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'mode') {
|
||||
$msg = "200 Rocksolid Light NNRP Server ready (no posting)\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'article') {
|
||||
$msg = get_article($command[1], $group);
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'head') {
|
||||
$msg = get_header($command[1]);
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'group') {
|
||||
$group=$command[1];
|
||||
$msg = get_group($group);
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'xgtitle') {
|
||||
if(isset($command[1])) {
|
||||
$msg = get_title($command[1]);
|
||||
} else {
|
||||
$msg = get_title("active");
|
||||
}
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'xover') {
|
||||
$msg = get_xover($command[1]);
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'help') {
|
||||
$msg = "100 Sorry, can't help\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
continue;
|
||||
}
|
||||
if ($command[0] == 'quit') {
|
||||
$msg = "205 closing connection - goodbye!\r\n";
|
||||
socket_write($msgsock, $msg, strlen($msg));
|
||||
break;
|
||||
}
|
||||
echo $msg."\r\n";
|
||||
$talkback = "500 Syntax error or unknown command\r\n";
|
||||
socket_write($msgsock, $talkback, strlen($talkback));
|
||||
} while (true);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Become a daemon by forking and closing the parent
|
||||
*/
|
||||
function become_daemon()
|
||||
{
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid == -1)
|
||||
{
|
||||
/* fork failed */
|
||||
echo "fork failure!\n";
|
||||
exit();
|
||||
}elseif ($pid)
|
||||
{
|
||||
/* close the parent */
|
||||
exit();
|
||||
}else
|
||||
{
|
||||
/* child becomes our daemon */
|
||||
posix_setsid();
|
||||
chdir('/');
|
||||
umask(0);
|
||||
return posix_getpid();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function get_post($command) {
|
||||
global $spooldir, $auth_ok;
|
||||
|
||||
|
||||
|
||||
return $filename."\r\n";
|
||||
}
|
||||
|
||||
function get_title($mode) {
|
||||
global $group,$workpath,$spooldir,$path;
|
||||
$mode = strtolower($mode);
|
||||
if($mode == "active") {
|
||||
$msg="481 descriptions unavailable\r\n";
|
||||
return $msg;
|
||||
}
|
||||
if(!file_exists($spooldir."/".$mode."-title")) {
|
||||
$msg="481 descriptions unavailable\r\n";
|
||||
return $msg;
|
||||
}
|
||||
$title = file_get_contents($spooldir."/".$mode."-title");
|
||||
$msg="282 list of group and description follows\r\n";
|
||||
$msg.=$title;
|
||||
|
||||
$msg.=".\r\n";
|
||||
return $msg;
|
||||
}
|
||||
|
||||
function get_xover($articles,$mode) {
|
||||
global $group,$workpath,$path;
|
||||
if($group == 'none') {
|
||||
$msg="412 no newsgroup selected\r\n";
|
||||
return $msg;
|
||||
}
|
||||
$overviewdata = file($workpath.$group."-overview");
|
||||
$article_num = explode('-', $articles);
|
||||
$first = $article_num[0];
|
||||
if(isset($article_num[1]) && is_numeric($article_num[1]))
|
||||
$last = $article_num[1];
|
||||
else {
|
||||
if(strpos($articles, "-")) {
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $group);
|
||||
$articles = scandir($thisgroup);
|
||||
$ok_article=array();
|
||||
foreach($articles as $article) {
|
||||
if(!is_numeric($article)) {
|
||||
continue;
|
||||
}
|
||||
$ok_article[]=$article;
|
||||
}
|
||||
sort($ok_article);
|
||||
$last = $ok_article[key(array_slice($ok_article, -1, 1, true))];
|
||||
if(!is_numeric($last))
|
||||
$last = 0;
|
||||
} else {
|
||||
$last = $first;
|
||||
}
|
||||
}
|
||||
$msg="224 Overview information follows for articles ".$first." through ".$last."\r\n";
|
||||
|
||||
foreach($overviewdata as $overviewline) {
|
||||
$article=preg_split("/[\s,]+/", $overviewline);
|
||||
for($i=$first; $i<=$last; $i++) {
|
||||
if($article[0] === strval($i)) {
|
||||
$msg.=$overviewline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$msg.=".\r\n";
|
||||
return $msg;
|
||||
}
|
||||
|
||||
function get_article($article, $group) {
|
||||
global $path,$group,$groupconfig,$config_name,$spooldir;
|
||||
$msg2="";
|
||||
// By Message-ID
|
||||
if($article[0] === '<') {
|
||||
$overviewdata = file($spooldir."/".$config_name."-overview", FILE_IGNORE_NEW_LINES);
|
||||
foreach($overviewdata as $overviewline) {
|
||||
$articledata = explode(':#rsl#:', $overviewline);
|
||||
if(!strcasecmp($articledata[2], $article)) {
|
||||
$group=$articledata[0];
|
||||
$article=$articledata[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
// By article number
|
||||
if($group === "") {
|
||||
$msg.="412 no newsgroup has been selected\r\n";
|
||||
return $msg;
|
||||
}
|
||||
if(!is_numeric($article)) {
|
||||
$msg.="420 no article has been selected\r\n";
|
||||
return $msg;
|
||||
}
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $group);
|
||||
if(!file_exists($thisgroup."/".$article)) {
|
||||
$msg.="430 no such article found\r\n";
|
||||
return $msg;
|
||||
}
|
||||
$thisarticle=file($thisgroup."/".$article, FILE_IGNORE_NEW_LINES);
|
||||
foreach($thisarticle as $thisline) {
|
||||
if((strpos($thisline, "Message-ID: ") === 0) && !isset($mid[1])) {
|
||||
$mid=explode(': ', $thisline);
|
||||
}
|
||||
$msg2.=$thisline."\r\n";
|
||||
}
|
||||
$msg="220 ".$article." ".$mid[1]." article retrieved - head and body follow\r\n";
|
||||
return $msg.$msg2;
|
||||
}
|
||||
|
||||
function get_header($article) {
|
||||
global $path,$group,$groupconfig;
|
||||
if($group === "") {
|
||||
$msg.="412 no newsgroup has been selected\r\n";
|
||||
return $msg;
|
||||
}
|
||||
if(!is_numeric($article)) {
|
||||
$msg.="420 no article has been selected\r\n";
|
||||
return $msg;
|
||||
}
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $group);
|
||||
if(!file_exists($thisgroup."/".$article)) {
|
||||
$msg.="430 no such article found\r\n";
|
||||
return $msg;
|
||||
}
|
||||
$thisarticle=file($thisgroup."/".$article, FILE_IGNORE_NEW_LINES);
|
||||
foreach($thisarticle as $thisline) {
|
||||
if($thisline == "") {
|
||||
$msg2.=".\r\n";
|
||||
break;
|
||||
}
|
||||
if((strpos($thisline, "Message-ID: ") === 0) && !isset($mid[1])) {
|
||||
$mid=explode(': ', $thisline);
|
||||
}
|
||||
$msg2.=$thisline."\r\n";
|
||||
}
|
||||
$msg="221 ".$article." ".$mid[1]." article retrieved - header follows\r\n";
|
||||
return $msg.$msg2;
|
||||
}
|
||||
|
||||
function get_group($group) {
|
||||
global $path,$group,$groupconfig;
|
||||
$grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES);
|
||||
$ok_group=false;
|
||||
$count=0;
|
||||
foreach($grouplist as $findgroup) {
|
||||
$name=explode(' ',$findgroup);
|
||||
$name[0]=strtolower($name[0]);
|
||||
$group=strtolower($group);
|
||||
if(!strcmp($name[0], $group)) {
|
||||
$ok_group=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $group);
|
||||
if(!is_dir($thisgroup) || $ok_group === false) {
|
||||
$msg.="411 no such news group\r\n";
|
||||
$group="";
|
||||
return $msg;
|
||||
}
|
||||
$articles = scandir($thisgroup);
|
||||
$ok_article=array();
|
||||
foreach($articles as $article) {
|
||||
if(!is_numeric($article)) {
|
||||
continue;
|
||||
}
|
||||
$ok_article[]=$article;
|
||||
$count++;
|
||||
}
|
||||
sort($ok_article);
|
||||
$last = $ok_article[key(array_slice($ok_article, -1, 1, true))];
|
||||
$first = $ok_article[0];
|
||||
if(!is_numeric($last))
|
||||
$last = 0;
|
||||
if(!is_numeric($first))
|
||||
$first = 0;
|
||||
$msg="211 ".$count." ".$first." ".$last." ".$group." group selected\r\n";
|
||||
return $msg;
|
||||
}
|
||||
|
||||
function get_newgroups($mode) {
|
||||
global $path,$groupconfig;
|
||||
$grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES);
|
||||
// $mode = strtolower($mode);
|
||||
$mode = "active";
|
||||
if($mode == "active") {
|
||||
$msg = '231 list of newsgroups follows"'."\r\n";
|
||||
foreach($grouplist as $findgroup) {
|
||||
$name=explode(' ',$findgroup);
|
||||
if($name[0][0] === ':')
|
||||
continue;
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $name[0]);
|
||||
$articles = scandir($thisgroup);
|
||||
$ok_article=array();
|
||||
foreach($articles as $article) {
|
||||
if(!is_numeric($article)) {
|
||||
continue;
|
||||
}
|
||||
$ok_article[]=$article;
|
||||
}
|
||||
sort($ok_article);
|
||||
$last = $ok_article[key(array_slice($ok_article, -1, 1, true))];
|
||||
$first = $ok_article[0];
|
||||
if(!is_numeric($last))
|
||||
$last = 0;
|
||||
if(!is_numeric($first))
|
||||
$first = 0;
|
||||
$msg.=$name[0]." ".$last." ".$first." n\r\n";
|
||||
}
|
||||
}
|
||||
if($mode == "newsgroups") {
|
||||
$msg = '215 list of newsgroups and descriptions follows"'."\r\n";
|
||||
foreach($grouplist as $findgroup) {
|
||||
if($findgroup[0] === ':')
|
||||
continue;
|
||||
$msg.=$findgroup."\r\n";
|
||||
}
|
||||
}
|
||||
if($mode == "overview.fmt") {
|
||||
$msg="215 Order of fields in overview database.\r\n";
|
||||
$msg.="Subject:\r\n";
|
||||
$msg.="From:\r\n";
|
||||
$msg.="Date:\r\n";
|
||||
$msg.="Message-ID:\r\n";
|
||||
$msg.="References:\r\n";
|
||||
$msg.="Bytes:\r\n";
|
||||
$msg.="Lines:\r\n";
|
||||
$msg.="Xref:full\r\n";
|
||||
}
|
||||
if(isset($msg)) {
|
||||
return $msg.".\r\n";
|
||||
} else {
|
||||
$msg="501 Syntax error or unknown command\r\n";
|
||||
return $msg.".\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
function get_list($mode) {
|
||||
global $path,$groupconfig;
|
||||
$grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES);
|
||||
$mode = strtolower($mode);
|
||||
if($mode == "active") {
|
||||
$msg = '215 list of newsgroups follows"'."\r\n";
|
||||
foreach($grouplist as $findgroup) {
|
||||
$name=explode(' ',$findgroup);
|
||||
if($name[0][0] === ':')
|
||||
continue;
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $name[0]);
|
||||
$articles = scandir($thisgroup);
|
||||
$ok_article=array();
|
||||
foreach($articles as $article) {
|
||||
if(!is_numeric($article)) {
|
||||
continue;
|
||||
}
|
||||
$ok_article[]=$article;
|
||||
}
|
||||
sort($ok_article);
|
||||
$last = $ok_article[key(array_slice($ok_article, -1, 1, true))];
|
||||
$first = $ok_article[0];
|
||||
if(!is_numeric($last))
|
||||
$last = 0;
|
||||
if(!is_numeric($first))
|
||||
$first = 0;
|
||||
$msg.=$name[0]." ".$last." ".$first." n\r\n";
|
||||
}
|
||||
}
|
||||
if($mode == "newsgroups") {
|
||||
$msg = '215 list of newsgroups and descriptions follows"'."\r\n";
|
||||
foreach($grouplist as $findgroup) {
|
||||
if($findgroup[0] === ':')
|
||||
continue;
|
||||
$msg.=$findgroup."\r\n";
|
||||
}
|
||||
}
|
||||
if($mode == "overview.fmt") {
|
||||
$msg="215 Order of fields in overview database.\r\n";
|
||||
$msg.="Subject:\r\n";
|
||||
$msg.="From:\r\n";
|
||||
$msg.="Date:\r\n";
|
||||
$msg.="Message-ID:\r\n";
|
||||
$msg.="References:\r\n";
|
||||
$msg.="Bytes:\r\n";
|
||||
$msg.="Lines:\r\n";
|
||||
$msg.="Xref:full\r\n";
|
||||
}
|
||||
if(isset($msg)) {
|
||||
return $msg.".\r\n";
|
||||
} else {
|
||||
$msg="501 Syntax error or unknown command\r\n";
|
||||
return $msg.".\r\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
<?php
|
||||
/* rocksolid overboard - overboard for rslight
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
include "config.inc.php";
|
||||
include "auth.inc";
|
||||
include "$file_newsportal";
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?content='+encodeURIComponent(contentURL);
|
||||
}
|
||||
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
if (isset($_GET['thisgroup'])) {
|
||||
$title.=" - "._rawurldecode(_rawurldecode($_GET['thisgroup']))." - latest messages";
|
||||
} else {
|
||||
$title.=" - ".$config_name." - overboard";
|
||||
}
|
||||
include "head.inc";
|
||||
$CONFIG = include($config_file);
|
||||
|
||||
# How many days old should articles be displayed?
|
||||
if (isset($_GET['thisgroup'])) {
|
||||
$article_age = 30;
|
||||
} else {
|
||||
$article_age = 7;
|
||||
}
|
||||
|
||||
# Maximum number of articles to show
|
||||
$maxdisplay = 1000;
|
||||
|
||||
# How many characters of the body to display per article
|
||||
$snippetlength = 240;
|
||||
|
||||
# How short of a snippet is ok
|
||||
$snippetshort = 20;
|
||||
|
||||
$quotefinder = '>';
|
||||
|
||||
$spoolpath_regexp = '/'.preg_replace('/\//', '\\/', $spoolpath).'/';
|
||||
$thissite = '.';
|
||||
|
||||
$groupconfig=$file_groups;
|
||||
$cachefile=$spooldir."/".$config_name."-overboard.cache";
|
||||
|
||||
$oldest = (time() - (86400 * $article_age));
|
||||
|
||||
if (isset($_GET['thisgroup'])) {
|
||||
$grouplist = array();
|
||||
$grouplist[0] = _rawurldecode(_rawurldecode($_GET['thisgroup']));
|
||||
$cachefile=$cachefile.'.'.$grouplist[0];
|
||||
} else {
|
||||
$grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES);
|
||||
}
|
||||
|
||||
/* If cache is less than ? seconds old, use it */
|
||||
if(is_file($cachefile)) {
|
||||
$stats = stat($cachefile);
|
||||
if($stats[9] > (time() - 60)) {
|
||||
echo file_get_contents($cachefile);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
ob_start();
|
||||
# Iterate through groups
|
||||
|
||||
$articles = array();
|
||||
foreach($grouplist as $findgroup) {
|
||||
$groups = explode(" ", $findgroup);
|
||||
$findgroup = $groups[0];
|
||||
|
||||
$none=0;
|
||||
$overboard_noshow = explode(' ', $CONFIG['overboard_noshow']);
|
||||
foreach($overboard_noshow as $noshow) {
|
||||
if ((strpos($findgroup, $noshow) !== false) && !isset($_GET['thisgroup'])) {
|
||||
$none=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($none == 1) {
|
||||
continue;
|
||||
}
|
||||
$thisgroup = preg_replace('/\./', '/', $findgroup);
|
||||
if (!is_dir($spoolpath.$thisgroup)) {
|
||||
continue;
|
||||
}
|
||||
$stats = stat($spoolpath.$thisgroup);
|
||||
if($stats[9] > $oldest) {
|
||||
$newarticles = scandir($spoolpath.$thisgroup);
|
||||
foreach($newarticles as $newarticle) {
|
||||
$newarticle = $spoolpath.$thisgroup."/".$newarticle;
|
||||
$stats = stat($newarticle);
|
||||
if($stats[9] > $oldest && $stats[7] > 0) {
|
||||
$articles[] = $newarticle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['thisgroup'])) {
|
||||
echo '<h1 class="np_thread_headline">';
|
||||
echo '<a href="'.$file_index.'" target='.$frame['menu'].'>'.basename(getcwd()).'</a> / ';
|
||||
echo '<a href="'.$file_thread.'?group='.rawurlencode($grouplist[0]).'" target='.$frame[content].'>'.htmlspecialchars(group_display_name($grouplist[0])).'</a> / ';
|
||||
echo ' latest</h1>';
|
||||
echo '<table cellpadding="0" cellspacing="0" class="np_buttonbar"><tr>';
|
||||
// Refresh button
|
||||
echo '<td>';
|
||||
echo '<form action="overboard.php">';
|
||||
echo '<input type="hidden" name="thisgroup" value="'.$_GET['thisgroup'].'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_article["refresh"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
// Article List button
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_thread.'">';
|
||||
echo '<input type="hidden" name="group" value="'.$grouplist[0].'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.htmlspecialchars(group_display_name($grouplist[0])).'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
// Newsgroups button (hidden)
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_index.'">';
|
||||
echo '<button class="np_button_hidden" type="submit">'.$text_thread["button_grouplist"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
echo '<td width=100%></td></tr></table>';
|
||||
} else {
|
||||
echo '<h1 class="np_thread_headline">';
|
||||
echo '<a href="'.$file_index.'" target='.$frame['menu'].'>'.basename(getcwd()).'</a> / ';
|
||||
echo 'latest messages</h1>';
|
||||
echo '<table cellpadding="0" cellspacing="0" class="np_buttonbar"><tr>';
|
||||
// Refresh button
|
||||
echo '<td>';
|
||||
echo '<form action="overboard.php">';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_article["refresh"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
// Newsgroups button (hidden)
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_index.'">';
|
||||
echo '<button class="np_button_hidden" type="submit">'.$text_thread["button_grouplist"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
echo '<td width=100%></td></tr></table>';
|
||||
}
|
||||
|
||||
$results=0;
|
||||
$files = array();
|
||||
foreach($articles as $article) {
|
||||
if(is_dir($article)) {
|
||||
continue;
|
||||
}
|
||||
$files[filemtime($article)] = $article;
|
||||
}
|
||||
krsort($files);
|
||||
echo '<table cellspacing="0" width="100%" class="np_results_table">';
|
||||
//date_default_timezone_set(timezone_name_from_abbr("", $CONFIG['timezone'] * 3600, 0));
|
||||
foreach($files as $article) {
|
||||
$articledata = file_get_contents($article);
|
||||
$bodystart = strpos($articledata, $localeol);
|
||||
|
||||
$header = substr($articledata, 0, $bodystart);
|
||||
$body = substr($articledata, $bodystart+1);
|
||||
$body = substr($body, strpos($body, PHP_EOL));
|
||||
|
||||
if(($multi = strpos($body, 'Content-Type: text/plain')) != false) {
|
||||
$bodystart = strpos($body, $localeol);
|
||||
$body = substr($body, $bodystart+1);
|
||||
$body = substr($body, strpos($body, PHP_EOL));
|
||||
}
|
||||
|
||||
# Find group name and article number
|
||||
$group = preg_replace($spoolpath_regexp, '', $article);
|
||||
$group = preg_replace('/\//', '.', $group);
|
||||
$findme = strrpos($group, '.');
|
||||
$groupname = substr($group, 0, $findme);
|
||||
$articlenumber = substr($group, $findme+1);
|
||||
|
||||
# Generate link
|
||||
$url = $thissite."/article-flat.php?id=".$articlenumber."&group="._rawurlencode($groupname)."#".$articlenumber;
|
||||
$groupurl = $thissite."/thread.php?group="._rawurlencode($groupname);
|
||||
preg_match('/Subject:.*/', $header, $subject);
|
||||
$output = explode("Subject: ",$subject[0], 2);
|
||||
|
||||
preg_match('/Date:.*/', $header, $articledate);
|
||||
$dateoutput = explode("Date: ",$articledate[0]);
|
||||
|
||||
preg_match('/Content-Transfer-Encoding:.*/', $header, $te);
|
||||
$content_transfer_encoding = explode("Content-Transfer-Encoding: ", $te[0]);
|
||||
|
||||
preg_match('/.*charset=.*/', $header, $te);
|
||||
$content_type = explode("Content-Type: text/plain; charset=", $te[0]);
|
||||
|
||||
$date_interval = get_date_interval($dateoutput[1]);
|
||||
|
||||
preg_match('/Content-Transfer-Encoding:.*/', $header, $encoding);
|
||||
$this_encoding = explode("Content-Transfer-Encoding: ", $encoding[0]);
|
||||
if(trim($this_encoding[1]) == "base64") {
|
||||
$body=base64_decode($body);
|
||||
}
|
||||
|
||||
preg_match('/From:.*/', htmlspecialchars($header), $articlefrom);
|
||||
$isfrom = explode("From: ", $articlefrom[0]);
|
||||
$articlefrom[0] = $isfrom[1];
|
||||
|
||||
$fromoutput = explode("<", html_entity_decode($articlefrom[0]));
|
||||
|
||||
// Just an email address?
|
||||
if(strlen($fromoutput[0]) < 2) {
|
||||
preg_match("/\<([^\)]*)\@/", html_entity_decode($articlefrom[0]), $fromaddress);
|
||||
|
||||
$fromoutput[0] = $fromaddress[1];
|
||||
}
|
||||
if(strpos($fromoutput[0], "(")) {
|
||||
preg_match("/\(([^\)]*)\)/", html_entity_decode($articlefrom[0]), $fromaddress);
|
||||
$fromoutput[0] = $fromaddress[1];
|
||||
}
|
||||
|
||||
if(($results % 2) != 0){
|
||||
echo '<tr class="np_result_line1"><td class="np_result_line1" style="word-wrap:break-word";>';
|
||||
} else {
|
||||
echo '<tr class="np_result_line2"><td class="np_result_line2" style="word-wrap:break-word";>';
|
||||
}
|
||||
echo '<p class=np_ob_subject>';
|
||||
echo '<b><a href="'.$url.'">'.mb_decode_mimeheader($output[1])."</a></b>\r\n";
|
||||
echo '</p><p class=np_ob_group>';
|
||||
echo '<a href="'.$groupurl.'"><span class="visited">'.$groupname.'</span></a>';
|
||||
echo '</p>';
|
||||
|
||||
if((isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true) && (strpos($fromoutput[0], '@') !== false)) {
|
||||
$poster_name = truncate_email($fromoutput[0]);
|
||||
} else {
|
||||
$poster_name = $fromoutput[0];
|
||||
}
|
||||
$poster_name = trim($poster_name, "\"");
|
||||
echo '<p class=np_ob_posted_date>Posted: '.$date_interval.' by: '.create_name_link($poster_name).'</p>';
|
||||
// echo '<p class=np_ob_posted_date>Posted: '.$date_interval.' by: '.mb_decode_mimeheader($fromoutput[0]).'</p>';
|
||||
# Try to display useful snippet
|
||||
if($stop=strpos($body, "begin 644 "))
|
||||
$body=substr($body, 0, $stop);
|
||||
// TEST
|
||||
$body = quoted_printable_decode($body);
|
||||
$mysnippet = recode_charset($body, $content_type[1], "utf8");
|
||||
if($bodyend=strrpos($mysnippet, "\n---\n")) {
|
||||
$mysnippet = substr($mysnippet, 0, $bodyend);
|
||||
} else {
|
||||
if($bodyend=strrpos($mysnippet, "\n-- ")) {
|
||||
$mysnippet = substr($mysnippet, 0, $bodyend);
|
||||
} else {
|
||||
if($bodyend=strrpos($mysnippet, "\n.")) {
|
||||
$mysnippet = substr($mysnippet, 0, $bodyend);
|
||||
}
|
||||
}
|
||||
}
|
||||
if($quoteend=strrpos($mysnippet, $quotefinder)) {
|
||||
if($quoteend > (strlen($mysnippet) - $snippetshort)) {
|
||||
$quoteend = (strlen($mysnippet) - $snippetlength);
|
||||
if ($quoteend < 0)
|
||||
$quoteend = 0;
|
||||
$mysnippet = substr($mysnippet, $quoteend);
|
||||
$mysnippet = substr($mysnippet, strpos($mysnippet, ' '));
|
||||
} else {
|
||||
$mysnippet = substr($mysnippet, strrpos($mysnippet, $quotefinder) + 1);
|
||||
$tempsnippet = substr($mysnippet, strpos($mysnippet, PHP_EOL));
|
||||
if(strlen($tempsnippet) >= $snippetshort)
|
||||
$mysnippet = $tempsnippet;
|
||||
}
|
||||
}
|
||||
$mysnippet = substr($mysnippet, 0, $snippetlength);
|
||||
$snippet = $mysnippet."<br /><br />\r\n";
|
||||
$displayresult = explode('<', $snippet);
|
||||
// $echobody=quoted_printable_decode(mb_decode_mimeheader(highlightStr($displayresult[0], $terms)));
|
||||
$echobody=$displayresult[0];
|
||||
echo "<p class=np_ob_body>".$echobody."</p>\r\n";
|
||||
echo '</td></tr>';
|
||||
if($results++ > ($maxdisplay - 2))
|
||||
break;
|
||||
}
|
||||
echo '</table>';
|
||||
echo "<p class=np_ob_tail><b>".$results."</b> recent articles found.</p>\r\n";
|
||||
#echo "<center><i>Rocksolid Overboard</i> version ".$version;
|
||||
$iscached = "<p class=np_ob_tail><font size='1em'>cached copy: ".date("D M j G:i:s T Y", time())."</font></p>\r\n";
|
||||
include "tail.inc";
|
||||
|
||||
$thispage = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
echo $thispage;
|
||||
|
||||
if(count($articles) > 0) {
|
||||
$cacheFileHandle = fopen($cachefile, "w+");
|
||||
fwrite($cacheFileHandle, $thispage);
|
||||
fwrite($cacheFileHandle, $iscached);
|
||||
fclose($cacheFileHandle);
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,400 @@
|
|||
<?php
|
||||
/* rslight NNTP<->HTTP Gateway
|
||||
* Version: 0.6.x
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* Based on Newsportal by Florian Amrhein
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
session_start();
|
||||
include "config.inc.php";
|
||||
|
||||
@$fieldnamedecrypt=$_REQUEST['fielddecrypt'];
|
||||
//@$newsgroups=$_REQUEST["newsgroups"];
|
||||
//@$group=$_REQUEST["group"];
|
||||
@$type=$_REQUEST["type"];
|
||||
@$subject=stripslashes($_REQUEST[md5($fieldnamedecrypt."subject")]);
|
||||
@$name=$_REQUEST[md5($fieldnamedecrypt."name")];
|
||||
@$email=$_REQUEST[md5($fieldnamedecrypt."email")];
|
||||
@$body=stripslashes($_REQUEST[md5($fieldnamedecrypt."body")]);
|
||||
@$abspeichern=$_REQUEST["abspeichern"];
|
||||
@$references=$_REQUEST["references"];
|
||||
@$id=$_REQUEST["id"];
|
||||
if (!isset($group)) $group=$newsgroups;
|
||||
|
||||
include "auth.inc";
|
||||
if($post_captcha)
|
||||
include "lib/captcha/captcha.php";
|
||||
|
||||
|
||||
|
||||
|
||||
// Save name in cookies
|
||||
if (($setcookies==true) && (isset($abspeichern)) && ($abspeichern=="ja")) {
|
||||
setcookie("cookie_name",stripslashes($name),time()+(3600*24*90));
|
||||
}
|
||||
if ((isset($post_server)) && ($post_server!=""))
|
||||
$server=$post_server;
|
||||
if ((isset($post_port)) && ($post_port!=""))
|
||||
$port=$post_port;
|
||||
|
||||
include "head.inc";
|
||||
include $file_newsportal;
|
||||
|
||||
// check to which groups the user is allowed to post to
|
||||
$thisgroup=_rawurldecode($_REQUEST['group']);
|
||||
if($testgroup) {
|
||||
$newsgroups=testgroups($thisgroup);
|
||||
} else {
|
||||
$newsgroups=$thisgroup;
|
||||
}
|
||||
|
||||
|
||||
// has the user write-rights on the newsgroups?
|
||||
if((function_exists("npreg_group_has_read_access") &&
|
||||
!npreg_group_has_read_access($newsgroups)) ||
|
||||
(function_exists("npreg_group_has_write_access") &&
|
||||
!npreg_group_has_write_access($newsgroups))) {
|
||||
die("access denied");
|
||||
}
|
||||
|
||||
// Load name from cookies
|
||||
if ($setcookies) {
|
||||
if ((isset($_COOKIE["cookie_name"])) && (!isset($name)))
|
||||
$name=$_COOKIE["cookie_name"];
|
||||
// if ((isset($_COOKIE["cookie_email"])) && (!isset($email)))
|
||||
// $email=$_COOKIE["cookie_email"];
|
||||
}
|
||||
|
||||
// Load name and email from the registration system, if available
|
||||
if(function_exists("npreg_get_name")) {
|
||||
$name=npreg_get_name();
|
||||
}
|
||||
|
||||
if(function_exists("npreg_get_email")) {
|
||||
$email=npreg_get_email();
|
||||
$form_noemail=true;
|
||||
}
|
||||
|
||||
if(!strcmp($name, $CONFIG['anonusername']) && (isset($CONFIG['anonuser']))) {
|
||||
$userpass = $CONFIG['anonuserpass'];
|
||||
$email=$name.$CONFIG['email_tail'];
|
||||
} else {
|
||||
$userpass = $email;
|
||||
$request="email";
|
||||
$get_email = get_user_config($name,$request);
|
||||
if($get_email === FALSE) {
|
||||
$email=$name.$CONFIG['email_tail'];
|
||||
} else {
|
||||
$email=trim($get_email);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($CONFIG['synchronet']) && ($CONFIG['synchronet'] == true)) {
|
||||
$CONFIG['server_auth_user']=$name;
|
||||
$CONFIG['server_auth_pass']=$userpass;
|
||||
}
|
||||
|
||||
if($name=="")
|
||||
$name=$_SERVER['REMOTE_USER'];
|
||||
|
||||
if((!isset($references)) || ($references=="")) {
|
||||
$references=false;
|
||||
}
|
||||
|
||||
if (!isset($type)) {
|
||||
$type="new";
|
||||
}
|
||||
|
||||
if ($type=="new") {
|
||||
$subject="";
|
||||
$bodyzeile="";
|
||||
$show=1;
|
||||
}
|
||||
|
||||
// Is there a new article to post to the newsserver?
|
||||
if ($type=="post") {
|
||||
$show=0;
|
||||
if (!$CONFIG['synchronet']) {
|
||||
if (check_bbs_auth(trim($name), $userpass)==FALSE) {
|
||||
$type="retry";
|
||||
$error=$text_error["auth_error"];
|
||||
}
|
||||
}
|
||||
// error handling
|
||||
if (trim($body)=="") {
|
||||
$type="retry";
|
||||
$error=$text_post["missing_message"];
|
||||
}
|
||||
if ((trim($email)=="") && (!isset($anonym_address))) {
|
||||
$type="retry";
|
||||
$error=$text_post["missing_email"];
|
||||
}
|
||||
if (($email) && (!validate_email(trim($email)))) {
|
||||
$type="retry";
|
||||
$error=$text_post["error_wrong_email"];
|
||||
}
|
||||
if (trim($name)=="") {
|
||||
$type="retry";
|
||||
$error=$text_post["missing_name"];
|
||||
}
|
||||
if (trim($subject)=="") {
|
||||
$type="retry";
|
||||
$error=$text_post["missing_subject"];
|
||||
}
|
||||
|
||||
// captcha-check
|
||||
if(($post_captcha) && (captcha::check()==false)) {
|
||||
$type="retry";
|
||||
$error=$text_post["captchafail"];
|
||||
}
|
||||
|
||||
|
||||
if ($type=="post") {
|
||||
if (!$CONFIG['readonly']) {
|
||||
// post article to the newsserver
|
||||
if($references)
|
||||
$references_array=explode(" ",$references);
|
||||
else
|
||||
$references_array=false;
|
||||
if(($email=="") && (isset($anonym_address)))
|
||||
$nemail=$anonym_address;
|
||||
else
|
||||
$nemail=$email;
|
||||
if(isset($_FILES["photo"]) && $_FILES["photo"]["error"] == 0) {
|
||||
// There is an attachment to handle
|
||||
$message=message_post_with_attachment(quoted_printable_encode($subject),
|
||||
$nemail." (".quoted_printable_encode($name).")",
|
||||
$newsgroups,$references_array,addslashes($body),$_POST['encryptthis'],$_POST['encryptto']);
|
||||
} else {
|
||||
$message=message_post(quoted_printable_encode($subject),
|
||||
$nemail." (".quoted_printable_encode($name).")",
|
||||
$newsgroups,$references_array,addslashes($body),$_POST['encryptthis'],$_POST['encryptto']);
|
||||
}
|
||||
// Article sent without errors, or duplicate?
|
||||
if ((substr($message,0,3)=="240") ||
|
||||
(substr($message,0,7)=="441 435")) {
|
||||
?>
|
||||
|
||||
<h1 class="np_post_headline"><?php echo $text_post["message_posted"];?></h1>
|
||||
|
||||
<p><?php echo $text_post["message_posted2"];?></p>
|
||||
|
||||
<?php
|
||||
// This returns to multiple groups if crossposting, which does not work. FIXME
|
||||
// Try to return to just the first group in the list
|
||||
$returngroup=explode(',',$newsgroups);
|
||||
if(isset($CONFIG['auto_return']) && ($CONFIG['auto_return'] == true)) {
|
||||
echo '<meta http-equiv="refresh" content="0;url='.$file_thread.'?group='.urlencode($returngroup[0]).'"';
|
||||
}
|
||||
?>
|
||||
<p><a href="<?php echo $file_thread.'?group='.urlencode($returngroup[0]).'">'.$text_post["button_back"].'</a> '
|
||||
.$text_post["button_back2"].' '.group_display_name($returngroup[0]) ?></p>
|
||||
<?php
|
||||
} else {
|
||||
// article not accepted by the newsserver
|
||||
$type="retry";
|
||||
$error=$text_post["error_newsserver"]."<br><pre>$message</pre>";
|
||||
}
|
||||
} else {
|
||||
echo $text_post["error_readonly"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A reply of an other article.
|
||||
if ($type=="reply") {
|
||||
$message=message_read($id,0,$newsgroups);
|
||||
$head=$message->header;
|
||||
|
||||
$body=explode("\n",$message->body[0]);
|
||||
nntp_close($ns);
|
||||
if ($head->name != "") {
|
||||
$bodyzeile=$head->name;
|
||||
} else {
|
||||
$bodyzeile=$head->from;
|
||||
}
|
||||
|
||||
// For Synchronet use
|
||||
$fromname=$bodyzeile;
|
||||
|
||||
$bodyzeile=$text_post["wrote_prefix"].$bodyzeile.
|
||||
$text_post["wrote_suffix"]."\n\n";
|
||||
for ($i=0; $i<=count($body)-1; $i++) {
|
||||
if((isset($cutsignature)) && ($cutsignature==true) &&
|
||||
($body[$i]=='-- '))
|
||||
break;
|
||||
if (trim($body[$i])!="") {
|
||||
if($body[$i][0]=='>')
|
||||
$bodyzeile.=">".$body[$i]."\n";
|
||||
else
|
||||
$bodyzeile.="> ".$body[$i]."\n";
|
||||
} else {
|
||||
$bodyzeile.="\n";
|
||||
}
|
||||
}
|
||||
$subject=$head->subject;
|
||||
if (isset($head->followup) && ($head->followup != "")) {
|
||||
$newsgroups=$head->followup;
|
||||
} else {
|
||||
if($testgroup) {
|
||||
$newsgroups=testgroups($head->newsgroups);
|
||||
} else {
|
||||
$newsgroups=$head->newsgroups;
|
||||
}
|
||||
}
|
||||
splitSubject($subject);
|
||||
$subject="Re: ".$subject;
|
||||
// Cut off old parts of a subject
|
||||
// for example: 'foo (was: bar)' becomes 'foo'.
|
||||
$subject=preg_replace('/(\(wa[sr]: .*\))$/i','',$subject);
|
||||
$show=1;
|
||||
$references=false;
|
||||
if (isset($head->references[0])) {
|
||||
for ($i=0; $i<=count($head->references)-1; $i++) {
|
||||
$references .= $head->references[$i]." ";
|
||||
}
|
||||
}
|
||||
$references .= $head->id;
|
||||
}
|
||||
|
||||
if ($type=="retry") {
|
||||
$show=1;
|
||||
$bodyzeile=$body;
|
||||
}
|
||||
|
||||
if ($show==1) {
|
||||
|
||||
|
||||
if ($newsgroups == "") {
|
||||
echo $text_post["followup_not_allowed"];
|
||||
echo " ".$newsgroups;
|
||||
} else {
|
||||
// show post form
|
||||
$fieldencrypt=md5(rand(1,10000000));
|
||||
|
||||
echo '<h1 class="np_post_headline">'.$text_post["group_head"].group_display_name($newsgroups)
|
||||
.$text_post["group_tail"].'</h1>';
|
||||
|
||||
if (isset($error)) echo "<p>$error</p>"; ?>
|
||||
|
||||
<form action="<?php echo $file_post?>" method="post" name="postform" enctype="multipart/form-data">
|
||||
|
||||
<div class="np_post_header">
|
||||
<table>
|
||||
<tr><td align="right"><b><?php echo $text_header["subject"] ?></b></td>
|
||||
<td><input class="post" type="text" name="<?php echo md5($fieldencrypt."subject")?>" value="<?php
|
||||
echo htmlspecialchars($subject);?>" size="40" maxlength="80"></td></tr>
|
||||
<tr><td align="right"><b><?php echo $text_post["name"]?></b></td>
|
||||
<td align="left">
|
||||
<?php
|
||||
if ( !isset($name) && $CONFIG['anonuser'])
|
||||
$name = $CONFIG['anonusername'];
|
||||
if($form_noname===true) {
|
||||
echo htmlspecialchars($name);
|
||||
} else {
|
||||
echo '<input class="post" type="text" name="'.md5($fieldencrypt."name").'"';
|
||||
if (isset($name)) echo 'value="'.
|
||||
htmlspecialchars(stripslashes($name)).'"';
|
||||
echo 'size="40" maxlength="40">';
|
||||
if($CONFIG['anonuser'])
|
||||
echo ' or "'.$CONFIG['anonusername'].'" with no password';
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
<tr><td align="right"><b><?php echo $text_post["password"]?></b></td>
|
||||
<td align="left">
|
||||
<?php
|
||||
echo '<input class="post" type="password" name="'.md5($fieldencrypt."email").'"';
|
||||
// if (isset($email)) echo 'value="'.htmlspecialchars(stripslashes($email)).'"';
|
||||
echo 'size="40" maxlength="40">';
|
||||
?>
|
||||
</td</tr>
|
||||
|
||||
<?php
|
||||
// May we post encrypted messages to this group?
|
||||
if(check_encryption_groups($newsgroups)) { ?>
|
||||
<tr><td align="left">
|
||||
<input type="checkbox" name="encryptthis" value="encrypt">
|
||||
<b>Encrypt to:</b>
|
||||
</td>
|
||||
<td><input type="text" name="encryptto" value="<?php echo $fromname;?>"></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="np_post_body">
|
||||
<table>
|
||||
<tr><td><b><?php echo $text_post["message"];?></b><br>
|
||||
<textarea class="postbody" id="postbody" name="<?php echo md5($fieldencrypt."body")?>" wrap="soft"><?php
|
||||
if ((isset($bodyzeile)) && ($post_autoquote))
|
||||
echo htmlspecialchars($bodyzeile);
|
||||
if(is_string($body))
|
||||
echo htmlspecialchars($body);
|
||||
?>
|
||||
</textarea></td></tr>
|
||||
<tr><td>
|
||||
|
||||
<?php if(!$post_autoquote) { ?>
|
||||
<input type="hidden" id="hidebody" value="<?php
|
||||
if (isset($bodyzeile)) echo htmlspecialchars(stripslashes($bodyzeile)); ?>">
|
||||
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
function quoten() {
|
||||
document.getElementById("postbody").value=document.getElementById("hidebody").value;
|
||||
document.getElementById("hidebody").value="";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<input type="submit" value="<?php echo $text_post["button_post"];?>">
|
||||
<?php if ($setcookies==true) { ?>
|
||||
<input tabindex="100" type="Button" name="quote" value="<?php echo $text_post["quote"]?>" onclick="quoten(); this.style.visibility= 'hidden';">
|
||||
<input type="checkbox" name="abspeichern" value="ja" checked>
|
||||
<?php echo $text_post["remember"];?>
|
||||
<?php } ?>
|
||||
<input type="file" name="photo" id="fileSelect" value="fileSelect" accept="image/*,audio/*,text/*,application/pdf">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if($post_captcha) {
|
||||
echo '<tr><td>';
|
||||
echo captcha::form($text_post["captchainfo1"],$text_post["captchainfo2"]);
|
||||
echo '</td></tr>';
|
||||
} ?>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<input type="hidden" name="type" value="post">
|
||||
<input type="hidden" name="newsgroups" value="<?php echo htmlspecialchars($newsgroups); ?>">
|
||||
<input type="hidden" name="references" value="<?php echo htmlentities($references); ?>">
|
||||
<input type="hidden" name="group" value="<?php echo htmlspecialchars($newsgroups); ?>">
|
||||
<input type="hidden" name="fielddecrypt" value="<?php echo htmlspecialchars($fieldencrypt);?>">
|
||||
</form>
|
||||
|
||||
<?php } } ?>
|
||||
|
|
@ -0,0 +1,213 @@
|
|||
<?php
|
||||
/* rocksolid overboard - overboard for rslight
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
include "config.inc.php";
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?content='+encodeURIComponent(contentURL);
|
||||
}
|
||||
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
|
||||
</script>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
# Maximum number of articles to show
|
||||
$maxdisplay = 1000;
|
||||
|
||||
$thissite = '.';
|
||||
|
||||
$groupconfig=$config_path."/groups.txt";
|
||||
|
||||
if (isset($_GET['thisgroup'])) {
|
||||
$grouplist = array();
|
||||
$grouplist[0] = _rawurldecode(_rawurldecode($_GET['thisgroup']));
|
||||
} else {
|
||||
$grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES);
|
||||
}
|
||||
$title.=' - search results for: '.$_GET[terms];
|
||||
include "head.inc";
|
||||
|
||||
ob_start();
|
||||
if (isset($_GET['thisgroup'])) {
|
||||
echo '<h1 class="np_thread_headline">'.$grouplist[0].' (latest)</h1>';
|
||||
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
|
||||
// Article List button
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_thread.'">';
|
||||
echo '<input type="hidden" name="group" value="'.$grouplist[0].'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_article["back_to_group"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
// Newsgroups button (hidden)
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_index.'">';
|
||||
echo '<button class="np_button_hidden" type="submit">'.$text_thread["button_grouplist"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
echo '</tr></table>';
|
||||
} else {
|
||||
echo '<h1 class="np_thread_headline">';
|
||||
echo '<a href="'.$file_index.'" target='.$frame['menu'].'>'.basename(getcwd()).'</a> / ';
|
||||
echo 'search results for: '.$_GET['terms'].'</h1>';
|
||||
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
|
||||
// Newsgroups button (hidden)
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_index.'">';
|
||||
echo '<button class="np_button_hidden" type="submit">'.$text_thread["button_grouplist"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
echo '</tr></table>';
|
||||
}
|
||||
echo '<table cellspacing="0" width="100%" class="np_results_table">';
|
||||
|
||||
# Iterate through groups
|
||||
|
||||
$local_groupfile=$spooldir."/".$config_name."/local_groups.txt";
|
||||
$results=0;
|
||||
foreach($grouplist as $findgroup) {
|
||||
$groups = preg_split("/( |\t)/", $findgroup, 2);
|
||||
$findgroup = $groups[0];
|
||||
|
||||
// Find starting article number (last - $maxdisplay)
|
||||
$local_grouplist = file($local_groupfile, FILE_IGNORE_NEW_LINES);
|
||||
foreach($local_grouplist as $local_findgroup) {
|
||||
$name = explode(':', $local_findgroup);
|
||||
if (strcmp($name[0], $findgroup) == 0) {
|
||||
if (is_numeric($name[1]))
|
||||
$local = $name[1];
|
||||
else {
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $findgroup);
|
||||
$articles = scandir($thisgroup);
|
||||
$ok_article=array();
|
||||
foreach($articles as $this_article) {
|
||||
if(!is_numeric($this_article)) {
|
||||
continue;
|
||||
}
|
||||
$ok_article[]=$this_article;
|
||||
}
|
||||
sort($ok_article);
|
||||
$local = $ok_article[key(array_slice($ok_article, -1, 1, true))];
|
||||
if(!is_numeric($local))
|
||||
$local = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($local < 1)
|
||||
$local = 1;
|
||||
|
||||
// $overviewfp=fopen($spooldir."/".$findgroup."-overview", "r");
|
||||
$overviewfp=popen($CONFIG['tac'].' '.$spooldir.'/'.$findgroup.'-overview', 'r');
|
||||
if($overviewfp) {
|
||||
while (($overviewline = fgets($overviewfp)) !== false) {
|
||||
$article = explode("\t", $overviewline);
|
||||
if(intval($article[0]) < ($local - $maxdisplay)) {
|
||||
continue;
|
||||
}
|
||||
if(!strcmp($_GET['searchpoint'], "Subject")) {
|
||||
$searchme = quoted_printable_decode(mb_decode_mimeheader($article[1]));
|
||||
}
|
||||
if(!strcmp($_GET['searchpoint'], "Poster")) {
|
||||
$searchme = quoted_printable_decode(mb_decode_mimeheader($article[2]));
|
||||
}
|
||||
if(!strcmp($_GET['searchpoint'], "Message-ID")) {
|
||||
$searchme = $article[4];
|
||||
}
|
||||
if(stripos($searchme, $_GET['terms']) === false) {
|
||||
continue;
|
||||
}
|
||||
# Generate link
|
||||
$url = $thissite."/article-flat.php?id=".$article[0]."&group="._rawurlencode($findgroup)."#".$article[0];
|
||||
$groupurl = $thissite."/thread.php?group="._rawurlencode($findgroup);
|
||||
$fromoutput = explode("<", html_entity_decode($article[2]));
|
||||
|
||||
// Just an email address?
|
||||
if(strlen($fromoutput[0]) < 2) {
|
||||
preg_match("/\<([^\)]*)\@/", html_entity_decode($article[2]), $fromaddress);
|
||||
$fromoutput[0] = $fromaddress[1];
|
||||
}
|
||||
if(strpos($fromoutput[0], "(")) {
|
||||
preg_match("/\(([^\)]*)\)/", html_entity_decode($article[2]), $fromaddress);
|
||||
$fromoutput[0] = $fromaddress[1];
|
||||
}
|
||||
if(($results % 2) != 0){
|
||||
echo '<tr class="np_result_line1"><td style="word-wrap:break-word";>';
|
||||
} else {
|
||||
echo '<tr class="np_result_line2"><td style="word-wrap:break-word";>';
|
||||
}
|
||||
echo '<p class=np_ob_subject>';
|
||||
echo '<b><a href="'.$url.'">'.mb_decode_mimeheader($article[1])."</a></b>\r\n";
|
||||
echo '</p><p class=np_ob_group>';
|
||||
echo '<a href="'.$groupurl.'">'.$findgroup.'</a>';
|
||||
echo '</p>';
|
||||
echo '<p class=np_ob_posted_date>Posted: '.$article[3].' by: '.mb_decode_mimeheader($fromoutput[0]).'</p>';
|
||||
echo '</td></tr>';
|
||||
if($results++ > ($maxdisplay - 2))
|
||||
break;
|
||||
}
|
||||
fclose($overviewfp);
|
||||
}
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
echo "<p class=np_ob_tail><b>".$results."</b> matching articles found.</p>\r\n";
|
||||
#echo "<center><i>Rocksolid Overboard</i> version ".$version;
|
||||
include "tail.inc";
|
||||
|
||||
$thispage = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
echo $thispage;
|
||||
|
||||
function highlightStr($haystack, $needle) {
|
||||
preg_match_all("/$needle+/i", $haystack, $matches);
|
||||
if (is_array($matches[0]) && count($matches[0]) >= 1) {
|
||||
foreach ($matches[0] as $match) {
|
||||
$haystack = str_replace($match, '<b>'.$match.'</b>', $haystack);
|
||||
}
|
||||
}
|
||||
return $haystack;
|
||||
}
|
||||
|
||||
function _rawurlencode($string) {
|
||||
$string = rawurlencode(str_replace('+','%2B',$string));
|
||||
return $string;
|
||||
}
|
||||
|
||||
function _rawurldecode($string) {
|
||||
$string = rawurldecode(str_replace('%2B','+',$string));
|
||||
return $string;
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
include "head.inc";
|
||||
?>
|
||||
<body>
|
||||
<table width=100% border="0" align="center" cellpadding="0" cellspacing="1">
|
||||
<tr>
|
||||
<form name="form1" method="get" action="result.php">
|
||||
<td>
|
||||
<table width="100%" border="0" cellpadding="3" cellspacing="1">
|
||||
<tr>
|
||||
<td colspan="3"><strong>Search recent messages in <?php echo $config_name; ?></strong><br />(searches last <?php echo $maxarticles; ?> articles per group)</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td width="78"><strong>Search Terms</strong></td>
|
||||
<td width="6">:</td>
|
||||
<td width="294"><input name="terms" type="text" id="terms"></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="searchpoint" value="Subject" checked="checked"/>Subject</td>
|
||||
<td><input type="radio" name="searchpoint" value="Poster"/>Poster</td>
|
||||
<td><input type="radio" name="searchpoint" value="Message-ID"/>Message-ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="command" type="hidden" id="command" value="Search" readonly="readonly"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td><input type="submit" name="Submit" value="Search"></td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<td></td><td></td>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<center>
|
||||
<font size="1em">
|
||||
<i>rocksolid light</i> 0.6.6
|
||||
<br />
|
||||
<a href="http://news.novabbs.com/getrslight" target=_blank>clearnet</a>
|
||||
<a href="http://rslight.i2p/getrslight" target=_blank>i2p</a>
|
||||
<a href="http://dkzerogt6z6ybhcj.onion/getrslight" target=_blank>tor</a>
|
||||
</font>
|
||||
</center>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<?php
|
||||
//header("Expires: ".gmdate("D, d M Y H:i:s",time()+7200)." GMT");
|
||||
session_start();
|
||||
|
||||
$_SESSION['group'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
include "config.inc.php";
|
||||
include("$file_newsportal");
|
||||
include "auth.inc";
|
||||
|
||||
// register parameters
|
||||
$group=_rawurldecode($_REQUEST["group"]);
|
||||
if(isset($_REQUEST["first"]))
|
||||
$first=intval($_REQUEST["first"]);
|
||||
if(isset($_REQUEST["last"]))
|
||||
$last=intval($_REQUEST["last"]);
|
||||
|
||||
$thread_show["latest"]=true;
|
||||
$title.= ' - '.$group;
|
||||
include "head.inc";
|
||||
|
||||
$CONFIG = include($config_file);
|
||||
|
||||
if((!function_exists("npreg_group_has_read_access") ||
|
||||
npreg_group_has_read_access($group)) &&
|
||||
(!function_exists("npreg_group_is_visible") ||
|
||||
npreg_group_is_visible($group))) {
|
||||
|
||||
$overviewfile = $spooldir.'/'.$group.'-overview';
|
||||
$ovfile = popen($CONFIG['tac'].' '.$overviewfile, 'r');
|
||||
$ovcache = array();
|
||||
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
?>
|
||||
<script>
|
||||
var contentURL=window.location.pathname+window.location.search+window.location.hash;
|
||||
if ( window.self !== window.top ) {
|
||||
/* Great! now we move along */
|
||||
} else {
|
||||
window.location.href = '../index.php?content='+encodeURIComponent(contentURL);
|
||||
}
|
||||
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo '<a name="top"></a>';
|
||||
echo '<h1 class="np_thread_headline">';
|
||||
|
||||
echo '<a href="'.$file_index.'" target='.$frame['menu'].'>'.basename(getcwd()).'</a> / ';
|
||||
echo htmlspecialchars(group_display_name($group)).'</h1>';
|
||||
|
||||
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
|
||||
// View Latest button
|
||||
if (isset($overboard) && ($overboard == true)) {
|
||||
echo '<td>';
|
||||
echo '<form action="overboard.php">';
|
||||
echo '<input type="hidden" name="thisgroup" value="'._rawurlencode($group).'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_thread["button_latest"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
if (!$CONFIG['readonly'] &&
|
||||
(!function_exists("npreg_group_has_write_access") ||
|
||||
npreg_group_has_write_access($group)))
|
||||
{
|
||||
// New Thread button
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_post.'">';
|
||||
echo '<input type="hidden" name="group" value="'.urlencode($group).'"/>';
|
||||
echo '<button class="np_button_link" type="submit">'.$text_thread["button_write"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
// Newsgroups button (hidden)
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
echo '<td>';
|
||||
echo '<form action="'.$file_index.'">';
|
||||
echo '<button class="np_button_hidden" type="submit">'.$text_thread["button_grouplist"].'</button>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
}
|
||||
// $ns=nntp_open($server,$port);
|
||||
flush();
|
||||
$headers = thread_load($group);
|
||||
$article_count=count($headers);
|
||||
if ($articles_per_page != 0) {
|
||||
if ((!isset($first)) || (!isset($last))) {
|
||||
if ($startpage=="first") {
|
||||
$first=1;
|
||||
$last=$articles_per_page;
|
||||
} else {
|
||||
$first=$article_count - (($article_count -1) % $articles_per_page);
|
||||
$last=$article_count;
|
||||
}
|
||||
}
|
||||
echo '<td class="np_pages" width="100%" align="right">';
|
||||
// Show the replies to an article in the thread view?
|
||||
if($thread_show["replies"]) {
|
||||
// yes, so the counting of the shown articles is very easy
|
||||
$pagecount=count($headers);
|
||||
} else {
|
||||
// oh no, the replies will not be shown, this makes life hard...
|
||||
$pagecount=0;
|
||||
if(count($headers) > 0 && is_array($headers)) {
|
||||
foreach($headers as $h) {
|
||||
if($h->isAnswer==false)
|
||||
$pagecount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thread_pageselect($group,$pagecount,$first);
|
||||
echo '</td>';
|
||||
} else {
|
||||
$first=0;
|
||||
$last=$article_count;
|
||||
}
|
||||
echo '</tr></table>';
|
||||
thread_show($headers,$group,$first,$last);
|
||||
echo '<table cellpadding="0" cellspacing="0" width="100%" class="np_buttonbar"><tr>';
|
||||
echo '<td class="np_pages" width="100%" align="right">';
|
||||
thread_pageselect($group,$pagecount,$first);
|
||||
echo '</td></tr></table>';
|
||||
pclose($ovfile);
|
||||
} else {
|
||||
echo $text_register["no_access_group"];
|
||||
}
|
||||
include "tail.inc";
|
||||
?>
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
$admin = array();
|
||||
$admin['password'] = '<admin_password>';
|
||||
$admin['key'] = '<admin_key>';
|
||||
?>
|
|
@ -0,0 +1,131 @@
|
|||
#!/bin/bash
|
||||
|
||||
webroot="/var/www/html"
|
||||
spoolpath="/var/spool/rslight"
|
||||
configpath="/etc/rslight"
|
||||
username="www-data"
|
||||
|
||||
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9{} | head -c${1:-16};echo;}
|
||||
site_key=$(randpw)
|
||||
anonymous_password=$(randpw)
|
||||
local_password=$(randpw)
|
||||
admin_password=$(randpw)
|
||||
admin_key=$(randpw)
|
||||
|
||||
echo
|
||||
echo "This is the main installation script for Rocksolid Light"
|
||||
echo "and must be run as root from the root directory of the extracted files"
|
||||
echo
|
||||
echo "Select installation directories"
|
||||
echo
|
||||
|
||||
echo "Choose a path for your web root for rslight"
|
||||
read -p "Use default web root $webroot (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter web root for rslight: " webroot; echo
|
||||
fi
|
||||
|
||||
echo "Choose a path for your spool files for rslight"
|
||||
read -p "Use default spool path $spoolpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter spool path for rslight: " spoolpath; echo
|
||||
fi
|
||||
echo "Choose a path for rslight configuration files"
|
||||
read -p "Use default config path $configpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter config path for rslight: " configpath; echo
|
||||
fi
|
||||
|
||||
echo "Choose username used by your web server"
|
||||
read -p "Use default username $username (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter username used by your web server: " username; echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "You have selected the following options:"
|
||||
echo
|
||||
echo "Web root: $webroot"
|
||||
echo "Spool dir: $spoolpath"
|
||||
echo "Config dir: $configpath"
|
||||
echo "Web user: $username"
|
||||
echo
|
||||
echo "Are you sure you wish to install to these directories now"
|
||||
echo "and change permissions as necessary to $username? "
|
||||
echo
|
||||
read -p "Type 'YES' to create the directories and move files into place: " default; echo
|
||||
|
||||
if [ "$default" != "YES" ]
|
||||
then
|
||||
echo exiting...
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Creating directories"
|
||||
echo -n "$webroot..."
|
||||
mkdir -p $webroot
|
||||
echo "done"
|
||||
echo -n "$spoolpath..."
|
||||
mkdir -p $spoolpath
|
||||
echo "done"
|
||||
echo -n "$configpath..."
|
||||
mkdir -p $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Moving files into place..."
|
||||
cp index.php $webroot
|
||||
cp -a common $webroot
|
||||
cp -a rocksolid $webroot
|
||||
cp -a spoolnews $webroot
|
||||
cp -a rslight/* $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Setting permissions..."
|
||||
chown $username $spoolpath
|
||||
chgrp $username $spoolpath
|
||||
chown $username "$configpath/users"
|
||||
chgrp $username "$configpath/users"
|
||||
chmod 700 "$configpath/users"
|
||||
chown $username "$configpath/userconfig"
|
||||
chgrp $username "$configpath/userconfig"
|
||||
chmod 700 "$configpath/userconfig"
|
||||
chown $username "$configpath/rslight.inc.php"
|
||||
chgrp $username "$configpath/rslight.inc.php"
|
||||
echo "done"
|
||||
|
||||
echo
|
||||
echo -n "Applying configuration..."
|
||||
sed -i '' -e "s|<spooldir>|$spoolpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<config_dir>|$configpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<webserver_user>|$username|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<site_key>|$site_key|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<local_password>|$local_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/admin.inc.php
|
||||
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/admin.inc.php
|
||||
echo "done"
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "******** YOUR ADMIN PASSWORD IS: '$admin_password'"
|
||||
echo "***************************************************"
|
||||
echo
|
||||
echo "Admin password can be changed in $configpath/admin.inc.php"
|
||||
echo
|
||||
echo "Next step is to visit your site in your browser: /common/setup.php"
|
||||
echo "to complete configuration"
|
||||
echo
|
||||
echo Add this to crontab for root to link with your remote server, start local
|
||||
echo server and manage other tasks:
|
||||
echo "*/5 * * * * cd $webroot/spoolnews ; bash -lc \"php $configpath/scripts/cron.php\""
|
||||
echo
|
||||
echo "Once your web server is configured to point to $webroot and serve .php files"
|
||||
echo "give it a try. If you have trouble, feel free to ask for help in rocksolid.nodes.help"
|
||||
echo
|
||||
echo "Note that it may take 10-20 minutes before groups appear on your main page"
|
||||
echo "If you see files starting to appear in $spoolpath, it should be working"
|
||||
echo
|
||||
echo "Installation complete"
|
|
@ -0,0 +1,131 @@
|
|||
#!/usr/local/bin/bash
|
||||
|
||||
webroot="/usr/local/www/html"
|
||||
spoolpath="/var/spool/rslight"
|
||||
configpath="/etc/rslight"
|
||||
username="www"
|
||||
|
||||
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9{} | head -c${1:-16};echo;}
|
||||
site_key=$(randpw)
|
||||
anonymous_password=$(randpw)
|
||||
local_password=$(randpw)
|
||||
admin_password=$(randpw)
|
||||
admin_key=$(randpw)
|
||||
|
||||
echo
|
||||
echo "This is the main installation script for Rocksolid Light"
|
||||
echo "and must be run as root from the root directory of the extracted files"
|
||||
echo
|
||||
echo "Select installation directories"
|
||||
echo
|
||||
|
||||
echo "Choose a path for your web root for rslight"
|
||||
read -p "Use default web root $webroot (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter web root for rslight: " webroot; echo
|
||||
fi
|
||||
|
||||
echo "Choose a path for your spool files for rslight"
|
||||
read -p "Use default spool path $spoolpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter spool path for rslight: " spoolpath; echo
|
||||
fi
|
||||
echo "Choose a path for rslight configuration files"
|
||||
read -p "Use default config path $configpath (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter config path for rslight: " configpath; echo
|
||||
fi
|
||||
|
||||
echo "Choose username used by your web server"
|
||||
read -p "Use default username $username (y/n)? " default; echo
|
||||
if [ "${default^^}" != "Y" ]
|
||||
then
|
||||
read -p "Enter username used by your web server: " username; echo
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "You have selected the following options:"
|
||||
echo
|
||||
echo "Web root: $webroot"
|
||||
echo "Spool dir: $spoolpath"
|
||||
echo "Config dir: $configpath"
|
||||
echo "Web user: $username"
|
||||
echo
|
||||
echo "Are you sure you wish to install to these directories now"
|
||||
echo "and change permissions as necessary to $username? "
|
||||
echo
|
||||
read -p "Type 'YES' to create the directories and move files into place: " default; echo
|
||||
|
||||
if [ "$default" != "YES" ]
|
||||
then
|
||||
echo exiting...
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Creating directories"
|
||||
echo -n "$webroot..."
|
||||
mkdir -p $webroot
|
||||
echo "done"
|
||||
echo -n "$spoolpath..."
|
||||
mkdir -p $spoolpath
|
||||
echo "done"
|
||||
echo -n "$configpath..."
|
||||
mkdir -p $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Moving files into place..."
|
||||
cp index.php $webroot
|
||||
cp -a common $webroot
|
||||
cp -a rocksolid $webroot
|
||||
cp -a spoolnews $webroot
|
||||
cp -a rslight/* $configpath
|
||||
echo "done"
|
||||
echo
|
||||
echo -n "Setting permissions..."
|
||||
chown $username $spoolpath
|
||||
chgrp $username $spoolpath
|
||||
chown $username "$configpath/users"
|
||||
chgrp $username "$configpath/users"
|
||||
chmod 700 "$configpath/users"
|
||||
chown $username "$configpath/userconfig"
|
||||
chgrp $username "$configpath/userconfig"
|
||||
chmod 700 "$configpath/userconfig"
|
||||
chown $username "$configpath/rslight.inc.php"
|
||||
chgrp $username "$configpath/rslight.inc.php"
|
||||
echo "done"
|
||||
|
||||
echo
|
||||
echo -n "Applying configuration..."
|
||||
sed -i '' -e "s|<spooldir>|$spoolpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<config_dir>|$configpath/|" $webroot/common/config.inc.php
|
||||
sed -i '' -e "s|<webserver_user>|$username|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<site_key>|$site_key|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<anonymous_password>|$anonymous_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<local_password>|$local_password|" $configpath/rslight.inc.php
|
||||
sed -i '' -e "s|<admin_password>|$admin_password|" $configpath/admin.inc.php
|
||||
sed -i '' -e "s|<admin_key>|$admin_key|" $configpath/admin.inc.php
|
||||
echo "done"
|
||||
echo
|
||||
echo "***************************************************"
|
||||
echo "******** YOUR ADMIN PASSWORD IS: '$admin_password'"
|
||||
echo "***************************************************"
|
||||
echo
|
||||
echo "Admin password can be changed in $configpath/admin.inc.php"
|
||||
echo
|
||||
echo "Next step is to visit your site in your browser: /common/setup.php"
|
||||
echo "to complete configuration"
|
||||
echo
|
||||
echo Add this to crontab for root to link with your remote server, start local
|
||||
echo server and manage other tasks:
|
||||
echo "*/5 * * * * cd $webroot/spoolnews ; bash -lc \"php $configpath/scripts/cron.php\""
|
||||
echo
|
||||
echo "Once your web server is configured to point to $webroot and serve .php files"
|
||||
echo "give it a try. If you have trouble, feel free to ask for help in rocksolid.nodes.help"
|
||||
echo
|
||||
echo "Note that it may take 10-20 minutes before groups appear on your main page"
|
||||
echo "If you see files starting to appear in $spoolpath, it should be working"
|
||||
echo
|
||||
echo "Installation complete"
|
|
@ -0,0 +1,5 @@
|
|||
# These are the links at the top right of the site
|
||||
# display name:url
|
||||
register:/common/newuser.php
|
||||
nodelist:/common/nodelist.php
|
||||
faq:/common/faq.txt
|
|
@ -0,0 +1,17 @@
|
|||
# List of sections in Rocksolid Light
|
||||
# Each name must correspond to a directory in
|
||||
# your web path that is an rslight install
|
||||
#
|
||||
# There are three items in each line
|
||||
# 0=no, 1=yes:
|
||||
#
|
||||
# First = section name
|
||||
# Second = display link in header?
|
||||
# Third = enable local spool for this section?
|
||||
#
|
||||
# spoolnews is an internal spool handler for all sections:
|
||||
# and should almost always be 'spoolnews:0:1'
|
||||
spoolnews:0:1
|
||||
#
|
||||
# Add your sections below:
|
||||
rocksolid:1:1
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
# Server info and credentials for sending email
|
||||
# (sending mail requires PHPMailer package installed)
|
||||
# PHPMailer settings (comment out the versions that do not apply)
|
||||
|
||||
# PHPMailer 6.0 and above:
|
||||
#$phpmailer['phpmailer'] = '/usr/share/php/libphp-phpmailer/src/PHPMailer.php';
|
||||
#$phpmailer['smtp'] = '/usr/share/php/libphp-phpmailer/src/SMTP.php';
|
||||
|
||||
# PHPMailer pre 6.0
|
||||
#$phpmailer['phpmailer'] = '/usr/share/php/libphp-phpmailer/class.phpmailer.php';
|
||||
#$phpmailer['smtp'] = '/usr/share/php/libphp-phpmailer/class.smtp.php';
|
||||
|
||||
# FreeBSD 12
|
||||
$phpmailer['phpmailer'] = '/usr/local/share/phpmailer/class.phpmailer.php';
|
||||
$phpmailer['smtp'] = '/usr/local/share/phpmailer/class.smtp.php';
|
||||
|
||||
$mailer = array();
|
||||
$mailer['host'] = "mail.example.com";
|
||||
$mailer['port'] = "587";
|
||||
$mailer['username'] = "username";
|
||||
$mailer['password'] = "password";
|
||||
|
||||
require $phpmailer['phpmailer'];
|
||||
require $phpmailer['smtp'];
|
||||
|
||||
# Comment out the following line if PHPMailer < 6.0
|
||||
#use PHPMailer\PHPMailer\PHPMailer;
|
||||
?>
|
|
@ -0,0 +1,21 @@
|
|||
rocksolid.shared.encryption:Encryption
|
||||
rocksolid.shared.entertainment:Entertainment
|
||||
rocksolid.shared.freenet:Freenet
|
||||
rocksolid.shared.general:General
|
||||
rocksolid.shared.hacking:Hacking
|
||||
rocksolid.shared.helpdesk:Helpdesk
|
||||
rocksolid.shared.i2p:i2p
|
||||
rocksolid.shared.linux:Linux
|
||||
rocksolid.shared.news:News
|
||||
rocksolid.shared.offtopic:Offtopic
|
||||
rocksolid.shared.rocksolid:Rocksolid Network
|
||||
rocksolid.nodes:Rocksolid Nodes
|
||||
rocksolid.nodes.announce:Rocksolid Nodes Announce
|
||||
rocksolid.nodes.help:Rocksolid Nodes Help
|
||||
rocksolid.programming:Programming
|
||||
rocksolid.religion:Religion
|
||||
rocksolid.shared.security:Security
|
||||
rocksolid.social:Social
|
||||
rocksolid.shared.test:Test
|
||||
rocksolid.shared.tor:Tor
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
rocksolid.shared.encryption
|
||||
rocksolid.shared.test
|
|
@ -0,0 +1,20 @@
|
|||
:Rocksolid newsgroups...
|
||||
rocksolid.nodes Discuss specific Rocksolid nodes.
|
||||
rocksolid.nodes.help Questions and Help for node administration.
|
||||
rocksolid.nodes.announce Rocksolid node announcements.
|
||||
rocksolid.shared.encryption Public keys, encrypted messages etc.
|
||||
rocksolid.shared.entertainment Entertainment discussion and articles.
|
||||
rocksolid.shared.freenet Discussion and questions about Freenet.
|
||||
rocksolid.shared.general General discussion, questions or requests.
|
||||
rocksolid.shared.hacking What do you want to hack today.
|
||||
rocksolid.shared.helpdesk Tech questions and maybe even answers.
|
||||
rocksolid.shared.i2p Discussion and questions about I2P.
|
||||
rocksolid.shared.linux Questions, comments and discussion of Linux.
|
||||
rocksolid.shared.news In the News.
|
||||
rocksolid.shared.offtopic If it doesn't fit, this is the place.
|
||||
rocksolid.programming Programming related discussion.
|
||||
rocksolid.shared.rocksolid Discuss the rocksolid network.
|
||||
rocksolid.shared.security Tips, hints and articles about security.
|
||||
rocksolid.social General non tech chat.
|
||||
rocksolid.shared.test The place to test.
|
||||
rocksolid.shared.tor Discussion and questions about Tor.
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
return [
|
||||
'remote_server' => 'news.example.com',
|
||||
'remote_port' => '119',
|
||||
'remote_ssl' => '0',
|
||||
'remote_auth_user' => 'username',
|
||||
'remote_auth_pass' => 'password',
|
||||
'enable_nntp' => '1',
|
||||
'local_server' => '127.0.0.1',
|
||||
'local_port' => '119',
|
||||
'local_ssl_port' => '',
|
||||
'enable_all_networks' => '1',
|
||||
'server_auth_user' => 'localuser',
|
||||
'server_auth_pass' => '<local_password>',
|
||||
'rslight_title' => 'New Rocksolid Light Install',
|
||||
'title_full' => 'rslight',
|
||||
'hide_email' => '1',
|
||||
'email_tail' => '@example.com',
|
||||
'anonusername' => 'anonymous',
|
||||
'anonuserpass' => '<anonymous_password>',
|
||||
'timezone' => '0',
|
||||
'default_content' => '/rocksolid/index.php',
|
||||
'readonly' => '',
|
||||
'anonuser' => '1',
|
||||
'organization' => 'Unconfigured rslight site',
|
||||
'postfooter' => 'Unconfigured rslight site',
|
||||
'synchronet' => '',
|
||||
'auto_create' => '',
|
||||
'verify_email' => '1',
|
||||
'no_verify' => '.i2p .onion',
|
||||
'auto_return' => '',
|
||||
'overboard_noshow' => 'rocksolid.test',
|
||||
'spamassassin' => '',
|
||||
'spamc' => 'spamc',
|
||||
'spamgroup' => 'rocksolid.spam',
|
||||
'php_exec' => 'php',
|
||||
'tac' => 'tail -r',
|
||||
'webserver_user' => '<webserver_user>',
|
||||
'enable_nocem' => '1',
|
||||
'nocem_groups' => 'rocksolid.spam',
|
||||
'expire_days' => '0',
|
||||
'pathhost' => 'unconfigured',
|
||||
'thissitekey' => '<site_key>'
|
||||
];
|
||||
?>
|
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
// This file runs maintenance scripts and should be executed by cron regularly
|
||||
include "config.inc.php";
|
||||
|
||||
$menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
|
||||
# Start or verify NNTP server
|
||||
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
|
||||
# Create group list for nntp.php
|
||||
$fp1=fopen($spooldir."/".$config_name."/groups.txt", 'w');
|
||||
foreach($menulist as $menu) {
|
||||
if(($menu[0] == '#') || trim($menu) == "") {
|
||||
continue;
|
||||
}
|
||||
$menuitem=explode(':', $menu);
|
||||
if($menuitem[2] == '1') {
|
||||
$in_gl = file($config_dir.$menuitem[0]."/groups.txt");
|
||||
foreach($in_gl as $ok_group) {
|
||||
if(($ok_group[0] == ':') || (trim($ok_group) == "")) {
|
||||
continue;
|
||||
}
|
||||
if(strpos($ok_group, "\t") == false) {
|
||||
$ok_group=preg_replace('/ /', "\t", $ok_group, 1);
|
||||
}
|
||||
fputs($fp1, $ok_group);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose($fp1);
|
||||
exec($CONFIG['php_exec']." ".$config_dir."scripts/nntp.php > /dev/null 2>&1");
|
||||
if(is_numeric($CONFIG['local_ssl_port'])) {
|
||||
exec($CONFIG['php_exec']." ".$config_dir."scripts/nntp-ssl.php > /dev/null 2>&1");
|
||||
}
|
||||
}
|
||||
/* Change to non root user */
|
||||
$uinfo=posix_getpwnam($CONFIG['webserver_user']);
|
||||
change_identity($uinfo["uid"],$uinfo["gid"]);
|
||||
/* Everything below runs as $CONFIG['webserver_user'] */
|
||||
|
||||
@mkdir($spooldir."/log/",0755,'recursive');
|
||||
|
||||
if(isset($CONFIG['enable_nocem']) && $CONFIG['enable_nocem'] == true) {
|
||||
@mkdir($spooldir."nocem",0755,'recursive');
|
||||
exec($CONFIG['php_exec']." ".$config_dir."scripts/nocem.php");
|
||||
}
|
||||
|
||||
reset($menulist);
|
||||
foreach($menulist as $menu) {
|
||||
if(($menu[0] == '#') || (trim($menu) == "")) {
|
||||
continue;
|
||||
}
|
||||
$menuitem=explode(':', $menu);
|
||||
chdir("../".$menuitem[0]);
|
||||
# Send articles
|
||||
echo "Sending articles\n";
|
||||
echo exec($CONFIG['php_exec']." ".$config_dir."scripts/send.php");
|
||||
# Refresh spool
|
||||
if(isset($spoolnews) && ($spoolnews == true)) {
|
||||
exec($CONFIG['php_exec']." ".$config_dir."scripts/spoolnews.php");
|
||||
echo "Refreshed spoolnews\n";
|
||||
}
|
||||
# Expire articles
|
||||
exec($CONFIG['php_exec']." ".$config_dir."scripts/expire.php");
|
||||
echo "Expired articles\n";
|
||||
}
|
||||
# Rotate log files
|
||||
log_rotate();
|
||||
echo "Log files rotated\n";
|
||||
|
||||
function log_rotate() {
|
||||
global $logdir;
|
||||
$rotate = filemtime($logdir.'/rotate');
|
||||
if((time() - $rotate) > 86400) {
|
||||
$log_files = array('nntp.log', 'spoolnews.log', 'nocem.log', 'newsportal.log');
|
||||
foreach($log_files as $logfile) {
|
||||
$logfile=$logdir.'/'.$logfile;
|
||||
if(!is_file($logfile)) {
|
||||
continue;
|
||||
}
|
||||
@unlink($logfile.'.5');
|
||||
@rename($logfile.'.4', $logfile.'.5');
|
||||
@rename($logfile.'.3', $logfile.'.4');
|
||||
@rename($logfile.'.2', $logfile.'.3');
|
||||
@rename($logfile.'.1', $logfile.'.2');
|
||||
@rename($logfile, $logfile.'.1');
|
||||
echo 'Rotated: '.$logfile."\n";
|
||||
}
|
||||
unlink($logdir.'/rotate');
|
||||
touch($logdir.'/rotate');
|
||||
}
|
||||
}
|
||||
|
||||
function change_identity( $uid, $gid )
|
||||
{
|
||||
if( !posix_setgid( $gid ) )
|
||||
{
|
||||
print "Unable to setgid to " . $gid . "!\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if( !posix_setuid( $uid ) )
|
||||
{
|
||||
print "Unable to setuid to " . $uid . "!\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
|
||||
if(!isset($CONFIG['expire_days']) || $CONFIG['expire_days'] < 1) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$lockfile = sys_get_temp_dir() . '/'.$config_name.'-spoolnews.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting expire...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "expire currently running\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$webserver_group=$CONFIG['webserver_user'];
|
||||
$logfile=$logdir.'/expire.log';
|
||||
|
||||
$expireme=time() - ($CONFIG['expire_days'] * 86400);
|
||||
|
||||
$grouplist = file($config_dir.'/'.$config_name.'/groups.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
foreach($grouplist as $groupline) {
|
||||
$groupname=explode(' ', $groupline);
|
||||
$group=$groupname[0];
|
||||
$grouppath = preg_replace('/\./', '/', $group);
|
||||
$this_overview=$spooldir.'/'.$group.'-overview';
|
||||
$out_overview=$this_overview.'.new';
|
||||
|
||||
$overviewfp=fopen($this_overview, 'r');
|
||||
$out_overviewfp=fopen($out_overview, 'w');
|
||||
|
||||
while($line=fgets($overviewfp)) {
|
||||
$break=explode("\t", $line);
|
||||
if(strtotime($break[3]) < $expireme) {
|
||||
echo "Expiring: ".$break[4]." IN: ".$group." #".$break[0]."\r\n";
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Expiring: ".$break[4]." IN: ".$group." #".$break[0], FILE_APPEND);
|
||||
unlink($spooldir.'/articles/'.$grouppath.'/'.$break[0]);
|
||||
continue;
|
||||
} else {
|
||||
fputs($out_overviewfp, $line);
|
||||
}
|
||||
}
|
||||
fclose($overviewfp);
|
||||
fclose($out_overviewfp);
|
||||
rename($out_overview, $this_overview);
|
||||
chown($this_overview, $CONFIG['webserver_user']);
|
||||
chgrp($this_overview, $webserver_group);
|
||||
}
|
||||
// Remove from section overview
|
||||
$this_overview=$spooldir.'/'.$config_name.'-overview';
|
||||
$out_overview=$this_overview.'.new';
|
||||
$overviewfp=fopen($this_overview, 'r');
|
||||
$out_overviewfp=fopen($out_overview, 'w');
|
||||
|
||||
while($line=fgets($overviewfp)) {
|
||||
$break=preg_split("/(:#rsl#:|\t)/", $line, 6);
|
||||
// $break=explode("\t", $line);
|
||||
if($break[3] < $expireme) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Removing from overview: ".$break[2], FILE_APPEND);
|
||||
continue;
|
||||
} else {
|
||||
fputs($out_overviewfp, $line);
|
||||
}
|
||||
}
|
||||
fclose($overviewfp);
|
||||
fclose($out_overviewfp);
|
||||
rename($out_overview, $this_overview);
|
||||
chown($this_overview, $CONFIG['webserver_user']);
|
||||
chgrp($this_overview, $webserver_group);
|
||||
unlink($lockfile);
|
||||
?>
|
|
@ -0,0 +1,190 @@
|
|||
<?php
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
include $config_dir."/scripts/rslight-lib.php";
|
||||
if(file_exists($config_dir."/nntp.disable")) {
|
||||
clearstatcache(true, $config_dir."/nntp.disable");
|
||||
$parent_pid = file_get_contents(sys_get_temp_dir().'/rslight-nntp.lock', IGNORE_NEW_LINES);
|
||||
posix_kill($parent_pid, SIGTERM);
|
||||
exit;
|
||||
}
|
||||
/**
|
||||
* Listens for requests and forks on each connection
|
||||
*/
|
||||
$__server_listening = true;
|
||||
//error_reporting(E_ALL);
|
||||
set_time_limit(0);
|
||||
ob_implicit_flush();
|
||||
declare(ticks = 1);
|
||||
become_daemon();
|
||||
/* nobody/nogroup, change to your host's uid/gid of the non-priv user */
|
||||
|
||||
/* handle signals */
|
||||
pcntl_signal(SIGTERM, 'sig_handler');
|
||||
pcntl_signal(SIGINT, 'sig_handler');
|
||||
pcntl_signal(SIGCHLD, 'sig_handler');
|
||||
|
||||
if(isset($CONFIG['enable_all_networks']) && $CONFIG['enable_all_networks'] == true) {
|
||||
$bind="0.0.0.0";
|
||||
} else {
|
||||
$bind=$CONFIG['local_server'];
|
||||
}
|
||||
server_loop($bind, $CONFIG['local_ssl_port']);
|
||||
|
||||
/**
|
||||
* Change the identity to a non-priv user
|
||||
*/
|
||||
function change_identity( $uid, $gid )
|
||||
{
|
||||
if( !posix_setgid( $gid ) )
|
||||
{
|
||||
print "Unable to setgid to " . $gid . "!\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if( !posix_setuid( $uid ) )
|
||||
{
|
||||
print "Unable to setuid to " . $uid . "!\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates a server socket and listens for incoming client connections
|
||||
* @param string $address The address to listen on
|
||||
* @param int $port The port to listen on
|
||||
*/
|
||||
function server_loop($address, $port)
|
||||
{
|
||||
GLOBAL $__server_listening;
|
||||
GLOBAL
|
||||
$CONFIG,$logdir,$webserver_uid,$webserver_gid,$installed_path,
|
||||
$config_path,$groupconfig,$workpath,$path,$spooldir,$nntp_group,$auth_ok;
|
||||
$logfile=$logdir.'/nntp.log';
|
||||
$lockfile = sys_get_temp_dir() . '/rslight-nntp-ssl.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting Rocksolid Light NNTP Server...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "Rocksolid Light NNTP Server currently running\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$auth_ok = 0;
|
||||
$user = "";
|
||||
$pass = "";
|
||||
$pemfile = $spooldir.'/server.pem';
|
||||
if(!is_file($pemfile)) {
|
||||
create_certificate($pemfile);
|
||||
}
|
||||
$context = stream_context_create();
|
||||
stream_context_set_option($context, 'ssl', 'local_cert', $pemfile);
|
||||
stream_context_set_option($context, 'ssl', 'allow_self_signed', true);
|
||||
stream_context_set_option($context, 'ssl', 'verify_peer', false);
|
||||
stream_context_set_option($context, 'ssl', 'verify_peer_name', false);
|
||||
stream_context_set_option($context, 'ssl', 'ciphers', 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384');
|
||||
$sock = stream_socket_server(
|
||||
'tcp://'.$address.':'.$port,
|
||||
$errno,
|
||||
$errstr,
|
||||
STREAM_SERVER_BIND|STREAM_SERVER_LISTEN,
|
||||
$context
|
||||
);
|
||||
/* Change to non root user */
|
||||
$uinfo=posix_getpwnam($CONFIG['webserver_user']);
|
||||
change_identity($uinfo["uid"],$uinfo["gid"]);
|
||||
/* Everything below runs as $CONFIG['webserver_user'] */
|
||||
|
||||
echo "waiting for clients to connect\n";
|
||||
|
||||
while ($__server_listening)
|
||||
{
|
||||
$connection = stream_socket_accept($sock);
|
||||
if ($connection === false)
|
||||
{
|
||||
usleep(100);
|
||||
}elseif ($connection > 0)
|
||||
{
|
||||
handle_client($sock, $connection);
|
||||
}else
|
||||
{
|
||||
echo "error: ".socket_strerror($connection);
|
||||
file_put_contents($logfile, "\n".format_log_date()." error: ".socket_strerror($connection), FILE_APPEND);
|
||||
die;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Signal handler
|
||||
*/
|
||||
function sig_handler($sig)
|
||||
{
|
||||
switch($sig)
|
||||
{
|
||||
case SIGTERM:
|
||||
case SIGINT:
|
||||
exit();
|
||||
break;
|
||||
|
||||
case SIGCHLD:
|
||||
pcntl_waitpid(-1, $status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a new client connection
|
||||
*/
|
||||
function handle_client($ssock, $csock)
|
||||
{
|
||||
GLOBAL $__server_listening;
|
||||
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid == -1)
|
||||
{
|
||||
/* fork failed */
|
||||
echo "fork failure!\n";
|
||||
die;
|
||||
}elseif ($pid == 0)
|
||||
{
|
||||
/* child process */
|
||||
$__server_listening = false;
|
||||
fclose($ssock);
|
||||
interact($csock, true);
|
||||
fclose($csock);
|
||||
}else
|
||||
{
|
||||
fclose($csock);
|
||||
}
|
||||
}
|
||||
|
||||
function create_certificate($pemfile) {
|
||||
global $CONFIG;
|
||||
$certificateData = array(
|
||||
"countryName" => "US",
|
||||
"stateOrProvinceName" => "New York",
|
||||
"localityName" => "New York City",
|
||||
"organizationName" => "Rocksolid",
|
||||
"organizationalUnitName" => "Rocksolid Light",
|
||||
"commonName" => $CONFIG['organization'],
|
||||
"emailAddress" => "rocksolid@example.com"
|
||||
);
|
||||
|
||||
// Generate certificate
|
||||
$privateKey = openssl_pkey_new();
|
||||
$certificate = openssl_csr_new($certificateData, $privateKey);
|
||||
$certificate = openssl_csr_sign($certificate, null, $privateKey, 365);
|
||||
|
||||
// Generate PEM file
|
||||
$pem_passphrase = null; // empty for no passphrase
|
||||
$pem = array();
|
||||
openssl_x509_export($certificate, $pem[0]);
|
||||
openssl_pkey_export($privateKey, $pem[1], $pem_passphrase);
|
||||
$pem = implode($pem);
|
||||
|
||||
// Save PEM file
|
||||
file_put_contents($pemfile, $pem);
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,151 @@
|
|||
<?php
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
include $config_dir."/scripts/rslight-lib.php";
|
||||
if(file_exists($config_dir."/nntp.disable")) {
|
||||
clearstatcache(true, $config_dir."/nntp.disable");
|
||||
$parent_pid = file_get_contents(sys_get_temp_dir().'/rslight-nntp.lock', IGNORE_NEW_LINES);
|
||||
posix_kill($parent_pid, SIGTERM);
|
||||
exit;
|
||||
}
|
||||
/**
|
||||
* Listens for requests and forks on each connection
|
||||
*/
|
||||
$__server_listening = true;
|
||||
//error_reporting(E_ALL);
|
||||
set_time_limit(0);
|
||||
ob_implicit_flush();
|
||||
declare(ticks = 1);
|
||||
become_daemon();
|
||||
/* nobody/nogroup, change to your host's uid/gid of the non-priv user */
|
||||
|
||||
/* handle signals */
|
||||
pcntl_signal(SIGTERM, 'sig_handler');
|
||||
pcntl_signal(SIGINT, 'sig_handler');
|
||||
pcntl_signal(SIGCHLD, 'sig_handler');
|
||||
|
||||
if(isset($CONFIG['enable_all_networks']) && $CONFIG['enable_all_networks'] == true) {
|
||||
$bind="0.0.0.0";
|
||||
} else {
|
||||
$bind=$CONFIG['local_server'];
|
||||
}
|
||||
server_loop($bind, $CONFIG['local_port']);
|
||||
|
||||
/**
|
||||
* Change the identity to a non-priv user
|
||||
*/
|
||||
function change_identity( $uid, $gid )
|
||||
{
|
||||
if( !posix_setgid( $gid ) )
|
||||
{
|
||||
print "Unable to setgid to " . $gid . "!\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if( !posix_setuid( $uid ) )
|
||||
{
|
||||
print "Unable to setuid to " . $uid . "!\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates a server socket and listens for incoming client connections
|
||||
* @param string $address The address to listen on
|
||||
* @param int $port The port to listen on
|
||||
*/
|
||||
function server_loop($address, $port)
|
||||
{
|
||||
GLOBAL $__server_listening;
|
||||
GLOBAL
|
||||
$CONFIG,$logdir,$webserver_uid,$webserver_gid,$installed_path,
|
||||
$config_path,$groupconfig,$workpath,$path,$spooldir,$nntp_group,$auth_ok;
|
||||
$logfile=$logdir.'/nntp.log';
|
||||
$lockfile = sys_get_temp_dir() . '/rslight-nntp.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting Rocksolid Light NNTP Server...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "Rocksolid Light NNTP Server currently running\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$auth_ok = 0;
|
||||
$user = "";
|
||||
$pass = "";
|
||||
$sock = stream_socket_server(
|
||||
'tcp://'.$address.':'.$port,
|
||||
$errno,
|
||||
$errstr,
|
||||
STREAM_SERVER_BIND|STREAM_SERVER_LISTEN
|
||||
);
|
||||
/* Change to non root user */
|
||||
$uinfo=posix_getpwnam($CONFIG['webserver_user']);
|
||||
change_identity($uinfo["uid"],$uinfo["gid"]);
|
||||
/* Everything below runs as $CONFIG['webserver_user'] */
|
||||
|
||||
echo "waiting for clients to connect\n";
|
||||
|
||||
while ($__server_listening)
|
||||
{
|
||||
$connection = stream_socket_accept($sock);
|
||||
if ($connection === false)
|
||||
{
|
||||
usleep(100);
|
||||
}elseif ($connection > 0)
|
||||
{
|
||||
handle_client($sock, $connection);
|
||||
}else
|
||||
{
|
||||
echo "error: ".socket_strerror($connection);
|
||||
file_put_contents($logfile, "\n".format_log_date()." error: ".socket_strerror($connection), FILE_APPEND);
|
||||
die;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Signal handler
|
||||
*/
|
||||
function sig_handler($sig)
|
||||
{
|
||||
switch($sig)
|
||||
{
|
||||
case SIGTERM:
|
||||
case SIGINT:
|
||||
exit();
|
||||
break;
|
||||
|
||||
case SIGCHLD:
|
||||
pcntl_waitpid(-1, $status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a new client connection
|
||||
*/
|
||||
function handle_client($ssock, $csock)
|
||||
{
|
||||
GLOBAL $__server_listening;
|
||||
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid == -1)
|
||||
{
|
||||
/* fork failed */
|
||||
echo "fork failure!\n";
|
||||
die;
|
||||
}elseif ($pid == 0)
|
||||
{
|
||||
/* child process */
|
||||
$__server_listening = false;
|
||||
fclose($ssock);
|
||||
interact($csock, false);
|
||||
fclose($csock);
|
||||
}else
|
||||
{
|
||||
fclose($csock);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
|
||||
if(!isset($CONFIG['enable_nocem']) || $CONFIG['enable_nocem'] != true) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$lockfile = sys_get_temp_dir() . '/rslight-spoolnews.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting nocem...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "nocem currently running\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
putenv("GNUPGHOME=".$config_dir.".gnupg");
|
||||
$webserver_group=$CONFIG['webserver_user'];
|
||||
$logfile=$logdir.'/nocem.log';
|
||||
@mkdir($spooldir."nocem/processed",0755,'recursive');
|
||||
@mkdir($spooldir."nocem/failed",0755,'recursive');
|
||||
|
||||
$nocem_path=$spooldir."nocem/";
|
||||
$messages=scandir($nocem_path);
|
||||
$begin="@@BEGIN NCM BODY";
|
||||
$end="@@END NCM BODY";
|
||||
|
||||
foreach($messages as $message) {
|
||||
$nocem_file=$nocem_path.$message;
|
||||
if(!is_file($nocem_file)) {
|
||||
continue;
|
||||
}
|
||||
$signed_text=file_get_contents($nocem_file);
|
||||
if(verify_signature($signed_text) == 1) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Bad signature in: ".$message, FILE_APPEND);
|
||||
echo "Bad signature in: ".$message."\r\n";
|
||||
rename($nocem_file, $nocem_path."failed/".$message);
|
||||
continue;
|
||||
} else {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Good signature in: ".$message, FILE_APPEND);
|
||||
echo "Good signature in: ".$message."\r\n";
|
||||
}
|
||||
$nocem_list=file($nocem_file, FILE_IGNORE_NEW_LINES);
|
||||
$start=0;
|
||||
foreach($nocem_list as $nocem_line) {
|
||||
if(strpos($nocem_line, $begin) !== false) {
|
||||
$start=1;
|
||||
continue;
|
||||
}
|
||||
if(strpos($nocem_line, $end) !== false) {
|
||||
break;
|
||||
}
|
||||
if((isset($nocem_line[0]) && $nocem_line[0] == '<') && $start == 1) {
|
||||
$found = explode(' ', $nocem_line);
|
||||
echo 'SEARCH: '.$found[0].' IN: '.$found[1]."\r\n";
|
||||
delete_message($found[0], $found[1]);
|
||||
}
|
||||
}
|
||||
rename($nocem_file, $nocem_path."processed/".$message);
|
||||
}
|
||||
unlink($lockfile);
|
||||
exit;
|
||||
|
||||
function verify_signature($signed_text) {
|
||||
$plaintext = "";
|
||||
$res = gnupg_init();
|
||||
$info = gnupg_verify($res,$signed_text,false,$plaintext);
|
||||
|
||||
if($info[0]['status'] == 0 && $info[0]['summary'] == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
function delete_message($messageid, $group) {
|
||||
global $logfile,$spooldir, $CONFIG, $webserver_group;
|
||||
|
||||
$this_overview=$spooldir.'/'.$group.'-overview';
|
||||
if(false === (is_file($this_overview))) {
|
||||
return;
|
||||
}
|
||||
$out_overview=$this_overview.'.new';
|
||||
$overviewfp=fopen($this_overview, 'r');
|
||||
$out_overviewfp=fopen($out_overview, 'w');
|
||||
while($line=fgets($overviewfp)) {
|
||||
$break=explode("\t", $line);
|
||||
if($break[4] == $messageid) {
|
||||
echo "DELETING: ".$messageid." IN: ".$group." #".$break[0]."\r\n";
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name."DELETING: ".$messageid." IN: ".$group." #".$break[0], FILE_APPEND);
|
||||
$grouppath = preg_replace('/\./', '/', $group);
|
||||
unlink($spooldir.'/articles/'.$grouppath.'/'.$break[0]);
|
||||
continue;
|
||||
} else {
|
||||
fputs($out_overviewfp, $line);
|
||||
}
|
||||
}
|
||||
fclose($overviewfp);
|
||||
fclose($out_overviewfp);
|
||||
rename($out_overview, $this_overview);
|
||||
chown($this_overview, $CONFIG['webserver_user']);
|
||||
chgrp($this_overview, $webserver_group);
|
||||
return;
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,140 @@
|
|||
<?php
|
||||
/* spoolnews NNTP news spool creator
|
||||
* Version: 0.3.0
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
set_time_limit (900);
|
||||
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
|
||||
$logfile=$logdir.'/spoolnews.log';
|
||||
|
||||
@mkdir($spooldir."/".$config_name,0755,'recursive');
|
||||
|
||||
$lockfile = sys_get_temp_dir() . '/rslight-send.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting Send...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "Send currently running\n";
|
||||
exit;
|
||||
}
|
||||
$ns=nntp2_open($CONFIG['remote_server'], $CONFIG['remote_port']);
|
||||
if($ns == false) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Failed to connect to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND);
|
||||
exit();
|
||||
}
|
||||
echo "\nPosting articles\r\n";
|
||||
post_articles($ns, $spooldir);
|
||||
nntp_close($ns);
|
||||
unlink($lockfile);
|
||||
echo "\nSend Done\r\n";
|
||||
|
||||
function post_articles($ns, $spooldir) {
|
||||
global $logfile,$config_name;
|
||||
if(!is_dir($spooldir."/".$config_name."/outgoing/")) {
|
||||
return "No messages to send\r\n";
|
||||
}
|
||||
$outgoing_dir = $spooldir."/".$config_name."/outgoing/";
|
||||
$messages = scandir($outgoing_dir);
|
||||
foreach($messages as $message) {
|
||||
if(!is_file($outgoing_dir.$message)) {
|
||||
continue;
|
||||
}
|
||||
echo "Sending: ".$outgoing_dir.$message."\r\n";
|
||||
fputs($ns, "MODE READER\r\n");
|
||||
$response = line_read($ns);
|
||||
if (strcmp(substr($response,0,3),"200") != 0) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Unexpected response to MODE command: ".$response, FILE_APPEND);
|
||||
return $response;
|
||||
}
|
||||
fputs($ns, "POST\r\n");
|
||||
$response = line_read($ns);
|
||||
if (strcmp(substr($response,0,3),"340") != 0) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Unexpected response to POST command: ".$response, FILE_APPEND);
|
||||
return $response;
|
||||
}
|
||||
$message_fp = fopen($outgoing_dir.$message, "rb");
|
||||
while (($msgline = fgets($message_fp, 4096)) !== false) {
|
||||
fputs($ns, $msgline);
|
||||
}
|
||||
fputs($ns, ".\r\n");
|
||||
fclose($message_fp);
|
||||
$response = line_read($ns);
|
||||
if (strcmp(substr($response,0,3),"240") == 0) {
|
||||
unlink($outgoing_dir.$message);
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Posted: ".$message.": ".$response, FILE_APPEND);
|
||||
} else {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Failed to POST: ".$message.": ".$response, FILE_APPEND);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return "Messages sent\r\n";
|
||||
}
|
||||
|
||||
function nntp2_open($nserver=0,$nport=0) {
|
||||
global $text_error,$CONFIG;
|
||||
// echo "<br>NNTP OPEN<br>";
|
||||
$authorize=((isset($CONFIG['remote_auth_user'])) && (isset($CONFIG['remote_auth_pass'])) &&
|
||||
($CONFIG['remote_auth_user'] != ""));
|
||||
if ($nserver==0) $nserver=$CONFIG['remote_server'];
|
||||
if ($nport==0) $nport=$CONFIG['remote_port'];
|
||||
if($CONFIG['remote_ssl']) {
|
||||
$ns=@fsockopen('ssl://'.$nserver.":".$nport);
|
||||
} else {
|
||||
$ns=@fsockopen('tcp://'.$nserver.":".$nport);
|
||||
}
|
||||
// $ns=@fsockopen($nserver,$nport);
|
||||
$weg=line_read($ns); // kill the first line
|
||||
if (substr($weg,0,2) != "20") {
|
||||
echo "<p>".$text_error["error:"].$weg."</p>";
|
||||
fclose($ns);
|
||||
$ns=false;
|
||||
} else {
|
||||
if ($ns != false) {
|
||||
fputs($ns,"MODE reader\r\n");
|
||||
$weg=line_read($ns); // and once more
|
||||
if ((substr($weg,0,2) != "20") &&
|
||||
((!$authorize) || ((substr($weg,0,3) != "480") && ($authorize)))) {
|
||||
echo "<p>".$text_error["error:"].$weg."</p>";
|
||||
fclose($ns);
|
||||
$ns=false;
|
||||
}
|
||||
}
|
||||
if ((isset($CONFIG['remote_auth_user'])) && (isset($CONFIG['remote_auth_pass'])) &&
|
||||
($CONFIG['remote_auth_user'] != "")) {
|
||||
fputs($ns,"AUTHINFO USER ".$CONFIG['remote_auth_user']."\r\n");
|
||||
$weg=line_read($ns);
|
||||
fputs($ns,"AUTHINFO PASS ".$CONFIG['remote_auth_pass']."\r\n");
|
||||
$weg=line_read($ns);
|
||||
/* Only check auth if reading and posting same server */
|
||||
if (substr($weg,0,3) != "281" && !(isset($post_server)) && ($post_server!="")) {
|
||||
echo "<p>".$text_error["error:"]."</p>";
|
||||
echo "<p>".$text_error["auth_error"]."</p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($ns==false) echo "<p>".$text_error["connection_failed"]."</p>";
|
||||
return $ns;
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,43 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
if (file_exists('../common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/style.css">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
include $config_dir.'/admin.inc.php';
|
||||
|
||||
$configdata = include($config_dir.'/scripts/setuphelper.php');
|
||||
$configfile=$config_dir.'rslight.inc.php';
|
||||
|
||||
echo 'Main Configuration';
|
||||
echo '<table width=100% border="1" align="center" cellpadding="0" cellspacing="1">';
|
||||
echo '<form name="config" method="post" action="setup.php">';
|
||||
$pass = 'pass';
|
||||
foreach($CONFIG as $key=>$item) {
|
||||
if($key == 'configure') {
|
||||
continue;
|
||||
}
|
||||
$guide=$configdata[$key];
|
||||
echo '<tr><td>'.$guide.': </td><td>';
|
||||
if(strpos($key, $pass)) {
|
||||
echo '<input name="'.$key.'" type="password" id="'.$key.'" value="'.htmlspecialchars($item).'" size="50"><br />';
|
||||
} else {
|
||||
echo '<input name="'.$key.'" type="text" id="'.$key.'" value="'.htmlspecialchars($item).'" size="50"><br />';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
echo '<input type="hidden" name="configkey" value="'.$admin['key'].'">';
|
||||
echo '<input type="submit" name="configure" value="Save Configuration">';
|
||||
echo '</form>';
|
||||
?>
|
|
@ -0,0 +1,62 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=<?=$www_charset?>">
|
||||
<?php
|
||||
if (file_exists('../common/mods/style.css')) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/mods/style.css">';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="../common/style.css">';
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
include "config.inc.php";
|
||||
include "head.inc";
|
||||
include ($config_dir.'/admin.inc.php');
|
||||
|
||||
// Accept new config
|
||||
if(($_POST['configure'] == "Save Configuration") && ($_POST['configkey'] == $admin['key'])) {
|
||||
$configfile=$config_dir.'rslight.inc.php';
|
||||
$return = "<?php\n";
|
||||
$return.="return [\n";
|
||||
foreach($_POST as $key => $value) {
|
||||
if(($key !== 'configure') && ($key !== 'configkey')) {
|
||||
$value = preg_replace('/\'/', '\\\'', $value);
|
||||
$return.=' \''.$key.'\' => \''.trim($value).'\''.",\n";
|
||||
}
|
||||
}
|
||||
$return = rtrim(rtrim($return),',');
|
||||
$return.="\n];\n";
|
||||
$return.='?>';
|
||||
rename($configfile, $configfile.'.bak');
|
||||
file_put_contents($configfile, $return);
|
||||
echo '<center>';
|
||||
echo 'New Configuration settings saved in '.$configfile.'<br />';
|
||||
echo '<a href="'.$CONFIG['default_content'].'">Home</a>';
|
||||
echo '</center>';
|
||||
$CONFIG = $_POST;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (isset($_POST["password"]) && ($_POST["password"]==$admin["password"])) {
|
||||
include($config_dir.'/scripts/setup.inc.php');
|
||||
exit(0);
|
||||
} else{
|
||||
//Show the wrong password notice
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
echo '<center>';
|
||||
echo '<h2>Password Incorrect</h2>';
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'">Retry</a> <a href="'.$CONFIG['default_content'].'">Home</a>';
|
||||
echo '</center>';
|
||||
exit(0);
|
||||
}
|
||||
echo '<p align="left">';
|
||||
echo '<form id ="myForm" method="post"><p align="left">';
|
||||
echo 'Enter password to access configuration: ';
|
||||
echo '<input name="password" type="password" size="25" maxlength="20"><input value="Submit" type="submit"></p>';
|
||||
echo '</form>';
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
# To use a modified config for other 'sections', copy
|
||||
# this ENTIRE file to a new file in this directory
|
||||
# named as the section name followed by .inc.php
|
||||
# So for a section named 'rocksolid', it's rocksolid.inc.php
|
||||
|
||||
return [
|
||||
# REMOTE server configuration
|
||||
'remote_server' => 'The remote news server you connect to for syncing',
|
||||
'remote_port' => 'Remote server port',
|
||||
'remote_ssl' => 'Enable if connecting to remote server using ssl (1=true, blank=false)',
|
||||
'remote_auth_user' => 'Username to authenticate to remote server',
|
||||
'remote_auth_pass' => 'Password to authenticate to remote server',
|
||||
|
||||
# LOCAL server configuration
|
||||
'enable_nntp' => 'Enable local nntp server (1=true, blank=false)',
|
||||
'local_server' => 'Local server ip address',
|
||||
'local_port' => 'Local server port',
|
||||
'local_ssl_port' => 'Local server ssl port or blank for no ssl',
|
||||
'enable_all_networks' => 'Bind local server to all interfaces (1=true, blank=false)',
|
||||
'server_auth_user' => 'The username on the local server for the forum to use (auto-created)',
|
||||
'server_auth_pass' => 'The password for the local server user',
|
||||
|
||||
# Site configuration
|
||||
'rslight_title' => 'The tagline at the top of the web page',
|
||||
'title_full' => 'The site title in the client browser bar',
|
||||
'hide_email' => 'Truncate email addresses in From header (1=true, blank=false)',
|
||||
'email_tail' => 'What to add to a username if not in the form of an email address (include @)',
|
||||
'anonusername' => 'The username to use for anonymous posting (auto-created)',
|
||||
'anonuserpass' => 'The password for the anonymous username',
|
||||
'timezone' => 'A timezone offset from GMT (+5, -3 etc.)',
|
||||
'default_content' => 'The default page to display when loading the site',
|
||||
'readonly' => 'Make the site read only (1=true, blank=false)',
|
||||
'anonuser' => 'Allow anonymous posting (1=true, blank=false)',
|
||||
'organization' => 'What to add to outgoing message headers for Organization',
|
||||
'postfooter' => 'What to add to the bottom of posted messages (blank for nothing)',
|
||||
'synchronet' => 'Enable if your remote server is a Synchronet server (1=true, blank=false)',
|
||||
'auto_create' => 'Auto create accounts when first used to post (1=true, blank=false)',
|
||||
'verify_email' => 'Require new users to verify by email, requires phpmailer (1=true, blank=false)',
|
||||
'no_verify' => 'Domains that do not require email verification (space separated)',
|
||||
'auto_return' => 'Return to group automatically after posting (1=true, blank=false)',
|
||||
'overboard_noshow' => 'Do not show these groups in overboard (space sparated)',
|
||||
|
||||
# Spamassassin
|
||||
'spamassassin' => 'Enable checking messages using local spamassassin install (1=true, blank=false)',
|
||||
'spamc' => 'The path to spamc, or just spamc if it is already in your path',
|
||||
'spamgroup' => 'What newsgroup to move messages to that are considered spam (by spamassassin)',
|
||||
|
||||
# Executables on your system
|
||||
'php_exec' => 'The path to php, or just php if it is already in your path',
|
||||
'tac' => 'The shell command to display a file in reverse (Try tac, or tail -r)',
|
||||
'webserver_user' => 'The user that your webserver runs as',
|
||||
|
||||
# NOCEM
|
||||
'enable_nocem' => 'Enable acting on nocem messages, requires gnupg (1=true, blank=false)',
|
||||
'nocem_groups' => 'The list of groups to monitor for nocem messages (space separated)',
|
||||
|
||||
# Misc
|
||||
'expire_days' => 'Posts should be expired after how many days (zero for never)',
|
||||
'pathhost' => 'The pathhost to use in your XRef header. (maybe a one word name for your site)',
|
||||
'thissitekey' => 'An approximately 16 character random key (numbers, letters, else) specific for your site'
|
||||
];
|
||||
?>
|
|
@ -0,0 +1,452 @@
|
|||
<?php
|
||||
/* spoolnews NNTP news spool creator
|
||||
* Version: 0.3.0
|
||||
* Download: https://news.novabbs.com/getrslight
|
||||
*
|
||||
* E-Mail: retroguy@novabbs.com
|
||||
* Web: https://news.novabbs.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
include "config.inc.php";
|
||||
include ("$file_newsportal");
|
||||
|
||||
$remote_groupfile=$spooldir."/".$config_name."/".$CONFIG['remote_server'].":".$CONFIG['remote_port'].".txt";
|
||||
$file_groups=$config_path."groups.txt";
|
||||
$local_groupfile=$spooldir."/".$config_name."/local_groups.txt";
|
||||
$logfile=$logdir.'/spoolnews.log';
|
||||
|
||||
# END MAIN CONFIGURATION
|
||||
@mkdir($spooldir."/".$config_name,0755,'recursive');
|
||||
|
||||
if(!isset($maxarticles_per_run)) {
|
||||
$maxarticles_per_run = 100;
|
||||
}
|
||||
if(!isset($maxfirstrequest)) {
|
||||
$maxfirstrequest = 1000;
|
||||
}
|
||||
|
||||
if(!isset($CONFIG['enable_nntp']) || $CONFIG['enable_nntp'] != true) {
|
||||
$maxfirstrequest = $maxarticles;
|
||||
$maxarticles_per_run = $maxfetch;
|
||||
}
|
||||
|
||||
$workpath=$spooldir."/";
|
||||
$path=$workpath."articles/";
|
||||
$overview_file=$workpath.$config_name."-overview";
|
||||
|
||||
$lockfile = sys_get_temp_dir() . '/'.$config_name.'-spoolnews.lock';
|
||||
$pid = file_get_contents($lockfile);
|
||||
if (posix_getsid($pid) === false || !is_file($lockfile)) {
|
||||
print "Starting Spoolnews...\n";
|
||||
file_put_contents($lockfile, getmypid()); // create lockfile
|
||||
} else {
|
||||
print "Spoolnews currently running\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$sem = $spooldir."/".$config_name.".reload";
|
||||
if(is_file($sem)) {
|
||||
unlink($remote_groupfile);
|
||||
unlink($sem);
|
||||
$maxfirstrequest = 20;
|
||||
}
|
||||
|
||||
# Check for groups file, create if necessary
|
||||
create_spool_groups($file_groups, $remote_groupfile);
|
||||
create_spool_groups($file_groups, $local_groupfile);
|
||||
# Iterate through groups
|
||||
$enable_rslight=0;
|
||||
# Refresh group list
|
||||
$menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
foreach($menulist as $menu) {
|
||||
if(($menu[0] == '#') || (trim($menu) == "")) {
|
||||
continue;
|
||||
}
|
||||
$menuitem = explode(':', $menu);
|
||||
if(($menuitem[0] == $config_name) && ($menuitem[1] == '1')) {
|
||||
groups_read($server,$port,1);
|
||||
$enable_rslight = 1;
|
||||
echo "Loaded groups\n";
|
||||
}
|
||||
}
|
||||
$ns=nntp2_open($CONFIG['remote_server'], $CONFIG['remote_port']);
|
||||
$ns2=nntp_open();
|
||||
if($ns == false) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Failed to connect to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND);
|
||||
exit();
|
||||
}
|
||||
$grouplist = file($remote_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
foreach($grouplist as $findgroup) {
|
||||
$name = explode(':', $findgroup);
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Retrieving articles for: ".$name[0]."...", FILE_APPEND);
|
||||
echo "\nRetrieving articles for: ".$name[0]."... \r\n";
|
||||
get_articles($ns, $name[0]);
|
||||
/*
|
||||
if($enable_rslight == 1) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Updating threads for: ".$name[0]."...", FILE_APPEND);
|
||||
// thread_load_newsserver($ns2,$name[0],0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
nntp_close($ns2);
|
||||
nntp_close($ns);
|
||||
#expire_overview();
|
||||
unlink($lockfile);
|
||||
echo "\nSpoolnews Done\r\n";
|
||||
|
||||
function get_articles($ns, $group) {
|
||||
global $enable_rslight, $spooldir, $CONFIG, $maxarticles_per_run, $maxfirstrequest, $workpath, $path, $remote_groupfile, $local_groupfile, $overview_file, $local, $logdir, $config_name, $logfile;
|
||||
|
||||
if($ns == false) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Lost connection to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND);
|
||||
exit();
|
||||
}
|
||||
|
||||
$grouppath = $path.preg_replace('/\./', '/', $group);
|
||||
$banned_names = file("/etc/rslight/banned_names.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
|
||||
$nocem_check="@@NCM";
|
||||
|
||||
# Check if group exists. Open it if it does
|
||||
fputs($ns, "group ".$group."\r\n");
|
||||
$response = line_read($ns);
|
||||
if (strcmp(substr($response,0,3),"411") == 0) {
|
||||
echo "\n".$response."\n";
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Get config
|
||||
$grouplist = file($remote_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
foreach($grouplist as $findgroup) {
|
||||
$name = explode(':', $findgroup);
|
||||
if (strcmp($name[0], $group) == 0) {
|
||||
if (isset($name[1]))
|
||||
$article = $name[1] + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
|
||||
$grouplist = file($local_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
foreach($grouplist as $findgroup) {
|
||||
$name = explode(':', $findgroup);
|
||||
if (strcmp($name[0], $group) == 0) {
|
||||
if (is_numeric($name[1]))
|
||||
$local = $name[1];
|
||||
else {
|
||||
$thisgroup = $path."/".preg_replace('/\./', '/', $group);
|
||||
$articles = scandir($thisgroup);
|
||||
$ok_article=array();
|
||||
foreach($articles as $this_article) {
|
||||
if(!is_numeric($this_article)) {
|
||||
continue;
|
||||
}
|
||||
$ok_article[]=$this_article;
|
||||
}
|
||||
sort($ok_article);
|
||||
$local = $ok_article[key(array_slice($ok_article, -1, 1, true))];
|
||||
if(!is_numeric($local))
|
||||
$local = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($local < 1)
|
||||
$local = 1;
|
||||
}
|
||||
# Split group config line to get last article number
|
||||
$detail = explode(" ", $response);
|
||||
if (!isset($article)) {
|
||||
$article = $detail[2];
|
||||
}
|
||||
if($article < $detail[3] - $maxfirstrequest) {
|
||||
$article = $detail[3] - $maxfirstrequest;
|
||||
}
|
||||
if($article < $detail[2]) {
|
||||
$article = $detail[2];
|
||||
}
|
||||
// Broken message on last run? Let's try again.
|
||||
if($article > ($detail[3] + 1)) {
|
||||
$article = $detail[3];
|
||||
}
|
||||
# Pull articles and save them in our spool
|
||||
@mkdir($grouppath,0755,'recursive');
|
||||
$i=0;
|
||||
while ($article <= $detail[3]) {
|
||||
if(!is_numeric($article)) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." DEBUG This should show server group:article number: ".$CONFIG['remote_server']." ".$group.":".$article, FILE_APPEND);
|
||||
break;;
|
||||
}
|
||||
if($CONFIG['enable_nntp'] != true){
|
||||
$local = $article;
|
||||
}
|
||||
// Check for duplicate msgid
|
||||
$duplicate=0;
|
||||
fputs($ns, "stat ".$article."\r\n");
|
||||
$response = line_read($ns);
|
||||
$this_msgid = explode(' ', $response);
|
||||
$group_overviewfp=fopen($spooldir."/".$group."-overview", 'r');
|
||||
while($group_overview=fgets($group_overviewfp, 2048)) {
|
||||
$overview_msgid = explode("\t", $group_overview);
|
||||
if(strpos($overview_msgid[4], $this_msgid[2]) !== false) {
|
||||
echo "\nDuplicate Message-ID for: ".$CONFIG['remote_server']." ".$group.":".$article."\n";
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Duplicate Message-ID for: ".$CONFIG['remote_server']." ".$group.":".$article, FILE_APPEND);
|
||||
$article++;
|
||||
$duplicate = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose($group_overviewfp);
|
||||
if($duplicate == 1) {
|
||||
continue;
|
||||
}
|
||||
fputs($ns, "article ".$article."\r\n");
|
||||
$response = line_read($ns);
|
||||
if (strcmp(substr($response,0,3),"220") != 0) {
|
||||
echo "\n".$response."\n";
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Unexpected response to ARTICLE command: ".$response, FILE_APPEND);
|
||||
$article++;
|
||||
continue;
|
||||
}
|
||||
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true){
|
||||
while(is_file($grouppath."/".$local)) {
|
||||
$local++;
|
||||
}
|
||||
}
|
||||
$articleHandle = fopen($grouppath."/".$local, 'w+');
|
||||
$response = line_read($ns);
|
||||
$lines=0;
|
||||
$bytes=0;
|
||||
$ref=0;
|
||||
$banned=0;
|
||||
$is_header=1;
|
||||
while(strcmp($response,".") != 0)
|
||||
{
|
||||
$bytes = $bytes + mb_strlen($response, '8bit');
|
||||
if(trim($response) == "" || $lines > 0) {
|
||||
$is_header=0;
|
||||
$lines++;
|
||||
}
|
||||
if($is_header == 1) {
|
||||
// Find article date
|
||||
if(stripos($response, "Date: ") === 0) {
|
||||
$finddate=explode(': ', $response);
|
||||
$article_date = strtotime($finddate[1]);
|
||||
}
|
||||
// Get overview data
|
||||
if(stripos($response, "Message-ID: ") === 0) {
|
||||
$mid=explode(': ', $response);
|
||||
$ref=0;
|
||||
}
|
||||
if(stripos($response, "From: ") === 0) {
|
||||
$from=explode(': ', $response);
|
||||
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
|
||||
foreach($banned_names as $banned_name) {
|
||||
if(stripos($from[1], $banned_name) !== false) {
|
||||
$banned = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
$ref=0;
|
||||
}
|
||||
if(stripos($response, "Subject: ") === 0) {
|
||||
$subject=explode('Subject: ', $response, 2);
|
||||
$ref=0;
|
||||
}
|
||||
if(stripos($response, "Newsgroups: ") === 0) {
|
||||
$response=str_ireplace($group,$group,$response);
|
||||
$ref=0;
|
||||
}
|
||||
if(stripos($response, "Xref: ") === 0) {
|
||||
if(isset($CONFIG['enable_nntp']) && $CONFIG['enable_nntp'] == true) {
|
||||
$response="Xref: ".$CONFIG['pathhost']." ".$group.":".$local;
|
||||
}
|
||||
$xref=$response;
|
||||
$ref=0;
|
||||
}
|
||||
if(stripos($response, "References: ") === 0) {
|
||||
$this_references=explode('References: ', $response);
|
||||
$references = $this_references[1];
|
||||
$ref=1;
|
||||
}
|
||||
if((stripos($response, ':') === false) && (strpos($response, '>'))) {
|
||||
if($ref == 1) {
|
||||
$references=$references.$response;
|
||||
}
|
||||
}
|
||||
}
|
||||
fputs($articleHandle, $response."\n");
|
||||
// Check here for broken $ns connection before continuing
|
||||
$response=fgets($ns,1200);
|
||||
if($response == false) {
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Lost connection to ".$CONFIG['remote_server'].":".$CONFIG['remote_port']." retrieving article ".$article, FILE_APPEND);
|
||||
@fclose($articleHandle);
|
||||
unlink($grouppath."/".$local);
|
||||
continue;
|
||||
}
|
||||
$response=str_replace("\n","",str_replace("\r","",$response));
|
||||
}
|
||||
fputs($articleHandle, $response."\n");
|
||||
@fclose($articleHandle);
|
||||
$lines=$lines-1;
|
||||
$bytes = $bytes + ($lines * 2);
|
||||
// Don't spool article if $banned=1
|
||||
if($banned == 1) {
|
||||
@fclose($articleHandle);
|
||||
unlink($grouppath."/".$local);
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Skipping: ".$CONFIG['remote_server']." ".$group.":".$article." user: ".$from[1]." is banned", FILE_APPEND);
|
||||
$article++;
|
||||
} else {
|
||||
if((strpos($CONFIG['nocem_groups'], $group) !== false) && ($CONFIG['enable_nocem'] == true)) {
|
||||
if(strpos($subject[1], $nocem_check) !== false) {
|
||||
$nocem_file = tempnam($spooldir."/nocem", "nocem-".$group."-");
|
||||
copy($grouppath."/".$local, $nocem_file);
|
||||
}
|
||||
}
|
||||
// Overview
|
||||
$overviewHandle = fopen($workpath.$group."-overview", 'a');
|
||||
fputs($overviewHandle, $local."\t".$subject[1]."\t".$from[1]."\t".$finddate[1]."\t".$mid[1]."\t".$references."\t".$bytes."\t".$lines."\t".$xref."\n");
|
||||
fclose($overviewHandle);
|
||||
$references="";
|
||||
// overview for entire section
|
||||
file_put_contents($overview_file, $group."\t".$local."\t".$mid[1]."\t".$article_date."\t".$from[1]."\t".$subject[1]."\n", FILE_APPEND);
|
||||
// End Overview
|
||||
|
||||
if($article_date > time())
|
||||
$article_date = time();
|
||||
touch($grouppath."/".$local, $article_date);
|
||||
echo "\nRetrieved: ".$group." ".$article."\n";
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Wrote to spool: ".$CONFIG['remote_server']." ".$group.":".$article, FILE_APPEND);
|
||||
$i++;
|
||||
if($i > $maxarticles_per_run)
|
||||
break;
|
||||
$article++;
|
||||
$local++;
|
||||
}
|
||||
}
|
||||
$article--;
|
||||
// $local--;
|
||||
// Update title
|
||||
if(!is_file($workpath.$group."-title")) {
|
||||
fputs($ns, "XGTITLE ".$group."\r\n");
|
||||
$response = line_read($ns);
|
||||
if (strcmp(substr($response,0,3),"282") == 0) {
|
||||
$overviewHandle = fopen($workpath.$group."-title", 'w');
|
||||
$response = line_read($ns);
|
||||
while(strcmp($response,".") != 0)
|
||||
{
|
||||
fputs($overviewHandle, $response."\r\n");
|
||||
$response = line_read($ns);
|
||||
}
|
||||
@fclose($overviewHandle);
|
||||
}
|
||||
}
|
||||
# Save config
|
||||
$grouplist = file($remote_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
$saveconfig = fopen($remote_groupfile, 'w+');
|
||||
foreach($grouplist as $savegroup) {
|
||||
$name = explode(':', $savegroup);
|
||||
if (strcmp($name[0], $group) == 0) {
|
||||
fputs($saveconfig, $group.":".$article."\n");
|
||||
} else {
|
||||
fputs($saveconfig, $savegroup."\n");
|
||||
}
|
||||
}
|
||||
fclose($saveconfig);
|
||||
$grouplist = file($local_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
$saveconfig = fopen($local_groupfile, 'w+');
|
||||
foreach($grouplist as $savegroup) {
|
||||
$name = explode(':', $savegroup);
|
||||
if (strcmp($name[0], $group) == 0) {
|
||||
fputs($saveconfig, $group.":".$local."\n");
|
||||
} else {
|
||||
fputs($saveconfig, $savegroup."\n");
|
||||
}
|
||||
}
|
||||
fclose($saveconfig);
|
||||
}
|
||||
|
||||
function create_spool_groups($in_groups, $out_groups) {
|
||||
$grouplist = file($in_groups, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
$groupout = fopen($out_groups, "a+");
|
||||
foreach($grouplist as $group) {
|
||||
if($group[0] == ":") {
|
||||
continue;
|
||||
}
|
||||
$thisgroup = preg_split("/( |\t)/", $group, 2);
|
||||
fseek($groupout, 0);
|
||||
$found=0;
|
||||
while (($buffer = fgets($groupout)) !== false) {
|
||||
if (stripos($buffer, $thisgroup[0]) !== false) {
|
||||
$found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($found == 0) {
|
||||
fwrite($groupout, $thisgroup[0]."\r\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
fclose($groupout);
|
||||
return;
|
||||
}
|
||||
|
||||
function nntp2_open($nserver=0,$nport=0) {
|
||||
global $text_error,$CONFIG;
|
||||
// echo "<br>NNTP OPEN<br>";
|
||||
$authorize=((isset($CONFIG['remote_auth_user'])) && (isset($CONFIG['remote_auth_pass'])) &&
|
||||
($CONFIG['remote_auth_user'] != ""));
|
||||
if ($nserver==0) $nserver=$CONFIG['remote_server'];
|
||||
if ($nport==0) $nport=$CONFIG['remote_port'];
|
||||
if($CONFIG['remote_ssl']) {
|
||||
$ns=@fsockopen('ssl://'.$nserver.":".$nport);
|
||||
} else {
|
||||
$ns=@fsockopen('tcp://'.$nserver.":".$nport);
|
||||
}
|
||||
// $ns=@fsockopen($nserver,$nport);
|
||||
$weg=line_read($ns); // kill the first line
|
||||
if (substr($weg,0,2) != "20") {
|
||||
echo "<p>".$text_error["error:"].$weg."</p>";
|
||||
fclose($ns);
|
||||
$ns=false;
|
||||
} else {
|
||||
if ($ns != false) {
|
||||
fputs($ns,"MODE reader\r\n");
|
||||
$weg=line_read($ns); // and once more
|
||||
if ((substr($weg,0,2) != "20") &&
|
||||
((!$authorize) || ((substr($weg,0,3) != "480") && ($authorize)))) {
|
||||
echo "<p>".$text_error["error:"].$weg."</p>";
|
||||
fclose($ns);
|
||||
$ns=false;
|
||||
}
|
||||
}
|
||||
if ((isset($CONFIG['remote_auth_user'])) && (isset($CONFIG['remote_auth_pass'])) &&
|
||||
($CONFIG['remote_auth_user'] != "")) {
|
||||
fputs($ns,"AUTHINFO USER ".$CONFIG['remote_auth_user']."\r\n");
|
||||
$weg=line_read($ns);
|
||||
fputs($ns,"AUTHINFO PASS ".$CONFIG['remote_auth_pass']."\r\n");
|
||||
$weg=line_read($ns);
|
||||
/* Only check auth if reading and posting same server */
|
||||
if (substr($weg,0,3) != "281" && !(isset($post_server)) && ($post_server!="")) {
|
||||
echo "<p>".$text_error["error:"]."</p>";
|
||||
echo "<p>".$text_error["auth_error"]."</p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($ns==false) echo "<p>".$text_error["connection_failed"]."</p>";
|
||||
return $ns;
|
||||
}
|
||||
?>
|
|
@ -0,0 +1 @@
|
|||
rocksolid.spam
|
|
@ -0,0 +1 @@
|
|||
rocksolid.spam
|