From c2092e5f41aed93fe8c9ea0ff969429e8c057e33 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sat, 28 Nov 2020 17:55:31 -0700 Subject: [PATCH] Initial commit --- Rocksolid_Light/LICENSE.md | 16 + Rocksolid_Light/README.md | 61 + Rocksolid_Light/common/change.php | 114 ++ Rocksolid_Light/common/changepw.php | 45 + Rocksolid_Light/common/config.inc.php | 16 + Rocksolid_Light/common/create.php | 73 + Rocksolid_Light/common/faq.txt | 43 + Rocksolid_Light/common/head.inc | 24 + Rocksolid_Light/common/header.php | 136 ++ Rocksolid_Light/common/images/green.png | Bin 0 -> 1815 bytes Rocksolid_Light/common/images/latest.png | Bin 0 -> 1085 bytes Rocksolid_Light/common/images/red.png | Bin 0 -> 2044 bytes .../common/images/rocksolidlight.png | Bin 0 -> 3250 bytes Rocksolid_Light/common/images/yellow.png | Bin 0 -> 1801 bytes Rocksolid_Light/common/newuser.php | 58 + Rocksolid_Light/common/nodelist.php | 50 + Rocksolid_Light/common/rsintro.html | 213 +++ Rocksolid_Light/common/rsusers.php | 208 +++ Rocksolid_Light/common/setup.php | 62 + Rocksolid_Light/common/style-colors.css | 20 + Rocksolid_Light/common/style-frames.css | 625 +++++++++ Rocksolid_Light/common/style.css | 788 +++++++++++ Rocksolid_Light/debian-install.sh | 129 ++ Rocksolid_Light/freebsd-install.sh | 129 ++ Rocksolid_Light/index.php | 56 + Rocksolid_Light/rocksolid/article-flat.php | 125 ++ Rocksolid_Light/rocksolid/article.php | 97 ++ Rocksolid_Light/rocksolid/attachment.php | 22 + Rocksolid_Light/rocksolid/auth.inc | 0 Rocksolid_Light/rocksolid/check.php | 6 + Rocksolid_Light/rocksolid/config.inc.php | 243 ++++ Rocksolid_Light/rocksolid/decrypt.php | 104 ++ Rocksolid_Light/rocksolid/head.inc | 23 + Rocksolid_Light/rocksolid/img/I.gif | Bin 0 -> 68 bytes Rocksolid_Light/rocksolid/img/L.gif | Bin 0 -> 67 bytes Rocksolid_Light/rocksolid/img/T.gif | Bin 0 -> 71 bytes Rocksolid_Light/rocksolid/img/e.gif | Bin 0 -> 42 bytes Rocksolid_Light/rocksolid/img/k1.gif | Bin 0 -> 61 bytes Rocksolid_Light/rocksolid/img/k2.gif | Bin 0 -> 66 bytes Rocksolid_Light/rocksolid/img/s.gif | Bin 0 -> 55 bytes Rocksolid_Light/rocksolid/index.php | 62 + Rocksolid_Light/rocksolid/lang/bosanski.lang | 53 + Rocksolid_Light/rocksolid/lang/czech.lang | 53 + Rocksolid_Light/rocksolid/lang/danish.lang | 61 + Rocksolid_Light/rocksolid/lang/deutsch.lang | 75 ++ .../rocksolid/lang/deutsch_du.lang | 70 + Rocksolid_Light/rocksolid/lang/dutch.lang | 53 + Rocksolid_Light/rocksolid/lang/english.lang | 82 ++ .../rocksolid/lang/english.lang.orig | 75 ++ Rocksolid_Light/rocksolid/lang/finnish.lang | 53 + Rocksolid_Light/rocksolid/lang/francais.lang | 54 + Rocksolid_Light/rocksolid/lang/italiano.lang | 53 + Rocksolid_Light/rocksolid/lang/norsk.lang | 53 + Rocksolid_Light/rocksolid/lang/polish.lang | 66 + Rocksolid_Light/rocksolid/lang/portugues.lang | 53 + Rocksolid_Light/rocksolid/lang/russian.lang | 53 + Rocksolid_Light/rocksolid/lang/slovenski.lang | 53 + Rocksolid_Light/rocksolid/lang/spanish.lang | 53 + Rocksolid_Light/rocksolid/lang/turkish.lang | 53 + .../rocksolid/lib/captcha/+cookie.patch | 48 + .../rocksolid/lib/captcha/COLLEGE.ttf | Bin 0 -> 5896 bytes Rocksolid_Light/rocksolid/lib/captcha/README | 205 +++ .../rocksolid/lib/captcha/_test.1.php | 67 + .../rocksolid/lib/captcha/captcha.php | 340 +++++ Rocksolid_Light/rocksolid/lib/message.inc.php | 785 +++++++++++ Rocksolid_Light/rocksolid/lib/post.inc.php | 364 +++++ Rocksolid_Light/rocksolid/lib/thread.inc.php | 1167 ++++++++++++++++ Rocksolid_Light/rocksolid/lib/types.inc.php | 80 ++ Rocksolid_Light/rocksolid/lib/validator.inc | 243 ++++ Rocksolid_Light/rocksolid/newsportal.php | 1176 +++++++++++++++++ Rocksolid_Light/rocksolid/nntp.php | 622 +++++++++ Rocksolid_Light/rocksolid/overboard.php | 332 +++++ Rocksolid_Light/rocksolid/post.php | 400 ++++++ Rocksolid_Light/rocksolid/result.php | 213 +++ Rocksolid_Light/rocksolid/search.php | 42 + Rocksolid_Light/rocksolid/tail.inc | 10 + Rocksolid_Light/rocksolid/thread.php | 130 ++ Rocksolid_Light/rslight/admin.inc.php | 5 + Rocksolid_Light/rslight/debian-install.sh | 131 ++ Rocksolid_Light/rslight/freebsd-install.sh | 131 ++ Rocksolid_Light/rslight/links.conf | 5 + Rocksolid_Light/rslight/menu.conf | 17 + Rocksolid_Light/rslight/phpmailer.inc.php | 29 + Rocksolid_Light/rslight/rename.conf | 21 + .../rslight/rocksolid/encryption_ok.txt | 2 + Rocksolid_Light/rslight/rocksolid/groups.txt | 20 + Rocksolid_Light/rslight/rslight.inc.php | 45 + Rocksolid_Light/rslight/scripts/cron.php | 107 ++ Rocksolid_Light/rslight/scripts/expire.php | 75 ++ Rocksolid_Light/rslight/scripts/nntp-ssl.php | 190 +++ Rocksolid_Light/rslight/scripts/nntp.php | 151 +++ Rocksolid_Light/rslight/scripts/nocem.php | 108 ++ .../rslight/scripts/rslight-lib.php | 1049 +++++++++++++++ Rocksolid_Light/rslight/scripts/send.php | 140 ++ Rocksolid_Light/rslight/scripts/setup.inc.php | 43 + Rocksolid_Light/rslight/scripts/setup.php | 62 + .../rslight/scripts/setuphelper.php | 63 + Rocksolid_Light/rslight/scripts/spoolnews.php | 452 +++++++ Rocksolid_Light/rslight/spoolnews/groups.txt | 1 + .../rslight/spoolnews/groups.txt.dist | 1 + Rocksolid_Light/spoolnews/config.inc.php | 1 + Rocksolid_Light/spoolnews/newsportal.php | 1 + 102 files changed, 13688 insertions(+) create mode 100644 Rocksolid_Light/LICENSE.md create mode 100644 Rocksolid_Light/README.md create mode 100644 Rocksolid_Light/common/change.php create mode 100644 Rocksolid_Light/common/changepw.php create mode 100644 Rocksolid_Light/common/config.inc.php create mode 100644 Rocksolid_Light/common/create.php create mode 100644 Rocksolid_Light/common/faq.txt create mode 100644 Rocksolid_Light/common/head.inc create mode 100644 Rocksolid_Light/common/header.php create mode 100644 Rocksolid_Light/common/images/green.png create mode 100644 Rocksolid_Light/common/images/latest.png create mode 100644 Rocksolid_Light/common/images/red.png create mode 100755 Rocksolid_Light/common/images/rocksolidlight.png create mode 100644 Rocksolid_Light/common/images/yellow.png create mode 100644 Rocksolid_Light/common/newuser.php create mode 100644 Rocksolid_Light/common/nodelist.php create mode 100644 Rocksolid_Light/common/rsintro.html create mode 100644 Rocksolid_Light/common/rsusers.php create mode 100644 Rocksolid_Light/common/setup.php create mode 100644 Rocksolid_Light/common/style-colors.css create mode 100644 Rocksolid_Light/common/style-frames.css create mode 100644 Rocksolid_Light/common/style.css create mode 100755 Rocksolid_Light/debian-install.sh create mode 100755 Rocksolid_Light/freebsd-install.sh create mode 100644 Rocksolid_Light/index.php create mode 100644 Rocksolid_Light/rocksolid/article-flat.php create mode 100644 Rocksolid_Light/rocksolid/article.php create mode 100644 Rocksolid_Light/rocksolid/attachment.php create mode 100644 Rocksolid_Light/rocksolid/auth.inc create mode 100644 Rocksolid_Light/rocksolid/check.php create mode 100644 Rocksolid_Light/rocksolid/config.inc.php create mode 100644 Rocksolid_Light/rocksolid/decrypt.php create mode 100644 Rocksolid_Light/rocksolid/head.inc create mode 100644 Rocksolid_Light/rocksolid/img/I.gif create mode 100644 Rocksolid_Light/rocksolid/img/L.gif create mode 100644 Rocksolid_Light/rocksolid/img/T.gif create mode 100644 Rocksolid_Light/rocksolid/img/e.gif create mode 100644 Rocksolid_Light/rocksolid/img/k1.gif create mode 100644 Rocksolid_Light/rocksolid/img/k2.gif create mode 100644 Rocksolid_Light/rocksolid/img/s.gif create mode 100644 Rocksolid_Light/rocksolid/index.php create mode 100644 Rocksolid_Light/rocksolid/lang/bosanski.lang create mode 100644 Rocksolid_Light/rocksolid/lang/czech.lang create mode 100644 Rocksolid_Light/rocksolid/lang/danish.lang create mode 100644 Rocksolid_Light/rocksolid/lang/deutsch.lang create mode 100644 Rocksolid_Light/rocksolid/lang/deutsch_du.lang create mode 100644 Rocksolid_Light/rocksolid/lang/dutch.lang create mode 100644 Rocksolid_Light/rocksolid/lang/english.lang create mode 100644 Rocksolid_Light/rocksolid/lang/english.lang.orig create mode 100644 Rocksolid_Light/rocksolid/lang/finnish.lang create mode 100644 Rocksolid_Light/rocksolid/lang/francais.lang create mode 100644 Rocksolid_Light/rocksolid/lang/italiano.lang create mode 100644 Rocksolid_Light/rocksolid/lang/norsk.lang create mode 100644 Rocksolid_Light/rocksolid/lang/polish.lang create mode 100644 Rocksolid_Light/rocksolid/lang/portugues.lang create mode 100644 Rocksolid_Light/rocksolid/lang/russian.lang create mode 100644 Rocksolid_Light/rocksolid/lang/slovenski.lang create mode 100644 Rocksolid_Light/rocksolid/lang/spanish.lang create mode 100644 Rocksolid_Light/rocksolid/lang/turkish.lang create mode 100644 Rocksolid_Light/rocksolid/lib/captcha/+cookie.patch create mode 100644 Rocksolid_Light/rocksolid/lib/captcha/COLLEGE.ttf create mode 100644 Rocksolid_Light/rocksolid/lib/captcha/README create mode 100644 Rocksolid_Light/rocksolid/lib/captcha/_test.1.php create mode 100644 Rocksolid_Light/rocksolid/lib/captcha/captcha.php create mode 100644 Rocksolid_Light/rocksolid/lib/message.inc.php create mode 100644 Rocksolid_Light/rocksolid/lib/post.inc.php create mode 100644 Rocksolid_Light/rocksolid/lib/thread.inc.php create mode 100644 Rocksolid_Light/rocksolid/lib/types.inc.php create mode 100644 Rocksolid_Light/rocksolid/lib/validator.inc create mode 100644 Rocksolid_Light/rocksolid/newsportal.php create mode 100755 Rocksolid_Light/rocksolid/nntp.php create mode 100755 Rocksolid_Light/rocksolid/overboard.php create mode 100644 Rocksolid_Light/rocksolid/post.php create mode 100755 Rocksolid_Light/rocksolid/result.php create mode 100644 Rocksolid_Light/rocksolid/search.php create mode 100644 Rocksolid_Light/rocksolid/tail.inc create mode 100644 Rocksolid_Light/rocksolid/thread.php create mode 100644 Rocksolid_Light/rslight/admin.inc.php create mode 100755 Rocksolid_Light/rslight/debian-install.sh create mode 100755 Rocksolid_Light/rslight/freebsd-install.sh create mode 100644 Rocksolid_Light/rslight/links.conf create mode 100644 Rocksolid_Light/rslight/menu.conf create mode 100644 Rocksolid_Light/rslight/phpmailer.inc.php create mode 100644 Rocksolid_Light/rslight/rename.conf create mode 100644 Rocksolid_Light/rslight/rocksolid/encryption_ok.txt create mode 100644 Rocksolid_Light/rslight/rocksolid/groups.txt create mode 100644 Rocksolid_Light/rslight/rslight.inc.php create mode 100755 Rocksolid_Light/rslight/scripts/cron.php create mode 100755 Rocksolid_Light/rslight/scripts/expire.php create mode 100755 Rocksolid_Light/rslight/scripts/nntp-ssl.php create mode 100755 Rocksolid_Light/rslight/scripts/nntp.php create mode 100755 Rocksolid_Light/rslight/scripts/nocem.php create mode 100755 Rocksolid_Light/rslight/scripts/rslight-lib.php create mode 100755 Rocksolid_Light/rslight/scripts/send.php create mode 100644 Rocksolid_Light/rslight/scripts/setup.inc.php create mode 100644 Rocksolid_Light/rslight/scripts/setup.php create mode 100644 Rocksolid_Light/rslight/scripts/setuphelper.php create mode 100755 Rocksolid_Light/rslight/scripts/spoolnews.php create mode 100644 Rocksolid_Light/rslight/spoolnews/groups.txt create mode 100644 Rocksolid_Light/rslight/spoolnews/groups.txt.dist create mode 120000 Rocksolid_Light/spoolnews/config.inc.php create mode 120000 Rocksolid_Light/spoolnews/newsportal.php diff --git a/Rocksolid_Light/LICENSE.md b/Rocksolid_Light/LICENSE.md new file mode 100644 index 0000000..571429a --- /dev/null +++ b/Rocksolid_Light/LICENSE.md @@ -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. diff --git a/Rocksolid_Light/README.md b/Rocksolid_Light/README.md new file mode 100644 index 0000000..0b73011 --- /dev/null +++ b/Rocksolid_Light/README.md @@ -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 diff --git a/Rocksolid_Light/common/change.php b/Rocksolid_Light/common/change.php new file mode 100644 index 0000000..56d294b --- /dev/null +++ b/Rocksolid_Light/common/change.php @@ -0,0 +1,114 @@ + + + + +'; +} else { + echo ''; +} +?> + + +'; + +$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 '
Back'; + exit(2); +} + +if (!check_bbs_auth($username, $current)) { + echo "Failed to authenticate\r\n"; + echo '
Back'; + exit(2); +} + +if ($_POST['password'] !== $_POST['password2']) { + echo "Your passwords entered do not match\r\n"; + echo '
Back'; + 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 '
Back'; + 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; + } +} +?> + + diff --git a/Rocksolid_Light/common/changepw.php b/Rocksolid_Light/common/changepw.php new file mode 100644 index 0000000..affdd94 --- /dev/null +++ b/Rocksolid_Light/common/changepw.php @@ -0,0 +1,45 @@ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Change Password
Username:
Current Password:
New Password:
Re-enter Password:
  
+
+ + diff --git a/Rocksolid_Light/common/config.inc.php b/Rocksolid_Light/common/config.inc.php new file mode 100644 index 0000000..76c8269 --- /dev/null +++ b/Rocksolid_Light/common/config.inc.php @@ -0,0 +1,16 @@ +"; +$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 ); +?> diff --git a/Rocksolid_Light/common/create.php b/Rocksolid_Light/common/create.php new file mode 100644 index 0000000..e14f5ec --- /dev/null +++ b/Rocksolid_Light/common/create.php @@ -0,0 +1,73 @@ +"; + echo '
'; + echo ' '; + echo ''; + echo ''; + echo ''; + echo ''; + echo '

Cancel and return to home page'; + 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 '
Back'; + +function make_key($username) { + $key = openssl_random_pseudo_bytes(44); + return base64_encode($key); +} +?> diff --git a/Rocksolid_Light/common/faq.txt b/Rocksolid_Light/common/faq.txt new file mode 100644 index 0000000..363da0e --- /dev/null +++ b/Rocksolid_Light/common/faq.txt @@ -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. + diff --git a/Rocksolid_Light/common/head.inc b/Rocksolid_Light/common/head.inc new file mode 100644 index 0000000..d4f0e32 --- /dev/null +++ b/Rocksolid_Light/common/head.inc @@ -0,0 +1,24 @@ + + +<?php echo htmlspecialchars($title); ?> + + +'; +} else { + echo ''; +} +?> +
+ + diff --git a/Rocksolid_Light/common/header.php b/Rocksolid_Light/common/header.php new file mode 100644 index 0000000..9c5e27c --- /dev/null +++ b/Rocksolid_Light/common/header.php @@ -0,0 +1,136 @@ + + + + +'; +} else { + echo ''; +} +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'; +} + +?> + + + + + + + + +
+ Rocksolid Light + + + +

+ + + +

+
+'.trim($linkitem[0]).'  '; + } +?> +
+'; +echo ''; +foreach($menulist as $menu) { + if($menu[0] == '#') { + continue; + } + $menuitem=explode(':', $menu); + if($menuitem[1] == '0') { + continue; + } + echo ''; +} + echo '
'; + echo ''; + echo ''; + echo ''; + echo '
'; +echo ''; + +foreach($menulist as $menu) { + if($menu[0] == '#') { + continue; + } + $menuitem=explode(':', $menu); + if($menuitem[1] == '0') { + continue; + } + echo ''; +} + if(strlen($motd) > 0) { + echo '

'.$motd.'

'; + } + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; + echo '

'; +?> + diff --git a/Rocksolid_Light/common/images/green.png b/Rocksolid_Light/common/images/green.png new file mode 100644 index 0000000000000000000000000000000000000000..30f243cc21a9aa0e9cefebceef078b3bb5fd83b8 GIT binary patch literal 1815 zcmV+y2k7{TP)C-uT{@{k`!Kbz4{O=fX_K~o z*`%ssQ?;>*Zmgw+iorU7v9#PW=yGXD0;NO+5@_u>Cb8o$2uR5 zWb6ICub%V1uL)xe57N-kFcuS~6sJy}fXn5QCqkh&GG+OA;L`gCW4F$zh`Z59n5&LR{6*;H^T< z`t~1xa^%goWn~!vGPCR{cLM^P?}cxiJ-tVkq~!tVJ@RJCodBSs z<>~%w`^X#2sQmsUU8fg4vYOicW&LBVbfE`h%A9E*E1|@U7vDij6slOlr*(qmPkbfW#!NFph(1H82fm* zPXG<11UF59=hFvR-TCbYR>hG|5cgDcYgpNbt<{`mAi>hI(ti{y1<1kGlJpjX4 z_`_tz5QP^@%E~0&FkosbCViie6GIzef&!{*SW(}MsJjG)rY_9`p-^Z+_CBBQk+vr{ zf1eP7^&qo6wJeCIFcDs@4DH9OHpHx&3 zXv?ki0vvfZ$KyG%?VH=bQ&U^BPva%Kv#2CJ4=A#Nq!<_m2M3*2hjXXRW`}mqTx1?% zMP447I=BDk!tf`h>o#`mT~Szs@jGMSW!dFMJ~+0+@!8G8+t&f=L#%Z|DFwR}q5ZRZWNz6@?iVO#1y{rmDfT0A|NV zz$nGEoWUBJo3XOAG^IBPf`GxxgJ^7OhOVh|u%3Jm8VX!^|HMDg`1P&m{@dZV*i86* zS|&6;9R|C36~W%~`;%_Z&dEvHk`jpoWJQL<>6i=7aXe-tVT|-%L}OJsY&IJ*>~-1Uv2_uuCb3%)$U#-bwYkRMbAB>KU?#d+Q1SBarx|cQ$Z*+Gx z@w1~Zc6fzNUusp9aLh!GO~K@piawuw+L4q0aztf9GaYQ-Y$q_SYUA00vYeR3HsNww zQCC?3T}=T0V@+T5&*`r94S>b2Su{BL;Y{h~IV#E`{&+!evLAAM7i}{4O49SJS zXFuwTN&B5b=J(t-;y%`|y&DYCv$@>pnouI~!;g+?zh%@+0eGki>~3$yqGAk;5ojiZ z)h2B;sp*bI&9_7jG)c(8RE+tt$pGMYmp;Z~`Y)Ml2Ef@rSEm2~002ovPDHLkV1h9? FF)`HLaRdMW literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/common/images/latest.png b/Rocksolid_Light/common/images/latest.png new file mode 100644 index 0000000000000000000000000000000000000000..f28955f50d8d2ef18bb6ae382353b10a4a4fdc93 GIT binary patch literal 1085 zcmV-D1j74?P)6nr+GSrNXA5JAJ#t}`L zxsC+256lufF-V+Ivt%R7Q1R!2iP2=smWV0S#V8DiicEeqE*qe1taO63 zg<8t%d-q-cAems>*D^-^$Me@q?mPE<&bjBFdk*j)3t6gywdSx{ot?LpH?PS9r?LV7 zWa_6glOv*cq{sjMfxvACuv8z?=nA(#B{J?Afy&#Wl<|}?$ZUR{BLGhbG(4eNp1Yvt zaAIz-^V7gbuIRD>Y)8*mMHqJ^9HlvwrREh+0E3#ps^{4OU!DEbEdf|-kLXnQl(qx~ zS}n=!md;nj5ty|6C-QH7wNuCU&!r4teg3!sxy9~jfj*qb^!{QSR%fUI0F$#K-o5Bc z=%Go=carOuc1$(Zgp&f8b|2*VtvkOA3e=(Go#e8Eka=~+7*ua{DMrJr<#)8l|YLS*fBU$xI{YEsX%4i~%q|cPuL`%2g{}`67~B zWvTl(E6}v}#^MO9FRY{z)GG}@8PxLHjgn1pidXTLRc{z2L@$; z+9Dh7G{nED4feYM0DpuTU4w$PmPJd0;{muj#{e$LQ!@Os8&`fDjo%NfFDxN@ zk9HGYrC5?T8D;#iZyWULdH#qf;h~l;c>dy*v!6;LYkjE{!#%z6`+?v4dU4@YGsv0C2en;R$icJIwCW%?pjkZ^?8<1KD%vEZI`KGR4@h1FX0GB>KK?g(!^Q?%8k^GED2R z?%oG*M|K|ctLA6JNXU;V?=Y@k>cQ;v7=RG|mlWl1EoFSszZ17A00000NkvXXu0mjf DCa?<1 literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/common/images/red.png b/Rocksolid_Light/common/images/red.png new file mode 100644 index 0000000000000000000000000000000000000000..5cc73c027b9c9492df5e4e02471866cf038f2811 GIT binary patch literal 2044 zcmV0Z8rsq}MWj;Os0gL%Lux8f@ud${ zNh_r&?T4zQL`s9wCJI#=*kEjIV;i%6?AmyDy=$-6-p9=BJZ`FR!%8J*w!^*`s_ODLuIWL&>~9b^76#1|G|v)f^@TJZ087={HU1fL9^=P}UN z>m2v{D>YqjY1+~BSHWRl%Jy|YyWbCRJbrOw466l)Re}(LSR@RAV^-jFMF!2vSV1^TgG4uAl{ z)ZoucX73#>vy#q%i?6;CnGM6?birC!wo`o+076VNng(Q82J`Xw&e>@EySkjQ5qA+t z%OSujf+YkD$3bUUIOEfA1c!U)EutNwqrh#@HF|&$0!5Y~3Id9XiVzNko41Z8IuF{a z&N?{uMYa7c7$By zc=2dSt?e;`g|oQgX;qR0QP09svkkKwc3`5U9?8Z7kas_UCEbYUdWLATTR|8;UjS2X zUDtR;k;v%iD0(_SZm>p|p8UvI#E?iKddn+ofAI1P`(L^U@9u*jSqYLX!&y{{UHe*X z9$!Th3T&CS_Q(3HtH?g_=l2MN=&5HuqYO^`c6Dc*y3VTigxgX0pa*lGb4S$ zaA54srHt~F!f=iU!O1H#q1o>oJ8`N;%PL?6yUSo$8vx~@0dAc;BgPnE!}@(k8=g7w zquq)uK@dd{!a$KSpr9b8N*rv3zF(DW+4DlFXQSI2iQ{T=CcgL3SL|-L2g!H@oM3Zl zg!KYgcxZsi?YlDR&i3&{;9g8>-VZgE#=x~sXd=bl1Baoc)1UwhBa70ijZQ-|;JVa- zn&NUKn)i9CYqvsCWE0qGcW@eODFfhtXb+_3qa18bpDHDz)G%Oo6+m=2p)7+ePL2Zv z;4Kz&GU~bpSssIJ}(pAedoNE?72F{jNUv)DTS(K z;jS)2>1-S`ue}b&9KT(NFGNj~Ro899hGWNYQ%}HU6Jg}cXErT1R|NoXEzJu+{Pa^$ z_kIy6RqmSXXlq;c5#r$xtFBV|Q<%s&+fpt@FZW zcYwk`L3yDmprNU-iz0O0Kw=?|!ivpi6C3I8hE22qYGyDm4`@T(SV}G-H$);6L)cnd zhtWITm>Rkbr^60Gw3#NPnvU4i7((~^FgnzWLT?dV&H`lR3>HEYm<~>$qQsXasd#^0 z3TSt4d^k8i_x)Z^`PVXv;%oiV*Xx^h?LlwP4H#JoiDU|@rXe1SU@kWNx{qA%i7(hw&Ryd2w z!LkfkLg86XSYO|WJ$v@U!dpxbj^mI@E+P^M;j!w?m>cS9<5@QUGa+Sp5EkG80}=nP z6A#9Zmp51KTwmLWvg$3+H5G}_1mtWMZf_};<|9xuNlZ^oA`+fKW7BTL!c!^}n|>Dz zyY}+{1#&KiHqrmb+ikB8-RZeb)2St-6LXlKi@{sD34+@T!CnBK=g`yBg|hMrcztCE zbYJ;E(BvUX$RnPJSPty;$nSmrj~lwqeD7O-e&waa2bbT)!0=rV!kFc!N-4;)44OD=I{ zE`;b@6!)%O?r=IBT1Z~(DwgJcNmw2f$RD7x^{{y#aBtdb-UVP7=FTmzOeW3Kk%`8- zmV+BAs;V&`7>1;(=zae}dxH`>!m5m#1J@aLC3)Te%&vpxo}dOmsp%4E6r7=AJP`hJ z`S$&%3oC0(BTABljP#qpk#tc6z%5Uj*n0pcHC_|INs7^EVz!TSrzIjYKDj_SDc z-uZTCaNs$cg`ZkU{-^-Skv^;zZicxjee`xi;8t4|)pgCIE5jVmO9s{+=Jovl8UF+y a4U!#*$Ty(?0000z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ|C`m*?RCwBA{Qv(y!zdU9qkulZw|Z6@km>+p<;|^W z@9AYPKmf6f2K^`)1$52iGl4jao|zm300M|{v_>BVBOrqb0;yHRW-zGwav(knRKJ=^ zZZHN?XMlJX(9CpthXFtUF^wjJQ83Iixe_#ky(co0gEHh@XhwfeB{#qdnzKM$F%aPZ z5J00%_faqsYI0D9CAJm?^`AldI)Mel9x6FyCe%#2H`!qTAb>_Q`Y0IAnS3`8gKBhF z5}NET&`e%IC3k>Y2BDyu9BAg*feH_R02=M1kAmTv(LtHq7@En?4v-s+p@q#Jpc}#l zGCTkRXtYKj1;a6u&xF>@1DVNT-3A5{x((!*PgF|*Ab>^(<3_=7%jBS@GH4nror-;I za=1XpA_)YWKSAzy9R`UXTmKAH z6Lg|wkPdW3KsAhHW;UvrMWVf-PB#p-2qKY=`?Cl%!Gz#C$Sm;0*F>MI>?it z$leW&^iePh=+PerWq?_vWB?ktBMqANX;Rog^OFmy-2s3AqDRxc16tCKf>A*0{_wql zSd4;J*mTgUut8crOY#UlKmgHeFb?Fn)uTyr6woM>?}qk=O-N|sGZ4G#4Z7$?2}$TI zdcPaFuwkIVq8Ow?WHmW01%LpeS4LL?IdmZB5k~<*07|%fhM>DU7)YBdhi@t&vJgqb zGTv|&OQ8Z=6ho`QH;P8^0Ro7UjE+8-qXg}nq~Ynek7o2i3ZS*btfAy)v=R2RL}qfL zHkAO?x-cL{&e4G}a>a$TC_Ovdb9CMHxvaXWA=D<{kqP^S#sxBO+=?qNc=Y z4H|f@pi==u^q?11{VJ&XSp?M1gtijiqZbN5xwA-_at~5C?18xhYF9b5Ab3wiEl=#M zlrhpY=^muKhHUmdT!jrl05MTH0tAstJZybHY=OFpK*0b?OuM0_EWQ$$nE8H?{26>^ z5ojsQ#38*0Et97a;V%ZL{BC@+64VMK8Vr763u{4W7=_Ze`8|0i=eoI zw#blMNEJxkgw@biC`H{ffB>STMh7L%|1gYHlHscH?xAId4l?YV2@P=cgeOR%IfA5Q zMx;dw*jg#*13RHO3IkVYfp8W_%^r%S1wpMaqE=z9L}I~1ZTpeeu)ilV-a_%IN9rRh zK{Hf3o+dVU`zq88X;Ah(q!x}VRR4RV+M1a0E#w)GPN;rkXrU8EjWHO20HVi&nfF+l zOt|_bu-Y*lM{`CHIiW#Y5xAP`70}FutGVU^O}NCgRB&ZDS1gf$%{`z5vCdU%cX*krvOJ3-}#~B=nt&>2)L!SEEgQF(8 z2aS+>1ZsXHp!Xk_WCt=*fk!jPQ{(-pz=X42`!-$#y zS9o_Kxv3Lc`zlc>lOrF)L~P-OcX0{QfTA&>Ob#u$jG>tvHuF(|RFI_OX!Vdf1A-i9 zoz$K(1qdKYn(p|TYOvAw_oQSVLIZeMG6J>?aSy#D1qB)?0YaP4)M#EBzzg;plBNGQyV(Z;i=-Wmf4AWAYisCF@djXL6J=B*;J6+ny_F$EAkKsk4%+<0H{dl~x2fVA%nKv2>1ND8{KAP50gwjMI*FMsM4B&W zz?B}62K4YAxr~&_1(BNR7~>Im##Kmdwx=PD`_QD|1_&T(jk>QUwdTW7yAdNssKyYa zV|v6@tG|aHSYZO~SDqyyvgr{a(~qInq*Rk}^8fJ|%pu5NZH`0HR7phc>Hl^+^QLR&1RmVc^RJhka-9m}QLK3Q_@UjHn6r5NSW9gMn#C zgI>gB7TA>3dj>26c1V{e2txbi@9}gMU}FNXF{n_aIB_MW`Ax!!vkXY?rs+OTA zJUX$pI<5qmhMYmsN=RG-QfG;*9n+8^1J)$$U?6U(CTz1pCn>c$v~U46??L`@f!6Y{ z8j8^IRMZS3TKC5pkPC8XrXza^EK;T=WlzFgq_}#Ir3-KdX`pL0woC`as~AwH1v`=A z7M#fmWZ+O@{RbK+0GWj}JJCt&jY$9jM9tl6d!S4Cu$Ayi(8Rt6>cLr9GNT}LP^uHk z#x)l^i--i>0o?&~mO%fPP!sDc(tyos9Bu+-K5#@q6X_}}nGY0+%0x7)@4=e>R170( z0z%>ao(f|PGZ_%mv&0k%XOQA*7Mff+S_VwVqCb=YvFeQhsgDnv4<{y*Be!A%@wgYZ zq&W;}N$nnb9DM~4K-8W`U(JAfQAIgY#+rqrPioA7f295%a?1e}vCzQ7)_f+kXoHx8 zE0O1{@8QUNFu$ck)d=D!=vG1fEr=sCpifg#C5&hgzu1->leDCmK!26c)EKPU3u}?R zXFx1XMLsN|9I5&3f}9DVwR|X2_@0HzDKTJ9rBQs41k^s*e7q}k{R1rB(&fB&fB>TE z5?E-7imM3%AEkyi$;jExh%Et-+qWUdeq6OoC{hNWg{Nt^8%K?g;T|f75w+s?Jp*xz zR>*CJcHnDiL7Tnh(5AW))Ge?=eid}j#XG1ud!T6px#9t}hVDY+0k##j0-D*BkowBy zlw@+WaiB9ugL}%*Ob#pT>2`YyKmgHVt@|uu`s&c;$}AES@E&Yk1~M``S;z1~^5mGc150HKwWxjf@d14f&q0O`8_P|>x8OFhmM87`th*&dU9`gxrZZOT#=^;kp~+Y z=m-D;XwclfM&qNT-a`j#&JKXTU`J~SQtF;Tew5Tbs9WBXX%?={F!=UOAfL{9kBqbe zn|3=3odO-U03d)yFIgM~gQcK%!7_Gnk5-FFpslYnNPXw`!#R8b0%$a&kAjg}u&jbM z*-b{mG2{RNGV*Ed{Eq3PEP<3K%+JKC>Uv(9CniLtbx3~iQWJpfJSTdQ81D+ kIqakwa@QyfSpX1V0Pc7IF#r=0LjV8(07*qoM6N<$f+(n!yZ`_I literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/common/images/yellow.png b/Rocksolid_Light/common/images/yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..673b499c8327c35aa1ccb5f13a792c682476943b GIT binary patch literal 1801 zcmV+k2ln`hP)|Z6ZB8|UaqXHJS|Jg@|Klrwn|cN z>z^NG2(@=`2zxU0{PWQ7rzV^bSmR`%L3n!0m6c@P(VOWTw1Geg> zU5UHb+E|9g!-T;+p@f+`3=4tK@U3?b?`*qzF6{L#gU40-C;z=J7eGNkA-XCbQ|4+d z9H7Y(sH)6?7#3z0gO}d=^*8$N-;-CiZmb&#$Mz|TEO8tUo);_{rA*NP*6Icbwlb)S z3{}qmAHxt9BsTHy^GAPwK$TPg#^&zsPF-j`0N-GLf@2u1Xn@5#o`bn%GrYU@V&e}E z!m(jH(ym(6esMFRqkXRret6MuGdT#I2w~vbbqx9*^yzu7m=(y-G!3Oyi&4Jx^DwwP z$cPmXmagKn?&eMR#>Zm{tA~yiaAzU{2aih>51)soYKja+lAuUAD0zA1@Id}W(Yf}k z35_vIv%R<;2qB-JoiHo0bCltV4^R{Z0EH+nd};HRFT6fF!4a`Ek8~;mt7R=R$qD3q zXMdq%n1lutuL6eU!16ps0)Di8c-8yB7x>L=#!M{6SuCzA!BbmWVASW33ACSDpeFyK zfdPtHK{_6RJQFwiM<-htgZo&EtJ0iK&cJ9h;NrP6*!Gp(Fd6k=40e|WX72aJnn3jC zWvIhC z8{leaMhVA2%_hLHJYvE7Awfy^(qivGHXa3MD1lJs0hbN^ZusL9dQ)BN0U;TJQORL^ z=ys4$DQpPceo4=gkOmYNp!3v$7oE_%s*ua)m)A3#e)amt<&O3~KAY#jriR`yNuhUi zkVihf0aR0=scLZm)hk*7szH@PI**44&hwQmG`4zjG1ONh1_a0B>@-Qu>O01S+VifVVA# zXY1GT?7_p>aqzXmD=2e&kcdT*il-nroWW3V97Fd9P*Gk3i`5Q7N|Cg>S1Iv+04&Up ztN{@WV0jL-7!#;n`z46WRuQG9^@pmy{sm2Cux`B^$9s{TjY7&M^Hh;wTigWR zUIwbjpqlo-Q#c?QkC1pwc-3it?2jau#Ob%+c;Kn7!t;A}!fcWd36DWvT2afI#S-tA zw?oRyt7KVTzzYI+eM#Yf8y(%P(J1zYN4pUH=*{mMM%q@72S&oq>Lx5%z6OgtOHo$2 zqJdeu?GN_`hZ@IUfFH&-wQYUqTnJ^lQn!oth-Uv-%0l zP>R4%?>#A>-(2Zggn_{@CV~lAN=)#$SGC;g48UkIqha-vyCMVKuK^e+2%yLk0D{VO zPowJbOzfKXVi4loQ03JM+1LeecncjrwhH+uh{ z1y|sHVml;R!tlrK(BiRCrg;fiB?Dhy5C+{@RFpeGhys8C%djAXK{gZB{2lE_*?js= z!Ar;y3MH53gOcHyOljku*_lW>rxBQ}<>=_};q2*?li8`Bft-{>A`w9_QOB_ z^YgiDSU?4#aO}}+&UVDVF<|%>s+_XtD0*? zLSZ!9z8z1DJ;^?J-wPm95Fq-|wK7TX(W?yS^H1IgNx{2kgv``?Rt95)u%J8-vcLw3 zCfit@v34dEgR15wb-3*$tI8S7lX;)#KWlA-2Fg(o9jKb;7*?f(1I1hj01ebkEfw1& rRW&o2NQa>1dMM%MeV+dpF3~CJD<+!g00000NkvXXu0mjfF*i9kA4FgP literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/common/newuser.php b/Rocksolid_Light/common/newuser.php new file mode 100644 index 0000000..db93a4b --- /dev/null +++ b/Rocksolid_Light/common/newuser.php @@ -0,0 +1,58 @@ +"; + echo "More than one account may not be created in 30 days
"; + echo '
Return to Home Page'; +} else { +?> + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Register Username
Username:
Email:
Password:
Re-enter Password:
  
Change current password
+
+
+ + + diff --git a/Rocksolid_Light/common/nodelist.php b/Rocksolid_Light/common/nodelist.php new file mode 100644 index 0000000..2f5efa9 --- /dev/null +++ b/Rocksolid_Light/common/nodelist.php @@ -0,0 +1,50 @@ + +

+

Welcome +to Rocksolid

+

How +to access and what’s available:

+

+
+ +

i2p +Web forums: def2.i2p + def3.i2p def4.i2p + def5.i2p retrobbs.i2p + novabbs.i2p rslight.i2p

+

Tor +Web Forums: z5bqfv5v75kxy7pj.onion + dkzerogt6z6ybhcj.onion + j7zbybfl5ho2rta3.onion

+

Clearnet +Web Forums: +www.rocksolidbbs.com +www.novabbs.com +news.novabbs.com

+
+

NNTP +Newsreader Access: +

+

wwcqkwfo5yhe6uribv5tzylk25j5hkdk6gdnyftzd3k7dawlzwca.b32.i2p

+

asq5mo52aghemn2i.onion:119

+

news.i2pn2.org:119, 563

+
+

Create +NNTP Account: rslight.i2p + dkzerogt6z6ybhcj.onion + news.novabbs.com +

+

+
+

Questions? +Post in rocksolid.shared.rocksolid (Rocksolid)

+


+
+ +

+
+ + diff --git a/Rocksolid_Light/common/rsintro.html b/Rocksolid_Light/common/rsintro.html new file mode 100644 index 0000000..5de5ec0 --- /dev/null +++ b/Rocksolid_Light/common/rsintro.html @@ -0,0 +1,213 @@ + + + + + Welcome to Rocksolid +'; +} else { + echo ''; +} +?> + + +

What +is Rocksolid?

+

Rocksolid +is a network of sites running primarily in the i2p and Tor networks, +but there are also nodes available via the regular internet.

+

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.

+

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.

+


+ +

+

Current +Rocksolid Nodes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Dancing + Elephants 2 (fudforum)

+

Rocksolid + forums

+
+

def2.i2p

+
+


+ +

+
+


+ +

+
+

Dancing + Elephants 3 (fudforum)

+

Rocksolid + forums

+
+

def3.i2p

+
+


+ +

+
+


+ +

+
+

RocksolidTextboard + (custom)

+

Rocksolid + forums

+
+

def4.i2p

+
+


+ +

+
+


+ +

+
+

RetroBBS + II (fudforum)

+

Rocksolid, + FMS, Usenet

+
+

retrobbs2.i2p

+
+

dkzerogt6z6ybhcj.onion

+
+


+ +

+
+

Rocksolid + Light (custom)

+

Rocksolid, + FMS, DoveNet, Usenet

+
+

rslight.i2p

+
+

bchz4vggexx63qvy.onion

+
+

rslight.novabbs.com

+
+

Rocksolid + Light Mobile (custom)

+

Rocksolid, + FMS, Dovenet, Usenet

+
+

retrobbs.i2p/mobile

+
+

j7zbybfl5ho2rta3.onion/mobile

+
+

mobile.rocksolidbbs.com

+
+

RetroBBS + (synchronet)

+

Rocksolid, + FMS, Dovenet, Usenet

+
+

retrobbs.i2p

+
+

j7zbybfl5ho2rta3.onion

+
+

retrobbs.rocksolidbbs.com

+
+


+ +

+


+ +

+

NNTP +access (requires +an +account on RetroBBS to post)

+ + + + + + + + + + + +
+

RetroBBS + (synchronet)

+
+

retrobbs-nntp.i2p

+
+

j7zbybfl5ho2rta3.onion:119

+
+

retrobbs.rocksolidbbs.com:119

+
+


+ +

+

Questions? +Please post to a rocksolid group/forum and we’ll do our best to +help.

+ + diff --git a/Rocksolid_Light/common/rsusers.php b/Rocksolid_Light/common/rsusers.php new file mode 100644 index 0000000..248cd20 --- /dev/null +++ b/Rocksolid_Light/common/rsusers.php @@ -0,0 +1,208 @@ + + + + +'; +} else { + echo ''; +} +?> + + +'; + +$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 '
Back'; + exit(2); +} + +if ($_POST['password'] !== $_POST['password2']) { + echo "Your passwords entered do not match\r\n"; + echo '
Back'; + 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 '
Back'; + 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 '
Back'; + exit(2); +} + +# Does user file already exist? +if ($userFileHandle = @fopen($userFilename, 'r')) +{ + if ($command == "Create") + { + echo "User:".$thisusername." Already Exists\r\n"; + echo '
Back'; + 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'].'

'; +/* 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.'
'; + echo 'Please enter the code from the email below:
'; + } + echo '
'; + if($CONFIG['verify_email'] === true) { + echo ' '; + } + echo ''; + echo ''; + echo ''; + echo ''; + echo '

Cancel and return to home page'; +} 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; +} +?> + + diff --git a/Rocksolid_Light/common/setup.php b/Rocksolid_Light/common/setup.php new file mode 100644 index 0000000..ab4f6de --- /dev/null +++ b/Rocksolid_Light/common/setup.php @@ -0,0 +1,62 @@ + + + + +'; +} else { + echo ''; +} +?> + + + $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 '
'; + echo 'New Configuration settings saved in '.$configfile.'
'; + echo 'Home'; + echo '
'; + $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 '
'; + echo '

Password Incorrect

'; + echo 'Retry Home'; + echo '
'; + exit(0); + } + echo '

'; + echo '

'; + echo 'Enter password to access configuration: '; + echo '

'; + echo '
'; + } +?> diff --git a/Rocksolid_Light/common/style-colors.css b/Rocksolid_Light/common/style-colors.css new file mode 100644 index 0000000..5b1c188 --- /dev/null +++ b/Rocksolid_Light/common/style-colors.css @@ -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; +} + diff --git a/Rocksolid_Light/common/style-frames.css b/Rocksolid_Light/common/style-frames.css new file mode 100644 index 0000000..7048618 --- /dev/null +++ b/Rocksolid_Light/common/style-frames.css @@ -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; +} diff --git a/Rocksolid_Light/common/style.css b/Rocksolid_Light/common/style.css new file mode 100644 index 0000000..262fd24 --- /dev/null +++ b/Rocksolid_Light/common/style.css @@ -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; +} diff --git a/Rocksolid_Light/debian-install.sh b/Rocksolid_Light/debian-install.sh new file mode 100755 index 0000000..cac8596 --- /dev/null +++ b/Rocksolid_Light/debian-install.sh @@ -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||$spoolpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$configpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$username|" $configpath/rslight.inc.php +sed -i '' -e "s||$site_key|" $configpath/rslight.inc.php +sed -i '' -e "s||$anonymous_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$local_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$admin_password|" $configpath/admin.inc.php +sed -i '' -e "s||$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" diff --git a/Rocksolid_Light/freebsd-install.sh b/Rocksolid_Light/freebsd-install.sh new file mode 100755 index 0000000..9c61778 --- /dev/null +++ b/Rocksolid_Light/freebsd-install.sh @@ -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||$spoolpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$configpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$username|" $configpath/rslight.inc.php +sed -i '' -e "s||$site_key|" $configpath/rslight.inc.php +sed -i '' -e "s||$anonymous_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$local_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$admin_password|" $configpath/admin.inc.php +sed -i '' -e "s||$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" diff --git a/Rocksolid_Light/index.php b/Rocksolid_Light/index.php new file mode 100644 index 0000000..8788570 --- /dev/null +++ b/Rocksolid_Light/index.php @@ -0,0 +1,56 @@ + + + + + <?php echo $CONFIG['rslight_title'] ?> + + +'; +} else { + echo ''; +} +?> + + +
+
+'; + } else { + echo ''; + } +?> +
+ +
+ +
+
+ + + diff --git a/Rocksolid_Light/rocksolid/article-flat.php b/Rocksolid_Light/rocksolid/article-flat.php new file mode 100644 index 0000000..9567f21 --- /dev/null +++ b/Rocksolid_Light/rocksolid/article-flat.php @@ -0,0 +1,125 @@ + + +header->subject); + header("Last-Modified: ".date("r", $message->header->date)); + $title.= ' - '.$group.' - '.$subject; + } + include "head.inc"; + echo '

'; + echo ''.basename(getcwd()).' / '; + echo ''.htmlspecialchars(group_display_name($group)).' / '.$subject.'

'; + +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; (($iheader->id,$group,$thread,$pageids); + message_thread($message->header->id,$group,$thread,false); + echo '
'; + echo ''; + // navigation line + echo ''; +// Article List button + echo ''; +// Pages + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo articleflat_pageselect($group,$id,count($subthread),$first); + echo '
'; + foreach($pageids as $subid) { + flush(); + $message=message_read($subid,0,$group); + echo ' '; + message_show($group,$subid,0,$message,$articleflat_chars_per_articles); + if ((!$CONFIG['readonly']) && ($message)) { + echo '
'. + ''. + ''. + ''. + ''. + '
'; + } + } + // navigation line + echo ''; +// Article List button + echo ''; +// Pages + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo articleflat_pageselect($group,$id,count($subthread),$first); + echo '
'; +} +include "tail.inc"; +?> diff --git a/Rocksolid_Light/rocksolid/article.php b/Rocksolid_Light/rocksolid/article.php new file mode 100644 index 0000000..e18fe68 --- /dev/null +++ b/Rocksolid_Light/rocksolid/article.php @@ -0,0 +1,97 @@ + + +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"); + } + + +?> + + + +

+ + +'.$text_thread["button_grouplist"].''; + } + echo ''; + if ((!$CONFIG['readonly']) && ($message) && + (!function_exists("npreg_group_has_write_access") || + npreg_group_has_write_access($group))) + echo ''; + + if(function_exists(npreg_user_is_moderator) && npreg_user_is_moderator($group)) { + echo ''; + } + +?> +
'.$text_article["back_to_group"].' '.$text_article["button_answer"]. + ''.$text_article["button_cancel"].' 
+ +"; + message_show($group,$id,0,$message); + if($article_showthread) + message_thread($message->header->id,$group,$thread); + + } + include "tail.inc"; +?> diff --git a/Rocksolid_Light/rocksolid/attachment.php b/Rocksolid_Light/rocksolid/attachment.php new file mode 100644 index 0000000..2fab9ce --- /dev/null +++ b/Rocksolid_Light/rocksolid/attachment.php @@ -0,0 +1,22 @@ +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); +} +?> diff --git a/Rocksolid_Light/rocksolid/auth.inc b/Rocksolid_Light/rocksolid/auth.inc new file mode 100644 index 0000000..e69de29 diff --git a/Rocksolid_Light/rocksolid/check.php b/Rocksolid_Light/rocksolid/check.php new file mode 100644 index 0000000..fbbc7c0 --- /dev/null +++ b/Rocksolid_Light/rocksolid/check.php @@ -0,0 +1,6 @@ +$iconv_enable=false + in config.inc.php to disable automatic charset recoding.'); +?> \ No newline at end of file diff --git a/Rocksolid_Light/rocksolid/config.inc.php b/Rocksolid_Light/rocksolid/config.inc.php new file mode 100644 index 0000000..1ec46bb --- /dev/null +++ b/Rocksolid_Light/rocksolid/config.inc.php @@ -0,0 +1,243 @@ + "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); +?> diff --git a/Rocksolid_Light/rocksolid/decrypt.php b/Rocksolid_Light/rocksolid/decrypt.php new file mode 100644 index 0000000..08015e6 --- /dev/null +++ b/Rocksolid_Light/rocksolid/decrypt.php @@ -0,0 +1,104 @@ + + +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"); + } + + +?> + + + +

+ + +'.$text_thread["button_grouplist"].''; + } + echo ''; + if ((!$CONFIG['readonly']) && ($message) && + (!function_exists("npreg_group_has_write_access") || + npreg_group_has_write_access($group))) + echo ''; + + if(function_exists(npreg_user_is_moderator) && npreg_user_is_moderator($group)) { + echo ''; + } + +?> +
'.$text_article["back_to_group"].' '.$text_article["button_answer"]. + ''.$text_article["button_cancel"].' 
+ +"; + $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"; +?> diff --git a/Rocksolid_Light/rocksolid/head.inc b/Rocksolid_Light/rocksolid/head.inc new file mode 100644 index 0000000..cc5617b --- /dev/null +++ b/Rocksolid_Light/rocksolid/head.inc @@ -0,0 +1,23 @@ + + +<?php echo htmlspecialchars($title); ?> + + +'; +} else { + echo ''; +} +?> +
+ + diff --git a/Rocksolid_Light/rocksolid/img/I.gif b/Rocksolid_Light/rocksolid/img/I.gif new file mode 100644 index 0000000000000000000000000000000000000000..a7cb3a2c4a64cd64e6512c5a28d33bc0fa25e4bc GIT binary patch literal 68 zcmZ?wbhEHb0r5dH3{28J%*$u(e#_U>;gy|srO!Sl RQI5H9dc?99S(U5|)&Mv*6Egq+ literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/img/L.gif b/Rocksolid_Light/rocksolid/img/L.gif new file mode 100644 index 0000000000000000000000000000000000000000..171dcb625bd0365954665581d170a3211df7cbfa GIT binary patch literal 67 zcmZ?wbhEHb0r5dH3`|lz%*$u(e#_U>;gy|srO&>H R;n9o6XPwJl%@Sj<1^_oy6z2c{ literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/img/T.gif b/Rocksolid_Light/rocksolid/img/T.gif new file mode 100644 index 0000000000000000000000000000000000000000..cf2335f6da2d4f18f83fbb5b76205a010d070533 GIT binary patch literal 71 zcmZ?wbhEHb0r5dH3`}x8%*$u(e#_U>;gy|srO&>H V;gLlpPexqCtcCA>>9I0c0|0yV6$AhP literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/img/e.gif b/Rocksolid_Light/rocksolid/img/e.gif new file mode 100644 index 0000000000000000000000000000000000000000..e92eaac290eb94ef378e40d3d96c9a69d29df71c GIT binary patch literal 42 ncmZ?wbhEHbWMp7uXkcLY4+e@qSr{3BKnFyCWEhwjT^OtZ45|tA literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/img/k1.gif b/Rocksolid_Light/rocksolid/img/k1.gif new file mode 100644 index 0000000000000000000000000000000000000000..9cbf0a4ce9f77a8418c37a0b615ec15d2ef3163b GIT binary patch literal 61 zcmZ?wbhEHb0r5dH3``h#ku LTOREYVXy`O$P^MT literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/img/k2.gif b/Rocksolid_Light/rocksolid/img/k2.gif new file mode 100644 index 0000000000000000000000000000000000000000..37eb3680d0793e6430332d6b022b0bded6a93ac5 GIT binary patch literal 66 zcmZ?wbhEHb0r5dH3`~+e{VPx3Wmp_Dfl2zw+Aj6} PjHnYaA)WKw85yhr8dnmQ literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/img/s.gif b/Rocksolid_Light/rocksolid/img/s.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a45d92fcdbed898f097571af53fa7ef960d3170 GIT binary patch literal 55 zcmZ?wbhEHb0r5dH3`~4I{VPwu literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/index.php b/Rocksolid_Light/rocksolid/index.php new file mode 100644 index 0000000..d53f2ae --- /dev/null +++ b/Rocksolid_Light/rocksolid/index.php @@ -0,0 +1,62 @@ + + + + +'.basename(getcwd()).''; +echo ''; +// View Latest button + if (isset($overboard) && ($overboard == true)) { + echo ''; + } else { +// echo htmlspecialchars($CONFIG['title_full']); + } +// Search button + echo ''; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; + +include("$file_newsportal"); +flush(); +$newsgroups=groups_read($server,$port); +echo '
'; +if(isset($frames_on) && $frames_on === true) { + groups_show_frames($newsgroups); +} else { + groups_show($newsgroups); +} +echo '
'; +include "tail.inc"; +?> + diff --git a/Rocksolid_Light/rocksolid/lang/bosanski.lang b/Rocksolid_Light/rocksolid/lang/bosanski.lang new file mode 100644 index 0000000..fa82641 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/bosanski.lang @@ -0,0 +1,53 @@ +From: "; +$text_header["subject"]="Subject: "; +$text_header["newsgroups"]="Newsgroups: "; +$text_header["followup"]="Followup: "; +$text_header["organization"]="Organization: "; +$text_header["date"]="Date: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Nema clanaka

"; +$text_thread["button_write"]="Pisi"; +$text_thread["button_grouplist"]="Lista grupa"; +$text_thread["button_top"]="Na vrh"; +$text_thread["date"]="Date"; +$text_thread["subject"]="Datum"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="Takva grupa ne postoji."; + +$text_groups["newsgroup"]="Grupa"; +$text_groups["description"]="Opis"; + +$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:"]='Greska:'; +$text_error["connection_failed"]="Nije uspjelo konektovanje na newsserver"; +$text_error["article_not_found"]="

Clanak ne postoji.

"; +$text_error["read_access_denied"]="

NEmate dozvolu za citanje!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/czech.lang b/Rocksolid_Light/rocksolid/lang/czech.lang new file mode 100644 index 0000000..2cd8d1b --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/czech.lang @@ -0,0 +1,53 @@ +Odesílatel: "; +$text_header["subject"]="Nadpis: "; +$text_header["newsgroups"]="Diskusní skupiny: "; +$text_header["followup"]="Followup: "; +$text_header["organization"]="Organizace: "; +$text_header["date"]="Datum: "; +$text_header["message-id"]="ID zprávy: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Žádné èlánky k dispozici

"; +$text_thread["button_write"]="Pøidej zprávu"; +$text_thread["button_grouplist"]="Diskusní skupiny"; +$text_thread["button_top"]="Zpìt nahoru"; +$text_thread["date"]="Datum"; +$text_thread["subject"]="Nadpis"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="Žádná taková skupina."; + +$text_groups["newsgroup"]="Skupina"; +$text_groups["description"]="Popis"; + +$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: "; +$text_post["group_tail"]=""; +$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:"]='Chyba:'; +$text_error["connection_failed"]="Spojení na news-server se nepodaøilo"; +$text_error["article_not_found"]="

Takový èlánek neexistuje.

"; +$text_error["read_access_denied"]="

Nemáte právo pro ètení!

"; +$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."; + +?> \ No newline at end of file diff --git a/Rocksolid_Light/rocksolid/lang/danish.lang b/Rocksolid_Light/rocksolid/lang/danish.lang new file mode 100644 index 0000000..5e54b34 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/danish.lang @@ -0,0 +1,61 @@ +Fra: "; +$text_header["subject"]="Emne: "; +$text_header["newsgroups"]="Nyhedsgrupper: "; +$text_header["followup"]="Opfølging: "; +$text_header["organization"]="Organisation: "; +$text_header["date"]="Dato: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="Referencer: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="d M Y H:i:s"; +$text_header["attachments"]="Vedhæftning: "; + +$text_thread["no_articles"]="

Ingen artikler tilgængelige

"; +$text_thread["button_write"]="Skriv"; +$text_thread["button_grouplist"]="Nyhedsgrupper"; +$text_thread["button_top"]="Tilbage til toppen"; +$text_thread["date"]="Dato"; +$text_thread["subject"]="Emne"; +$text_thread["author"]="Forfatter"; +$text_thread["no_such_group"]="Gruppen findes ikke."; + +$text_groups["newsgroup"]="Nyhedsgruppe"; +$text_groups["description"]="Beskrivelse"; + +$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:"]='Fejl:'; +$text_error["connection_failed"]="Kunne ikke forbinde til serveren"; +$text_error["article_not_found"]="

Artiklen eksisterer ikke.

"; +$text_error["read_access_denied"]="

Ingen rettigheter til at læse!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/deutsch.lang b/Rocksolid_Light/rocksolid/lang/deutsch.lang new file mode 100644 index 0000000..53d16b6 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/deutsch.lang @@ -0,0 +1,75 @@ +Von: "; +$text_header["subject"]="Betreff: "; +$text_header["newsgroups"]="Gruppen: "; +$text_header["followup"]="Antwort-An: "; +$text_header["organization"]="Organisation: "; +$text_header["date"]="Datum: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="Referenzen: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="d. M Y, H:i:s"; +$text_header["attachments"]="Anhänge: "; + +$text_thread["no_articles"]="

Keine Artikel vorhanden

"; +$text_thread["button_write"]="Schreiben"; +$text_thread["button_grouplist"]="Zur Gruppenliste"; +$text_thread["button_top"]="Nach oben"; +$text_thread["date"]="Datum"; +$text_thread["subject"]="Thema"; +$text_thread["threadsize"]="#"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="Die Gruppe existiert nicht."; +$text_thread["pages"]="Seiten:"; + +$text_groups["newsgroup"]="Newsgruppe"; +$text_groups["description"]="Beschreibung"; + +$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:"]='Fehler:'; +$text_error["connection_failed"]="Der Verbindungsaufbau zum Newsserver ist fehlgeschlagen"; +$text_error["article_not_found"]="

Der Artikel ist nicht vorhanden

"; +$text_error["read_access_denied"]="

Keine Leseberechtigung!

"; +$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."; + +?> \ No newline at end of file diff --git a/Rocksolid_Light/rocksolid/lang/deutsch_du.lang b/Rocksolid_Light/rocksolid/lang/deutsch_du.lang new file mode 100644 index 0000000..e15c38b --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/deutsch_du.lang @@ -0,0 +1,70 @@ +Von: "; +$text_header["subject"]="Betreff: "; +$text_header["newsgroups"]="Gruppen: "; +$text_header["followup"]="Antwort-An: "; +$text_header["organization"]="Organisation: "; +$text_header["date"]="Datum: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="Referenzen: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="d. M Y, H:i:s"; +$text_header["attachments"]="Anhänge: "; + +$text_thread["no_articles"]="

Keine Artikel vorhanden

"; +$text_thread["button_write"]="Schreiben"; +$text_thread["button_grouplist"]="Zur Gruppenliste"; +$text_thread["button_top"]="Nach oben"; +$text_thread["date"]="Datum"; +$text_thread["subject"]="Thema"; +$text_thread["threadsize"]="#"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="Die Gruppe existiert nicht."; +$text_thread["pages"]="Seiten:"; + +$text_groups["newsgroup"]="Newsgruppe"; +$text_groups["description"]="Beschreibung"; + +$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:"]='Fehler:'; +$text_error["connection_failed"]="Der Verbindungsaufbau zum Newsserver ist fehlgeschlagen"; +$text_error["article_not_found"]="

Der Artikel ist nicht vorhanden

"; +$text_error["read_access_denied"]="

Keine Leseberechtigung!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/dutch.lang b/Rocksolid_Light/rocksolid/lang/dutch.lang new file mode 100644 index 0000000..98b1dec --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/dutch.lang @@ -0,0 +1,53 @@ +Afzender: "; +$text_header["subject"]="Onderwerp: "; +$text_header["newsgroups"]="Nieuwsgroepen: "; +$text_header["followup"]="Antwoord-naar: "; +$text_header["organization"]="Organisatie: "; +$text_header["date"]="Datum: "; +$text_header["message-id"]="Bericht-ID: "; +$text_header["references"]="Referenties: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="d M Y H:i:s"; + +$text_thread["no_articles"]="

Geen artikelen beschikbaar

"; +$text_thread["button_write"]="Schrijf"; +$text_thread["button_grouplist"]="Nieuwsgroepen"; +$text_thread["button_top"]="Terug naar boven"; +$text_thread["date"]="Datum"; +$text_thread["subject"]="Onderwerp"; +$text_thread["author"]="Auteur"; +$text_thread["no_such_group"]="Groep bestaat niet."; + +$text_groups["newsgroup"]="Nieuwsgroep"; +$text_groups["description"]="Beschrijving"; + +$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:"]='Fout:'; +$text_error["connection_failed"]="De verbinding met nieuwsserver is mislukt"; +$text_error["article_not_found"]="

Dit artikel bestaat niet.

"; +$text_error["read_access_denied"]="

Geen rechten om te lezen!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/english.lang b/Rocksolid_Light/rocksolid/lang/english.lang new file mode 100644 index 0000000..deec96c --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/english.lang @@ -0,0 +1,82 @@ +From: "; +$text_header["subject"]="Subject: "; +$text_header["newsgroups"]="Newsgroups: "; +$text_header["followup"]="Followup: "; +$text_header["organization"]="Organization: "; +$text_header["date"]="Date: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="D, j M Y H:i T"; +$text_header["attachments"]="Attachments: "; + +$text_thread["no_articles"]="

No articles available

"; +$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"]="Date"; +$text_thread["subject"]="Subject"; +$text_thread["threadsize"]="Replies"; +$text_thread["author"]="Author"; +$text_thread["lastmessage"]="Last Message"; +$text_thread["no_such_group"]="No such Group."; +$text_thread["pages"]="Pages:"; + +$text_groups["newsgroup"]="Newsgroup"; +$text_groups["description"]="Description"; + +$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:"]='Error:'; +$text_error["connection_failed"]="The connection to the Newsserver failed"; +$text_error["article_not_found"]="

The article doesn't exist.

"; +$text_error["read_access_denied"]="

No permission to read!

"; +$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"; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/english.lang.orig b/Rocksolid_Light/rocksolid/lang/english.lang.orig new file mode 100644 index 0000000..6b5f381 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/english.lang.orig @@ -0,0 +1,75 @@ +From: "; +$text_header["subject"]="Subject: "; +$text_header["newsgroups"]="Newsgroups: "; +$text_header["followup"]="Followup: "; +$text_header["organization"]="Organization: "; +$text_header["date"]="Date: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="M d Y H:i:s"; +$text_header["attachments"]="Attachments: "; + +$text_thread["no_articles"]="

No articles available

"; +$text_thread["button_write"]="New Thread"; +$text_thread["button_grouplist"]="Newsgroups"; +$text_thread["button_top"]="Back to Top"; +$text_thread["date"]="Date"; +$text_thread["subject"]="Subject"; +$text_thread["threadsize"]="#"; +$text_thread["author"]="Author"; +$text_thread["no_such_group"]="No such Group."; +$text_thread["pages"]="Pages:"; + +$text_groups["newsgroup"]="Newsgroup"; +$text_groups["description"]="Description"; + +$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:"]='Error:'; +$text_error["connection_failed"]="The connection to the Newsserver failed"; +$text_error["article_not_found"]="

The article doesn't exist.

"; +$text_error["read_access_denied"]="

No permission to read!

"; +$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"; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/finnish.lang b/Rocksolid_Light/rocksolid/lang/finnish.lang new file mode 100644 index 0000000..a412e10 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/finnish.lang @@ -0,0 +1,53 @@ +Lähettäjä: "; +$text_header["subject"]="Otsikko: "; +$text_header["newsgroups"]="Uutisryhmät: "; +$text_header["followup"]="Vastaa: "; +$text_header["organization"]="Organisaatio: "; +$text_header["date"]="Päivämäärä: "; +$text_header["message-id"]="Viestin ID: "; +$text_header["references"]="Referenssit: "; +$text_header["user-agent"]="Käyttäjäohjelmisto: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Ei artikkeleita

"; +$text_thread["button_write"]="Kirjoita"; +$text_thread["button_grouplist"]="Uutisryhmät"; +$text_thread["button_top"]="Takaisin"; +$text_thread["date"]="Päivämäärä"; +$text_thread["subject"]="Otsikko"; +$text_thread["author"]="Tekijä"; +$text_thread["no_such_group"]="Ryhmää ei ole"; + +$text_groups["newsgroup"]="Uutisryhmä"; +$text_groups["description"]="Kuvaus"; + +$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:"]='Virhe:'; +$text_error["connection_failed"]="Ei yhteyttä uutispalvelimeen"; +$text_error["article_not_found"]="

Artikkelia ei ole.

"; +$text_error["read_access_denied"]="

Ei oikeutta lukea!

"; +$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)."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/francais.lang b/Rocksolid_Light/rocksolid/lang/francais.lang new file mode 100644 index 0000000..528b64c --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/francais.lang @@ -0,0 +1,54 @@ +De: "; +$text_header["subject"]="Sujet: "; +$text_header["newsgroups"]="Groupes: "; +$text_header["followup"]="Suivi-à: "; +$text_header["organization"]="Organisation: "; +$text_header["date"]="Date: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="d. M Y, H:i:s"; + +$text_thread["no_articles"]="

Pas d'articles

"; +$text_thread["button_write"]="Poster"; +$text_thread["button_grouplist"]="Liste des Groupes"; +$text_thread["button_top"]="Haut de page"; +$text_thread["date"]="Date"; +$text_thread["subject"]="Sujet"; +$text_thread["author"]="Auteur"; +$text_thread["no_such_group"]="Aucun groupe."; + +$text_groups["newsgroup"]="Groupe"; +$text_groups["description"]="Description"; + +$text_article["button_answer"]="Répondre"; + +$text_error["error:"]='Erreur:'; +$text_error["connection_failed"]="La connexion au serveur de news a échoué"; +$text_error["article_not_found"]="

L'article n'existe pas.

"; +$text_error["read_access_denied"]="

Lecture non autorisée!

"; +$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"; + + +?> diff --git a/Rocksolid_Light/rocksolid/lang/italiano.lang b/Rocksolid_Light/rocksolid/lang/italiano.lang new file mode 100644 index 0000000..3bf7a1f --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/italiano.lang @@ -0,0 +1,53 @@ +Da: "; +$text_header["subject"]="Subject: "; +$text_header["newsgroups"]="Newsgroup: "; +$text_header["followup"]="Followup: "; +$text_header["organization"]="Organizzazione: "; +$text_header["date"]="Data: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Non ci sono articoli

"; +$text_thread["button_write"]="Scrivi un messaggio"; +$text_thread["button_grouplist"]="Newsgroup"; +$text_thread["button_top"]="Torna su"; +$text_thread["date"]="Data"; +$text_thread["subject"]="Subject"; +$text_thread["author"]="Mittente"; +$text_thread["no_such_group"]="Gruppo inesistente"; + +$text_groups["newsgroup"]="Newsgroup"; +$text_groups["description"]="Descrizione"; + +$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:"]='Errore:'; +$text_error["connection_failed"]="Connessione fallita al newsserver"; +$text_error["article_not_found"]="

L'articolo non esiste.

"; +$text_error["read_access_denied"]="

Non hai il permesso di lettura!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/norsk.lang b/Rocksolid_Light/rocksolid/lang/norsk.lang new file mode 100644 index 0000000..e2abbe4 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/norsk.lang @@ -0,0 +1,53 @@ +Fra: "; +$text_header["subject"]="Tittel: "; +$text_header["newsgroups"]="Nyhetsgrupper: "; +$text_header["followup"]="Oppfølging: "; +$text_header["organization"]="Organisasjon: "; +$text_header["date"]="Dato: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="Referanser: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Ingen artikler tilgjenglig

"; +$text_thread["button_write"]="Skriv"; +$text_thread["button_grouplist"]="Nyhetsgrupper"; +$text_thread["button_top"]="Tilbake til toppen"; +$text_thread["date"]="Dato"; +$text_thread["subject"]="Tittel"; +$text_thread["author"]="Forfatter"; +$text_thread["no_such_group"]="Ingen slik gruppe."; + +$text_groups["newsgroup"]="Nyhetsgruppe"; +$text_groups["description"]="Beskrivelse"; + +$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:"]='Feil:'; +$text_error["connection_failed"]="Kunne ikke koble til tjeneren"; +$text_error["article_not_found"]="

Artikkelen eksisterer ikke.

"; +$text_error["read_access_denied"]="

Ingen rettigheter til å lese!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/polish.lang b/Rocksolid_Light/rocksolid/lang/polish.lang new file mode 100644 index 0000000..695d2c3 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/polish.lang @@ -0,0 +1,66 @@ +Od: "; +$text_header["subject"]="Temat: "; +$text_header["newsgroups"]="Grupa: "; +$text_header["followup"]="Odpowiedz do: "; +$text_header["organization"]="Organizacja: "; +$text_header["date"]="Data: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="Referencje: "; +$text_header["user-agent"]="Czytnik: "; +$text_header["date_format"]="j.m.Y H:i:s"; +$text_header["attachments"]="Za³±czniki: "; + +$text_index["newsgroup_not_avaiable"]="Niedostêpna"; + +$text_thread["no_articles"]="

Brak artyku³ów

"; +$text_thread["button_write"]="Napisz"; +$text_thread["button_grouplist"]="Lista grup"; +$text_thread["button_top"]="Z powrotem na pocz±tek"; +$text_thread["date"]="Data"; +$text_thread["subject"]="Temat"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="Nie ma takiej grupy."; + +$text_groups["newsgroup"]="Grupa"; +$text_groups["description"]="Opis"; + +$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:"]='B³±d:'; +$text_error["connection_failed"]="Nie uda³o siê nawi±zanie po³±czenia z serwerem Usenetu"; +$text_error["article_not_found"]="

Wiadomo¶æ nie istnieje.

"; +$text_error["read_access_denied"]="

Brak uprawnieñ do odczytu!

"; +$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ê.."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/portugues.lang b/Rocksolid_Light/rocksolid/lang/portugues.lang new file mode 100644 index 0000000..7cd765d --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/portugues.lang @@ -0,0 +1,53 @@ +De: "; +$text_header["subject"]="Assunto: "; +$text_header["newsgroups"]="Newsgroups: "; +$text_header["followup"]="Seguimento: "; +$text_header["organization"]="Organização: "; +$text_header["date"]="Data: "; +$text_header["message-id"]="Menssagem-ID: "; +$text_header["references"]="Referências: "; +$text_header["user-agent"]="Utilizador-Agente: "; +$text_header["date_format"]="d M Y H:i:s"; + +$text_thread["no_articles"]="

Não existem artigos disponiveis

"; +$text_thread["button_write"]="Escrever"; +$text_thread["button_grouplist"]="Newsgroups"; +$text_thread["button_top"]="Voltar acima"; +$text_thread["date"]="Data"; +$text_thread["subject"]="Assunto"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="Grupo não existente."; + +$text_groups["newsgroup"]="Newsgroup"; +$text_groups["description"]="Descrição"; + +$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:"]='Erro:'; +$text_error["connection_failed"]="A conexão com o servidor de news falhow"; +$text_error["article_not_found"]="

O artigo não existe.

"; +$text_error["read_access_denied"]="

Não tem permissão para ler!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/russian.lang b/Rocksolid_Light/rocksolid/lang/russian.lang new file mode 100644 index 0000000..f581f50 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/russian.lang @@ -0,0 +1,53 @@ +ïÔ: "; +$text_header["subject"]="ôÅÍÁ: "; +$text_header["newsgroups"]="çÒÕÐÐÙ ÎÏ×ÏÓÔÅÊ: "; +$text_header["followup"]="Followup: "; +$text_header["organization"]="ïÒÇÁÎÉÚÁÃÉÑ: "; +$text_header["date"]="äÁÔÁ: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="óÓÙÌËÉ: "; +$text_header["user-agent"]="ðÒÏÇÒÁÍÍÁ: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

óÏÏÂÝÅÎÉÊ ÎÅÔ

"; +$text_thread["button_write"]="ðÉÓÁÔØ"; +$text_thread["button_grouplist"]="çÒÕÐÐÙ ÎÏ×ÏÓÔÅÊ"; +$text_thread["button_top"]="îÁ×ÅÒÈ"; +$text_thread["date"]="äÁÔÁ"; +$text_thread["subject"]="ôÅÍÁ"; +$text_thread["author"]="á×ÔÏÒ"; +$text_thread["no_such_group"]="îÅÔ ÔÁËÏÊ ÇÒÕÐÐÙ."; + +$text_groups["newsgroup"]="çÒÕÐÐÁ ÎÏ×ÏÓÔÅÊ"; +$text_groups["description"]="ïÐÉÓÁÎÉÅ"; + +$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:"]='ïÛÉÂËÁ:'; +$text_error["connection_failed"]="ïÔËÁÚ ÓÏÅÄÉÎÅÎÉÑ Ó ÓÅÒ×ÅÒÏÍ ÎÏ×ÏÓÔÅÊ"; +$text_error["article_not_found"]="

ôÁËÏÇÏ ÓÏÏÂÝÅÎÉÑ ÎÅÔ.

"; +$text_error["read_access_denied"]="

þÔÅÎÉÅ ÎÅ ÒÁÚÒÅÛÅÎÏ!

"; +$text_error["post_failed"]="ïÔËÁÚ ÓÏÅÄÉÎÅÎÉÑ. ðÏÐÒÏÂÕÊ ÏÂÎÏ×ÉÔØ (Reload) ÐÏÚÄÎÅÅ."; +$text_error["auth_error"]="ïÔËÁÚ ÁÕÔÅÎÔÉÆÉËÁÃÉÉ ÎÁ ÓÅÒ×ÅÒÅ ÎÏ×ÏÓÔÅÊ."; +$text_error["spool_error"]="ïÛÉÂËÁ × ÂÕÆÅÒÎÏÍ ÆÁÊÌÅ. ðÏÖÁÌÕÊÓÔÁ, ÏÂÎÏ×ÉÔÅ (Reload)."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/slovenski.lang b/Rocksolid_Light/rocksolid/lang/slovenski.lang new file mode 100644 index 0000000..c3d22b4 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/slovenski.lang @@ -0,0 +1,53 @@ +Avtor: "; +$text_header["subject"]="Tema: "; +$text_header["newsgroups"]="Skupina: "; +$text_header["followup"]="Odgovor v: "; +$text_header["organization"]="Organizacija: "; +$text_header["date"]="Datum: "; +$text_header["message-id"]="Message-ID: "; +$text_header["references"]="References: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Ni sporocil

"; +$text_thread["button_write"]="Novo sporocilo"; +$text_thread["button_grouplist"]="Skupine"; +$text_thread["button_top"]="Na vrh"; +$text_thread["date"]="Datum"; +$text_thread["subject"]="Tema"; +$text_thread["author"]="Avtor"; +$text_thread["no_such_group"]="Skupina ne obstaja"; + +$text_groups["newsgroup"]="Skupina"; +$text_groups["description"]="Opis"; + +$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:"]='Napaka:'; +$text_error["connection_failed"]="Povezava z streznikom ni bila uspesna."; +$text_error["article_not_found"]="

Sporocilo ne obstaja.

"; +$text_error["read_access_denied"]="

Branje ni dovoljeno!

"; +$text_error["post_failed"]="Povezava prekinjena. Poskusite kasneje."; +$text_error["auth_error"]="Avtorizacija neuspesna."; +$text_error["spool_error"]="Napaka na strezniku. Poskusite osveziti stran."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/spanish.lang b/Rocksolid_Light/rocksolid/lang/spanish.lang new file mode 100644 index 0000000..6f2343e --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/spanish.lang @@ -0,0 +1,53 @@ +De: "; +$text_header["subject"]="Asunto: "; +$text_header["newsgroups"]="Foro: "; +$text_header["followup"]="Responder a: "; +$text_header["organization"]="Organisación: "; +$text_header["date"]="Fecha: "; +$text_header["message-id"]="Mensage-ID: "; +$text_header["references"]="Referencia: "; +$text_header["user-agent"]="User-Agent: "; +$text_header["date_format"]="d. M Y, H:i:s"; + +$text_thread["no_articles"]="

Ningún Artículo

"; +$text_thread["button_write"]="Escribir"; +$text_thread["button_grouplist"]="Al Foro-Lista"; +$text_thread["button_top"]="Hacia Arriba"; +$text_thread["date"]="Fecha"; +$text_thread["subject"]="Tema"; +$text_thread["author"]="Autor"; +$text_thread["no_such_group"]="El grupo no existe."; + +$text_groups["newsgroup"]="News-grupo"; +$text_groups["description"]="Descripción"; + +$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:"]='Error:'; +$text_error["connection_failed"]="Hubo problemas al intentar contactar el Newsserver"; +$text_error["article_not_found"]="

El Artículo no Existe.

"; +$text_error["read_access_denied"]="

Sin permisos de Lectura!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lang/turkish.lang b/Rocksolid_Light/rocksolid/lang/turkish.lang new file mode 100644 index 0000000..d3dcecb --- /dev/null +++ b/Rocksolid_Light/rocksolid/lang/turkish.lang @@ -0,0 +1,53 @@ +Kimden: "; +$text_header["subject"]="Konu: "; +$text_header["newsgroups"]="Haber gruplari: "; +$text_header["followup"]="Üyelik: "; +$text_header["organization"]="Organizasyon: "; +$text_header["date"]="Gün: "; +$text_header["message-id"]="Mesaj-ID: "; +$text_header["references"]="Referanslar: "; +$text_header["user-agent"]="Kullanici: "; +$text_header["date_format"]="M d Y H:i:s"; + +$text_thread["no_articles"]="

Makale mevcut degil

"; +$text_thread["button_write"]="Yaz"; +$text_thread["button_grouplist"]="Haber gruplari"; +$text_thread["button_top"]="Üste Dön"; +$text_thread["date"]="Gün"; +$text_thread["subject"]="Konu"; +$text_thread["author"]="Yazar"; +$text_thread["no_such_group"]="Böyle bir grup yok."; + +$text_groups["newsgroup"]="Haber Grubu"; +$text_groups["description"]="Tanimlama"; + +$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:"]='Hata:'; +$text_error["connection_failed"]="Haber Grubu sunucusuna baglanilamadi"; +$text_error["article_not_found"]="

Böyle bir makale yok.

"; +$text_error["read_access_denied"]="

Okuma izniniz yok!

"; +$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."; + +?> diff --git a/Rocksolid_Light/rocksolid/lib/captcha/+cookie.patch b/Rocksolid_Light/rocksolid/lib/captcha/+cookie.patch new file mode 100644 index 0000000..6b26c9c --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/captcha/+cookie.patch @@ -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="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.") { + ++ #-- stop if user already verified ++ if ($_COOKIE[CAPTCHA_COOKIE] == (int)(time()/1000000)) { ++ return ""; ++ } ++ + #-- prepare image text + $pw = captcha::mkpass(); + $hash = captcha::hash($pw); diff --git a/Rocksolid_Light/rocksolid/lib/captcha/COLLEGE.ttf b/Rocksolid_Light/rocksolid/lib/captcha/COLLEGE.ttf new file mode 100644 index 0000000000000000000000000000000000000000..400fe5cef357b5f661bd8bc66fda4b4cd068b440 GIT binary patch literal 5896 zcmeHLU1%KF6+U-ncE^h3pUrx0xmMcUu8l-19NF8A+*WNIVuE61*L9s#1QVlr)|MN| z60*{)O$rLQ#SaSI2Voj;>EP%=h5iT}sG%kpO3Og&;(#bFs8qC~Y@rVdQHv|>j{2Q* z@9d9~K-=fe?#$eK=bUrT&v(wfGo*;pZvQLx zI@%Q?b?d^&mGgdhYKqA6iMBr+E)02vuO2%}^mq|8PYq+B?XT`B^yksvH#|C7?06@0 z6a5A7ca4ml8=6U$I*F2yM>j@?isN*GK25Z92L1GWxBetf#+$Af0laaOY{s4(J+nC+Y4?S3JwKb5dEq!;o%z5VB0q2j zoO#+ypCa0y&*pP-=2ARYE|rxto6n{ac%Zr?&X2xhmYc8^I@{Nv#}h=Ee6|yUGWkqr zqE|%jPG$3%RAzU=&8Ado+J^~Yzwb{6XolnJ4mbU2FYr~nALv$C_Jb13waem*IC2O= zVVzgEho7r%`XGCcuag7No4EzsWoU{ zv(ub~N$Bj^X=@M<_z5n|hbL^5$Mg~_vD;-0*kHDDe7n;15{mn#HOSxOSoBssA6?Zz?r)WniX#)f5_O)QfA%%)NnC3RuoBiI z?M=1R*M|p!i%L6Gsbgpx*NG%DClLWD)5&5zc%Sn{*wVf=h@2^@ZiGdK04v|w5sqs~ z$OlHRt5Iqjq;d>2UK#yD0qk)`F@@wnz+q#m>KsBQ*j6RvLRm}WY*0EQDob|SPBTt8 zGwS+pC*agzEXzn`aKWCe08DZmpad$)D>}?8Kx+VmXc^7`GGaUX0QsfxLkY=sX53sV zY3DqS18jzXL*c?9s2T*$Jko>@yA11fe9Dl~hAO^OqyXRyGW?_Pu#L+C_I{2EpI{Gw z4hfH)Rwao_9j)7=yyhatX_s)o4`gz-d!FE%E#@?Z+Tj8_#Qb%2LuFw(z^9qJNeqYCDSDy@YKs0F3s@WNQ+6hUemtsz zY85u2!Wx@I5-b6`*ueDt4PNB65NV|6G70a22L|#8M5|wdEwk~az z-57*zTFwy*g?s&^eXqLZe_P+8iohu3N*T?}#S#|Sjd{QktR)~;EL2@x5jSoM23uM4 zs2Fld>4X_6l$B_8okr0L;D~5_oXW^R0tKJ-@s7x zs@DW$S3{lF3BvYuHk4{cvR=;WrFxoG<+aJgMpryuNfWS6vV?Pl;~^O3kRaela{#=7 zN3Wpuw8G4ZEQeA5c?u89XQe#?y0fE!8#_|0zuCPSuw-8mB7Qi z2ECAhBHbuvvd;)_Q6keQsaFCmoc+V{!`tdOuGkkNXvf3bxMH8&ARlW&qkPT)_I#6I zfx(BxK~S+l66#BmcMHspEfDV$%he961D09K)n#WuHVy1d#IIpZaAn7bwJmFBY+lvW z%K`o%^wzu}R$RNzZsFz3ZP;&YkrfR)z|Cu!HPyV5#fl$V$LgzdOx`9$hO9+kHY*X> zn${uS$8)WPg-BL8_3jM1@yiB~&429=$y0t$sZrNxHDz_q)HajRpad;WhA-y}*Zf$q zI%f^8UAG27E_gFx#7_nd5Gxwi8H&V?OYf-aPGuOU`q38I{90n%N}XmvfR zKCpUL!^6ON^`X^OeNee$-SwiGMNhnQi=No$v&qYNm%2A)>zo;VIt<>1{KUtb?w%*ZkTsZOz$_>nEH2p47oJ zwNCub?$M5qBF)zF8(VHKW8DkZ*5Di9n+wv~b%PwKDA;`ql@PWvtv--CID`Z55X{Bz z5=Oq%b;KZvm~vP-vhXLr=*dbPE`VK?5Zw=~t<|F_JX_Ja+sM7eaAQ5>P-s@nSL2AN zBYeyL7tYBm#`m(-QCYG&xa{y&#V&7wmxjYx>rQ+YnM+BPRKx1bYPe`kIz5&4^)jBz zvG&r1TW7cT{euW9Y(BhjHns=}#QS%1fG<89Vhr>ic`j=rnUMUE>+)!gM^&vLk&O>3FPBraaq+?={h}i+b>7=eu-+en#)oZ|L{*zKW?% zbzF_8H`Q(RTlL6#!a86bwFa%L)=le|)}O33`;+$5_F4P7{R8{w_Oe}Z_B+oxL(Ut{ z+s=LGgV@$sckFrW-{xZXV}FY~@y_^{<1fU&8Gj@GX8i5=yYc(+ay)d~-Cp;3_pCeN ze$V}>`zv?R{X3LmY#hUPAo=zeAth2)`a9^?wQMQ&X)|pb<4MzY(B5U* zF;MI=?KsBwo3;xnUFa)^WnZF$rmgVx>W8Lnq5Tunwn6<1({?ca7t@a6`_}uW9j9%o z#k5^|PVIhnZ2Zc^#S6oeCkn5fDqMJVWM~2{{9i0gT)sGVDShxjPY=4MC-9YZbZFug zdKMqp#_0-8&_#TP8>UIP=tnpY(&zEx4`<)N(=;8&$GA!ShN(cWq5pNSZSMRV&Jz7{ literal 0 HcmV?d00001 diff --git a/Rocksolid_Light/rocksolid/lib/captcha/README b/Rocksolid_Light/rocksolid/lib/captcha/README new file mode 100644 index 0000000..a56656d --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/captcha/README @@ -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: + +
+ +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 +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 free registration-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 + diff --git a/Rocksolid_Light/rocksolid/lib/captcha/_test.1.php b/Rocksolid_Light/rocksolid/lib/captcha/_test.1.php new file mode 100644 index 0000000..45536aa --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/captcha/_test.1.php @@ -0,0 +1,67 @@ + + + captcha.php testing + + + +

CAPTCHA Test

+ + + +(we have an example input <form> here)
+ +
+
+ +
+ +
+ +
+
+ +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. + +
+
+ + + diff --git a/Rocksolid_Light/rocksolid/lib/captcha/captcha.php b/Rocksolid_Light/rocksolid/lib/captcha/captcha.php new file mode 100644 index 0000000..39e9b70 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/captcha/captcha.php @@ -0,0 +1,340 @@ + 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 fields html string (no complete form), with captcha + image already embedded as data:-URI + */ + function form($title="→ retype that here", $more="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.") { + + #-- 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 = + '' + . '' + . '' + . '
'.$alt. ''.$title. '
' + . '' + . '
'.$more.'
'; + $html = "
$html
"; + 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= '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"]); +} + + +?> \ No newline at end of file diff --git a/Rocksolid_Light/rocksolid/lib/message.inc.php b/Rocksolid_Light/rocksolid/lib/message.inc.php new file mode 100644 index 0000000..1b77049 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/message.inc.php @@ -0,0 +1,785 @@ +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; $oheader->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; $oheader->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; $oheader->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; $oheader->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; $obody); $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; $iheader->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 '
'; + if ($article_show["Subject"]) echo $text_header["subject"].htmlspecialchars($head->subject)."
"; + 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 ''; + 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 ''; + echo ''; + if ($local_poster) { + echo ''; + } + 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 ''; + } + echo ''; + } + echo "
"; + } + if ($article_show["Newsgroups"]) + echo $text_header["newsgroups"].htmlspecialchars(str_replace(',',', ',$head->newsgroups))."
\n"; + if (isset($head->followup) && ($article_show["Followup"]) && ($head->followup != "")) + echo $text_header["followup"].htmlspecialchars($head->followup)."
\n"; + if ((isset($head->organization)) && ($article_show["Organization"]) && + ($head->organization != "")) + echo $text_header["organization"]. + html_parse(htmlspecialchars($head->organization))."
\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')."
\n"; + } else { + echo $text_header["date"].$ts->format($text_header["date_format"])."
\n"; + } + unset($ts); + } + +// echo $text_header["date"].date($text_header["date_format"],$head->date)."
\n"; + if ($article_show["Message-ID"]) { + echo ' '.$text_header["message-id"].htmlspecialchars($head->id)."
\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 ' '.''.($i+1).''; + } + echo "
"; + } + if (isset($head->user_agent)) { + if ((isset($article_show["User-Agent"])) && + ($article_show["User-Agent"])) { + echo $text_header["user-agent"].htmlspecialchars($head->user_agent)."
\n"; + } else { + echo "\n"; + } + } + if ((isset($attachment_show)) && ($attachment_show==true) && + (isset($head->content_type[1]))) { + echo $text_header["attachments"]; + for ($i=1; $icontent_type); $i++) { + if(!strcmp($head->content_type[$i],"text/html")) { + $contype = "HTML Version"; + } else { + $contype = $head->content_type_name[$i]; + } + echo ''. + $contype.' ('. + $head->content_type[$i].')'; + if ($icontent_type)-1) echo ', '; + } + } + if ($article_show["trigger_headers"]) { + echo '
'; + echo ''; + echo '
'.display_full_headers($head->number,$group,$head->name,$head->from).'
'; + echo ' View all headers'."
\n"; + echo '
'; + } + echo '
'; +} + +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.='
'; + continue; + } + + + $return.=mb_decode_mimeheader(htmlspecialchars($line)).'
'; + } + 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') { + $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","
", + 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 '.$article_data->header->rslight_to.' '; + echo '
'; + echo '

Enter Password:  '; + echo ''; + echo '

'; + echo '
'; + $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 "rslight encrypted message."; + $body=""; + } +*/ + $depth=0; + if (isset($CONFIG['synchronet']) && ($CONFIG['synchronet'] == true)) { + echo '
'; + } else { + echo '
'; + } + $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 '
'; + for($j=@$body[$i]->depth; $j<$depth; $j++) + echo '
'; + $t=html_parse(text2html(@$body[$i]->text)).'
'; + 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="
\n"; + else + $t=html_parse(text2html($body[$i]->text))."
\n"; + } else { + $t=''.str_repeat('>',$body[$i]->depth).' '. + html_parse(text2html( + textwrap($body[$i]->text,72-$body[$i]->depth, + "\n".str_repeat('>',$body[$i]->depth).' '))). + "
\n"; + } + echo $t; + $currentlen+=strlen($t); + } + } + if($maxlen!=false && $currentlen>=$maxlen) { + echo '
'.$text_article["full_article"].''; + } +// 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; $icontent_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 ''. + ''.$contype.' '; + } else { + echo ''. + $contype.' ('. + $head->content_type[$i].')'; + } + if ($icontent_type)-1) echo ', '; + } + } + echo '
'; + } 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 '
'; + $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 '
'; + for($j=$body[$i]->depth; $j<$depth; $j++) + echo '
'; + $t=html_parse(text2html($body[$i]->text)).'
'; + 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="
\n"; + else + $t=html_parse(text2html($body[$i]->text))."
\n"; + } else { + $t=''.str_repeat('>',$body[$i]->depth).' '. + html_parse(text2html( + textwrap($body[$i]->text,72-$body[$i]->depth, + "\n".str_repeat('>',$body[$i]->depth).' '))). + "
\n"; + } + echo $t; + $currentlen+=strlen($t); + } + } + echo '
'; + if($maxlen!=false && $currentlen>=$maxlen) { + echo '
'.$text_article["full_article"].''; + } + } 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.= ''; + else + $return.= ''; + $return.= $i+1; + if ($i == $pages-1) { + // $return.= $article_count; + } + if ($first != $i*$articleflat_articles_per_page+1) + $return.= ''; + else + $return.= ''; + } + return $return; +} diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php new file mode 100644 index 0000000..95828b6 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/post.inc.php @@ -0,0 +1,364 @@ +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; $i0 && $line[$from] != ' '; $from--); + if($from>0) $from++; + for(;$to'; + 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; +} +?> diff --git a/Rocksolid_Light/rocksolid/lib/thread.inc.php b/Rocksolid_Light/rocksolid/lib/thread.inc.php new file mode 100644 index 0000000..6d81d3f --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/thread.inc.php @@ -0,0 +1,1167 @@ +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 + */ + +/* + * Shows the little menu on the thread.php where you can select the + * different pages with the articles on it + */ +function thread_pageselect($group,$article_count,$first) { + global $articles_per_page,$file_thread,$file_framethread,$name; + global $text_thread,$thread_show; + $pages=ceil($article_count / $articles_per_page); + if ($article_count > $articles_per_page) + echo $text_thread["pages"]; + for ($i = 0; $i < $pages; $i++) { + // echo '['; + if ($first != $i*$articles_per_page+1) { + echo ''; + } else { +// echo 'PAGE: '.$i.' OF: '.$pages; + } +// echo $i+1; + if ($i == $pages-1) { + // echo $article_count; + } else { + // echo ($i+1)*$articles_per_page; + } + if ($first != $i*$articles_per_page+1) { + echo $i+1; + echo ''; + } else { + echo ''.strval($i+1).''; + // echo '] '; + } + } +} + +/* + * Load a thread from disk + * + * $group: name of the newsgroup, is needed to create the filename + * + * returns: an array of headerType containing the thread. + */ +function thread_cache_load($group) { + global $spooldir,$compress_spoolfiles; + $filename=$spooldir."/".$group."-data.dat"; + if (!file_exists($filename)) return false; + if ($compress_spoolfiles) { + $file=gzopen("$spooldir/$group-data.dat","r"); + $headers=unserialize(gzread($file,1000000)); + gzclose($file); + } else { + $file=fopen($filename,"r"); + $headers=unserialize(fread($file,filesize($filename))); + fclose($file); + } + return($headers); +} + + +/* + * Save the thread to disk + * + * $header: is an array of headerType containing the thread + * $group: name of the newsgroup, is needed to create the filename + */ +function thread_cache_save($headers,$group) { + global $spooldir,$compress_spoolfiles; + if ($compress_spoolfiles) { + $file=gzopen("$spooldir/$group-data.dat","w"); + gzputs($file,serialize($headers)); + gzclose($file); + } else { + $file=fopen("$spooldir/$group-data.dat","w"); + if($file===false) { + die('The spool-directory is not writeable. Please change the user '. + 'permissions to give the webserver write-access to it.'); + } + fputs($file,serialize($headers)); + fclose($file); + } +} + +/* + * remove an article from the overview-file + * is needed, when article has been canceled, the article is still + * in the thread spool on disc and someone wants to read this article. + * the message_read function can now call this function to remove + * the article. + */ +function thread_cache_removearticle($group,$id) { + $thread=thread_cache_load($group); + if(!$thread) return false; + $changed=false; + foreach ($thread as $value) { + if(($value->number==$id) || ($value->id==$id)) { + // found to be deleted article + // now lets rebuild the tree... + if(isset($value->answers)) + foreach ($value->answers as $key => $answer) { + $thread[$answer]->isAnswer=false; + } + if(isset($value->references)) + foreach ($value->references as $reference) { + if(isset($thread[$reference]->answers)) { + $search=array_search($value->id,$thread[$reference]->answers); + if(!($search===false)) + unset($thread[$reference]->answers[$search]); + } + } + unset($thread[$value->id]); + $changed=true; + break; + } + } + if($changed) thread_cache_save($thread,$group); +} + +/* +function readArticles(&$ns,$groupname,$articleList) { + for($i = 0; $i <= count($articleList)-1 ; $i++) { + $temp=read_header($ns,$articleList[$i]); + $articles[$temp->id] = $temp; + } + return $articles; +} +*/ + +/* + * interpret and decode one line of overview-data from the newsserver and + * put it into an headerType + * + * $line: the data to be interpreted + * $overviewformat: the format of an overview-line, given by + * thread_overview_read() + * $groupname: the name of the newsgroup + * + * returns: headerType containing the data + */ +function thread_overview_interpret($line,$overviewformat,$groupname) { + $return=""; + $overviewfmt=explode("\t",$overviewformat); + echo " "; // keep the connection to the webbrowser alive + flush(); // while generating the message-tree +// $over=explode("\t",$line,count($overviewfmt)-1); + $over=explode("\t",$line); + //$article=new headerType; + for ($i=0; $iisReply=splitSubject($subject); + $article->subject=$subject; + } + if ($overviewfmt[$i]=="Date:") { + $article->date=getTimestamp($over[$i+1]); + } + if ($overviewfmt[$i]=="From:") { + $fromline=address_decode(headerDecode($over[$i+1]),"nirgendwo"); + $article->from=$fromline[0]["mailbox"]."@".$fromline[0]["host"]; + $article->username=$fromline[0]["mailbox"]; + if (!isset($fromline[0]["personal"])) { + $article->name=$fromline[0]["mailbox"]; + if (strpos($article->name,'%')) { + $article->name=substr($article->name,0,strpos($article->name,'%')); + } + $article->name=strtr($article->name,'_',' '); + } else { + $article->name=$fromline[0]["personal"]; + } + } + if ($overviewfmt[$i]=="Message-ID:") $article->id=$over[$i+1]; + if (($overviewfmt[$i]=="References:") && ($over[$i+1] != "")) { + $article->references=explode(" ",$over[$i+1]); + } + } + foreach($article->references as &$refs) { + if (!strcmp($article->id, $refs)) { + $refs=""; + } + } + $article->number=$over[0]; + $article->isAnswer=false; + return($article); +} + +/* + * read the overview-format from the newsserver. This data is used + * by thread_overview_interpret + */ +function thread_overview_read(&$ns) { + $overviewfmt=array(); + fputs($ns,"LIST overview.fmt\r\n"); // find out the format of the + $tmp=line_read($ns); // xover-command + if(substr($tmp,0,3)=="215") { + $line=line_read($ns); + while (strcmp($line,".") != 0) { + // workaround for braindead CLNews newsserver + if($line=="Author:") + $overviewfmt[]="From:"; + else + $overviewfmt[]=$line; + $line=line_read($ns); + } + } else { + // some stupid newsservers, like changi, don't send their overview + // format + // let's hope, that the format is like that from INN + $overviewfmt=array("Subject:","From:","Date:","Message-ID:", + "References:","Bytes:"); + } + $overviewformat=implode("\t",$overviewfmt); + return $overviewformat; +} + +function thread_mycompare($a,$b) { + global $thread_sort_order,$thread_sort_type; + if($thread_sort_type!="thread") { + $r=($a->date<$b->date) ? -1 : 1; + if ($a->date==$b->date) $r=0; + } else { + $r=($a->date_thread<$b->date_thread) ? -1 : 1; + if ($a->date_thread==$b->date_thread) $r=0; + } + return $r*$thread_sort_order; +} + +/* + * this function loads the (missing parts of the) thread from the newsserver. + * it also loads the thread from the disk cache to detect which parts + * are missing and merges this data with the parts from the + * newsserver. + * if it detects that the newsserver made major changes in the groups, + * for example if it expired parts of the group or reset its counters, + * this function deletes the cached data and make a complete rebuild. + * + * $ns: handle of the connection to the newsserver + * $groupname: name of the newsgroup + * $poll: if set to 1, this function works in polling-mode, which + * means, that it also read every article from the newsserver. + * This makes only sense if the article cache is activated + */ +function thread_load_newsserver(&$ns,$groupname,$poll) { + global $spooldir,$logdir,$maxarticles,$maxfetch,$initialfetch,$maxarticles_extra,$config_name; + global $text_error,$text_thread,$compress_spoolfiles,$server; + global $www_charset,$iconv_enable,$thread_show,$thread_sort_order; + $logfile=$logdir.'/newsportal.log'; + $idstring="0.36,".$server.",".$compress_spoolfiles.",".$maxarticles.",". + $maxarticles_extra.",".$maxfetch.",".$initialfetch.",". + $www_charset.','.$iconv_enable.','.$thread_show["replies"]; + $overviewformat=thread_overview_read($ns); + $spoolfilename=$spooldir."/".$groupname."-data.dat"; + fputs($ns,"GROUP $groupname\r\n"); // select a group + $groupinfo=explode(" ",line_read($ns)); + if (substr($groupinfo[0],0,1) != 2) { + echo "

".$text_error["error:"]."

"; + echo "

".$text_thread["no_such_group"]."

"; + flush(); + } else { + $infofilename=$spooldir."/".$groupname."-info.txt"; + // lets find out, in which mode wie want to read articles: + // w: complete rebuild of the group-info file + // a: add new articles to the group-info file + // n: there are no new articles, no rebuild or actualisation + $spoolopenmodus="n"; + // if the group-info file doesn't exist: create it + if (!((file_exists($infofilename)) && (file_exists($spoolfilename)) && + (filesize($infofilename)>0) && (filesize($spoolfilename)>0))) { + file_put_contents($logfile, "\n".format_log_date()." ".$config_name." ".$infofilename." does not exist. Rebuilding ".$groupname, FILE_APPEND); + $spoolopenmodus="w"; + } else { + $infofile=fopen($infofilename,"r"); + $oldid=fgets($infofile,100); + if (trim($oldid) != $idstring) { + echo "\n"; + file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Database Error, Rebuilding ".$groupname, FILE_APPEND); + $spoolopenmodus="w"; + } + $oldgroupinfo=explode(" ",trim(fgets($infofile,200))); + fclose($infofile); + if ($groupinfo[3] < $oldgroupinfo[1]) { + file_put_contents($logfile, "\n".format_log_date()." ".$config_name." groupinfo[3] has changed. Rebuilding ".$groupname, FILE_APPEND); + $spoolopenmodus="w"; + } + if ($maxarticles == 0) { + if ($groupinfo[2] != $oldgroupinfo[0]) $spoolopenmodus="w"; + } else { + if ($groupinfo[2] > $oldgroupinfo[0]) { + file_put_contents($logfile, "\n".format_log_date()." ".$config_name." groupinfo[2] has changed. Rebuilding ".$groupname, FILE_APPEND); + $spoolopenmodus="w"; + } + } + // if the high watermark increased, add articles to the existing spool + if (($spoolopenmodus == "n") && ($groupinfo[3] > $oldgroupinfo[1])) { + file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Adding articles to ".$groupname, FILE_APPEND); + $spoolopenmodus="a"; + } + } + if ($spoolopenmodus=="a") { + $firstarticle=$oldgroupinfo[1]+1; + $lastarticle=$groupinfo[3]; + } + if ($spoolopenmodus=="w") { + $firstarticle=$groupinfo[2]; + $lastarticle=$groupinfo[3]; + } + if ($spoolopenmodus != "n") { + if ($maxarticles != 0) { + if ($spoolopenmodus == "w") { + $firstarticle=$lastarticle-$maxarticles+1; + if ($firstarticle < $groupinfo[2]) + $firstarticle=$groupinfo[2]; + } else { + if ($lastarticle-$oldgroupinfo[0]+1 > $maxarticles + $maxarticles_extra) { + $firstarticle=$lastarticle-$maxarticles+1; + $spoolopenmodus="w"; + } + } + } + if (($maxfetch!=0) && (($lastarticle-$firstarticle+1) > $maxfetch)) { + if ($spoolopenmodus=="w") { + $tofetch=($initialfetch != 0) ? $initialfetch : $maxfetch; + $lastarticle=$firstarticle+$tofetch-1; + } else { + $lastarticle=$firstarticle+$maxfetch-1; + } + } + } + echo "\n"; + // load the old spool-file, if we do not have a complete rebuild + if ($spoolopenmodus != "w") $headers=thread_cache_load($groupname); + // read articles from the newsserver + if ($spoolopenmodus != "n") { + // order the article overviews from the newsserver + fputs($ns,"XOVER ".$firstarticle."-".$lastarticle."\r\n"); + $tmp=line_read($ns); + // have the server accepted our order? + if (substr($tmp,0,3) == "224") { + $line=line_read($ns); + // read overview by overview until the data ends + while ($line != ".") { + // parse the output of the server... + $article=thread_overview_interpret($line,$overviewformat,$groupname); + // ... and save it in our data structure + $article->threadsize++; + $article->date_thread=$article->date; + $headers[$article->id]=$article; + // if we are in poll-mode: print status information and + // decode the article itself, so it can be saved in the article + // cache + if($poll) { + echo $article->number.", "; flush(); + message_read($article->number,0,$groupname); + } + // read the next line from the newsserver + $line=line_read($ns); + } + // write information about the last article to the spool-directory + $infofile=fopen($spooldir."/".$groupname."-lastarticleinfo.dat","w"); + $lastarticleinfo->from=$article->from; + $lastarticleinfo->date=$article->date; + $lastarticleinfo->name=$article->name; + fputs($infofile,serialize($lastarticleinfo)); + fclose($infofile); + } + // remove the old spoolfile +// if (file_exists($spoolfilename)) unlink($spoolfilename); + if ((isset($headers)) && (count($headers)>0)) { + //$infofile=fopen($infofilename,"w"); + //if ($spoolopenmodus=="a") $firstarticle=$oldgroupinfo[0]; + //fputs($infofile,$idstring."\n"); + //fputs($infofile,$firstarticle." ".$lastarticle."\r\n"); + //fclose($infofile); + foreach($headers as $c) { + if (($c->isAnswer == false) && + (isset($c->references))) { // is the article an answer to an + // other article? + // try to find a matching article to one of the references + $refmatch=false; + foreach ($c->references as $reference) { + if(isset($headers[$reference])) { + $refmatch=$reference; + } + } + // have we found an article, to which this article is an answer? + if($refmatch!=false) { + $c->isAnswer=true; + $c->bestreference=$refmatch; + $headers[$c->id]=$c; + // the referenced article get the ID af this article as in + // its answers-array + $headers[$refmatch]->answers[]=$c->id; + // propagate down the number of articles in this thread + $d =& $headers[$c->bestreference]; + do { + $d->threadsize+=$c->threadsize; + $d->date_thread=max($c->date,$d->date_thread); + } while(($headers[$d->bestreference]) && + (isset($d->bestreference)) && + ($d =& $headers[$d->bestreference])); + } + } + } + reset($headers); + // sort the articles + if (($thread_sort_order != 0) && (count($headers)>0)) + uasort($headers,'thread_mycompare'); + // Save the thread-informations +// if (file_exists($spoolfilename)) unlink($spoolfilename); + thread_cache_save($headers,$groupname); + // Save the info-file + $infofile=fopen($infofilename,"w"); + if ($spoolopenmodus=="a") $firstarticle=$oldgroupinfo[0]; + fputs($infofile,$idstring."\n"); + fputs($infofile,$firstarticle." ".$lastarticle." ".count($headers)."\r\n"); + fclose($infofile); + } + // remove cached articles that are not in this group + // (expired on the server or canceled) + $dirhandle=opendir($spooldir); + while ($cachefile = readdir($dirhandle)) { + if(substr($cachefile,0,strlen($groupname)+1)==$groupname."_") { + $num=preg_replace('/^(.*)_(.*)\.(.*)$/i','\2',$cachefile); + if(($num<$firstarticle) || ($num>$lastarticle)) + unlink($spooldir.'/'.$cachefile); + } + // remove the html cache files of this group + if((substr($cachefile,strlen($cachefile)-5)==".html") && + (substr($cachefile,0,strlen($groupname)+1)==$groupname."-")) + unlink($spooldir.'/'.$cachefile); + } + } + if(isset($headers)) + return $headers; + return false; + //return((isset($headers)) ? $headers : false); + } +} + + +/* + * Read the Overview. + * Format of the overview-file: + * message-id + * date + * subject + * author + * email + * references + * + * $groupname: name of the newsgroup + * $readmode: if set to 0, this function only reads data from the + * newsserver, if there exists no cached data for this group + * $poll: polling mode, see description at thread_load_newsserver() + */ + +function thread_load($groupname,$readmode = 1,$poll=false) { + global $text_error, $maxarticles, $server, $port; + global $spooldir,$thread_sort_order,$cache_thread; + global $articles_per_page; + if (!testGroup($groupname)) { + echo $text_error["read_access_denied"]; + return; + } + // first assume that we have to query the newsserver + $query_ns=true; + // name of the file that indicates by it's timestamp when the + // last query of the newsserver was + $cachefile=$spooldir.'/'.$groupname.'-cache.txt'; + // should we load the data only from cache if it's recent enough, or + // do we have to query the newsserver every time? + if(is_file($cachefile)) { + if(filemtime($cachefile)+$cache_thread < time()) { + if(is_file($spooldir.'/'.$groupname.'-1-'.$articles_per_page.'.html')) { + unlink($spooldir.'/'.$groupname.'-1-'.$articles_per_page.'.html'); + } + unlink($cachefile); + } + } + if($cache_thread>0) { + if(file_exists($cachefile)) { + // cached file exists and is new enough. so lets read it out. + $articles=thread_cache_load($groupname); + return $articles; + $query_ns=false; + } + } + // do we have to query the newsserver? + if($query_ns) { + // look if there is new data on the newsserver + $ns=nntp_open($server,$port); + if ($ns == false) return false; + if (($ns!=false) && ($readmode > 0)) + $articles=thread_load_newsserver($ns,$groupname,$poll); + if ((isset($articles)) && ($articles)) { + + // write the file which indicates the time of the last newsserver query + touch($cachefile); + return $articles; + } else { + // uh, we didn't get articles from the newsservers... + // for now, return false. but it would also make sense to get + // the articles from the cache then... + return false; + } + nntp_close($ns); + } +} + +/* + * Remove re:, aw: etc. from a subject. + * + * $subject: a string containing the complete Subject + * + * The function removes the re:, aw: etc. from $subject end returns true + * if it removed anything, and false if not. + */ +function splitSubject(&$subject) { + $s=preg_replace('/^(odp:|aw:|re:|re\[2\]:| )+/i','',$subject); + $return=($s != $subject); + $subject=$s; + return $return; +} + +function str_change($str,$pos,$char) { + return(substr($str,0,$pos).$char.substr($str,$pos+1,strlen($str)-$pos)); +} + +/* + * calculate the graphic representation of the thread + */ +function thread_show_calculate($newtree,$depth,$num,$liste,$c) { + global $thread_show; + // displays the replies to an article? + if(!$thread_show["replies"]) { + // no + if ((isset($c->answers[0])) && (count($c->answers)>0)) + $newtree.="o"; + else + $newtree.="o"; + } else { + // yes, display the replies + if ((isset($c->answers[0])) && (count($c->answers)>0)) { + $newtree.="*"; + } else { + if ($depth == 1) { + $newtree.="o"; + } else { + $newtree.="-"; + } + } + if (($num == count($liste)-1) && ($depth>1)) { + $newtree=str_change($newtree,$depth-2,"`"); + } + } + return($newtree); +} + + +/* + * Format the message-tree + * Zeichen im Baum: + * o : leerer Kasten k1.gif + * * : Kasten mit Zeichen drin k2.gif + * i : vertikale Linie I.gif + * - : horizontale Linie s.gif + * + : T-Stueck T.gif + * ` : Winkel L.gif + */ +function thread_show_treegraphic($newtree) { + global $imgdir; + $return=""; + for ($o=0 ; $oisReply) { + $re="Re: "; + } else { + $re=""; + } + // is the current article to be highlighted? + if((is_array($highlightids))) { + if((in_array($c->id,$highlightids)) || (in_array($c->number,$highlightids))) { + $highlight=true; + } else { + $highlight=false; + } + } else { + $highlight=false; + } + if($highlight) + $return=''; + else { + $return='number).'">'; + } + $return.=$re.htmlspecialchars(mb_substr(trim($c->subject),0,$thread_maxSubject)); + if($highlight) + $return .=''; + else + $return.=''; + if($thread_show["latest"] == true) { + $newdate = $c->date + ($offset * 60); + + unset($ts); + $fromoutput = explode("<", html_entity_decode($c->name)); + if(strlen($fromoutput[0]) < 1) { + $started = $fromoutput[1]; + } else { + $started = $fromoutput[0]; + } + $return.='
'; + $return.='

By: '.create_name_link($started).' on '.date("D, j M Y",$newdate).'

'; + $return.='
'; + } + return($return); +} + +/* + * colorize the date inside the thread + */ +function thread_format_date_color($date) { + global $age_count,$age_time,$age_color; + $return=""; + $currentTime=time(); + if ($age_count > 0) + for($t = $age_count; $t >= 1; $t--) { + if ($currentTime - $date < $age_time[$t]) + $color = $age_color[$t]; + } + if (isset($color)) + return $color; + else + return ""; +} + +/* + * format the date inside the thread + */ +function thread_format_date($c) { + global $age_count,$age_time,$age_color,$thread_show,$thread_show; + $return=""; + $currentTime=time(); + $color=""; + // show the date of the individual article or of the latest article + // in the thread? + if($thread_show["lastdate"]) + $date=$c->date_thread; + else + $date=$c->date; + if ($age_count > 0) + for($t = $age_count; $t >= 1; $t--) + if ($currentTime - $date < $age_time[$t]) $color = $age_color[$t]; + if ($color != "") $return .= ''; + $return .= date("d M ",$date); // format the date + if ($color != "") $return .= ''; + return($return); +} + +/* + * format the author inside the thread + */ +function thread_format_author($c,$group='',$lastmessage=1) { + global $thread_show,$anonym_address; + if($lastmessage == 1) { + return thread_format_lastmessage($c,$group,$lastmessage); + } + // if the address the anonymous address, only return the name + if($c->from==$anonym_address) + return $c->name; + $return=""; + if($thread_show["authorlink"]) + $return .= ''; + if (trim($c->name)!="") { + $return .= htmlspecialchars(trim($c->name)); + } else { + if (isset($c->username)) { + $s = strpos($c->username,"%"); + if ($s != false) { + $return .= htmlspecialchars(substr($c->username,0,$s)); + } else { + $return .= htmlspecialchars($c->username); + } + } + } + if($thread_show["authorlink"]) + $return .= ""; + return($return); +} + +/* + * format the last message info in the thread + */ +function thread_format_lastmessage($c,$group='') { + global $thread_show,$anonym_address,$spooldir,$ovcache,$ovfile,$CONFIG; + $ovfound = 0; + $thiscache = array_slice($ovcache,-5); + if(!empty($thiscache)) { + $ovcache = $thiscache; + } + foreach($ovcache as $cacheline) { + $line = preg_split("/(:#rsl#:|\t)/", $cacheline); + if(intval($c->date_thread) == strtotime($line[3])) { + $ovfound = 1; + break; + } + } + if($ovfound == 0) { + $ovcache = array(); + while($overviewline = fgets($ovfile)) { + $line = preg_split("/(:#rsl#:|\t)/", $overviewline); + $ovcache[] = $overviewline; + if(intval($c->date_thread) == strtotime($line[3])) { + $ovfound = 1; + break; + } + } + } + if($ovfound == 0) { + pclose($ovfile); + $overviewfile = $spooldir.'/'.$group.'-overview'; + $ovfile = popen($CONFIG['tac'].' '.$overviewfile, 'r'); + } + $fromline = address_decode(headerDecode($line[2]),"nirgendwo"); + if (!isset($fromline[0]["host"])) $fromline[0]["host"]=""; + $name_from=$fromline[0]["mailbox"]."@".$fromline[0]["host"]; + $name_username=$fromline[0]["mailbox"]; + if (!isset($fromline[0]["personal"])) { + $poster_name=$fromline[0]["mailbox"]; + } else { + $poster_name=$fromline[0]["personal"]; + } + if(trim($poster_name) == '') { + $fromoutput = explode("<", html_entity_decode($c->name)); + if(strlen($fromoutput[0]) < 1) { + $poster_name = $fromoutput[1]; + } else { + $poster_name = $fromoutput[0]; + } + } + if($ovfound == 1) { + $url = 'article-flat.php?id='.$line[0].'&group='.urlencode($group).'#'.$line[0]; + $return.='

'.get_date_interval(date("D, j M Y H:i T",$c->date_thread)).''; + } else { + $return.='

'.get_date_interval(date("D, j M Y H:i T",$c->date_thread)).'

'; + } + $return.='

By: '.create_name_link($poster_name).'

'; +/* + // if the address the anonymous address, only return the name + if($c->from==$anonym_address) + return $c->name; + $return=""; + if($thread_show["authorlink"]) + $return .= ''; + if (trim($c->name)!="") { + $return .= htmlspecialchars(trim($c->name)); + } else { + if (isset($c->username)) { + $s = strpos($c->username,"%"); + if ($s != false) { + $return .= htmlspecialchars(substr($c->username,0,$s)); + } else { + $return .= htmlspecialchars($c->username); + } + } + } + if($thread_show["authorlink"]) + $return .= ""; +*/ + return($return); +} + +/* + * Displays a part of the thread. This function is recursively called + * It is used by thread_show + */ +function thread_show_recursive(&$headers,&$liste,$depth,$tree,$group,$article_first=0,$article_last=0,&$article_count,$highlight=false,$lastmessage=1) { + global $thread_treestyle; + global $thread_show,$imgdir; + global $file_article,$thread_maxSubject; + global $age_count,$age_time,$age_color,$spooldir; + global $frame_article; + $output=""; + if ($thread_treestyle==3) $output.= "\n
    \n"; + for ($i = 0 ; $inumber)) { + continue; + } + $article_count++; + // Render the graphical tree + switch ($thread_treestyle) { + case 4: // thread + case 5: // thread, graphic + case 6: // thread, table + case 7: // thread, table, graphic + $newtree=thread_show_calculate($tree,$depth,$i,$liste,$c); + } + if (($article_first == 0) || + (($article_count >= $article_first) && + ($article_count <= $article_last))) { + switch ($thread_treestyle) { + case 0: // simple list + $output.= ''; + if ($thread_show["date"]) $output.= thread_format_date($c)." "; + if ($thread_show["subject"]) $output.= thread_format_subject($c,$group,false)." "; + if ($thread_show["author"]) $output.= "(".thread_format_author($c,$group,$lastmessage).")"; + $output.= ''; + $output.= "
    \n"; + break; + case 1: // html-auflistung, kein baum + $output.= '
  • '; + if ($thread_show["date"]) + $output.= thread_format_date($c).' '; + if ($thread_show["subject"]) + $output.= thread_format_subject($c,$group,$highlight).' '; + if ($thread_show["author"]) + $output.= "(".thread_format_author($c,$group,$lastmessage).")"; + $output.= '
  • '; + break; + case 2: // table + $output.= ''; + if ($thread_show["date"]) { + $output.= ''. + thread_format_date($c).' '; + } + if ($thread_show["subject"]) { + $output.= ''. + ''. + thread_format_subject($c,$group,$highlight). + ''; + } + if ($thread_show["author"]) { + $output.= ''. + ''. + ''.thread_format_author($c,$group,$lastmessage). + ''; + } + $output.= "\n"; + break; + case 3: // html-tree + $output.= '
  • '; + if ($thread_show["date"]) + $output.= thread_format_date($c)." "; + if ($thread_show["subject"]) + $output.= thread_format_subject($c,$group,$highlight)." "; + if ($thread_show["author"]) + $output.= "(".thread_format_author($c,$group,$lastmessage).")"; + $output.= ""; + break; + case 4: // thread + $output.= ''; + if ($thread_show["date"]) + $output.= thread_format_date($c)." "; + $output.= formatTreeText($newtree)." "; + if ($thread_show["subject"]) + $output.= thread_format_subject($c,$group,$highlight)." "; + if ($thread_show["author"]) + $output.= "(".thread_format_author($c,$group,$lastmessage).")"; + $output.= '
    '; + break; + case 5: // thread, graphic + $output.= ''; + if ($thread_show["date"]) + $output.= ''; + $output.= ''; + if ($thread_show["subject"]) + $output.= ''; + $output.= "
    '. + ''. + thread_format_date($c).' '. + thread_show_treegraphic($newtree).''. + ' '. + thread_format_subject($c,$group,$highlight)." "; + if ($thread_show["author"]) + $output.= '('.thread_format_author($c,$group,$lastmessage).')
    "; + break; + case 6: // thread, table + $output.= ""; + if ($thread_show["date"]) + $output.= ''. + ''. + thread_format_date($c).' '; + $output.= ''. + ''. + formatTreeText($newtree)." "; + if ($thread_show["subject"]) { + $output.= thread_format_subject($c,$group,$highlight).""; + $output.= ""; + } + if ($thread_show["author"]) + $output.= ''. + ''. + thread_format_author($c,$group,$lastmessage).''; + $output.= ""; + break; + case 7: // thread, table, graphic + $output.= ''; + if ($thread_show["date"]) + $output.= ''. + ''. + thread_format_date($c)." ". + ''; + $output.= ''; + $output.= thread_show_treegraphic($newtree); + if ($thread_show["subject"]) { + $output.= ' '. + thread_format_subject($c,$group,$highlight).''; + } + $output.=''; + if($thread_show["threadsize"]) { + $replies_count = $c->threadsize - 1; + $output.= ''.$replies_count.''; + } + if ($thread_show["author"]) + $output.= ''. + ''. + thread_format_author($c,$group,$lastmessage).''; + $output.= ""; + break; + } + } + if ((isset($c->answers[0])) && (count($c->answers)>0) && + ($article_count<=$article_last)) { + if ($thread_treestyle >= 4) { + if (substr($newtree,$depth-2,1) == "+") + $newtree=str_change($newtree,$depth-2,"i"); + $newtree=str_change($newtree,$depth-1,"+"); + $newtree=strtr($newtree,"`","."); + } + if (!isset($newtree)) $newtree=""; + if($thread_show["replies"]) { + $output.=thread_show_recursive($headers,$c->answers,$depth+1,$newtree."",$group, + $article_first,$article_last,$article_count,$highlight,$lastmessage); + } + } + flush(); + } + if ($thread_treestyle==3) $output.= "
"; + return $output; +} + + +/* + * Displays the Head (table tags, headlines etc.) of a thread + */ +function thread_show_head($lastmessage=1) { + global $thread_show, $thread_showTable; + global $text_thread,$thread_treestyle; + if (($thread_treestyle==2) || ($thread_treestyle==6) || + ($thread_treestyle==7)) { + echo ''; + echo ''."\n"; + if ($thread_show["date"]) + echo '"; + if ($thread_show["subject"]) + echo '"; + if ($thread_show["threadsize"]) + echo '"; + if ($thread_show["author"]) { + if($lastmessage == 1) { + echo '\n"; + } else { + echo '\n"; + } + } + echo "\n"; + } else { + if ($thread_treestyle==1) echo "
    \n"; + } +} + +/* + * Displays the tail (closing table tags, headlines etc.) of a thread + */ +function thread_show_tail() { + global $thread_show, $thread_showTable; + global $text_thread,$thread_treestyle; + if (($thread_treestyle==2) || ($thread_treestyle==6) || + ($thread_treestyle==7)) { + echo "
'.$text_thread["date"]." '. + $text_thread["subject"]."'. + $text_thread["threadsize"]."'.$text_thread["lastmessage"]."'.$text_thread["author"]."
\n"; + } else { + if ($thread_treestyle==1) echo "\n"; + } +} + +/* + * Shows a complete thread + * + * $headers: The thread to be displayed + * $group: name of the newsgroup + * $article_first: Number of the first article to be displayed + * $article_last: last article + */ +function thread_show(&$headers,$group,$article_first=0,$article_last=0,$lastmessage=1) { + global $spooldir,$text_thread; + $article_count=0; + if ($headers == false) { + echo $text_thread["no_articles"]; + } else { + // exists a cached html-output? + $filename=$spooldir."/".$group."-".$article_first."-". + $article_last.".html"; + if (!file_exists($filename)) { + // no, we need to create a new html-output + $output=""; + reset($headers); + $c=current($headers); + for ($i=0; $i<=count($headers)-1; $i++) { // create the array $liste + if ($c->isAnswer == false) { // where are all the articles + $liste[]=$c->id; // in that don't have + } // references + $c=next($headers); + } + reset($liste); + if (count($liste)>0) { + $output.=thread_show_recursive($headers,$liste,1,"",$group,$article_first, + $article_last,$article_count,$lastmessage); + } + // cache the html-output + $file=fopen($filename,"w"); + fputs($file,$output); + fclose($file); + } else { + // yes, a cached output exists, load it! + $file=fopen($filename,"r"); + $output=fread($file,filesize($filename)); + fclose($file); + } + thread_show_head($lastmessage); + echo $output; + thread_show_tail(); + } +} + + + + +/* + * returns the article-numbers of all articles in a given subthread + * + * $id: article number or message id of a article in a subthread + * $thread: thread data, as returned by thread_cache_load() + */ +function thread_getsubthreadids($id,$thread) { + // recursive helper function to walk through the subtree + function thread_getsubthreadids_recursive($id) { + global $thread; + $answers=array($thread[$id]->number); + // has this article answers? + if(isset($thread[$id]->answers)) { + // walk through the answers + foreach($thread[$id]->answers as $answer) { + $answers=array_merge($answers, + thread_getsubthreadids_recursive($answer)); + } + } + return $answers; + } + +//echo htmlspecialchars(print_r($thread,true)); + // exists the article $id? + if(!isset($thread[$id])) + return false; + // "rewind" the subthread to the first article in the subthread + $current=$id; + flush(); + while(isset($thread[$id]->references)) { + foreach($thread[$id]->references as $reference) { + if((trim($reference)!='') && (isset($thread[$reference]))) { + $id=$reference; + continue 2; + } + } + break; + } + + // walk through the thread and fill up $subthread + // use the recursive helper-function thread_getsubthreadids_recursive + $subthread=thread_getsubthreadids_recursive($id); + return $subthread; +} + +?> diff --git a/Rocksolid_Light/rocksolid/lib/types.inc.php b/Rocksolid_Light/rocksolid/lib/types.inc.php new file mode 100644 index 0000000..ee7d5c6 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/types.inc.php @@ -0,0 +1,80 @@ +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 +} +?> diff --git a/Rocksolid_Light/rocksolid/lib/validator.inc b/Rocksolid_Light/rocksolid/lib/validator.inc new file mode 100644 index 0000000..b0c8781 --- /dev/null +++ b/Rocksolid_Light/rocksolid/lib/validator.inc @@ -0,0 +1,243 @@ +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 '

eval: '.$field->name.': '.$_REQUEST[$field->name].'

'; + } + 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 "

fehler

"; + } + } + + /* + * 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 ''.$text.''; + 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() { + } +} +?> diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php new file mode 100644 index 0000000..22c36f7 --- /dev/null +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -0,0 +1,1176 @@ +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 + */ + +if(file_exists("lib/types.inc.php")) + include "lib/types.inc.php"; +if(file_exists("lib/thread.inc.php")) + include "lib/thread.inc.php"; +if(file_exists("lib/message.inc.php")) + include "lib/message.inc.php"; +if(file_exists("lib/post.inc.php")) + include "lib/post.inc.php"; + +$CONFIG = include($config_file); + +/* + * opens the connection to the NNTP-Server + * + * $server: adress of the NNTP-Server + * $port: port of the server + */ +function nntp_open($nserver=0,$nport=0) { + global $text_error,$CONFIG; + global $server,$port; + // echo "
NNTP OPEN
"; + if(!isset($CONFIG['enable_nntp']) || $CONFIG['enable_nntp'] != true) { + $CONFIG['server_auth_user'] = $CONFIG['remote_auth_user']; + $CONFIG['server_auth_pass'] = $CONFIG['remote_auth_pass']; + } + $authorize=((isset($CONFIG['server_auth_user'])) && (isset($CONFIG['server_auth_pass'])) && + ($CONFIG['server_auth_user'] != "")); + if ($nserver==0) $nserver=$server; + if ($nport==0) $nport=$port; + $ns=@fsockopen($nserver,$nport); + $weg=line_read($ns); // kill the first line + if (substr($weg,0,2) != "20") { + echo "

".$text_error["error:"].$weg."

"; + 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 "

".$text_error["error:"].$weg."

"; + fclose($ns); + $ns=false; + } + } + if ((isset($CONFIG['server_auth_user'])) && (isset($CONFIG['server_auth_pass'])) && + ($CONFIG['server_auth_user'] != "")) { + fputs($ns,"AUTHINFO USER ".$CONFIG['server_auth_user']."\r\n"); + $weg=line_read($ns); + fputs($ns,"AUTHINFO PASS ".$CONFIG['server_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 "

".$text_error["error:"]."

"; + echo "

".$text_error["auth_error"]."

"; + } + } + } + if ($ns==false) echo "

".$text_error["connection_failed"]."

"; + return $ns; +} + +/* + * Close a NNTP connection + * + * $ns: the handle of the connection + */ +function nntp_close(&$ns) { + if ($ns != false) { + fputs($ns,"QUIT\r\n"); + fclose($ns); + } +} + +/* + * Validates an email adress + * + * $address: a string containing the email-address to be validated + * + * returns true if the address passes the tests, false otherwise. + */ +function validate_email($address) +{ + global $validate_email; + $return=true; + if (($validate_email >= 1) && ($return == true)) +/* Need to clean up this regex to work properly with preg_match + $return = (preg_match('^[-!#$%&\'*+\\./0-9=?A-Z^_A-z{|}~]+'.'@'. + '[-!#$%&\'*+\\/0-9=?A-Z^_A-z{|}~]+\.'. + '[-!#$%&\'*+\\./0-9=?A-Z^_A-z{|}~]+$',$address)); +*/ + $return = 1; + if (($validate_email >= 2) && ($return == true)) { + $addressarray=address_decode($address,"garantiertungueltig"); + $return=checkdnsrr($addressarray[0]["host"],"MX"); + if (!$return) $return=checkdnsrr($addressarray[0]["host"],"A"); + } + return($return); +} + +/* + * decodes a block of 7bit-data in uuencoded format to it's original + * 8bit format. + * The headerline containing filename and permissions doesn't have to + * be included. + * + * $data: The uuencoded data as a string + * + * returns the 8bit data as a string + * + * Note: this function is very slow and doesn't recognize incorrect code. + */ +function uudecode_line($line) { + $data=substr($line,1); + $length=ord($line[0])-32; + $decoded=""; + for ($i=0; $i<(strlen($data)>>2); $i++) { + $pack=substr($data,$i<<2,4); + $upack=""; + $bitmaske=0; + for ($o=0; $o<4; $o++) { + $g=((ord($pack[3-$o])-32)); + if ($g==64) $g=0; + $bitmaske=$bitmaske | ($g << (6*$o)); + } + $schablone=255; + for ($o=0; $o<3; $o++) { + $c=($bitmaske & $schablone) >> ($o << 3); + $schablone=($schablone << 8); + $upack=chr($c).$upack; + } + $decoded.=$upack; + } + $decoded=substr($decoded,0,$length); + return $decoded; +} + +/* + * decodes uuencoded Attachments. + * + * $data: the encoded data + * + * returns the decoded data + */ +function uudecode($data) { + $d=explode("\n",$data); + $u=""; + for ($i=0; $i0) $return.=","; + $o++; + $return.=$groups[$i]; + } + } + return($return); +} + +/* + * read one line from the NNTP-server + */ +function line_read(&$ns) { + if ($ns != false) { + $t=str_replace("\n","",str_replace("\r","",fgets($ns,1200))); + return $t; + } +} + +/* + * Split an internet-address string into its parts. An address string could + * be for example: + * - user@host.domain (Realname) + * - "Realname" + * - user@host.domain + * + * The address will be split into user, host (incl. domain) and realname + * + * $adrstring: The string containing the address in internet format + * $defaulthost: The name of the host which should be returned if the + * address-string doesn't contain a hostname. + * + * returns an hash containing the fields "mailbox", "host" and "personal" + */ +function address_decode($adrstring,$defaulthost) { + $parsestring=trim($adrstring); + $len=strlen($parsestring); + $at_pos=strpos($parsestring,'@'); // find @ + $ka_pos=strpos($parsestring,"("); // find ( + $kz_pos=strpos($parsestring,')'); // find ) + $ha_pos=strpos($parsestring,'<'); // find < + $hz_pos=strpos($parsestring,'>'); // find > + $space_pos=strpos($parsestring,')'); // find ' ' + $email=""; + $mailbox=""; + $host=""; + $personal=""; + if ($space_pos != false) { + if (($ka_pos != false) && ($kz_pos != false)) { + $personal=substr($parsestring,$ka_pos+1,$kz_pos-$ka_pos-1); + $email=trim(substr($parsestring,0,$ka_pos-1)); + } + } else { + $email=$adrstring; + } + if (($ha_pos != false) && ($hz_pos != false)) { + $email=trim(substr($parsestring,$ha_pos+1,$hz_pos-$ha_pos-1)); + $personal=substr($parsestring,0,$ha_pos-1); + } + if ($at_pos != false) { + $mailbox=substr($email,0,strpos($email,'@')); + $host=substr($email,strpos($email,'@')+1); + } else { + $mailbox=$email; + $host=$defaulthost; + } + $personal=trim($personal); + if (substr($personal,0,1) == '"') $personal=substr($personal,1); + if (substr($personal,strlen($personal)-1,1) == '"') + $personal=substr($personal,0,strlen($personal)-1); + $result["mailbox"]=trim($mailbox); + $result["host"]=trim($host); + if ($personal!="") $result["personal"]=$personal; + $complete[]=$result; + return ($complete); +} + +/* + * Read the groupnames from groups.txt, and get additional informations + * of the groups from the newsserver + */ +function groups_read($server,$port,$load=0) { + global $gl_age,$file_groups,$spooldir,$config_name,$cache_index; + // is there a cached version, and is it actual enough? + $cachefile=$spooldir.'/'.$config_name.'-groups.dat'; + // if cache is new enough, don't recreate it + clearstatcache(TRUE, $cachefile); + if($load == 1 && file_exists($cachefile) && (filemtime($cachefile)+$cache_index>time())) { + return; + } + if(file_exists($cachefile) && $load == 0) { + // cached file exists and is new enough, so lets read it out. + $file=fopen($cachefile,"r"); + $data=""; + while(!feof($file)) { + $data.=fgets($file,1000); + } + fclose($file); + $newsgroups=unserialize($data); + } else { + $ns=nntp_open($server,$port); + if ($ns == false) return false; + $gf=fopen($file_groups,"r"); + // if we want to mark groups with new articles with colors, wie will later + // need the format of the overview + $overviewformat=thread_overview_read($ns); + while (!feof($gf)) { + $gruppe=new newsgroupType; + $tmp=trim(line_read($gf)); + $tmp=preg_replace('/\t/', ' ', $tmp); + if(substr($tmp,0,1)==":") { + $gruppe->text=substr($tmp,1); + $newsgroups[]=$gruppe; + } elseif(strlen(trim($tmp))>0) { + // is there a description in groups.txt? + $pos=strpos($tmp," "); + if ($pos != false) { + // yes. + $gruppe->name=substr($tmp,0,$pos); + $desc=substr($tmp,$pos); + } else { + // no, get it from the newsserver. + $gruppe->name=$tmp; + fputs($ns,"XGTITLE $gruppe->name\r\n"); + $response=line_read($ns); + if (strcmp(substr($response,0,3),"282") == 0) { + $neu=line_read($ns); + do { + $response=$neu; + if ($neu != ".") $neu=line_read($ns); + } while ($neu != "."); + $desc=strrchr($response,"\t"); + if (strcmp($response,".") == 0) { + $desc="-"; + } + } else { + $desc=""; + } + if (strcmp(substr($response,0,3),"500") == 0) + $desc="-"; + } + if (strcmp($desc,"") == 0) $desc="-"; + $gruppe->description=$desc; + fputs($ns,"GROUP ".$gruppe->name."\r\n"); + $t=explode(" ",line_read($ns)); +//RETRO + if($t[0]=="211") + $gruppe->count=$t[1]; + else { + nntp_close($ns); + $ns=nntp_open($server,$port); + if ($ns == false) return false; + fputs($ns,"GROUP ".$gruppe->name."\r\n"); + $t=explode(" ",line_read($ns)); + if($t[0]=="211") + $gruppe->count=$t[1]; + else + continue; + } + // mark group with new articles with colors + if($gl_age) { + fputs($ns,'XOVER '.$t[3]."\r\n"); + $tmp=explode(" ",line_read($ns)); + if($tmp[0]=="224") { + $tmp=line_read($ns); + if($tmp!=".") { + $head=thread_overview_interpret($tmp,$overviewformat,$gruppe->name); + $tmp=line_read($ns); + $gruppe->age=$head->date; + } + } + } + if ((strcmp(trim($gruppe->name),"") != 0) && + (substr($gruppe->name,0,1) != "#")) + $newsgroups[]=$gruppe; + } + } + fclose($gf); + nntp_close($ns); + // write the data to the cachefile + $file=fopen($cachefile,"w"); + fputs($file,serialize($newsgroups)); + fclose($file); + } + if ($load == 0) { + return $newsgroups; + } else { + return; + } +} + +function groups_show($gruppen) { + global $gl_age,$frame,$spooldir,$CONFIG,$spoolnews; + if ($gruppen == false) return; + global $file_thread,$text_groups; + $c = count($gruppen); + $acttype="keins"; + echo ''; + for($i = 0 ; $i < $c ; $i++) { + $g = $gruppen[$i]; + if(isset($g->text)) { + if($acttype!="text") { + $acttype="text"; + } + } else { + if($acttype!="group") { + $acttype="group"; + } +/* Display group name and description */ + $lineclass="np_thread_line".(($i%2)+1); + + echo ''; + + echo '
'; + echo 'LatestNewsgroupMessagesLast Message
'; + echo ''; + if(is_file("../common/mods/images/latest.png")) { + echo ''; + } else { + echo ''; + } + echo ''; + echo ''; + echo ''; + echo ''.group_display_name($g->name)."\n"; + if($g->description!="-") + echo '

'.$g->description.'

'; + +/* Display article count */ + echo '
'; + if($gl_age) + $datecolor=thread_format_date_color($g->age); + echo ''; + if($datecolor!="") + echo ''.$g->count.''; + else + echo $g->count; + echo ''; + +/* Display latest article info */ + echo '
'; + $filename = $spooldir."/".$g->name."-lastarticleinfo.dat"; + if($file=@fopen($filename,"r")) { + $lastarticleinfo=unserialize(fread($file,filesize($filename))); + fclose($file); + } else { + $lastarticleinfo->date = 0; + } + if((isset($spoolnews)) && ($spoolnews === true)) { + $ovfp=popen($CONFIG['tac'].' '.$spooldir.'/'.$g->name.'-overview', 'r'); + $lastpost=fgets($ovfp); + pclose($ovfp); + $lastdata = explode("\t", $lastpost); + echo get_date_interval(date("D, j M Y H:i T",strtotime($lastdata[3]))); + $fromline=address_decode(headerDecode($lastdata[2]),"nirgendwo"); + if (!isset($fromline[0]["personal"])) { + $lastname=$fromline[0]["mailbox"];; + } else { + $lastname=$fromline[0]["personal"]; + } + } else { + echo get_date_interval(date("D, j M Y H:i T",$lastarticleinfo->date)); + $lastarticleinfo->name = ltrim($lastarticleinfo->name, "<"); + $lastname = $lastarticleinfo->name; + } + echo '
'; + echo 'by: '; + echo create_name_link($lastname); + echo '
'; + } + echo "\n"; + flush(); + } + echo "
\n"; +} + +/* + * print the group names from an array to the webpage + */ +function groups_show_frames($gruppen) { + global $gl_age,$frame,$spooldir; + if ($gruppen == false) return; + global $file_thread,$text_groups; + $c = count($gruppen); + echo '
'; + $acttype="keins"; + for($i = 0 ; $i < $c ; $i++) { + $g = $gruppen[$i]; + if(isset($g->text)) { + if($acttype!="text") { + $acttype="text"; + if($i>0) + echo '
'; + echo '
'; + } + echo $g->text; + } else { + if($acttype!="group") { + $acttype="group"; + if($i>0) + echo '
'; + echo '
'; + } + echo '
'; + echo ''.group_display_name($g->name)."\n"; + if($gl_age) + $datecolor=thread_format_date_color($g->age); + echo '('; + if($datecolor!="") + echo ''.$g->count.''; + else + echo $g->count; + echo ')'; + if($g->description!="-") + echo '
'.$g->description.''; + echo '
'; + } + echo "\n"; + flush(); + } + echo "
\n"; +} + +/* + * gets a list of aviable articles in the group $groupname + */ +/* +function getArticleList(&$ns,$groupname) { + fputs($ns,"LISTGROUP $groupname \r\n"); + $line=line_read($ns); + $line=line_read($ns); + while(strcmp($line,".") != 0) { + $articleList[] = trim($line); + $line=line_read($ns); + } + if (!isset($articleList)) $articleList="-"; + return $articleList; +} +*/ + +/* + * Decode quoted-printable or base64 encoded headerlines + * + * $value: The to be decoded line + * + * returns the decoded line + */ +function headerDecode($value) { + return mb_decode_mimeheader($value); +} + +/* + * calculates an Unix timestamp out of a Date-Header in an article + * + * $value: Value of the Date: header + * + * returns an Unix timestamp + */ +function getTimestamp($value) { + global $CONFIG; + + return strtotime($value); +} + +function parse_header($hdr,$number="") { + for ($i=count($hdr)-1; $i>0; $i--) + if (preg_match("/^(\x09|\x20)/",$hdr[$i])) + $hdr[$i-1]=$hdr[$i-1]." ".ltrim($hdr[$i]); + $header = new headerType; + $header->isAnswer=false; + for ($count=0;$countfrom=$fromline[0]["mailbox"]."@".$fromline[0]["host"]; + $header->username=$fromline[0]["mailbox"]; + if (!isset($fromline[0]["personal"])) { + $header->name=""; + } else { + $header->name=$fromline[0]["personal"]; + } + break; + case "message-id:": + $header->id=$value; + break; + case "subject:": + $header->subject=headerDecode($value); + break; + case "newsgroups:": + $header->newsgroups=$value; + break; + case "organization:": + $header->organization=headerDecode($value); + break; + case "content-transfer-encoding:": + $header->content_transfer_encoding=trim(strtolower($value)); + break; + case "content-type:": + $header->content_type=array(); + $subheader=explode(";",$value); + $header->content_type[0]=strtolower(trim($subheader[0])); + for ($i=1; $icontent_type_charset=array(strtolower($subvalue)); + break; + case "name": + $header->content_type_name=array($subvalue); + break; + case "boundary": + $header->content_type_boundary=$subvalue; + break; + case "format": + $header->content_type_format=array($subvalue); + } + } + } + break; + case "references:": + $ref=trim($value); + while (strpos($ref,"> <") != false) { + $header->references[]=substr($ref,0,strpos($ref," ")); + $ref=substr($ref,strpos($ref,"> <")+2); + } + $header->references[]=trim($ref); + break; + case "date:": + $header->date=getTimestamp(trim($value)); + break; + case "followup-to:": + $header->followup=trim($value); + break; + case "x-newsreader:": + case "x-mailer:": + case "x-rslight-to:": + $header->rslight_to=trim($value); + break; + case "x-rslight-site:": + $header->rslight_site=trim($value); + break; + case "user-agent:": + $header->user_agent=trim($value); + break; + case "x-face:": // not ready +// echo "

-".base64_decode($value)."-

"; + break; + case "x-no-archive:": + $header->xnoarchive=strtolower(trim($value)); + } + } + if (!isset($header->content_type[0])) + $header->content_type[0]="text/plain"; + if (!isset($header->content_transfer_encoding)) + $header->content_transfer_encoding="8bit"; + if ($number != "") $header->number=$number; + return $header; +} + +/* + * convert the charset of a text + */ +function recode_charset($text,$source=false,$dest=false) { + global $iconv_enable,$www_charset; + if($dest==false) + $dest=$www_charset; + if(($iconv_enable) && ($source!=false)) { + $return=iconv($source, + $dest."//TRANSLIT",$text); + if($return!="") + return $return; + else + return $text; + } else { + return $text; + } +} + +function decode_body($body,$encoding) { + $bodyzeile=""; + switch ($encoding) { + case "base64": + $body=base64_decode($body); + break; + case "quoted-printable": + $body=Quoted_printable_decode($body); + $body=str_replace("=\n","",$body); +// default: +// $body=str_replace("\n..\n","\n.\n",$body); + } + + return $body; +} + +/* + * makes URLs clickable + * + * $text: A text-line probably containing links. + * + * the function returns the text-line with HTML-Links to the links or + * email-adresses. + */ +function html_parse($text) { + global $frame_externallink; + if ((isset($frame_externallink)) && ($frame_externallink != "")) { + $target=' TARGET="'.$frame_externallink.'" '; + } else { + $target=' '; + } + // regular expressions that will be applied to every word in the text + $regexp_replace=array( + 'http://((\.*([-a-z0-9_/~@?=%#;+]|&)+)+)' => + 'http://\1', + '(www\.[-a-z]+\.(de|pl|cz|sk|tk|tv|cc|cx|biz|us|uk|info|int|eu|dk|org|net|at|ch|com))' => + '\1', + 'https://([-a-z0-9_./~@?=%#&;\n]+)' => + 'https://\1', + 'gopher://([-a-z0-9_./~@?=%\n]+)' => + 'gopher://\1', + 'news://([-a-z0-9_./~@?=%\n]+)' => + 'news://\1', + 'ftp://([-a-z0-9_./~@?=%\n]+)' => + 'ftp://\1', + //'([-a-z0-9_./n]+)@([-a-z0-9_.]+)' => + // $_SESSION["loggedin"]!==true ? '(e-Mail)' : + // '\1@\2' + ); + $ntext=""; + // split every line into it's words + $words=explode(" ",$text); + $n=count($words); + for($i=0; $i<$n; $i++) { + $word=$words[$i]; + // test, if we need the slow walk through all the regular expressions + if(preg_match('/www|\:|@/i',$word)) { + // apply the regular expressions to the word until a matching + // expression is found + foreach ($regexp_replace as $key => $value) { + $nword=preg_replace('/{$key}/i',$value,$word); + if($nword!=$word) { + $word=$nword; + break; + } + } + } + // add the spaces between the words + if($i>0) + $ntext.=" "; + $ntext.=$word; + } + return($ntext); +} + + +/* + * read the header of an article in plaintext into an array + * $articleNumber can be the number of an article or its message-id. + */ +function readPlainHeader(&$ns,$group,$articleNumber) { + fputs($ns,"GROUP $group\r\n"); + $line=line_read($ns); + fputs($ns,"HEAD $articleNumber\r\n"); + $line=line_read($ns); + if (substr($line,0,3) != "221") { + echo $text_error["article_not_found"]; + $header=false; + } else { + $line=line_read($ns); + $body=""; + while(strcmp(trim($line),".") != 0) { + $body .= $line."\n"; + $line=line_read($ns); + } + return explode("\n",str_replace("\r\n","\n",$body)); + } +} + +/* + * cancel an article on the newsserver + * + * DO NOT USE THIS FUNCTION, IF YOU DON'T KNOW WHAT YOU ARE DOING! + * + * $ns: The handler of the NNTP-Connection + * $group: The group of the article + * $id: the Number of the article inside the group or the message-id + */ +function message_cancel($subject,$from,$newsgroups,$ref,$body,$id) { + global $server,$port,$send_poster_host,$CONFIG,$text_error; + global $www_charset; + flush(); + $ns=nntp_open($server,$port); + if ($ns != false) { + fputs($ns,"POST\r\n"); + $weg=line_read($ns); + fputs($ns,'Subject: '.quoted_printable_encode($subject)."\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."\r\n"); + fputs($ns,"Content-Transfer-Encoding: 8bit\r\n"); + if ($send_poster_host) + fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n"); + if ($ref!=false) fputs($ns,'References: '.$ref."\r\n"); + if (isset($CONFIG['organization'])) + fputs($ns,'Organization: '.quoted_printable_encode($CONFIG['organization'])."\r\n"); + fputs($ns,"Control: cancel ".$id."\r\n"); + $body=str_replace("\n.\r","\n..\r",$body); + $body=str_replace("\r",'',$body); + $b=explode("\n",$body); + $body=""; + for ($i=0; $i") != false ) | (strcmp(substr($b[$i],0,1),">") == 0)) { + $body .= textwrap(stripSlashes($b[$i]),78,"\r\n")."\r\n"; + } else { + $body .= textwrap(stripSlashes($b[$i]),74,"\r\n")."\r\n"; + } + } + fputs($ns,"\r\n".$body."\r\n.\r\n"); + $message=line_read($ns); + nntp_close($ns); + } else { + $message=$text_error["post_failed"]; + } + return $message; +} +function rslight_encrypt($data, $key) { + $encryption_key = base64_decode($key); + $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); + $encrypted = openssl_encrypt($data, 'aes-256-cbc', $encryption_key, 0, $iv); + return base64_encode($encrypted . '::' . $iv); +} + +function _rawurlencode($string) { + $string = rawurlencode(str_replace('+','%2B',$string)); + return $string; +} + +function _rawurldecode($string) { + $string = rawurldecode(str_replace('%2B','+',$string)); + return $string; +} + +function rslight_decrypt($data, $key) { + $encryption_key = base64_decode($key); + list($encrypted_data, $iv) = explode('::', base64_decode($data), 2); + return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv); +} + +function group_display_name($gname) +{ + global $config_dir; + $namelist = file($config_dir."rename.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($namelist as $name) { + if($name[0] == '#') { + continue; + } + $nameitem = explode(':', $name); + if(!strcmp(trim($nameitem[0]),trim($gname))) { + return $nameitem[1]; + } + } + return $gname; +} +function check_bbs_auth($username, $password) { + global $config_dir,$CONFIG; + + $workpath = $config_dir."users/"; + $username = trim(strtolower($username)); + $userFilename = $workpath.$username; + $keyFilename = $config_dir."/userconfig/".$username; + +// Create accounts for $anonymous and $CONFIG['server_auth_user'] if not exist + if($username == strtolower($CONFIG['anonusername'])) { + if(filemtime($config_dir."rslight.inc.php") > filemtime($userFilename)) { + if ($userFileHandle = @fopen($userFilename, 'w+')) + { + fwrite($userFileHandle, password_hash($CONFIG['anonuserpass'], PASSWORD_DEFAULT)); + fclose($userFileHandle); + } + } + } + if($username == strtolower($CONFIG['server_auth_user'])) { + if(filemtime($config_dir."rslight.inc.php") > filemtime($userFilename)) { + if ($userFileHandle = @fopen($userFilename, 'w+')) + { + fwrite($userFileHandle, password_hash($CONFIG['server_auth_pass'], PASSWORD_DEFAULT)); + fclose($userFileHandle); + } + } + } + + if ($userFileHandle = @fopen($userFilename, 'r')) + { + $userFileInfo = fread($userFileHandle, filesize($userFilename)); + fclose($userFileHandle); + if (password_verify ( $password , $userFileInfo)) + { + touch($userFilename); + $ok = TRUE; + } else { + return FALSE; + } + } else { + $ok = FALSE; + } + if ($ok) + { + return TRUE; + } else { + if(isset($CONFIG['auto_create']) && $CONFIG['auto_create'] == true) { + if ($userFileHandle = @fopen($userFilename, 'w+')) { + fwrite($userFileHandle, password_hash($password, PASSWORD_DEFAULT)); + fclose($userFileHandle); + chmod($userFilename, 0666); + } + $newkey = base64_encode(openssl_random_pseudo_bytes(44)); + if ($userFileHandle = @fopen($keyFilename, 'w+')) { + fwrite($userFileHandle, 'encryptionkey:'.$newkey); + fclose($userFileHandle); + chmod($userFilename, 0666); + } + return TRUE; + } else { + return FALSE; + } + } +} +function check_encryption_groups($request) { + global $config_path; + $groupsFilename = $config_path."encryption_ok.txt"; + if ($groupsFileHandle = @fopen($groupsFilename, 'r')) + { + while (!feof($groupsFileHandle)) + { + $buffer = fgets($groupsFileHandle); + $buffer = str_replace(array("\r", "\n"), '',$buffer); + if(!strcmp($buffer, $request)) { + fclose($groupsFileHandle); + return TRUE; + } + } + fclose($userFileHandle); + } else { + return FALSE; + } +} + +function get_user_config($username,$request) { + global $config_dir; + $userconfigpath = $config_dir."userconfig/"; + $username = strtolower($username); + $userFilename = $userconfigpath.$username; + + if ($userFileHandle = @fopen($userFilename, 'r')) + { + while (!feof($userFileHandle)) + { + $buffer = fgets($userFileHandle); + if(strpos($buffer, $request.':') !== FALSE) { + $userdataline=$buffer; + fclose($userFileHandle); + $userdatafound = explode(':',$userdataline); + return $userdatafound[1]; + } + } + fclose($userFileHandle); + return FALSE; + } else { + return FALSE; + } +} + +function is_multibyte($s) { + return mb_strlen($s,'utf-8') < strlen($s); +} + +function check_spam($subject,$from,$newsgroups,$ref,$body,$msgid) +{ + global $msgid_generate,$msgid_fqdn; + global $CONFIG; + $spamfile = tempnam('./spool', 'spam-'); + + $tmpheader='From: '.$from."\r\n"; + if(strpos($from, $CONFIG['anonusername'])) { + $tmpheader.="Anonymous: TRUE\r\n"; + } + $tmpheader.='Message-ID: '.$msgid."\r\n"; + $tmpheader.='Subject: '.encode_subject($subject)."\r\n\r\n"; + if ($spamFileHandle = fopen($spamfile, 'w')) + { + fwrite($spamFileHandle, $tmpheader); + fwrite($spamFileHandle, $body); + $spamcommand = $CONFIG['spamc'].' -E < '.$spamfile; + ob_start(); + $spamresult = passthru($spamcommand, $res); + $spamresult = ob_get_contents(); + ob_end_clean(); + $spam_fail=1; + foreach (explode(PHP_EOL, $spamresult) as $line) { + $line = str_replace(array("\n\r", "\n", "\r"), '', $line); + if(strpos($line, 'X-Spam-Checker-Version:') !== FALSE) { + $spamcheckerversion = $line; + $spam_fail=0; + } + if(strpos($line, 'X-Spam-Level:') !== FALSE) { + $spamlevel = $line; + } + } + } + fclose($spamFileHandle); + unlink($spamfile); + return array( + 'res' => $res, + 'spamresult' => $spamresult, + 'spamcheckerversion' => $spamcheckerversion, + 'spamlevel' => $spamlevel, + 'spam_fail' => $spam_fail + ); +} + +function format_log_date() { + return date('M d H:i:s'); +} + +function create_name_link($name) { + global $CONFIG; + if(strpos($name, '...@') !== false && (isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true)) { + $return = ''.substr(htmlspecialchars($name),0,20).''; + } else { + $return = ''.substr(htmlspecialchars($name),0,20).''; + } + return($return); +} +function truncate_email($address) { + $before_at = explode('@', $address); + $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; + } + return substr($before_at[0], 0, $endname).'...'.substr($address, $namelen, strlen($address)); +} + +function get_date_interval($value) { + $current = time(); + $datetime1 = date_create($value); + $datetime2 = date_create("@$current"); + $interval = date_diff($datetime1, $datetime2); + $years = $interval->format('%y')." Years "; + $months = $interval->format('%m')." Months "; + $days = $interval->format('%d')." Days "; + $hours = $interval->format('%h')." Hours "; + $minutes = $interval->format('%i')." Minutes "; + if($interval->format('%y') == 1) { + $years = $interval->format('%y')." Year "; + } + if($interval->format('%m') == 1) { + $months = $interval->format('%m')." Month "; + } + if($interval->format('%d') == 1) { + $days = $interval->format('%d')." Day "; + } + if($interval->format('%h') == 1) { + $hours = $interval->format('%h')." Hour "; + } + if($interval->format('%i') == 1) { + $minutes = $interval->format('%i')." Minute "; + } + if($interval->format('%y') == 0) { + $years = ''; + } + if($interval->format('%m') == 0) { + $months = ''; + } + if($interval->format('%d') == 0) { + $days = ''; + } + if($interval->format('%h') == 0) { + $hours = ''; + } + if($interval->format('%i') == 0) { + $minutes = ''; + } + if($years > 0) { + $days = ''; + $hours = ''; + $minutes = ''; + } + if($months > 0) { + $hours = ''; + $minutes = ''; + } + if($days > 0) { + $minutes = ''; + } + $variance = $interval->format($years.$months.$days.$hours.$minutes.' ago'); + if(strlen($variance) < 5) { + $variance = " now"; + } + return $variance; +} +?> diff --git a/Rocksolid_Light/rocksolid/nntp.php b/Rocksolid_Light/rocksolid/nntp.php new file mode 100755 index 0000000..85d6b09 --- /dev/null +++ b/Rocksolid_Light/rocksolid/nntp.php @@ -0,0 +1,622 @@ +#!/usr/bin/php + + 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"; + } +} + ?> + diff --git a/Rocksolid_Light/rocksolid/overboard.php b/Rocksolid_Light/rocksolid/overboard.php new file mode 100755 index 0000000..bbce4df --- /dev/null +++ b/Rocksolid_Light/rocksolid/overboard.php @@ -0,0 +1,332 @@ + + + + + +'; + +$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 '

'; + echo ''.basename(getcwd()).' / '; + echo ''.htmlspecialchars(group_display_name($grouplist[0])).' / '; + echo ' latest

'; + echo ''; +// Refresh button + echo ''; +// Article List button + echo ''; +// Newsgroups button (hidden) + if(isset($frames_on) && $frames_on === true) { + echo ''; + } + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; +} else { + echo '

'; + echo ''.basename(getcwd()).' / '; + echo 'latest messages

'; + echo ''; +// Refresh button + echo ''; +// Newsgroups button (hidden) + if(isset($frames_on) && $frames_on === true) { + echo ''; + } + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; +} + +$results=0; +$files = array(); +foreach($articles as $article) { + if(is_dir($article)) { + continue; + } + $files[filemtime($article)] = $article; +} +krsort($files); +echo ''; +//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 ''; + if($results++ > ($maxdisplay - 2)) + break; +} +echo '
'; + } else { + echo '
'; + } + echo '

'; + echo ''.mb_decode_mimeheader($output[1])."\r\n"; + echo '

'; + echo ''.$groupname.''; + echo '

'; + + 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 '

Posted: '.$date_interval.' by: '.create_name_link($poster_name).'

'; +// echo '

Posted: '.$date_interval.' by: '.mb_decode_mimeheader($fromoutput[0]).'

'; + # 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."

\r\n"; + $displayresult = explode('<', $snippet); +// $echobody=quoted_printable_decode(mb_decode_mimeheader(highlightStr($displayresult[0], $terms))); + $echobody=$displayresult[0]; + echo "

".$echobody."

\r\n"; + echo '
'; +echo "

".$results." recent articles found.

\r\n"; +#echo "
Rocksolid Overboard version ".$version; +$iscached = "

cached copy: ".date("D M j G:i:s T Y", time())."

\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); +} +?> + + diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php new file mode 100644 index 0000000..52437eb --- /dev/null +++ b/Rocksolid_Light/rocksolid/post.php @@ -0,0 +1,400 @@ +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")) { +?> + +

+ +

+ + +

'.$text_post["button_back"].' ' + .$text_post["button_back2"].' '.group_display_name($returngroup[0]) ?>

+
$message
"; + } + } 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 '

'.$text_post["group_head"].group_display_name($newsgroups) + .$text_post["group_tail"].'

'; + + if (isset($error)) echo "

$error

"; ?> + +
+ +
+ + + + + + + + + + +
" value="" size="40" maxlength="80">
+ '; + if($CONFIG['anonuser']) + echo ' or "'.$CONFIG['anonusername'].'" with no password'; + } + ?> +
+ '; + ?> + + + +
+ + Encrypt to: +
+
+ +
+ + + + + +'; +} ?> + + +

+
+ + + + + + + + +"> +" onclick="quoten(); this.style.visibility= 'hidden';"> +  + + +
'; + echo captcha::form($text_post["captchainfo1"],$text_post["captchainfo2"]); + echo '
+
+ + + + + +
+ + + diff --git a/Rocksolid_Light/rocksolid/result.php b/Rocksolid_Light/rocksolid/result.php new file mode 100755 index 0000000..68dc436 --- /dev/null +++ b/Rocksolid_Light/rocksolid/result.php @@ -0,0 +1,213 @@ + + + + + +'.$grouplist[0].' (latest)'; + echo ''; +// Article List button + echo ''; +// Newsgroups button (hidden) + echo ''; + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; +} else { + echo '

'; + echo ''.basename(getcwd()).' / '; + echo 'search results for: '.$_GET['terms'].'

'; + echo ''; +// Newsgroups button (hidden) + echo ''; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; +} +echo ''; + +# 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 ''; + if($results++ > ($maxdisplay - 2)) + break; + } + fclose($overviewfp); + } +} + +echo '
'; + } else { + echo '
'; + } + echo '

'; + echo ''.mb_decode_mimeheader($article[1])."\r\n"; + echo '

'; + echo ''.$findgroup.''; + echo '

'; + echo '

Posted: '.$article[3].' by: '.mb_decode_mimeheader($fromoutput[0]).'

'; + echo '
'; +echo "

".$results." matching articles found.

\r\n"; +#echo "
Rocksolid Overboard 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, ''.$match.'', $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; +} + +?> + + diff --git a/Rocksolid_Light/rocksolid/search.php b/Rocksolid_Light/rocksolid/search.php new file mode 100644 index 0000000..e3465aa --- /dev/null +++ b/Rocksolid_Light/rocksolid/search.php @@ -0,0 +1,42 @@ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Search recent messages in
(searches last articles per group)
Search Terms:
SubjectPosterMessage-ID
  
+
+
+ + diff --git a/Rocksolid_Light/rocksolid/tail.inc b/Rocksolid_Light/rocksolid/tail.inc new file mode 100644 index 0000000..643bd24 --- /dev/null +++ b/Rocksolid_Light/rocksolid/tail.inc @@ -0,0 +1,10 @@ +
+ +rocksolid light 0.6.6 +
+clearnet +i2p +tor +
+
+ diff --git a/Rocksolid_Light/rocksolid/thread.php b/Rocksolid_Light/rocksolid/thread.php new file mode 100644 index 0000000..d025730 --- /dev/null +++ b/Rocksolid_Light/rocksolid/thread.php @@ -0,0 +1,130 @@ + + +'; + echo '

'; + + echo ''.basename(getcwd()).' / '; + echo htmlspecialchars(group_display_name($group)).'

'; + + echo ''; +// View Latest button + if (isset($overboard) && ($overboard == true)) { + echo ''; + } + if (!$CONFIG['readonly'] && + (!function_exists("npreg_group_has_write_access") || + npreg_group_has_write_access($group))) + { +// New Thread button + echo ''; + } +// Newsgroups button (hidden) + if(isset($frames_on) && $frames_on === true) { + echo ''; + } +// $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 ''; + } else { + $first=0; + $last=$article_count; + } + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo '
'; + echo ''; + echo '
'; + echo '
'; + // 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 '
'; + thread_show($headers,$group,$first,$last); + echo ''; + echo '
'; + thread_pageselect($group,$pagecount,$first); + echo '
'; + pclose($ovfile); +} else { + echo $text_register["no_access_group"]; +} +include "tail.inc"; +?> diff --git a/Rocksolid_Light/rslight/admin.inc.php b/Rocksolid_Light/rslight/admin.inc.php new file mode 100644 index 0000000..7f06450 --- /dev/null +++ b/Rocksolid_Light/rslight/admin.inc.php @@ -0,0 +1,5 @@ +'; + $admin['key'] = ''; +?> diff --git a/Rocksolid_Light/rslight/debian-install.sh b/Rocksolid_Light/rslight/debian-install.sh new file mode 100755 index 0000000..3870f3d --- /dev/null +++ b/Rocksolid_Light/rslight/debian-install.sh @@ -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||$spoolpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$configpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$username|" $configpath/rslight.inc.php +sed -i '' -e "s||$site_key|" $configpath/rslight.inc.php +sed -i '' -e "s||$anonymous_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$local_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$admin_password|" $configpath/admin.inc.php +sed -i '' -e "s||$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" diff --git a/Rocksolid_Light/rslight/freebsd-install.sh b/Rocksolid_Light/rslight/freebsd-install.sh new file mode 100755 index 0000000..3c0f96e --- /dev/null +++ b/Rocksolid_Light/rslight/freebsd-install.sh @@ -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||$spoolpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$configpath/|" $webroot/common/config.inc.php +sed -i '' -e "s||$username|" $configpath/rslight.inc.php +sed -i '' -e "s||$site_key|" $configpath/rslight.inc.php +sed -i '' -e "s||$anonymous_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$local_password|" $configpath/rslight.inc.php +sed -i '' -e "s||$admin_password|" $configpath/admin.inc.php +sed -i '' -e "s||$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" diff --git a/Rocksolid_Light/rslight/links.conf b/Rocksolid_Light/rslight/links.conf new file mode 100644 index 0000000..fa69a85 --- /dev/null +++ b/Rocksolid_Light/rslight/links.conf @@ -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 diff --git a/Rocksolid_Light/rslight/menu.conf b/Rocksolid_Light/rslight/menu.conf new file mode 100644 index 0000000..3cdccad --- /dev/null +++ b/Rocksolid_Light/rslight/menu.conf @@ -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 diff --git a/Rocksolid_Light/rslight/phpmailer.inc.php b/Rocksolid_Light/rslight/phpmailer.inc.php new file mode 100644 index 0000000..03b0fca --- /dev/null +++ b/Rocksolid_Light/rslight/phpmailer.inc.php @@ -0,0 +1,29 @@ + diff --git a/Rocksolid_Light/rslight/rename.conf b/Rocksolid_Light/rslight/rename.conf new file mode 100644 index 0000000..7d2541d --- /dev/null +++ b/Rocksolid_Light/rslight/rename.conf @@ -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 + diff --git a/Rocksolid_Light/rslight/rocksolid/encryption_ok.txt b/Rocksolid_Light/rslight/rocksolid/encryption_ok.txt new file mode 100644 index 0000000..95208ee --- /dev/null +++ b/Rocksolid_Light/rslight/rocksolid/encryption_ok.txt @@ -0,0 +1,2 @@ +rocksolid.shared.encryption +rocksolid.shared.test diff --git a/Rocksolid_Light/rslight/rocksolid/groups.txt b/Rocksolid_Light/rslight/rocksolid/groups.txt new file mode 100644 index 0000000..af1da42 --- /dev/null +++ b/Rocksolid_Light/rslight/rocksolid/groups.txt @@ -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. diff --git a/Rocksolid_Light/rslight/rslight.inc.php b/Rocksolid_Light/rslight/rslight.inc.php new file mode 100644 index 0000000..8bcc112 --- /dev/null +++ b/Rocksolid_Light/rslight/rslight.inc.php @@ -0,0 +1,45 @@ + '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' => '', + 'rslight_title' => 'New Rocksolid Light Install', + 'title_full' => 'rslight', + 'hide_email' => '1', + 'email_tail' => '@example.com', + 'anonusername' => 'anonymous', + 'anonuserpass' => '', + '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' => '', + 'enable_nocem' => '1', + 'nocem_groups' => 'rocksolid.spam', + 'expire_days' => '0', + 'pathhost' => 'unconfigured', + 'thissitekey' => '' +]; +?> diff --git a/Rocksolid_Light/rslight/scripts/cron.php b/Rocksolid_Light/rslight/scripts/cron.php new file mode 100755 index 0000000..d7e0536 --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/cron.php @@ -0,0 +1,107 @@ + /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; + } + } +?> diff --git a/Rocksolid_Light/rslight/scripts/expire.php b/Rocksolid_Light/rslight/scripts/expire.php new file mode 100755 index 0000000..e0b3f55 --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/expire.php @@ -0,0 +1,75 @@ + diff --git a/Rocksolid_Light/rslight/scripts/nntp-ssl.php b/Rocksolid_Light/rslight/scripts/nntp-ssl.php new file mode 100755 index 0000000..ca01a45 --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/nntp-ssl.php @@ -0,0 +1,190 @@ + 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); +} +?> diff --git a/Rocksolid_Light/rslight/scripts/nntp.php b/Rocksolid_Light/rslight/scripts/nntp.php new file mode 100755 index 0000000..a5a92b1 --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/nntp.php @@ -0,0 +1,151 @@ + 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); + } + } +?> diff --git a/Rocksolid_Light/rslight/scripts/nocem.php b/Rocksolid_Light/rslight/scripts/nocem.php new file mode 100755 index 0000000..94fc838 --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/nocem.php @@ -0,0 +1,108 @@ + diff --git a/Rocksolid_Light/rslight/scripts/rslight-lib.php b/Rocksolid_Light/rslight/scripts/rslight-lib.php new file mode 100755 index 0000000..4285c2b --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/rslight-lib.php @@ -0,0 +1,1049 @@ + 0) { + $is_header=0; + $lines++; + } + if($is_header == 0) { + $body.=$line."\n"; + } else { + if(stripos($line, "Date: ") === 0) { + $finddate=explode(': ', $line); + $article_date = strtotime($finddate[1]); + $no_date=0; + } + if(stripos($line, "Organization: ") !== false) { + $no_org=0; + } + if(stripos($line, "Subject: ") !== false) { + $subject=explode('Subject: ', $line, 2); + $ref=0; + } + if(stripos($line, "From: ") === 0) { + $from=explode(': ', $line); + $ref=0; + } + if(stripos($line, "Xref: ") === 0) { + $xref=$line; + $ref=0; + } + if(stripos($line, "Newsgroups: ") === 0) { + $ngroups=explode(': ', $line); + $newsgroups=$ngroups[1]; + $ref=0; + } + if(stripos($line, "References: ") === 0) { + $references_line=explode(': ', $line); + $references=$references_line[1]; + $ref=1; + } + if((stripos($line, ':') === false) && (strpos($line, '>'))) { + if($ref == 1) { + $references=$references." ".trim($line); + } + } + if(stripos($line, "Message-ID: ") !== false) { + $mid=explode(': ', $line); + $no_mid=0; + } + } + } + rewind($message); +/* Find section for posting */ + $menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($menulist as $menu) { + if($menu[0] == '#') { + continue; + } + $menuitem=explode(':', $menu); + $glfp=fopen($config_dir.$menuitem[0]."/groups.txt", 'r'); + $section=""; + while($gl=fgets($glfp)) { + $group_name = preg_split("/( |\t)/", $gl, 2); + if(stripos(trim($newsgroups), trim($group_name[0])) !== false) { + $section=$menuitem[0]; + break 2; + } + } + } + fclose($glfp); + @mkdir($spooldir."/".$section."/outgoing",0755,'recursive'); + $postfilename = tempnam($spooldir.'/'.$section.'/outgoing', ''); + $postfilehandle = fopen($postfilename, 'wb'); + if($no_date == 1) { + $article_date=time(); + $date_rep = date('D, j M Y H:i:s O', $article_date); + fputs($postfilehandle, "Date: ".$date_rep."\r\n"); + } else { + $date_rep = $finddate[1]; + } + if($no_mid == 1) { + $identity = $subject[1].",".$from[1].",".$newsgroups[1].",".$references.",".$body; + $msgid='<'.md5($identity).'$1@'.trim($CONFIG['email_tail'],'@').'>'; + fputs($postfilehandle, "Message-ID: ".$msgid."\r\n"); + } else { + $msgid = $mid[1]; + } + if($no_org == 1) { + fputs($postfilehandle, "Organization: ".$CONFIG['organization']."\r\n"); + } + foreach($message as $line) { + if(stripos($line, "Newsgroups: ") === 0) { + fputs($postfilehandle, "Newsgroups: ".$newsgroups."\r\n"); + } else { + fputs($postfilehandle, $line."\r\n"); + } + } + fclose($postfilehandle); + unlink($filename); + if($section == "") { + $response="441 Posting failed (group not found)\r\n"; + } else { + if($response == "") { + $post_group=explode(' ', str_replace(',', ' ', $newsgroups)); + + foreach($post_group as $onegroup) { +// Check for duplicate msgid + $duplicate=0; + $group_overviewfp=fopen($spooldir."/".$onegroup."-overview", 'r'); + while($group_overview=fgets($group_overviewfp, 2048)) { + $overview_msgid = explode("\t", $group_overview); + if(strpos($overview_msgid[4], $msgid) !== false) { + unlink($postfilename); + file_put_contents($logfile, "\n".format_log_date()." ".$section." Duplicate Message-ID for: ".$msgid, FILE_APPEND); + $duplicate=1; + break; + } + } + fclose($group_overviewfp); + } + if($duplicate == 0) { + insert_article($section,$onegroup,$postfilename,$subject[1],$from[1],$article_date,$date_rep,$msgid,$references,$bytes,$lines,$xref); + $response="240 Article received OK\r\n"; + } else { + $response="441 Posting failed\r\n"; + } + } + } + return $response; +} + +function get_xhdr($header, $articles) { + global $config_dir,$spooldir,$nntp_group,$workpath,$path; +// By Message-ID + $tmpgroup=$nntp_group; + $mid=false; + if(!is_numeric($articles)) { + $menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($menulist as $menu) { + if(($menu[0] == '#') || (trim($menu) == "")) { + continue; + } + $name=explode(":", $menu); + $overviewdata = file($spooldir."/".$name[0]."-overview", FILE_IGNORE_NEW_LINES); + foreach($overviewdata as $overviewline) { + $articledata = preg_split("/(:#rsl#:|\t)/", $overviewline); + if(!strcasecmp($articledata[2], $articles)) { + $tmpgroup=$articledata[0]; + $mid=$articles; + $articles=$articledata[1]; + break; + } + } + } + } else { + if($nntp_group == '') { + $msg="412 no newsgroup selected\r\n"; + return $msg; + } + } + $thisgroup = $path."/".preg_replace('/\./', '/', $tmpgroup); + $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, "-")) { + $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="221 Header information for ".$header." follows (from articles)\r\n"; + for($i=$first; $i<=$last; $i++) { + $article_full_path=$thisgroup.'/'.strval($i); + if(!is_file($article_full_path)) { + continue; + } + $data=extract_header_line($article_full_path, $header); + if($data !== false) { + if($mid !== false) { + $msg.=$mid." ".$data; + } else { + $msg.=strval($i)." ".$data; + } + } + } + $msg.=".\r\n"; + return $msg; +} + +function extract_header_line($article_full_path, $header) { + $thisarticle=file($article_full_path, FILE_IGNORE_NEW_LINES); + foreach($thisarticle as $thisline) { + if($thisline == "") { + $msg2.=".\r\n"; + break; + } + if(stripos($thisline, $header) === 0) { + $content=preg_split("/$header: /i", $thisline); + return($content[1]."\r\n"); + } + } + return(false); +} + +function get_title($mode) { + global $nntp_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", IGNORE_NEW_LINES); + $msg="282 list of group and description follows\r\n"; + $msg.=$title; + + $msg.=".\r\n"; + return $msg; +} + +function get_xover($articles, $msgsock) { + global $nntp_group,$workpath,$path; + if($nntp_group == '') { + $msg="412 no newsgroup selected\r\n"; + return $msg; + } + $overviewfile=$workpath.$nntp_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('/\./', '/', $nntp_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; + } + } + $output="224 Overview information follows for articles ".$first." through ".$last."\r\n"; + fwrite($msgsock, $output, strlen($output)); + $overviewfp=fopen($overviewfile, 'r'); + while($overviewline=fgets($overviewfp)) { + $article=preg_split("/[\s,]+/", $overviewline); + for($i=$first; $i<=$last; $i++) { + if($article[0] === strval($i)) { + fwrite($msgsock, $overviewline."\r\n", strlen($overviewline)); + } + } + } + fclose($overviewfp); + $msg.=".\r\n"; + return $msg; +} + +function get_stat($article) { + global $nntp_group,$workpath,$path; + if($nntp_group == '') { + $msg="412 Not in a newsgroup\r\n"; + return $msg; + } + if(!is_numeric($article)) { + $msg="423 No article number selected\r\n"; + return $msg; + } + $overviewfile=$workpath.$nntp_group."-overview"; + $thisgroup = $path."/".preg_replace('/\./', '/', $nntp_group); + if(!file_exists($thisgroup."/".$article)) { + $msg="423 No such article number ".$article."\r\n"; + return $msg; + } + $overviewfp=fopen($overviewfile, 'r'); + while($overviewline=fgets($overviewfp)) { + $over=explode("\t", $overviewline); + if(trim($over[0]) == trim($article)) { + $msg="223 ".$article." ".$over[4]." status\r\n"; + fclose(overviewfp); + return $msg; + } + } + fclose($overviewfp); + $msg="423 No such article number ".$article."\r\n"; + return $msg; +} + +function get_article($article, $nntp_group) { + global $config_dir,$path,$groupconfig,$config_name,$spooldir; + $msg2=""; +// By Message-ID + if(!is_numeric($article)) { + $menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($menulist as $menu) { + if(($menu[0] == '#') || (trim($menu) == "")) { + continue; + } + $name=explode(":", $menu); + $overviewdata = file($spooldir."/".$name[0]."-overview", FILE_IGNORE_NEW_LINES); + foreach($overviewdata as $overviewline) { +// Remove :#rsl#: in 0.6.6 and only use tab + $articledata = preg_split("/(:#rsl#:|\t)/", $overviewline); + if(!strcasecmp($articledata[2], $article)) { + $nntp_group=$articledata[0]; + $article=$articledata[1]; + break; + } + } + } + } else { +// By article number + if($nntp_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('/\./', '/', $nntp_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, $nntp_group) { + global $config_dir,$path,$groupconfig,$config_name,$spooldir; + $msg2=""; +// By Message-ID + if(!is_numeric($article)) { + $menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($menulist as $menu) { + if(($menu[0] == '#') || (trim($menu) == "")) { + continue; + } + $name=explode(":", $menu); + $overviewdata = file($spooldir."/".$name[0]."-overview", FILE_IGNORE_NEW_LINES); + foreach($overviewdata as $overviewline) { +// Remove :#rsl#: in 0.6.6 and only use tab + $articledata = preg_split("/(:#rsl#:|\t)/", $overviewline); + if(!strcasecmp($articledata[2], $article)) { + $nntp_group=$articledata[0]; + $article=$articledata[1]; + break; + } + } + } + } else { +// By article number + if($nntp_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('/\./', '/', $nntp_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_body($article, $nntp_group) { + global $config_dir,$path,$groupconfig,$config_name,$spooldir; + $msg2=""; +// By Message-ID + if(!is_numeric($article)) { + $menulist = file($config_dir."menu.conf", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($menulist as $menu) { + if(($menu[0] == '#') || (trim($menu) == "")) { + continue; + } + $name=explode(":", $menu); + $overviewdata = file($spooldir."/".$name[0]."-overview", FILE_IGNORE_NEW_LINES); + foreach($overviewdata as $overviewline) { +// Remove :#rsl#: in 0.6.6 and only use tab + $articledata = preg_split("/(:#rsl#:|\t)/", $overviewline); + if(!strcasecmp($articledata[2], $article)) { + $nntp_group=$articledata[0]; + $article=$articledata[1]; + break; + } + } + } + } else { +// By article number + if($nntp_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('/\./', '/', $nntp_group); + if(!file_exists($thisgroup."/".$article)) { + $msg.="430 no such article found\r\n"; + return $msg; + } + $thisarticle=file($thisgroup."/".$article, FILE_IGNORE_NEW_LINES); + $body=0; + foreach($thisarticle as $thisline) { + if(($thisline == "") && ($body == 0)) { + $body=1; + continue; + } + if((strpos($thisline, "Message-ID: ") === 0) && !isset($mid[1])) { + $mid=explode(': ', $thisline); + } + if($body == 1) { + $msg2.=$thisline."\r\n"; + } + } + $msg="222 ".$article." ".$mid[1]." article retrieved - body follows\r\n"; + return $msg.$msg2; +} + +function get_listgroup($nntp_group, $msgsock) { + global $path,$nntp_group,$groupconfig; + $grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + $ok_group=false; + $count=0; + foreach($grouplist as $findgroup) { + $name = preg_split("/( |\t)/", $findgroup, 2); + $name[0]=strtolower($name[0]); + $nntp_group=strtolower($nntp_group); + if(!strcmp($name[0], $nntp_group)) { + $ok_group=true; + break; + } + } + $thisgroup = $path."/".preg_replace('/\./', '/', $nntp_group); + if(!is_dir($thisgroup) || $ok_group === false) { + $msg.="411 no such news group\r\n"; + $nntp_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; + $output="211 ".$count." ".$first." ".$last." ".$nntp_group."\r\n"; + fwrite($msgsock, $output, strlen($output)); + foreach($ok_article as $art) { + $output=$art."\r\n"; + fwrite($msgsock, $output, strlen($output)); + } + $msg=".\r\n"; + return $msg; +} + +function get_group($nntp_group) { + global $path,$nntp_group,$groupconfig; + $grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + $ok_group=false; + $count=0; + foreach($grouplist as $findgroup) { + $name = preg_split("/( |\t)/", $findgroup, 2); + $name[0]=strtolower($name[0]); + $nntp_group=strtolower($nntp_group); + if(!strcmp($name[0], $nntp_group)) { + $ok_group=true; + break; + } + } + $thisgroup = $path."/".preg_replace('/\./', '/', $nntp_group); + if(!is_dir($thisgroup) || $ok_group === false) { + $msg.="411 no such news group\r\n"; + $nntp_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." ".$nntp_group."\r\n"; + return $msg; +} + +function get_newgroups($mode) { + global $path,$groupconfig; + $grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + $mode = strtolower($mode); + $mode = "active"; + if($mode == "active") { + $msg = '231 list of newsgroups follows'."\r\n"; + foreach($grouplist as $findgroup) { + $name = preg_split("/( |\t)/", $findgroup, 2); + 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,$spooldir,$groupconfig; + $grouplist = file($groupconfig, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + $mode = strtolower($mode); + if($mode == "active") { + $msg = '215 list of newsgroups follows'."\r\n"; + foreach($grouplist as $findgroup) { + $name = preg_split("/( |\t)/", $findgroup, 2); + 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." y\r\n"; + } + } + if($mode == "newsgroups") { + $msg = '215 list of newsgroups and descriptions follows'."\r\n"; + foreach($grouplist as $findgroup) { + if($findgroup[0] === ':') + continue; + $name = preg_split("/( |\t)/", $findgroup, 2); + if(trim($name[1]) !== "") { + $msg.=$findgroup."\r\n"; + } elseif(file_exists($spooldir."/".$name[0]."-title")) { + $msg.=file_get_contents($spooldir."/".$name[0]."-title", IGNORE_NEW_LINES); + } else { + $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 encode_subject($line) { + $newstring=mb_encode_mimeheader(quoted_printable_decode($line)); + return $newstring; +} + +function insert_article($section,$nntp_group,$filename,$subject_i,$from_i,$article_date, +$date_i,$mid_i,$references_i,$bytes_i,$lines_i,$xref_i) { + global $enable_rslight,$spooldir,$CONFIG,$logdir,$logfile; + + $sn_lockfile = sys_get_temp_dir() . '/'.$section.'-spoolnews.lock'; + $sn_pid = file_get_contents($sn_lockfile); + if (posix_getsid($sn_pid) === false || !is_file($sn_lockfile)) { + file_put_contents($sn_lockfile, getmypid()); // create lockfile +} else { + file_put_contents($logfile, "\n".format_log_date()." ".$section." Queuing local post: ".$nntp_group, FILE_APPEND); + return(1); +} + $local_groupfile=$spooldir."/".$section."/local_groups.txt"; + $path=$spooldir."/articles/"; + $grouppath = $path.preg_replace('/\./', '/', $nntp_group); + $nocem_check="@@NCM"; + $article_date=strtotime($date_i); + # Check if group exists. Open it if it does + fputs($ns, "group ".$nntp_group."\r\n"); + $response = line_read($ns); + if (strcmp(substr($response,0,3),"411") == 0) { + unlink($sn_lockfile); + return(1); + } + $grouplist = file($local_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach($grouplist as $findgroup) { + $name = explode(':', $findgroup); + if (strcmp($name[0], $nntp_group) == 0) { + if (is_numeric($name[1])) + $local = $name[1]; + else { + $thisgroup = $grouppath; + $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; + if($article_date > time()) + $article_date = time(); + $in_file=fopen($filename, 'r'); + while(is_file($grouppath."/".$local)) { + $local++; + } + $out_file=fopen($grouppath."/".$local, 'w+'); + $header=1; + while($buf=fgets($in_file)) { + if((trim($buf) == "") && ($header == 1)) { + $buf="Xref: ".$CONFIG['pathhost']." ".$nntp_group.":".$local; + fputs($out_file, rtrim($buf, "\n\r").PHP_EOL); + $xref_i=$buf; + $buf=""; + $header=0; + } + fputs($out_file, rtrim($buf, "\n\r").PHP_EOL); + } + fputs($out_file, "\n.\n"); + fclose($out_file); + fclose($in_file); + touch($grouppath."/".$local, $article_date); + file_put_contents($logfile, "\n".format_log_date()." ".$section." Inserting local post: ".$nntp_group.":".$local, FILE_APPEND); +// Overview + $overviewHandle = fopen($spooldir."/".$nntp_group."-overview", 'a'); + fputs($overviewHandle, $local."\t".$subject_i."\t".$from_i."\t".$date_i."\t".$mid_i."\t".$references_i."\t".$bytes_i."\t".$lines_i."\t".$xref_i."\n"); + fclose($overviewHandle); + $references=""; +// overview for search (eventually this will not be used) + $overview_file=$spooldir."/".$section."-overview"; + file_put_contents($overview_file, +$nntp_group."\t".$local."\t".$mid_i."\t".$article_date."\t".$from_i +."\t".$subject_i."\n", FILE_APPEND); +// End Overview + reset($grouplist); + $saveconfig = fopen($local_groupfile, 'w+'); + $local++; + foreach($grouplist as $savegroup) { + $name = explode(':', $savegroup); + if (strcmp($name[0], $nntp_group) == 0) { + fwrite($saveconfig, $nntp_group.":".$local."\n"); + } else { + fwrite($saveconfig, $savegroup."\n"); + } + } + fclose($saveconfig); + unlink($sn_lockfile); +} + +function nntp2_open($nserver=0,$nport=0) { + global $text_error,$CONFIG,$logfile; + // echo "
NNTP OPEN
"; + $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); + } + $weg=line_read($ns); // kill the first line + if (substr($weg,0,2) != "20") { + fclose($ns); + $ns=false; + file_put_contents($logfile, "\n".format_log_date()." Failed to connect to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND); + } else { + file_put_contents($logfile, "\n".format_log_date()." Connected to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND); + 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)))) { + 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); + } + } + return $ns; +} +?> diff --git a/Rocksolid_Light/rslight/scripts/send.php b/Rocksolid_Light/rslight/scripts/send.php new file mode 100755 index 0000000..f08488e --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/send.php @@ -0,0 +1,140 @@ +NNTP OPEN
"; + $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 "

".$text_error["error:"].$weg."

"; + 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 "

".$text_error["error:"].$weg."

"; + 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 "

".$text_error["error:"]."

"; + echo "

".$text_error["auth_error"]."

"; + } + } + } + if ($ns==false) echo "

".$text_error["connection_failed"]."

"; + return $ns; +} +?> diff --git a/Rocksolid_Light/rslight/scripts/setup.inc.php b/Rocksolid_Light/rslight/scripts/setup.inc.php new file mode 100644 index 0000000..1467ffa --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/setup.inc.php @@ -0,0 +1,43 @@ + + + + +'; +} else { + echo ''; +} +?> + + +'; +echo '
'; +$pass = 'pass'; +foreach($CONFIG as $key=>$item) { + if($key == 'configure') { + continue; + } + $guide=$configdata[$key]; + echo ''.$guide.':  '; + if(strpos($key, $pass)) { + echo '
'; + } else { + echo '
'; + } + echo ''; +} +echo ''; +echo ''; +echo ''; +echo '
'; +?> diff --git a/Rocksolid_Light/rslight/scripts/setup.php b/Rocksolid_Light/rslight/scripts/setup.php new file mode 100644 index 0000000..ab4f6de --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/setup.php @@ -0,0 +1,62 @@ + + + + +'; +} else { + echo ''; +} +?> + + + $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 '
'; + echo 'New Configuration settings saved in '.$configfile.'
'; + echo 'Home'; + echo '
'; + $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 '
'; + echo '

Password Incorrect

'; + echo 'Retry Home'; + echo '
'; + exit(0); + } + echo '

'; + echo '

'; + echo 'Enter password to access configuration: '; + echo '

'; + echo '
'; + } +?> diff --git a/Rocksolid_Light/rslight/scripts/setuphelper.php b/Rocksolid_Light/rslight/scripts/setuphelper.php new file mode 100644 index 0000000..55e226a --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/setuphelper.php @@ -0,0 +1,63 @@ + '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' +]; +?> diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php new file mode 100755 index 0000000..87bc017 --- /dev/null +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -0,0 +1,452 @@ + ($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 "
NNTP OPEN
"; + $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 "

".$text_error["error:"].$weg."

"; + 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 "

".$text_error["error:"].$weg."

"; + 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 "

".$text_error["error:"]."

"; + echo "

".$text_error["auth_error"]."

"; + } + } + } + if ($ns==false) echo "

".$text_error["connection_failed"]."

"; + return $ns; +} +?> diff --git a/Rocksolid_Light/rslight/spoolnews/groups.txt b/Rocksolid_Light/rslight/spoolnews/groups.txt new file mode 100644 index 0000000..d1a2ac0 --- /dev/null +++ b/Rocksolid_Light/rslight/spoolnews/groups.txt @@ -0,0 +1 @@ +rocksolid.spam diff --git a/Rocksolid_Light/rslight/spoolnews/groups.txt.dist b/Rocksolid_Light/rslight/spoolnews/groups.txt.dist new file mode 100644 index 0000000..d1a2ac0 --- /dev/null +++ b/Rocksolid_Light/rslight/spoolnews/groups.txt.dist @@ -0,0 +1 @@ +rocksolid.spam diff --git a/Rocksolid_Light/spoolnews/config.inc.php b/Rocksolid_Light/spoolnews/config.inc.php new file mode 120000 index 0000000..0ca6782 --- /dev/null +++ b/Rocksolid_Light/spoolnews/config.inc.php @@ -0,0 +1 @@ +../rocksolid/config.inc.php \ No newline at end of file diff --git a/Rocksolid_Light/spoolnews/newsportal.php b/Rocksolid_Light/spoolnews/newsportal.php new file mode 120000 index 0000000..23e615e --- /dev/null +++ b/Rocksolid_Light/spoolnews/newsportal.php @@ -0,0 +1 @@ +../rocksolid/newsportal.php \ No newline at end of file