exported from svn

This commit is contained in:
Jeena 2013-10-07 14:46:08 +02:00
commit 03995d3bc6
85 changed files with 14765 additions and 0 deletions

24
.htaccess Normal file
View file

@ -0,0 +1,24 @@
<IfModule mod_rewrite.c>
RewriteEngine On
# catches all cathegories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^cat/([a-z0-9_\-\.,]+)/?([0-9]{0,4})/?$" archive.php?cat=$1&y=$2 [QSA]
# catches all archive links, month and year
RewriteRule "^archive$" archive.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^([0-9]{4})/?([0-9]{0,2})/?$" archive.php?y=$1&m=$2 [QSA]
# cathes all permalinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^([0-9]{4})/?([0-9]{2})/?([a-z0-9_\-\./,]+)$" log.php?y=$1&m=$2&url=$3 [QSA]
# catches all pages
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^([a-z0-9_\-\./,]+)$" page.php?url=$1 [QSA]
</IfModule>

340
LICENSE.txt Normal file
View file

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

41
README.txt Normal file
View file

@ -0,0 +1,41 @@
### Weblogsystem Jlog
### Programmiert von Jeena Paradies, Dennis Riehle, Robert Bienert
### Mailingliste: <jlog@googlegroups.com>
### Projektseite: <http://jeenaparadies.net/projects/jlog/>
### Hilfe zur Installation:
### <http://jeenaparadies.net/projects/jlog/wiki/installation/basic-1.0>
Dieses Programm steht unter der GPL. Eine Kopie der Lizenz habe ich als
Textdatei (Englisch LICENSE.txt) dem Paket beigefügt.
Wir sehen es sehr gerne wenn sich Leute im Rahmen ihrer Möglichkeiten am
Projekt beteiligen. Insbesondere durch:
1) Rückmeldungen über Fehler in der Software
2) Mitarbeit an der Software selbst, Plugins oder Programmiertips
3) Mitarbeit an der Dokumentation (siehe Wiki)
### Dankeschön an andere Programmierer
Dieses Programm nutzt zum Auszeichnen der vom Benutzer eingegebenen
Daten die BBCode-Parserklasse für PHP
<http://www.christian-seiler.de/projekte/php/bbcode/> von Christian Seiler,
welche auch unter der GPL steht.
Die Komunikation über XML-RPC übernimmt die IXR-Library
<http://scripts.incutio.com/xmlrpc/> Sie steht zwar unter der Artistic
Licence, aber ich bekam vom Autor persönlich die Erlaubnis sie zu nutzen,
danke an dieser Stelle noch einmal an Simon Willison: »You have my
permission to use IXR in your software, re-licensing it if necessary. Thanks
for asking, and sorry the original license didn't work for you. I'll
consider changing the license to something more compatible (BSD probably)
in the future. Cheers, Simon«
Um über HTTP Dateien zu holen wird HTTP_Request von PEAR mit allen
Abhängigkeiten verwendet zu finden unter:
<http://pear.php.net/package/HTTP_Request>
Außerdem nutzt es in veränderter Form das Sessionbasierte Loginsystem
von Benjamin Wilfing, erhältlich unter:
<http://aktuell.de.selfhtml.org/tippstricks/php/loginsystem/>

13
admin/auth.php Normal file
View file

@ -0,0 +1,13 @@
<?php
ini_set("session.use_trans_sid", false);
session_start();
$hostname = $_SERVER['HTTP_HOST'];
$path = dirname($_SERVER['SCRIPT_NAME']);
if (!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']) {
header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/login.php?url='.urlencode($_SERVER["REQUEST_URI"]));
exit;
}
// eof

355
admin/blog.func.php Normal file
View file

@ -0,0 +1,355 @@
<?php
// Untersuchen ob alles eingegeben wurde
function check_input($form_input) {
global $l;
if(strlen(trim($form_input['topic'])) < 1) $errors[] = $l['admin']['no_headline'];
// checking URL
if(strlen(trim($form_input['url'])) < 1) $errors[] = $l['admin']['no_url'];
elseif(!preg_match("/^[a-z0-9\-_\.\/,]+$/", $form_input['url'])) $errors[] = $l['admin']['false_url_letters'];
else {
$f = escape_for_mysql($form_input);
if(empty($f['date'])) $f['date'] = strftime("%Y-%m-%d %H:%M:%S");
list($date, $time) = explode(" ", $form_input["date"]);
list($year, $month, $day) = explode("-", $date);
list($hour, $minute, $second) = explode(":", $time);
# TODO: (jeena) diese Abfrage scheint noch falsch zu sein
/*
if(
!checkdate((int)$month, (int)$day, (int)$year) OR
$hour < 0 OR $hour > 23 OR
$minute < 0 OR $minute > 59 OR
$second < 0 OR $second > 59
) $errors[] = $l['admin']['false_date'];
*/
if($form_input['section'] == 'page') {
$sql = "SELECT id FROM ".JLOG_DB_CONTENT." WHERE url = '".$f['url']."';";
}
else {
$sql = "SELECT id FROM ".JLOG_DB_CONTENT." WHERE
YEAR(date) = ".date("Y", $f['date'])." AND
MONTH(date) = ".date("m", $f['date'])." AND
url = '".$f['url']."';";
}
$check_url = new Query($sql);
if($check_url->error()) {
echo "<pre>\n";
echo $check_url->getError();
echo "</pre>\n";
die();
}
if($check_url->numRows() > 0) {
$c = $check_url->fetch();
if($c['id'] != $form_input['id'] AND $form_input['section'] != 'page') $errors[] = $l['admin']['url_duplicate'];
elseif($c['id'] != $form_input['id'] AND $form_input['section'] == 'page') $errors[] = $l['admin']['url_duplicate_page'];
}
}
if(strlen(trim($form_input['teaserpic']) > 0) AND !is_file(JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR."t_".$form_input['teaserpic'])) {
$errors[] = $l['admin']['false_teaserpic'];
}
if($form_input['teaserpiconblog'] == "1" AND strlen(trim($form_input['teaserpic'])) == 0) $errors[] = $l['admin']['no_teaserpic_uploaded'];
if(strlen(trim($form_input['teaser'])) < 1) $errors[] = $l['admin']['no_teaser'];
if(strlen(trim($form_input['content'])) < 1) $errors[] = $l['admin']['no_content'];
return $errors;
}
// Eingabeformular
function form_output($form_input) {
$form_input = array_htmlspecialchars($form_input);
global $l, $categories, $plugins;
if($form_input['teaserpiconblog'] == 1) $form_input['teaserpiconblog_check'] = "checked='checked'";
if($form_input['section'] == 'page') $page = " checked='checked'";
else $weblog = " checked='checked'";
if($form_input['allowcomments'] === '0') $form_input['comments_check'] = "checked='checked'";
if($form_input['allowpingback'] === '0') $form_input['pingback_check'] = "checked='checked'";
$o = "
<form method='post' id='entryform' action='".$_SERVER['SCRIPT_NAME']."' accept-charset='UTF-8'>
<fieldset><legend>".$l['admin']['metadata']."</legend>
<p><label>".$l['admin']['section']."</label><br />
<input id='weblog' name='section' type='radio' value='weblog'".$weblog." /><label for='weblog' class='nobreak'>".$l['admin']['section_weblog']."</label>&nbsp;
<input id='page' name='section' type='radio' value='page'".$page." /><label for='page' class='nobreak'>".$l['admin']['section_page']."</label></p>
<p><label for='topic'>".$l['admin']['headline']."</label><br />
<input id='topic' name='topic' class='long' type='text' maxlength='255' size='60' value='".$form_input['topic']."' /></p>
<p><label for='url'>".$l['admin']['url']."</label><br />
<input id='url' name='url' class='long' type='text' maxlength='200' size='60' value='".$form_input['url']."' /></p>
<p><label for='teaser'>".$l['admin']['teaser']."</label><br />
<textarea id='teaser' name='teaser' class='small' rows='2' cols='60' >".$form_input['teaser']."</textarea></p>
<p><label for='keywords'>".$l['admin']['keywords']."</label><br />
<input id='keywords' name='keywords' class='long' type='text' maxlength='255' size='60' value='".$form_input['keywords']."' /></p>
".$categories->output_select($form_input['categories'])."
<p id='jlogteaserpic' style='display: none;'><label for='teaserpic'>".$l['admin']['pic_for_teaser']."</label><br />
<input id='teaserpic' name='teaserpic' class='short' type='text' size='6' value='".$form_input['teaserpic']."' />
<input id='teaserpiconblog' name='teaserpiconblog' type='checkbox' value='1' ".$form_input['teaserpiconblog_check']." /> <label for='teaserpiconblog'>".$l['admin']['show_tpic_on_archive']."</label>
<script type='text/javascript'>
document.write(\"<br /><input type='button' name='teaserupload' value='".$l['admin']['pic_upload']."' onclick='jlog_wopen(\\\"".add_session_id_to_url("media/upload-teaser.php")."\\\");' /><input type='button' name='teaserchose' value='".$l['admin']['pic_choose']."' onclick='jlog_wopen(\\\"".add_session_id_to_url("media/select-teaser.php")."\\\");' />\");
</script>
</p>
<p><input id='allowcomments' type='checkbox' name='allowcomments' value='0' ".$form_input['comments_check']." /><label for='allowcomments'>".$l['admin']['comments_closed']."</label><br />
<input id='allowpingback' type='checkbox' name='allowpingback' value='0' ".$form_input['pingback_check']." /><label for='allowpingback'>".$l['admin']['pingback_closed']."</label></p>
</fieldset>
<fieldset><legend>".$l['admin']['contentdata']."</legend>
<script type='text/javascript'>
document.write(\"<br /><label for='content'>".$l['admin']['contentpic_choose']."</label><br /><input name='imgupload' type='button' value='".$l['admin']['pic_upload']."' onclick='jlog_wopen(\\\"".add_session_id_to_url("media/upload-picture.php")."\\\");' /><input name='imgselect' type='button' value='".$l['admin']['pic_choose']."' onclick='jlog_wopen(\\\"".add_session_id_to_url("media/select-picture.php")."\\\");' />\");
</script>
<p><label for='content'>".$l['admin']['content']." (".$l['admin']['howto_bbcode'].")</label><br /><br id='bbcode' />
<textarea id='content' name='content' rows='15' cols='60' class='big'>".$form_input['content']."</textarea></p>
<p><input class='send' type='submit' name='form_submitted' value='".$l['admin']['preview']."' />
<input class='send' type='submit' name='form_submitted' value='".$l['admin']['publish']."' />
<input type='hidden' name='id' value='".$form_input['id']."' />
<input type='hidden' name='date' value='".$form_input['date']."' />
".add_session_id_input_tag()."
</p>
</fieldset>
</form>
<script type='text/javascript'>
jlog_admin = true;
jlog_l_comments_bold = '".$l['admin']['content_bold']."';
jlog_l_comments_italic = '".$l['admin']['content_italic']."';
jlog_l_comments_quote = '".$l['admin']['content_quote']."';
jlog_l_comments_url = '".$l['admin']['content_url']."';
jlog_l_comments_plz_format_txt = '".$l['admin']['content_plz_format_txt']."';
jlog_l_comments_input_on_pos = '".$l['admin']['content_input_on_pos']."';
jlog_l_comments_url_href = '".$l['admin']['content_url_href']."';
jlog_l_comments_url_node = '".$l['admin']['content_url_node']."';
jlog_l_list = '".$l['admin']['content_list']."';
jlog_l_headline = '".$l['admin']['content_headline']."';
</script>
";
### Plugin Hook
$o = $plugins->callHook('adminForm', $o, $form_input);
return $o;
}
function preview_output($form_input) {
global $l, $bbcode, $categories;
// get data from _post
if(empty($form_input['date'])) $form_input['date'] = time();
$output = "<h2 class='preview'>".$l['admin']['preview']."</h2>\n<div class='preview'>".do_entry($form_input, NULL, $section)."</div>";
return $output;
}
function insert_blog($form_input) {
global $l, $plugins;
if($form_input['allowcomments'] != "0") $form_input['allowcomments'] = "1";
if($form_input['allowpingback'] != "0") $form_input['allowpingback'] = "1";
$form_input = escape_for_mysql($form_input);
$sql = "INSERT INTO ".JLOG_DB_CONTENT." (
topic,
url,
section,
date,
teaser,
teaserpic,
teaserpiconblog,
keywords,
content,
comments,
allowpingback )
VALUES (
'".$form_input['topic']."',
'".$form_input['url']."',
'".$form_input['section']."',
NOW(),
'".$form_input['teaser']."',
'".$form_input['teaserpic']."',
'".$form_input['teaserpiconblog']."',
'".$form_input['keywords']."',
'".$form_input['content']."',
'".$form_input['allowcomments']."',
'".$form_input['allowpingback']."' );";
$writeblog = new Query($sql);
$id = mysql_insert_id();
if($writeblog->error()) {
echo "<pre>\n";
echo $writeblog->getError();
echo "</pre>\n";
die();
}
if(is_array($form_input['categories']) AND $form_input['categories']['0'] != 'no_categories') {
$sql = "INSERT INTO ".JLOG_DB_CATASSIGN." ( cat_id, content_id )
VALUES \n";
foreach($form_input['categories'] AS $category) {
if(++$i > 1) $sql .= ",\n";
$sql .= "( '".$category."', '".$id."')";
}
$sql .= ";";
$catassign = new Query($sql);
if($catassign->error()) {
echo "<pre>\n";
echo $catassign->getError();
echo "</pre>\n";
die();
}
}
### Plugin Hook
$plugins->callHook('insertEntry', $id, $form_input);
return $id;
}
function get_blog($id) {
global $l, $categories;
$sql = 'SELECT id, url, topic, UNIX_TIMESTAMP(date) AS date, ' .
'teaser, teaserpic, teaserpiconblog, keywords, ' .
'content, comments, allowpingback, section FROM ' .
JLOG_DB_CONTENT . ' WHERE id = \'' . $id .
'\' LIMIT 1;';
$blog = new Query($sql);
if($blog->error()) {
echo "<pre>\n";
echo $blog->getError();
echo "</pre>\n";
die();
}
$form_input = $blog->fetch();
$form_input['categories'] = $categories->get_assigned_categories($form_input['id']);
return $form_input;
}
function update_blog($form_input) {
global $l, $plugins;
if($form_input['allowcomments'] != "0") $form_input['allowcomments'] = "1";
if($form_input['allowpingback'] != "0") $form_input['allowpingback'] = "1";
$form_input = escape_for_mysql($form_input);
$sql = "UPDATE ".JLOG_DB_CONTENT." SET
topic = '".$form_input['topic']."',
url = '".$form_input['url']."',
section = '".$form_input['section']."',
teaser = '".$form_input['teaser']."',
teaserpic = '".$form_input['teaserpic']."',
teaserpiconblog = '".$form_input['teaserpiconblog']."',
keywords = '".$form_input['keywords']."',
content = '".$form_input['content']."',
comments = '".$form_input['allowcomments']."',
allowpingback = '".$form_input['allowpingback']."'
WHERE id = '".$form_input['id']."' LIMIT 1;";
$updateblog = new Query($sql);
if($updateblog->error()) {
echo "<pre>\n";
echo $updateblog->getError();
echo "</pre>\n";
die();
}
if(is_array($form_input['categories'])) {
$sql = "DELETE FROM ".JLOG_DB_CATASSIGN." WHERE content_id = '".$form_input['id']."';";
$trashcatassign = new Query($sql);
if($trashcatassign->error()) {
echo "<pre>\n";
echo $trashcatassign->getError();
echo "</pre>\n";
die();
}
if(is_array($form_input['categories']) AND $form_input['categories']['0'] != 'no_categories') {
$sql = "INSERT INTO ".JLOG_DB_CATASSIGN." ( cat_id, content_id )
VALUES \n";
foreach($form_input['categories'] AS $category) {
if(++$i > 1) $sql .= ",\n";
$sql .= "( '".$category."', '".$form_input['id']."')";
}
$sql .= ";";
$catassign = new Query($sql);
if($catassign->error()) {
echo "<pre>\n";
echo $catassign->getError();
echo "</pre>\n";
die();
}
}
}
### Plugin Hook
$plugins->callHook('updateEntry', $form_input['id'], $form_input);
return $l['admin']['data_updated'];
}
function trash_blog($id) {
global $l;
$sql = "DELETE FROM ".JLOG_DB_CONTENT." WHERE id = '".escape_for_mysql($id)."' LIMIT 1";
$trashblog = new Query($sql);
if($trashblog->error()) {
echo "<pre>\n";
echo $trashblog->getError();
echo "</pre>\n";
die();
}
return $l['admin']['postleted'];
}
/**
* add PHPSESSID GET parameter if cookies are not allowed
**/
function add_session_id_to_url($url="") {
if(empty($_COOKIE[session_name()])) {
if(strpos($url, "?") === false) $url .= "?";
else $url .= "&";
$url .= session_name() . "=" . htmlspecialchars(session_id());
}
return $url;
}
/**
* add PHPSESSID <input>-Tag if cookies are not allowed
*/
function add_session_id_input_tag() {
if(empty($_COOKIE[session_name()])) {
return "<input type='hidden' name='" . session_name() . "' value='" . htmlspecialchars(session_id()) . "' />";
}
}
// output the administration menu
function output_admin_menu() {
global $l, $plugins;
$o = '<p id="admin-menu">
<a href="'.add_session_id_to_url("./").'">'.$l['admin']['menu_home'].'</a> |
<a href="'.add_session_id_to_url("categories.php").'">'.$l['admin']['menu_categories'].'</a> |
<a href="'.add_session_id_to_url("comments.php").'">'.$l['admin']['menu_comments'].'</a> |
<a href="'.add_session_id_to_url("settings.php").'">'.$l['admin']['menu_settings'].'</a> |
<a href="'.add_session_id_to_url("plugin.php").'">'.$l['admin']['menu_plugins'].'</a> |
<a href="'.add_session_id_to_url("logout.php").'">'.$l['admin']['menu_logout'].'</a>
</p>';
### Plugin Hook
$o = $plugins->callHook('adminMenu', $o);
return $o;
}
// eof

79
admin/categories.php Normal file
View file

@ -0,0 +1,79 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$get = strip($_GET);
$form_input = strip($_POST);
$c['meta']['title'] = $l['admin']['cat_title'];
$c['main'] = output_admin_menu()."<h2>".$l['admin']['cat_title']."</h2>\n";
switch ($get['action']) {
case 'new':
if(isset($form_input['form_submit'])) {
if(!is_array($errors = $categories->validate($form_input))) {
$categories->new_cat($form_input);
$categories->get_categories();
$c['main'] .= "<p><strong>&raquo;&raquo;</strong> <a href='".add_session_id_to_url("?action=new")."'>".$l['admin']['cat_new']."</a></p>
".$categories->output_whole_list_admin();
}
else {
$c['main'] .= error_output($errors);
$c['main'] .= $categories->output_form($form_input, 'new', $l['admin']['cat_new']);
}
}
else $c['main'] .= $categories->output_form('', 'new', $l['admin']['cat_new']);
break;
case 'change':
if(isset($form_input['form_submit'])) {
if(!is_array($errors = $categories->validate($form_input))) {
$categories->change_cat($form_input);
$categories->get_categories();
$c['main'] .= "<p>".$l['admin']['cat_new_ok']."</p>".$categories->output_whole_list_admin();
}
else {
$c['main'] .= error_output($errors);
$c['main'] .= $categories->output_form($form_input, 'new', $l['admin']['cat_new']);
}
}
else {
$form_input['name'] = $categories->get($get['id'], 'name');
$form_input['id'] = $get['id'];
$form_input['url'] = $categories->get($get['id'], 'url');
$form_input['description'] = $categories->get($get['id'], 'description');
$c['main'] .= $categories->output_form($form_input, 'change', $l['admin']['cat_change']);
}
break;
case 'trash':
if($form_input['form_submit'] == $l['admin']['yes']) {
$categories->trash_cat($form_input['id']);
$categories->get_categories();
$c['main'] .= "<p>".$l['admin']['cat_trash_ok']."
<a href='".add_session_id_to_url("categories.php")."'>".$l['admin']['cat_admincenter']."</a></p>";
}
else {
$c['main'] .= "<form action='?action=trash' method='POST' accept-charset='UTF-8'>
<p>".$l['admin']['cat_really_trash']."</p>
<h3>".$categories->link($get['id'])."</h3>
<p><input type='submit' name='form_submit' value='".$l['admin']['yes']."' />
<input type='hidden' name='id' value='".$get['id']."' />
".add_session_id_input_tag()."
<a href='".add_session_id_to_url("categories.php")."'>".$l['admin']['no']."</a></p>
</form>";
}
break;
default:
$c['main'] .= "<p><strong>&raquo;&raquo;</strong> <a href='".add_session_id_to_url("?action=new")."'>".$l['admin']['cat_new']."</a></p>
".$categories->output_whole_list_admin();
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

60
admin/change.php Normal file
View file

@ -0,0 +1,60 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$get = strip($_GET);
$post = strip($_POST);
$c['meta']['title'] = $l['admin']['change_headline'];
$c['main'] = output_admin_menu();
$c['main'] .= "<h2>".$l['admin']['change_headline']."</h2>";
if($get['action'] == "trash" AND $post['trash'] == $l['admin']['yes']) {
$c['main'] .= "<p>".trash_blog($get['id'])."</p>";
include_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
}
elseif ($get['action'] == "trash" AND empty($post['trash'])) {
$c['main'] .= "
<form method='post' id='entryform' action='".$_SERVER['SCRIPT_NAME']."?id=".$get['id']."&amp;action=trash' accept-charset='UTF-8'>
<p>".$l['admin']['rearly_delete']." <input class='send' type='submit' name='trash' value='".$l['admin']['yes']."' />
".add_session_id_input_tag()."
<a href='".JLOG_PATH."/admin/'>".$l['admin']['no']."</a></p>
</form>";
$form_input = get_blog($get['id']);
$c['main'] .= preview_output($form_input);
$c['title'] = $l['admin']['delete_blogentry'];
}
else {
if(isset($get['id'])) $form_input = get_blog($get['id']);
elseif (isset($_POST)) $form_input = $post;
else $c['main'] .= $l['admin']['error_occurred'];
if($post['form_submitted'] == $l['admin']['preview']) {
$c['main'] .= error_output(check_input($form_input));
$c['main'] .= preview_output($form_input);
$c['main'] .= form_output($form_input);
}
elseif($post['form_submitted'] == $l['admin']['publish']) {
// Put data to database
if(!check_input($form_input)) {
$c['main'] .= "<p>".update_blog($form_input)."</p>";
include_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
}
else {
// show preview and form
$c['main'] .= error_output(check_input($form_input));
$c['main'] .= form_output($form_input);
}
}
else {
// show form
$c['main'] .= form_output($form_input);
}
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

217
admin/comments.php Normal file
View file

@ -0,0 +1,217 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
define("JLOG_COMMENTS", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$get = strip($_GET);
$data = strip($_POST);
$mysql_id = escape_for_mysql($get['id']);
$c['meta']['title'] = $l['admin']['kill_c_topic'];
$c['main'] = output_admin_menu();
if($get['action'] == 'trash' AND $data['trash'] == $l['admin']['yes']) {
### Plugin Hook
$get['id'] = $plugins->callHook('deleteComment', $get['id']);
if( trash($get['id'], JLOG_DB_COMMENTS ) == true) {
$c['main'] .= $l['admin']['kill_c_killed'];
include_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
}
}
elseif ($get['action'] == 'trash' AND empty($data['trash'])) {
$c['main'] .= "
<form method='post' id='entryform' action='comments.php?id=".$get['id']."&amp;action=trash' accept-charset='UTF-8'>
<p>".$l['admin']['kill_c_sure']."
<input class='send' type='submit' name='trash' value='".$l['admin']['yes']."' />
".add_session_id_input_tag()."
<a href='".add_session_id_to_url("comments.php")."'>".$l['admin']['no']."</a></p>
</form>";
$sql = 'SELECT id, sid, name, city, email, homepage, content, ' .
'date, reference, mail_by_comment, type FROM ' .
JLOG_DB_COMMENTS."
WHERE id = ".$mysql_id."
ORDER BY id DESC LIMIT 1;";
$comment = new Query($sql);
if($comment->error()) {
echo "<pre>\n";
echo $comment->getError();
echo "</pre>\n";
die();
}
$daten = $comment->fetch();
$c['main'] .= "<ul class='comments'>".do_comment($daten, "x")."</ul>";
}
elseif($get['action'] == 'change' AND !empty($get['id'])) {
$l["comments_comment_topic"] = $l['admin']["comments_comment_topic"];
$l["comments_by"] = $l['admin']["comments_by"];
$l["comments_name"] = $l['admin']["comments_name"];
$l["comments_city"] = $l['admin']["comments_city"];
$l["comments_email"] = $l['admin']["comments_email"];
$l["comments_homepage"] = $l['admin']["comments_homepage"];
$l["comments_bbcode"] = $l['admin']["comments_bbcode"];
$l["comments_send"] = $l['admin']["comments_send"];
$l["comments_preview"] = $l['admin']["comments_preview"];
$l["comments_no_sid"] = $l['admin']["comments_no_sid"];
$l["comments_false_mail"] = $l['admin']["comments_false_mail"];
$l["comments_notext"] = $l['admin']["comments_notext"];
$l["comments_false_hp"] = $l['admin']["comments_false_hp"];
$l["comments_anonym"] = $l['admin']["comments_anonym"];
$l["comments_permalink"] = $l['admin']["comments_permalink"];
$l["comments_from"] = $l['admin']["comments_from"];
$l["comments_posted"] = $l['admin']["comments_posted"];
$l["comments_entryform"] = $l['admin']["comments_entryform"];
$l["comments_mail_by_comment"] = $l['admin']["comments_mail_by_comment"];
$l["comments_thx"] = $l['admin']["comments_thx"];
$l["comments_preview"] = $l['admin']["comments_preview"];
$l["comments_send"] = $l['admin']["comments_send"];
$l["comments_bold"] = $l['admin']["comments_bold"];
$l["comments_italic"] = $l['admin']["comments_italic"];
$l["comments_quote"] = $l['admin']["comments_quote"];
$l["comments_url"] = $l['admin']["comments_url"];
$l["comments_plz_format_txt"] = $l['admin']["comments_plz_format_txt"];
$l["comments_url_href"] = $l['admin']["comments_url_href"];
$l["comments_url_node"] = $l['admin']["comments_url_node"];
if($data['form_submitted'] == $l['comments_preview']) {
$c['main'] .= "\n <h2>".$l['admin']['comments_change_h']."</h2>
<ul class='comments' id='preview'>
".do_comment($data, 1)."
</ul>".com_form_output($data).com_javascript_variables();
}
elseif($data['form_submitted'] == $l['comments_send']) {
if(count($errors = com_check_errors($data)) > 0) $c['main'] .= "\n <h2>".$l['admin']['comments_change_h']."</h2>\n".error_output($error).com_form_output($data).com_javascript_variables();
else {
$data = com_clean_data($data);
### Plugin Hook
$data = $plugins->callHook('updateComment', $data);
$data = escape_for_mysql($data);
$sql = "UPDATE ".JLOG_DB_COMMENTS."
SET
name = '".$data['name']."',
city = '".$data['city']."',
email = '".$data['email']."',
homepage = '".$data['homepage']."',
content = '".$data['content']."',
mail_by_comment = '".$data['mail_by_comment']."'
WHERE id = '".$data['id']."' LIMIT 1;";
$updatecomment = new Query($sql);
if($updatecomment->error()) {
echo "<pre>\n";
echo $updatecomment->getError();
echo "</pre>\n";
die();
}
$c['main'] .= "\n <h2>".$l['admin']['comments_change_h']."</h2>\n".$l['admin']['comments_updated']." <a href='".add_session_id_to_url("comments.php")."'>".$l['admin']['comments_admin']."</a>";
include_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
}
}
else {
$sql = 'SELECT id, sid, name, city, email, homepage, content, ' .
'UNIX_TIMESTAMP(date) AS date, reference, ' .
'mail_by_comment, type FROM '.JLOG_DB_COMMENTS."
WHERE id = ".$mysql_id."
ORDER BY id DESC LIMIT 1;";
$comment = new Query($sql);
if($comment->error()) {
echo "<pre>\n";
echo $comment->getError();
echo "</pre>\n";
die();
}
$data = $comment->fetch();
if(empty($data['name'])) $data['name'] = $l['comments_name'];
if(empty($data['city'])) $data['city'] = $l['comments_city'];
if(empty($data['email'])) $data['email'] = $l['comments_email'];
if(empty($data['homepage'])) $data['homepage'] = $l['comments_homepage'];
$c['main'] .= "\n <h2>".$l['admin']['comments_change_h']."</h2>
<ul class='comments' id='preview'>
".do_comment($data, 1)."
</ul>".com_form_output($data).com_javascript_variables();
}
}
else {
$yl = new Year_Links($get['y'], JLOG_START_YEAR, add_session_id_to_url(JLOG_PATH."/admin/comments.php"), $l['admin']);
$c['main'] .= "
<h2>".$l['admin']['kill_c_topic']."</h2>
<p>".$l['admin']['kill_c_description']."</p>
<p>".$yl->get_admin_linklist()."</p>
<table>
<tr>
<th>".$l['admin']['change']."</th><th>".$l['admin']['delete']."</th><th>ID</th><th>".$l['comments_name']."</th><th>".$l['comments_posted']."</th><th>".$l['admin']['kill_c_entry']."</th>
</tr>";
$sql = "SELECT
".JLOG_DB_COMMENTS.".id AS id,
".JLOG_DB_CONTENT.".url AS url,
UNIX_TIMESTAMP(".JLOG_DB_CONTENT.".date) AS reference_date,
UNIX_TIMESTAMP(".JLOG_DB_COMMENTS.".date) AS date,
".JLOG_DB_COMMENTS.".name AS name,
".JLOG_DB_CONTENT.".topic AS topic,
".JLOG_DB_COMMENTS.".email AS email,
".JLOG_DB_COMMENTS.".type AS type
FROM ".JLOG_DB_COMMENTS.", ".JLOG_DB_CONTENT."
WHERE ".JLOG_DB_COMMENTS.".reference = ".JLOG_DB_CONTENT.".id
AND YEAR(".JLOG_DB_COMMENTS.".date) = '".$yl->get_selected_year()."'
ORDER BY id DESC;";
$comments = new Query($sql);
if($comments->error()) {
echo "<pre>\n";
echo $comments->getError();
echo "</pre>\n";
die();
}
while ($daten = $comments->fetch()) {
if(empty($daten['name'])) $daten['name'] = $l['comments_anonym'];
elseif($daten['type'] != 'pingback') $daten['name'] = htmlspecialchars($daten['name'], ENT_QUOTES);
if(!empty($daten['email'])) {
$email_a = "<a href='mailto:".$daten['email']."'>";
$email_b = "</a>";
}
else {
$email_a = "";
$email_b = "";
}
$comment = "
<tr>
<td><a href='".add_session_id_to_url("?id=".$daten['id']."&amp;action=change")."'><img src='".JLOG_PATH."/img/JLOG_edit.png' alt='".$l['admin']['change']."' /></a></td>
<td><a href='".add_session_id_to_url("?id=".$daten['id']."&amp;action=trash")."'><img src='".JLOG_PATH."/img/JLOG_trash.png' alt='".$l['admin']['delete']."' /></a></td>
<td><a href='".blog($daten['reference_date'], $daten['url'])."#c".$daten['id']."'>".$daten['id']."</a></td>
<td>".$email_a.$daten['name'].$email_b."</td>
<td>".strftime(JLOG_DATE_COMMENT, $daten['date'])."</td>
<td>".$daten['topic']."</td>
</tr>";
### Plugin Hook
$c['main'] .= $plugins->callHook('commentAdminList', $comment, $daten);
}
$c['main'] .= "
</table>";
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

13
admin/export-rss2.php Normal file
View file

@ -0,0 +1,13 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
define("JLOG_EXPORT_RSS2", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'update.php');
header('Content-type: application/xml');
header('Content-Disposition: attachment; filename="jlog-rss2.xml"');
echo $data['rss_full'];
?>

75
admin/index.php Normal file
View file

@ -0,0 +1,75 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$get = strip($_GET);
$yl = new Year_Links($get['y'], JLOG_START_YEAR, add_session_id_to_url(JLOG_PATH."/admin/"), $l['admin']);
if(isset($get['show']) AND $get['show'] == 'page') {
$show_section = "<a href='".add_session_id_to_url("?show=weblog")."'>".$l['admin']['section_weblog']."</a> | <strong>".$l['admin']['section_page']."</strong>";
$where = "section = 'page'";
}
else {
$show_section = "<strong>".$l['admin']['section_weblog']."</strong> | <a href='".add_session_id_to_url("?show=page")."'>".$l['admin']['section_page']."</a>";
$where = "YEAR(date) = '".escape_for_mysql($yl->get_selected_year())
."' AND section = 'weblog'";
$year_menu = " <p>".$yl->get_admin_linklist()."</p>\n";
}
$c['meta']['title'] = $l['admin']['index_headline'];
$c['main'] .= output_admin_menu()."
<h2>".$l['admin']['admin_headline']."</h2>
<p><strong>&raquo;&raquo;</strong> <a href='".add_session_id_to_url("new.php")."'>".$l['admin']['new_post']."</a></p>
<p>".$l['admin']['section_show'].": ".$show_section."</p>".$year_menu."
<table>
<tr>
<th>".$l['admin']['change']."</th>
<th>".$l['admin']['delete']."</th>
<th>".$l['admin']['date']."</th>
<th>".$l['admin']['headline']."</th>
</tr>";
$sql = "SELECT
id,
date as mysql_date,
UNIX_TIMESTAMP(date) AS date,
topic
FROM ".JLOG_DB_CONTENT."
WHERE ".$where."
ORDER BY mysql_date DESC;";
$blog = new Query($sql);
if($blog->error()) {
echo "<pre>\n";
echo $blog->getError();
echo "</pre>\n";
die();
}
while ($daten = $blog->fetch()) {
$list = "
<tr>
<td><a href='".add_session_id_to_url("change.php?id=".$daten['id'])."'><img src='".JLOG_PATH."/img/JLOG_edit.png' alt='".$l['admin']['change']."' /></a></td>
<td><a href='".add_session_id_to_url("change.php?id=".$daten['id'])."&amp;action=trash'><img src='".JLOG_PATH."/img/JLOG_trash.png' alt='".$l['admin']['delete']."' /></a></td>
<td>".strftime(JLOG_DATE_SUBCURRENT, $daten['date'])."</td>
<td>".htmlspecialchars($daten['topic'], ENT_QUOTES)."</td>
</tr>";
### Plugin Hook
$c['main'] .= $plugins->callHook('adminList', $list, $daten);
}
$c['main'] .= "
</table>
";
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
// eof

76
admin/login.php Normal file
View file

@ -0,0 +1,76 @@
<?php
### Loginscript taken form <http://aktuell.de.selfhtml.org/tippstricks/php/loginsystem/>
### autor: Benjamin Wilfing
### email: benjamin.wilfing@selfhtml.org
### homepage: <http://wilfing-home.de>
###
### adapted for Jlog by Jeena Paradies
ini_set("session.use_trans_sid", false);
define("JLOG_ADMIN", true);
define("JLOG_LOGIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$false_password = "";
$get = strip($_GET);
$post = strip($_POST);
### Plugin Hook
$dispatch_login = $plugins->callHook('dispatchLogin', true);
if ($_SERVER['REQUEST_METHOD'] == 'POST' AND $dispatch_login) {
session_start();
$passwort = $post['password'];
$url = !empty($post['url']) ? $post['url'] : '';
$hostname = $_SERVER['HTTP_HOST'];
$path = dirname($_SERVER['SCRIPT_NAME']) . '/';
if (strpos($url, "\n") !== false or strpos($url, "\r") !== false) {
die('Somebody tried to hack Jlog with Response-Splitting.');
}
if (md5($passwort) == JLOG_ADMIN_PASSWORD) {
$_SESSION['logged_in'] = true;
session_regenerate_id(); // neue SID
if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') {
if (php_sapi_name() == 'cgi') header('Status: 303 See Other');
else header('HTTP/1.1 303 See Other');
}
if ($path == $url) $url = $path . 'new.php';
if (!empty($url)) $path = $url;
header('Location: ' . add_session_id_to_url("http://".$hostname.$path));
exit;
}
else {
$false_password = " <p class='error'>".$l['admin']['login_false_pw']."</p>\n";
}
}
else {
setcookie("cookieallowed", "true", time() + 180);
}
$c['meta']['title'] = $l['admin']['login_headline'];
$c['main'] = '
<h2>'.$l['admin']['login_headline'].'</h2>
' . $false_password . '
<form action="login.php" method="post" accept-charset="UTF-8">
<p><label for="password">' . $l['admin']['login_password'] . '</label>
<input class="userdata" id="password" type="password" name="password" />
<input style="display: none;" name="username" type="text" value="do-not-change" /></p>
<p><input type="hidden" name="url" value="' . htmlspecialchars(!empty($get['url']) ? $get['url'] : '') . '" />
<input type="submit" value="' . $l['admin']['login_send'] . '" /></p>
</form>
';
### Plugin Hook
$c["main"] = $plugins->callHook('loginForm', $c["main"]);
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;

9
admin/logout.php Normal file
View file

@ -0,0 +1,9 @@
<?php
session_start();
session_destroy();
$hostname = $_SERVER['HTTP_HOST'];
$path = dirname(dirname($_SERVER['SCRIPT_NAME']));
header('Location: http://'.$hostname.($path == '/' ? '' : $path).'/');
?>

View file

@ -0,0 +1,54 @@
<?php
include_once('..'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><?php echo $l['admin']['pic_choose_old'] ?></title>
<link rel="stylesheet" href="<?php echo JLOG_PATH ?>/personal/css/popup.css" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="<?php echo JLOG_PATH ?>/scripts/javascripts.js"></script>
</head>
<body>
<h1><?php echo $l['admin']['pic_choose_old'] ?></h1>
<?php
// Bildernamen für blog in ein Array schreiben
$dir = JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR;
if($_GET['p']) { ?>
<p><img src="<?php echo JLOG_PATH ?>/img/<?php echo $_GET['p']; ?>" alt="" border="1" height="100"></p>
<form onSubmit="jlog_bbcode_img('<?php echo htmlspecialchars($_GET['p']); ?>'); return false;" accept-charset="UTF-8">
<p><?php echo $l['admin']['pic_class'] ?><br />
<input id="class" type="text" size="20"></p>
<p><?php echo $l['admin']['pic_alt'] ?><br />
<input id="alt" type="text" size="20"></p>
<p><input type="submit" value="<?php echo $l['admin']['pic_insert'] ?>"></p>
</form>
<?php
}
else {
$handle = opendir ($dir);
while (false !== ($filename = readdir ($handle))) {
if ($filename != "." && $filename != ".." && substr($filename, 0, 2) != 't_' && substr($filename, 0, 5) != 'JLOG_') {
$ctime = filectime($dir.$filename);
$file[$filename] = $ctime;
}
}
closedir($handle);
if(is_array($file)) {
asort($file);
reset($file);
while ( list($filename, $ctime) = each($file)) {
echo "<a href='?p=".$filename."' ><img height=\"50\" src=\"".JLOG_PATH."/img/".$filename."\"></a>\n";
}
}
}
?>
</body>
</html>

View file

@ -0,0 +1,43 @@
<?php
include_once('..'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><?php echo $l['admin']['pic_choose_old_teaser'] ?></title>
<link rel="stylesheet" href="<?php echo JLOG_PATH ?>/personal/css/popup.css" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1><?php echo $l['admin']['pic_choose_old_teaser'] ?></h1>
<?php
// Bildernamen für blog in ein Array schreiben
$dir = JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR;
$handle = opendir ($dir);
while (false !== ($filename = readdir ($handle))) {
if (substr($filename, 0, 2) === 't_') {
$ctime = filectime($dir.$filename);
$file[$filename] = $ctime;
}
}
closedir($handle);
if(is_array($file)) {
asort($file);
reset($file);
while ( list($filename, $ctime) = each($file)) {
echo "<a href=\"#\"
onclick=\"opener.document.forms['entryform'].elements['teaserpic'].value='';
opener.document.forms['entryform'].elements['teaserpic'].value+='".substr($filename, 2, strlen($filename))."';
window.close();\"><img height=\"50\" src=\"".JLOG_PATH."/img/".$filename."\"></a> ";
}
}
?>
</body>
</html>

View file

@ -0,0 +1,88 @@
<?php
include_once('..'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require_once('..'.DIRECTORY_SEPARATOR.'blog.func.php');
$max_file_size = 300000;
$up_dir = JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR;
$up_dir_img = JLOG_PATH."/img/";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><?php echo $l['admin']['pic_upload_header'] ?></title>
<link rel="stylesheet" href="<?php echo JLOG_PATH ?>/personal/css/popup.css" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo JLOG_PATH ?>/scripts/javascripts.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1><?php echo $l['admin']['pic_upload_header'] ?></h1>
<?php
if (isset($_FILES['probe']) && ! $_FILES['probe']['error']) // Alternativ: and $_FILES['probe']['size']
{
// Überprüfungen:
unset($errors);
$e = substr($_FILES['probe']['name'], -4);
if(!preg_match('~.jpg|jpeg|.gif|.png~i', $e)) $errors[] = $l['admin']['pic_bad_type']." (".$_FILES['probe']['type'].")";
if ($_FILES['probe']['size'] > $max_file_size) $errors[] = $l['admin']['pic_to_big']." (".number_format($_FILES['probe']['size']/1000,0,",","")." KB)";
if(empty($errors)) {
$nr = 0;
switch(true)
{
case preg_match('~.jpg|jpeg~i', $e):
for(;;) { $nr++; if (!file_exists($up_dir.$nr.".jpg")) break; }
$filename = $nr.".jpg";
break;
case preg_match('~.gif~i', $e):
for(;;) { $nr++; if (!file_exists($up_dir.$nr.".gif")) break; }
$filename = $nr.".gif";
break;
case preg_match('~.png~i', $e):
for(;;) { $nr++; if (!file_exists($up_dir.$nr.".png")) break; }
$filename = $nr.".png";
break;
}
if(empty($errors)) {
if(!move_uploaded_file($_FILES['probe']['tmp_name'], $up_dir.$filename)) $errors[] = $l['admin']['pic_error'];
else chmod($up_dir.$filename, 0664);
}
}
if (empty($errors)) {
?>
<p><?php echo $l['admin']['pic_uploaded'] ?></p>
<p><img src="<?php echo $up_dir_img.$filename; ?>" alt="" border="1" height="100"></p>
<form onSubmit="jlog_bbcode_img('<?php echo $filename; ?>'); return false;">
<p><?php echo $l['admin']['pic_class'] ?><br />
<input id="class" type="text" size="20"></p>
<p><?php echo $l['admin']['pic_alt'] ?><br />
<input id="alt" type="text" size="20"></p>
<p><input type="submit" value="<?php echo $l['admin']['pic_insert'] ?>"></p>
</form>
<?php
}
}
elseif($_FILES['probe']['error'] === 2) $errors[] = $l['admin']['pic_to_big'];
if(isset($errors)) echo error_output($errors);
if (empty($_FILES['probe']) or isset($errors))
{
?>
<p><?php echo $l['admin']['pic_instructions'] ?></p>
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size ?>">
<?php echo add_session_id_input_tag() ?>
<input type="file" name="probe" /><br><br>
<input type="submit" value="<?php echo $l['admin']['pic_upload'] ?>">
</form>
<?php
}
?>
</body>
</html>

View file

@ -0,0 +1,92 @@
<?php
include_once('..'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require_once('..'.DIRECTORY_SEPARATOR.'blog.func.php');
$max_file_size = 60000;
$up_dir = JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR;
$up_dir_img = JLOG_PATH."/img/";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><?php echo $l['admin']['pic_upload_teaser'] ?></title>
<link rel="stylesheet" href="<?php echo JLOG_PATH ?>/personal/css/popup.css" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1><?php echo $l['admin']['pic_upload_teaser'] ?></h1>
<?php
if (isset($_FILES['probe']) && ! $_FILES['probe']['error']) // Alternativ: and $_FILES['probe']['size']
{
// Überprüfungen:
unset($errors);
$e = substr($_FILES['probe']['name'], -4);
if(!preg_match('~.jpg|jpeg|.gif|.png~i', substr($_FILES['probe']['name'],-4))) $errors[] = $l['admin']['pic_bad_type']." (".$e.")";
if ($_FILES['probe']['size'] > $max_file_size) $errors[] = $l['admin']['pic_to_big']." (".number_format($_FILES['probe']['size']/1000,0,",","")." KB)";
if(empty($errors)) {
$nr = 0;
switch(true)
{
case preg_match('~.jpg|jpeg~i', $e):
for(;;) { $nr++; if (!file_exists($up_dir."t_".$nr.".jpg")) break; }
$filename = "t_".$nr.".jpg";
break;
case preg_match('~.gif~i', $e):
for(;;) { $nr++; if (!file_exists($up_dir."t_".$nr.".gif")) break; }
$filename = "t_".$nr.".gif";
break;
case preg_match('~.png~i', $e):
for(;;) { $nr++; if (!file_exists($up_dir."t_".$nr.".png")) break; }
$filename = "t_".$nr.".png";
break;
}
$imginfo = getimagesize($_FILES['probe']['tmp_name']);
if($imginfo[1] > 150 AND $imginfo[0] > 150 ) {
$errors[] = $l['admin']['pic_height_widht'];
}
elseif($imginfo[0] > 150 ) {
$errors[] = $l['admin']['pic_width'];
}
elseif($imginfo[1] > 150 ) {
$errors[] = $l['admin']['pic_height'];
}
if(empty($errors)) {
if(!move_uploaded_file($_FILES['probe']['tmp_name'], $up_dir.$filename)) $errors[] = $l['admin']['pic_error'];
else chmod($up_dir.$filename, 0664);
}
}
if (empty($errors)) {
?>
<p><?php echo $l['admin']['pic_uploaded'] ?></p>
<img src="<?php echo $up_dir_img.$filename; ?>" alt="" border="1" height="100">
<p><a href="#" onclick="opener.document.forms['entryform'].elements['teaserpic'].value='<?php echo str_replace('t_', '', $filename); ?>';window.close();"><em><?php echo $l['admin']['pic_insert'] ?></em></a></p>
<?php
}
}
elseif($_FILES['probe']['error'] === 2) $errors[] = $l['admin']['pic_to_big'];
if(isset($errors)) echo error_output($errors);
if (empty($_FILES['probe']) or isset($errors))
{
?>
<p><?php echo $l['admin']['pic_instr_teaser'] ?></p>
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size ?>">
<?php echo add_session_id_input_tag() ?>
<input type="file" name="probe" /><br><br>
<input type="submit" value="<?php echo $l['admin']['pic_upload'] ?>">
</form>
<?php
}
?>
</body>
</html>

103
admin/new.php Normal file
View file

@ -0,0 +1,103 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$c['meta']['title'] .= $l['admin']['new_post'];
$c['main'] = output_admin_menu();
$c['main'] .= "<h2>".$l['admin']['new_post']."</h2>";
$form_input = strip($_POST);
$form_input['date'] = strftime("%Y-%m-%d %H:%M:%s");
if($_POST['form_submitted'] == $l['admin']['preview']) {
$c['main'] .= error_output(check_input($form_input));
$c['main'] .= preview_output($form_input);
$c['main'] .= form_output($form_input);
}
elseif($_POST['form_submitted'] == $l['admin']['publish']) {
// Put data to database
if(!check_input($form_input)) {
if($id = insert_blog($form_input)) {
$c['main'] .= "<p>".$l['admin']['entry_saved']."</p>";
include_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
// ping blog services and pingback
if($form_input['section'] == 'weblog') {
$blogservices = explode("\n", str_replace("\r", "\n", str_replace("\r\n", "\n", JLOG_BLOGSERVICES)));
foreach($blogservices as $blogservice) {
if(strlen($blogservice) > 0) $pingresult[] = doPing(trim($blogservice));
}
// if(is_array($pingresult)) $c['main'] .= "\n<ul>".join($pingresult)."\n</ul>";
if($form_input['allowpingback'] != '0') {
$blogentryForURL = get_blog($id);
require_once(JLOG_BASEPATH.'xmlrpc.php');
$pingback = new Jlog_SendPingback($bbcode->parse($form_input['content']), blog($blogentryForURL['date'], $blogentryForURL['url']), " -- Jlog v".JLOG_SOFTWARE_VERSION);
$responces = array();
$responces = $pingback->doPingbacks();
/* Die Ergebnisse der Pings verwirren den User nur habe ich mittlerweile festgestellt.
if(count($responces) > 0) {
$c['main'] .= " <ul>";
foreach($responces as $responce) {
$c['main'] .= "\n <li>".$responce."</li>";
}
$c['main'] .= "\n </ul>";
}
*/
}
}
}
}
else {
// show preview and form
$c['main'] .= error_output(check_input($form_input));
$c['main'] .= form_output($form_input);
}
}
else {
// show form
$c['main'] .= form_output($form_input);
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
// verschiedene Dienste anpingen bei neuem Eintrag
function doPing($url) {
$blog_title = JLOG_WEBSITE;
$blog_url = JLOG_PATH;
$timeout = 30; //Sekunden
$url = parse_url($url);
$fp = @fsockopen($url['host'], 80, $errno, $errstr, $timeout);
if(!$fp) {
$response = 'Fehler: '.$errstr.' ('.$errno.')<br />Es konnte keine Verbindung hergestellt werden';
} else {
$data_string = '<?xml version="1.0" encoding="iso-8859-1"?'.'>
<methodCall>
<methodName>weblogUpdates.ping</methodName>
<params>
<param><value>'.$blog_title.'</value></param>
<param><value>'.$blog_url.'</value></param>
</params>
</methodCall>';
$data_header = "POST ".$url['path']." HTTP/1.0\r\n".
"Host: $host\r\n".
"Content-Type: text/xml\r\n".
"User-Agent: qxm XML-RPC Client\r\n".
"Content-Length: ".strlen($data_string)."\r\n\r\n";
fputs($fp, $data_header);
fputs($fp, $data_string);
unset($response);
fclose($fp);
}
if(isset($response)) return '<li>'.$url['host'].' '.$response.'</li>';
}
// eof

53
admin/plugin.php Normal file
View file

@ -0,0 +1,53 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$get = strip($_GET);
$c['main'] = output_admin_menu();
if(empty($get['jplug'])) {
$handle = "";
$file = "";
$plugindirectory = JLOG_BASEPATH.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR;
if(is_dir($plugindirectory)) {
$handle = opendir($plugindirectory);
while( false !== ( $file = readdir ($handle) ) ) {
if(substr($file, -10) === '.jplug.php') {
$pluginName = substr($file, 0, -10);
$availablePlugins .= " <li><a href='".add_session_id_to_url("?jplug=".$pluginName)."'>".$pluginName."</a></li>\n";
}
}
closedir($handle);
if(!empty($availablePlugins)) {
$availablePlugins = " <ul>\n".$availablePlugins." </ul>\n";
$title = $l['admin']['plugins_headline'];
}
else {
$availablePlugins = "<p>".$l['admin']['plugins_not_avaliable']."</p>";
$title = $l['admin']['plugins_h_not_avaliable'];
}
}
}
else {
$title = $get['jplug'];
$availablePlugins = "<p>".$l['admin']['plugin_no_content']."</p>";
}
$c['meta']['title'] = $title;
$c['main'] .= "<h2>".$title."</h2>\n";
$c['main'] .= $plugins->callHook('adminContent', $availablePlugins);
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

33
admin/settings.php Normal file
View file

@ -0,0 +1,33 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'url_syntax.php');
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'settings.class.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$c['meta']['title'] = $l['admin']['m_title'];
$c['main'] = output_admin_menu()."<h2>".$l['admin']['m_title']."</h2>";
$settings = new Settings($l);
if($_POST) {
$settings->importDataByArray(strip($_POST));
if(count($errors = $settings->validate()) == 0) {
if(count($errors = $settings->do_settings()) == 0) {
$c['main'] .= $l['admin']['m_settings_ok'];
}
}
if(count($errors) > 0) {
$c['main'] .= error_output($errors);
$c['main'] .= $settings->form_output();
}
}
else {
$settings->importDataByConstants();
$c['main'] .= $settings->form_output();
}
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

35
admin/update.php Normal file
View file

@ -0,0 +1,35 @@
<?php
### update.php Jlog 1.0.2 => Jlog 1.1.0
define("JLOG_ADMIN", true);
define("JLOG_UPDATE", true);
// load prepend.inc.php
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
include(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang.'.JLOG_LANGUAGE.'.inc.php');
include(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php');
// Rendering
$c['meta']['title'] = "Update";
//$c['main'] = sprintf("<h2>Update von <var>%s</var> auf <var>%s</var></h2>", JLOG_INSTALLED_VERSION, JLOG_SOFTWARE_VERSION);
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'JlogUpdater.php');
$updater = new JlogUpdater();
if ($updater->isUp2Date()) {
$c['main'] = '<p>Das Update auf ' . JLOG_INSTALLED_VERSION . ' wurde bereits erfolgreich durchgeführt.</p>';
}
else if (!isset($_POST['update'])) {
$c['main'] = $updater->prepareForm($l);
}
else {
$c['main'] = $updater->performUpdate($l);
// Ready :-)
require(JLOG_BASEPATH."scripts".DIRECTORY_SEPARATOR."update.php");
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

138
archive.php Normal file
View file

@ -0,0 +1,138 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$get = strip($_GET);
if(isset($get['cat'])) $cat_y_link = "cat=".$get['cat'];
$yl = new Year_Links($get['y'], JLOG_START_YEAR, archive(), $l, $cat_y_link);
if(isset($get['show'])) $p = (int) escape_for_mysql($get['show']);
else $p = 0;
$amount = 5;
$c['meta']['robots'] = "noindex, follow";
if(isset($get['cat'])) {
$c['meta']['title'] = $categories->get($categories->get_id($get['cat']), 'name');
$c['main'] .= "<h2>".$l['content_categories_header']." ".$categories->get($categories->get_id($get['cat']), 'name')." ".$yl->get_selected_year()."</h2>";
$c['main'] .= "<p>".$categories->get($categories->get_id($get['cat']), 'description')."</p>";
$sql_archive = "
SELECT
".JLOG_DB_CONTENT.".*,
".JLOG_DB_CONTENT.".date as mysql_date,
DATE_FORMAT(".JLOG_DB_CONTENT.".date, '%c') AS month,
DATE_FORMAT(".JLOG_DB_CONTENT.".date, '%Y') AS year,
UNIX_TIMESTAMP(".JLOG_DB_CONTENT.".date) AS date
FROM ".JLOG_DB_CONTENT."
LEFT JOIN ".JLOG_DB_CATASSIGN."
ON ".JLOG_DB_CONTENT.".id = ".JLOG_DB_CATASSIGN.".content_id
WHERE ".JLOG_DB_CATASSIGN.".cat_id = '".escape_for_mysql($categories->get_id($get['cat']))."'
AND YEAR(".JLOG_DB_CONTENT.".date) = '".escape_for_mysql($yl->get_selected_year())."'
ORDER BY mysql_date DESC;";
$c['main'] .= "<p>".$yl->get_linklist()."</p>";
}
elseif(empty($get['y'])) {
$c['meta']['title'] = $l['content_archive_header'];
$c['main'] = "<h2>".$c['meta']['title']."</h2>";
$sql_archive = "SELECT id, url, topic,
date as mysql_date,
DATE_FORMAT(date, '%c') AS month,
DATE_FORMAT(".JLOG_DB_CONTENT.".date, '%Y') AS year,
UNIX_TIMESTAMP(date) AS date,
teaser, teaserpic, teaserpiconblog, keywords, content,
comments, allowpingback, section
FROM ".JLOG_DB_CONTENT."
WHERE section = 'weblog'
ORDER BY mysql_date DESC
LIMIT ".$p.", ".$amount.";";
$sql_count = "SELECT count(*) AS count FROM ".JLOG_DB_CONTENT." WHERE section = 'weblog'";
$count_query = new Query($sql_count);
if($count_query->error()) {
echo "<pre>\n";
echo $count_query->getError();
echo "</pre>\n";
die();
}
$_count = $count_query->fetch();
$count_query->free();
$count = $_count['count'];
}
else {
if(!empty($get['m'])) $where_month = " AND MONTH(date) = '".escape_for_mysql($get['m'])."'";
$c['meta']['title'] = $l['content_archive_header'];
$c['main'] = "<h2>".$c['meta']['title']." ".$yl->get_selected_year()."</h2>";
$sql_archive = "SELECT id, url, topic,
date as mysql_date,
DATE_FORMAT(date, '%c') AS month,
DATE_FORMAT(".JLOG_DB_CONTENT.".date, '%Y') AS year,
UNIX_TIMESTAMP(date) AS date,
teaser, teaserpic, teaserpiconblog, keywords, content,
comments, allowpingback, section
FROM ".JLOG_DB_CONTENT.$where_from."
WHERE
YEAR(date) = '".escape_for_mysql($yl->get_selected_year())."'
".$where_month."
AND section = 'weblog'
ORDER BY mysql_date;";
$c['main'] .= "<p>".$yl->get_linklist()."</p>";
}
$cc = count_comments();
$archive = new Query($sql_archive);
if($archive->error()) {
echo "<pre>\n";
echo $archive->getError();
echo "</pre>\n";
die();
}
$months = array_flip($l['months']);
if($archive->numRows() > 0) {
// initialise variables to keep track of last posts month and year
$last_month = false;
$last_year = false;
while ($daten = $archive->fetch()) {
if(empty($daten)) break 1;
// did we already reach a new month or year?
if (($last_month != $daten['month']) OR ($last_year != $daten['year'])) {
if ($last_month) { $c['main'] .= " </div>\n"; }
$c['main'] .= " <h3>".array_search($daten['month'], $months)." ".$daten['year']."</h3>\n";
$c['main'] .= " <div class='archive'>\n";
// set last month and year to values of current post
$last_month = $daten['month'];
$last_year = $daten['year'];
}
$c['main'] .= do_teaser($daten, $cc, "<h4>", "</h4>");
}
if(empty($get['y'])) {
$c['main'] .= "<p class='archivenavigation'>";
if(($p - $amount) >= 0) {
$c['main'] .= "<a href='?show=".($p - $amount)."'><strong>&lt;&mdash;</strong> ".$l['content_archive_preview']."</a>";
$c['meta']['aditionalheader'] .= ' <link rel="prev" href="?show='.($p - $amount).'" title="'.$l['content_archive_preview'].'" />'."\n";
}
if((($p - $amount) >= 0) && (($p + $amount) < $count)) $c['main'] .= " | ";
if(($p + $amount) < $count) {
$c['main'] .= "<a href='?show=".($p + $amount)."'>".$l['content_archive_next']." <strong>&mdash;&gt;</strong></a>";
$c['meta']['aditionalheader'] .= ' <link rel="next" href="?show='.($p + $amount).'" title="'.$l['content_archive_next'].'" />'."\n";
}
$c['main'] .= "</p>";
}
$c['main'] .= "</div>\n";
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

15
error404.php Normal file
View file

@ -0,0 +1,15 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$get = strip($_GET);
$meta['robots'] = "noindex, follow";
$c['meta']['title'] = $l['err404_topic'];
$c['main'] = "<h2>".$l['err404_topic']."</h2>\n<p>".$l['err404_message']."</p>";
$c['main'] .= ' <form id="searchform" action="'.JLOG_PATH.'/search.php" accept-charset="UTF-8">
<p><input class="userdata" type="text" name="q" size="30" value="'.htmlspecialchars($get['url']).'" />
<input class="send" type="submit" value="'.$l['content_search'].'" /></p>
</form>';
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

BIN
img/JLOG_edit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

BIN
img/JLOG_rss-full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

BIN
img/JLOG_rss-summary.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

BIN
img/JLOG_trash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

107
index.php Normal file
View file

@ -0,0 +1,107 @@
<?php
/**
* Jlog
*
* 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
*
* $HeadURL: http://jeenaparadies.net/svn/jlog/trunk/index.php $
* $Rev: 1777 $
* $Author: robertb $
* $Date: 2009-01-04 18:22:36 +0100 (Sön, 04 Jan 2009) $
*/
if(!file_exists(dirname( __FILE__ ).DIRECTORY_SEPARATOR.'personal'.DIRECTORY_SEPARATOR.'settings.inc.php')) {
if(dirname($_SERVER['SCRIPT_NAME']) !== "/") $dir = dirname($_SERVER['SCRIPT_NAME']);
header("Location: http://".$_SERVER['HTTP_HOST'].$dir."/setup.php");
}
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$c['meta']['robots'] = "noindex, follow";
$c['meta']['description'] = htmlspecialchars(strip_tags(str_replace("\n", '', JLOG_DESCRIPTION)), ENT_QUOTES);
$c['meta']['title'] = $l['index_topic'];
$c['main'] = "";
$cc = array();
$cc = count_comments();
$max_blog = JLOG_MAX_BLOG_ORGINAL + JLOG_MAX_BLOG_BIG + JLOG_MAX_BLOG_SMALL;
// -- Inhalte holen
$sql = "SELECT id, url, topic, date as mysql_date,
UNIX_TIMESTAMP(date) AS date,
DATE_FORMAT(date, '%Y-%m-%dT%T".substr(date("O"), 0, 3) . ":" . substr(date("O"), 3)."') AS metadate,
teaser, teaserpic, teaserpiconblog, keywords, content,
comments, allowpingback, section
FROM ".JLOG_DB_CONTENT." WHERE section = 'weblog' ORDER BY mysql_date DESC LIMIT ".$max_blog.";";
$blog = new Query($sql);
if($blog->error()) {
echo "<pre>\n";
echo $blog->getError();
echo "</pre>\n";
die();
}
$number_of = $blog->numRows();
// -- ganze Posts ausgeben
$i_orginal = 0;
while (++$i_orginal <= JLOG_MAX_BLOG_ORGINAL) {
$cd = array();
$cd = $blog->fetch();
$c['meta']['date'] = $cd['metadate'];
if(empty($cd)) break 1;
$c['main'] .= do_entry($cd, $cc);
}
// -- Teaser ausgeben
$i = 0;
while (++$i <= JLOG_MAX_BLOG_BIG) {
$cd = $blog->fetch();
if(empty($c['meta']['date'])) $c['meta']['date'] = $cd['metadate'];
if(empty($cd)) break 1;
$c['main'] .= do_teaser($cd, $cc);
}
if((JLOG_MAX_BLOG_BIG > 0) AND ($number_of > (JLOG_MAX_BLOG_BIG + JLOG_MAX_BLOG_ORGINAL))) $c['main'] .= "\n <hr />";
if($number_of > JLOG_MAX_BLOG_BIG + JLOG_MAX_BLOG_ORGINAL) $c['main'] .= "\n <ul class='entries'>";
// -- Liste mit alten Beiträgen ausgeben
$linklist = false;
while ($cd = $blog->fetch()) {
if(empty($c['meta']['date'])) $c['meta']['date'] = $cd['metadate'];
++$i;
$linklist = true;
$tmp_comments = "";
if(isset($cc[$cd['id']]) AND $cc[$cd['id']] != 0) $tmp_comments = " <a title='".$l['content_comments_title']."' href='".blog($cd['date'], $cd['url'])."#comments'>(".$cc[$cd['id']].")</a>";
$c['main'] .= "
<li>".strftime(JLOG_DATE_SUBCURRENT, $cd['date'])." <a href='".blog($cd['date'], $cd['url'])."'>".htmlspecialchars($cd['topic'], ENT_QUOTES)."</a>".$tmp_comments."</li>";
}
if($linklist) $c['main'] .= "\n </ul>\n <hr />";
// -- Link zum Archiv
$c['main'] .= "
<p class='archivelink'>".$l['content_archive']." <a href='".archive()."'>".$l['content_archivelink']."</a>.</p>";
// -- Daten in Template einfügen und ausgeben --
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
// eof

246
lang/lang-admin.de.inc.php Normal file
View file

@ -0,0 +1,246 @@
<?php $l['admin'] = array (
// Please do not change the above line!
"menu_home" => "Inhalte",
"menu_categories" => "Kategorien",
"menu_comments" => "Kommentare",
"menu_settings" => "Einstellungen",
"menu_plugins" => "Plugins",
"menu_logout" => "Ausloggen",
"new_post" => "Neuen Eintrag erstellen",
"index_headline" => "Admincenter",
"change_headline" => "Alten Weblogeintrag ändern",
"go" => "los",
"admin_headline" => "Administrationscenter",
"change" => "Ändern",
"delete" => "Löschen",
"date" => "Datum",
"headline" => "Überschrift",
"metadata" => "Metadaten",
"contentdata" => "Inhalt des Eintrages",
"url" => "URL für permanenten Link (nur 0-9 a-z -.,_/)",
"keywords" => "Schlüsselwörter, Keywords",
"categories" => "Kategorie (Mehrfachauswahl mit <key><abbr title='[Ctrl]'>[Strg]</abbr></key>, bzw. <key>Apfel</key> Taste)",
"no_categories" => "keine",
"preview" => "Vorschau",
"publish" => "Veröffentlichen",
"submit" => "Absenden",
"cancel" => "Abbrechen",
"no_headline" => "Überschrift fehlt",
"no_url" => "URL fehlt",
"false_url_letters" => "Der URL darf nur Kleinbuchstaben (a-z), Zahlen (0-9) und diese Zeichen enthalten: -.,_/",
"url_duplicate" => "Während eines Monats darf ein URL nur ein einziges mal vorkommen sonst kann das Blog sie nicht auseinanderhalten",
"url_duplicate_page" => "Pages müssen unikate URLs haben, das heißt, dass jede page einen anderen URL haben muss",
"false_teaserpic" => "Die Angabe des Bildes für die Zusammenfassung stimmt nicht, ein solches Bild wurde nicht hochgeladen",
"no_teaserpic_uploaded" => "Das Bild für die Zusammenfassung kann nicht im Blog angezeigt werden wenn es nicht hochgeladen wurde",
"no_teaser" => "Zusammenfassung fehlt",
"no_content" => "Inhalt fehlt",
"pic_for_teaser" => "Ein Bild für die Zusammenfassung (max 150px):",
"pic_upload" => "Bild hochladen",
"pic_choose" => "Bild auswählen",
"show_tpic_on_archive" => "Dieses Bild auch auf der richtigen Blogseite anzeigen.",
"teaser" => "Zusammenfassung",
"contentpic_choose" => "Ein Bild für den Inhalt:",
"content" => "Inhalt des Beitrags",
"howto_bbcode" => "Wie nutze ich <a href='http://jeenaparadies.net/projects/jlog/wiki/help/bbcode'>BBCode</a>?",
"content_choose_year" => "Das Jahr wählen:",
"content_bold" => "fett",
"content_italic" => "kursiv",
"content_quote" => "Zitat",
"content_url" => "Link",
"content_plz_format_txt" => "Bitte gebe den zu formatierenden Text ein:",
"content_input_on_pos" => "Einfügen an Position",
"content_url_href" => "Linkziel eingeben:",
"content_url_node" => "Linktext eingeben:",
"content_list" => "Liste",
"content_headline" => "Überschrift",
"section" => "Art des Beitrages",
"section_show" => "Art der Beiträge zeigen",
"section_weblog" => "weblog",
"section_page" => "page",
"entry_saved" => "Eintrag gespeichert.",
"data_updated" => "Daten aktualisiert.",
"post_deleted" => "Der Blogeintrag wurde gelöscht.",
"index_topic" => "Letzte Weblogbeiträge",
"yes" => "Ja",
"no" => "Nein",
"rearly_delete" => "Diesen Eintrag wirklich löschen?",
"delete_blogentry" => "Eintrag löschen",
"postdeleted" => "Eintrag gelöscht",
"error_occurred" => "Ein Fehler ist aufgetreten",
"can_not_open" => "Kann Datei nicht öffnen",
"can_not_write" => "Kann in Datei nicht schreiben",
"no_wrtitenable" => "Die Datei ist nicht beschreibbar",
"rss_ok" => "RSS und Aktuelles erfolgreich aktualisiert.",
"master_ok" => "Setupdatei erfolgreich aktualisiert.",
"pic_choose_old" => "Älteres Bild auswählen",
"pic_choose_old_teaser" => "Älteres Teaserbild auswählen",
"pic_upload_header" => "Bild hochladen",
"pic_upload_teaser" => "Teaserbild hochladen",
"pic_error" => "Fehler beim Hochladen bitte Administrator benachrichtigen",
"pic_uploaded" => "Bild wurde hochgeladen",
"pic_insert" => "Bild einfügen",
"pic_instructions" => "Nur PNG, GIF oder JPEG Bilder hochladen. Die Dateigröße darf 300 kB nicht überschreiten.",
"pic_upload" => "Hochladen",
"pic_class" => "CSS Klasse falls benötigt",
"pic_alt" => "Alternativtext",
"pic_height_widht" => "Bild ist zu hoch und zu breit",
"pic_width" => "Bild ist zu breit",
"pic_height" => "Bild ist zu hoch",
"pic_instr_teaser" => "Nur PNG, GIF oder JPEG Bilder hochladen, die nicht breiter oder höher als 150px sind und 60 kB nicht überschreiten.",
"pic_bad_type" => "Falsches Format",
"pic_to_big" => "Das Bild ist zu groß",
"kill_c_topic" => "Kommentare administrieren",
"kill_c_killed" => "Kommentar erfolgreich gelöscht.",
"kill_c_sure" => "Diesen Kommentar wirklich löschen?",
"kill_c_h2" => "Unwiederbringlich löschen",
"kill_c_description" => "Achtung, wenn ein Kommentar hier gelöscht wird ist er unwiederbringlich verloren!",
"kill_c_entry" => "Weblogeintrag",
"kill_c_email" => "Diesen Kommentar löschen",
"comments_change_h" => "Kommentar ändern",
"comments_anonym" => "Anonym",
"comments_mail_txt" => "Neuer Kommentar auf ".JLOG_WEBSITE."\nDer Titel war: ",
"comments_posted" => "schrieb am",
"comments_mailsubject" => "Kommentar auf ".JLOG_WEBSITE,
"comments_comment_topic" => "Kommentare",
"comments_by" => "Kommentar von",
"comments_name" => "Name",
"comments_city" => "Stadt / Land",
"comments_email" => "E-Mail",
"comments_homepage" => "http://",
"comments_bbcode" => "Wie benutze ich",
"comments_send" => "Absenden",
"comments_preview" => "Vorschau",
"comments_no_sid" => "Es scheint eine Manipulation vorzuliegen",
"comments_false_mail" => "Die E-Mail Adresse sieht nicht richtig aus",
"comments_notext" => "Es wurde kein Text eingegeben",
"comments_false_hp" => "Die URL zur Homepage scheint falsch zu sein",
"comments_permalink" => "Permanenter link zu diesem Kommentar",
"comments_from" => "aus",
"comments_posted" => "schrieb am",
"comments_entryform" => "Kommentar ändern",
"comments_mail_by_comment" => "Bei Kommentar benachrichtigen",
"comments_thx" => "Der Kommentar wurde geändert",
"comments_preview" => "Vorschau",
"comments_send" => "Senden",
"comments_bold" => "fett",
"comments_italic" => "kursiv",
"comments_quote" => "Zitat",
"comments_url" => "Link",
"comments_plz_format_txt" => "Bitte gebe den zu formatierenden Text ein:",
"comments_url_href" => "Linkziel eingeben:",
"comments_url_node" => "Linktext eingeben:",
"comments_updated" => "Der Kommentar wurde geändert. Zurück zum",
"comments_admin" => "Kommentar Administrationscenter",
"comments_closed" => "Kommentare für diesen Beitrag schließen",
"m_writenable" => "beschreibbar",
"m_title" => "Haupteinstellungen des Weblogs",
"m_clean_url" => "Saubere URLs (mod_rewrite) verwenden? Beispiel: http://example.com/2005/01/firefox",
"m_metadata" => "Metadaten",
"m_language" => "Sprache des Weblogs",
"m_website" => "Der Name des Weblogs",
"m_publisher" => "Name des Verfassers der Einträge",
"m_admin_password" => "Administrationscenter Passwort",
"m_admin_password_again" => "Passwort bestätigen",
"m_admin_password_admin" => "(leer lassen falls unverändert)",
"m_email" => "E-Mail des Betreibers des Weblogs",
"m_description" => "Eine Kurze Beschreibung des Weblogs",
"m_bs" => "Weblogdienste bei neuem Eintrag benachrichtigen, die den eigenen Eintrag in ihre Suchmaschinen aufnehmen (für jeden eine Zeile)",
"m_bs_weblogs_com" => "weblogs.com",
"m_bs_technorati_com" => "technorati.com",
"m_bs_blogg_de" => "blogg.de",
"m_behavior" => "Verhalten des Weblogs",
"m_max_blog_orginal" => "Anzahl der Einträge, die vollständig auf der Startseite erscheinen",
"m_max_blog_big" => "Anzahl der Einträge, deren Beschreibung auf der Startseite erscheinen",
"m_max_blog_small" => "Anzahl der Einträge, deren Datum und Name auf der Startseite erscheinen",
"m_sub_current" => "Anzahl der Einträge, deren Datum und Name in der Subnavigation, die auf jeder Seite erscheint, erscheinen",
"m_info_by_comment" => "Benachrichtigung des Betreibers des Weblogs bei neuem Kommentar",
"m_database" => "Datenbank",
"m_db" => "Datenbankname",
"m_db_url" => "Datenbank Hostname, in der Regel localhost",
"m_db_user" => "Datenbank Username",
"m_db_pwd" => "Datenbank Passwort",
"m_db_prefix" => "Kürzel, das Tabellennamen vorangestellt wird",
"m_date" => "Format des Datums wie bei der PHP-Funktion <a href='http://php.net/strftime'>strftime()</a>",
"m_date_posting" => "Format für den Eintrag",
"m_date_comment" => "Format für die Kommentare",
"m_date_subcurrent" => "Format für die Subnavigation",
"m_settings_ok" => "Die Einstellungen wurden gespeichert.",
"e_path" => "Die angegebene URL scheint nicht zu stimmen",
"e_basepath" => "Das angegebene Verzeichnis existiert nicht",
"e_website" => "Bitte Namen des Weblogs eingeben",
"e_publisher" => "Bitte Namen des Betreibers eingeben",
"e_admin_password" => "Bitte Administrationscenter Passwort eingeben",
"e_admin_password_again" => "Bitte Administrationscenter Passwort bestätigen",
"e_email" => "E-Mail Adresse des Betreibers scheint falsch zu sein",
"e_description" => "Bitte eine Beschreibung des Weblogs eingeben",
"e_max_blog_orginal" => "Anzahl der Einträge, die vollständig auf der Startseite erscheinen muss eine Zahl größer oder gleich Null sein",
"e_max_blog_big" => "Anzahl der Einträge, deren Beschreibung auf der Startseite erscheinen muss eine Zahl größer oder gleich Null sein",
"e_max_blog_small" => "Anzahl der Einträge, deren Datum und Name auf der Startseite erscheinen muss eine Zahl größer oder gleich Null sein",
"e_sub_current" => "Anzahl der Einträge, deren Datum und Name in der Subnavigation erscheinen muss eine Zahl größer oder gleich Null sein",
"e_start_year" => "Das versteckte Jahresfeld ist leer",
"e_db" => "Bitte Namen der Datenbank eingeben",
"e_db_url" => "Bitte Datenbank Hostname eingeben",
"e_db_user" => "Bitte Datenbank Benutzernamen eingeben",
"e_db_prefix" => "Das Kürzel, welches als Prefix für die Tabellennamen verwendet werden soll, darf nur aus alphanumerischen Zeichen bestehen. Sie können die Angabe auch leer lassen.",
"e_db_occurred" => "Datenbankfehler",
"e_db_is" => "Es ist ein Fehler auf ".JLOG_PATH." aufgetreten. Der Fehler lautet:",
"s_phpv_tolow" => "Die PHP Version ist zu alt, bitte auf eine neuere upgraden, bzw. deinen Provider danach fragen",
"s_mysqlv_tolow" => "Die MySQL Version ist zu alt, bitte auf eine neuere upgraden, bzw. deinen Provider danach fragen",
"s_personal_not_wrtbl" => "Das Verzeichnis 'personal' ist nicht beschreibbar. (Chmod 777)",
"s_img_not_wrtbl" => "Das Verzeichnis 'img' ist nicht beschreibbar. (Chmod 777)",
"s_tables_ok" => "Tabellen in der Datenbank angelegt.",
"s_ready_head" => "Setup erfolgreich beendet",
"s_ready" => "Glückwunsch! Nun kannst du im <a href='admin/'>Administrations Center</a> den ersten Eintrag machen.",
"s_ready_menu_admin" => "Zum Administrations Center",
"s_ready_menu_home" => "Auf die Startseite",
"s_problem_fwrite" => "Probleme beim Erstellen notwendiger Dateien",
"s_problem_chmod" => "Probleme beim Setzen der Schreibrechte",
"s_problem_fwrite" => "Probleme beim notwendigem Schreiben in Dateien",
"s_personal_ok" => "Dateien im Verzeichnis 'personal' angelegt",
"s_install" => "Installieren",
"login_headline" => "Geschützter Bereich",
"login_password" => "Passwort eingeben:",
"login_send" => "Einloggen",
"login_cookies" => "Hinweis! Cookies müssen aktiv sein.",
"login_false_pw" => "Es wurde ein falsches Passwort eingegeben.",
"cat_name" => "Name der Kategorie",
"cat_url" => "URL im Kategoriearchiv (nur a-z 0-9 _-,. )",
"cat_description" => "Beschreibung der Kategorie, die im Archiv auftaucht",
"cat_new" => "Neue Kategorie anlegen",
"cat_title" => "Kategorien Verwaltung",
"cat_noname" => "Die Kategorie muss einen Namen haben",
"cat_change" => "Die Kategoriedaten ändern",
"cat_new_ok" => "Neue Kategorie angelegt",
"cat_really_trash" => "Folgende Kategorie wirklich löschen? (Alle Informationen gehen verloren)",
"cat_trash_ok" => "Kategorie erfolgreich gelöscht. Zurück zum",
"cat_admincenter" => "Kategorie Administrationscenter",
"cat_duplicate" => "Eine andere Kategorie hat diesen URL schon besetzt.",
"update_start" => 'Update starten!',
"update_successfull_part" => 'Das Update wurde erfolgreich ausgeführt.',
"update_successfull" => "Alle Updates wurden erfolgreich durchgeführt. <a href='../'>Viel Spaß!</a>",
"update_failure" => "Ein Update ist fehlgeschlagen.",
"pingback_closed" => "Pingbacks für diesen Eintrag schließen.",
"plugin_no_content" => "Das Plugin muss nicht administriert werden.",
"plugins_h_not_avaliable" => "Keine Plugins",
"plugins_not_avaliable" => "Es wurden keine Plugins gefunden.",
"plugins_headline" => "Plugin Administration",
// Do not change the folowing line
);
// eof

246
lang/lang-admin.en.inc.php Normal file
View file

@ -0,0 +1,246 @@
<?php $l['admin'] = array (
// Please do not change the above line! Translated from German by Sven Rheindorf
"menu_home" => "Contents",
"menu_categories" => "Categories",
"menu_comments" => "Comments",
"menu_settings" => "Settings",
"menu_plugins" => "Plugins",
"menu_logout" => "Log out",
"new_post" => "Write a new entry",
"index_headline" => "Administration Center",
"change_headline" => "Edit an old entry",
"go" => "Go",
"admin_headline" => "Administration Center",
"change" => "Edit",
"delete" => "Delete",
"date" => "Date",
"headline" => "Headline",
"metadata" => "Metadata",
"contentdata" => "Entry contents",
"url" => "URL for permanent Link (only 0-9 a-z _-,./ )",
"keywords" => "Keywords",
"categories" => "Category (Select more than one category with the help of the <key><abbr title='[Ctrl]'>[Ctrl]</abbr></key> key or the <key>Apple</key> key)",
"no_categories" => "none",
"preview" => "Preview",
"publish" => "Publish",
"submit" => "Submit",
"cancel" => "Cancel",
"no_headline" => "Entry headline is missing.",
"no_url" => "Entry URL is missing.",
"false_url_letters" => "The entry URL may consist of lower case letters, numbers and this characters _-.,/",
"url_duplicate" => "During one month one certain URL may occur only once as Jlog would be confused by two entries bearing one and the same name.",
"url_duplicate_page" => "Pages must have unique URLs, that is to say that every page must have a different URL.",
"false_teaserpic" => "The declaration of the teaser picture is wrong as the specified picture has not been uploaded to the server.",
"no_teaserpic_uploaded" => "The teaser picture cannot be shown in the blog if it has not been uploaded to the server.",
"no_teaser" => "Entry teaser is missing.",
"no_content" => "Entry content is missing.",
"pic_for_teaser" => "A picture to be shown next to the teaser (max. 150px):",
"pic_upload" => "Upload the picture",
"pic_choose" => "Select a picture",
"show_tpic_on_archive" => "Show this picture on the actual entry page, too.",
"teaser" => "Teaser",
"contentpic_choose" => "A picture to be shown next to the entry content:",
"content" => "Entry content",
"howto_bbcode" => "How to use <a href='http://jeenaparadies.net/projects/jlog/wiki/help/bbcodehowto'>BBCode</a>?",
"content_choose_year" => "Choose Year:",
"content_bold" => "bold",
"content_italic" => "italic",
"content_quote" => "Quote",
"content_url" => "Link",
"content_plz_format_txt" => "Please enter the text to be formatted:",
"content_input_on_pos" => "Paste at position",
"content_url_href" => "Enter link location:",
"content_url_node" => "Enter link text:",
"content_list" => "List",
"content_headline" => "Headline",
"section" => "Type of entry:",
"section_show" => "Show types of entries",
"section_weblog" => "Weblog",
"section_page" => "Page",
"entry_saved" => "Your entry has been saved.",
"data_updated" => "The data have been updated.",
"post_deleted" => "The blog entry has been deleted.",
"index_topic" => "Latest weblog entries",
"yes" => "Yes",
"no" => "No",
"rearly_delete" => "Do you really want do delete this entry?",
"delete_blogentry" => "Delete entry",
"postdeleted" => "The entry has been deleted.",
"error_occurred" => "An error occured.",
"can_not_open" => "Cannot open specified file.",
"can_not_write" => "Cannot write in specified file.",
"no_wrtitenable" => "The specified file is not writable.",
"rss_ok" => "RSS feed and News page have been successfully updated.",
"master_ok" => "The setup file has been successfully updated.",
"pic_choose_old" => "Select an older picture",
"pic_choose_old_teaser" => "Select an older teaser picture",
"pic_upload_header" => "Upload picture",
"pic_upload_teaser" => "Upload teaser picture",
"pic_error" => "Upload error, please notify your server administrator.",
"pic_uploaded" => "Picture has been uploaded.",
"pic_insert" => "Paste a picture",
"pic_instructions" => "Upload only PNG, GIF or JPEG pictures. File size may not exceed 300 kB.",
"pic_upload" => "Upload",
"pic_class" => "CSS Class, if needed",
"pic_alt" => "Alternative text",
"pic_height_widht" => "Picture is too high and too wide.",
"pic_width" => "Picture is too wide.",
"pic_height" => "Picture is too high.",
"pic_instr_teaser" => "Upload only PNG, GIF or JPEG pictures not being wider or higher than 150px and not exceeding file sizes of 60 kB.",
"pic_bad_type" => "Wrong format",
"pic_to_big" => "The picture is too big.",
"kill_c_topic" => "Adminster comments",
"kill_c_killed" => "The comment has successfully been deleted.",
"kill_c_sure" => "Do you really want to delete this comment?",
"kill_c_h2" => "Delete irretrievably",
"kill_c_description" => "Attention: Once a comment is deleted from this list, it will be irretrievably lost!",
"kill_c_entry" => "Weblog entry",
"kill_c_email" => "Delete this comment",
"comments_change_h" => "Edit this comment",
"comments_anonym" => "Anonymous",
"comments_mail_txt" => "New comment on ".JLOG_WEBSITE."\nIts headline is:",
"comments_posted" => "wrote on",
"comments_mailsubject" => "Comment on ".JLOG_WEBSITE,
"comments_comment_topic" => "Comments",
"comments_by" => "Comment of",
"comments_name" => "Name",
"comments_city" => "City / Country",
"comments_email" => "E-mail",
"comments_homepage" => "http://",
"comments_bbcode" => "How to use",
"comments_send" => "Submit",
"comments_preview" => "Preview",
"comments_no_sid" => "Some spoofing seems to be on the go.",
"comments_false_mail" => "Your e-mail address does not look correct.",
"comments_notext" => "No text was entered.",
"comments_false_hp" => "The homepage URL seems to be wrong.",
"comments_permalink" => "Permanent link to this comment",
"comments_from" => "from",
"comments_posted" => "wrote on",
"comments_entryform" => "Edit this comment",
"comments_mail_by_comment" => "Notify me about comments",
"comments_thx" => "The comment has been edited.",
"comments_preview" => "Preview",
"comments_send" => "Submit",
"comments_bold" => "bold",
"comments_italic" => "italic",
"comments_quote" => "Quote",
"comments_url" => "Link",
"comments_plz_format_txt" => "Please enter the text to be formatted:",
"comments_url_href" => "Enter link location:",
"comments_url_node" => "Enter link text:",
"comments_updated" => "The comment has been edited. Back to",
"comments_admin" => "Comment Administration Center",
"comments_closed" => "Disable the comment function for this entry",
"m_writenable" => "writeable",
"m_title" => "Weblog main settings",
"m_clean_url" => "Shall clean URLs (mod_rewrite) be used? Example: http://example.com/2005/01/firefox",
"m_metadata" => "Metadata",
"m_language" => "Language of your weblog",
"m_website" => "Weblog name",
"m_publisher" => "Name of the author of the entries",
"m_admin_password" => "Administration Center password",
"m_admin_password_again" => "Confirm password",
"m_admin_password_admin" => "(keep empty to not change it)",
"m_email" => "E-mail address of the owner of the weblog",
"m_description" => "A short description of the weblog",
"m_bs" => "Notify weblog services about new entries to make them add your entries to their search engine (one per line)",
"m_bs_weblogs_com" => "weblogs.com",
"m_bs_technorati_com" => "technorati.com",
"m_bs_blogg_de" => "blogg.de",
"m_behavior" => "Weblog behavior",
"m_max_blog_orginal" => "Number of entries that are shown completely on the weblog main page",
"m_max_blog_big" => "Number of entries that are announced by their description on the weblog main page",
"m_max_blog_small" => "Number of entries that are announced by their headline and date on the weblog main page",
"m_sub_current" => "Number of entries that are announced by their headline and date in the sub-navigation on every page of the weblog",
"m_info_by_comment" => "Notify the owner of the weblog about new comments",
"m_database" => "Database",
"m_db" => "Name of database",
"m_db_url" => "Hostname of database, usually localhost",
"m_db_user" => "Username of database",
"m_db_pwd" => "Password of database",
"m_db_prefix" => "Short identification code to be prefixed to table names",
"m_date" => "Date format (a format string like the one of the PHP function <a href='http://php.net/strftime'>strftime()</a>)",
"m_date_posting" => "for postings",
"m_date_comment" => "for comments",
"m_date_subcurrent" => "for the subnavigation",
"m_settings_ok" => "Your settings have been saved.",
"e_path" => "The specified URL seems to be wrong.",
"e_basepath" => "The specified directory does not exist.",
"e_website" => "Please enter the name of the weblog.",
"e_publisher" => "Please enter the name of the owner of the weblog.",
"e_admin_password" => "Please enter the password that is required to access the Administration Center.",
"e_admin_password_again" => "Please confirm the password of the Administration Center.",
"e_email" => "The e-mail address of the owner of the weblog seems to be wrong.",
"e_description" => "Please enter a description of the weblog.",
"e_max_blog_orginal" => "Number of entries that are shown completely on the weblog main page must be a number greater than or equal to zero.",
"e_max_blog_big" => "Number of entries that are announced by their description on the weblog main page must be a number greater than or equal to zero.",
"e_max_blog_small" => "Number of entries that are announced by their headline and date on the weblog main page must be a number greater than or equal to zero.",
"e_sub_current" => "Number of entries that are announced by their headline and date in the sub-navigation on every page of the weblog must be a number greater than or equal to zero.",
"e_start_year" => "The hidden year field is empty.",
"e_db" => "Please enter the name of the database.",
"e_db_url" => "Please enter the hostname of the database.",
"e_db_user" => "Please enter the username of the database.",
"e_db_prefix" => "The prefix for table names must not contain anything but alpha-numeric characters. However, you can leave option empty.",
"e_db_occurred" => "Database error",
"e_db_is" => "A error occured in ".JLOG_PATH.". It is:",
"s_phpv_tolow" => "Your PHP version is too old, please upgrade to a newer one or ask your server administrator to do this.",
"s_mysqlv_tolow" => "Your MySQL version is too old, please upgrade to a newer one or ask your server administrator to do this.",
"s_personal_not_wrtbl" => "The directory 'personal' is not writeable. (Chmod 777)",
"s_img_not_wrtbl" => "The directory 'img' is not writeable. (Chmod 777)",
"s_tables_ok" => "Tables have been created in the database.",
"s_ready_head" => "Setup has been successfully finished.",
"s_ready" => "Congratulations! You can start writing your first blog entry in the <a href='admin/index.php'>Administration Center</a>.",
"s_ready_menu_admin" => "To the Administration Center",
"s_ready_menu_home" => "To the weblog main page",
"s_problem_fwrite" => "Problems occured during the Creation of required files.",
"s_problem_chmod" => "Problems occured while setting write permissions.",
"s_problem_fwrite" => "Problems occured during required writing access to files.",
"s_personal_ok" => "Files in the directory 'personal' have been created.",
"s_install" => "Install",
"login_headline" => "Protected area",
"login_password" => "Enter password:",
"login_send" => "Log in",
"login_cookies" => "Please note: Cookies must be activated in your browser!",
"login_false_pw" => "Wrong password entered.",
"cat_name" => "Category name",
"cat_url" => "URL in category archive (only a-z 0-9 _-,. )",
"cat_description" => "Category descriptiom that occurs in the archive",
"cat_new" => "Create new category",
"cat_title" => "Categories management",
"cat_noname" => "The category must have a name.",
"cat_change" => "Edit category data",
"cat_new_ok" => "The new category has been created.",
"cat_really_trash" => "Do you really want to delete the following category? (All information will be lost.)",
"cat_trash_ok" => "The category has successfully been deleted. Back to",
"cat_admincenter" => "Categories Administration Center",
"cat_duplicate" => "Another category is already using this URL.",
"update_start" => 'Perform update!',
"update_successfull_part" => 'This update has been performed successfully.',
"update_successfull" => "All updates have been performed. <a href='../'>Have fun!</a>",
"update_failure" => "Ein Update ist fehlgeschlagen.",
"pingback_closed" => "Close pingbacks for this entry.",
"plugin_no_content" => "There is no need to administrate this plugin.",
"plugins_h_not_avaliable" => "No plugins available",
"plugins_not_avaliable" => "I couldn't find any plugins.",
"plugins_headline" => "Plugin Administration",
// Do not change the folowing line!
);
// eof

241
lang/lang-admin.it.inc.php Normal file
View file

@ -0,0 +1,241 @@
<?php $l['admin'] = array (
// Please do not change the above line! Translated from English by Enrico Toffoli
"menu_home" => "Contenuti",
"menu_categories" => "Categorie",
"menu_comments" => "Commenti",
"menu_settings" => "Settaggi",
"menu_plugins" => "Plugins",
"menu_logout" => "Log out",
"new_post" => "Scrivi una nuova nota",
"index_headline" => "Administration Center",
"change_headline" => "Modifica una vecchia nota",
"go" => "Vai",
"admin_headline" => "Centro d'amministrazione",
"change" => "Modifica",
"delete" => "Cancella",
"date" => "Data",
"headline" => "Titolo",
"metadata" => "Metadata",
"contentdata" => "Contenuti della nota",
"url" => "URL per Link permanenti (only 0-9 a-z _-,. )",
"keywords" => "Parola chiave",
"categories" => "Categoria (seleziona piu di una categoria con help file di <key><abbr title='[Ctrl]'>[Ctrl]</abbr></key> tasto or the <key>Apple</key> tasto)",
"no_categories" => "nessuna",
"preview" => "Anteprima",
"publish" => "Pubblica",
"submit" => "Inoltrare",
"cancel" => "Cancella",
"no_headline" => "Inseerisci il titolo se mancante.",
"no_url" => "Inserisci URL se mancante.",
"false_url_letters" => "Il nuovo URL deve contenere lettere minuscole, numeri e questi caratteri _-.,/",
"url_duplicate" => "Derante un mese gli URL in Jlog devono avere tutti nomi diversi per evitare che il sistema si confonda.",
"url_duplicate_page" => "La pagina deve avere un solo URLs,in questo modo ogni pagina ha un diverso URL.",
"false_teaserpic" => "Limmagine introduttiva non esiste,limmagine non é stata salvata nel server.",
"no_teaserpic_uploaded" => "Limmagine introduttiva non puo essere mostrata nel blog se non e stata salvata nel server.",
"no_teaser" => "L'introduzzione manca.",
"no_content" => "Inserisci cintenuto perche mancante.",
"pic_for_teaser" => "Un immagine sara visualizzata nella prossima introduzione (max. 150px):",
"pic_upload" => "Upload immagine",
"pic_choose" => "Seleziona una immagine",
"show_tpic_on_archive" => "Mostra questa immagine anche nell'attuale nota.",
"teaser" => "Introduzione",
"contentpic_choose" => "L'immagine sara visualizzata nella nuova categoria:",
"content" => "Contenuti nota",
"howto_bbcode" => "Come usare <a href='http://jeenaparadies.net/projects/jlog/wiki/help/bbcodehowto'>BBCode</a>?",
"content_choose_year" => "Sciegli l'anno:",
"content_bold" => "Grassetto",
"content_italic" => "Corsivo",
"content_quote" => "Citazione",
"content_url" => "Link",
"content_plz_format_txt" => "Perfavore sciegliere il testo per cambiare lo stile:",
"content_input_on_pos" => "Incolla",
"content_url_href" => "Inserisci dove si trova il link:",
"content_url_node" => "Inserisci link testo:",
"content_list" => "Lista",
"content_headline" => "Titolo",
"section" => "Tipo di nota:",
"section_show" => "Mostra tipi di note",
"section_weblog" => "Weblog",
"section_page" => "Pagina",
"entry_saved" => "La tua nota e stata salvata .",
"data_updated" => "I dati sono stati updated.",
"post_deleted" => "La nota deve essere cancellata.",
"index_topic" => "Ultima nota nel weblog",
"yes" => "Si",
"no" => "No",
"rearly_delete" => "Vuoi veramente cancellare questa nota?",
"delete_blogentry" => "Cancella nota",
"postdeleted" => "La nota e stata cancellata.",
"error_occurred" => "Errore in corso.",
"can_not_open" => "Impossibile aprire il file specificato.",
"can_not_write" => "Impossibile scrivere il file specificato.",
"no_wrtitenable" => "Non si puo scrivere questo file.",
"rss_ok" => "RSS feed e News page sono state aggiornate con successo.",
"master_ok" => "Il file di setup e stato aggiornato con successo.",
"pic_choose_old" => "Selezionare foto precedenti",
"pic_choose_old_teaser" => "Select an older teaser picture",
"pic_upload_header" => "Aggiorna immagini",
"pic_upload_teaser" => "Upload teaser picture",
"pic_error" => "Errore di aggiornamento, per favore notificarlo all'aministratore del server.",
"pic_uploaded" => "Le immagini sono state aggiornate.",
"pic_insert" => "Incolla una immagine",
"pic_instructions" => "Aggiornare solo immagini PNG, GIF or JPEG. La dimensione del file non deve essere superiore a 300 kB.",
"pic_upload" => "Aggiorna",
"pic_class" => "CSS Class, se necessario",
"pic_alt" => "Testi alternativi",
"pic_height_widht" => "L'immagine e troppo larga e alta.",
"pic_width" => "L'immagine e troppo larga.",
"pic_height" => "L'immagine e troppo alta.",
"pic_instr_teaser" => "Aggiorna solo immagini in PNG, GIF or JPEG non devono essere alte o larghe piu di 150px e non devono eccedere oltre 60 kB.",
"pic_bad_type" => "Formato non valido",
"pic_to_big" => "L'immagine e troppo grande.",
"kill_c_topic" => "Commenti dell'amministratore",
"kill_c_killed" => "Il commento e stato cancellato.",
"kill_c_sure" => "Vuoi veramente cancellare questo commento?",
"kill_c_h2" => "Cancellazione irreversibile",
"kill_c_description" => "Attenzione: Un commento e stato cancellato dalla lista, sara perso per sempre!",
"kill_c_entry" => "Nota Weblog",
"kill_c_email" => "Cancella questo commento",
"comments_change_h" => "Modifica questo commento",
"comments_anonym" => "Anonimo",
"comments_mail_txt" => "Nuovo commento in ".JLOG_WEBSITE."\nIts il titolo e:",
"comments_posted" => "scrivi",
"comments_mailsubject" => "Commento on ".JLOG_WEBSITE,
"comments_comment_topic" => "Commenti",
"comments_by" => "Commento off",
"comments_name" => "Nome",
"comments_city" => "Citta / Paese",
"comments_email" => "E-mail",
"comments_homepage" => "http://",
"comments_bbcode" => "Come si usa",
"comments_send" => "Inoltra",
"comments_preview" => "Anteprima",
"comments_no_sid" => "Stai scherzando?.",
"comments_false_mail" => "L'indirizzo e-mail non e corretto.",
"comments_notext" => "Non e presente nessun testo.",
"comments_false_hp" => "Homepage URL sembra errato.",
"comments_permalink" => "Link permanente per questo commento",
"comments_from" => "da",
"comments_posted" => "scrivi",
"comments_entryform" => "Modifica questo commento",
"comments_mail_by_comment" => "Tienimi informato su questo commento",
"comments_thx" => "Il commento é stato creato con successo.",
"comments_preview" => "Anteprima",
"comments_send" => "Inoltra",
"comments_bold" => "Grassetto",
"comments_italic" => "Corsivo",
"comments_quote" => "Quote",
"comments_url" => "Link",
"comments_plz_format_txt" => "Perfavore sciegliere il testo per cambiare lo stile:",
"comments_url_href" => "Inserire la locazione del link:",
"comments_url_node" => "Inserire link text:",
"comments_updated" => "Il commento e stato creato. Indietro",
"comments_admin" => "Commento Administration Center",
"comments_closed" => "Disabilita i commenti per questa nota",
"m_writenable" => "writeable",
"m_title" => "Weblog settaggi",
"m_clean_url" => "Pulire URLs (mod_rewrite) usati? Esempio: http://example.com/2005/01/firefox",
"m_metadata" => "Metadata",
"m_language" => "Lingua del vostro weblog",
"m_website" => "Nome Weblog",
"m_publisher" => "Nome dell'autore della nota",
"m_admin_password" => "Administration Center password",
"m_admin_password_again" => "Conferma password",
"m_admin_password_admin" => "(lascia vuoto per non cambiarla)",
"m_email" => "E-mail del proprietario del weblog",
"m_description" => "Piccola descrizione del weblog",
"m_bs" => "Notifica quando si aggiungono nuove note (uno per riga)",
"m_bs_weblogs_com" => "weblogs.com",
"m_bs_technorati_com" => "technorati.com",
"m_bs_blogg_de" => "blogg.de",
"m_behavior" => "Carattere weblog",
"m_max_blog_orginal" => "Il numero delle note si strova nella pagina principale",
"m_max_blog_big" => "Numero di note con descrizione presenti nella pagina principale del weblog",
"m_max_blog_small" => "Numero di note con titolo e data presenti nella pagina principale del weblog",
"m_sub_current" => "Numero di note che sono introdotte da titolo e data ipresenti nelle altre pagine del weblog",
"m_info_by_comment" => "Avvisa il proprietario della nota quando ci sono nuovi commenti ",
"m_database" => "Database",
"m_db" => "Nome database",
"m_db_url" => "Hostname del database, solitamente localhost",
"m_db_user" => "Username del database",
"m_db_pwd" => "Password del database",
"m_db_prefix" => "Codice identificazione per prefissi in table names",
"m_date" => "Forma data (a format string like the one of the PHP function <a href='http://php.net/strftime'>strftime()</a>)",
"m_date_posting" => "per affissioni",
"m_date_comment" => "per commenti",
"m_date_subcurrent" => "per la subnavigation",
"m_settings_ok" => "I tuoi settaggi sono stati salvati.",
"e_path" => "Specificare URL perche non corretto.",
"e_basepath" => "Specificare directory non esiste.",
"e_website" => "Perfavore inserire il nome weblog.",
"e_publisher" => "Perfavore inserire il nome del propietario del weblog.",
"e_admin_password" => "Inserire la password necessaria per avere accesso all'Administration Center.",
"e_admin_password_again" => "Confermare password per Administration Center.",
"e_email" => "L'e-mail del propietario del weblog non e corretto.",
"e_description" => "Inserire descrizione del weblog.",
"e_max_blog_orginal" => "Il numero di note e visualizzato nella pagina principale e deve essere maggiore o uguale a zero.",
"e_max_blog_big" => "Numero di note con descrizione presenti nella pagina principale del weblog deve essere maggiore o uguale a zero.",
"e_max_blog_small" => "Numero di note con titolo e data presenti nella pagina principale del weblog deve essere maggiore o uguale a zero.",
"e_sub_current" => "Numero di note che sono introdotte da titolo e data ipresenti nelle altre pagine del weblog deve essere maggiore o uguale a zero.",
"e_start_year" => "La casella nascosta dell'anno e vuota.",
"e_db" => "Inserire nome database.",
"e_db_url" => "Inserire hostname del database.",
"e_db_user" => "Inserire username del database.",
"e_db_occurred" => "Errore database",
"e_db_is" => "Errore in ".JLOG_PATH.". E:",
"s_phpv_tolow" => "La tua versione del PHP e troppo vecchia, perfavore aggiornare o chiedere all'aministrator del server.",
"s_mysqlv_tolow" => "La tuaversione del MySQL e troppo vecchia, perfavore aggiornare o chiedere all'aministrator del server.",
"s_personal_not_wrtbl" => "La directory 'personal' non puo essere scritta. (Chmod 777)",
"s_img_not_wrtbl" => "La directory 'img' non puo essere scritta. (Chmod 777)",
"s_tables_ok" => "Le tabelle sono state create nel database.",
"s_ready_head" => "Installazione completata con successo.",
"s_ready" => "Tanti auguri! Puoi iniziare a scrivere a scrivere la tua prima nota in <a href='admin/index.php'>Administration Center</a>.",
"s_ready_menu_admin" => "Per Administration Center",
"s_ready_menu_home" => "Per la pagina principale del weblog",
"s_problem_fwrite" => "Problema durante la creazione del file richiesto.",
"s_problem_chmod" => "Problema durante setting write permissions.",
"s_problem_fwrite" => "Problema durante la scrittura del file.",
"s_personal_ok" => "I file in 'personal' sono stati creati.",
"s_install" => "Installa",
"login_headline" => "Area protetta",
"login_password" => "Inserisci password:",
"login_send" => "Log in",
"login_cookies" => "Attenzione: I Cookies devono essere attivati nel tuo browser!",
"cat_name" => "Nome categoria",
"cat_url" => "URL in archivio categorie (only a-z 0-9 _-,. )",
"cat_description" => "Descrizione della categoria richiesta",
"cat_new" => "Crea una nuova categoria",
"cat_title" => "Gestione categorie",
"cat_noname" => "La categoria deve avere un nome.",
"cat_change" => "Modifica data categoria",
"cat_new_ok" => "Una nuova categoria e stata creata.",
"cat_really_trash" => "Vuoi veramente cancellare la seguente categoria? (Tutte le informazioni saranno perse.)",
"cat_trash_ok" => "La categoria e stata cancellata. Indietro",
"cat_admincenter" => "Categorie Administration Center",
"cat_duplicate" => "Un altra categoria sta usando questo URL.",
"update_successfull" => "Aggiornato con successo. <a href='../index.php'>Have fun!</a>",
"pingback_closed" => "Chiudi pingbacks per questa nota.",
"plugin_no_content" => "Non occorre questo plugin.",
"plugins_h_not_avaliable" => "Plugin non disponibili",
"plugins_not_avaliable" => "Non trovo nessun plugins.",
"plugins_headline" => "Plugin Administration",
// Do not change the folowing line!
);
// eof

241
lang/lang-admin.pl.inc.php Normal file
View file

@ -0,0 +1,241 @@
<?php $l['admin'] = array (
// Please do not change the above line! Translated from English by Mariola Mandla and a little help from irc.freenode.net#Python.pl
"menu_home" => "Zawartosść",
"menu_categories" => "Kategorie",
"menu_comments" => "Komentarze",
"menu_settings" => "Konfiguracja",
"menu_plugins" => "Wtyczki",
"menu_logout" => "Wyloguj śię",
"new_post" => "Napisz nowy watek",
"index_headline" => "Centrum Administracyjne",
"change_headline" => "Edytuj stary watek",
"go" => "Start",
"admin_headline" => "Centrum Administracyjne",
"change" => "Edytuj",
"delete" => "Kasuj",
"date" => "Data",
"headline" => "Nagłówek",
"metadata" => "Metadane",
"contentdata" => "Zawartość watku",
"url" => "URL na permanentny link (tylko 0-9 a-z _-,./ )",
"keywords" => "Słowa kluczowe",
"categories" => "Kategoria (Wybierz więcej niż jedną kategorię za pomocą klawisza <key>[Ctrl]</key> albo klawisza <key>Apple</key>)",
"no_categories" => "żadna",
"preview" => "Podgląd",
"publish" => "Publikuj",
"submit" => "Zaloguj",
"cancel" => "Anuluj",
"no_headline" => "Brak nagłówka watku.",
"no_url" => "Brak URL watku.",
"false_url_letters" => "W URL możecz tylko używac a do z i _-.,/",
"url_duplicate" => "W ciągu jednego miesiąca określony URL może się pojawic tylko raz,",
"url_duplicate_page" => "Strony muszą mieć unikalne URLe, co oznacza że każda strona musi mieć inny URL.",
"false_teaserpic" => "Okreslony obrazek nie zostal zapisany na serwerze.",
"no_teaserpic_uploaded" => "Obrazek skróconego opisu nie moze byc pokazany w blogu jesli nie zoatal zapisany na serwerze.",
"no_teaser" => "Brak skróconego opisu.",
"no_content" => "Brak zawartośći artykułu.",
"pic_for_teaser" => "Obrazek który zostanie pokazany przy skróconym opisie (max. 150px):",
"pic_upload" => "Sciągnij obrazek",
"pic_choose" => "Wybierz obrazek",
"show_tpic_on_archive" => "Pokaz ten obrazek rowniez na bieżącej stronie.",
"teaser" => "Skrócony opis",
"contentpic_choose" => "Obrazek który zostanie pokazany przy zawartośći arkykułu:",
"content" => "Zawartość artykułu",
"howto_bbcode" => "Jak używać <a href='http://jeenaparadies.net/projects/jlog/wiki/help/bbcodehowto'>BBCode</a>?",
"content_choose_year" => "Wybierz rok:",
"content_bold" => "wytluszczony",
"content_italic" => "pochyły",
"content_quote" => "cytat",
"content_url" => "link",
"content_plz_format_txt" => "Prosze wprowadzic tekst do sformatowania:",
"content_input_on_pos" => "Wklej do",
"content_url_href" => "Wprowadź lokalizacje linku:",
"content_url_node" => "Wprowadź tekst linku:",
"content_list" => "Lista",
"content_headline" => "Naglówek",
"section" => "Rodzaj watku:",
"section_show" => "Pokaż rodzaje watkuw",
"section_weblog" => "Weblog",
"section_page" => "Strona",
"entry_saved" => "Twój watek został zapisany.",
"data_updated" => "Dane zostaly uaktualnione.",
"post_deleted" => "Watek zostal usuniety.",
"index_topic" => "Ostatnie wejscia na weblog",
"yes" => "Tak",
"no" => "Nie",
"rearly_delete" => "Czy jestes pewny/a ze chcesz zlikwidowac ten watek?",
"delete_blogentry" => "Zlikwiduj watek",
"postdeleted" => "Watek zostal zlikwidowany.",
"error_occurred" => "Pojawil sie blad.",
"can_not_open" => "Nie da sie otworzyc tego dokumentu.",
"can_not_write" => "Cannot write in specified file.",
"no_wrtitenable" => "The specified file is not writable.",
"rss_ok" => "RSS feed and News page zostaly pomyslnie uaktualnione.",
"master_ok" => "setup zostal pomyslnie uaktualniony.",
"pic_choose_old" => "Wybierz starszy obrazek",
"pic_choose_old_teaser" => "Wybierz starszy obrazek skróconego opisu",
"pic_upload_header" => "Wyślij obrazek",
"pic_upload_teaser" => "Wyślij obrazek skróconego opisu",
"pic_error" => "Wyślij raport o błedzie, prosze zawiadomic administratora swojego serwera.",
"pic_uploaded" => "Obrazek zostal wysłany.",
"pic_insert" => "Wklej obrazek",
"pic_instructions" => "Wyślij tylko obrazki o rozszerzeniu PNG, GIF lub JPEG. Rozmiar dokumentu nie może przekroczyc 300 kB.",
"pic_upload" => "Wyślij",
"pic_class" => "w potżebie klassa CSS",
"pic_alt" => "tekst alternatywny",
"pic_height_widht" => "Obrazek jest zbyt wysoki i zbyt szeroki.",
"pic_width" => "Obrazek jest zbyt szeroki.",
"pic_height" => "Obrazek jest zbyt wysoki.",
"pic_instr_teaser" => "Wyslij tylko obrazki z rozszerzeniem PNG, GIF lub JPEG, ktore nie sa szersze ani wyzsze niz 150px i rozmiar dokumentu nie przekracza 60 kB.",
"pic_bad_type" => "Zły format",
"pic_to_big" => "Obrazek jest zbyt duży.",
"kill_c_topic" => "Komentarze administratora",
"kill_c_killed" => "Komentarz został pomyślnie usuniety.",
"kill_c_sure" => "Czy jesteś pewny ze chcesz usunąć ten komentarz?",
"kill_c_h2" => "Usuń calkowicie",
"kill_c_description" => "Uwaga: Gdy komentarz zostanie usunięty z listy, nie będzie możliwe jego odtworzenie!",
"kill_c_entry" => "Weblog artykół",
"kill_c_email" => "Usuń ten komentarz",
"comments_change_h" => "Edytuj ten komentarz",
"comments_anonym" => "Anonim",
"comments_mail_txt" => "Nowy komentarz na ".JLOG_WEBSITE."\nJego nagłówek jest:",
"comments_posted" => "pisany",
"comments_mailsubject" => "Komentarz na ".JLOG_WEBSITE,
"comments_comment_topic" => "Komentarze",
"comments_by" => "komentarz od",
"comments_name" => "Imię",
"comments_city" => "Miejscowość / Kraj",
"comments_email" => "emaila",
"comments_homepage" => "http://",
"comments_bbcode" => "Jak używać",
"comments_send" => "Wyślij",
"comments_preview" => "Podgląd",
"comments_no_sid" => "To wygląda na manipulację.",
"comments_false_mail" => "Twoj adres emaila jest niepoprawny.",
"comments_notext" => "Nie został wprowadzony tekst.",
"comments_false_hp" => "URL strony glównej jest błedny.",
"comments_permalink" => "Permanentny link do tego komentarza",
"comments_from" => "od",
"comments_posted" => "pisany",
"comments_entryform" => "Edytuj ten komentarz",
"comments_mail_by_comment" => "Powiadom mnie o komentarzach",
"comments_thx" => "Komentarz został edytowany.",
"comments_preview" => "Podgląd",
"comments_send" => "Wyślij",
"comments_bold" => "wytluszczony",
"comments_italic" => "pochyły",
"comments_quote" => "cytat",
"comments_url" => "link",
"comments_plz_format_txt" => "Prosze wprowadzić tekst do sformatowania:",
"comments_url_href" => "Wprowadź link location:",
"comments_url_node" => "Wprowadź tekst linka:",
"comments_updated" => "Komentarz został edytowany. Z powrotem do",
"comments_admin" => "Centrum administrowania komentarzy",
"comments_closed" => "Wyłącz komentaże teko artykułu",
"m_writenable" => "prawo do zapisu",
"m_title" => "Główne ustawienia webloga",
"m_clean_url" => "Używac ładne URL (mod_rewrite)? Przykład: http://example.com/2005/01/firefox",
"m_metadata" => "Metadane",
"m_language" => "Jezyk twojego webloga",
"m_website" => "Nazwa webloga",
"m_publisher" => "Imie autora watkow",
"m_admin_password" => "Haslo centrum administracyjnego",
"m_admin_password_again" => "Potwierdź hasło",
"m_admin_password_admin" => "(zostaw puste abe nie zmieniać)",
"m_email" => "Address emaila właściciela tego webloga",
"m_description" => "Krótki opis webloga",
"m_bs" => "Zawiadom serwisy blogowe o nowym artykule aby dodali jego do swoich przeszukiwarek (jeden na linję)",
"m_bs_weblogs_com" => "weblogs.com",
"m_bs_technorati_com" => "technorati.com",
"m_bs_blogg_de" => "blogg.de",
"m_behavior" => "zachowanie na weblogu",
"m_max_blog_orginal" => "Ile artykułuw pokazać na stronie głównej?",
"m_max_blog_big" => "Ile krótkich opisów artykułuw pokazać na stronie głównej?",
"m_max_blog_small" => "Ile nagłówkuw z datą artykułuw pokazać na stronie głównej?",
"m_sub_current" => "Ile nagłówkuw z datą artykułuw pokazać na boku każdej strony webloga?",
"m_info_by_comment" => "Zawiadom własciciela webloga o nowych komentarzach",
"m_database" => "Baza danych",
"m_db" => "Nazwa bazy danych",
"m_db_url" => "Hostname bazy danych, normalnie localhost",
"m_db_user" => "Użytkownik bazy danych",
"m_db_pwd" => "Haslo bazy danych",
"m_db_prefix" => "Krótki prefix nazw tabelów",
"m_date" => "Format daty (jak w funkcji PHP <a href='http://php.net/strftime'>strftime()</a>)",
"m_date_posting" => "dla artykułuw",
"m_date_comment" => "dla komentarzy",
"m_date_subcurrent" => "dla bocznej nawigacji",
"m_settings_ok" => "Twoje ustawienia zostaly zapisane.",
"e_path" => "Dany URL jest błedny.",
"e_basepath" => "Nie ma danego katalogu.",
"e_website" => "Prosze wprowadzic nazwę webloga.",
"e_publisher" => "Prosze wprowadzic imię właųciciela webloga.",
"e_admin_password" => "Prosze wprowadzic hasło dostępu do centrum administracyjnego.",
"e_admin_password_again" => "Prosze potwierdzic hasło centrum administracyjnego.",
"e_email" => "Adres emaila właściciela webloga jest błedny.",
"e_description" => "Prosze wprowadzic opis webloga.",
"e_max_blog_orginal" => "Ilość artykułuw na głównej stronie muśi byci 0 albo więcej.",
"e_max_blog_big" => "Ilość skróconegych opisuw na głównej stronie muśi byci 0 albo więcej.",
"e_max_blog_small" => "Ilość nagłówkuw z datą na głównej stronie muśi byci 0 albo więcej.",
"e_sub_current" => "Ilość nagłówkuw z datą na boku każdej strony muśi byci 0 albo więcej.",
"e_start_year" => "Ukryty rok był pusty.",
"e_db" => "Prosze wprowadzic nazwę bazy danych.",
"e_db_url" => "Prosze wprowadzic the nazwa hosta bazy danych.",
"e_db_user" => "Prosze wprowadzic imie użytkownika bazy danych.",
"e_db_occurred" => "Bład bazy danych",
"e_db_is" => "Pojawił się bład w ".JLOG_PATH.". To jest:",
"s_phpv_tolow" => "Twoja wersja PHP jest zbyt stara, proszę zaopatrzyć się w nowszą lub poprosić o to administratora serwera.",
"s_mysqlv_tolow" => "Twoja wersja MySQL jest zbyt stara, proszę zaopatrzyć się w nowszą lub poprosić o to administratora serwera.",
"s_personal_not_wrtbl" => "Nie mam prawa pisac do kataloga 'personal'. (Chmod 777)",
"s_img_not_wrtbl" => "Nie mam prawa pisac do kataloga 'img'. (Chmod 777)",
"s_tables_ok" => "Tabely bazy danych zostały ztwożone.",
"s_ready_head" => "Twój nowy weblog został utworzony.",
"s_ready" => "Gratulacje! Mozesz zacząć pisac swój pierwszy wpis w <a href='admin/index.php'>centrum administracynym</a>.",
"s_ready_menu_admin" => "Do centrum administracyjnego",
"s_ready_menu_home" => "Do strony glównej weblogu",
"s_problem_chmod" => "Błąd w ciągu ustawienia prawa pisania.",
"s_problem_fwrite" => "Błąd w ciągu pisania danych do pliku.",
"s_personal_ok" => "Pliki w katalogu 'personal' zostały utworzona.",
"s_install" => "Instaluj",
"login_headline" => "Obszar chroniony",
"login_password" => "Wprowadź hasło:",
"login_send" => "Zaloguj się",
"login_cookies" => "Uwaga: Cookie muszą być aktywne w twojej przeglądarce!",
"login_false_pw" => "Wprowadzono złe hasło.",
"cat_name" => "Nazwa kategorii",
"cat_url" => "URL archiwie kategorii (tylko a-z 0-9 _-,. )",
"cat_description" => "Opis kategorii które pojawiły się w archiwum",
"cat_new" => "Stwóz nową kategorie",
"cat_title" => "Zarzadzanie kategoriami",
"cat_noname" => "Kategoria musi mieć nazwę.",
"cat_change" => "Edytuj dane kategorii",
"cat_new_ok" => "Została utworzona nowa kategoria.",
"cat_really_trash" => "Czy jesteś pewny że chcesz usunąć następujacą kategorie? (Wszystkie informacje zostaną stracone.)",
"cat_trash_ok" => "Kategoria została pomyńlnie usunięta. Z powrotem do",
"cat_admincenter" => "Centrum administracji kategoriami",
"cat_duplicate" => "Inna kategoria już używa tego URL.",
"update_successfull" => "Uaktualnienie zostało pomyślnie dokonane. <a href='../index.php'>Have fun!</a>",
"pingback_closed" => "Nie dopuścić pingbacków dla tego artykułu.",
"plugin_no_content" => "Nie potrzeba administrować tego pluginu.",
"plugins_h_not_avaliable" => "Nie ma pluginuw",
"plugins_not_avaliable" => "Nie mozna znalezc zadnych pluginuw.",
"plugins_headline" => "Administracja pluginuw",
// Do not change the folowing line!
);
// eof

241
lang/lang-admin.sv.inc.php Normal file
View file

@ -0,0 +1,241 @@
<?php $l['admin'] = array (
// Please do not change the above line! Translated from English by Jeena Paradies and Vlona Koorbash
"menu_home" => "Innehåll",
"menu_categories" => "Kategorier",
"menu_comments" => "Kommentarer",
"menu_settings" => "Inställningar",
"menu_plugins" => "Plugins",
"menu_logout" => "Logga ut",
"new_post" => "Skriv ett nytt inlägg",
"index_headline" => "Administrationscenter",
"change_headline" => "Editera ett gammalt inlägg",
"go" => "Go",
"admin_headline" => "Administrationscenter",
"change" => "Editera",
"delete" => "Radera",
"date" => "Datum",
"headline" => "Rubrik",
"metadata" => "Metadata",
"contentdata" => "Innehåll",
"url" => "URL för permanent länk (bara 0-9 a-z _-,./ )",
"keywords" => "Nyckelord",
"categories" => "Kategori (Välj flera kategorier med hjälp av <key>[Ctrl]</key> eller <key>Command</key> tangenten)",
"no_categories" => "ingen",
"preview" => "Förhandsgranskning",
"publish" => "Publicera",
"submit" => "Skicka",
"cancel" => "Avbryt",
"no_headline" => "Rubriken fattas.",
"no_url" => "URL fattas.",
"false_url_letters" => "URLen får bara innehålla små bokstäver, siffror eller _-.,/",
"url_duplicate" => "Exakt samma webblogginlägg-url får ej förekomma två gånger under samma månad",
"url_duplicate_page" => "Alla sidor-url:er måsta vara unika.",
"false_teaserpic" => "Teaserbilden har inte blivit upladdad än.",
"no_teaserpic_uploaded" => "Teaserbilden kan inte visas om den inte är uppladdad.",
"no_teaser" => "Teaser fattas.",
"no_content" => "Innehåll fattas.",
"pic_for_teaser" => "Bilden som ska visas i teasern (max 150px):",
"pic_upload" => "Ladda upp bild",
"pic_choose" => "Välj bild",
"show_tpic_on_archive" => "Visa bilden även i bloggen.",
"teaser" => "Teaser",
"contentpic_choose" => "Bilden som visas i innehåll:",
"content" => "Innehåll",
"howto_bbcode" => "Hur använder man <a href='http://jeenaparadies.net/projects/jlog/wiki/help/bbcodehowto'>BBCode</a>?",
"content_choose_year" => "Välj år:",
"content_bold" => "fet",
"content_italic" => "kursiv",
"content_quote" => "citera",
"content_url" => "länk",
"content_plz_format_txt" => "Skriv in texten som ska formateras:",
"content_input_on_pos" => "Klistra in vid position:",
"content_url_href" => "Skriv in URLen:",
"content_url_node" => "Skriv in texten:",
"content_list" => "lista",
"content_headline" => "rubrik",
"section" => "Typ av inlägg:",
"section_show" => "Visa typer av inlägg",
"section_weblog" => "Webblogg",
"section_page" => "Sida",
"entry_saved" => "Inlägg har sparats.",
"data_updated" => "Datan har uppdaterats.",
"post_deleted" => "Blogginlägg har raderats.",
"index_topic" => "Senaste blogginlägg",
"yes" => "Ja",
"no" => "Nej",
"rearly_delete" => "Är du säker att du vill radera inlägget?",
"delete_blogentry" => "Radera inlägget",
"error_occurred" => "Ett fel har upstått.",
"can_not_open" => "Kan inte öppna filen.",
"can_not_write" => "Kan inte spara filen.",
"no_wrtitenable" => "Det går inte att skriva till filen.",
"rss_ok" => "RSS och 'aktuellt' har uppdaterats.",
"master_ok" => "Setupfilen har uppdaterats.",
"pic_choose_old" => "Välj en gammal bild",
"pic_choose_old_teaser" => "Välj en gammal teaserbild",
"pic_upload_header" => "Ladda upp en bild",
"pic_upload_teaser" => "Ladda upp en teaserbild",
"pic_error" => "Det har uppstått ett fel, kontakta serveradministratören.",
"pic_uploaded" => "Bilden har laddats upp.",
"pic_insert" => "Infoga bilden",
"pic_instructions" => "Endast uppladdning av PNG-, GIF- eller JPEG-bilder. Bilden får inte vara större än 300 kB.",
"pic_upload" => "Ladda upp",
"pic_class" => "CSS klass (vid behov)",
"pic_alt" => "Alternativtext",
"pic_height_widht" => "Bilden är för bred och för hög.",
"pic_width" => "Bilden är för bred.",
"pic_height" => "Bilden är för hög.",
"pic_instr_teaser" => "Endast uppladdning av PNG-, GIF- eller JPEG-bilder som inte är bredare än 150px och inte större än 60 kB.",
"pic_bad_type" => "Fel bildformat",
"pic_to_big" => "Bilden är för stor.",
"kill_c_topic" => "Administrera kommentarer",
"kill_c_killed" => "Kommentaren raderades.",
"kill_c_sure" => "Är du säker att du vill radera kommentaren?",
"kill_c_h2" => "Radera",
"kill_c_description" => "Varning! När en kommentar en gång har tagits bort från denna lista, är den oåterkalleligen raderad.",
"kill_c_entry" => "Webblogg inlägg",
"kill_c_email" => "Radera kommentaren",
"comments_change_h" => "Editera kommentaren",
"comments_anonym" => "Anonym",
"comments_mail_txt" => "Ny kommentar på ".JLOG_WEBSITE."\nRubriken var:",
"comments_posted" => "skriven",
"comments_mailsubject" => "Kommentar på ".JLOG_WEBSITE,
"comments_comment_topic" => "Kommentarer",
"comments_by" => "Kommentar från",
"comments_name" => "Namn",
"comments_city" => "Stad / Land",
"comments_email" => "e-post",
"comments_homepage" => "http://",
"comments_bbcode" => "Hur använder jag",
"comments_send" => "Skicka",
"comments_preview" => "Förhandsgranskning",
"comments_no_sid" => "Det verkar ha skett en manipulation",
"comments_false_mail" => "E-postadressen ser inte korrekt ut",
"comments_notext" => "Ingen text har skrivits",
"comments_false_hp" => "Kontrollera att rätt URL har angivits",
"comments_anonym" => "Anonym",
"comments_permalink" => "Permanent länk till denna kommentar",
"comments_from" => "från",
"comments_posted" => "skrev den",
"comments_entryform" => "Din kommentar",
"comments_mail_by_comment" => "Underrätta vid kommentar",
"comments_thx" => "Kommentaren blev uppdaterat.",
"comments_preview" => "Förhandsgranskning",
"comments_bold" => "fet",
"comments_italic" => "kursiv",
"comments_quote" => "citera",
"comments_url" => "länk",
"comments_updated" => "Kommentaren har uppdaterats. Gå tillbaks till",
"comments_admin" => "Kommentar-administationscenter",
"comments_plz_format_txt" => "Vänligen ange texten som ska formateras",
"comments_url_href" => "Ange länkmål:",
"comments_url_node" => "Ange länktext:",
"comments_closed" => "Kommentarerna är stängda för detta inlägg.",
"m_title" => "Huvudinställningar",
"m_clean_url" => "Ska rena URLer (mod_rewrite) användas? Exempel: http://example.com/2005/01/firefox",
"m_metadata" => "Metadata",
"m_language" => "Din webbloggs språk",
"m_website" => "Webbloggs namn",
"m_publisher" => "Författarens namn",
"m_admin_password" => "Administrationcenter lösenord",
"m_admin_password_again" => "Bekräfta lösenordet",
"m_admin_password_admin" => "(lämna blank för att inte ändra)",
"m_email" => "Författarens e-postadress",
"m_description" => "En kort introduktion om bloggen",
"m_bs" => "Notifera webblogg-services om nya inlägg så de kan lägga till den i sin sökmotor (en service per linje)",
"m_bs_weblogs_com" => "weblogs.com",
"m_bs_technorati_com" => "technorati.com",
"m_bs_blogg_de" => "blogg.de",
"m_behavior" => "Webbloggbeteende",
"m_max_blog_orginal" => "Hur många inlägg ska visas komplett på startsidan?",
"m_max_blog_big" => "Hur många inlägg ska visas som ingress på startsidan?",
"m_max_blog_small" => "Hur många inlägg ska visas som en lista med rubrik och datum på startsidan?",
"m_sub_current" => "Hur många inlägg ska visas i subnavigationen?",
"m_info_by_comment" => "E-post till författaren att en ny kommentar har inkommit",
"m_database" => "Databas",
"m_db" => "Databasens namn",
"m_db_url" => "Databasens hostnamn, oftast localhost",
"m_db_user" => "Databasens användarnamn",
"m_db_pwd" => "Databasens lösenord",
"m_db_prefix" => "Kort identifikation som prefix på tabellnamn i databasen",
"m_date" => "Datumformat (en formatsträng som i PHP-funktionen <a href='http://php.net/strftime'>strftime()</a>)",
"m_date_posting" => "för inlägg",
"m_date_comment" => "för kommentarer",
"m_date_subcurrent" => "för subnavigationen",
"m_settings_ok" => "Dina inställningar har sparats.",
"e_path" => "URLen verkar fel.",
"e_basepath" => "Katalogen existerar inte.",
"e_website" => "Skriv in bloggens namn.",
"e_publisher" => "Skriv in författarens namn.",
"e_admin_password" => "Skriv in lösenordet till administrationscentret.",
"e_admin_password_again" => "Skriv in lösenordet en gång till för att verifiera den.",
"e_email" => "E-postadressen verkar fel.",
"e_description" => "Skriv in en kort beskrivning om bloggen.",
"e_max_blog_orginal" => "Antal av inlägg som ska visas komplett på startsidan måsta vara noll eller mer.",
"e_max_blog_big" => "Antal av inlägg som ska visas som ingress på startsidan måsta vara noll eller mer.",
"e_max_blog_small" => "Antal av inlägg som ska visas som en lista med rubrik och datum på startsidan måsta vara noll eller mer.",
"e_sub_current" => "Antal av inlägg som ska visas som en lista med rubrik och datum i subnavigationen måsta vara noll eller mer.",
"e_start_year" => "Gömda fälten för året är tom.",
"e_db" => "Skriv in databasens namn.",
"e_db_url" => "Skriv in databasens hostnamn.",
"e_db_user" => "Skriv in databasens användernamn.",
"e_db_occurred" => "Databas fel",
"e_db_is" => "Ett fel har uppstått på ".JLOG_PATH.". Det är:",
"s_phpv_tolow" => "Din PHP-version är för gammal, vänligen uppgradera till en nyare eller be din serveradministratör att göra det.",
"s_mysqlv_tolow" => "Din MYSQL-version är för gammal, vänligen uppgradera till en nyare eller be din serveradministratör att göra det.",
"s_personal_not_wrtbl" => "Det går inte att skriva i katalogen 'personal'. (Chmod 777)",
"s_img_not_wrtbl" => "Det går inte att skriva i katalogen 'img'. (Chmod 777)",
"s_tables_ok" => "Tabellerna i databasen har skapats.",
"s_ready_head" => "Bloggen har installerats.",
"s_ready" => "Grattis! Nu kan du börja skriva i <a href='admin/index.php'>administrationscenter</a>",
"s_ready_menu_admin" => "Till administrationscenter",
"s_ready_menu_home" => "Till startsidan",
"s_problem_fwrite" => "Ett problem uppstod medan nödvändiga filer skapades.",
"s_problem_chmod" => "Ett problem uppstod medan rättigheterna till de nödvändiga filerna ändrades.",
"s_personal_ok" => "Filer i katalogen 'personal' skapades.",
"s_install" => "Installera nu!",
"login_headline" => "Administrationscenter",
"login_password" => "Skriv in ditt lösenord:",
"login_send" => "Logga in",
"login_cookies" => "Notera: Du måste ha cookies på i din webbläsare!",
"login_false_pw" => "Fel lösenord.",
"cat_name" => "Kategoriens namn",
"cat_url" => "URL i kategoriarkivet (bara a-z 0-9 _-,. )",
"cat_description" => "Kategoribeskrivning som visas i arkivet",
"cat_new" => "Skapa ny kategori",
"cat_title" => "Kategorimanagement",
"cat_noname" => "Kategorien måste ha ett namn.",
"cat_change" => "Ändra kategoriens data",
"cat_new_ok" => "Ny kategori har skapats.",
"cat_really_trash" => "Är du säker att du vill radera kategorien?",
"cat_trash_ok" => "Kategorien blev raderat. Tillbacks till",
"cat_admincenter" => "Kategori administrationscenter",
"cat_duplicate" => "En annan kategori använder redan samma URL.",
"update_successfull" => "Uppdateringen lyckades. <a href='../index.php'>Ha så kul!</a>",
"pingback_closed" => "Avaktivera pingbacks för detta inlägg.",
"plugin_no_content" => "Man behöver inte administrera pluginet.",
"plugins_h_not_avaliable" => "Inga plugins hittades",
"plugins_not_avaliable" => "Jag kunde inte hitta något plugin.",
"plugins_headline" => "Plugin administration",
// Do not change the folowing line!
);
// eof

121
lang/lang.de.inc.php Normal file
View file

@ -0,0 +1,121 @@
<?php $l = array (
// Please do not change the above line!
"subnav_aboutpage" => "Herzlich Willkommen",
"subnav_current" => "Aktuelle Einträge",
"subnav_info" => "Informationen",
"subnav_rss" => "Aktuelles von dieser Seite per RSS Feed. Mehr darüber erfahren Sie auf der Seite von <a href='http://uckan.info/texte/was-ist-rss/'>Alp Uçkan</a>.",
"subnav_copyright" => "Alle Rechte vorbehalten.",
"subnav_powered" => "Powered by",
"content_posted" => "geschrieben am",
"content_more" => "weiterlesen",
"content_more_title" => "Ganzen Eintrag lesen",
"content_permalink" => "permanenter Link zu diesem Eintrag",
"content_posted" => "Eingestellt am",
"content_archive" => "Ältere Weblogeinträge gibt es im",
"content_archivelink" => "Archiv",
"content_archive_header" => "Archivierte Einträge",
"content_categories_header"=> "Kategorie",
"content_skip" => "Zum Hauptinhalt springen.",
"content_choose_year" => "Das Jahr wählen:",
"content_search_header" => "Suche auf der Webseite",
"content_search" => "suchen",
"content_nothing_found" => "Es wurden 0 Ergebnisse gefunden. Vorschläge:<ul><li>Überprüfen Sie die Schreibweise.</li><li>Suchen Sie mit anderen bzw. weniger Schlüsselwörtern.</li><li>Entfernen Sie Frage- oder Pluszeichen.</li></ul>",
"content_search_topic" => "Weblog durchsuchen",
"content_from" => "von",
"content_comments" => "Kommentare",
"content_comment_plz" => "kommentieren",
"content_comments_title" => "zu Kommentaren springen",
"content_cat_linklist" => "zugeordnete Kategorien",
"content_cat_link" => "Alle Einträge dieser Kategorie anzeigen",
"content_categorieslist_h" => "Kategorien",
"content_archive_preview" => "Vorherige Seite",
"content_archive_next" => "Nächste Seite",
"meta_start" => "Zurück zur Startseite",
"meta_search" => "Suche",
"meta_copyright" => "Urheberrecht",
"comments_comment_topic" => "Kommentare",
"comments_by" => "Kommentar von",
"comments_name" => "Name",
"comments_city" => "Stadt / Land",
"comments_email" => "E-Mail",
"comments_homepage" => "http://",
"comments_bbcode" => "Wie benutze ich",
"comments_send" => "Absenden",
"comments_preview" => "Vorschau",
"comments_no_sid" => "Es scheint eine Manipulation vorzuliegen",
"comments_false_mail" => "Die E-Mail Adresse sieht nicht richtig aus",
"comments_notext" => "Es wurde kein Text eingegeben",
"comments_false_hp" => "Die URL zur Homepage scheint falsch zu sein",
"comments_anonym" => "Anonym",
"comments_permalink" => "Permanenter link zu diesem Kommentar",
"comments_from" => "aus",
"comments_posted" => "schrieb am",
"comments_entryform" => "Dein Kommentar",
"comments_save_data" => "Userdaten in einem Cookie sichern",
"comments_mail_by_comment" => "Bei Kommentar benachrichtigen",
"comments_duplicate" => "Aus versehen wurde das Formular zwei mal abgesandt",
"comments_thx" => "<strong>Danke</strong> - Der Kommentar wurde gespeichert",
"comments_mailsubject" => "Kommentar auf ".JLOG_WEBSITE,
"comments_mail_txt" => "Neuer Kommentar auf ".JLOG_WEBSITE."\nDer Titel war: ",
"comments_stop_receiving" => "Um die Benachrichtigung bei neuen Kommentaren abzustellen klicken Sie hier:",
"comments_stop_successful" => "Die Benachrichtigung wurde abgestellt.",
"comments_preview" => "Vorschau",
"comments_send" => "Senden",
"comments_show" => "Kommentare anzeigen",
"comments_hide" => "Kommentare verstecken",
"comments_bold" => "fett",
"comments_italic" => "kursiv",
"comments_quote" => "Zitat",
"comments_url" => "Link",
"comments_plz_format_txt" => "Bitte gebe den zu formatierenden Text ein:",
"comments_url_href" => "Linkziel eingeben:",
"comments_url_node" => "Linktext eingeben:",
"comments_closed" => "Die Kommentare sind für diesen Eintrag geschlossen.",
"comments_teaser_closed" => "(Kommentare geschlossen)",
"pingback_topic" => "Pingbacks",
"db_error" => "Datenbankfehler",
"plz_try_again" => "Bitte versuchen Sie es später noch einmal.",
"error" => "Fehler",
"err404_topic" => "Fehler 404 - Seite nicht gefunden",
"err404_message" => "Diese Seite existiert leider nicht. Versuchen Sie sie über die Suchfunktion zu finden.",
"language" => "de-de",
"locale" => array('de_DE.UTF-8', 'de_DE.UTF-8@euro', 'de_DE'),
"date_format" => "%d. %B %Y um %H:%M Uhr",
"date_format_comment" => "%d.%m.%Y",
"date_format_subcurrent" => "%d.%m.%Y",
"index_topic" => "Startseite",
"bbtitle" => "BBcode nutzen",
"bbxmp" => "<ul><li>Zeilenumbrüche werden automatisch erzeugt und man kann die Codeschnipsel auch kombinieren.</li>
<li>[url]<a href='http://example.com'>http://example.com</a>[/url]</li>
<li>[url=http://example.com]<a href='http://example.com'>Beispiellink</a>[/url]</li>
<li>[b]<strong>fett</strong>[/b]</li>
<li>[i]<em>kursiv</em>[/i]</li>
<li><blockquote><p>[quote]Ein zitierter Text welcher aus einer anderen Quelle stammt. Es empfiehlt sich die Quelle auch mit anzugeben.[/quote]</p></blockquote></li></ul>",
// do not change the following line
"months" => array (
// here you can change the months for the archive
1 => "Januar",
2 => "Februar",
3 => "März",
4 => "April",
5 => "Mai",
6 => "Juni",
7 => "Juli",
8 => "August",
9 => "September",
10 => "Oktober",
11 => "November",
12 => "Dezember"
// do not change the folowing lines
)
); ?>

122
lang/lang.en.inc.php Normal file
View file

@ -0,0 +1,122 @@
<?php $l = array (
// Please do not change the above line!
"subnav_aboutpage" => "Welcome",
"subnav_current" => "Recent weblog entries",
"subnav_info" => "Information",
"subnav_rss" => "Recent weblogentries as a RSS feed. Read more about RSS on <a href='http://www.mezzoblue.com/archives/2004/05/19/what_is_rssx/'>mezzoblue.com</a>.",
"subnav_copyright" => "All rights reserved.",
"subnav_powered" => "Powered by",
"content_posted" => "posted on",
"content_more" => "read more",
"content_more_title" => "read the whole entry",
"content_permalink" => "permanent link for this article",
"content_posted" => "Posted on",
"content_archive" => "You can find older weblog entries in the",
"content_archivelink" => "archive",
"content_archive_header" => "Archive",
"content_categories_header"=> "Category",
"content_skip" => "skip to maincontent",
"content_choose_year" => "Choose the year:",
"content_search_header" => "Search the weblog",
"content_search" => "search",
"content_nothing_found" => "We found 0 results. Suggestions:<ul><li>Check your spelling.</li><li>Try different or fewer keywords.</li><li>Remove quotation marks or plus signs.</li></ul>",
"content_search_topic" => "Search this weblog",
"content_from" => "from",
"content_comments" => "Comments",
"content_comment_plz" => "comment",
"content_comments_title" => "skip to comments",
"content_cat_linklist" => "assigned categories",
"content_cat_link" => "Show all entries to this category",
"content_categorieslist_h" => "Categories",
"content_archive_preview" => "previous page",
"content_archive_next" => "next page",
"meta_start" => "back to homepage",
"meta_search" => "Search",
"meta_copyright" => "Copyright",
"comments_comment_topic" => "Comments",
"comments_by" => "Comment by",
"comments_name" => "name",
"comments_city" => "city / country",
"comments_email" => "email",
"comments_homepage" => "http://",
"comments_bbcode" => "How to use",
"comments_send" => "send",
"comments_preview" => "preview",
"comments_no_sid" => "There must be some manipulation",
"comments_false_mail" => "email address looks wrong",
"comments_notext" => "you have to write some text",
"comments_false_hp" => "Homepage URL looks wrong",
"comments_anonym" => "Anonymous",
"comments_permalink" => "permalink to this comment",
"comments_from" => "from",
"comments_posted" => "wrote on",
"comments_entryform" => "Your comment",
"comments_save_data" => "save userdata in a cookie",
"comments_mail_by_comment" => "mail me in case of a new comment",
"comments_duplicate" => "form was send twice by mistake",
"comments_thx" => "<strong>Thanks</strong> - Your comment was saved",
"comments_mailsubject" => "New comment on ".JLOG_WEBSITE,
"comments_mail_txt" => "Someone just responded to the entry you subscribed to at: ".JLOG_WEBSITE."\nThe title of the entry was: ",
"comments_stop_receiving" => "To stop receiving notifications for this comment, click here:",
"comments_stop_successful" => "Stopping receiving notifications was successful.",
"comments_preview" => "preview",
"comments_send" => "send",
"comments_show" => "show comments",
"comments_hide" => "hide comments",
"comments_bold" => "bold",
"comments_italic" => "italic",
"comments_quote" => "quote",
"comments_url" => "link",
"comments_plz_format_txt" => "Please enter your Text:",
"comments_url_href" => "enter linktarget:",
"comments_url_node" => "enter linktext:",
"comments_closed" => "Comments are closed for this entry.",
"comments_teaser_closed" => "(Comments closed)",
"pingback_topic" => "Pingbacks",
"db_error" => "Database error",
"plz_try_again" => "Please try again later.",
"error" => "Error",
"err404_topic" => "error 404",
"err404_message" => "There is no such page. Please try the search engine on this page.",
"language" => "en-gb",
"locale" => array( "en_US", "us", "verUS" ),
"date_format" => "%d. %B %Y um %H:%M Uhr",
"date_format_comment" => "%d.%m.%Y",
"date_format_subcurrent" => "%d.%m.%Y",
"index_topic" => "Homepage and News",
"bbtitle" => "Using BBcode",
"bbxmp" => "<p>Linebreakes are automaticly transformed. Notice that you can combine this code snippets.</p>
<p>[url]<a href='http://example.com'>http://example.com</a>[/url]</p>
<p>[url=http://example.com]<a href='http://example.com'>example link</a>[/url]</p>
<p>[b]<strong>bold</strong>[/b]</p>
<p>[i]<em>italic</em>[/i]</p>
<p><blockquote><p>[quote]A quoted text from an other source. Pleace add the
source as a link.[/quote]</p></blockqoute>",
// do not change the following line
"months" => array (
// here you can change the months for the archive
1 => "January",
2 => "February",
3 => "March",
4 => "April",
5 => "May",
6 => "June",
7 => "July",
8 => "August",
9 => "September",
10 => "October",
11 => "November",
12 => "December"
// do not change the folowing lines
)
); ?>

121
lang/lang.it.inc.php Normal file
View file

@ -0,0 +1,121 @@
<?php $l = array (
// Please do not change the above line!
"subnav_aboutpage" => "Benvenuti",
"subnav_current" => "Recenti note nel weblog ",
"subnav_info" => "Informazioni",
"subnav_rss" => "Recenti note nel weblog as a RSS feed. Leggi di più riguardo RSS in <a href='http://www.mezzoblue.com/archives/2004/05/19/what_is_rssx/'>mezzoblue.com</a>.",
"subnav_copyright" => "Tutti i diritti sono riservati.",
"subnav_powered" => "Powered by",
"content_posted" => "Pubblicato il",
"content_more" => "Leggi di più",
"content_more_title" => "Leggi l'intera nota",
"content_permalink" => "Link permanente per questo aricolo",
"content_posted" => "Pubblicato il",
"content_archive" => "Puoi trovare vecchie note weblog in ",
"content_archivelink" => "Archivio",
"content_archive_header" => "Archivio",
"content_categories_header"=> "Categoria",
"content_skip" => "vai ai contenuti principali",
"content_choose_year" => "Sciegli l'anno:",
"content_search_header" => "Cerca il weblog",
"content_search" => "Cerca",
"content_nothing_found" => "Sono stati trovato 0 risultati.Suggerimento:<ul><li>Controlla l'ortografia.</li><li>Prova con una differente parola chiave.</li><li>Cancellare virgolette o segno più.</li></ul>",
"content_search_topic" => "Cerca questo weblog",
"content_from" => "da",
"content_comments" => "Commenti",
"content_comment_plz" => "Commenti",
"content_comments_title" => "vai ai commenti",
"content_cat_linklist" => "Categorie assegnate",
"content_cat_link" => "Mostra tutte le note di questa categoria",
"content_categorieslist_h" => "Categorie",
"content_archive_preview" => "Pagina precedente",
"content_archive_next" => "Prossima pagina",
"meta_start" => "Vai alla homepage",
"meta_search" => "Cerca",
"meta_copyright" => "Copyright",
"comments_comment_topic" => "Commenti",
"comments_by" => "Commento di",
"comments_name" => "Nome",
"comments_city" => "Città/ Paese",
"comments_email" => "e-mail",
"comments_homepage" => "http://",
"comments_bbcode" => "Come si usa",
"comments_send" => "Invia",
"comments_preview" => "Anteprima",
"comments_no_sid" => "Stai manipolando qualcosa!",
"comments_false_mail" => "L'indirizzo e-mail non è corretto",
"comments_notext" => "Devi scrivere qualcosa",
"comments_false_hp" => "Homepage URL non corretta",
"comments_anonym" => "Anonimo",
"comments_permalink" => "permalink per questo commento",
"comments_from" => "da",
"comments_posted" => "Scritto il",
"comments_entryform" => "Tuo commento",
"comments_save_data" => "Salva userdata in cookie",
"comments_mail_by_comment" => "Inviami una e-mail in caso di nuovi commenti",
"comments_duplicate" => "Nota spedita due volte",
"comments_thx" => "<strong>Grazie</strong> - Il tuo commento è stato salvato",
"comments_mailsubject" => "Nuovo commento in ".JLOG_WEBSITE,
"comments_mail_txt" => "Qualcuno ha risposto alla tua nota: ".JLOG_WEBSITE."\nIl titolo della nota era: ",
"comments_stop_receiving" => "Per non ricevere piu notifiche riguardo questo commento, clicca qui:",
"comments_stop_successful" => "Notifice annullate con successo.",
"comments_preview" => "Anteprima",
"comments_send" => "Invia",
"comments_show" => "Visualizza commenti",
"comments_hide" => "Nascondi commenti",
"comments_bold" => "Grassetto",
"comments_italic" => "Corsivo",
"comments_quote" => "Cita espressione",
"comments_url" => "link",
"comments_plz_format_txt" => "Perfavore inserire il testo:",
"comments_url_href" => "Inserire linktarget:",
"comments_url_node" => "Inserire linktext:",
"comments_closed" => "I commenti sono chiusi per questa nota.",
"comments_teaser_closed" => "(Commenti stop)",
"pingback_topic" => "Pingbacks",
"db_error" => "Errore database",
"plz_try_again" => "Riprovare più tardi, grazie.",
"error" => "Errore",
"err404_topic" => "Errore 404",
"err404_message" => "Non ci sono file riguardanti la ricerca in questa pagina. Perfavore prova a usare il motore di ricerca di questa pagina.",
"language" => "it-it",
"locale" => array( "it_IT", "it" ),
"date_format" => "%d. %B %Y alle %H:%M",
"date_format_comment" => "%d.%m.%Y",
"date_format_subcurrent" => "%d.%m.%Y",
"index_topic" => "Homepage e News",
"bbtitle" => "Usare BBcode",
"bbxmp" => "<p>Linebreakes sono trasformate automaticamente. Nota che puoi combinare i pezzi del codice.</p>
<p>[url]<a href='http://example.com'>http://example.com</a>[/url]</p>
<p>[url=http://example.com]<a href='http://example.com'>example link</a>[/url]</p>
<p>[b]<strong>Grassetto</strong>[/b]</p>
<p>[i]<em>Corsivo</em>[/i]</p>
<p><blockquote><p>[quote]La citazione providene da un altra sorgente. Perfavore aggiungi la sorgente .[/quote]</p></blockqoute>",
// do not change the following line
"months" => array (
// here you can change the months for the archive
1 => "Gennaio",
2 => "Febbraio",
3 => "Marzo",
4 => "Aprile",
5 => "Maggio",
6 => "Giugno",
7 => "Luglio",
8 => "Agosto",
9 => "Settembre",
10 => "Ottobre",
11 => "Novembre",
12 => "Dicembre"
// do not change the folowing lines
)
); ?>

122
lang/lang.pl.inc.php Normal file
View file

@ -0,0 +1,122 @@
<?php $l = array (
// Please do not change the above line! Translated from English by Mariola Mandla.
"subnav_aboutpage" => "Witamy",
"subnav_current" => "Ostatnie wartki",
"subnav_info" => "Informacja",
"subnav_rss" => "Ostatnie wartki jako RSS. Przeczytaj wiecej o RSS na <a href='http://www.mezzoblue.com/archives/2004/05/19/what_is_rssx/'>mezzoblue.com</a>.",
"subnav_copyright" => "Wszystkie prawa zastrzezone.",
"subnav_powered" => "Powered by",
"content_more" => "przeczytaj więcej",
"content_more_title" => "przeczytaj cały wartek",
"content_permalink" => "permanentny link dla tego wartku",
"content_posted" => "Pisany",
"content_archive" => "Starsze wartki znajdżesz w",
"content_archivelink" => "archiwum",
"content_archive_header" => "Archiwum",
"content_categories_header"=> "Kategoria",
"content_skip" => "przejdz do tekstu",
"content_choose_year" => "Wybierz rok:",
"content_search_header" => "Przeszukaj weblog",
"content_search" => "szukaj",
"content_nothing_found" => "Znaleziono 0 wyników. Sugestie:<ul><li>Sprawdz czy poprawnie wpisałes wyszukiwaną frazę.</li><li>Wprowadz inne lub mniej słów.</li><li>Usuń cudzysłów lub znak plus.</li></ul>",
"content_search_topic" => "Przeszukaj ten weblog",
"content_from" => "od",
"content_comments" => "Komentarze",
"content_comment_plz" => "komentarz",
"content_comments_title" => "przejdź do komentarzy",
"content_cat_linklist" => "przyznaczone kategorie",
"content_cat_link" => "Pokaż wszystkie wartki tej kategori",
"content_categorieslist_h" => "Kategorie",
"content_archive_preview" => "poprzednia strona",
"content_archive_next" => "następna strona",
"meta_start" => "powrót do strony glównej",
"meta_search" => "Szukaj",
"meta_copyright" => "Prawa autorskie",
"comments_comment_topic" => "Komentarze",
"comments_by" => "Komentowane przez",
"comments_name" => "imię",
"comments_city" => "miejscowość / kraj",
"comments_email" => "emaila",
"comments_homepage" => "http://",
"comments_bbcode" => "Jak używać",
"comments_send" => "wyślij",
"comments_preview" => "podgląd",
"comments_no_sid" => "Coś jest nie tak, wygląda na manipulacje",
"comments_false_mail" => "adres emaila jest niepoprawny",
"comments_notext" => "trzeba napisac jakiś tekst",
"comments_false_hp" => "URL strony glównej jest niepoprawny",
"comments_anonym" => "Anonim",
"comments_permalink" => "link permanentny do tego komentarza",
"comments_from" => "od",
"comments_posted" => "pisany",
"comments_entryform" => "Twój komentarz",
"comments_save_data" => "zapisz dane uzytkownika w cookie",
"comments_mail_by_comment" => "zawiadom mnie gdy pojawi się nowy komentarz",
"comments_duplicate" => "formularz został wysłany przez pomyłkę",
"comments_thx" => "<strong>Dziekujemy</strong> - Twój komentarz został zachowany",
"comments_mailsubject" => "Nowy komentarz na ".JLOG_WEBSITE,
"comments_mail_txt" => "Ktoś napisał komentarz na: ".JLOG_WEBSITE."\n Tytół wartku był: ",
"comments_stop_receiving" => "Aby przestać otrzymywać notyfikacje kliknij tutaj:",
"comments_stop_successful" => "Notyfikacje zostaly zatżymane.",
"comments_preview" => "podglad",
"comments_send" => "wyślij",
"comments_show" => "pokaż komentarze",
"comments_hide" => "ukryj komentarze",
"comments_bold" => "bold", # TODO
"comments_italic" => "italic", # TODO
"comments_quote" => "quote", # TODO
"comments_url" => "link",
"comments_plz_format_txt" => "Prosze wprowadzić swój tekst:",
"comments_url_href" => "wprowadź url:",
"comments_url_node" => "wprowadź text:",
"comments_closed" => "Na tym wartku komentarze zostały zamknięte.",
"comments_teaser_closed" => "(Zamknięte komentarze)",
"pingback_topic" => "Pingbaki",
"db_error" => "Błąd bazy danych",
"plz_try_again" => "Prosze ponownie spróbować później.",
"error" => "Błąd",
"err404_topic" => "błąd 404",
"err404_message" => "Nie ma takiej strony. Prosze użyć przeglądarki na tej stronie.",
"language" => "en-gb",
"locale" => array( "en_US", "us", "verUS" ),
"date_format" => "%d. %B %Y um %H:%M Uhr",
"date_format_comment" => "%d.%m.%Y",
"date_format_subcurrent" => "%d.%m.%Y",
"index_topic" => "Strona glówna",
"bbtitle" => "Urzywanie BBcode",
"bbxmp" => "<p>Linebreakes are automaticly transformed. Notice that you can combine this code snippets.</p>
<p>[url]<a href='http://example.com'>http://example.com</a>[/url]</p>
<p>[url=http://example.com]<a href='http://example.com'>example link</a>[/url]</p>
<p>[b]<strong>bold</strong>[/b]</p>
<p>[i]<em>italic</em>[/i]</p>
<p><blockquote><p>[quote]A quoted text from an other source. Pleace add the
source as a link.[/quote]</p></blockqoute>",
// do not change the following line
"months" => array (
// tutaj mozna zmienic miesiace for the archive
1 => "Styczen",
2 => "Luty",
3 => "Marzec",
4 => "Kwiecien",
5 => "Maj",
6 => "Czerwiec",
7 => "Lipiec",
8 => "Śierpień",
9 => "Wrzesień",
10 => "Październik",
11 => "Listopad",
12 => "Grudzień"
// do not change the folowing lines
)
);
// eof

121
lang/lang.sv.inc.php Normal file
View file

@ -0,0 +1,121 @@
<?php $l = array (
// Please do not change the above line! Translated from German by Vlona Korbash
"subnav_aboutpage" => "Välkommen",
"subnav_current" => "Aktuella inlägg",
"subnav_info" => "Information",
"subnav_rss" => "Aktuellt från denna sida via RSS Feed. Mer info om detta hittar du på <a href='http://susning.nu/RSS'>http://susning.nu/RSS</a>.",
"subnav_copyright" => "Alla rättigheter förbehållna",
"subnav_powered" => "Powered by",
"content_posted" => "skrivet den",
"content_more" => "läs mer",
"content_more_title" => "Läs hela webbloginlägget",
"content_permalink" => "permanent länk till detta webbloginlägg",
"content_posted" => "Inlagt den",
"content_archive" => "Äldre webbloginlägg finns i",
"content_archivelink" => "Arkiv",
"content_archive_header" => "Arkiverade inlägg",
"content_categories_header"=> "Kategori",
"content_skip" => "Hoppa till huvudinnehåll.",
"content_choose_year" => "Välj år:",
"content_search_header" => "Sök på webbsidan",
"content_search" => "sök",
"content_nothing_found" => "Antal träffar: 0. Förslag: :<ul><li>Kontrollera stavningen.</li><li>Sök med andra eller färre nyckelord.</li><li>Radera fråge- eller plustecken.</li></ul>",
"content_search_topic" => "Sök igenom webblog",
"content_from" => "från",
"content_comments" => "Kommentarer",
"content_comment_plz" => "kommentera",
"content_comments_title" => "hoppa till kommentarer",
"content_cat_linklist" => "tilldelade kategorier",
"content_cat_link" => "Visa alla inlägg ur denna kategori",
"content_categorieslist_h" => "Kategorier",
"content_archive_preview" => "Föregående sida",
"content_archive_next" => "Nästa sida",
"meta_start" => "Tillbaka till startsidan",
"meta_search" => "Genomsöker",
"meta_copyright" => "Upphovsrätt",
"comments_comment_topic" => "Kommentarer",
"comments_by" => "Kommentar från",
"comments_name" => "Namn",
"comments_city" => "Stad / Land",
"comments_email" => "E-mail",
"comments_homepage" => "http://",
"comments_bbcode" => "Hur använder jag",
"comments_send" => "Skicka",
"comments_preview" => "Förhandsgranskning",
"comments_no_sid" => "Det verkar ha skett en manipulation",
"comments_false_mail" => "E-mailadressen ser inte korrekt ut",
"comments_notext" => "Ingen text har skrivits",
"comments_false_hp" => "Kontrollera att rätt URL har angivits",
"comments_anonym" => "Anonym",
"comments_permalink" => "Permanent länk till denna kommentar",
"comments_from" => "från",
"comments_posted" => "skrev den",
"comments_entryform" => "Din kommentar",
"comments_save_data" => "Spara användarinställningar",
"comments_mail_by_comment" => "Underrätta vid kommentar",
"comments_duplicate" => "Formuläret skickades av misstag två gånger",
"comments_thx" => "<strong>Tack</strong> - Kommentaren har sparats",
"comments_mailsubject" => "Kommentar på ".JLOG_WEBSITE,
"comments_mail_txt" => "Ny kommentar på ".JLOG_WEBSITE."\nTiteln var: ",
"comments_stop_receiving" => "För att avaktivera underrättelsen vid nya kommentarer, klicka här:",
"comments_stop_successful" => "Underrättelsen har avaktiverats",
"comments_preview" => "Förhandsgranskning",
"comments_send" => "Skicka",
"comments_show" => "visa kommentarer",
"comments_hide" => "dölj kommentarer",
"comments_bold" => "fet",
"comments_italic" => "kursiv",
"comments_quote" => "citera",
"comments_url" => "länk",
"comments_plz_format_txt" => "Vänligen ange texten som ska formateras",
"comments_url_href" => "Ange länkmål:",
"comments_url_node" => "Ange länktext:",
"comments_closed" => "Kommentarerna är stängda för detta inlägg.",
"comments_teaser_closed" => "(Kommentarer stängda)",
"pingback_topic" => "Pingbacks",
"db_error" => "Databasfel",
"plz_try_again" => "Var god försök igen senare.",
"error" => "Error",
"err404_topic" => "Error 404 - Sidan hittades inte",
"err404_message" => "Denna sida existerar tyvärr inte. Försök hitta den genom sökfunktionen.",
"language" => "sv-se",
"locale" => array('sv_SE', 'sve_sve'),
"date_format" => "%Y-%B-%d kl %H:%M",
"date_format_comment" => "%Y-%m-%d",
"date_format_subcurrent" => "%Y-%m-%d",
"index_topic" => "Startsida",
"bbtitle" => "Använd BBcode",
"bbxmp" => "<ul><li>Radbrytning sker automatiskt och man kan även kombinera kodstyckena.</li>
<li>[url]<a href='http://example.com'>http://example.com</a>[/url]</li>
<li>[url=http://example.com]<a href='http://example.com'>Exempellänk</a>[/url]</li>
<li>[b]<strong>fet</strong>[/b]</li>
<li>[i]<em>kursiv</em>[/i]</li>
<li><blockquote><p>[quote]Ett citat ur en annan källtext. Det rekommenderas att även ange denna.[/quote]</p></blockquote></li></ul>",
// do not change the following line
"months" => array (
// here you can change the months for the archive
1 => "januari",
2 => "februari",
3 => "mars",
4 => "april",
5 => "maj",
6 => "juni",
7 => "juli",
8 => "august",
9 => "september",
10 => "oktober",
11 => "november",
12 => "december"
// do not change the folowing lines
)
); ?>

27
learn_bb.php Normal file
View file

@ -0,0 +1,27 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$version = $_GET['v'];
if($version == "small") {
echo "
<html>
<head>
<title>".$l['bbtitle']."</title>
<link rel='stylesheet' href='".JLOG_PATH."/personal/css/popup.css' type='text/css' media='screen' />
</head>
<body>
<h1>".$l['bbtitle']."</h1>
".$l['bbxmp']."
</body>
</html>";
}
else {
$c['title'] = $l['bbtitle'];
$c['main'] = $l['bbxmp'];
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
}
?>

308
log.php Normal file
View file

@ -0,0 +1,308 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$get = strip($_GET);
$c['form_content'] = "";
$date = strftime(JLOG_DATE);
$sql_get = escape_for_mysql($get);
if(!empty($sql_get['y']) AND !empty($sql_get['m']) AND !empty($sql_get['url'])) {
$sql = "SELECT
id, url, topic,
UNIX_TIMESTAMP(date) AS date,
DATE_FORMAT(date, '%Y-%m-%dT%T".substr(date("O"), 0, 3) . ":" . substr(date("O"), 3)."') AS metadate,
teaser, teaserpic, teaserpiconblog, keywords,
content, comments, allowpingback, section
FROM ".JLOG_DB_CONTENT."
WHERE
YEAR(date) = ".$sql_get['y']." AND
MONTH(date) = ".$sql_get['m']." AND
url = '".$sql_get['url']."' AND
section = 'weblog'
LIMIT 1";
$blog = new Query($sql);
if($blog->error()) {
echo "<pre>\n";
echo $blog->getError();
echo "</pre>\n";
die();
}
if($blog->numRows() == 0) {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
include_once(JLOG_BASEPATH."error404.php");
exit;
}
}
else {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
include_once(JLOG_BASEPATH."error404.php");
exit;
}
$blogentry = $blog->fetch();
// get comments from Database
$sql_comments = "SELECT
id, sid, name, city, email, homepage,
content, UNIX_TIMESTAMP(date) AS date,
reference, mail_by_comment, type
FROM ".JLOG_DB_COMMENTS."
WHERE reference = '".$blogentry['id']."'
ORDER BY date;";
$c['meta']['date'] = $blogentry['metadate'];
$c['meta']['description'] = strip_tags($bbcode->parse($blogentry['teaser']));
$c['meta']['keywords'] = $blogentry['keywords'];
$c['meta']['title'] = $blogentry['topic'];
$c['meta']['pingback'] = true;
$c['main'] = do_entry($blogentry);
// Form entry
$com_form = strip($_POST);
if(!isset($com_form['type'])) $com_form['type'] = "";
$error = com_check_errors($com_form);
// Preview
if(isset($com_form['form_submitted']) AND $com_form['form_submitted'] === $l['comments_preview']) {
$comments = new Query($sql_comments);
if($comments->error()) {
echo "<pre>\n";
echo $comments->getError();
echo "</pre>\n";
die();
}
$commentsArray = array();
$countComments = 0;
while($commentsArray[] = $comments->fetch());
foreach($commentsArray as $tmp_comment) if($tmp_comment['type'] != 'pingback') ++$countComments;
$preview = "";
if(isset($error)) $preview .= error_output($error);
$clear_form = com_clean_data($com_form);
$clear_form['id'] = "";
### Plugin Hook
$clear_form = $plugins->callHook('previewComment', $clear_form, $blogentry);
$preview .= "<ul class='comments' id='preview'>
".do_comment($clear_form, $countComments)."
</ul>";
$c['form_content'] .= $preview;
$c['form_content'] .= com_form_output($com_form).com_javascript_variables();
}
// Send data to DB
elseif(isset($com_form['form_submitted']) AND $com_form['form_submitted'] == $l['comments_send'] AND $blogentry['comments'] == 1) {
if(isset($error)) {
$c['form_content'] .= error_output($error);
$c['form_content'] .= com_form_output($com_form).com_javascript_variables();
}
else {
// Send comment
$com_form = com_clean_data($com_form);
### Plugin Hook
$com_form = $plugins->callHook('newComment', $com_form, $blogentry);
$com = escape_for_mysql($com_form);
if(!isset($com['mail_by_comment'])) $com['mail_by_comment'] = "";
$sql = "INSERT INTO ".JLOG_DB_COMMENTS." (
sid,
name,
city,
email,
homepage,
content,
reference,
mail_by_comment,
date,
type
)
VALUES (
'".$com['sid']."',
'".$com['name']."',
'".$com['city']."',
'".$com['email']."',
'".$com['homepage']."',
'".$com['content']."',
'".$blogentry['id']."',
'".$com['mail_by_comment']."',
NOW(),
'".$com['type']."'
)";
$newcomment = new Query($sql);
$cid = mysql_insert_id();
if($newcomment->error()) {
if($newcomment->getErrno() == 1062) {
$errors[] = $l['comments_duplicate'];
$c['form_content'] .= error_output($errors, 'entryform').com_javascript_variables();
}
else {
echo "<pre>\n";
echo $newcomment->getError();
echo "</pre>\n";
die();
}
}
else {
if(isset($com_form['cookie']) AND $com_form['cookie'] == 1) set_cookie($com_form);
else trash_cookie();
include_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'update.php');
$sql = "SELECT DISTINCT email
FROM ".JLOG_DB_COMMENTS." WHERE reference = '".$blogentry['id']."' AND mail_by_comment = 1";
$comment_mail = new Query($sql);
// we are going to send some mail
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'mail.class.php');
if($comment_mail->error()) {
echo "<pre>\n";
echo $comment_mail->getError();
echo "</pre>\n";
die();
}
elseif( JLOG_INFO_BY_COMMENT ) {
// we need this for some mail texts
require(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php');
$mail = new Jlog_Mail();
$mail->setFrom($com_form['email'], $com_form['name']);
$mail->setSubject($l['admin']['comments_mailsubject']." - ".$blogentry['topic']);
$text = $l['admin']['comments_mail_txt']." »".$blogentry['topic']."«\n- -\n";
if(!empty($com_form['name'])) $text .= $com_form['name'];
else $text .= $l['admin']['comments_anonym'];
if(!empty($com_form['city'])) $text .= " ".$l['comments_from']." ".$com_form['city'];
$text .= " ".$l['admin']['comments_posted']." ".$date.":\n\n";
$text .= html_entity_decode(strip_tags($bbcomments->parse($com_form['content'])));
$text .= "\n\n".str_replace ( '&amp;', '&', blog($blogentry['date'], $blogentry['url']))."#c".$cid;
$text .= "\n\n".$l['admin']['kill_c_email']."\n".JLOG_PATH."/admin/comments.php?action=trash&id=".$cid;
$mail->setText($text);
### Plugin Hook
$mail = $plugins->callHook('adminMail', $mail, $blogentry, $cid);
$mail->send(JLOG_EMAIL);
}
$mail = new Jlog_Mail();
$mail->setSubject($l['comments_mailsubject']." - ".$blogentry['topic']);
$mail->setFrom(JLOG_EMAIL, JLOG_WEBSITE);
$text = $l['comments_mail_txt']." »".$blogentry['topic']."«\n- -\n";
if(!empty($com_form['name'])) $text .= $com_form['name'];
else $text .= $l['comments_anonym'];
if(!empty($com_form['city'])) $text .= " ".$l['comments_from']." ".$com_form['city'];
$text .= " ".$l['comments_posted']." ".$date.":\n\n";
$text .= html_entity_decode(strip_tags($bbcomments->parse($com_form['content'])));
$text .= "\n\n".str_replace ( '&amp;', '&', blog($blogentry['date'], $blogentry['url']))."#c".$cid."";
$text .= "\n-- \n".$l['comments_stop_receiving']."\n";
$text .= JLOG_PATH."/stop.php?id=".$blogentry['id']."&email=";
while ($data = $comment_mail->fetch()) {
if($data['email'] != $com_form['email']) {
// set text for current user
$mail->setText($text . $data['email']);
$mail = $plugins->callHook('commentorMail', $mail, $blogentry);
// send mail
$mail->send();
}
}
$c['form_content'] .= "<p id='entryform'>".$l['comments_thx']."</p>".com_javascript_variables();
}
}
}
// If nothing happens
elseif($blogentry['comments'] == 1) {
$com_form['name'] = $l['comments_name'];
$com_form['city'] = $l['comments_city'];
$com_form['email'] = $l['comments_email'];
$com_form['homepage'] = $l['comments_homepage'];
$com_form['sid'] = new_sid();
if(isset($_COOKIE["jlog_userdata"])) {
$cookie = unserialize(urldecode($_COOKIE["jlog_userdata"]));
if($cookie != "") $com_form['cookie'] = 1;
if($cookie[0] != "") $com_form['name'] = $cookie[0];
if($cookie[1] != "") $com_form['city'] = $cookie[1];
if($cookie[2] != "") $com_form['email'] = $cookie[2];
if($cookie[3] != "") $com_form['homepage'] = $cookie[3];
}
$c['form_content'] .= com_form_output($com_form).com_javascript_variables();
}
else $c['form_content'] .= " <p id='entryform'>".$l['comments_closed']."</p>\n".com_javascript_variables();
// get comments and pingbacks
$comments = new Query($sql_comments);
if($comments->error()) {
echo "<pre>\n";
echo $comments->getError();
echo "</pre>\n";
die();
}
$countPingbacks = 0;
$countComments = 0;
$commentsArray = array();
$no_comments = "";
while($tmp_commentsArray = $comments->fetch()) $commentsArray[] = $tmp_commentsArray;
foreach($commentsArray as $tmp_comment) {
if($tmp_comment['type'] == 'pingback') ++$countPingbacks;
else ++$countComments;
}
if($countPingbacks > 0) {
if($countComments < 1) $no_comments = " class='entryform'";
$c['main'] .= "\n <h3 id='pingbacks'".$no_comments.">".$l['pingback_topic']."</h3>\n <ol id='pingbackslist'>";
foreach($commentsArray as $pingback) {
if($pingback['type'] == 'pingback') $c['main'] .= "\n <li><a href='".$pingback['homepage']."'>".$pingback['name']."</a></li>";
}
$c['main'] .= "\n </ol>\n";
}
if($countComments < 1) $no_comments = " class='entryform'";
$c['main'] .= "\n <h3 id='comments'".$no_comments.">".$l['comments_comment_topic']."</h3>\n";
if($countComments > 0) {
$c['main'] .= " <ul class='comments' id='commentslist'>";
$i = 0;
foreach($commentsArray as $data) {
if($data['type'] !== 'pingback') {
++$i;
$data = com_clean_data($data);
$c['main'] .= do_comment($data, $i);
}
}
$c['main'] .= "\n </ul>\n";
}
$c['main'] .= $c['form_content'];
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

45
page.php Normal file
View file

@ -0,0 +1,45 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$get = strip($_GET);
$date = strftime(JLOG_DATE);
$sql_get = escape_for_mysql($get);
$sql = "SELECT id, url, topic, UNIX_TIMESTAMP(date) AS date,
DATE_FORMAT(date, '%Y-%m-%dT%T".substr(date("O"), 0, 3) . ":" . substr(date("O"), 3)."') AS metadate,
teaser, teaserpic, teaserpiconblog, keywords,
content, comments, allowpingback, section
FROM ".JLOG_DB_CONTENT."
WHERE
url = '".$sql_get['url']."' AND
section = 'page'
LIMIT 1";
$blog = new Query($sql);
if($blog->error()) {
echo "<pre>\n";
echo $blog->getError();
echo "</pre>\n";
die();
}
if($blog->numRows() == 0) {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
include_once(JLOG_BASEPATH."error404.php");
exit;
}
$daten = $blog->fetch();
$c['meta']['date'] = $daten['metadate'];
$c['meta']['description'] = strip_tags($bbcode->parse($daten['teaser']));
$c['meta']['keywords'] = $daten['keywords'];
$c['meta']['title'] = $daten['topic'];
$c['main'] = do_entry($daten, NULL, 'page');
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

28
personal/css/admin.css Normal file
View file

@ -0,0 +1,28 @@
/* -- CSS for the Jlog admincenter v0.2 -- */
/* -- last edit 15 Dec 2004 -- */
#admin { margin: 0; padding: 0; border: 0; }
#admin p { font-weight: normal; }
#admin input, #admin textarea { font-weight: normal; font-family: inherit; font-size: inherit; padding-left: 0.2em; }
#admin input.long { width: 90%; }
#admin input.short { width: 3em; }
#admin input.button { width: auto; margin: 1em; }
#admin textarea { width: 90%; }
#admin form dt { font-weight: normal; margin: 0.5em 0 0 0; }
#admin form dd { margin: 0 0 0 1em; }
#admin form textarea.small { height: 2.7em; }
#admin form textarea.big { height: 15em; }
#admin table { empty-cells: show; border-spacing: 0; font-size: 1em; }
#admin table tr td,
#admin table tr th { padding: 3px 8px; border-left: 1px dotted #bdaa94; vertical-align: top; }
#admin table tr th { border-bottom: 1px dotted #bdaa94; }
#admin table a, #admin table a img { border: none; background: none; }
#admin a img.admin { border: none; background: none; }
#admin h2.preview { color: red; text-align: center; background-color: white; }
#admin .preview { background: #FFF5F7; margin: 0 -10px; padding: 10px; }
#admin .hide { display: none; }
#admin-menu { position: relative; z-index: 2; }

34
personal/css/ielte6.css Normal file
View file

@ -0,0 +1,34 @@
/* additional hacks for IE
* btw. IE sucks! ;-)
*/
#pokal { /* do not display the alpha image */
display: none;
}
#container { /* IE max-width and PNG no-alpha hack */
height: 1%;
width: 750px;
width:expression(document.body.clientWidth>805?"800px":"auto");
background-image: url(img/banner-ielte6.jpg);
}
#main { width: 63%; margin: 0 0 0 15px; }
ul.comments li {
overflow-x: scroll;
}
#admin table { /* adapting the font size for IE 5.x */
font-size: 1em;
}
* html #subnav { /* Box-Model Bug */
content:"\"; width: 30%; padding: 2em 1.5em;
}
* html #main { width: 62.5%; margin: 0 0 0 15px; }
html + body #admin { /* close the hole in IE 5.0 */
margin: 0;
}

BIN
personal/css/img/Browse.plb Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
personal/css/img/banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
personal/css/img/body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

BIN
personal/css/img/border.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 B

BIN
personal/css/img/cheese.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

BIN
personal/css/img/footer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
personal/css/img/pokal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

34
personal/css/popup.css Normal file
View file

@ -0,0 +1,34 @@
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: black;
font-size: 0.8em;
background-color: #eee;
margin: 0px;
padding: 10px 5%;
}
h1 {
margin: 0px 0px 20px 0px;
font-size: 140%;
}
.caution {
color: red;
font-weight: bold;
}
ul { list-style-type: none; margin: 0; }
ul.error { list-style-type: disc; }
li { margin: 0.5em; }
.error { color: red; }
a { color: brown; }
img { border: none; }
a img {
border: none;
margin: 0 0 0.5em 0;
}
p { margin: 0; padding: 0.5em 0 0.5em 0 }
blockquote {
border: 1px solid #999;
border-left: 3px solid #aaa;
padding: 0 1em 0.3em 1em;
margin: 0;
background: #eee url(/img/anfuehrungszeichen.png) 2% 1px no-repeat;
}

19
personal/css/print.css Normal file
View file

@ -0,0 +1,19 @@
/* print.css for the default template of Jlog
* see screen.css for more details
*/
/* -- hide -- */
#subnav, .skip, .entryform, .hidecomments, #entryform, hr { display: none; }
/* -- main settings -- */
body { font-family: Georgia, "Times New Roman", Times, serif; }
h1 { text-align: right; margin-top: 0; }
blockquote { font-style: italic; }
/* -- links -- */
a { text-decoration: none; }
#main a:after { font-size: 70%; content:" <"attr(href)">"; }
#main .meta a:after, #main h2 a:after { content:""; }
/* -- comments -- */
ul#commentslist { list-style-type: none; }

213
personal/css/screen.css Normal file
View file

@ -0,0 +1,213 @@
/* screen.css for the standard Jlog <http://jeenaparadies.net/webdesign/jlog/> template.
*
* Author: Jeena Paradies <http://jeenaparadies.net>
* License: GPL (see LICENSE.txt in this package)
*
*/
/* -- main positionering -- */
body {
font-size: 100.01%;
font-family: verdana, arial, sans-serif;
background: #ffdc6c url(img/body.png);
color: black;
min-width: 500px;
margin: 0 20px;
padding: 0;
text-align: center;
}
#container {
font-size: 0.8em;
text-align: left;
margin: 0 auto;
max-width: 800px;
background: url(img/banner.jpg) no-repeat 0 2.4em white;
border: 1px solid #2B2B2B;
border-top: 0;
position: relative;
}
#main {
margin: 0 0 0 25px;
padding: 190px 0 2em 0;
width: 64.5%;
float: left;
}
/* Clearfix-Hack */
#main:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#main {display: inline-table;}
/* Hides from IE-mac \*/
* html #main {height: 1%;}
#main {display: block;}
/* End hide from IE-mac */
/* -- logo -- */
h1 {
font-size: 2em;
font-weight: normal;
padding: 0 5%;
margin: 0;
background: url(img/cheese.png) right bottom repeat-y white;
}
h1 a:link, h1 a:visited { color: black; text-decoration: none; }
/* -- pokal -- */
#pokal {
position: absolute;
left: -21px;
top: 4.5em;
width: 128px;
height: 198px;
background: url(img/pokal.png) no-repeat;
margin: 0;
padding: 0;
}
/* -- subnavigation -- */
#subnav {
width: 26%;
margin: 1em 1px 1em 0;
float: right;
margin-top: 165px;
padding: 1% 1% 1% 2%;
font-size: 0.8em;
background: url(img/border.png) repeat-y white;
}
#subnav dt {
font-weight: bold;
margin-top: 1.5em;
}
#subnav dd {
padding: 0.5em;
margin: 0;
line-height: 120%;
}
#subnav ul {
margin: 0; padding: 0;
list-style-type: none;
}
#subnav ul li { margin-bottom: 0.5em; }
.rss img { vertical-align: middle; border: 0; width: 94px; height: 15px; }
/* -- footer -- */
#footer {
clear: both;
height: 60px;
background: url(img/footer.png) no-repeat top center;
}
/* -- basic styles -- */
.skip {
position: absolute;
left: -999px;
width: 990px;
}
hr {
background-color: #aaa;
color: #aaa;
border: 0 none;
height: 1px;
margin: 1em 0;
clear: both;
}
.error { color: red; }
blockquote {
background: url(img/border.png) repeat-y;
padding: 0 0.5em;
font-style: italic;
}
#searchform { text-align: center; }
.meta.date { margin-top: 0; }
.meta { font-style: italic; font-size: 0.85em; }
.searchword { background: yellow; }
/* -- pictures -- */
.fl { float: left; margin: 0 1em 1em 0; }
.fr { float: right; margin: 0 0 1em 1em; }
#main img, dl.img {
border: 1px solid #aaa;
padding: 2px;
max-width: 95%;
}
dl.img dt { padding: 0; margin: 0;}
#main dl.img dt img { margin: 0; padding: 0; max-width: 100%; border: none; }
dl.img dd { margin: 0; padding: 0 0.3em; font-size: 90%; }
.teaser { clear: both; }
/* -- main link styles -- */
a:link { color: #18518b; }
a:visited { color: #555; }
a:hover { color: black; }
/* -- headlines -- */
h2, h3, h4, h5, h6 {
font-weight: normal;
font-family: verdana, sans-serif;
position: relative;
z-index: 2;
}
h2 { font-size: 1.7em; margin: 0; }
h3 { font-size: 1.2em; }
h4 { font-size: 1.1em; }
h5 { font-size: 1em; }
h6 { font-size: 0.9em; }
h2 a:link, h2 a:visited,
.teaser h3 a:link, .teaser h3 a:visited,
.teaser h4 a:link, .teaser h4 a:visited { text-decoration: none; color: black; }
h2 a:hover, .teaser h3 a:hover, .teaser h4 a:hover { text-decoration: underline; }
.teaser h3, .teaser h4 { margin: 0; }
/* -- textareas and inputs -- */
fieldset { border: 1px solid #aaa; padding: 1em; }
legend { padding: 1em; font-weight: bold; }
input.long, input.short, input.userdata, textarea, select {
background: #f7f7f7;
border: 1px solid #bbb;
border-right: 1px solid #d8d8d8;
border-bottom: 1px solid #D8D8D8;
}
/* -- aditional styles for the home- and searchpage -- */
.teaser h2 { font-size: 1.3em; }
.teaser h3, .teaser h4 { font-weight: bold; }
.teaserpic { float: right; margin: 0 0 1em 1em; }
.entries , .search li { list-style-type: none; }
.search li { border-top: 1px solid #d8d8d8; padding-top: 1em; }
ul.search { margin: auto 5%; padding-left: 0; }
h2.search { text-align: center; }
.archive { margin-left: 5%; }
.archivenavigation { text-align: center; border-top: 1px dotted #aaa; padding-top: 0.7em; margin-top: 2em; }
/* -- comments -- */
p.hidecomments { font-size: 0.75em; text-align: right; line-height: 1px; padding: 0; margin-bottom: 0; }
#preview li { border: solid 1px red; }
ul.comments .meta { font-size: 1.3em; }
ul.comments { list-style-type: none; font-size: 0.9em;}
ul.comments li {
padding: 0 1em 0.5em 1em;
margin: 1em 0;
background: #f7f7f7;
border: 1px solid #ccc;
border-left: 1px solid #d8d8d8;
border-top: 1px solid #D8D8D8;
overflow-x: scroll;
}
ul.comments li p { margin: 0.5em; }
ul.comments a.permalink {
font: normal bold 1.5em monospace;
border-right: 1px solid #d8d8d8;
text-decoration: none;
padding-right: 0.2em;
margin-right: 0.2em;
}
ul.comments a.permalink:hover { text-decoration: underline; }
#pingbackslist { margin-bottom: 3em; }
textarea { width: 90%; min-width: 10em; }

40
personal/template.tpl Normal file
View file

@ -0,0 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><jlog:title /> - <jlog:website /></title>
<jlog:aditional-header />
<link rel="stylesheet" href="<jlog:homelink />/personal/css/print.css" type="text/css" media="print" />
<link rel="stylesheet" href="<jlog:homelink />/personal/css/screen.css" type="text/css" media="screen, projection" />
<!--[if lte IE 6]><link rel="stylesheet" href="<jlog:homelink />/personal/css/ielte6.css" type="text/css" media="screen" /><![endif]-->
</head>
<body>
<p class="skip"><a href="#main"><jlog:skipcontent /></a></p>
<div id="container"><span id="pokal"></span>
<h1><a title="<jlog:home />" href="<jlog:homelink />/"><jlog:website /></a></h1>
<dl id="subnav">
<dt class="first"><jlog:slogan-h /></dt>
<dd><jlog:slogan /></dd>
<dt><jlog:search-h /></dt>
<dd>
<form action="<jlog:homelink />/search.php">
<p><input class="userdata" type="text" name="q" size="15" value="" />
<input class="send" type="submit" value="<jlog:search />" /></p>
</form>
</dd>
<dt><jlog:categorieslist-h /></dt>
<dd><jlog:categorieslist /></dd>
<dt><jlog:current-h /></dt>
<dd><jlog:subcurrent /></dd>
<dd><jlog:archive-more /> <a href="<jlog:archivelink />"><jlog:archive /></a>.</dd>
<dt><jlog:sub-info /></dt>
<dd class="rss"><jlog:rss-link /><br /> <jlog:rss-info /></dd>
<dd><jlog:copyright /></dd>
<dd><jlog:powered /></dd>
</dl>
<div id="main">
<jlog:content />
</div>
<div id="footer">&nbsp;</div>
</div>
</body>
</html>

2
plugins/.htaccess Normal file
View file

@ -0,0 +1,2 @@
Order allow,deny
Deny from All

View file

@ -0,0 +1,126 @@
<?php
/**
* @name: CommentCloser <jeenaparadies.net/projects/jlog/>
* @author: Robert Bienert <robertbienert@gmx.net>
* @version: 1.3
* @date: 2009-01-04
*
* Dieses Plugin schliesst nach einer bestimmten, festzulegenden
* Laufzeit die Kommentare eines Artikels.
*
* Konstanten-Praefix: COMMENT_CLOSER
*/
define('COMMENT_CLOSER_CFG_FILE', JLOG_BASEPATH . 'personal' .
DIRECTORY_SEPARATOR . 'settings.CommentCloser.inc.php');
if (@file_exists(COMMENT_CLOSER_CFG_FILE))
include_once COMMENT_CLOSER_CFG_FILE;
class CommentCloser extends JlogPlugin {
var $_units = array('SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK',
'MONTH', 'YEAR',
);
// Dieses Array kann lokalisiert werden:
var $_unit_desc = array('Sekunden', 'Minuten', 'Stunden',
'Tagen', 'Wochen', 'Monaten', 'Jahren'
);
// Konfigurationsoberflaeche
function hook_adminContent($output) {
$lifeTime = defined('COMMENT_CLOSER_LIFETIME') ?
COMMENT_CLOSER_LIFETIME : '';
$timeUnit = defined('COMMENT_CLOSER_TIMEUNIT') ?
COMMENT_CLOSER_TIMEUNIT : '';
$self = htmlspecialchars($_SERVER['REQUEST_URI']);
if (array_key_exists('commclose_do', $_POST)) {
$lifeTime = $_POST['commclose_lifetime'];
$timeUnit = $_POST['commclose_unit'];
// Einheiten pruefen
if (! in_array($timeUnit, $this->_units))
$timeUnit = '';
// keine (negative) Zeit XXX implicit cast
if ($lifeTime + 0 <= 0)
$lifeTime = 0;
# XXX MySQL bug: WEEK wird bei mir nicht
# erkannt, deshalb manuelles Umrechnen:
if ($timeUnit == 'WEEK') {
$lifeTime *= 7;
$timeUnit = 'DAY';
}
$mask = umask(0);
if (($f = @fopen(COMMENT_CLOSER_CFG_FILE, 'wb')))
{
@fwrite($f, "<?php\n");
@fwrite($f, 'define(\'COMMENT_CLOSER_'.
"LIFETIME', $lifeTime);\n");
@fwrite($f, 'define(\'COMMENT_CLOSER_'.
"TIMEUNIT', '$timeUnit');\n");
@fwrite($f, '?>');
@fclose($f);
}
umask($mask);
}
$output = <<<EOT
<form action="$self" method="post">
<p><label>Kommentare nach
<input type="text" name="commclose_lifetime" size="5" value="$lifeTime" /></label>
<label><select name="commclose_unit" size="1">
EOT;
$units = count($this->_units);
for ($i = 0; $i < $units; ++$i) {
$output .= '<option value="';
$output .= $this->_units[$i];
if ($this->_units[$i] == $timeUnit)
$output .= '" selected="selected';
$output .= "\">{$this->_unit_desc[$i]}</option>";
}
$output .= '</select> '.add_session_id_input_tag();
$output .= <<<EOT
automatisch</label>
<input type="submit" name="commclose_do" value="schlie&#223;en" />.</p>
<p>Nach der angegeben Zeit k&#246;nnen Beitr&#228;ge nicht mehr kommentiert werden.</p>
</form>
EOT;
return $output;
}
// Pruefen auf zu schliessende Beitraege
function hook_onUpdate($data) {
// Kein Schliessen gewuenscht, Plugin nicht konfiguriert
// oder ungueltige Werte gesetzt:
if (!defined('COMMENT_CLOSER_LIFETIME') ||
COMMENT_CLOSER_LIFETIME+0 <= 0 ||
!defined('COMMENT_CLOSER_TIMEUNIT') ||
!in_array(COMMENT_CLOSER_TIMEUNIT,
$this->_units))
{
return $data;
}
$q = new Query('UPDATE ' . JLOG_DB_PREFIX .
'content SET comments=0 ' .
'WHERE date < DATE_SUB(NOW(), INTERVAL ' .
COMMENT_CLOSER_LIFETIME . ' ' .
COMMENT_CLOSER_TIMEUNIT .
') AND comments=1');
# TODO error handling
return $data;
}
}
?>

View file

@ -0,0 +1,38 @@
<?php
/**
* @name: MiniAntispam <jeenaparadies.net/projects/jlog/>
* @author: Jeena Paradies <jlog@jeenaparadies.net>
* @version: 1.0
* @date: 2006-05-10
*/
class MiniAntispam extends JlogPlugin {
function hook_commentForm($form) {
$uid = $this->generate_uid();
$uid_inputs = "\n ".'<input type="hidden" name="privatkey" value="'.$uid.'" />';
$uid_inputs .= "\n ".'<input type="text" style="display: none;" name="publickey" value="'.$uid.'" />';
return str_replace("<p class='xmp'>", "<p class='xmp'>".$uid_inputs, $form);
}
function hook_newComment($form) {
if(empty($form['publickey']) OR $form['publickey'] != $form['privatkey']) {
die("<h1>Hi spammer</h1>Please don't spam me.");
}
return $form;
}
function generate_uid($len = 40) {
$acceptedChars = 'azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789.,-;_';
$maxchar = strlen($acceptedChars)-1;
$uid = '';
mt_srand((double)microtime()*1000000);
for($i=0; $i < $len; $i++) $uid .= $acceptedChars{ mt_rand(0, $maxchar) };
return $uid;
}
}
?>

149
scripts/JlogUpdater.php Normal file
View file

@ -0,0 +1,149 @@
<?php
class JlogUpdater
{
/**
* Existing versions of Jlog as array
* version -> next version in history
*
* @var array
*/
var $versions = array(
'1.0.2' => '1.1.0',
'1.1.0' => '1.1.1',
'1.1.1' => '1.1.2',
'1.1.2' => '1.1.3'
);
function JlogUpdater()
{
require_once(JLOG_BASEPATH."scripts".DIRECTORY_SEPARATOR."settings.class.php");
}
function getOldVersion()
{
return JLOG_INSTALLED_VERSION;
}
function getNewVersion()
{
return JLOG_SOFTWARE_VERSION;
}
function isUp2Date()
{
if (version_compare($this->getOldVersion(), $this->getNewVersion(), '<')) {
return false;
}
return true;
}
function prepareForm($l)
{
$html = '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post">'
. '<p>' . $l['admin']['e_admin_password'] . ': '
. '<input type="password" name="jlog_password" value="" />'
. '</p>';
$version = $this->getOldVersion();
while (isset($this->versions[$version])) {
$class = $this->_loadUpdateClass($version, $this->versions[$version]);
$html .= sprintf("<h2>Update <var>%s</var> &#x2192; <var>%s</var></h2>\n", $version, $this->versions[$version]);
$html .= $class->getForm($l);
$version = $this->versions[$version];
}
$html .= '<p><input type="submit" name="update" value="' . $l['admin']['update_start'] . '" /></p>';
$html .= '</form>';
return $html;
}
function performUpdate($l)
{
if (JLOG_AMDIN_PASSWORD !== md5($_POST['jlog_password']) and JLOG_ADMIN_PASSWORD !== md5(utf8_decode($_POST['jlog_password']))) {
return '<p>' . $l['admin']['login_false_pw'] . '</p>';
}
require_once(JLOG_BASEPATH."scripts".DIRECTORY_SEPARATOR."settings.class.php");
// read current settings from environment
$settings = new Settings($l);
$settings->importDataByConstants();
$error = false;
$html = '';
$version = $this->getOldVersion();
while (isset($this->versions[$version])) {
$class = $this->_loadUpdateClass($version, $this->versions[$version]);
$html .= sprintf("<h2>Update <var>%s</var> &#x2192; <var>%s</var></h2>\n", $version, $this->versions[$version]);
$result = $class->performUpdate($l, $settings);
if ($result === true) {
// we know that update class ran successfully
$result = $this->_updateVersionNumber($settings, $this->versions[$version]);
// check if errors occured
if (!empty($result)) {
$this->_renderErrors($result);
break;
}
else {
$html .= '<p>' . $l['admin']['update_successfull_part'] . '</p>';
}
}
else {
$html .= $this->_renderErrors($result);
break;
}
$version = $this->versions[$version];
}
if ($error) {
$html .= '<p>' . $l['admin']['update_failure'] . '</p>';
}
else {
$html .= '<p>' . $l['admin']['update_successfull'] . '</p>';
}
return $html;
}
function _getUpdateFile($oldver, $newver)
{
$oldver = str_replace('.', '', $oldver);
$newver = str_replace('.', '', $newver);
return "{$oldver}To{$newver}.php";
}
function _getUpdateClass($oldver, $newver)
{
$oldver = str_replace('.', '', $oldver);
$newver = str_replace('.', '', $newver);
return "JlogUpdate_{$oldver}To{$newver}";
}
function _loadUpdateClass($oldver, $newver)
{
$file = $this->_getUpdateFile($oldver, $newver);
$class = $this->_getUpdateClass($oldver, $newver);
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'update' . DIRECTORY_SEPARATOR . $file);
return new $class();
}
function _renderErrors($errors)
{
$html = '<ul class="error">';
foreach ($errors as $error) {
$html .= '<li>' . $error . '</li>';
}
$html .= '</ul>';
return $html;
}
function _updateVersionNumber($settings, $newver)
{
$settings->setValue('jlog_installed_version', $newver);
$settings->setValue('jlog_installed_url', JLOG_SOFTWARE_URL);
$settings->setValue('jlog_installed_phpv', JLOG_SOFTWARE_PHPV);
$settings->setValue('jlog_installed_mysqlv', JLOG_SOFTWARE_MYSQLV);
// rewrite settings.inc.php
return $settings->do_settings();
}
}
// eof

172
scripts/bbcode.php Normal file
View file

@ -0,0 +1,172 @@
<?php
require_once JLOG_BASEPATH.'/scripts/stringparser_bbcode.class.php';
// Zeilenumbrüche verschiedener Betriebsysteme vereinheitlichen
function convertlinebreaks ($text) {
return preg_replace ("/\015\012|\015|\012/", "\n", $text);
}
// Alles bis auf Neuezeile-Zeichen entfernen
function bbcode_stripcontents ($text) {
return preg_replace ("/[^\n]/", '', $text);
}
// Sonderzeichen behandeln
function special_character($text) {
return str_replace("&amp;#", "&#", $text);
}
function do_bbcode_url ($action, $attributes, $content, $params, $node_object) {
// get URL by parameters
$url = isset($attributes['default']) ? $attributes['default'] : $content;
// validate URL
if($action == 'validate') {
// Due to Bug #146 we will only allow specific protocolls in the url
// currently, these are: HTTP, FTP, News and Mailto - or relative URLs
// starting with a slash
if(preg_match('#^(http://|ftp://|news:|mailto:|/)#i', $url)) return true;
// Some people just write www.example.org, skipping the http://
// We're going to be gentle a prefix this link with the protocoll.
// However, example.org (without www) will not be recognized
elseif(substr($url, 0, 4) == 'www.') return true;
// all other links will be ignored
return true;
}
// generate link
else {
// prefix URL with http:// if the protocoll was skipped
if(substr($url, 0, 4) == 'www.') {
$url = 'http://' . $url;
}
// in case a relative url is given without a link text, we display
// the full URI as link text, not just the relative path
if(!isset($attributes['default']) AND substr($url, 0, 1) == '/') {
$content = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://')
. $_SERVER['HTTP_HOST']
. $url;
}
// build link
return '<a href="' . htmlspecialchars($url) . '">' . $content . '</a>';
}
}
// Funktion zum Einbinden von Bildern
function do_bbcode_img ($action, $attributes, $content, $params, $node_object) {
if ($action == 'validate') {
if (isset($attributes['caption'])) {
$node_object->setFlag('paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);
if ($node_object->_parent->type() == STRINGPARSER_NODE_ROOT OR
in_array($node_object->_parent->_codeInfo['content_type'], array('block', 'list', 'listitem'))) {
return true;
}
else return false;
}
else return true;
}
$title = empty($attributes["title"]) ? "" : " title='".htmlspecialchars($attributes["title"])."'";
if (isset($attributes['class']) AND isset($attributes['caption'])) $class_caption = " class='img ".htmlspecialchars($attributes['class'])."'";
elseif (isset($attributes['class'])) $class = " class='".htmlspecialchars($attributes['class'])."'";
elseif (isset($attributes['caption'])) $class_caption = " class='img'"; // bugfix by Sebastian Kochendörfer #215
if (strpos($content, "http://") === 0) return "<img src='".htmlspecialchars($content)."'".$class." alt='".htmlspecialchars($attributes['alt'])."'".$title." />";
else {
list($img_width, $img_height, $img_type, $img_attr) = @getimagesize(JLOG_BASEPATH.'/img'.DIRECTORY_SEPARATOR.htmlspecialchars($content));
$img = "<img src='".JLOG_PATH."/img/".htmlspecialchars($content)."'".$class." alt='".htmlspecialchars($attributes['alt'])."' style='width: ".$img_width."px;'".$title." />";
}
if(isset($attributes['caption'])) {
return "\n<dl".$class_caption." style='width: ".$img_width."px;'>\n <dt>".$img."</dt>\n <dd>".htmlspecialchars($attributes['caption'])."</dd>\n</dl>\n";
}
else return $img;
}
// Funktion zum Einbinden von HTML Code, welcher vom Browser interpretiert wird
function do_bbcode_html($action, $attributes, $content, $params, $node_object) {
if ($action == 'validate') return true;
return $content;
}
$bbcode = new StringParser_BBCode ();
$bbcode->addFilter (STRINGPARSER_FILTER_PRE, 'convertlinebreaks');
$bbcode->addFilter (STRINGPARSER_FILTER_POST, 'special_character');
$bbcode->addParser (array ('block', 'inline', 'link', 'listitem'), 'htmlspecialchars');
$bbcode->addParser (array ('block', 'inline', 'link', 'listitem'), 'nl2br');
$bbcode->addParser ('list', 'bbcode_stripcontents');
$bbcode->setRootParagraphHandling (true);
$bbcode->addCode ('b', 'simple_replace', null, array ('start_tag' => '<strong>', 'end_tag' => '</strong>'),
'inline', array ('listitem', 'block', 'inline', 'link'), array ());
$bbcode->addCode ('i', 'simple_replace', null, array ('start_tag' => '<em>', 'end_tag' => '</em>'),
'inline', array ('listitem', 'block', 'inline', 'link'), array ());
$bbcode->addCode ('headline', 'simple_replace', null, array('start_tag' => '<h3>', 'end_tag' => '</h3>'),
'block', array('block'), array('inline', 'link'));
$bbcode->addCode ('quote', 'simple_replace', null, array('start_tag' => '<blockquote>', 'end_tag' => '</blockquote>'),
'block', array('block', 'listitem'), array('inline', 'link'));
$bbcode->addCode ('url', 'usecontent?', 'do_bbcode_url', array ('usecontent_param' => 'default'),
'link', array ('listitem', 'block', 'inline'), array ('link'));
$bbcode->addCode ('img', 'usecontent', 'do_bbcode_img', array (),
'image', array ('listitem', 'block', 'inline', 'link'), array ());
$bbcode->addCode ('html', 'usecontent', 'do_bbcode_html', array (),
'html', array ('listitem', 'block', 'inline', 'link'), array ('image'));
$bbcode->addCode ('list', 'simple_replace', null, array ('start_tag' => '<ul>', 'end_tag' => '</ul>'),
'list', array ('block', 'listitem'), array ());
$bbcode->addCode ('olist', 'simple_replace', null, array ('start_tag' => '<ol>', 'end_tag' => '</ol>'),
'list', array ('block', 'listitem'), array ());
$bbcode->addCode ('*', 'simple_replace', null, array ('start_tag' => '<li>', 'end_tag' => '</li>'),
'listitem', array ('list', 'olist' ), array ());
$bbcode->setCodeFlag ('*', 'closetag', BBCODE_CLOSETAG_OPTIONAL);
$bbcode->setCodeFlag ('*', 'paragraphs', false);
$bbcode->setCodeFlag ('list', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);
$bbcode->setCodeFlag ('list', 'opentag.before.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('list', 'closetag.after.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('olist', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);
$bbcode->setCodeFlag ('olist', 'opentag.before.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('olist', 'closetag.before.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('headline', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);
$bbcode->setCodeFlag ('headline', 'opentag.before.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('headline', 'closetag.after.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('html', 'opentag.before.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('html', 'closetag.after.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('quote', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);
$bbcode->setCodeFlag ('quote', 'paragraphs', true);
$bbcode->setCodeFlag ('quote', 'opentag.before.newline', BBCODE_NEWLINE_DROP);
$bbcode->setCodeFlag ('quote', 'closetag.after.newline', BBCODE_NEWLINE_DROP);
// BBCode for comments
$bbcomments = new StringParser_BBCode ();
$bbcomments->addFilter (STRINGPARSER_FILTER_PRE, 'convertlinebreaks');
$bbcomments->addFilter (STRINGPARSER_FILTER_POST, 'special_character');
$bbcomments->addParser (array ('block', 'inline', 'link'), 'htmlspecialchars');
$bbcomments->addParser (array ('block', 'inline', 'link'), 'nl2br');
$bbcomments->setRootParagraphHandling (true);
$bbcomments->addCode ('b', 'simple_replace', null, array ('start_tag' => '<strong>', 'end_tag' => '</strong>'),
'inline', array ('block', 'inline', 'link'), array ());
$bbcomments->addCode ('i', 'simple_replace', null, array ('start_tag' => '<em>', 'end_tag' => '</em>'),
'inline', array ('block', 'inline', 'link'), array ());
$bbcomments->addCode ('url', 'usecontent?', 'do_bbcode_url', array ('usecontent_param' => 'default'),
'link', array ('block', 'inline'), array ('link'));
$bbcomments->addCode ('quote', 'simple_replace', null, array('start_tag' => '<blockquote>', 'end_tag' => '</blockquote>'),
'block', array('block'), array('inline', 'link'));
$bbcomments->setCodeFlag ('quote', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT);
$bbcomments->setCodeFlag ('quote', 'paragraphs', true);
$bbcomments->setCodeFlag ('quote', 'opentag.before.newline', BBCODE_NEWLINE_DROP);
$bbcomments->setCodeFlag ('quote', 'closetag.after.newline', BBCODE_NEWLINE_DROP);
// eof

View file

@ -0,0 +1,250 @@
<?php
$categories = new Categories($l);
class Categories {
var $categories = array();
var $l = array();
function Categories($l) {
$this->l = $l;
$this->get_categories();
}
function get($id, $data) {
return $this->categories[$id][$data];
}
function get_id($url) {
foreach($this->categories AS $cat) {
if($cat['url'] == $url) return $cat['id'];
}
}
function get_categories() {
if(!defined("JLOG_UPDATE") AND !defined("JLOG_LOGIN")) {
$sql = "SELECT id, name, url, description FROM ".JLOG_DB_CATEGORIES;
$cat = new Query($sql);
if($cat->error()) {
echo "<pre>\n";
echo $cat->getError();
echo "</pre>\n";
die();
}
while($c = $cat->fetch()) {
$this->categories[$c['id']] =
array('id' => $c['id'], 'name' => $c['name'], 'url' => $c['url'], 'description' => $c['description'] );
}
}
}
function get_assigned_categories($id) {
$sql = "SELECT cat_id FROM ".JLOG_DB_CATASSIGN." WHERE content_id = '".$id."'";
$assigned = new Query($sql);
if($assigned->error()) {
echo "<pre>\n";
echo $assigned->getError();
echo "</pre>\n";
die();
}
$ids = array();
while($a = $assigned->fetch()) {
$ids[] = $a['cat_id'];
}
return $ids;
}
function output_select($catassign) {
// $catassign is an array which contains all assigned ids
if(count($this->categories) > 0) {
$output = " <p><label for='categories'>".$this->l['admin']['categories']."</label><br />\n"
." <select id='categories' name='categories[]' size='4' multiple='multiple'>\n"
." <option value='no_categories'>".$this->l['admin']['no_categories']."</option>\n";
foreach($this->categories AS $id => $data) {
if(is_array($catassign)) if(in_array($id, $catassign)) $selected = " selected='selected'";
else unset($selected);
$output .= " <option".$selected." value='".$id."'>".$data['name']."</option>\n";
}
$output .= " </select>\n </p>";
return $output;
}
}
function output_rss($id) {
$ids = $this->get_assigned_categories($id);
if(is_array($ids)) {
foreach($ids AS $i) {
$output .= " <category>".$this->get($i, 'name')."</category>\n";
}
}
return $output;
}
function output_assigned_links($ids) {
if(!is_array($ids)) $ids = $this->get_assigned_categories($ids);
if(is_array($ids)) {
foreach($ids as $id) {
$output .= $this->link($id)." ";
}
}
if(isset($output)) return " <span title='".$this->l['content_cat_linklist']."' class='catlinklist'>&raquo; ".$output."</span>";
}
function output_whole_list($_before = " <ul id='categorieslist'>\n", $_after = " </ul>\n", $before = " <li>", $after = "</li>\n") {
if(is_array($this->categories) AND count($this->categories)) {
$output = $_before;
foreach($this->categories AS $id => $tmp) {
$output .= $before.$this->link($id).$after;
}
$output .= $_after;
return $output;
}
else return false;
}
function link($id) {
if(JLOG_CLEAN_URL) return "<a title='".$this->l['content_cat_link']."' href='".JLOG_PATH."/cat/".$this->categories[$id]['url']."/'>".$this->categories[$id]['name']."</a>";
else return "<a title='".$this->l['content_cat_link']."' href='".JLOG_PATH."/archive.php?cat=".$this->categories[$id]['url']."'>".$this->categories[$id]['name']."</a>";
}
function output_whole_list_admin() {
$output = "
<table>
<tr>
<th>".$this->l['admin']['change']."</th>
<th>".$this->l['admin']['delete']."</th>
<th>".$this->l['admin']['cat_name']."</th>
</tr>";
foreach($this->categories AS $id => $tmp) {
$output .= "
<tr>
<td><a href='".add_session_id_to_url("?action=change&amp;id=".$id)."'><img src='".JLOG_PATH."/img/JLOG_edit.png' alt='".$this->l['admin']['change']."' /></a></td>
<td><a href='".add_session_id_to_url("?action=trash&amp;id=".$id)."'><img src='".JLOG_PATH."/img/JLOG_trash.png' alt='".$this->l['admin']['delete']."' /></a></td>
<td>".$this->link($id)."</td>
</tr>\n";
}
$output .= " </table>\n";
return $output;
}
function output_form($form_input = "", $action = 'new', $legend) {
$output = "
<form id='entryform' action='?action=".$action."' method='POST'>
<fieldset><legend>".$legend."</legend>
<p><label for='name'>".$this->l['admin']['cat_name']."</label><br />
<input id='name' name='name' class='long' maxlength='255' size='60' type='text' value='".$form_input['name']."' /></p>
<p><label for='url'>".$this->l['admin']['cat_url']."</label><br />
<input id='url' name='url' class='long' maxlength='100' size='60' type='text' value='".$form_input['url']."' />
<input name='id' type='hidden' value='".$form_input['id']."' /></p>
<p><label for='description'>".$this->l['admin']['cat_description']."</label><br />
<textarea id='description' name='description' class='short'>".$form_input['description']."</textarea></p>
<p><input type='submit' name='form_submit' value='".$this->l['admin']['submit']."' />
<a href='".add_session_id_to_url("categories.php")."'>".$this->l['admin']['cancel']."</a>
".add_session_id_input_tag()."</p>
</fieldset>
</form>";
return $output;
}
function new_cat($form_input) {
$form_input = escape_for_mysql($form_input);
$sql = "INSERT INTO ".JLOG_DB_CATEGORIES." (name, url, description) VALUES
('".$form_input['name']."',
'".$form_input['url']."',
'".$form_input['description']."');";
$new = new Query($sql);
if($new->error()) {
echo "<pre>\n";
echo $new->getError();
echo "</pre>\n";
die();
}
}
function change_cat($form_input) {
$form_input = escape_for_mysql($form_input);
$sql = "UPDATE ".JLOG_DB_CATEGORIES."
SET
name = '".$form_input['name']."',
url = '".$form_input['url']."',
description = '".$form_input['description']."'
WHERE
id = '".$form_input['id']."' LIMIT 1;";
$change = new Query($sql);
if($change->error()) {
echo "<pre>\n";
echo $change->getError();
echo "</pre>\n";
die();
}
}
function trash_cat($id) {
$sql = "DELETE FROM ".JLOG_DB_CATEGORIES." WHERE id = '".escape_for_mysql($id)."' LIMIT 1";
$trash = new Query($sql);
if($trash->error()) {
echo "<pre>\n";
echo $trash->getError();
echo "</pre>\n";
die();
}
$sql = "DELETE FROM ".JLOG_DB_CATASSIGN." WHERE cat_id = '".escape_for_mysql($id)."' LIMIT 1";
$trash = new Query($sql);
if($trash->error()) {
echo "<pre>\n";
echo $trash->getError();
echo "</pre>\n";
die();
}
}
function validate($form_input) {
if(empty($form_input['name'])) $errors[] = $this->l['admin']['cat_noname'];
if(empty($form_input['url'])) $errors[] = $this->l['admin']['no_url'];
elseif(!preg_match("/^[a-z0-9\-_\.,]+$/", $form_input['url'])) $errors[] = $this->l['admin']['false_url_letters'];
else {
$sql = "SELECT id FROM ".JLOG_DB_CATEGORIES." WHERE url = '".escape_for_mysql($form_input['url'])."';";
$check_url = new Query($sql);
if($check_url->error()) {
echo "<pre>\n";
echo $check_url->getError();
echo "</pre>\n";
die();
}
if($check_url->numRows() > 0) {
$c = $check_url->fetch();
if($c['id'] != $form_input['id']) $errors[] = $this->l['admin']['cat_duplicate'];
}
}
return $errors;
}
}
?>

141
scripts/comments.php Normal file
View file

@ -0,0 +1,141 @@
<?php
function com_form_output($com_form) {
$com_form = array_htmlspecialchars($com_form);
global $l, $plugins;
if(!isset($com_form['content'])) $com_form['content'] = "";
$output = "
<form method='post' action='#entryform' id='entryform'>
<fieldset><legend>".$l['comments_entryform']."</legend>
<p class='xmp'>
<span>".$l['comments_bbcode']."
<a onclick=\"jlog_learnbb('".JLOG_PATH."'); return false;\" href='".JLOG_PATH."/learn_bb.php'>BBcode</a>?
</span>
<br id='bbcode' />
<textarea rows='8' cols='30' name='content'>".$com_form['content']."</textarea>
</p>
<p>
<input class='userdata' type='text' name='name' value='".$com_form['name']."'
onfocus=\"if(this.value &amp;&amp; this.value=='".$l['comments_name']."')this.value=''\"
onblur=\"if(this.value=='') this.value='".$l['comments_name']."'\" />
<input class='userdata' type='text' name='city' value='".$com_form['city']."'
onfocus=\"if(this.value &amp;&amp; this.value=='".$l['comments_city']."')this.value=''\"
onblur=\"if(this.value=='') this.value='".$l['comments_city']."'\" /><br />
<input class='userdata' type='text' name='email' value='".$com_form['email']."'
onfocus=\"if(this.value &amp;&amp; this.value=='".$l['comments_email']."')this.value=''\"
onblur=\"if(this.value=='') this.value='".$l['comments_email']."'\" />
<input class='userdata' type='text' name='homepage' value='".$com_form['homepage']."' />
</p>
<p class='checkbox'>
<input type='checkbox' id='mail_by_comment' name='mail_by_comment' ";
if(isset($com_form['mail_by_comment']) AND $com_form['mail_by_comment'] == 1) $output .= "checked='checked'";
$output .= " value='1' /> <label for='mail_by_comment'>".$l['comments_mail_by_comment']."</label>&nbsp;";
if(defined('JLOG_ADMIN')) $output .= "\n <input type='hidden' value='".$com_form['id']."' name='id' />\n";
else {
$output .= " <input type='checkbox' id='cookie' name='cookie' ";
if(isset($com_form['cookie']) AND $com_form['cookie'] == 1) $output .= "checked='checked'";
$output .= " value='1' /> <label for='cookie'>".$l['comments_save_data']."</label>\n";
}
$output .= " <input type='hidden' value='".$com_form['sid']."' name='sid' />
</p>
<p>
<input class='send' type='submit' name='form_submitted' value='".$l['comments_preview']."' onclick=\"this.form.action = '#preview'\" />
<input class='send' type='submit' name='form_submitted' value='".$l['comments_send']."' />";
if(defined("JLOG_ADMIN")) $output .= add_session_id_input_tag();
$output .= "
</p>
</fieldset>
</form>\n
";
### Plugin Hook
$output = $plugins->callHook('commentForm', $output, $com_form);
return $output;
}
function com_javascript_variables() {
global $l;
return "
<script type='text/javascript'>
jlog_l_comments_show = '".$l['comments_show']."';
jlog_l_comments_hide = '".$l['comments_hide']."';
jlog_l_comments_bold = '".$l['comments_bold']."';
jlog_l_comments_italic = '".$l['comments_italic']."';
jlog_l_comments_quote = '".$l['comments_quote']."';
jlog_l_comments_url = '".$l['comments_url']."';
jlog_l_comments_plz_format_txt = '".$l['comments_plz_format_txt']."';
jlog_l_comments_url_href = '".$l['comments_url_href']."';
jlog_l_comments_url_node = '".$l['comments_url_node']."';
</script>
";
}
function com_check_errors($com_form) {
global $l;
if(empty($com_form['sid'])) $errors[] = $l['comments_no_sid'];
if(isset($com_form['email']) AND $com_form['email'] != "" AND !preg_match("/^[^@]+@.+\.\D{2,6}$/", $com_form['email']) AND $com_form['email'] != $l['comments_email']) $errors[] = $l['comments_false_mail'];
if(empty($com_form['content'])) $errors[] = $l['comments_notext'];
if(isset($errors)) return $errors;
}
function com_clean_data($data) {
global $l;
if(empty($data['name']) OR $data['name'] == $l['comments_name']) $data['name'] = "";
if(empty($data['city']) OR $data['city'] == $l['comments_city']) $data['city'] = "";
if(empty($data['email']) OR $data['email'] == $l['comments_email']) $data['email'] = "";
if(empty($data['homepage']) OR $data['homepage'] == $l['comments_homepage']) $data['homepage'] = "";
if(empty($data['date'])) $data['date'] = time();
return $data;
}
function set_cookie($data) {
$userdaten = array( $data['name'],
$data['city'],
$data['email'],
$data['homepage'] );
$cookielife = time() + 42 * 24 * 60 * 60;
$path = parse_url(JLOG_PATH);
if(!isset($path['path'])) $path['path'] = "";
setcookie("jlog_userdata", urlencode(serialize($userdaten)), $cookielife, $path['path']."/");
}
function trash_cookie() {
$cookielife = time() - 3600;
setcookie("jlog_userdata", '', $cookielife, "/");
}
function new_sid() {
list($usec, $sec) = explode(' ', microtime());
mt_srand((float) $sec + ((float) $usec * 100000));
return $_SERVER["REMOTE_ADDR"]."-".time()."-".mt_rand(1000,9999);
}
// Funcitons
function do_comment($data, $nr) {
global $l, $bbcomments, $plugins;
$meta = array_htmlspecialchars($data);
$comment = "
<li id='c".$data['id']."'>
<p class='meta'><a class='permalink' title='".$l['comments_permalink']."' href='#c".$data['id']."'>".$nr."</a> <cite>";
if(!empty($meta['homepage'])) $comment .= "<a title='".$meta['homepage']."' href='".$meta['homepage']."'>";
if(!empty($meta['name'])) $comment .= $meta['name'];
else $comment .= $l['comments_anonym'];
if(!empty($meta['homepage'])) $comment .= "</a>";
$comment .= "</cite>";
if(!empty($meta['city'])) $comment .= " ".$l['comments_from']." ".$meta['city'];
$comment .= " ".$l['comments_posted']." ".strftime(JLOG_DATE_COMMENT, $data['date']).":</p>\n".$bbcomments->parse($data['content'])."</li>";
### Plugin Hook
$comment = $plugins->callHook('showComment', $comment, $data, $nr);
return $comment;
}
?>

View file

@ -0,0 +1,71 @@
<?php
// call database class
class Query {
// Variablen
var $_sql = "";
var $_result = 0;
var $_errno = 0;
var $_error = "";
//Konstruktor
function Query($sql)
{
// Query in der Klasse speichern
$this->_sql = trim($sql);
$this->_result = mysql_query($this->_sql);
if(!$this->_result) {
$this->_errno = mysql_errno();
$this->_error = mysql_error();
}
}
//Methoden
function error()
{
// Result-ID in einer tmp-Variablen speichern
$tmp = $this->_result;
// Variable in boolean umwandeln
$tmp = (bool)$tmp;
// Variable invertieren
$tmp = !$tmp;
// und zurückgeben
return $tmp;
}
function getError() {
if($this->error()) {
$str = "request:\n".$this->_sql."\n";
$str .= "response:\n".$this->_error."\n";
$str .= "Errorcode: ".$this->_errno;
}
else $str = "No error.";
return $str;
}
function getErrno() {
return $this->_errno;
}
function fetch() {
if($this->error()) {
echo "An Error has occurred, please check your MySQL-Query.";
$return = null;
}
else $return = mysql_fetch_assoc($this->_result);
return $return;
}
function numRows() {
if($this->error()) {
$return = -1;
}
else $return = mysql_num_rows($this->_result);
return $return;
}
function free() {
// Speicher freimachen
mysql_free_result($this->_result);
}
}
?>

121
scripts/do_template.php Normal file
View file

@ -0,0 +1,121 @@
<?php
if(ereg('gzip', getenv('HTTP_ACCEPT_ENCODING')) &&
!ini_get('zlib.output_compression'))
{
ob_start('ob_gzhandler');
}
else ob_start();
$handle = fopen (JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR.'template.tpl', "r");
$_body = "";
while (!feof($handle)) $_body .= fgets($handle);
fclose ($handle);
$handle = fopen (JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR.'subcurrent.inc', "r");
$c['subnav_current'] = "";
while (!feof($handle)) $c['subnav_current'] .= fgets($handle);
fclose ($handle);
// Aditional Header Data
header("Content-Type: text/html; charset=UTF-8");
if(!isset($c['meta']['aditionalheader'])) $c['meta']['aditionalheader'] = "";
$c['meta']['aditionalheader'] .= ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n";
if(isset($c['meta']['robots'])) $c['meta']['aditionalheader'] .= ' <meta name="robots" content="'.$c['meta']['robots'].'" />'."\n";
if(isset($c['meta']['keywords'])) $c['meta']['aditionalheader'] .= ' <meta name="KeyWords" content="'.htmlspecialchars(strip_tags($c['meta']['keywords']), ENT_QUOTES).'" />'."\n";
if(isset($c['meta']['description'])) $c['meta']['aditionalheader'] .= ' <meta name="Description" content="'.htmlspecialchars(strip_tags(trim($c['meta']['description']), ENT_QUOTES)).'" />'."\n";
if(isset($c['meta']['date'])) $c['meta']['aditionalheader'] .= ' <meta name="date" content="'.$c['meta']['date'].'" />';
if(isset($c['meta']['pingback'])) {
$c['meta']['aditionalheader'] .= "\n".' <link rel="pingback" href="'.JLOG_PATH.'/xmlrpc.php" />';
header("X-Pingback: ".JLOG_PATH."/xmlrpc.php");
}
$c['meta']['aditionalheader'] .=
' <meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="Jlog v'.JLOG_SOFTWARE_VERSION.'" />
<link rel="start" href="'.JLOG_PATH.'/" title="'.$l['meta_start'].'" />
<link rel="search" href="'.JLOG_PATH.'/search.php" title="'.$l['meta_search'].'" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - Summaries" href="'.JLOG_PATH.'/personal/rss.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0 - Full Posts" href="'.JLOG_PATH.'/personal/rss-full.xml" />
<script type="text/javascript" src="'.JLOG_PATH.'/scripts/javascripts.js"></script>';
// do this on admincenter
if(defined('JLOG_ADMIN')) {
// turn off cashing
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
// include admin.css
$c['meta']['aditionalheader'] .= "\n ".'<link rel="stylesheet" href="'.JLOG_PATH.'/personal/css/admin.css" type="text/css" />';
$c['main'] = "<div id='admin'>".$c['main']."</div>";
}
$_search = array (
"<jlog:language />",
"<jlog:website />",
"<jlog:title />",
"<jlog:aditional-header />",
"<jlog:homelink />",
"<jlog:skipcontent />",
"<jlog:home />",
"<jlog:slogan-h />",
"<jlog:slogan />",
"<jlog:search-h />",
"<jlog:searchstring />",
"<jlog:search />",
"<jlog:categorieslist-h />",
"<jlog:current-h />",
"<jlog:subcurrent />",
"<jlog:archive-more />",
"<jlog:archivelink />",
"<jlog:archive />",
"<jlog:sub-info />",
"<jlog:rss-info />",
"<jlog:rss-link />",
"<jlog:copyright />",
"<jlog:content />",
"<jlog:powered />"
);
$_replace = array (
$l['language'],
htmlspecialchars(JLOG_WEBSITE, ENT_QUOTES),
htmlspecialchars($c['meta']['title']),
$c['meta']['aditionalheader'],
JLOG_PATH,
$l['content_skip'],
$l['meta_start'],
$l['subnav_aboutpage'],
JLOG_DESCRIPTION,
$l['content_search_topic'],
'', // bugfix
$l['content_search'],
$l['content_categorieslist_h'],
$l['subnav_current'],
$c['subnav_current'],
$l['content_archive'],
archive(),
$l['content_archivelink'],
$l['subnav_info'],
$l['subnav_rss'],
"<a href='".JLOG_PATH."/personal/rss-full.xml'><img src='".JLOG_PATH."/img/JLOG_rss-full.png' alt='XML - Fullpost' /></a> <a href='".JLOG_PATH."/personal/rss.xml'><img src='".JLOG_PATH."/img/JLOG_rss-summary.png' alt='XML - Summary' /></a>",
"&copy;&nbsp;".date('Y')." ".JLOG_PUBLISHER.", ".$l['subnav_copyright'],
$c['main'],
$l['subnav_powered']." <a href='".JLOG_SOFTWARE_URL."' title='version ".JLOG_SOFTWARE_VERSION."'>Jlog</a>"
);
$body = str_replace($_search, $_replace, $_body);
$jlogTemplateTags = new JLOG_Tags($body);
if(($categorieslist_tag = $jlogTemplateTags->getTag('categorieslist')) !== false) {
if(strlen($categorieslist_class = $jlogTemplateTags->getAttributeValue('categorieslist', 'class'))>0) $categorieslist_class = ' class="'.$categorieslist_class.'"';
if( $categorieslist = $categories->output_whole_list("\n ".'<ul'.$categorieslist_class.'>'."\n")) {
$body = str_replace($categorieslist_tag, $categorieslist, $body );
}
else $body = str_replace($categorieslist_tag, '', $body );
}
$body = $plugins->callHook('body', $body, $jlogTemplateTags);

313
scripts/general.func.php Normal file
View file

@ -0,0 +1,313 @@
<?php
// get weblog link
function blog($date, $url, $section = 'weblog') {
if($section == 'weblog' OR $section == 'comment') {
$y = date("Y", $date);
$m = date("m", $date);
if(JLOG_CLEAN_URL === true) $permalink = JLOG_PATH."/".$y."/".$m."/".$url;
else $permalink = JLOG_PATH."/log.php?y=".$y."&amp;m=".$m."&amp;url=".$url;
}
else {
if(JLOG_CLEAN_URL === true) $permalink = JLOG_PATH."/".$url;
else $permalink = JLOG_PATH."/page.php?url=".$url;
}
### Plugin Hook
global $plugins;
$permalink = $plugins->callHook('permalink', $permalink, $date, $url, $section);
return $permalink;
}
function archive() {
if(JLOG_CLEAN_URL === true) return JLOG_PATH."/archive";
else return JLOG_PATH."/archive.php";
}
// get year links
class Year_Links {
function Year_Links($get, $start, $page, $l, $cat="") {
$date = getdate();
$this->_now = $date['year'];
$this->_start = $start;
$this->_page = $page;
$this->_l = $l;
if(JLOG_CLEAN_URL === true) {
if($cat != "") {
list($tmp, $cat) = explode("=", $cat);
$this->cat = "/cat/".$cat;
}
}
elseif($cat !== "") $this->cat = $cat."&amp;";
if($get >= $this->_start OR $get <= $this->_now AND preg_match("[0-9]", $get)) $this->year = $get;
else $this->year = $this->_now;
}
function get_linklist() {
for($y = $this->_start; $y <= $this->_now; $y++) {
if($y != $this->_start) $years_links .= " | ";
if($y == $this->year) $years_links .= " <strong>".$y."</strong>";
else {
if(JLOG_CLEAN_URL === true) $years_links .= " <a href='".JLOG_PATH.$this->cat."/".$y."/'>".$y."</a>\n";
else $years_links .= " <a href='".$this->_page.(strpos($this->_page, '?') === false ? "?" : "&amp;").$this->cat."y=".$y."'>".$y."</a>\n";
}
}
return $this->_l['content_choose_year'].$years_links;
}
function get_admin_linklist() {
for($y = $this->_start; $y <= $this->_now; $y++) {
if($y != $this->_start) $years_links .= " | ";
if($y == $this->year) $years_links .= " <strong>".$y."</strong>";
else $years_links .= " <a href='".$this->_page.(strpos($this->_page, '?') === false ? "?" : "&amp;")."y=".$y."'>".$y."</a>\n";
}
return $this->_l['content_choose_year'].$years_links;
}
// get selected year
function get_selected_year() {
return $this->year;
}
}
// kill Magic Quotes
function strip($_data) {
if (!get_magic_quotes_gpc()) return $_data;
else {
if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = strip($val);
else $_data = stripslashes($_data);
return $_data;
}
}
// escape input for mysql
function escape_for_mysql($_data) {
if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = escape_for_mysql($val);
else $_data = mysql_escape_string($_data);
return $_data;
}
// htmlspecialchars a whole array
function array_htmlspecialchars($_data) {
if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = array_htmlspecialchars($val);
else $_data = htmlspecialchars($_data, ENT_QUOTES);
return $_data;
}
// Fehler ausgeben
function error_output($errors, $id = "", $headline = false) {
global $l;
$error = "";
if($headline === false) $headline = $l["error"];
if(isset($errors)) {
if(strlen($headline) > 0) $error = "\n<h3 id='".$id."' class='error'>".$headline."</h3>";
$error .= "\n <ul class='error'>\n";
foreach($errors AS $f) $error .= " <li>".$f."</li>\n";
$error .= " </ul>\n";
}
return $error;
}
// Aus der Datenbank löschen (wird beim Kommentarlöschen gebraucht)
function trash($id, $table) {
$sql = "DELETE FROM ".$table." WHERE id = '".$id."' LIMIT 1";
$trash = new Query($sql);
if($trash->error()) {
echo "<pre>\n";
echo $trash->getError();
echo "</pre>\n";
die();
}
return true;
}
// output a teaser
function do_teaser($data, $cc, $pre = '<h2>', $post = '</h2>') {
global $l, $bbcode, $categories, $plugins;
if(empty($data['date_url'])) $data['date_url'] = $data['date']; # fix for search.php
$output = "\n <div class='teaser'>\n";
if($data['teaserpic'] != "") {
list($img_width, $img_height, $img_type, $img_attr) = @getimagesize(JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR.'t_'.$data['teaserpic']);
$output .= " <a title='".$l['content_permalink']."' href='".blog($data['date_url'], $data['url'], $data['section'])."'><img class='teaserpic' src='".JLOG_PATH."/img/t_".$data['teaserpic']."' style='width: ".$img_width."px; height: ".$img_height."px;' alt='' /></a>\n";
}
$output .= " ".$pre."<a title='".$l['content_permalink']."' href='".blog($data['date_url'], $data['url'], $data['section'])."'>".htmlspecialchars($data['topic'], ENT_QUOTES)."</a>".$post."
<p class='date meta'>".$l['content_posted']." ".strftime(JLOG_DATE, $data['date']).$categories->output_assigned_links($data['id'])."</p>";
$output .= $bbcode->parse($data['teaser']);
$output .=" <p class='meta'><a title='".$l['content_more_title']."' href='".blog($data['date_url'], $data['url'], $data['section'])."'>".$l['content_more']."</a>";
if($data['section'] == 'weblog') {
if(isset($cc[$data['id']]) AND $cc[$data['id']] != 0) $tmp_comments = " <a title='".$l['content_comments_title']."' href='".blog($data['date'], $data['url'])."#comments'>".$l['content_comments']." (".$cc[$data['id']].")</a>";
elseif($data['comments'] === '0') $tmp_comments = $l['comments_teaser_closed'];
else $tmp_comments = " <a href='".blog($data['date'], $data['url'])."#comments'>".$l['content_comment_plz']."</a>";
$output .= " | ".$tmp_comments;
}
$output .= "</p>\n </div>\n";
### Plugin Hook
$output = $plugins->callHook('doTeaser', $output, $data, $cc, $pre, $post);
return $output;
}
function do_entry($data, $cc = NULL, $section = 'weblog', $pre = '<h2>', $post = '</h2>') {
global $l, $bbcode, $categories, $plugins;
$output = "
<div class='mainitem'>
".$pre."<a title='".$l['content_permalink']."' href='".blog($data['date'], $data['url'], $section)."'>".htmlspecialchars($data['topic'], ENT_QUOTES)."</a>".$post."\n";
if($data['teaserpic'] != "" AND $data['teaserpiconblog'] == 1) {
list($img_width, $img_height, $img_type, $img_attr) = @getimagesize(JLOG_BASEPATH.'img'.DIRECTORY_SEPARATOR.'t_'.$data['teaserpic']);
$output .= "<a title='".$l['content_permalink']."' href='".blog($data['date'], $data['url'], $section)."'><img class='teaserpic' src='".JLOG_PATH."/img/t_".$data['teaserpic']."' style='width: ".$img_width."px; height: ".$img_height."px;' alt='' /></a>";
}
if($section == 'weblog' OR ($cat = $categories->output_assigned_links($data['id'])) != "") {
$output .= " <p class='date meta'>";
if($section == 'weblog') $output .= $l['content_posted']." ".strftime(JLOG_DATE, $data['date']);
$output .= $categories->output_assigned_links($data['id'])."</p>";
}
$output .= $bbcode->parse($data['content']);
$path_parts = pathinfo($_SERVER['SCRIPT_NAME']);
if($data['section'] == 'weblog' AND $path_parts['basename'] != 'log.php') {
if(isset($cc[$data['id']]) AND $cc[$data['id']] != 0) $tmp_comments = " <a title='".$l['content_comments_title']."' href='".blog($data['date'], $data['url'])."#comments'>".$l['content_comments']." (".$cc[$data['id']].")</a>";
elseif($data['comments'] === '0') $tmp_comments = $l['comments_teaser_closed'];
else $tmp_comments = "<a href='".blog($data['date'], $data['url'])."#comments'>".$l['content_comment_plz']."</a>";
$output .=" <p class='meta'>".$tmp_comments."</p>";
}
if($section == 'weblog') $output .= ' <hr />';
$output .= " </div>\n";
### Plugin Hook
$output = $plugins->callHook('doEntry', $output, $data, $cc, $section);
return $output;
}
function count_comments() {
// -- Kommentare zählen
$sql = "SELECT reference, COUNT(*) as count FROM ".JLOG_DB_COMMENTS." WHERE type <> 'pingback' GROUP BY reference";
$comments = new Query($sql);
if($comments->error()) {
echo "<pre>\n";
echo $comments->getError();
echo "</pre>\n";
die();
}
// -- Anzahl der jeweiligen Kommentare
$com = array();
while($c = $comments->fetch()) $com[$c['reference']] = $c['count'];
### Plugin Hook
global $plugins;
$com = $plugins->callHook('countComments', $com);
return $com;
}
if (!function_exists('is_a')) {
function is_a($object, $class)
{
if (!is_object($object)) {
return false;
}
if (get_class($object) == strtolower($class)) {
return true;
} else {
return is_subclass_of($object, $class);
}
}
}
if (!function_exists("stripos")) {
function stripos($str,$needle,$offset=0) {
return strpos( strtolower($str), strtolower($needle), $offset );
}
}
if(!function_exists('str_ireplace')){
function str_ireplace($search, $replace, $subject){
if(is_array($search)){
array_walk($search, create_function('&$pat, $key', '"/".preg_quote($pat, "/")."/i"'));
}
else{
$search = '/'.preg_quote($search, '/').'/i';
}
return preg_replace($search, $replace, $subject);
}
}
if ( !function_exists('file_put_contents') && !defined('FILE_APPEND') ) {
define('FILE_APPEND', 1);
function file_put_contents($n, $d, $flag = false) {
$mode = ($flag == FILE_APPEND || strtoupper($flag) == 'FILE_APPEND') ? 'a' : 'w';
$f = @fopen($n, $mode);
if ($f === false) {
return 0;
} else {
if (is_array($d)) $d = implode($d);
$bytes_written = fwrite($f, $d);
fclose($f);
return $bytes_written;
}
}
}
function my_serialize_cfg($arg) {
if(is_string($arg)) return "'".preg_replace("/'/","\\'",$arg)."'";
elseif(is_integer($arg)) return (string)$arg;
elseif(is_float($arg)) return (string)$arg;
elseif(is_null($arg)) return 'NULL';
elseif(is_bool($arg)) {
if($arg) return 'true';
else return 'false';
}
elseif(is_array($arg)) {
$retval = 'Array(';
foreach($arg as $key => $value) {
$retval .= my_serialize_cfg($key).' => '.my_serialize_cfg($value).',';
}
$retval .= ')';
return $retval;
}
else die("unsupported type! ".gettype($arg));
}
class JLOG_Tags {
var $tree = array();
function JLOG_Tags($body) {
preg_match_all('/<jlog:([a-z]\w+)\s?([^>]*)\/?>(<\/(\1):(\2)>)?/ims', $body, $this->tree);
}
function getTag($tagname) {
if(($tagnr = array_search($tagname, $this->tree[1])) !== false) return $this->tree[0][$tagnr];
else return false;
}
function getAttributeValue($tagname, $attribute) {
$pattern = '/(?:^|\s)([a-z]\w+)(?:=)(?:(?:\'([^\']+)\')|(?:"([^"]*)")|([^\s,]+))/i';
if(($tagnr = array_search($tagname, $this->tree[1])) !== false) {
preg_match_all($pattern, $this->tree[2][ $tagnr ], $matches, PREG_SET_ORDER);
$a = count($matches);
for($i=0;$i<$a;$i++) {
if($matches[$i][1] == $attribute) return $matches[$i][3];
}
}
else return;
}
}
?>

817
scripts/ixr-library.inc.php Normal file
View file

@ -0,0 +1,817 @@
<?php
/*
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
Site: http://scripts.incutio.com/xmlrpc/
Manual: http://scripts.incutio.com/xmlrpc/manual.php
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
*/
class IXR_Value {
var $data;
var $type;
function IXR_Value ($data, $type = false) {
$this->data = $data;
if (!$type) {
$type = $this->calculateType();
}
$this->type = $type;
if ($type == 'struct') {
/* Turn all the values in the array in to new IXR_Value objects */
foreach ($this->data as $key => $value) {
$this->data[$key] = new IXR_Value($value);
}
}
if ($type == 'array') {
for ($i = 0, $j = count($this->data); $i < $j; $i++) {
$this->data[$i] = new IXR_Value($this->data[$i]);
}
}
}
function calculateType() {
if ($this->data === true || $this->data === false) {
return 'boolean';
}
if (is_integer($this->data)) {
return 'int';
}
if (is_double($this->data)) {
return 'double';
}
// Deal with IXR object types base64 and date
if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
return 'date';
}
if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
return 'base64';
}
// If it is a normal PHP object convert it in to a struct
if (is_object($this->data)) {
$this->data = get_object_vars($this->data);
return 'struct';
}
if (!is_array($this->data)) {
return 'string';
}
/* We have an array - is it an array or a struct ? */
if ($this->isStruct($this->data)) {
return 'struct';
} else {
return 'array';
}
}
function getXml() {
/* Return XML for this value */
switch ($this->type) {
case 'boolean':
return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>';
break;
case 'int':
return '<int>'.$this->data.'</int>';
break;
case 'double':
return '<double>'.$this->data.'</double>';
break;
case 'string':
return '<string>'.htmlspecialchars($this->data).'</string>';
break;
case 'array':
$return = '<array><data>'."\n";
foreach ($this->data as $item) {
$return .= ' <value>'.$item->getXml()."</value>\n";
}
$return .= '</data></array>';
return $return;
break;
case 'struct':
$return = '<struct>'."\n";
foreach ($this->data as $name => $value) {
$return .= " <member><name>$name</name><value>";
$return .= $value->getXml()."</value></member>\n";
}
$return .= '</struct>';
return $return;
break;
case 'date':
case 'base64':
return $this->data->getXml();
break;
}
return false;
}
function isStruct($array) {
/* Nasty function to check if an array is a struct or not */
$expected = 0;
foreach ($array as $key => $value) {
if ((string)$key != (string)$expected) {
return true;
}
$expected++;
}
return false;
}
}
class IXR_Message {
var $message;
var $messageType; // methodCall / methodResponse / fault
var $faultCode;
var $faultString;
var $methodName;
var $params;
// Current variable stacks
var $_arraystructs = array(); // The stack used to keep track of the current array/struct
var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array
var $_currentStructName = array(); // A stack as well
var $_param;
var $_value;
var $_currentTag;
var $_currentTagContents;
// The XML parser
var $_parser;
function IXR_Message ($message) {
$this->message = $message;
}
function parse() {
// first remove the XML declaration
$this->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $this->message);
if (trim($this->message) == '') {
return false;
}
$this->_parser = xml_parser_create();
// Set XML parser to take the case of tags in to account
xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false);
// Set XML parser callback functions
xml_set_object($this->_parser, $this);
xml_set_element_handler($this->_parser, 'tag_open', 'tag_close');
xml_set_character_data_handler($this->_parser, 'cdata');
if (!xml_parse($this->_parser, $this->message)) {
/* die(sprintf('XML error: %s at line %d',
xml_error_string(xml_get_error_code($this->_parser)),
xml_get_current_line_number($this->_parser))); */
return false;
}
xml_parser_free($this->_parser);
// Grab the error messages, if any
if ($this->messageType == 'fault') {
$this->faultCode = $this->params[0]['faultCode'];
$this->faultString = $this->params[0]['faultString'];
}
return true;
}
function tag_open($parser, $tag, $attr) {
$this->currentTag = $tag;
switch($tag) {
case 'methodCall':
case 'methodResponse':
case 'fault':
$this->messageType = $tag;
break;
/* Deal with stacks of arrays and structs */
case 'data': // data is to all intents and puposes more interesting than array
$this->_arraystructstypes[] = 'array';
$this->_arraystructs[] = array();
break;
case 'struct':
$this->_arraystructstypes[] = 'struct';
$this->_arraystructs[] = array();
break;
}
}
function cdata($parser, $cdata) {
$this->_currentTagContents .= $cdata;
}
function tag_close($parser, $tag) {
$valueFlag = false;
switch($tag) {
case 'int':
case 'i4':
$value = (int)trim($this->_currentTagContents);
$this->_currentTagContents = '';
$valueFlag = true;
break;
case 'double':
$value = (double)trim($this->_currentTagContents);
$this->_currentTagContents = '';
$valueFlag = true;
break;
case 'string':
$value = (string)trim($this->_currentTagContents);
$this->_currentTagContents = '';
$valueFlag = true;
break;
case 'dateTime.iso8601':
$value = new IXR_Date(trim($this->_currentTagContents));
// $value = $iso->getTimestamp();
$this->_currentTagContents = '';
$valueFlag = true;
break;
case 'value':
// "If no type is indicated, the type is string."
if (trim($this->_currentTagContents) != '') {
$value = (string)$this->_currentTagContents;
$this->_currentTagContents = '';
$valueFlag = true;
}
break;
case 'boolean':
$value = (boolean)trim($this->_currentTagContents);
$this->_currentTagContents = '';
$valueFlag = true;
break;
case 'base64':
$value = base64_decode($this->_currentTagContents);
$this->_currentTagContents = '';
$valueFlag = true;
break;
/* Deal with stacks of arrays and structs */
case 'data':
case 'struct':
$value = array_pop($this->_arraystructs);
array_pop($this->_arraystructstypes);
$valueFlag = true;
break;
case 'member':
array_pop($this->_currentStructName);
break;
case 'name':
$this->_currentStructName[] = trim($this->_currentTagContents);
$this->_currentTagContents = '';
break;
case 'methodName':
$this->methodName = trim($this->_currentTagContents);
$this->_currentTagContents = '';
break;
}
if ($valueFlag) {
/*
if (!is_array($value) && !is_object($value)) {
$value = trim($value);
}
*/
if (count($this->_arraystructs) > 0) {
// Add value to struct or array
if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') {
// Add to struct
$this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value;
} else {
// Add to array
$this->_arraystructs[count($this->_arraystructs)-1][] = $value;
}
} else {
// Just add as a paramater
$this->params[] = $value;
}
}
}
}
class IXR_Server {
var $data;
var $callbacks = array();
var $message;
var $capabilities;
function IXR_Server($callbacks = false, $data = false) {
$this->setCapabilities();
if ($callbacks) {
$this->callbacks = $callbacks;
}
$this->setCallbacks();
$this->serve($data);
}
function serve($data = false) {
if (!$data) {
global $HTTP_RAW_POST_DATA;
if (!$HTTP_RAW_POST_DATA) {
die('XML-RPC server accepts POST requests only.');
}
$data = $HTTP_RAW_POST_DATA;
}
$this->message = new IXR_Message($data);
if (!$this->message->parse()) {
$this->error(-32700, 'parse error. not well formed');
}
if ($this->message->messageType != 'methodCall') {
$this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall');
}
$result = $this->call($this->message->methodName, $this->message->params);
// Is the result an error?
if (is_a($result, 'IXR_Error')) {
$this->error($result);
}
// Encode the result
$r = new IXR_Value($result);
$resultxml = $r->getXml();
// Create the XML
$xml = <<<EOD
<methodResponse>
<params>
<param>
<value>
$resultxml
</value>
</param>
</params>
</methodResponse>
EOD;
// Send it
$this->output($xml);
}
function call($methodname, $args) {
if (!$this->hasMethod($methodname)) {
return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.');
}
$method = $this->callbacks[$methodname];
// Perform the callback and send the response
if (count($args) == 1) {
// If only one paramater just send that instead of the whole array
$args = $args[0];
}
// Are we dealing with a function or a method?
if (substr($method, 0, 5) == 'this:') {
// It's a class method - check it exists
$method = substr($method, 5);
if (!method_exists($this, $method)) {
return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.');
}
// Call the method
$result = $this->$method($args);
} else {
// It's a function - does it exist?
if (!function_exists($method)) {
return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');
}
// Call the function
$result = $method($args);
}
return $result;
}
function error($error, $message = false) {
// Accepts either an error object or an error code and message
if ($message && !is_object($error)) {
$error = new IXR_Error($error, $message);
}
$this->output($error->getXml());
}
function output($xml) {
$xml = '<?xml version="1.0"?>'."\n".$xml;
$length = strlen($xml);
header('Connection: close');
header('Content-Length: '.$length);
header('Content-Type: text/xml');
header('Date: '.date('r'));
echo $xml;
exit;
}
function hasMethod($method) {
return in_array($method, array_keys($this->callbacks));
}
function setCapabilities() {
// Initialises capabilities array
$this->capabilities = array(
'xmlrpc' => array(
'specUrl' => 'http://www.xmlrpc.com/spec',
'specVersion' => 1
),
'faults_interop' => array(
'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',
'specVersion' => 20010516
),
'system.multicall' => array(
'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
'specVersion' => 1
),
);
}
function getCapabilities($args) {
return $this->capabilities;
}
function setCallbacks() {
$this->callbacks['system.getCapabilities'] = 'this:getCapabilities';
$this->callbacks['system.listMethods'] = 'this:listMethods';
$this->callbacks['system.multicall'] = 'this:multiCall';
}
function listMethods($args) {
// Returns a list of methods - uses array_reverse to ensure user defined
// methods are listed before server defined methods
return array_reverse(array_keys($this->callbacks));
}
function multiCall($methodcalls) {
// See http://www.xmlrpc.com/discuss/msgReader$1208
$return = array();
foreach ($methodcalls as $call) {
$method = $call['methodName'];
$params = $call['params'];
if ($method == 'system.multicall') {
$result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden');
} else {
$result = $this->call($method, $params);
}
if (is_a($result, 'IXR_Error')) {
$return[] = array(
'faultCode' => $result->code,
'faultString' => $result->message
);
} else {
$return[] = array($result);
}
}
return $return;
}
}
class IXR_Request {
var $method;
var $args;
var $xml;
function IXR_Request($method, $args) {
$this->method = $method;
$this->args = $args;
$this->xml = <<<EOD
<?xml version="1.0"?>
<methodCall>
<methodName>{$this->method}</methodName>
<params>
EOD;
foreach ($this->args as $arg) {
$this->xml .= '<param><value>';
$v = new IXR_Value($arg);
$this->xml .= $v->getXml();
$this->xml .= "</value></param>\n";
}
$this->xml .= '</params></methodCall>';
}
function getLength() {
return strlen($this->xml);
}
function getXml() {
return $this->xml;
}
}
class IXR_Client {
var $server;
var $port;
var $path;
var $useragent;
var $response;
var $message = false;
var $debug = false;
// Storage place for an error message
var $error = false;
function IXR_Client($server, $path = false, $port = 80) {
if (!$path) {
// Assume we have been given a URL instead
$bits = parse_url($server);
$this->server = $bits['host'];
$this->port = isset($bits['port']) ? $bits['port'] : 80;
$this->path = isset($bits['path']) ? $bits['path'] : '/';
// Make absolutely sure we have a path
if (!$this->path) {
$this->path = '/';
}
} else {
$this->server = $server;
$this->path = $path;
$this->port = $port;
}
$this->useragent = 'The Incutio XML-RPC PHP Library';
}
function query() {
$args = func_get_args();
$method = array_shift($args);
$request = new IXR_Request($method, $args);
$length = $request->getLength();
$xml = $request->getXml();
$r = "\r\n";
$request = "POST {$this->path} HTTP/1.0$r";
$request .= "Host: {$this->server}$r";
$request .= "Content-Type: text/xml$r";
$request .= "User-Agent: {$this->useragent}$r";
$request .= "Content-length: {$length}$r$r";
$request .= $xml;
// Now send the request
if ($this->debug) {
echo '<pre>'.htmlspecialchars($request)."\n</pre>\n\n";
}
$fp = @fsockopen($this->server, $this->port);
if (!$fp) {
$this->error = new IXR_Error(-32300, 'transport error - could not open socket');
return false;
}
fputs($fp, $request);
$contents = '';
$gotFirstLine = false;
$gettingHeaders = true;
while (!feof($fp)) {
$line = fgets($fp, 4096);
if (!$gotFirstLine) {
// Check line for '200'
if (strstr($line, '200') === false) {
$this->error = new IXR_Error(-32300, 'transport error - HTTP status code was not 200');
return false;
}
$gotFirstLine = true;
}
if (trim($line) == '') {
$gettingHeaders = false;
}
if (!$gettingHeaders) {
$contents .= trim($line)."\n";
}
}
if ($this->debug) {
echo '<pre>'.htmlspecialchars($contents)."\n</pre>\n\n";
}
// Now parse what we've got back
$this->message = new IXR_Message($contents);
if (!$this->message->parse()) {
// XML error
$this->error = new IXR_Error(-32700, 'parse error. not well formed');
return false;
}
// Is the message a fault?
if ($this->message->messageType == 'fault') {
$this->error = new IXR_Error($this->message->faultCode, $this->message->faultString);
return false;
}
// Message must be OK
return true;
}
function getResponse() {
// methodResponses can only have one param - return that
return $this->message->params[0];
}
function isError() {
return (is_object($this->error));
}
function getErrorCode() {
return $this->error->code;
}
function getErrorMessage() {
return $this->error->message;
}
}
class IXR_Error {
var $code;
var $message;
function IXR_Error($code, $message) {
$this->code = $code;
$this->message = $message;
}
function getXml() {
$xml = <<<EOD
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>{$this->code}</int></value>
</member>
<member>
<name>faultString</name>
<value><string>{$this->message}</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
EOD;
return $xml;
}
}
class IXR_Date {
var $year;
var $month;
var $day;
var $hour;
var $minute;
var $second;
function IXR_Date($time) {
// $time can be a PHP timestamp or an ISO one
if (is_numeric($time)) {
$this->parseTimestamp($time);
} else {
$this->parseIso($time);
}
}
function parseTimestamp($timestamp) {
$this->year = date('Y', $timestamp);
$this->month = date('Y', $timestamp);
$this->day = date('Y', $timestamp);
$this->hour = date('H', $timestamp);
$this->minute = date('i', $timestamp);
$this->second = date('s', $timestamp);
}
function parseIso($iso) {
$this->year = substr($iso, 0, 4);
$this->month = substr($iso, 4, 2);
$this->day = substr($iso, 6, 2);
$this->hour = substr($iso, 9, 2);
$this->minute = substr($iso, 12, 2);
$this->second = substr($iso, 15, 2);
}
function getIso() {
return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second;
}
function getXml() {
return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';
}
function getTimestamp() {
return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
}
}
class IXR_Base64 {
var $data;
function IXR_Base64($data) {
$this->data = $data;
}
function getXml() {
return '<base64>'.base64_encode($this->data).'</base64>';
}
}
class IXR_IntrospectionServer extends IXR_Server {
var $signatures;
var $help;
function IXR_IntrospectionServer() {
$this->setCallbacks();
$this->setCapabilities();
$this->capabilities['introspection'] = array(
'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html',
'specVersion' => 1
);
$this->addCallback(
'system.methodSignature',
'this:methodSignature',
array('array', 'string'),
'Returns an array describing the return type and required parameters of a method'
);
$this->addCallback(
'system.getCapabilities',
'this:getCapabilities',
array('struct'),
'Returns a struct describing the XML-RPC specifications supported by this server'
);
$this->addCallback(
'system.listMethods',
'this:listMethods',
array('array'),
'Returns an array of available methods on this server'
);
$this->addCallback(
'system.methodHelp',
'this:methodHelp',
array('string', 'string'),
'Returns a documentation string for the specified method'
);
}
function addCallback($method, $callback, $args, $help) {
$this->callbacks[$method] = $callback;
$this->signatures[$method] = $args;
$this->help[$method] = $help;
}
function call($methodname, $args) {
// Make sure it's in an array
if ($args && !is_array($args)) {
$args = array($args);
}
// Over-rides default call method, adds signature check
if (!$this->hasMethod($methodname)) {
return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.');
}
$method = $this->callbacks[$methodname];
$signature = $this->signatures[$methodname];
$returnType = array_shift($signature);
// Check the number of arguments
if (count($args) != count($signature)) {
// print 'Num of args: '.count($args).' Num in signature: '.count($signature);
return new IXR_Error(-32602, 'server error. wrong number of method parameters');
}
// Check the argument types
$ok = true;
$argsbackup = $args;
for ($i = 0, $j = count($args); $i < $j; $i++) {
$arg = array_shift($args);
$type = array_shift($signature);
switch ($type) {
case 'int':
case 'i4':
if (is_array($arg) || !is_int($arg)) {
$ok = false;
}
break;
case 'base64':
case 'string':
if (!is_string($arg)) {
$ok = false;
}
break;
case 'boolean':
if ($arg !== false && $arg !== true) {
$ok = false;
}
break;
case 'float':
case 'double':
if (!is_float($arg)) {
$ok = false;
}
break;
case 'date':
case 'dateTime.iso8601':
if (!is_a($arg, 'IXR_Date')) {
$ok = false;
}
break;
}
if (!$ok) {
return new IXR_Error(-32602, 'server error. invalid method parameters');
}
}
// It passed the test - run the "real" method call
return parent::call($methodname, $argsbackup);
}
function methodSignature($method) {
if (!$this->hasMethod($method)) {
return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.');
}
// We should be returning an array of types
$types = $this->signatures[$method];
$return = array();
foreach ($types as $type) {
switch ($type) {
case 'string':
$return[] = 'string';
break;
case 'int':
case 'i4':
$return[] = 42;
break;
case 'double':
$return[] = 3.1415;
break;
case 'dateTime.iso8601':
$return[] = new IXR_Date(time());
break;
case 'boolean':
$return[] = true;
break;
case 'base64':
$return[] = new IXR_Base64('base64');
break;
case 'array':
$return[] = array('array');
break;
case 'struct':
$return[] = array('struct' => 'struct');
break;
}
}
return $return;
}
function methodHelp($method) {
return $this->help[$method];
}
}
class IXR_ClientMulticall extends IXR_Client {
var $calls = array();
function IXR_ClientMulticall($server, $path = false, $port = 80) {
parent::IXR_Client($server, $path, $port);
$this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
}
function addCall() {
$args = func_get_args();
$methodName = array_shift($args);
$struct = array(
'methodName' => $methodName,
'params' => $args
);
$this->calls[] = $struct;
}
function query() {
// Prepare multicall, then call the parent::query() method
return parent::query('system.multicall', $this->calls);
}
}
?>

332
scripts/javascripts.js Normal file
View file

@ -0,0 +1,332 @@
// TODO: I'd like to have an extra "js" directory for all JavaScripts
// a theme needs.
/*
* Jlogs not minified version of JavaScript
*/
function jlog_bbcode(insText, aTag, eTag) {
if (!insText) { return ''; }
return aTag + insText + eTag;
}
function jlog_bbcode_link(insText, aTag, eTag) {
var url = new RegExp('^(http://|https://|www.|ftp://|news:|mailto:).');
var www = new RegExp('^(www.).');
var mail = new RegExp('^[^@]+@[^@]+\.[a-zA-Z]+$');
var http = new RegExp('^(http://)$');
var node, href;
if((url.test(insText)) || (mail.test(insText))) {
href = insText;
if (mail.test(href)) { href = 'mailto:' + insText; }
if (www.test(href)) { href = 'http://' + href; }
node = prompt(jlog_l_comments_url_node);
if((node !== null) && (node !== '')) { insText = '[url=' + href + ']' + node + eTag; }
else if(node === '') { insText = aTag + href + eTag; }
}
else {
node = insText;
if(node === '') { node = prompt(jlog_l_comments_url_node, insText); }
href = prompt(jlog_l_comments_url_href, 'http://');
if (http.test(href)) { return insText; }
if (www.test(href)) { href = 'http://' + href; }
if(((node !== null) && (node !== '')) && ((href !== null) && (href !== ''))) {
insText = '[url=' + href + ']' + node + eTag;
}
else if((href !== null) && (href !== '')) { insText = aTag + href + eTag; }
}
return insText;
}
function jlog_bbcode_list(o_insText, aTag, eTag) {
var insText = o_insText.replace(/(\n|\r|\r\n)(?=(.+))/g, '$1[*]');
return '[list]\n[*]' + insText + eTag + '\n';
}
function jlog_bbcode_insert(aTag, eTag, completeText) {
var input = document.forms.entryform.elements.content;
input.focus();
var insText;
/* für Internet Explorer und Opera >= 8 */
if(typeof document.selection != 'undefined') {
/* Einfügen des Formatierungscodes */
var range = document.selection.createRange();
insText = range.text;
if (aTag === '[url]') { range.text = jlog_bbcode_link(insText, aTag, eTag); }
else if(eTag === '[/list]') { range.text = jlog_bbcode_list(insText, aTag, eTag); }
else { range.text = jlog_bbcode(insText, aTag, eTag); }
/* Anpassen der Cursorposition */
range = document.selection.createRange();
if (insText.length === 0) {
range.move('character', -eTag.length);
} else {
range.moveStart('character', insText.length);
}
range.select();
}
/* für neuere auf Gecko basierende Browser */
else if(typeof input.selectionStart != 'undefined')
{
/* Einfügen des Formatierungscodes */
var start = input.selectionStart;
var end = input.selectionEnd;
insText = input.value.substring(start, end);
if(aTag === '[url]') { insText = jlog_bbcode_link(insText, aTag, eTag); }
else if(eTag === '[/list]') { insText = jlog_bbcode_list(insText, aTag, eTag); }
else { insText = jlog_bbcode(insText, aTag, eTag); }
input.value = input.value.substr(0, start) + insText + input.value.substr(end);
/* Anpassen der Cursorposition */
var pos;
if (insText.length === 0) {
pos = start + aTag.length + eTag.length;
} else {
pos = start + insText.length;
}
input.selectionStart = pos;
input.selectionEnd = pos;
}
/* für die übrigen Browser */
else
{
/* Einfügen des Formatierungscodes */
if(aTag === '[url]') { insText = jlog_bbcode_link('', aTag, eTag); }
else if(eTag === '[/list]') { insText = jlog_bbcode_list('', aTag, eTag); }
else { insText = jlog_bbcode(prompt(jlog_l_comments_plz_format_txt), aTag, eTag); }
input.value += insText;
}
}
function jlog_bbcode_img(jfilename) {
var jclass = '';
var jalt = '';
if ( document.getElementById("class").value !== '') {
jclass = ' class=\"' + document.getElementById("class").value + '\"';
}
if ( document.getElementById("alt").value !== '') {
jalt = ' alt=\"' + document.getElementById("alt").value + '\"';
}
var jimg = '[img' + jclass + jalt + ']' + jfilename + '[/img]';
opener.parent.jlog_insertAtCursor(jimg);
window.close();
}
// from http://www.alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript/
function jlog_insertAtCursor(insText) {
//IE and Opera support
var field = document.forms.entryform.elements.content;
if (document.selection) {
field.focus();
var sel = document.selection.createRange();
sel.text = insText;
}
//MOZILLA/NETSCAPE support
else if (field.selectionStart || field.selectionStart == '0') {
var startPos = field.selectionStart;
var endPos = field.selectionEnd;
field.value = field.value.substring(0, startPos) + insText + field.value.substring(endPos, field.value.length);
} else {
field.value += insText;
}
}
var show = true;
function jlog_killcomments() {
var commentslist = document.getElementById("commentslist");
var pingbacks_header = document.getElementById("pingbacks");
var pingbacks_list = document.getElementById("pingbackslist");
if (show) {
document.getElementById("hidecomments").firstChild.nodeValue = jlog_l_comments_show;
show=false;
if(pingbacks_header) { pingbacks_header.style.display = "none"; }
if(pingbacks_list) { pingbacks_list.style.display = "none"; }
document.getElementById("comments").style.display = "none";
document.getElementById("entryform").style.display = "none";
if(commentslist) { commentslist.style.display = "none"; }
}
else {
document.getElementById("hidecomments").firstChild.nodeValue = jlog_l_comments_hide;
show=true;
if(pingbacks_header) { pingbacks_header.style.display = "block"; }
if(pingbacks_list) { pingbacks_list.style.display = "block"; }
document.getElementById("comments").style.display = "block";
document.getElementById("entryform").style.display = "block";
if(commentslist) { commentslist.style.display = "block"; }
}
}
var jlog_bbcode_br;
function jlog_bbcode_do_button(titel, aTag, eTag) {
var button = document.createElement("input");
button.onclick = function() {
jlog_bbcode_insert(aTag, eTag);
return false;
};
button.className = "jlog_bbcode";
button.type = "button";
button.value = titel;
jlog_bbcode_br.parentNode.insertBefore(button, jlog_bbcode_br);
}
/* from http://www.kryogenix.org/code/browser/searchhi/ */
function jlog_highlightWord(node,word) {
if (node.hasChildNodes) {
for (var hi_cn=0;hi_cn<node.childNodes.length;hi_cn++) {
jlog_highlightWord(node.childNodes[hi_cn],word);
}
}
if (node.nodeType == 3) {
var tempNodeVal = node.nodeValue.toLowerCase();
var tempWordVal = word.toLowerCase();
if (tempNodeVal.indexOf(tempWordVal) != -1) {
var pn = node.parentNode;
if (pn.className != "searchword") {
var nv = node.nodeValue;
var ni = tempNodeVal.indexOf(tempWordVal);
var before = document.createTextNode(nv.substr(0,ni));
var docWordVal = nv.substr(ni,word.length);
var after = document.createTextNode(nv.substr(ni+word.length));
var hiwordtext = document.createTextNode(docWordVal);
var hiword = document.createElement("span");
hiword.className = "searchword";
hiword.appendChild(hiwordtext);
pn.insertBefore(before,node);
pn.insertBefore(hiword,node);
pn.insertBefore(after,node);
pn.removeChild(node);
}
}
}
}
function jlog_searchengineSearchHighlight() {
if (!document.createElement) { return; }
var ref = document.referrer;
if (ref.indexOf('?') == -1) { return; }
var qs = ref.substr(ref.indexOf('?')+1);
var qsa = qs.split('&');
for (var i=0;i<qsa.length;i++) {
var qsip = qsa[i].split('=');
if (qsip.length == 1) { continue; }
if (qsip[0] == 'q' || qsip[0] == 'p' ) { // q= for Google, p= for Yahoo
var words = unescape(qsip[1].replace(/\+/g,' ')).split(/\s+/);
for (var w=0;w<words.length;w++) {
jlog_highlightWord(document.getElementsByTagName("body")[0],words[w]);
}
}
}
}
function jlog_init() {
var jlog_comments;
if(document.getElementById("pingbacks")) { jlog_comments = document.getElementById("pingbacks"); }
else { jlog_comments = document.getElementById("comments"); }
if (jlog_comments) {
if (!document.getElementById || !document.createElement || !document.createTextNode) { return; }
var p = document.createElement("p");
p.className = "hidecomments";
var a = document.createElement("a");
a.id = "hidecomments";
a.href = "#";
a.onclick = function() {jlog_killcomments(); return false; };
var text = document.createTextNode(jlog_l_comments_hide);
a.appendChild(text);
p.appendChild(a);
if (jlog_comments.insertBefore) {
jlog_comments.parentNode.insertBefore(p, jlog_comments);
}
}
jlog_bbcode_br = document.getElementById("bbcode");
if(jlog_bbcode_br || (typeof(jlog_admin) !== "undefined")) {
if (jlog_bbcode_br.insertBefore) {
jlog_bbcode_do_button(jlog_l_comments_url, '[url]', '[/url]');
jlog_bbcode_do_button(jlog_l_comments_bold, '[b]', '[/b]');
jlog_bbcode_do_button(jlog_l_comments_italic, '[i]', '[/i]');
jlog_bbcode_do_button(jlog_l_comments_quote, '[quote]', '[/quote]');
if (jlog_comments) { jlog_bbcode_br.parentNode.getElementsByTagName("span")[0].style.display = "none"; }
}
if (typeof(jlog_admin) !== "undefined") {
document.getElementById("jlogteaserpic").style.display = "block";
if (jlog_bbcode_br.insertBefore) {
jlog_bbcode_do_button(jlog_l_headline, '[headline]', '[/headline]');
jlog_bbcode_do_button(jlog_l_list, '[list][*]', '[/list]');
}
}
}
if(typeof(jlog_searchpage) === "undefined") { jlog_searchengineSearchHighlight(); }
}
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload !== 'function') {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
};
}
}
addLoadEvent(jlog_init);
addLoadEvent( function() {
if(document.getElementById("password")) {
document.getElementById("password").focus();
}
});
var winpops;
/* Open popup to learn BBCode for comments */
function jlog_learnbb(path) {
var popurl = path + '/learn_bb.php?v=small';
winpops=window.open(popurl,'','width=400,height=300,scrollbars=yes');
}
/* Open popup to upload pictures in admincenter */
function jlog_wopen(popurl) {
winpops=window.open(popurl,'','width=350,height=350,scrollbars=yes');
}
function jlog_generate_url(topic, destination) {
if ( typeof( destination ) == 'string' ) { destination = document.getElementById( destination ); }
if ( destination.value !== '' ) { return false; }
var url = topic.toLowerCase();
while(url.search(/ä/) != -1) { url = url.replace(/ä/, "ae"); }
while(url.search(/ö/) != -1) { url = url.replace(/ö/, "oe"); }
while(url.search(/ü/) != -1) { url = url.replace(/ü/, "ue"); }
while(url.search(/ß/) != -1) { url = url.replace(/ß/, "ss"); }
while(url.search(/ /) != -1) { url = url.replace(/ /, "-"); }
while(url.search(/[^a-z0-9.,_\/-]/) != -1) { url = url.replace(/[^a-z0-9.,_/-]/, ""); }
destination.value = url;
}
/* URL fill out helper */
addLoadEvent(
function() {
var topic = document.getElementById('topic')
if ( topic ) {
topic.onchange = function() { jlog_generate_url( this.value, 'url' ); }
}
var namefield = document.getElementById('name');
if( !document.getElementById('url') || !namefield ) { return; }
else namefield.onchange = function() { jlog_generate_url( this.value, 'url' ); }
}
)

1832
scripts/jlogHTTP_Request.php Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,83 @@
<?php
// hiervon werden die Plugins abgeleitet
class JlogPlugin {
/* Hooks */
function hook_body ($t) { return $t; } // string body
function hook_commentForm ($t) { return $t; } // string with comment form output + array with form data
function hook_adminContent ($t) { return $t; } // string content
function hook_newComment ($t) { return $t; } // array form data
function hook_updateComment ($t) { return $t; } // array form data
function hook_deleteComment ($t) { return $t; } // string comment id
function hook_showComment ($t) { return $t; } // string comment output
function hook_onUpdate ($t) { return $t; } // array with all rss feeds and sub
function hook_doEntry ($t) { return $t; } // string with entry + array with data from database + string count comments + string section
function hook_doTeaser ($t) { return $t; } // string with entry + array with data from database + string count comments + string pre + string post
function hook_bbcode ($t) { return $t; } // bbcode object
function hook_bbcomments ($t) { return $t; } // bbcomments object
function hook_adminForm ($t) { return $t; } // admin formular
function hook_insertEntry ($t) { return $t; } // int id + array with form data
function hook_updateEntry ($t) { return $t; } // int id + array with form data
function hook_permalink ($t) { return $t; } // string permalink + string date + string url + string section
function hook_xmlrpcPermalink ($t) { return $t; } // string url
function hook_countComments ($t) { return $t; } // array with id and count
function hook_adminMail ($t) { return $t; } // array with mail + array blogentry
function hook_commentorMail ($t) { return $t; } // array with mail + array blogentry
function hook_commentAdminList($t) { return $t; } // string with actual tr + array with comment data
function hook_previewComment ($t) { return $t; } // same as newComment
function hook_dispatchLogin ($t) { return $t; } //
function hook_loginForm ($t) { return $t; } //
function hook_adminMenu ($t) { return $t; } // string with the admin menu html
function hook_adminList ($t) { return $t; } //
}
class JlogPluginManager {
var $plugins = array();
function JlogPluginManager($plugindirectory) {
$handle = "";
$file = "";
$this->get = strip($_GET);
if(is_dir($plugindirectory)) {
$handle = opendir($plugindirectory);
while( false !== ( $file = readdir ($handle) ) ) {
if(substr($file, -10) === '.jplug.php') {
include_once $plugindirectory.$file;
$this->register( substr($file, 0, -10) );
}
}
closedir($handle);
}
}
function register($plugin) {
$this->plugins[] = new $plugin;
}
// Aufruf $JLogPluginManagerInstanz->callHook('eins', $param1[, $param2, ...]);
// $param1 = Pflicht-Parameter, alle anderen optional
function callHook($hook) {
$hook = 'hook_' . $hook;
$parameters = func_get_args();
array_shift($parameters); // $hook entfernen
if (!isset($parameters[0]))
die('fatal error - no parameters');
$hookresult = $parameters[0];
foreach ($this->plugins as $plugin) {
$parameters[0] = $hookresult;
if($hook == 'hook_adminTitle' OR $hook == 'hook_adminContent') {
if(strtolower($this->get['jplug']) === strtolower(get_class($plugin)))
$hookresult = call_user_func_array(array($plugin, $hook), $parameters);
}
else $hookresult = call_user_func_array(array($plugin, $hook), $parameters);
}
return $hookresult;
}
}
?>

279
scripts/mail.class.php Normal file
View file

@ -0,0 +1,279 @@
<?php
/**
* Mail class
*
* This class is used for sending emails from Jlog, e.g. for notifying
* the admin about a new comment.
*
* @category Jlog
* @package Jlog_Mail
* @license GNU General Public License
*
*/
class Jlog_Mail
{
/**
* Additional headers
*
* Headers for the email in an array where the key is the
* header field and the value is the value of that header.
*
* @access private
* @var array
*/
var $_header = array();
/**
* E-Mail From
*
* @access private
* @var string
*/
var $_from = '';
/**
* E-Mail Subject
*
* @access private
* @var string
*/
var $_subject = '';
/**
* Content of the E-Mail
*
* @access private
* @var string
*/
var $_text = '';
/**
* Flag to drop mail
*
* This flag can be set, e.g. by a plugin, to make the
* send() method drop this mail
*
* @access private
* @var boolean
*/
var $_dropped = false;
/**
* Jlog_Mail() - constructor
*
*/
function Jlog_Mail()
{
$this->_from = 'no-reply@' . $_SERVER['SERVER_NAME'];
$this->_subject = 'Kein Betreff - No Subject';
$this->addHeader('MIME-Version', '1.0');
$this->addHeader('Content-Type', 'text/plain; charset=UTF-8');
$this->addHeader('Content-Transfer-Encoding', '8bit');
$this->addHeader('X-Mailer', 'Jlog with PHP ' . phpversion());
}
/**
* setFrom() - sets from value
*
* @access public
* @param string $email
* @param string $name
* @return void
*/
function setFrom($email, $name)
{
if (!empty($email) and !empty($name)) {
$this->_from = "$name <$email>";
}
}
/**
* getFrom() - gets from value
*
* @access public
* @return string
*/
function getFrom()
{
return $this->_from;
}
/**
* setSubject() - sets subject
*
* @access public
* @param string $text
* @return void
*/
function setSubject($text)
{
if (strlen($text) > 0) {
$this->_subject = $text;
}
}
/**
* getSubject() - gets subject
*
* @access public
* @return string
*/
function getSubject()
{
return $this->_subject;
}
/**
* setText() - sets content of email
*
* @access public
* @param string $text
* @return void
*/
function setText($text)
{
$this->_text = $text;
}
/**
* appendText() - appends content to the email
*
* @access public
* @param string $text
* @return void
*/
function appendText($text)
{
$this->_text .= $text;
}
/**
* getText() - gets content of email
*
* @access public
* @return string
*/
function getText()
{
return $this->_text;
}
/**
* addHeader() - adds an additional header
*
* Adds a header, by replacing any earlier headers of the same name.
* If no value is passed, the key is interpreted as a header line and
* split into key and value.
*
* @access public
* @param string $key
* @param string $value
* @return void
*/
function addHeader($key, $value = null)
{
if ($value === null) {
$data = explode(':', $key, 1);
if (count($data) !== 2) return false;
$key = $data[0];
$value = $data[1];
}
if (strlen($key) < 1 or strlen($value) < 1) return false;
$this->_header[$key] = $value;
}
/**
* unsetHeader() - deletes a header
*
* @access public
* @param string $key
* @return void
*/
function unsetHeader($key)
{
if (isset($this->_header[$key])) unset($this->_header[$key]);
}
/**
* getHeader() - gets a header
*
* @access public
* @return string|null
*/
function getHeader($key)
{
if (isset($this->_header[$key])) return $this->_header[$key];
return null;
}
/**
* getHeaders() - gets all headers
*
* @access public
* @return array
*/
function getHeaders()
{
return $this->_header;
}
/**
* getCleanHeaderString() - gets sanitized header string
*
* @access public
* @return string
*/
function getCleanHeaderString()
{
$headers = '';
foreach ($this->_header as $key => $value) {
// remove all non alpha-numeric chars, except for dash
$key = preg_replace('/[^a-zA-Z0-9-]/', '', $key);
// remove line breaks to prevent header injection
$value = str_replace(array("\r", "\n"), '', $value);
// add header
$headers .= "$key: $value\r\n";
}
return $headers;
}
/**
* dropMail() - sets drop mail flag
*
* Sets a flag that causes the send() method to skip sending this
* email, so that this mail is actualy dropped.
*
* @access public
* @return void
*/
function dropMail()
{
$this->_dropped = true;
}
/**
* send() - sends mail
*
* @access public
* @param string $to
* @return boolean
*/
function send($to)
{
if ($this->_dropped) return false;
$this->addHeader('From', $this->_from);
$safe_mode = strtolower(ini_get('safe_mode'));
if ($safe_mode == 1 or $safe_mode == 'on' or $safe_mode == 'yes') {
@mail($to, $this->_subject, $this->_text, $this->getCleanHeaderString());
}
else {
@mail($to, $this->_subject, $this->_text, $this->getCleanHeaderString(), "-f".JLOG_EMAIL);
}
return true;
}
}
// eof

91
scripts/prepend.inc.php Normal file
View file

@ -0,0 +1,91 @@
<?php
/**
* Jlog
*
* 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
*
* $HeadURL: http://jeenaparadies.net/svn/jlog/trunk/scripts/prepend.inc.php $
* $Rev: 1739 $
* $Author: driehle $
* $Date: 2008-09-03 15:53:30 +0200 (Ons, 03 Sep 2008) $
*/
// load settings and version information
error_reporting(E_ALL ^ E_NOTICE);
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."personal".DIRECTORY_SEPARATOR."settings.inc.php");
require_once(JLOG_BASEPATH."scripts".DIRECTORY_SEPARATOR."version.inc.php");
// these two constants did not exist in Jlog 1.0.2
if (!defined('JLOG_INSTALLED_VERSION')) {
define('JLOG_INSTALLED_VERSION', '1.0.2');
}
if (!defined('JLOG_LANGUAGE')) {
define('JLOG_LANGUAGE', 'de');
}
// redirect to update-script if new jlog version was installed
if(version_compare(JLOG_INSTALLED_VERSION, JLOG_SOFTWARE_VERSION, '<')
AND substr($_SERVER['SCRIPT_FILENAME'], -17) !== '/admin/update.php')
{
header('Location: ' . JLOG_PATH . '/admin/update.php');
exit;
}
// define constants for names of tables in database
define("JLOG_DB_CONTENT", JLOG_DB_PREFIX."content");
define("JLOG_DB_COMMENTS", JLOG_DB_PREFIX."comments");
define("JLOG_DB_CATASSIGN", JLOG_DB_PREFIX."catassign");
define("JLOG_DB_CATEGORIES", JLOG_DB_PREFIX."categories");
define("JLOG_DB_ATTRIBUTES", JLOG_DB_PREFIX."attributes");
// we need these files on every page
require_once(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang.'.JLOG_LANGUAGE.'.inc.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'database.class.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'bbcode.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'general.func.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'comments.php');
// additionaly, when in admin-mode, we need this file
if(defined('JLOG_ADMIN')) require_once(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php');
// connect to database
$connect = @mysql_connect(JLOG_DB_URL, JLOG_DB_USER, JLOG_DB_PWD);
if ($connect == FALSE) {
mail(JLOG_EMAIL, $l['admin']['e_db'], $l['admin']['e_db_is']."\n".mysql_error());
die("<strong>".$l['db_error']."</strong><br />".$l['plz_try_again'].".");
}
// select our database
$select = @mysql_select_db(JLOG_DB);
if ($connect == FALSE) {
mail(JLOG_EMAIL, $l['admin']['e_db'], $l['admin']['e_db_is']."\n".mysql_error());
die("<strong>".$l['db_error']."</strong><br />".$l['plz_try_again'].".");
}
// do some settings
@mysql_query("SET NAMES utf8");
@mysql_query("SET sql_mode=''");
// some more code that needs to run for every page - however, this
// code requires an established connection to the database
setlocale(LC_TIME, $l['locale']);
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'categories.class.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'jlogPlugins.class.php');
$plugins = new JlogPluginManager(JLOG_BASEPATH.'plugins'.DIRECTORY_SEPARATOR);
// call hooks for bbcode plugins
$bbcode = $plugins->callHook('bbcode', $bbcode);
$bbcomments = $plugins->callHook('bbcomments', $bbcomments);
// eof

533
scripts/settings.class.php Normal file
View file

@ -0,0 +1,533 @@
<?php
/**
* Jlog
*
* 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
*
* $HeadURL: http://jeenaparadies.net/svn/jlog/trunk/scripts/settings.class.php $
* $Rev: 1768 $
* $Author: driehle $
* $Date: 2008-09-30 21:43:16 +0200 (Tis, 30 Sep 2008) $
*/
/**
* Settings class
*
* This class represents the current settings for Jlog and
* offers the possibility to modify these settings based on
* user's input. The configuration can be saved to disk,
* if wanted.
*
* @category Jlog
* @package Jlog_Settings
* @license GNU General Public License
*
*/
class Settings {
/**
* Assoziative array holding configuration options
*
* @access private
* @var array
*/
var $d = array();
/**
* Assoziative array holding translations according
* to the current language.
*
* @access private
* @var array
*/
var $l = array();
/**
* Settings() - class constructor
*
* @access public
* @param array $l
* @return void
*/
function Settings($l) {
// get the language array $l and put it into the class
$this->l = $l;
}
/**
* getValue() - reads configuration data
*
* This procedure returns the value for then configuration option
* specified by $key or an array of all options if $key is not
* specified or false
*
* @access public
* @param string|boolean $key
* @return mixed
*/
function getValue($key = false) {
if($key === false) return $this->d;
else return $this->d[strtolower($key)];
}
/**
* setValue() - sets configuration data
*
* @access public
* @param string|boolean $key
* @param mixed $value
* @return mixed
*/
function setValue($key, $value) {
$this->d[strtolower($key)] = $value;
}
/**
* importDataByConstants()
*
* imports data from global constats starting with JLOG_ prefix
*
* @access public
* @return void
*/
function importDataByConstants() {
# no return
// this is a blacklist of constats which are not to be written in settings.inc.php
$search = array(
'JLOG_ADMIN',
'JLOG_DB_CONTENT',
'JLOG_DB_COMMENTS',
'JLOG_DB_CATASSIGN',
'JLOG_DB_CATEGORIES',
'JLOG_DB_ATTRIBUTES',
'JLOG_UPDATE',
'JLOG_LOGIN',
'JLOG_SOFTWARE_VERSION',
'JLOG_SOFTWARE_URL',
'JLOG_SOFTWARE_PHPV',
'JLOG_SOFTWARE_MYSQLV',
'JLOG_ADMIN_PASSWORD_AGAIN'
);
// get all needed constants and put it into the class
$constants = get_defined_constants();
foreach($constants as $key => $value) {
if(!in_array($key, $search) AND strpos($key, "JLOG_") !== false) {
$this->setValue($key, $value);
}
}
}
/**
* importDataByArray() - sets configuration data
*
* Sets configuration data according to $d. If working in
* non-exclusive mode (the default), $d is merged into the current
* configuration, otherwise the current configuration is discared
* and $d is set as the new configuration.
*
* @access public
* @param array $d
* @param boolean $exclusiv
* @return void
*/
function importDataByArray($d = false, $exclusiv = false) {
// get the data from users $d array and put it into the class
if($d !== false) {
if($exclusiv) $this->d = $d;
else $this->d = array_merge($this->d, $d);
}
if(JLOG_ADMIN === true) {
$this->d['jlog_db'] = JLOG_DB;
$this->d['jlog_db_url'] = JLOG_DB_URL;
$this->d['jlog_db_user'] = JLOG_DB_USER;
$this->d['jlog_db_pwd'] = JLOG_DB_PWD;
$this->d['jlog_db_prefix'] = JLOG_DB_PREFIX;
$this->d['jlog_start_year'] = JLOG_START_YEAR;
$this->d['jlog_path'] = JLOG_PATH;
$this->d['jlog_basepath'] = JLOG_BASEPATH;
if($this->d['jlog_admin_password'] == '') {
$this->jlog_admin_password = JLOG_ADMIN_PASSWORD;
}
else {
$this->d['jlog_admin_password'] = md5($this->d['jlog_admin_password']);
$this->d['jlog_admin_password_again'] = md5($this->d['jlog_admin_password_again']);
}
$this->d['jlog_installed_version'] = JLOG_INSTALLED_VERSION;
$this->d['jlog_installed_url'] = JLOG_INSTALLED_URL;
$this->d['jlog_installed_phpv'] = JLOG_INSTALLED_PHPV;
$this->d['jlog_installed_mysqlv'] = JLOG_INSTALLED_MYSQLV;
}
else {
$this->d['jlog_admin_password'] = md5($this->d['jlog_admin_password']);
$this->d['jlog_admin_password_again'] = md5($this->d['jlog_admin_password_again']);
}
if((defined('JLOG_SETUP') AND JLOG_SETUP === true))
{
$this->d['jlog_installed_version'] = JLOG_SOFTWARE_VERSION;
$this->d['jlog_installed_url'] = JLOG_SOFTWARE_URL;
$this->d['jlog_installed_phpv'] = JLOG_SOFTWARE_PHPV;
$this->d['jlog_installed_mysqlv'] = JLOG_SOFTWARE_MYSQLV;
}
}
/**
* importSuggestedData() - preallocates configuration data
*
* Initialises the configuration with useful settings during
* the installation process.
*
* @access public
* @return void
*/
function importSuggestedData() {
// suggest some data for setup
$this->setValue('jlog_path', $this->getSuggestPath());
$this->setValue('jlog_basepath', dirname(dirname( __FILE__ )).DIRECTORY_SEPARATOR);
$date = getdate();
$this->setValue('jlog_start_year', $date['year']);
$this->setValue('jlog_max_blog_orginal', 1);
$this->setValue('jlog_max_blog_big', 4);
$this->setValue('jlog_max_blog_small', 15);
$this->setValue('jlog_sub_current', 6);
$this->setValue('jlog_date', $this->l['date_format']);
$this->setValue('jlog_date_comment', $this->l['date_format_comment']);
$this->setValue('jlog_date_subcurrent', $this->l['date_format_subcurrent']);
$this->setValue('jlog_info_by_comment', true);
$this->setValue('jlog_db_url', 'localhost');
$this->setValue('jlog_db_prefix', 'jlog_');
$this->setValue('jlog_blogservices', 'http://rpc.pingomatic.com/');
$this->setValue('jlog_language', (defined('JLOG_LANGUAGE') ? JLOG_LANGUAGE : 'de'));
}
/**
* getSuggestPath() - generate a suggestion for JLOG_PATH
*
* @access private
* @return string
*/
function getSuggestPath() {
$host = empty($_SERVER['HTTP_HOST'])
? (empty($_SERVER['SERVER_NAME'])
? $_SERVER['SERVER_ADDR']
: $_SERVER['SERVER_NAME'])
: $_SERVER['HTTP_HOST'];
$proto = (empty($_SERVER['HTTPS']) OR $_SERVER['HTTPS'] == 'off')
? 'http'
: 'https';
$port = $_SERVER['SERVER_PORT'];
$uri = $proto . '://' . $host;
if ((('http' == $proto) and (80 != $port))
or (('https' == $proto) and (443 != $port)))
{
$uri .= ':' . $port;
}
$uri .= dirname($_SERVER['SCRIPT_NAME']);
return $uri;
}
/**
* defaultValue() - gets a value of an array
*
* Look for index $key in the array $array and return
* the corresponding value if it exists or the default
* value $default if it doesn't.
*
* @access public
* @param array $array
* @param mixed $key
* @param mixed $default
* @return mixed
*/
function defaultValue($array, $key, $default = '') {
if(isset($array[$key])) {
return $array[$key];
}
else {
return $default;
}
}
/**
* form_output() - generates HTML output for formular
*
* @access public
* @return string
*/
function form_output() {
# returns the filled form
$data = array_htmlspecialchars($this->d);
if(isset($data['jlog_clean_url']) AND ($data['jlog_clean_url'] === 'true' OR $data['jlog_clean_url'] === '1'))
$d['clean_url_yes'] = " checked='checked'";
else $d['clean_url_no'] = " checked='checked'";
if(isset($data['jlog_info_by_comment'])) $d['info_by_comment'] = " checked='checked'";
else $d['info_by_comment'] = "";
if(isset($data['jlog_bs_weblogs_com']) AND ($data['jlog_bs_weblogs_com'] === 'true' OR $data['jlog_bs_weblogs_com'] === '1'))
$d['bs_weblogs_com'] = " checked='checked' ";
if(defined("JLOG_ADMIN") AND JLOG_ADMIN === true) $admincenter_password = " ".$this->l['admin']['m_admin_password_admin'];
else $admincenter_password = '';
// get available languages
$dir = opendir(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'lang');
$languages = array();
while(($file = readdir($dir)) !== false) {
if($file == '.' OR $file == '..') continue;
if(!preg_match('/lang\.([a-zA-z0-9]+)\.inc\.php/', $file, $matches)) continue;
$languages[] = $matches[1];
}
// do the form
$form = "
<form action='".$_SERVER['SCRIPT_NAME']."' method='post'>
<fieldset><legend>".$this->l['admin']['m_metadata']."</legend>
<p><label for='language'>".$this->l['admin']['m_language']."</label><br />";
if(defined("JLOG_ADMIN") AND JLOG_ADMIN === true) $form .= add_session_id_input_tag();
$form .= "<select class='userdata' id='language' name='jlog_language'>";
foreach($languages as $lang) {
$form .= "<option";
if((isset($_POST['jlog_language']) AND $lang = $_POST['jlog_language']) OR $lang == JLOG_LANGUAGE)
$form .= " selected='selected'";
$form .= ">$lang</option>";
}
$form .= "</select>
</p>
<p><label for='website'>".$this->l['admin']['m_website']."</label><br />
<input class='userdata' id='website' name='jlog_website' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_website')."' /></p>
<p><label for='publisher'>".$this->l['admin']['m_publisher']."</label><br />
<input class='userdata' id='publisher' name='jlog_publisher' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_publisher')."' /></p>
<p><label for='admin_password'>".$this->l['admin']['m_admin_password'].$admincenter_password."</label><br />
<input class='userdata' id='admin_password' name='jlog_admin_password' type='password' size='20' maxlength='255' /></p>
<p><label for='admin_password_again'>".$this->l['admin']['m_admin_password_again'].$admincenter_password."</label><br />
<input class='userdata' id='admin_password_again' name='jlog_admin_password_again' type='password' size='20' maxlength='255' /></p>
<p><label for='email'>".$this->l['admin']['m_email']."</label><br />
<input class='userdata' id='email' name='jlog_email' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_email')."' /></p>
<p><label for='description'>".$this->l['admin']['m_description']."</label><br />
<textarea class='small' id='description' name='jlog_description' rows='2' cols='60'>".$this->defaultValue($data, 'jlog_description')."</textarea></p>
</fieldset>
<fieldset><legend>".$this->l['admin']['m_behavior']."</legend>
<p><label>".$this->l['admin']['m_clean_url']."</label><br />
<input id='clean_url_yes' name='jlog_clean_url' type='radio' value='true'".$d['clean_url_yes']." /><label class='nobreak' for='clean_url_yes'>".$this->l['admin']['yes']."</label>
<input id='clean_url_no' name='jlog_clean_url' type='radio' value='false'".$d['clean_url_no']." /><label class='nobreak' for='clean_url_no'>".$this->l['admin']['no']."</label></p>
<p><label for='max_blog_orginal'>".$this->l['admin']['m_max_blog_orginal']."</label><br />
<input class='short' id='max_blog_orginal' name='jlog_max_blog_orginal' type='text' maxlength='3' size='3' value='".$this->defaultValue($data, 'jlog_max_blog_orginal')."' /></p>
<p><label for='max_blog_big'>".$this->l['admin']['m_max_blog_big']."</label><br />
<input class='short' id='max_blog_big' name='jlog_max_blog_big' type='text' size='3' maxlength='3' value='".$this->defaultValue($data, 'jlog_max_blog_big')."' /></p>
<p><label for='max_blog_small'>".$this->l['admin']['m_max_blog_small']."</label><br />
<input class='short' id='max_blog_small' name='jlog_max_blog_small' type='text' size='3' maxlength='3' value='".$this->defaultValue($data, 'jlog_max_blog_small')."' /></p>
<p><label for='sub_current'>".$this->l['admin']['m_sub_current']."</label><br />
<input class='short' id='sub_current' name='jlog_sub_current' type='text' size='3' maxlength='3' value='".$this->defaultValue($data, 'jlog_sub_current')."' /></p>
<p><input id='info_by_comment' name='jlog_info_by_comment' type='checkbox' value='true'".$d['info_by_comment']."/> <label for='info_by_comment' class='nobreak'>".$this->l['admin']['m_info_by_comment']."</label></p>
<p><label for='date'>".$this->l['admin']['m_date']."</label></p>
<p><input class='userdata' id='date' name='jlog_date' type='text' value='".$this->defaultValue($data, 'jlog_date')."' size='20' /> <label for='date' class='nobreak'>".$this->l['admin']['m_date_posting']."</label></p>
<p><input class='userdata' id='date_comment' name='jlog_date_comment' type='text' value='".$this->defaultValue($data, 'jlog_date_comment')."' size='20' /> <label for='date_comment' class='nobreak'>".$this->l['admin']['m_date_comment']."</label></p>
<p><input class='userdata' id='date_subcurrent' name='jlog_date_subcurrent' type='text' value='".$this->defaultValue($data, 'jlog_date_subcurrent')."' size='20' /> <label for='date_subcurrent' class='nobreak'>".$this->l['admin']['m_date_subcurrent']."</label></p>
<p><label for='blogservices'>".$this->l['admin']['m_bs']."</label></p>
<p><textarea class='small' id='blogservices' name='jlog_blogservices' rows='2' cols='60'>".$this->defaultValue($data, 'jlog_blogservices')."</textarea></p>
</fieldset>
";
if(defined('JLOG_SETUP') AND JLOG_SETUP === true) {
$form .=
"
<fieldset><legend>".$this->l['admin']['m_database']."</legend>
<p><label for='db'>".$this->l['admin']['m_db']."</label><br />
<input class='userdata' id='db' name='jlog_db' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_db')."' /></p>
<p><label for='db_url'>".$this->l['admin']['m_db_url']."</label><br />
<input class='userdata' id='db_url' name='jlog_db_url' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_db_url')."' /></p>
<p><label for='db_user'>".$this->l['admin']['m_db_user']."</label><br />
<input class='userdata' id='db_user' name='jlog_db_user' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_db_user')."' /></p>
<p><label for='db_pwd'>".$this->l['admin']['m_db_pwd']."</label><br />
<input class='userdata' id='db_pwd' name='jlog_db_pwd' type='password' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_db_pwd')."' /></p>
<p><label for='db_prefix'>".$this->l['admin']['m_db_prefix']."</label><br />
<input class='userdata' id='db_prefix' name='jlog_db_prefix' type='text' size='20' maxlength='255' value='".$this->defaultValue($data, 'jlog_db_prefix')."' />
<input name='jlog_start_year' type='hidden' value='".$this->defaultValue($data, 'jlog_start_year', date("Y"))."' /></p>
<input name='jlog_path' type='hidden' value='".$this->defaultValue($data, 'jlog_path')."' />
<input name='jlog_basepath' type='hidden' value='".$this->defaultValue($data, 'jlog_basepath')."' />
</fieldset>
";
}
$form .= "
<p><input type='submit' class='button' value='".$this->l['admin']['submit']."' /></p>
</form>
";
return $form;
}
/**
* validate() - validates the current configuration
*
* If the current configuration is valid, an empty array is returned.
* Otherwise the returned array containes all errors, described in the
* current language.
*
* @access public
* @return array
*/
function validate() {
# if everything validate then return true
# otherwise return the $errors array
$errors = array();
// paths
if(empty($this->d['jlog_path']) OR (check_url($this->d['jlog_path'], array ('http')) === false)) $errors[] = $this->l['admin']['e_path'];
if(empty($this->d['jlog_basepath']) OR !is_dir($this->d['jlog_basepath'])) $errors[] = $this->l['admin']['e_basepath'];
if($this->d['jlog_clean_url'] != 'true') $this->d['jlog_clean_url'] = 'false';
// metadata
if(empty($this->d['jlog_website'])) $errors[] = $this->l['admin']['e_website'];
if(empty($this->d['jlog_publisher'])) $errors[] = $this->l['admin']['e_publisher'];
if(defined('JLOG_SETUP') AND JLOG_SETUP) {
if($this->d['jlog_admin_password'] == md5(""))
$errors[] = $this->l['admin']['e_admin_password'];
elseif($this->d['jlog_admin_password'] !== $this->d['jlog_admin_password_again'])
$errors[] = $this->l['admin']['e_admin_password_again'];
}
elseif(!empty($this->d['jlog_admin_password']) AND $this->d['jlog_admin_password'] !== $this->d['jlog_admin_password_again']) {
$errors[] = $this->l['admin']['e_admin_password_again'];
}
// Fix of bug #148
if(isset($this->d['jlog_admin_password_again']))
unset($this->d['jlog_admin_password_again']);
if(empty($this->d['jlog_email']) OR !strpos($this->d['jlog_email'], '@')) $errors[] = $this->l['admin']['e_email'];
if(empty($this->d['jlog_description'])) $errors[] = $this->l['admin']['e_description'];
// behavour
if(!is_numeric($this->d['jlog_max_blog_orginal']) OR intval($this->d['jlog_max_blog_orginal']) < 0) $errors[] = $this->l['admin']['e_max_blog_orginal'];
if(!is_numeric($this->d['jlog_max_blog_big']) OR intval($this->d['jlog_max_blog_big']) < 0) $errors[] = $this->l['admin']['e_max_blog_big'];
if(!is_numeric($this->d['jlog_max_blog_small']) OR intval($this->d['jlog_max_blog_small']) < 0) $errors[] = $this->l['admin']['e_max_blog_small'];
if(!is_numeric($this->d['jlog_sub_current']) OR intval($this->d['jlog_sub_current']) < 0) $errors[] = $this->l['admin']['e_sub_current'];
if(!is_numeric($this->d['jlog_start_year'])) $errors[] = $this->l['admin']['e_start_year'];
if($this->d['jlog_info_by_comment'] != 'true') $this->d['jlog_info_by_comment'] = 'false';
// database
if(empty($this->d['jlog_db'])) $errors[] = $this->l['admin']['e_db'];
if(empty($this->d['jlog_db_url'])) $errors[] = $this->l['admin']['e_db_url'];
// Fix of bug #196, prefix should only contain alphanumeric values, can be empty!
if(!preg_match('/^[a-zA-Z0-9_]*$/', $this->d['jlog_db_prefix'])) $errors[] = $this->l['admin']['e_db_prefix'];
return $errors;
}
/**
* do_settings() - save configuration
*
* Saves the current configuration to the settings.inc.php file
* in the personal folder. Return an empty array if configuration
* was saved successfully, or an array containing descriptions of
* the errors that occured otherwise.
*
* @access public
* @return array
*/
function do_settings() {
# if it's all done return true
# otherwise return the $errors array
$errors = array();
// if there is no new password set the old
if(JLOG_ADMIN AND empty($this->d['jlog_admin_password'])) $this->d['jlog_admin_password'] = JLOG_ADMIN_PASSWORD;
// remove slashes at the end of JLOG_PATH if present
$this->d['jlog_path'] = rtrim($this->d['jlog_path'], '/');
// make shure JLOG_BASEPATH ends with a slash!!
$this->d['jlog_basepath'] = rtrim($this->d['jlog_basepath'], '/\\') . DIRECTORY_SEPARATOR;
// no quotes for bolean and numbers
$no_quotes = array (
'jlog_clean_url' => 'bool',
'jlog_max_blog_orginal' => 'int',
'jlog_max_blog_big' => 'int',
'jlog_max_blog_small' => 'int',
'jlog_sub_current' => 'int',
'jlog_start_year' => 'int',
'jlog_info_by_comment' => 'bool'
);
// serialize data to file format
$file_content = '<?php' . PHP_EOL . '// generated at ' . date('Y-m-d, h:i:s') . PHP_EOL;
foreach($this->d as $key => $value) {
$output = '';
if(isset($no_quotes[$key])) {
// boolean values
if($no_quotes[$key] == 'bool') {
if($value == 'true' OR $value === true) $output = 'true';
else $output = 'false';
}
// numeric values
else {
$output = (int) $value;
}
}
// string values
else {
$output = '\'' . $this->escapeForPhp($value) . '\'';
}
$key = '\'' . $this->escapeForPhp(strtoupper($key)) . '\'';
$file_content .= 'define(' . $key . ', ' . $output . ');' . PHP_EOL;
}
$file_content .= '// eof';
// write to settings.inc.php
if(!$handle = fopen(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."settings.inc.php", "w")) $errors[] = $this->l['admin']['can_not_open']." /personal/settings.inc.php";
if(!fwrite($handle, $file_content)) $errors[] = $this->l['admin']['can_not_write']." /personal/settings.inc.php";
fclose($handle);
return $errors;
}
/**
* escapeForPhp()
*
* escapes $value so that it can be used between single quotes in a
* PHP script, single quotes are better than double qoutes, as therein no
* further substituions are performed
*
* @access public
* @param string $value
* @return string
*/
function escapeForPhp($value) {
$value = str_replace('\\', '\\\\', $value);
$value = str_replace("'", "\'", $value);
$value = str_replace("\0", '', $value);
$value = str_replace("\r\n", "'.chr(13).chr(10).'", $value);
$value = str_replace("\r", "'.chr(13).'", $value);
$value = str_replace("\n", "'.chr(10).'", $value);
return $value;
}
}
// eof

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

135
scripts/update.php Normal file
View file

@ -0,0 +1,135 @@
<?php
$now_date = getdate();
$data['rss'] = "";
$data['rss_full'] = "";
$data['sub'] = "";
if(JLOG_SUB_CURRENT < 15) $limit = "LIMIT 15";
else $limit = "LIMIT ".JLOG_SUB_CURRENT;
$sql = "SELECT id, url, topic, UNIX_TIMESTAMP(date) AS date,
teaser, teaserpic, teaserpiconblog, keywords, content,
comments, allowpingback, section
FROM ".JLOG_DB_CONTENT."
WHERE section = 'weblog'
ORDER BY date DESC
".$limit.";";
$rss_sub = new Query($sql);
if($rss_sub->error()) {
echo "<pre>\n";
echo $rss_sub->getError();
echo "</pre>\n";
die();
}
if(defined('JLOG_ADMIN') AND !defined('JLOG_COMMENTS')) {
$data['rss'] = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">
<rss version=\"2.0\">
<channel>
<title>".htmlspecialchars(JLOG_WEBSITE)."</title>
<link>".htmlspecialchars(JLOG_PATH)."</link>
<description>".htmlspecialchars(JLOG_DESCRIPTION)."</description>
<language>".$l['language']."</language>
<lastBuildDate>".date('r')."</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>&lt;a href=&quot;".JLOG_SOFTWARE_URL."&quot;&gt;Jlog v".JLOG_SOFTWARE_VERSION."&lt;/a&gt;</generator>
<managingEditor>".htmlspecialchars(JLOG_PUBLISHER)." ".htmlspecialchars(JLOG_EMAIL)."</managingEditor>
<copyright>&amp;copy;".$now_date['year']." by ".htmlspecialchars(JLOG_PUBLISHER)."</copyright>\n\n";
$data['rss_full'] = $data['rss'];
}
$data['sub'] = "<ul class='subcurrentlist'>\n";
if(!isset($cc)) $cc = count_comments();
$sub = 0;
while ($row = $rss_sub->fetch()) {
++$sub;
if($sub <= JLOG_SUB_CURRENT) {
$tmp_comments = "";
if(isset($cc[$row['id']]) AND $cc[$row['id']] != 0) $tmp_comments = " <a class='comments' title='".$l['content_comments_title']."' href='".blog($row['date'], $row['url'])."#comments'>(".$cc[$row['id']].")</a>";
$data['sub'] .= " <li>".strftime(JLOG_DATE_SUBCURRENT, $row['date'])." <a href='".blog($row['date'], $row['url'])."'>".htmlspecialchars($row['topic'], ENT_QUOTES)."</a>".$tmp_comments."</li>\n";
}
if($sub <= 15 AND defined('JLOG_ADMIN')) {
# Kopfdaten
$data['rss'] .= " <item>\n <title>".htmlspecialchars($row['topic'], ENT_QUOTES)."</title>\n";
$data['rss_full'] .= " <item>\n <title>".htmlspecialchars($row['topic'], ENT_QUOTES)."</title>\n";
$data['rss'] .= " <guid isPermaLink=\"true\">".blog($row['date'], $row['url'])."</guid>\n";
$data['rss_full'] .= " <guid isPermaLink=\"true\">".blog($row['date'], $row['url'])."</guid>\n";
$data['rss'] .= " <pubDate>".date('r', $row['date'])."</pubDate>\n";
$data['rss_full'] .= " <pubDate>".date('r', $row['date'])."</pubDate>\n";
$data['rss'] .= " <link>".blog($row['date'], $row['url'])."</link>\n";
$data['rss_full'] .= " <link>".blog($row['date'], $row['url'])."</link>\n";
$data['rss'] .= " <comments>".blog($row['date'], $row['url'])."#comments</comments>\n";
$data['rss_full'] .= " <comments>".blog($row['date'], $row['url'])."#comments</comments>\n";
$data['rss'] .= $categories->output_rss($row['id']);
$data['rss_full'] .= $categories->output_rss($row['id']);
# Inhaltsdaten
$data['rss'] .= " <description>\n".htmlspecialchars($bbcode->parse($row['teaser']))."\n </description>\n";
$data['rss_full'] .= " <description>\n";
if($row['teaserpiconblog'] == 1) $data['rss_full'] .= htmlspecialchars("<img src='".JLOG_PATH."/personal/img/t_".$row['teaserpic']."' alt='' />");
$data['rss_full'] .= htmlspecialchars($bbcode->parse($row['content']))."\n </description>\n";
$data['rss'] .= " </item>\n\n";
$data['rss_full'] .= " </item>\n\n";
}
}
if(defined('JLOG_ADMIN') AND !defined('JLOG_COMMENTS')) {
$data['rss'] .= "</channel>\n</rss>";
$data['rss_full'] .= "</channel>\n</rss>";
}
$data['sub'] .= " </ul>";
if(defined('JLOG_ADMIN') AND !defined('JLOG_COMMENTS')) {
$file['rss'] = JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR.'rss.xml';
$file['rss_full'] = JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR.'rss-full.xml';
}
$file['sub'] = JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR.'subcurrent.inc';
### Plugin Hook
if (isset($plugins) and is_object($plugins)) {
$data = $plugins->callHook('onUpdate', $data);
}
$i = 0;
foreach($file AS $d => $filename) {
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'w')) {
$errors[] .= $l['admin']['can_not_open']." ($filename)";
exit;
}
if (!fwrite($handle, $data[$d])) {
$errors[] .= $l['admin']['can_not_write']." ($filename)";
exit;
}
++$i;
fclose($handle);
} else {
$errors[] .= $l['admin']['no_wrtitenable']." ($filename)";
}
}
if(count($errors) > 0) {
$c['main'] .= error_output($errors);
}
if($i == 4 AND defined('JLOG_ADMIN') AND !defined('JLOG_COMMENTS')) $c['main'] .= "<p>".$l['admin']['rss_ok']."</p>";
unset($i);
unset($sub);
?>

View file

@ -0,0 +1,66 @@
<?php
class JlogUpdate_102To110
{
var $languages = array();
function JlogUpdate_102To110()
{
$dir = opendir(JLOG_BASEPATH.'lang');
while(($file = readdir($dir)) !== false) {
if($file == '.' OR $file == '..') continue;
if(!preg_match('/lang\.([a-zA-z0-9]+)\.inc\.php/', $file, $matches)) continue;
$this->languages[] = $matches[1];
}
}
function getForm($l)
{
$html = "<p><label for='language'>Bitte wählen Sie die gewünschte Sprache für Ihr Weblog:</label><br />
<select class='userdata' id='language' name='j110_language'>";
foreach($this->languages as $lang) {
$html .= "<option>$lang</option>";
}
$html .= "</select>
</p>
<p>Die Zeichenkodierung ihrer Template-Datei <code>personal/template.tpl</code> muss nach UTF-8 umgewandelt werden. Wenn diese Datei
beschreibbar ist (z.B.: chmod 777), wird dies vom Updatescript automatisch für sie erledigt.
Andernfalls müssen Sie die Konvertierung nachträglich manuell vornehmen.</p>
";
return $html;
}
function performUpdate($l, $settings)
{
// convert all settings to utf8
foreach($settings->d as $key => $value) {
$settings->d[$key] = utf8_encode($value);
}
// reset hash of the administrator password
$settings->d['jlog_admin_password'] = md5($_POST['password']);
// store chosen language
$lang = in_array($_POST['j110_language'], $this->languages) ? $_POST['j110_language'] : 'de';
$settings->d['jlog_language'] = $lang;
$update_errors = array();
/**
* On a correct Jlog 1.0.2 installation, the template is saved with an ISO
* encoding, so we're going to try to convert this to UTF-8
*/
$template = JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."template.tpl";
if(@file_put_contents($template, utf8_encode(@file_get_contents($template))) == false) {
$update_errors[] = 'Die Datei <code>personal/template.tpl</code> konnte nicht in UTF-8 Kodierung konvertiert werden.';
}
if(empty($update_errors)) {
return true;
}
else {
return $update_errors;
}
}
}

View file

@ -0,0 +1,14 @@
<?php
class JlogUpdate_110To111
{
function getForm($l)
{
return '<p>Keine Einstellungen notwendig.</p>';
}
function performUpdate($l, $settings)
{
return true;
}
}

View file

@ -0,0 +1,28 @@
<?php
class JlogUpdate_111To112
{
function getForm($l)
{
return '<p>Dieses Script behebt ein paar fehlerhafte Einstellungen.'
.' Es ist keine Konfiguration notwendig.</p>';
}
function performUpdate($l, $settings)
{
// in jlog versions prior to jlog 1.1.2 we had escaping problems that caused
// a lot of backslashes in front of a double quote
// so we have to replace \" or \\" or \\\" and so on by ".
$data = array(
'jlog_description' => $settings->getValue('jlog_description'),
'jlog_website' => $settings->getValue('jlog_website'),
'jlog_publisher' => $settings->getValue('jlog_publisher')
);
foreach ($data as $key => $value) {
$value = preg_replace('=\\\\+"=', '"', $value);
$settings->setValue($key, $value);
}
return true;
}
}

View file

@ -0,0 +1,15 @@
<?php
class JlogUpdate_112To113
{
function getForm($l)
{
return '<p>Bitte beachten Sie, dass nach Durchführung dieses Updates eventuell einzelne Plugins nicht mehr funktionieren.<br />'
. 'Kontaktieren Sie in einem solchen Fall den Plugin-Autor bzzgl. eines Updates für das Plugin.</p>';
}
function performUpdate($l, $settings)
{
return true;
}
}

View file

@ -0,0 +1,42 @@
<?php
/**
* This is an example file, how update classes have to look like.
*
* Since we want to support PHP 4, unfortunately we can't use
* all the new OOP functions PHP 5 offers. In future this file may
* be a abstract class that all update classes have to extend.
*/
class JlogUpdate_Example
{
/**
* You can do anything you want here
*/
function __construct()
{
}
/**
* This function should prepare parts of the form for the update
*
* It gets the language array as the first parameter and
* must return html for the update form.
*/
function getForm($l)
{
return '<p>Do not need anything to configure for this update.</p>';
}
/**
* This function has to perform the update
*
* Must return true, if everything went well, of an array of error
* messages, if something went wrong.
* The first parameter again in the language array.
*/
function performUpdate($l)
{
return true;
}
}

248
scripts/url_syntax.php Normal file
View file

@ -0,0 +1,248 @@
<?php
function check_url ($url2check, $types) {
# Be paranoid about using grouping!
$nz_digit = '[1-9]';
$nz_digits = "(?:$nz_digit\\d*)";
$digits = '(?:\d+)';
$space = '(?:%20)';
$nl = '(?:%0[Aa])';
$dot = '\.';
$plus = '\+';
$qm = '\?';
$ast = '\*';
$hex = '[a-fA-F\d]';
$alpha = '[a-zA-Z]'; # No, no locale.
$alphas = "(?:${alpha}+)";
$alphanum = '[a-zA-Z\d]'; # Letter or digit.
$xalphanum = "(?:${alphanum}|%(?:3\\d|[46]$hex|[57][Aa\\d]))";
# Letter or digit, or hex escaped letter/digit.
$alphanums = "(?:${alphanum}+)";
$escape = "(?:%$hex\{2})";
$safe = '[$\-_.+]';
$extra = "[\!*'(),]";
$national = '[{}|\\^~[\]`]';
$punctuation = '[<>#%"]';
$reserved = '[;/?:@&=]';
$uchar = "(?:${alphanum}|${safe}|${extra}|${escape})";
$xchar = "(?:${alphanum}|${safe}|${extra}|${reserved}|${escape})";
$uchar = str_replace (']|[', '', $uchar); // Make string smaller, and speed up regex.
$uchar = str_replace (']|[', '', $xchar); // Make string smaller, and speed up regex.
# URL schemeparts for ip based protocols:
$user = "(?:(?:${uchar}|[;?&=])*)";
$password = "(?:(?:${uchar}|[;?&=])*)";
$hostnumber = "(?:${digits}(?:${dot}${digits}){3})";
$toplabel = "(?:${alpha}(?:(?:${alphanum}|-)*${alphanum})?)";
$domainlabel = "(?:${alphanum}(?:(?:${alphanum}|-)*${alphanum})?)";
$hostname = "(?:(?:${domainlabel}${dot})*${toplabel})";
$host = "(?:${hostname}|${hostnumber})";
$hostport = "(?:${host}(?::${digits})?)";
$login = "(?:(?:${user}(?::${password})?\@)?${hostport})";
# The predefined schemes:
# FTP (see also RFC959)
$fsegment = "(?:(?:${uchar}|[?:\@&=])*)";
$fpath = "(?:${fsegment}(?:/${fsegment})*)";
$ftpurl = "(?:ftp://${login}(?:/${fpath}(?:;type=[AIDaid])?)?)";
# FILE
$fileurl = "(?:file://(?:${host}|localhost)?/${fpath})";
# HTTP
$hsegment = "(?:(?:${uchar}|[~;:\@&=])*)";
$search = "(?:(?:${uchar}|[;:\@&=])*)";
$hpath = "(?:${hsegment}(?:/${hsegment})*)";
$httpurl = "(?:https?://${hostport}(?:/${hpath}(?:${qm}${search})?)?)";
# GOPHER (see also RFC1436)
$gopher_plus = "(?:${xchar}*)";
$selector = "(?:${xchar}*)";
$gtype = $xchar; // Omitted parens!
$gopherurl = "(?:gopher://${hostport}(?:/${gtype}(?:${selector}" .
"(?:%09${search}(?:%09${gopher_plus})?)?)?)?)";
# MAILTO (see also RFC822)
$encoded822addr = "(?:$xchar+)";
$mailtourl = "(?:mailto:$encoded822addr)";
$mailtonpurl = $encoded822addr;
# NEWS (see also RFC1036)
$article = "(?:(?:${uchar}|[;/?:&=])+\@${host})";
$group = "(?:${alpha}(?:${alphanum}|[_.+-])*)";
$grouppart = "(?:${article}|${group}|${ast})";
$newsurl = "(?:news:${grouppart})";
# NNTP (see also RFC977)
$nntpurl = "(?:nntp://${hostport}/${group}(?:/${digits})?)";
# TELNET
$telneturl = "(?:telnet://${login}/?)";
# WAIS (see also RFC1625)
$wpath = "(?:${uchar}*)";
$wtype = "(?:${uchar}*)";
$database = "(?:${uchar}*)";
$waisdoc = "(?:wais://${hostport}/${database}/${wtype}/${wpath})";
$waisindex = "(?:wais://${hostport}/${database}${qm}${search})";
$waisdatabase = "(?:wais://${hostport}/${database})";
# $waisurl = "(?:${waisdatabase}|${waisindex}|${waisdoc})";
# Speed up: the 3 types share a common prefix.
$waisurl = "(?:wais://${hostport}/${database}" .
"(?:(?:/${wtype}/${wpath})|${qm}${search})?)";
# PROSPERO
$fieldvalue = "(?:(?:${uchar}|[?:\@&])*)";
$fieldname = "(?:(?:${uchar}|[?:\@&])*)";
$fieldspec = "(?:;${fieldname}=${fieldvalue})";
$psegment = "(?:(?:${uchar}|[?:\@&=])*)";
$ppath = "(?:${psegment}(?:/${psegment})*)";
$prosperourl = "(?:prospero://${hostport}/${ppath}(?:${fieldspec})*)";
# LDAP (see also RFC1959)
# First. import stuff from RFC 1779 (Distinguished Names).
# We've modified things a bit.
$dn_separator = "(?:[;,])";
$dn_optional_space = "(?:${nl}?${space}*)";
$dn_spaced_separator = "(?:${dn_optional_space}${dn_separator}" .
"${dn_optional_space})";
$dn_oid = "(?:${digits}(?:${dot}${digits})*)";
$dn_keychar = "(?:${xalphanum}|${space})";
$dn_key = "(?:${dn_keychar}+|(?:OID|oid)${dot}${dn_oid})";
$dn_string = "(?:${uchar}*)";
$dn_attribute = "(?:(?:${dn_key}${dn_optional_space}=" .
"${dn_optional_space})?${dn_string})";
$dn_name_component = "(?:${dn_attribute}(?:${dn_optional_space}" .
"${plus}${dn_optional_space}${dn_attribute})*)";
$dn_name = "(?:${dn_name_component}" .
"(?:${dn_spaced_separator}${dn_name_component})*" .
"${dn_spaced_separator}?)";
# RFC 1558 defines the filter syntax, but that requires a PDA to recognize.
# Since that's too powerful for Perl's REs, we allow any char between the
# parenthesis (which have to be there.)
$ldap_filter = "(?:\(${xchar}+\))";
# This is from RFC 1777. It defines an attributetype as an 'OCTET STRING',
# whatever that is.
$ldap_attr_type = "(?:${uchar}+)"; # I'm just guessing here.
# The RFCs aren't clear.
# Now we are at the grammar of RFC 1959.
$ldap_attr_list = "(?:${ldap_attr_type}(?:,${ldap_attr_type})*)";
$ldap_attrs = "(?:${ldap_attr_list}?)";
$ldap_scope = "(?:base|one|sub)";
$ldapurl = "(?:ldap://(?:${hostport})?/${dn_name}" .
"(?:${qm}${ldap_attrs}" .
"(?:${qm}${ldap_scope}(?:${qm}${ldap_filter})?)?)?)";
# RFC 2056 defines the format of URLs for the Z39.50 protocol.
$z_database = "(?:${uchar}+)";
$z_docid = "(?:${uchar}+)";
$z_elementset = "(?:${uchar}+)";
$z_recordsyntax = "(?:${uchar}+)";
$z_scheme = "(?:z39${dot}50[rs])";
$z39_50url = "(?:${z_scheme}://${hostport}" .
"(?:/(?:${z_database}(?:${plus}${z_database})*" .
"(?:${qm}${z_docid})?)?" .
"(?:;esn=${z_elementset})?" .
"(?:;rs=${z_recordsyntax}" .
"(?:${plus}${z_recordsyntax})*)?))";
# RFC 2111 defines the format for cid/mid URLs.
$url_addr_spec = "(?:(?:${uchar}|[;?:@&=])*)";
$message_id = $url_addr_spec;
$content_id = $url_addr_spec;
$cidurl = "(?:cid:${content_id})";
$midurl = "(?:mid:${message_id}(?:/${content_id})?)";
# RFC 2122 defines the Vemmi URLs.
$vemmi_attr = "(?:(?:${uchar}|[/?:@&])*)";
$vemmi_value = "(?:(?:${uchar}|[/?:@&])*)";
$vemmi_service = "(?:(?:${uchar}|[/?:@&=])*)";
$vemmi_param = "(?:;${vemmi_attr}=${vemmi_value})";
$vemmiurl = "(?:vemmi://${hostport}" .
"(?:/${vemmi_service}(?:${vemmi_param}*))?)";
# RFC 2192 for IMAP URLs.
# Import from RFC 2060.
# $imap4_astring = "";
# $imap4_search_key = "";
# $imap4_section_text = "";
$imap4_nz_number = $nz_digits;
$achar = "(?:${uchar}|[&=~])";
$bchar = "(?:${uchar}|[&=~:\@/])";
$enc_auth_type = "(?:${achar}+)";
$enc_list_mbox = "(?:${bchar}+)";
$enc_mailbox = "(?:${bchar}+)";
$enc_search = "(?:${bchar}+)";
$enc_section = "(?:${bchar}+)";
$enc_user = "(?:${achar}+)";
$i_auth = "(?:;[Aa][Uu][Tt][Hh]=(?:${ast}|${enc_auth_type}))";
$i_list_type = "(?:[Ll](?:[Ii][Ss][Tt]|[Ss][Uu][Bb]))";
$i_mailboxlist = "(?:${enc_list_mbox}?;[Tt][Yy][Pp][Ee]=${i_list_type})";
$i_uidvalidity = "(?:;[Uu][Ii][Dd][Vv][Aa][Ll][Ii][Dd][Ii][Tt][Yy]=" .
"${imap4_nz_number})";
$i_messagelist = "(?:${enc_mailbox}(?:${qm}${enc_search})?" .
"(?:${i_uidvalidity})?)";
$i_section = "(?:/;[Ss][Ee][Cc][Tt][Ii][Oo][Nn]=${enc_section})";
$i_uid = "(?:/;[Uu][Ii][Dd]=${imap4_nz_number})";
$i_messagepart = "(?:${enc_mailbox}(?:${i_uidvalidity})?${i_uid}" .
"(?:${i_section})?)";
$i_command = "(?:${i_mailboxlist}|${i_messagelist}|${i_messagepart})";
$i_userauth = "(?:(?:${enc_user}(?:${i_auth})?)|" .
"(?:${i_auth}(?:${enc_user})?))";
$i_server = "(?:(?:${i_userauth}\@)?${hostport})";
$imapurl = "(?:imap://${i_server}/(?:$i_command)?)";
# RFC 2224 for NFS.
$nfs_mark = '[\$\-_.\!~*\'(),]';
$nfs_unreserved = "(?:${alphanum}|${nfs_mark})";
$nfs_unreserved = str_replace (']|[', '', $nfs_unreserved); // Make string smaller, and speed up regex.
$nfs_pchar = "(?:${nfs_unreserved}|${escape}|[:\@&=+])";
$nfs_segment = "(?:${nfs_pchar}*)";
$nfs_path_segs = "(?:${nfs_segment}(?:/${nfs_segment})*)";
$nfs_url_path = "(?:/?${nfs_path_segs})";
$nfs_rel_path = "(?:${nfs_path_segs}?)";
$nfs_abs_path = "(?:/${nfs_rel_path})";
$nfs_net_path = "(?://${hostport}(?:${nfs_abs_path})?)";
$nfs_rel_url = "(?:${nfs_net_path}|${nfs_abs_path}|${nfs_rel_path})";
$nfsurl = "(?:nfs:${nfs_rel_url})";
$valid_types = array (
'http', 'ftp', 'news', 'nntp', 'telnet', 'gopher', 'wais', 'mailto',
'mailtonp', 'file', 'prospero', 'ldap', 'z39_50', 'cid', 'mid', 'vemmi',
'imap', 'nfs'
);
# Combining all the different URL formats into a single regex.
$valid = false;
if (!is_array ($types)) {
$types = array ($types);
}
foreach ($types as $type) {
if (!in_array ($type, $valid_types)) {
continue;
}
$re = $type.'url';
if (preg_match ('!^'.$$re.'$!i', $url2check)) {
$valid = $type;
break;
}
}
return $valid;
}
?>

31
scripts/version.inc.php Normal file
View file

@ -0,0 +1,31 @@
<?php
/**
* Jlog
*
* 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
*
* $HeadURL: http://jeenaparadies.net/svn/jlog/trunk/scripts/version.inc.php $
* $Rev: 1785 $
* $Author: driehle $
* $Date: 2009-01-13 21:58:12 +0100 (Tis, 13 Jan 2009) $
*/
define('JLOG_SOFTWARE_VERSION', '1.1.3');
define('JLOG_SOFTWARE_URL', 'http://jeenaparadies.net/projects/jlog');
define('JLOG_SOFTWARE_PHPV', '4.1.1');
define('JLOG_SOFTWARE_MYSQLV', '4.1.0');
// eof

94
search.php Normal file
View file

@ -0,0 +1,94 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$c['meta']['robots'] = "noindex, follow";
$c['meta']['title'] = $l['content_search_header'];
$c['main'] = "<h2 class='search'>".$l['content_search_header']."</h2>";
$searchstring = strip($_GET['q']);
$c['main'] .= ' <form id="searchform" action="'.JLOG_PATH.'/search.php" accept-charset="UTF-8">
<p><input class="userdata" type="text" name="q" size="30" value="'.htmlspecialchars($searchstring, ENT_QUOTES).'" />
<input class="send" type="submit" value="'.$l['content_search'].'" /></p>
</form>
<script type="text/javascript">jlog_searchpage = true;</script>
';
if(!empty($searchstring)) {
$sql_searchstring = escape_for_mysql($searchstring);
$sql = "
SELECT
id,
url,
UNIX_TIMESTAMP(date) AS date_url,
0 AS comment_id,
topic,
UNIX_TIMESTAMP(date) AS date,
keywords,
teaser,
section,
comments,
MATCH ( topic, keywords, teaser, content ) AGAINST ('".$sql_searchstring."') AS scoring
FROM ".JLOG_DB_CONTENT."
WHERE
MATCH ( topic, keywords, teaser, content ) AGAINST ( '".$sql_searchstring."' )
UNION
SELECT
".JLOG_DB_COMMENTS.".reference AS id,
".JLOG_DB_CONTENT.".url AS url,
UNIX_TIMESTAMP(".JLOG_DB_CONTENT.".date) AS date_url,
".JLOG_DB_COMMENTS.".id AS comment_id,
name AS topic,
UNIX_TIMESTAMP(".JLOG_DB_COMMENTS.".date) AS date,
'comment_keywords' AS keywords,
".JLOG_DB_COMMENTS.".content AS teaser,
'comment',
2,
MATCH(name, city, email, homepage, ".JLOG_DB_COMMENTS.".content) AGAINST ('".$sql_searchstring."') AS scoring
FROM ".JLOG_DB_COMMENTS.", ".JLOG_DB_CONTENT."
WHERE
MATCH ( name, city, email, homepage, ".JLOG_DB_COMMENTS.".content ) AGAINST ( '".$sql_searchstring."' )
AND ".JLOG_DB_COMMENTS.".reference = ".JLOG_DB_CONTENT.".id
AND ".JLOG_DB_COMMENTS.".type = ''
ORDER BY scoring desc
LIMIT 40;";
$search = new Query($sql);
if($search->error()) {
echo "<pre>\n";
echo $search->getError();
echo "</pre>\n";
die();
}
if($search->numRows() < 1) {
$c['main'] .= "<p>".$l['content_nothing_found']."</p>";
}
else {
$cc = count_comments();
$c['main'] .= "<ul class='search'>\n";
while( $data = $search->fetch() ) {
$c['main'] .= " <li>";
if($data['comment_id'] == 0) $c['main'] .= do_teaser($data, $cc, '<h3>', '</h3>');
else {
$data['url'] = $data['url'].'#c'.$data['comment_id'];
if(empty($data['topic'])) $data['topic'] = $l['comments_anonym'];
$data['topic'] = $l['comments_by'].": ".$data['topic'];
list($data['teaser']) = explode('|*|JLOG_BREAK|*|', wordwrap(str_replace("\n", ' ', html_entity_decode(strip_tags($bbcomments->parse(trim($data['teaser']))))), 300, ' ...|*|JLOG_BREAK|*|'));
$c['main'] .= do_teaser($data, 0, '<h4>', '</h4>');
}
$c['main'] .= " </li>\n";
}
$c['main'] .= "</ul>\n";
}
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

315
setup.php Normal file
View file

@ -0,0 +1,315 @@
<?php
/* -- setup.php for Jlog
-- Please delete this file if you have done the setup
*/
if(file_exists(dirname( __FILE__ ).DIRECTORY_SEPARATOR.'personal'.DIRECTORY_SEPARATOR.'settings.inc.php')) {
die("The setup has already been sucessfull!");
}
// derzeit gibt es noch etliche E_NOTICE-Meldungen in JLog, deshalb:
error_reporting(E_ALL ^ E_NOTICE);
header("Content-Type: text/html; charset=UTF-8");
define("JLOG_NEW_VERSION", '1.1.0');
define("JLOG_SETUP", true);
define("JLOG_ADMIN", false);
$basepath = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
// defining to avoid notifications
define("JLOG_WEBSITE", $_SERVER["HTTP_HOST"]);
define("JLOG_PATH", dirname("http://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]));
// read prefered language from browser
$dir = opendir('.'.DIRECTORY_SEPARATOR.'lang');
$languages = array();
while(($file = readdir($dir)) !== false) {
if($file == '.' OR $file == '..') continue;
if(!preg_match('/lang\.([a-zA-z0-9]+)\.inc\.php/', $file, $matches)) continue;
$languages[] = $matches[1];
}
if(!empty($_GET['lang'])) {
$lang = $_GET['lang'];
} else {
$lang = getlang($languages, 'de');
}
define('JLOG_LANGUAGE', $lang);
// load required scripts and libraries
require('.'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'lang.'.$lang.'.inc.php');
require('.'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.$lang.'.inc.php');
require('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'database.class.php');
require('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'general.func.php');
require('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'settings.class.php');
require('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'url_syntax.php');
require('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'version.inc.php');
define("JLOG_NEW_VERSION", JLOG_SOFTWARE_VERSION);
define("JLOG_PHPV", JLOG_SOFTWARE_PHPV);
define("JLOG_MYSQLV", JLOG_SOFTWARE_MYSQLV);
$errors = array();
$l['admin']['submit'] = $l['admin']['s_install'];
$setup = new Settings($l);
if($_POST) {
$setup->importDataByArray(strip($_POST));
// validate user entry
if(count($errors = $setup->validate()) == 0) {
define("JLOG_BASEPATH", $setup->getValue('jlog_basepath'));
if(is_writable(JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR)) {
$c .= "<ul>\n";
// build some MySQL tables
if(count($errors = create_mysql_tables($setup->getValue(false))) == 0) {
$c .= "<li>".$l['admin']['s_tables_ok']."</li>\n";
// create and chmod on some directories and files
if(count($errors = do_personal()) == 0) {
$c .= "<li>".$l['admin']['s_personal_ok']."</li>\n";
// build settings.inc.php
if(count($errors = $setup->do_settings()) == 0) $c .= "<li>".$l['admin']['master_ok']."</li>\n";
}
$c .= "</ul>";
}
}
else {
$errors[] = $l['admin']['s_personal_not_wrtbl'];
}
}
if(count($errors) > 0) {
$c .= error_output($errors);
$c .= $setup->form_output();
}
else $c .= "<h2>".$l['admin']['s_ready_head']."</h2>"."<p style='text-align: left;'>".$l['admin']['s_ready']."</p>";
}
else {
// validate PHP and MySQL versions
if(!version_compare(phpversion(), JLOG_PHPV, ">=") == 1) $errors[] = $l['admin']['s_phpv_tolow'];
if(!is_writable($basepath.'personal'.DIRECTORY_SEPARATOR)) $errors[] = $l['admin']['s_personal_not_wrtbl'];
if(!is_writable($basepath.'img'.DIRECTORY_SEPARATOR)) $errors[] = $l['admin']['s_img_not_wrtbl'];
if(empty($errors)) {
// output form
$setup->importSuggestedData();
$c .= $setup->form_output();
}
else $c .= error_output($errors);
}
echo do_htmlpage($c);
#### some needed functions for the setup ####
function create_mysql_tables($data) {
# returns false if all tables were created, if not returns the $errors array
$sql['content'] = '
CREATE TABLE `'.$data['jlog_db_prefix'].'content` (
id int(11) auto_increment,
url varchar(200),
topic varchar(255),
date datetime,
teaser mediumtext,
teaserpic varchar(10),
teaserpiconblog tinyint(1),
keywords varchar(255),
content longtext,
comments tinyint(1) default \'1\',
allowpingback tinyint(1) default \'1\',
section varchar(10) default \'weblog\',
UNIQUE KEY id (id),
FULLTEXT KEY content_index (content, topic, teaser, keywords)
) TYPE=MyISAM CHARACTER SET utf8;';
$sql['comments'] = '
CREATE TABLE `'.$data["jlog_db_prefix"].'comments` (
id int(11) auto_increment,
sid varchar(35),
name varchar(255),
city varchar(255),
email varchar(255),
homepage varchar(255),
content mediumtext,
date datetime,
reference int(11),
mail_by_comment tinyint(1),
type varchar(30) default \'\',
PRIMARY KEY (id),
UNIQUE KEY sid (sid),
FULLTEXT KEY comments_index ( name, city, email, homepage, content )
) TYPE=MyISAM CHARACTER SET utf8;';
$sql['categories'] = '
CREATE TABLE `'.$data["jlog_db_prefix"].'categories` (
id tinyint(4) auto_increment,
name tinytext,
url varchar(100),
description text,
UNIQUE KEY id (id),
UNIQUE KEY url (url)
) TYPE=MyISAM CHARACTER SET utf8;';
$sql['catassign'] = '
CREATE TABLE `'.$data["jlog_db_prefix"].'catassign` (
content_id int(11),
cat_id tinyint(4)
) TYPE=MyISAM CHARACTER SET utf8;';
$sql['attributes'] = '
CREATE TABLE `'.$data["jlog_db_prefix"].'attributes` (
id int(10) unsigned NOT NULL auto_increment,
entry_id int(10) unsigned NOT NULL default \'0\',
name varchar(120) NOT NULL default \'\',
value varchar(250) NOT NULL default \'\',
PRIMARY KEY (id),
KEY entry_id (entry_id)
) TYPE=MyISAM CHARACTER SET utf8;';
global $l;
if(!@mysql_connect($data['jlog_db_url'], $data['jlog_db_user'], $data['jlog_db_pwd'])) $errors[] = "Falsche Zugangsdaten | ".mysql_error();
elseif(!@mysql_select_db($data['jlog_db'])) $errors[] = "Datenbank ".$data['jlog_db']." extistiert nicht".mysql_error();
elseif(!version_compare(mysql_get_server_info(), JLOG_MYSQLV, ">=") == 1) $errors[] = $l['admin']['s_mysqlv_tolow'];
else {
new Query("SET NAMES utf8");
$create['content'] = new Query($sql['content']);
if($create['content']->error()) $errors[] = "MySQL <pre>".$create['content']->getError()."</pre>";
$create['comments'] = new Query($sql['comments']);
if($create['comments']->error()) $errors[] = "MySQL <pre>".$create['comments']->getError()."</pre>";
$create['categories'] = new Query($sql['categories']);
if($create['categories']->error()) $errors[] = "MySQL <pre>".$create['categories']->getError()."</pre>";
$create['catassign'] = new Query($sql['catassign']);
if($create['catassign']->error()) $errors[] = "MySQL <pre>".$create['catassign']->getError()."</pre>";
$create['attributes'] = new Query($sql['attributes']);
if($create['attributes']->error()) $errors[] = "MySQL <pre>".$create['attributes']->getError()."</pre>";
}
return $errors;
}
function do_personal() {
# returns true if all files and dirs could be generated
# if not returns the $errors array
global $l;
// make some dirs
$oldmask = umask(0);
// make some files
if(!fopen(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."settings.inc.php", "w")) $errors[] = $l['admin']['s_problem_fwrite']." /personal/settings.inc.php";
if(!fopen(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."rss.xml", "w")) $errors[] = $l['admin']['s_problem_fwrite']." /personal/rss.xml";
if(!fopen(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."rss-full.xml", "w")) $errors[] = $l['admin']['s_problem_fwrite']." /personal/rss-full.xml";
if(!fopen(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."subcurrent.inc", "w")) $errors[] = $l['admin']['s_problem_fwrite']." /personal/subcurrent.inc";
// chmod 666 so that the user have the ability to delete/write to this files
if(!chmod(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."settings.inc.php", 0666)) $errors[] = $l['admin']['s_problem_chmod']." /personal/settings.inc.php";
if(!chmod(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."rss.xml", 0666)) $errors[] = $l['admin']['s_problem_chmod']." /personal/rss.xml";
if(!chmod(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."rss-full.xml", 0666)) $errors[] = $l['admin']['s_problem_chmod']." /personal/rss-full.xml";
if(!chmod(JLOG_BASEPATH."personal".DIRECTORY_SEPARATOR."subcurrent.inc", 0666)) $errors[] = $l['admin']['s_problem_chmod']." /personal/subcurrent.inc";
umask($oldmask);
return $errors;
}
function do_htmlpage($content) {
return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>SETUP Jlog ' . JLOG_NEW_VERSION . '</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="scripts/css/admin.css" type="text/css" />
<style type="text/css">
body {
background: #F3F3F3;
color: black;
font-family: verdana, sans-serif;
font-size: 100.01%;
}
#container {
font-size: 0.9em;
background: white;
padding: 20px;
margin: 1em auto;
border: 1px solid #aaa;
width: 600px;
}
h1 {
font-family: georgia, "Times New Roman", Times, sans-serif;
font-size: 80px;
margin: 0 0 0 30px;
}
#logo { float: right; }
h2 { margin: 1.5em 0 0.3em 0; font-weight: normal; clear: right; }
.ok { color: green; }
.notok, .error { color: red; }
table { border-spacing: 0.5em; }
fieldset { padding: 1em; border: 1px solid #ccc; clear: both; margin-top: 1em; }
legend { font-weight: bold; padding: 0 1em; }
.button { font-size: 3em; }
p { text-align: center; }
fieldset p { text-align: left; }
a img { border: none; }
</style>
</head>
<body>
<div id="container">
<h1><a href="http://jeenaparadies.net/projects/jlog/" title="Jlog v'.JLOG_NEW_VERSION.'"><img id="logo" src="http://jeenaparadies.net/img/jlog-logo.png" style="width: 210px; height: 120px;" alt="Jlog" /></a> SETUP</h1>
'.$content.'
</div>
</body>
</html>';
}
function getlang ($allowed, $default) {
$string = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
if (empty($string)) {
return $default;
}
$accepted_languages = preg_split('/,\s*/', $string);
$cur_l = $default;
$cur_q = 0;
foreach ($accepted_languages as $accepted_language) {
$res = preg_match ('/^([a-z]{1,8}(?:-[a-z]{1,8})*)'.
'(?:;\s*q=(0(?:\.[0-9]{1,3})?|1(?:\.0{1,3})?))?$/i', $accepted_language, $matches);
if (!$res) {
continue;
}
$lang_code = explode ('-', $matches[1]);
if (isset($matches[2])) {
$lang_quality = (float)$matches[2];
} else {
$lang_quality = 1.0;
}
while (count ($lang_code)) {
if (in_array (strtolower (join ('-', $lang_code)), $allowed)) {
if ($lang_quality > $cur_q) {
$cur_l = strtolower (join ('-', $lang_code));
$cur_q = $lang_quality;
break;
}
}
array_pop ($lang_code);
}
}
return $cur_l;
}

27
stop.php Normal file
View file

@ -0,0 +1,27 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$c['meta']['robots'] = "noindex, follow";
$c['title'] = JLOG_WEBSITE;
$stop = escape_for_mysql(strip($_GET));
$sql = "UPDATE ".JLOG_DB_COMMENTS." SET
mail_by_comment = '0'
WHERE
reference = '".$stop['id']."' AND
email = '".$stop['email']."'";
$stop = new Query($sql);
if($stop->error()) {
echo "<pre>\n";
echo $stop->getError();
echo "</pre>\n";
die();
}
$c['main'] = "<p>".$l['comments_stop_successful']."</p>";
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

244
xmlrpc.php Normal file
View file

@ -0,0 +1,244 @@
<?php # A class for getting and sending Pingbacks
$HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
if(!defined('JLOG_BASEPATH')) require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'ixr-library.inc.php');
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'jlogHTTP_Request.php');
if(defined("JLOG_ADMIN") === false) {
function ping($args) {
$pingback = new Jlog_GetPingback(JLOG_DB_CONTENT, JLOG_DB_COMMENTS, JLOG_PATH, new_sid());
$pingback->get_ping($args);
if($pingback->validate()) {
$pingback->write_to_db();
return "Thanks for your ping.";
}
}
$server = new IXR_Server(array('pingback.ping' => 'ping'));
}
class Jlog_GetPingback {
var $errors = array(); // array
var $method = ""; // string
var $sourceURI = ""; // string
var $targetURI = array(); // array incl: orginal, parsed [array from parse_url()], y, m, url
var $title = ""; // string
var $sid = ""; // string
function Jlog_GetPingback($db_content, $db_comments, $path, $sid = NULL) {
$this->db_content = $db_content;
$this->db_comments = $db_comments;
$this->path = $path;
if($sid != NULL) $this->sid = $sid;
}
function get_ping($uris) {
$ymurls = array();
$tmp_host_got = "";
$tmp_host_path_parsed = array();
$tmp_host_path = "";
$this->sourceURI = trim($uris[0]);
$this->targetURI['orginal'] = trim(str_replace(array('&quot;','&lt;', '&gt;', '&amp;'), array('"', '<', '>', '&'), $uris[1]));
$this->targetURI['parsed'] = parse_url($this->targetURI['orginal']);
$tmp_host_got = str_replace('www.', '', $this->targetURI['parsed']['host']).$this->targetURI['parsed']['path'];
$tmp_host_path_parsed = parse_url($this->path);
$tmp_host_path = str_replace('www.', '', $tmp_host_path_parsed['host']).'/log.php';
if(!empty($this->targetURI['parsed']['query']) AND ($tmp_host_got == $tmp_host_path)) {
$ymurls = explode('&', $this->targetURI['parsed']['query']);
$this->_counter = count($ymurls);
foreach($ymurls AS $ymurl) {
if(substr($ymurl, 0, 2) == 'y=') $this->targetURI['y'] = substr($ymurl, 2);
elseif(substr($ymurl, 0, 2) == 'm=') $this->targetURI['m'] = substr($ymurl, 2);
elseif(substr($ymurl, 0, 4) == 'url=') $this->targetURI['url'] = substr($ymurl, 4);
}
}
else {
### Plugin Hook
global $plugins;
$tmp_URI = $plugins->callHook('xmlrpcPermalink', $this->targetURI['orginal']);
$regex = "#^".$this->path."/([0-9]{4})/?([0-9]{2})/?([a-z0-9_\-]+)$#";
preg_match($regex, $tmp_URI, $matches);
$this->targetURI['y'] = $matches[1];
$this->targetURI['m'] = $matches[2];
$this->targetURI['url'] = $matches[3];
}
}
function validate() {
if(!strpos($this->targetURI['orginal'], str_replace(array('http://', 'https://'), '', str_replace('www.', '', $this->path))))
$this->send_error(0, 'Target URI ('.$this->targetURI['orginal'].') is not this page: '.$this->path);
// is there such a post?
$sql = "SELECT id, allowpingback FROM ".$this->db_content." WHERE
YEAR(date) = '".escape_for_mysql($this->targetURI['y'])."' AND
MONTH(date) = '".escape_for_mysql($this->targetURI['m'])."' AND
url = '".escape_for_mysql($this->targetURI['url'])."' AND
section = 'weblog'
LIMIT 1";
$blog = new Query($sql);
if($blog->error()) $this->send_error(0, 'Could not read my database.');
$blogrow = $blog->fetch();
if($blog->numRows() != 1) $this->send_error(32, 'The specified target URI does not exist.'.$this->targetURI['orginal']);
if($blogrow['allowpingback'] === 0) $this->send_error(33, 'The specified target URI cannot be used as a target. It it is not a pingback-enabled resource.');
else $this->reference = $blogrow['id'];
$s =& new HTTP_Request($this->sourceURI);
if(PEAR::isError($s->sendRequest())) $this->send_error(16, 'The source URI does not exist.');
else {
$source = $s->getResponseBody();
$source = strip_tags(str_replace('<!DOCTYPE','<DOCTYPE', $source), '<title><a>');
if (!$this->isLinkInHTML($this->targetURI['orginal'], $source))
$this->send_error(17, 'The source URI does not contain a link to the target URI, and so cannot be used as a source.');
preg_match('|<title>([^<]*?)</title>|is', $source, $title);
if(! $utf8 = preg_match ('/charset\s*=\s*utf-8/i', $s->getResponseHeader("Content-Type")))
$utf8 = 'application/xhtml+xml' == strtolower(trim($s->getResponseHeader("Content-Type")));
// since text in database is utf8 encoded, we need to *en*code the title to utf8 if it isn't already, not *de*code it
$this->title = empty($title[1]) ? $this->sourceURI : html_entity_decode($utf8 ? $title[1] : utf8_encode($title[1]));
}
$sql = "SELECT COUNT(*) AS ping FROM ".$this->db_comments." WHERE
reference = '".escape_for_mysql($blogrow['id'])."' AND
homepage = '".escape_for_mysql($this->sourceURI)."' AND
name = '".escape_for_mysql($this->title)."' AND
type = 'pingback'
LIMIT 1";
$p = new Query($sql);
if($p->error()) $this->send_error(0, 'Could not read my database.');
$f = $p->fetch();
if($f['ping'] > 0) $this->send_error(48, 'The pingback has already been registered.');
if(count($this->errors) > 0) return false;
else return true;
}
function write_to_db() {
$sql = "INSERT INTO ".$this->db_comments." (
sid,
name,
homepage,
reference,
date,
type
)
VALUES (
'".escape_for_mysql($this->sid)."',
'".escape_for_mysql($this->title)."',
'".escape_for_mysql($this->sourceURI)."',
'".escape_for_mysql($this->reference)."',
NOW(),
'pingback'
)";
$ping = new Query($sql);
if($ping->error()) $this->send_error(0, 'Could not write to database.');
}
function send_error($nr, $string) {
$this->errors[] = $nr." ".$string;
$error = new IXR_Error($nr, $string);
$this->send_xml($error->getXml());
}
function get_errors() {
return $this->errors;
}
function send_xml($xml) {
header('Connection: close');
header('Content-Length: '.strlen($xml));
header('Content-Type: text/xml');
header('Date: '.date('r'));
echo $xml;
exit;
}
function isLinkInHTML($search, $html) {
preg_match_all('#<a[^>]+href\s*=\s*("([^"]+)"|\'([^\']+)\')[^>]*>(.+)</a>#Ui', $html, $matches);
$links = array_unique(array_merge($matches[2], $matches[3]));
foreach($links as $link) {
if($search === str_replace('&amp;', '&', $link)) return true;
}
return false;
}
}
class Jlog_SendPingback {
var $pageslinkedto = array();
var $useragent = "";
function Jlog_SendPingback($html, $pagelinkedfrom, $useragent) {
// neet to prevent &amp; in url
$this->pagelinkedfrom = htmlspecialchars_decode($pagelinkedfrom);
$this->useragent = $useragent;
preg_match_all('#<a[^>]+href\s*=\s*("([^"]+)"|\'([^\']+)\')[^>]*>(.+)</a>#Ui', $html, $matches);
$pageslinkedto = array();
$pageslinkedto = array_unique(array_merge($matches[2], $matches[3]));
$count = count($pageslinkedto);
for($i = 0; $count > $i; $i++) {
if(substr($pageslinkedto[$i], 0, 4) !== "http") unset($pageslinkedto[$i]);
// htmlspecialchars_decode is easier than str_replace
else $pageslinkedto[$i] = htmlspecialchars_decode($pageslinkedto[$i]);
}
$this->pageslinkedto = $pageslinkedto;
}
function doPingbacks() {
foreach($this->pageslinkedto as $pagelinkedto) {
$feedback[] = $this->send($pagelinkedto);
}
return $feedback;
}
function send($pagelinkedto) {
$s =& new HTTP_Request($pagelinkedto);
if(PEAR::isError($s->sendRequest())) return $pagelinkedto." &mdash; Error: The source URI does not exist.";
else {
$xmlrpcserver = $s->getResponseHeader("X-Pingback");
if(!empty($xmlrpcserver));
else {
if(preg_match('<link rel="pingback" href="([^"]+)" ?/?>', $s->getResponseBody(), $matches)) {
$xmlrpcserver = $matches[1];
}
else return $pagelinkedto." &mdash; This is not a pingback-enabled resource.";
}
$client = new IXR_Client($xmlrpcserver);
$client->timeout = 3;
$client->useragent = $this->useragent;
// when set to true, this outputs debug messages by itself
$client->debug = false;
if (! $client->query('pingback.ping', $this->pagelinkedfrom, $pagelinkedto ) )
return $pagelinkedto." &mdash; Error: ".$client->getErrorMessage();
else return $pagelinkedto." &mdash; ".$client->getResponse();
}
}
}
?>