Compare commits

...
Sign in to create a new pull request.

9 commits

Author SHA1 Message Date
RobbBienert
488d3746fc database handling 2024-10-06 01:46:45 +02:00
RobbBienert
57628ef1a1 setup bug fixes for recent PHP versions 2024-10-06 01:13:55 +02:00
RobbBienert
46f9843a03 protecting input type="password" 2024-10-06 01:13:28 +02:00
RobbBienert
74d6eb4925 1st fix of setup 2024-10-06 00:02:39 +02:00
RobbBienert
9084fa00e4 original file imported (out-dated) 2024-10-05 23:49:51 +02:00
RobbBienert
7a264e4132 Some more PHP 8 stuff 2024-10-05 23:42:25 +02:00
RobbBienert
fe590f716e next update to modern PHP 2024-10-05 23:33:16 +02:00
RobbBienert
a125904815 ignoring Jlog artifacts 2024-10-04 16:45:16 +02:00
RobbBienert
517c58344d 1st commit for syncing own Jlog developments with master 2024-10-04 16:40:09 +02:00
61 changed files with 1930 additions and 1103 deletions

View file

@ -22,3 +22,8 @@
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^([a-z0-9_\-\./,]+)$" page.php?url=$1 [QSA]
</IfModule>
# Ein paar nette PHP-Einstellungen die das Leben schoener machen:
php_flag expose_php off
php_flag zlib.output_compression on
php_value zlib.output_compression_level 6

75
INSTALL.txt Normal file
View file

@ -0,0 +1,75 @@
### Weblogsystem Jlog v1.0.2 vom 26.11.2006
### Programmiert von Jeena Paradies
### E-Mail: jlog@jeenaparadies.net
###
### Projektseite: http://jeenaparadies.net/projects/jlog/
###
### Inhaltsverzeichnis:
### I. Installationsanleitung
### II. Updateanleitung (1.0.1 => 1.0.2)
### I. Installationsanleitung
a) Dieses Programm benötigt mindestens PHP 4.1.1 mit MySQL support
und MySQL 4.0.0
b) Das tar Archiv herunterladen:
tux@earth:/$ wget http://jeenaparadies.net/projects/jlog/attachment/wiki/versions/jlog-1.0.2.tar.gz?format=raw
c) Das Archiv entpacken:
tux@earth:/$ tar -xvzf jlog-1.0.2.tar.gz
Oder mittels WinZip/WinRar etc.
d) Alle Dateien auf den Server in das gewünschte Verzeichnis hochladen.
e) Den Verzeichnissen "personal" und "img" via FTP die Schreibrechte 777 geben.
f) Setupdatei im Browser aufrufen http://example.com/setup.php
g) Alle Felder Müssen richtig ausgefüllt werden.
Anmerkung:
sauberer URL: http://example.com/2005/05/title
schmutziger URL: http://example.com/log.php?y=2005&m=05&url=title
h) Nach der erfolgreichen Installation sollte man unbedingt die Datei "setup.php"
aus dem Stammverzeichnis löschen, damit da niemand Unfug treiben kann.
Nun kann man die Software benutzen und unter http://example.com/admin/
administrieren.
i) Im Verzeichnis /personal/ befindet sich die template.tpl Datei die das
Aussehen steuert, genau so befinden sich im Verzeichnis /personal/css/
alle benötigten CSS Dateien. Eine Dokumentation der Software werde
ich auch noch erstellen, aber ich denke sie ist ziemlich selbsterklärend.
j) Wenn du Pages verwenden willst und saubere URLs eingestellt hast dann
kannst du einfach über http://example.com/page-title auf diese zugreifen.
Falls du schmutzige URLs eingestellt hast dann kannst du über
http://example.com/page.php?url=page-title auf diese zugreifen.
### II) Updateanleitung 1.0.1 => 1.0.2
a) Das Updatescript funktioniert wenn man Jlog Version 1.0.1 bereits
installiert hat.
b) Das Archiv herunterladen (siehe Installationsanleitung Punkt b), entpacken
und alle Dateien in das gleiche Verzeichnis hochladen d), dabei werden die
alten Dateien überschrieben. Falls man sein altes Template weiternutzen möchte
dann bitte das Verzeichnis "personal" NICHT hochladen. Bitte die Datei setup.php
aus Sicherheitsgründen löschen.
c) Das Updatescript muss jetzt noch die Datenbank anpassen. Dazu öffnet man es
im Browser unter:
http://example.com/admin/update.php
und gibt das Adminpasswort ein. Durch das abshicken wird alles weitere
automatisch erledigt.
d) Überprüfen dass keine Fehler durch veraltete Plugins entstehen.

View file

@ -1,7 +1,7 @@
### Weblogsystem Jlog
### Programmiert von Jeena Paradies, Dennis Riehle, Robert Bienert
### Mailingliste: <jlog@googlegroups.com>
### Projektseite: <http://jeenaparadies.net/projects/jlog/>
### Projektseite: <https://github.com/jeena/jlog>
### Hilfe zur Installation:
### <http://jeenaparadies.net/projects/jlog/wiki/installation/basic-1.0>

View file

@ -1,12 +1,15 @@
<?php
ini_set("session.use_trans_sid", false);
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'proto.inc.php');
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"]));
header('Location: ' . proto() . "://$hostname" .
($path == '/' ? '' : $path) . '/login.php?url=' .
urlencode($_SERVER["REQUEST_URI"]));
exit;
}

147
admin/bbcode.php Normal file
View file

@ -0,0 +1,147 @@
<?php
include_once('.'.DIRECTORY_SEPARATOR.'auth.php');
define("JLOG_ADMIN", true);
require_once('..'.DIRECTORY_SEPARATOR.'personal'.DIRECTORY_SEPARATOR.'settings.inc.php');
$c['meta']['title'] .= "BBCode Anleitung";
$c['main'] .= output_admin_menu().'
<h2>BBCode Anleitung</h2>
<p><a href="#links">Links</a> | <a href="#betonung">Betonung</a> |
<a href="#bilder">Bilder</a> | <a href="#ueberschrift">Überschrift</a> |
<a href="#listen">Listen</a> | <a href="#zitate">Zitate</a> | <a href="#html">HTML</a>
</p>
<h3>Allgemein zu Zeilenumbrüchen, Absätzen und Leerzeichen</h3>
<p><kbd>[Enter]</kbd> im normalen Fließtext darf nur in Paaren vorkommen, wenn man
einen richtigen <em>Absatz</em> erzeugen will. Vor jedem
<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr> Element
muss zwei mal <kbd>[Enter]</kbd> gedrückt werden, da dies so zu sagen einen neuen
Absatz einleitet.
</p>
<p>Man sollte <em>nie</em> nur einen
Enter einzeln setzen, um die Breite des Textes zu bestimmen. Das macht
die Auszeichnungssprache <abbr title="Xtensible Hypertext Markup Language">XHTML</abbr>
nämlich von ganz alleine, je nachdem wie viel Platz der Besucher auf seinem Bildschirm
hat. Auch brauchst du keine Angst haben dass der Platz im Eingabefensterchen
nicht ausreicht, wenn du einen langen URL schreibst, das bricht auch automatisch um.
Bitte also keinen [Enter] vor einen URL setzen nur damit das in der neuen Zeile Anfängt.
</p>
<p><strong>Leerzeichen</strong> müssen vor und hinter jedes <abbr title="Elemente die keinen neuen Absatz erzeugen">inline</abbr> Element.
Innerhalb von <abbr title="Elemente die keinen neuen Absatz erzeugen">inline</abbr> Elementen dürfen Leerzeichen nur zwischen zwei Wörtern
stehen, niemals aber direkt hinter dem einleitenden Tag, also <em>niemals</em> so:<br />
<code>[url=http://exapmle.tld]<a href="#">[Leerzeichen]Beispiel Link</a>[Leerzeichen][/url]</code><br />
sondern in etwa so: <code>[url=http://example.tld]<a href="#">Beispiel Link</a>[/url]</code>.
</p>
<p>Die einzige Ausnahme dieser Regel ist, wenn man nur einen Teil eines Wortes als
etwas besonderes auszeichnen will. Dann macht man es zum Beispiel so:<br />
<code>Inter[url=http://communication.tld]kommunikation[/url]smanagment</code><br />
welches ergibt: <code>Inter<a href="#">kommunikation</a>smanagment</code>
</p>
<p>Vor einem Punkt ».« kommt niemals ein Leerzeichen, sondern immer dahinter.
</p>
<h3 id="links">Links (<abbr title="Elemente die keinen neuen Absatz erzeugen">inline</abbr>)</h3>
<ul>
<li>[url]<a href="http://example.com">http://example.com</a>[/url]</li>
<li>[url=http://example.com]<a href="http://example.com">Linkbeschreibung</a>[/url]</li>
</ul>
<h3 id="betonung">Betonung (<abbr title="Elemente die keinen neuen Absatz erzeugen">inline</abbr>)</h3>
<ul>
<li>[b]<strong>stark betont</strong>[/b]</li>
<li>[i]<em>leicht betont</em>[/i]</li>
</ul>
<h3 id="bilder">Bilder ( <abbr title="Elemente die keinen neuen Absatz erzeugen">inline</abbr> /
<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr> )</h3>
<p>Grundsätzlich wird ein Bild so eingefügt: <code>[img]1.jpg[/url]</code> und ist ein
<abbr title="Elemente die keinen neuen Absatz erzeugen">inline</abbr> Element. Bei dir macht
das ja sowieso das Script. Wenn du irgendwann ein Bild von einem anderen Server einfügen
möchtest dann musst du es so machen: <code>[url]http://example.tld/pfad/zum/Bild.jpg[/img]</code>
meistens ist das aber von anderen Webmastern nur sehr ungern gesehen. Bilder können noch drei
Attribute enthalten:</p>
<p><strong>Erstens:</strong>
<code>[img class="klassenname"]1.jpg[/img]</code> welches dem Bild eine Klasse mitgibt.
Man könnte z.B. eine Klasse <code>fr</code> in CSS so gestalten, dass Sie
das Bild rechts floaten lässt, oder eine Klasse <code>photo</code>, die allen
Photos einen Weißen Rahmen gibt usw. usf. Verschiedene Klassen sind durch Leerzeichen
zu trennen.</p>
<p><strong>Zweitens:</strong> <code>[img alt="Alternativ Text für das Bild"]1.jpg[/img]</code> welcher
eigentlich immer angegeben werden sollte. Er nutzt Suchmaschinen, die keine Bilder
sehen können und auch Menschen die keine Bilder sehen können, sei es dass sie
Blind sind, oder Bilder abschalten um schneller surfen zu können, oder dass Ihr
Browser keine Bilder anzeigen kann.</p>
<p><strong>Drittens:</strong> <code>[img caption="Eine Bildunterschrift"</code>]1.jpg[/img]
das Attribut <code>caption</code> ist anders als die anderen zwei. Es macht aus dem Bild
eine Definitionsliste und somit ein <abbr title="Elemente, die automatisch einen neue
Zeile anfangen">block</abbr> Element, der dann das <code>class</code> Attribut anstatt
dem Bild übergeben wird. Darüber Hinaus bekommt die Definitionsliste auch noch die Breite
des Bildes. Der ausgegebene HTML Code sieht dann in Etwa so aus:</p>
<p><code>
&nbsp;&lt;dl class="photo fr" style="width: 200px;"&gt;<br />
&nbsp;&nbsp;&lt;dt&gt;&lt;img alt="Ein Pferd" style="width: 200px; height: 150px;" /&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;dd&gt;Eine Bildunterschrift&lt;/dd&gt;<br />
&nbsp;&lt;/dl&gt;</code></p>
<p>Dies funktioniert nur bei Bildern, die über das Jlog hochgeladen wurden.</p>
<h4>Vollständig könnte das zum Beispiel so aussehen:</h4>
<p><code>[img class="fr" alt="Ein sehr großer Pferdekopf" caption="Mein Pferd ist das
schönste"]http://jeenaparadies.net/img/weblog/pferd.jpg[/img]</code></p>
<p>Bilder sollten aber mit Rücksicht auf die Benutzer mit kleinem Bildschirm/Fenster
und die Modembenutzer nicht all zu groß sein. Alles was breiter als 500px
ist, fängt an gefährlich zu werden.
</p>
<h3 id="ueberschrift">Überschrift (<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr>)</h3>
<div class="xmp">[headline]<h3>Überschrift erster Ordnung</h3>[/headline]</div>
<h3 id="listen">Listen (<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr>)</h3>
<p>Hier auch wichtig davor und dahinter eine Leerzeile zu lassen, damit das auch als
richtiger Absatz gesehen wird. Aber bitte hier auch keine unnötigen Leerzeichen
reinmachen.
</p>
<h4>Ungeordnete Liste (<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr>)</h4>
<p>[list]<br />
[*]erster Punkt<br />
[*]zweiter Punkt<br />
[*]dritter Punkt<br />
[/list]
</p>
<p>Ergibt:</p>
<ul class="xmp">
<li>erster Punkt</li>
<li>zweiter Punkt</li>
<li>dritter Punkt</li>
</ul>
<h4>Nummerierte Liste (<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr>)</h4>
<p>Genau so wie bei der ungeordneten, mit der Ausnahme, dass anstatt [list], [#list]
verwendet wird. Das Ergebniss sieht dann so aus:
</p>
<ol class="xmp">
<li>erster Punkt</li>
<li>zweiter Punkt</li>
<li>dritter Punkt</li>
</ol>
<h3 id="zitate">Zitate (<abbr title="Elemente, die automatisch einen neue Zeile anfangen">block</abbr>)</h3>
<p>Bitte nach [quote] kein Leerzeichen und auch keinen Zeilenumbruch ein fügen. Genau so
bei [/quote] keinen davor.
</p>
<blockquote class="xmp">
<p>[quote]Ich bin ein Zitat welches nur dazu da ist um zu zeigen wie
das alles hier so geht. Und aber auch dazu um zu zeigen dass es mehrere Zeilen
sein können.</p>
<p>Oder auch mehrere Absätze wie jetzt zum Beispiel hier.[/quote]</p>
</blockquote>
<h3 id="html">HTML</h3>
<p>Um normalen HTML Quelltext eingeben zu können, der von BBCode nicht behandelt wird,
kann man [html] verwenden. Dann muss man sich allerdings um alles selbst kümmern,
auch um Absätze und Zeilenumbrüche.</p>
';
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

View file

@ -2,6 +2,8 @@
// Untersuchen ob alles eingegeben wurde
function check_input($form_input) {
global $l;
$errors = array();
if(strlen(trim($form_input['topic'])) < 1) $errors[] = $l['admin']['no_headline'];
// checking URL
@ -29,8 +31,8 @@ global $l;
}
else {
$sql = "SELECT id FROM ".JLOG_DB_CONTENT." WHERE
YEAR(date) = ".date("Y", $f['date'])." AND
MONTH(date) = ".date("m", $f['date'])." AND
YEAR(date) = ".date("Y", strtotime($f['date']))." AND
MONTH(date) = ".date("m", strtotime($f['date']))." AND
url = '".$f['url']."';";
}
@ -54,7 +56,11 @@ global $l;
$errors[] = $l['admin']['false_teaserpic'];
}
if($form_input['teaserpiconblog'] == "1" AND strlen(trim($form_input['teaserpic'])) == 0) $errors[] = $l['admin']['no_teaserpic_uploaded'];
if(isset($form_input['teaserpiconblog']) && $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'];
@ -64,17 +70,31 @@ global $l;
// Eingabeformular
function form_output($form_input) {
$form_input = array_htmlspecialchars($form_input);
global $l, $categories, $plugins;
$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'";
if (isset($form_input['teaserpiconblog']) && $form_input['teaserpiconblog'] == 1)
$form_input['teaserpiconblog_check'] = "checked='checked'";
if (isset($form_input['section']) && $form_input['section'] == 'page') {
$page = " checked='checked'";
$weblog = '';
}
else {
$page = '';
$weblog = " checked='checked'";
}
if (isset($form_input['allowcomments']) && $form_input['allowcomments'] === '0')
$form_input['comments_check'] = "checked='checked'";
if (isset($form_input['allowpingback']) && $form_input['allowpingback'] === '0')
$form_input['pingback_check'] = "checked='checked'";
array_contains($form_input,
array('topic', 'url', 'teaser', 'keywords', 'categories',
'teaserpic', 'teaserpiconblog_check', 'comments_check',
'pingback_check', 'content', 'id', 'date'));
$o = "
<form method='post' id='entryform' action='".$_SERVER['SCRIPT_NAME']."' accept-charset='UTF-8'>
<form method='post' id='entryform' action='".htmlspecialchars($_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;
@ -141,16 +161,22 @@ 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>";
$output = "<h2 class='preview'>".$l['admin']['preview']."</h2>\n<div class='preview'>".do_entry($form_input, NULL, $form_input['section'])."</div>";
return $output;
}
function insert_blog($form_input) {
global $l, $plugins;
global $l, $plugins, $connect;
if($form_input['allowcomments'] != "0") $form_input['allowcomments'] = "1";
if($form_input['allowpingback'] != "0") $form_input['allowpingback'] = "1";
$form_input['allowcomments'] =
isset($form_input['allowcomments']) && $form_input['allowcomments'] == "0" ?
"0" : "1";
$form_input['allowpingback'] =
isset($form_input['allowpingback']) && $form_input['allowpingback'] == "0" ?
"0" : "1";
array_contains($form_input, array('teaserpiconblog'));
$form_input = escape_for_mysql($form_input);
$sql = "INSERT INTO ".JLOG_DB_CONTENT." (
@ -179,7 +205,7 @@ global $l, $plugins;
'".$form_input['allowpingback']."' );";
$writeblog = new Query($sql);
$id = mysql_insert_id();
$id = $connect->insert_id;
if($writeblog->error()) {
echo "<pre>\n";
echo $writeblog->getError();
@ -190,6 +216,7 @@ global $l, $plugins;
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";
$i = 0;
foreach($form_input['categories'] AS $category) {
if(++$i > 1) $sql .= ",\n";
$sql .= "( '".$category."', '".$id."')";
@ -236,10 +263,15 @@ global $l, $categories;
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";
if(!isset($form_input['allowcomments']) || $form_input['allowcomments'] != "0")
$form_input['allowcomments'] = "1";
if(!isset($form_input['allowpingback']) || $form_input['allowpingback'] != "0")
$form_input['allowpingback'] = "1";
$form_input = escape_for_mysql($form_input);
array_contains($form_input,
['teaserpiconblog', 'allowcomments', 'allowpingback']);
$sql = "UPDATE ".JLOG_DB_CONTENT." SET
topic = '".$form_input['topic']."',
url = '".$form_input['url']."',
@ -275,6 +307,7 @@ global $l, $plugins;
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";
$i = 0;
foreach($form_input['categories'] AS $category) {
if(++$i > 1) $sql .= ",\n";
$sql .= "( '".$category."', '".$form_input['id']."')";

View file

@ -10,6 +10,8 @@
$c['meta']['title'] = $l['admin']['cat_title'];
$c['main'] = output_admin_menu()."<h2>".$l['admin']['cat_title']."</h2>\n";
array_contains($get, array('action'));
switch ($get['action']) {
case 'new':
@ -25,7 +27,7 @@
$c['main'] .= $categories->output_form($form_input, 'new', $l['admin']['cat_new']);
}
}
else $c['main'] .= $categories->output_form(array('id' => NULL, 'name' => NULL, 'url' => NULL, 'description' => NULL), 'new', $l['admin']['cat_new']);
else $c['main'] .= $categories->output_form(array(), 'new', $l['admin']['cat_new']);
break;
case 'change':
@ -76,4 +78,3 @@
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

View file

@ -11,6 +11,8 @@
$c['main'] = output_admin_menu();
$c['main'] .= "<h2>".$l['admin']['change_headline']."</h2>";
array_contains($get, array('action'));
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');
@ -31,13 +33,17 @@ 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']) {
$formSubmitted = array_key_exists('form_submitted', $post);
if($formSubmitted && $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']) {
elseif($formSubmitted && $post['form_submitted'] == $l['admin']['publish'])
{
// Put data to database
if(!check_input($form_input)) {
$c['main'] .= "<p>".update_blog($form_input)."</p>";
@ -57,4 +63,3 @@ else {
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

View file

@ -5,14 +5,16 @@ 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']);
$get = strip($_GET);
$data = strip($_POST);
$mysql_id = isset($get['id']) ? escape_for_mysql($get['id']) : null;
$c['meta']['title'] = $l['admin']['kill_c_topic'];
$c['main'] = output_admin_menu();
$c['meta']['title'] = $l['admin']['kill_c_topic'];
$c['main'] = output_admin_menu();
if($get['action'] == 'trash' AND $data['trash'] == $l['admin']['yes']) {
array_contains($get, array('action'));
if($get['action'] == 'trash' AND $data['trash'] == $l['admin']['yes']) {
### Plugin Hook
$get['id'] = $plugins->callHook('deleteComment', $get['id']);
@ -80,138 +82,147 @@ elseif($get['action'] == 'change' AND !empty($get['id'])) {
$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 {
$form_submitted = false;
if (isset($data['form_submitted'])) {
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();
$form_submitted = true;
}
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');
}
$form_submitted = true;
}
}
if (!$form_submitted) {
$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;";
'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();
$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'];
$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();
$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']);
else {
$yl = new Year_Links($get['y'] ?? null, 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>";
$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,
$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;";
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();
$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>";
if(!empty($daten['email'])) {
$email_a = "<a href='mailto:".$daten['email']."'>";
$email_b = "</a>";
}
else {
$email_a = "";
$email_b = "";
else {
$email_a = "";
$email_b = "";
}
$comment = "
$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>";
<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>";
$c['main'] .= "
</table>";
}
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;

View file

@ -5,11 +5,12 @@
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']);
$yl = new Year_Links($get['y'] ?? null, 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'";
$year_menu = '';
}
else {
$show_section = "<strong>".$l['admin']['section_weblog']."</strong> | <a href='".add_session_id_to_url("?show=page")."'>".$l['admin']['section_page']."</a>";
@ -23,6 +24,8 @@
$c['meta']['title'] = $l['admin']['index_headline'];
if (!isset($c['main'])) $c['main'] = '';
$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>
@ -72,4 +75,4 @@
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
// eof
// eof

View file

@ -6,11 +6,12 @@
###
### adapted for Jlog by Jeena Paradies
ini_set("session.use_trans_sid", false);
ini_set('session.use_trans_sid', false);
define("JLOG_ADMIN", true);
define("JLOG_LOGIN", true);
define('JLOG_ADMIN', true);
define('JLOG_LOGIN', true);
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'proto.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
$false_password = "";
@ -43,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST' AND $dispatch_login) {
if ($path == $url) $url = $path . 'new.php';
if (!empty($url)) $path = $url;
header('Location: ' . add_session_id_to_url("http://".$hostname.$path));
header('Location: ' . add_session_id_to_url(proto().'://'.$hostname.$path));
exit;
}
else {
@ -55,15 +56,16 @@ else {
}
$c['meta']['title'] = $l['admin']['login_headline'];
$btnValue = htmlspecialchars($l['admin']['login_send']);
$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 class="userdata" id="password" type="password" name="password" '.NO_PASSWORD_FORM_LEAKS.'/>
<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'] : '') . '" />
<button value="' . $l['admin']['login_send'] . '">' . htmlspecialchars($l['admin']['login_send']) . '</button></p>
<button value="' . $btnValue . '">' . $btnValue . '</button></p>
</form>
';
@ -73,4 +75,3 @@ $c["main"] = $plugins->callHook('loginForm', $c["main"]);
require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;

View file

@ -3,14 +3,14 @@
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">
<!DOCTYPE html>
<html>
<head>
<title><?php echo $l['admin']['pic_choose_old'] ?></title>
<meta charset="UTF-8" />
<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>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
</head>
<body>
<h1><?php echo $l['admin']['pic_choose_old'] ?></h1>
@ -18,14 +18,17 @@
// 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">
if(isset($_GET['p'])) {
$p = htmlspecialchars($_GET['p']);
$btnSubmit = htmlspecialchars($l['admin']['pic_insert']);
?>
<p><img src="<?= JLOG_PATH ?>/img/<?= $p ?>" alt="" border="1" height="100"></p>
<form onSubmit="jlog_bbcode_img('<?= $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><button value="<?php echo $l['admin']['pic_insert'] ?>"><?php echo htmlspecialchars($l['admin']['pic_insert']) ?></button></p>
<p><button value="<?= $btnSubmit ?>"><?= $btnSubmit ?></button></p>
</form>
<?php
}
@ -43,9 +46,12 @@ else {
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";
foreach ($file as $filename => $ctime) {
$filename = htmlspecialchars($filename);
?><a href='?p=<?= $filename ?>'>
<img height="50" src="<?= JLOG_PATH ?>/img/<?= $filename ?>">
</a><?php
}
}
}

View file

@ -3,13 +3,26 @@
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">
<!DOCTYPE html>
<html>
<head>
<title><?php echo $l['admin']['pic_choose_old_teaser'] ?></title>
<meta charset="UTF-8" />
<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" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<script>
function selectImg(evt) {
opener.document.forms['entryform'].elements['teaserpic'].value = this.dataset.img;
window.close();
}
document.addEventListener('DOMContentLoaded', () => {
const btn = document.getElementsByTagName('button');
for (let i = 0; i < btn.length; ++i) {
btn[i].addEventListener('click', selectImg);
}
});
</script>
</head>
<body>
<h1><?php echo $l['admin']['pic_choose_old_teaser'] ?></h1>
@ -26,18 +39,16 @@ while (false !== ($filename = readdir ($handle))) {
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> ";
foreach($file as $filename => $ctime) {
$filename = htmlspecialchars($filename);
?><button type="button" data-img="<?= substr($filename, 2) ?>">
<img height="50" src="<?= JLOG_PATH ?>/img/<?= $filename ?>">
</button><?php
}
}
?>
</body>
</html>

View file

@ -9,77 +9,82 @@
$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">
<!DOCTYPE html>
<html>
<head>
<title><?php echo $l['admin']['pic_upload_header'] ?></title>
<meta charset="UTF-8" />
<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" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
</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 (isset($_FILES['probe'])) {
if ($_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 ($_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)) {
$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)) {
$btnSubmit = htmlspecialchars($l['admin']['pic_insert']);
?>
<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><button value="<?= $btnSubmit ?>"><?= $btnSubmit ?></button></p>
</form>
<?php
}
}
elseif($_FILES['probe']['error'] === 2) $errors[] = $l['admin']['pic_to_big'];
}
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><button value="<?php echo $l['admin']['pic_insert'] ?>"><?php echo htmlspecialchars($l['admin']['pic_insert']) ?></button></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))
{
$btnSubmit = htmlspecialchars($l['admin']['pic_upload']);
?>
<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>
<button value="<?php echo $l['admin']['pic_upload'] ?>"><?php echo htmlspecialchars($l['admin']['pic_upload']) ?></button>
<button value="<?= $btnSubmit ?>"><?= $btnSubmit ?></button>
</form>
<?php
}

View file

@ -9,81 +9,84 @@
$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">
<!DOCTYPE html>
<html>
<head>
<title><?php echo $l['admin']['pic_upload_teaser'] ?></title>
<meta charset="UTF-8" />
<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" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
</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 (isset($_FILES['probe'])) {
if ($_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 ($_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;
}
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']);
$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($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))
{
$btnSubmit = htmlspecialchars($l['admin']['pic_upload']);
?>
<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>
<button value="<?php echo $l['admin']['pic_upload'] ?>"><?php echo htmlspecialchars($l['admin']['pic_upload']) ?></button>
<button value="<?= $btnSubmit ?>"><?= $btnSubmit ?></button>
</form>
<?php
}

View file

@ -4,14 +4,22 @@
require_once('..'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
require(JLOG_BASEPATH.'admin'.DIRECTORY_SEPARATOR.'blog.func.php');
if (!isset($c))
$c = array('meta' => array('title' => ''));
$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']) {
if (!isset($_POST['form_submitted'])) {
// show form
$c['main'] .= form_output($form_input);
}
elseif($_POST['form_submitted'] == $l['admin']['preview']) {
$c['main'] .= error_output(check_input($form_input));
$form_input['date'] = time();
$c['main'] .= preview_output($form_input);
$c['main'] .= form_output($form_input);
}
@ -30,7 +38,7 @@ elseif($_POST['form_submitted'] == $l['admin']['publish']) {
}
// if(is_array($pingresult)) $c['main'] .= "\n<ul>".join($pingresult)."\n</ul>";
if($form_input['allowpingback'] != '0') {
if(isset($form_input['allowpingback']) && $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);
@ -76,7 +84,7 @@ function doPing($url) {
$url = parse_url($url);
$fp = @fsockopen($url['host'], 80, $errno, $errstr, $timeout);
if(!$fp) {
if(!$fp || preg_match('/\\s/', $url['host'])) {
$response = 'Fehler: '.$errstr.' ('.$errno.')<br />Es konnte keine Verbindung hergestellt werden';
} else {
$data_string = '<?xml version="1.0" encoding="iso-8859-1"?'.'>
@ -88,7 +96,7 @@ function doPing($url) {
</params>
</methodCall>';
$data_header = "POST ".$url['path']." HTTP/1.0\r\n".
"Host: $host\r\n".
"Host: {$url['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";

View file

@ -12,18 +12,19 @@
$handle = "";
$file = "";
$plugindirectory = JLOG_BASEPATH.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR;
$availablePlugins = '';
if(is_dir($plugindirectory)) {
$handle = opendir($plugindirectory);
while( false !== ( $file = readdir ($handle) ) ) {
if(substr($file, -10) === '.jplug.php') {
$pluginName = substr($file, 0, -10);
$pluginName = htmlspecialchars(substr($file, 0, -10));
$availablePlugins .= " <li><a href='".add_session_id_to_url("?jplug=".$pluginName)."'>".$pluginName."</a></li>\n";
}
}
closedir($handle);
if(!empty($availablePlugins)) {
if(strlen($availablePlugins) > 0) {
$availablePlugins = " <ul>\n".$availablePlugins." </ul>\n";
$title = $l['admin']['plugins_headline'];
}
@ -50,4 +51,3 @@
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

View file

@ -2,13 +2,19 @@
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$get = strip($_GET);
if(isset($get['cat'])) $cat_y_link = "cat=".$get['cat'];
$cat_y_link = isset($get['cat']) ? "cat=".$get['cat'] : '';
if (!isset($get['y'])) $get['y'] = null;
$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($c['main'])) $c['main'] = '';
if (!isset($c['meta'])) $c['meta'] = array();
if (!isset($c['meta']['aditionalheader'])) $c['meta']['aditionalheader'] = '';
$count = 0;
if(isset($get['cat'])) {
@ -64,7 +70,8 @@
$count = $_count['count'];
}
else {
if(!empty($get['m'])) $where_month = " AND MONTH(date) = '".escape_for_mysql($get['m'])."'";
$where_month = empty($get['m']) ? '' : " AND MONTH(date) = '".escape_for_mysql($get['m'])."'";
if (!isset($where_from)) $where_from = '';
$c['meta']['title'] = $l['content_archive_header'];
$c['main'] = "<h2>".$c['meta']['title']." ".$yl->get_selected_year()."</h2>";

View file

@ -1,15 +1,16 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
sleep(1); // XXX: Remove if not wanted
require_once(JLOG_BASEPATH.'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>";
$btnValue = htmlspecialchars($l['content_search']);
$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']).'" />
<button class="send" value="'.$l['content_search'].'">'.htmlspecialchars($l['content_search']).'</button></p>
<p><input class="userdata" type="text" name="q" size="30" value="'.htmlspecialchars($get['url'] ?? '').'" />
<button class="send" value="'.$btnValue.'">'.$btnValue.'</button></p>
</form>';
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');
echo $body;
?>

View file

@ -20,12 +20,14 @@
* $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) $
* $Date: 2009-01-04 18:22:36 +0100 (So, 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('scripts'.DIRECTORY_SEPARATOR.'proto.inc.php');
header('Location: '.proto()."://{$_SERVER['HTTP_HOST']}$dir/setup.php");
exit;
}
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');

4
lang/.htaccess Normal file
View file

@ -0,0 +1,4 @@
# .htaccess fuer Verzeichnisse, die nicht fuer die Oeffentlichkeit
# bestimmt sind:
Options -Indexes

2
lang/lang-admin.de.inc.php Normal file → Executable file
View file

@ -243,4 +243,4 @@
// Do not change the folowing line
);
// eof
// eof

2
lang/lang-admin.en.inc.php Normal file → Executable file
View file

@ -243,4 +243,4 @@
// Do not change the folowing line!
);
// eof
// eof

245
lang/lang-admin.inc.php Normal file
View file

@ -0,0 +1,245 @@
<?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_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_e404_path" => "Pfad zur Fehlerseite 404",
"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_content" => "Bitte Tabellennamen für Inhalte eingeben",
"e_db_comments" => "Bitte Tabellennamen für Kommentare eingeben",
"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" => "Bitte lösche jetzt die Datei 'setup.php' von deinem Webspace. Es ist sehr wichtig, sonst kann jeder dein Passwort ändern und hat vollen Zugang auf dein Weblog. Danach 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_mkdir" => "Es gibt ein Problem beim Erstellen notwendiger Verzeichnisse. Das Verzeichnis 'personal' muss Schreibrechte für das Setupscript besitzen, also <code>chmod 777</code>",
"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_successfull" => "Das Update ist gelungen. <a href='../'>Viel Spaß!</a>",
"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

2
lang/lang-admin.it.inc.php Normal file → Executable file
View file

@ -238,4 +238,4 @@
// Do not change the folowing line!
);
// eof
// eof

View file

@ -238,4 +238,4 @@
// Do not change the folowing line!
);
// eof
// eof

3
lang/lang.de.inc.php Normal file → Executable file
View file

@ -119,4 +119,5 @@
// do not change the folowing lines
)
); ?>
);
// eof

3
lang/lang.en.inc.php Normal file → Executable file
View file

@ -120,4 +120,5 @@
// do not change the folowing lines
)
); ?>
);
// eof

123
lang/lang.inc.php Normal file
View file

@ -0,0 +1,123 @@
<?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"=> "Kategorien",
"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",
"html_language" => "de",
"locale" => array('de_DE', 'de_DE@euro', 'de', 'deu_deu', 'german', 'ge', 'de-DE', 'de_DE.ISO8859-1', 'de_DE.ISO8859-15', 'de_DE.ISO_8859-15', 'de_DE.ISO_8859-15'),
"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
)
);
// eof

3
lang/lang.it.inc.php Normal file → Executable file
View file

@ -119,4 +119,5 @@
// do not change the folowing lines
)
); ?>
);
// eof

View file

@ -120,4 +120,4 @@
// do not change the folowing lines
)
);
// eof
// eof

View file

@ -1,122 +1,123 @@
<?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.",
<?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",
"html_language" => "sv",
"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
)
); ?>
"html_language" => "sv",
"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
)
);
// eof

View file

@ -1,6 +1,6 @@
<?php
require_once('.'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'prepend.inc.php');
$version = $_GET['v'];
$version = $_GET['v'] ?? '';
if($version == "small") {
echo "
@ -17,7 +17,7 @@ echo "
}
else {
$c['title'] = $l['bbtitle'];
$c['meta']['title'] = $c['title'] = $l['bbtitle'];
$c['main'] = $l['bbxmp'];
require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php');

22
log.php
View file

@ -18,8 +18,8 @@ if(!empty($sql_get['y']) AND !empty($sql_get['m']) AND !empty($sql_get['url']))
content, comments, allowpingback, section
FROM ".JLOG_DB_CONTENT."
WHERE
YEAR(date) = ".$sql_get['y']." AND
MONTH(date) = ".$sql_get['m']." AND
YEAR(date) = '".$sql_get['y']."' AND
MONTH(date) = '".$sql_get['m']."' AND
url = '".$sql_get['url']."' AND
section = 'weblog'
LIMIT 1";
@ -86,7 +86,11 @@ if(isset($com_form['form_submitted']) AND $com_form['form_submitted'] === $l['co
$countComments = 0;
while($commentsArray[] = $comments->fetch());
foreach($commentsArray as $tmp_comment) if($tmp_comment['type'] != 'pingback') ++$countComments;
foreach($commentsArray as $tmp_comment) {
if(!(isset($tmp_comment['type']) && $tmp_comment['type'] == 'pingback')) {
++$countComments;
}
}
$preview = "";
if(isset($error)) $preview .= error_output($error);
@ -119,7 +123,11 @@ elseif(isset($com_form['form_submitted']) AND $com_form['form_submitted'] == $l[
### Plugin Hook
$com_form = $plugins->callHook('newComment', $com_form, $blogentry);
if (!isset($com_form['sid'])) {
$c['form_content'] .= '<p class="error">Der Kommentar wurde nicht gespeichert.</p>';
}
else {
$com = escape_for_mysql($com_form);
if(!isset($com['mail_by_comment'])) $com['mail_by_comment'] = "";
@ -149,7 +157,7 @@ elseif(isset($com_form['form_submitted']) AND $com_form['form_submitted'] == $l[
)";
$newcomment = new Query($sql);
$cid = mysql_insert_id();
$cid = $connect->insert_id;
if($newcomment->error()) {
if($newcomment->getErrno() == 1062) {
$errors[] = $l['comments_duplicate'];
@ -224,12 +232,14 @@ elseif(isset($com_form['form_submitted']) AND $com_form['form_submitted'] == $l[
$mail->setText($text . $data['email']);
$mail = $plugins->callHook('commentorMail', $mail, $blogentry);
// send mail
$mail->send();
# XXX bugfix
$mail->send($data['email']);
}
}
$c['form_content'] .= "<p id='entryform'>".$l['comments_thx']."</p>".com_javascript_variables();
}
}
}
}
// If nothing happens

4
personal/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
# Jlog generated artifacts
*.inc
*.inc.php
*.xml*

4
personal/.htaccess Normal file
View file

@ -0,0 +1,4 @@
# .htaccess fuer Verzeichnisse, die nicht fuer die Oeffentlichkeit
# bestimmt sind:
Options -Indexes

View file

@ -26,3 +26,6 @@
#admin .hide { display: none; }
#admin-menu { position: relative; z-index: 2; }
#admin div.center {
overflow-x: scroll
}

View file

@ -1,34 +1,33 @@
/* additional hacks for IE
* TODO: Are they still necessary? (robertb)
* 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);
}
#container { /* IE max-width and PNG no-alpha hack */
height: 1%;
width: 750px;
width:expression(document.body.clientWidth>805?"800px":"auto");
}
#main { width: 63%; margin: 0 0 0 15px; }
#main { width: 63%; margin: 0 0 0 15px; }
ul.comments li {
overflow-x: scroll;
}
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;
}
#admin table { /* adapting the font size for IE 5.x */
font-size: 1em;
}
* html #main { width: 62.5%; margin: 0 0 0 15px; }
html + body #admin { /* close the hole in IE 5.0 */
margin: 0;
}
* 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;
}

View file

@ -31,4 +31,4 @@ blockquote {
padding: 0 1em 0.3em 1em;
margin: 0;
background: #eee url(/img/anfuehrungszeichen.png) 2% 1px no-repeat;
}
}

View file

@ -8,7 +8,7 @@
class MiniAntispam extends JlogPlugin {
function hook_commentForm($form) {
function hook_commentForm($form, $cf) {
$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.'" />';
@ -29,7 +29,7 @@ class MiniAntispam extends JlogPlugin {
$uid = '';
mt_srand((double)microtime()*1000000);
for($i=0; $i < $len; $i++) $uid .= $acceptedChars{ mt_rand(0, $maxchar) };
for($i=0; $i < $len; $i++) $uid .= $acceptedChars[mt_rand(0, $maxchar)];
return $uid;
}

18
robots.txt Normal file
View file

@ -0,0 +1,18 @@
# Sperre bestimmte Bots
User-agent: GPTBot
Disallow: /
# Sperre einige Jlog-Verzeichnisse + Datenschutzeinstellungen
User-Agent: *
Disallow: /admin
Disallow: /lang
Disallow: /plugins
Disallow: /scripts
# Sperre bestimmte Bilder aus
User-agent: *
Disallow: /img/t_*
Disallow: /img/JLOG_*
# Fuer weiteres siehe auch die .htaccess bzw. entsprechende Dateien
# in Unterverzeichnissen.

4
scripts/.htaccess Normal file
View file

@ -0,0 +1,4 @@
# .htaccess fuer Verzeichnisse, die nicht fuer die Oeffentlichkeit
# bestimmt sind:
Options -Indexes

View file

@ -43,7 +43,7 @@ class JlogUpdater
{
$html = '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post">'
. '<p>' . $l['admin']['e_admin_password'] . ': '
. '<input type="password" name="jlog_password" value="" />'
. '<input type="password" name="jlog_password" value="" '.NO_PASSWORD_FORM_LEAKS.'/>'
. '</p>';
$version = $this->getOldVersion();
while (isset($this->versions[$version])) {
@ -52,7 +52,8 @@ class JlogUpdater
$html .= $class->getForm($l);
$version = $this->versions[$version];
}
$html .= '<p><button name="update" value="' . $l['admin']['update_start'] . '">' . htmlspecialchars($l['admin']['update_start']) . '</button></p>';
$btnUpdate = htmlspecialchars($l['admin']['update_start']);
$html .= '<p><button name="update" value="' . $btnUpdate . '">' . $btnUpdate . '</button></p>';
$html .= '</form>';
return $html;
}

View file

@ -67,14 +67,17 @@ function do_bbcode_img ($action, $attributes, $content, $params, $node_object) {
}
$title = empty($attributes["title"]) ? "" : " title='".htmlspecialchars($attributes["title"])."'";
$class = '';
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." />";
if (strpos($content, 'http://') === 0 || strpos($content, 'https://') === 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." />";
$img = "<img src='".JLOG_PATH."/img/".htmlspecialchars($content)."'".$class." alt='".htmlspecialchars($attributes['alt'] ?? '')."' style='width: ".$img_width."px;'".$title." />";
}
if(isset($attributes['caption'])) {

View file

@ -6,7 +6,7 @@ class Categories {
var $categories = array();
var $l = array();
function Categories($l) {
function __construct($l) {
$this->l = $l;
@ -66,8 +66,9 @@ class Categories {
." <option value='no_categories'>".$this->l['admin']['no_categories']."</option>\n";
foreach($this->categories AS $id => $data) {
$selected = '';
if(is_array($catassign)) if(in_array($id, $catassign)) $selected = " selected='selected'";
else unset($selected);
else $selected = '';
$output .= " <option".$selected." value='".$id."'>".$data['name']."</option>\n";
}
@ -79,6 +80,8 @@ class Categories {
function output_rss($id) {
$ids = $this->get_assigned_categories($id);
$output = '';
if(is_array($ids)) {
foreach($ids AS $i) {
$output .= " <category>".$this->get($i, 'name')."</category>\n";
@ -89,12 +92,13 @@ class Categories {
function output_assigned_links($ids) {
if(!is_array($ids)) $ids = $this->get_assigned_categories($ids);
$output = '';
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>";
if(strlen($output) > 0) 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") {
@ -137,7 +141,9 @@ class Categories {
return $output;
}
function output_form($form_input = "", $action = 'new', $legend) {
function output_form($form_input = array(), $action = 'new', $legend) {
array_contains($form_input, ['name', 'url', 'id', 'description']);
$output = "
<form id='entryform' action='?action=".$action."' method='POST'>
<fieldset><legend>".$legend."</legend>
@ -247,4 +253,3 @@ class Categories {
return $errors;
}
}
?>

View file

@ -2,20 +2,24 @@
// call database class
class Query {
// Variablen
var $_conn;
var $_sql = "";
var $_result = 0;
var $_errno = 0;
var $_error = "";
//Konstruktor
function Query($sql)
function __construct($sql)
{
global $connect;
$this->_conn = $connect;
// Query in der Klasse speichern
$this->_sql = trim($sql);
$this->_result = mysql_query($this->_sql);
$this->_result = $this->_conn->query($this->_sql);
if(!$this->_result) {
$this->_errno = mysql_errno();
$this->_error = mysql_error();
$this->_errno = $this->_conn->errno;
$this->_error = $this->_conn->error;
}
}
@ -50,7 +54,7 @@
echo "An Error has occurred, please check your MySQL-Query.";
$return = null;
}
else $return = mysql_fetch_assoc($this->_result);
else $return = $this->_result->fetch_assoc();
return $return;
}
@ -58,14 +62,13 @@
if($this->error()) {
$return = -1;
}
else $return = mysql_num_rows($this->_result);
else $return = $this->_result->num_rows;
return $return;
}
function free() {
// Speicher freimachen
mysql_free_result($this->_result);
#mysql_free_result($this->_result);
}
}
?>

View file

@ -54,7 +54,7 @@ if(defined('JLOG_ADMIN')) {
$_search = array (
"<jlog:language />",
"<jlog:html-language />",
"<jlog:html-language />",
"<jlog:website />",
"<jlog:title />",
"<jlog:aditional-header />",
@ -82,7 +82,7 @@ $_search = array (
$_replace = array (
$l['language'],
$l['html_language'],
$l['html_language'],
htmlspecialchars(JLOG_WEBSITE, ENT_QUOTES),
htmlspecialchars($c['meta']['title']),
$c['meta']['aditionalheader'],

View file

@ -1,9 +1,20 @@
<?php
// Attributes for <input type="password"> to prevent password leaks to
// "intelligent" browser services if toggled to text for showing the password.
define('NO_PASSWORD_FORM_LEAKS', 'autocomplete="off" spellcheck="false" writingsuggestions="false"');
// get weblog link
function blog($date, $url, $section = 'weblog') {
if($section == 'weblog' OR $section == 'comment') {
$y = date("Y", $date);
$m = date("m", $date);
$matches = array();
if (preg_match('/^(\d{4})-(\d{2})/', $date, $matches)) {
$y = $matches[1];
$m = $matches[2];
}
else {
$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;
}
@ -27,12 +38,13 @@ function archive() {
// get year links
class Year_Links {
function Year_Links($get, $start, $page, $l, $cat="") {
function __construct($get, $start, $page, $l, $cat="") {
$date = getdate();
$this->_now = $date['year'];
$this->_start = $start;
$this->_page = $page;
$this->_l = $l;
$this->cat = '';
if(JLOG_CLEAN_URL === true) {
if($cat != "") {
list($tmp, $cat) = explode("=", $cat);
@ -46,7 +58,7 @@ class Year_Links {
}
function get_linklist() {
$years_links = '';
for($y = $this->_start; $y <= $this->_now; $y++) {
if($y != $this->_start) $years_links .= " | ";
if($y == $this->year) $years_links .= " <strong>".$y."</strong>";
@ -60,6 +72,7 @@ class Year_Links {
}
function get_admin_linklist() {
$years_links = '';
for($y = $this->_start; $y <= $this->_now; $y++) {
if($y != $this->_start) $years_links .= " | ";
@ -77,6 +90,10 @@ class Year_Links {
}
}
if (!function_exists('get_magic_quotes_gpc')) {
function get_magic_quotes_gpc() { return false; }
}
// kill Magic Quotes
function strip($_data) {
if (!get_magic_quotes_gpc()) return $_data;
@ -88,14 +105,11 @@ function strip($_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_real_escape_string($_data);
// uses last opened MySQL link implicitly
// assumption is valid because this function is never called
// before mysql_connect
global $connect;
if (is_array($_data)) foreach($_data as $key => $val) $_data[$key] = escape_for_mysql($val);
// FIXME deprecated
else $_data = $connect->real_escape_string($_data);
return $_data;
}
// htmlspecialchars a whole array
@ -140,7 +154,7 @@ 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'] != "") {
if(isset($data['teaserpic']) && $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";
}
@ -178,7 +192,11 @@ global $l, $bbcode, $categories, $plugins;
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']);
if($section == 'weblog') {
$output .= $l['content_posted']." ";
#$output .= is_int($data['date']) ? strftime(JLOG_DATE, $data['date']) : $data['date'];
$output .= strftime(JLOG_DATE, $data['date']);
}
$output .= $categories->output_assigned_links($data['id'])."</p>";
}
@ -186,8 +204,10 @@ global $l, $bbcode, $categories, $plugins;
$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'];
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(isset($data['comments']) && $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>";
}
@ -295,7 +315,7 @@ function my_serialize_cfg($arg) {
class JLOG_Tags {
var $tree = array();
function JLOG_Tags($body) {
function __construct($body) {
preg_match_all('/<jlog:([a-z]\w+)\s?([^>]*)\/?>(<\/(\1):(\2)>)?/ims', $body, $this->tree);
}
@ -319,6 +339,16 @@ class JLOG_Tags {
// security functions
function hashPassword($pw) {
// TODO: see iusses/2 for details
// TODO: see issues/2 for details
return md5($pw);
}
/**
*
*/
function array_contains(&$arr, $fields) {
foreach ($fields as $key) {
if (!isset($arr[$key]))
$arr[$key] = '';
}
}

View file

@ -12,7 +12,7 @@
class IXR_Value {
var $data;
var $type;
function IXR_Value ($data, $type = false) {
function __construct ($data, $type = false) {
$this->data = $data;
if (!$type) {
$type = $this->calculateType();
@ -132,7 +132,7 @@ class IXR_Message {
var $_currentTagContents;
// The XML parser
var $_parser;
function IXR_Message ($message) {
function __construct ($message) {
$this->message = $message;
}
function parse() {
@ -275,7 +275,7 @@ class IXR_Server {
var $callbacks = array();
var $message;
var $capabilities;
function IXR_Server($callbacks = false, $data = false) {
function __construct($callbacks = false, $data = false) {
$this->setCapabilities();
if ($callbacks) {
$this->callbacks = $callbacks;
@ -328,7 +328,7 @@ EOD;
}
$method = $this->callbacks[$methodname];
// Perform the callback and send the response
if (count($args) == 1) {
if ($args !== null && count($args) == 1) {
// If only one paramater just send that instead of the whole array
$args = $args[0];
}
@ -430,7 +430,7 @@ class IXR_Request {
var $method;
var $args;
var $xml;
function IXR_Request($method, $args) {
function __construct($method, $args) {
$this->method = $method;
$this->args = $args;
$this->xml = <<<EOD
@ -467,7 +467,7 @@ class IXR_Client {
var $debug = false;
// Storage place for an error message
var $error = false;
function IXR_Client($server, $path = false, $port = 80) {
function __construct($server, $path = false, $port = 80) {
if (!$path) {
// Assume we have been given a URL instead
$bits = parse_url($server);
@ -565,7 +565,7 @@ class IXR_Client {
class IXR_Error {
var $code;
var $message;
function IXR_Error($code, $message) {
function __construct($code, $message) {
$this->code = $code;
$this->message = $message;
}
@ -601,7 +601,7 @@ class IXR_Date {
var $hour;
var $minute;
var $second;
function IXR_Date($time) {
function __construct($time) {
// $time can be a PHP timestamp or an ISO one
if (is_numeric($time)) {
$this->parseTimestamp($time);
@ -639,7 +639,7 @@ class IXR_Date {
class IXR_Base64 {
var $data;
function IXR_Base64($data) {
function __construct($data) {
$this->data = $data;
}
function getXml() {
@ -651,7 +651,7 @@ class IXR_Base64 {
class IXR_IntrospectionServer extends IXR_Server {
var $signatures;
var $help;
function IXR_IntrospectionServer() {
function __construct() {
$this->setCallbacks();
$this->setCapabilities();
$this->capabilities['introspection'] = array(
@ -795,7 +795,7 @@ class IXR_IntrospectionServer extends IXR_Server {
class IXR_ClientMulticall extends IXR_Client {
var $calls = array();
function IXR_ClientMulticall($server, $path = false, $port = 80) {
function __construct($server, $path = false, $port = 80) {
parent::IXR_Client($server, $path, $port);
$this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
}
@ -814,4 +814,3 @@ class IXR_ClientMulticall extends IXR_Client {
}
}
?>

View file

@ -80,7 +80,7 @@ class PEAR
var $_error_class = 'PEAR_Error';
var $_expected_errors = array();
function PEAR($error_class = null)
function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
@ -111,7 +111,7 @@ class PEAR
}
}
function &getStaticProperty($class, $var)
static function &getStaticProperty($class, $var)
{
static $properties;
return $properties[$class][$var];
@ -122,7 +122,7 @@ class PEAR
$GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
}
function isError($data, $code = null)
static function isError($data, $code = null)
{
if (is_a($data, 'PEAR_Error')) {
if (is_null($code)) {
@ -136,7 +136,7 @@ class PEAR
return false;
}
function setErrorHandling($mode = null, $options = null)
static function setErrorHandling($mode = null, $options = null)
{
if (isset($this) && is_a($this, 'PEAR')) {
$setmode = &$this->_default_error_mode;
@ -229,7 +229,8 @@ class PEAR
}
}
function &raiseError($message = null,
// FIXME Strict Standards
static function &raiseError($message = null,
$code = null,
$mode = null,
$options = null,
@ -456,7 +457,7 @@ function _PEAR_call_destructors()
class PEAR_Error
{
function PEAR_Error($message = 'unknown error', $code = null,
function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
@ -619,16 +620,16 @@ class PEAR_Error
// | All rights reserved. |
// +-----------------------------------------------------------------------+
define('HTTP_REQUEST_METHOD_GET', 'GET', true);
define('HTTP_REQUEST_METHOD_HEAD', 'HEAD', true);
define('HTTP_REQUEST_METHOD_POST', 'POST', true);
define('HTTP_REQUEST_METHOD_PUT', 'PUT', true);
define('HTTP_REQUEST_METHOD_DELETE', 'DELETE', true);
define('HTTP_REQUEST_METHOD_OPTIONS', 'OPTIONS', true);
define('HTTP_REQUEST_METHOD_TRACE', 'TRACE', true);
define('HTTP_REQUEST_METHOD_GET', 'GET');
define('HTTP_REQUEST_METHOD_HEAD', 'HEAD');
define('HTTP_REQUEST_METHOD_POST', 'POST');
define('HTTP_REQUEST_METHOD_PUT', 'PUT');
define('HTTP_REQUEST_METHOD_DELETE', 'DELETE');
define('HTTP_REQUEST_METHOD_OPTIONS', 'OPTIONS');
define('HTTP_REQUEST_METHOD_TRACE', 'TRACE');
define('HTTP_REQUEST_HTTP_VER_1_0', '1.0', true);
define('HTTP_REQUEST_HTTP_VER_1_1', '1.1', true);
define('HTTP_REQUEST_HTTP_VER_1_0', '1.0');
define('HTTP_REQUEST_HTTP_VER_1_1', '1.1');
class HTTP_Request {
@ -658,7 +659,7 @@ class HTTP_Request {
var $_readTimeout = null;
var $_socketOptions = null;
function HTTP_Request($url = '', $params = array())
function __construct($url = '', $params = array())
{
$this->_sock = new Net_Socket();
$this->_method = HTTP_REQUEST_METHOD_GET;
@ -912,7 +913,7 @@ class HTTP_Request {
$this->_url = new Net_URL($redirect);
$this->addHeader('Host', $this->_generateHostHeader());
// Absolute path
} elseif ($redirect{0} == '/') {
} elseif ($redirect[0] == '/') {
$this->_url->path = $redirect;
// Relative path
@ -1123,7 +1124,7 @@ class HTTP_Response
var $_body = '';
var $_chunkLength = 0;
var $_listeners = array();
function HTTP_Response(&$sock, &$listeners)
function __construct(&$sock, &$listeners)
{
$this->_sock =& $sock;
$this->_listeners =& $listeners;
@ -1606,10 +1607,13 @@ class Net_URL
var $querystring;
var $anchor;
var $useBrackets;
/* FIXME Strict Standards vs. PHP 4
function Net_URL($url = null, $useBrackets = true)
{
$this->__construct($url, $useBrackets);
}
*/
function __construct($url = null, $useBrackets = true)
{
@ -1667,8 +1671,8 @@ class Net_URL
break;
case 'path':
if ($value{0} == '/') {
$this->path = $value;
if ($value[0] == '/') {
$this->path = $value;
} else {
$path = dirname($this->path) == DIRECTORY_SEPARATOR ? '' : dirname($this->path);
$this->path = sprintf('%s/%s', $path, $value);

View file

@ -1,30 +1,34 @@
<?php
// FIXME Strict Standards
// 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_commentForm ($t, $c) { 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_showComment($comment, $data, $nr) { return $comment; } // 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_doEntry($output /* entry */,
$dbData /* array with data from database */,
$cc /* string count comments */,
$section /* string section */) { return $output; }
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_adminForm($formHTML, $formData) { return $formHTML; } // admin formular
function hook_insertEntry($id, $form /* bereits escaped */) {} // int id + array with form data
function hook_updateEntry($id, $form) {} // 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_adminMail($mail, $blogentry, $id) { return $mail; } // 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_commentAdminList($comment, $data) { return $comment; } // 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; } //
@ -35,7 +39,7 @@ class JlogPlugin {
class JlogPluginManager {
var $plugins = array();
function JlogPluginManager($plugindirectory) {
function __construct($plugindirectory) {
$handle = "";
$file = "";
$this->get = strip($_GET);
@ -72,7 +76,7 @@ class JlogPluginManager {
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)))
if(isset($this->get['jplug']) && 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);
@ -80,4 +84,3 @@ class JlogPluginManager {
return $hookresult;
}
}
?>

View file

@ -20,7 +20,7 @@
* $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) $
* $Date: 2008-09-03 15:53:30 +0200 (Mi, 03. Sep 2008) $
*/
// load settings and version information
@ -62,20 +62,21 @@ require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'comments.php');
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);
$connect = new mysqli(JLOG_DB_URL, JLOG_DB_USER, JLOG_DB_PWD, 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'].".");
}
// select our database
$select = @mysql_select_db(JLOG_DB);
#$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=''");
$connect->set_charset('utf8');
$connect->query("SET NAMES utf8");
$connect->query("SET sql_mode=''");
// some more code that needs to run for every page - however, this
// code requires an established connection to the database
@ -88,4 +89,4 @@ $plugins = new JlogPluginManager(JLOG_BASEPATH.'plugins'.DIRECTORY_SEPARATOR);
$bbcode = $plugins->callHook('bbcode', $bbcode);
$bbcomments = $plugins->callHook('bbcomments', $bbcomments);
// eof
// eof

12
scripts/proto.inc.php Normal file
View file

@ -0,0 +1,12 @@
<?php
function proto() {
if (isset($_SERVER['REQUEST_SCHEME']))
return $_SERVER['REQUEST_SCHEME'];
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
return 'https';
return 'http';
}
// eof

File diff suppressed because it is too large Load diff

View file

@ -199,7 +199,7 @@ class StringParser {
*
* @access public
*/
function StringParser () {
function __construct () {
}
/**
@ -459,7 +459,7 @@ class StringParser {
// if yes, how should this be achieved? Another member of
// StringParser_Node?
$this->_setStatus (0);
$res = $this->_appendText ($this->_text{$topelem->occurredAt});
$res = $this->_appendText ($this->_text[$topelem->occurredAt]);
if (!$res) {
return false;
}
@ -568,7 +568,7 @@ class StringParser {
return false;
}
if (!$res) {
$res = $this->_appendText ($this->_text{$this->_cpos});
$res = $this->_appendText ($this->_text[$this->_cpos]);
if (!$res) {
return false;
}
@ -910,7 +910,7 @@ class StringParser_Node {
* occurred at. If not determinable, it is -1.
* @global __STRINGPARSER_NODE_ID
*/
function StringParser_Node ($occurredAt = -1) {
function __construct ($occurredAt = -1) {
$this->_id = $GLOBALS['__STRINGPARSER_NODE_ID']++;
$this->occurredAt = $occurredAt;
}
@ -1248,7 +1248,8 @@ class StringParser_Node {
* @param object $node The node to destroy
* @return bool True on success, else false.
*/
function destroyNode (&$node) {
// FIXME static added due to Strict Standards
static function destroyNode (&$node) {
if ($node === null) {
return false;
}
@ -1486,8 +1487,8 @@ class StringParser_Node_Text extends StringParser_Node {
* occurred at. If not determinable, it is -1.
* @see StringParser_Node_Text::content
*/
function StringParser_Node_Text ($content, $occurredAt = -1) {
parent::StringParser_Node ($occurredAt);
function __construct ($content, $occurredAt = -1) {
parent::__construct ($occurredAt);
$this->content = $content;
}

View file

@ -1053,12 +1053,12 @@ class StringParser_BBCode extends StringParser {
$ol = strlen ($output);
switch ($node->getFlag ('newlinemode.begin', 'integer', BBCODE_NEWLINE_PARSE)) {
case BBCODE_NEWLINE_IGNORE:
if ($ol && $output{0} == "\n") {
if ($ol && $output[0] == "\n") {
$before = "\n";
}
// don't break!
case BBCODE_NEWLINE_DROP:
if ($ol && $output{0} == "\n") {
if ($ol && $output[0] == "\n") {
$output = substr ($output, 1);
$ol--;
}
@ -1066,12 +1066,12 @@ class StringParser_BBCode extends StringParser {
}
switch ($node->getFlag ('newlinemode.end', 'integer', BBCODE_NEWLINE_PARSE)) {
case BBCODE_NEWLINE_IGNORE:
if ($ol && $output{$ol-1} == "\n") {
if ($ol && $output[$ol-1] == "\n") {
$after = "\n";
}
// don't break!
case BBCODE_NEWLINE_DROP:
if ($ol && $output{$ol-1} == "\n") {
if ($ol && $output[$ol-1] == "\n") {
$output = substr ($output, 0, -1);
$ol--;
}
@ -1449,10 +1449,13 @@ class StringParser_BBCode_Node_Paragraph extends StringParser_Node {
$f_begin = $this->_children[0]->getFlag ('newlinemode.begin', 'integer', BBCODE_NEWLINE_PARSE);
$f_end = $this->_children[0]->getFlag ('newlinemode.end', 'integer', BBCODE_NEWLINE_PARSE);
$content = $this->_children[0]->content;
if ($f_begin != BBCODE_NEWLINE_PARSE && $content{0} == "\n") {
if ($f_begin != BBCODE_NEWLINE_PARSE && $content[0] == "\n") {
$content = substr ($content, 1);
}
if ($f_end != BBCODE_NEWLINE_PARSE && $content{strlen($content)-1} == "\n") {
if ($f_end != BBCODE_NEWLINE_PARSE &&
strlen($content) > 0 &&
$content[strlen($content)-1] == "\n")
{
$content = substr ($content, 0, -1);
}
if (!strlen ($content)) {

View file

@ -105,6 +105,7 @@ $file['sub'] = JLOG_BASEPATH.'personal'.DIRECTORY_SEPARATOR.'subcurrent.inc';
}
$i = 0;
$errors = array();
foreach($file AS $d => $filename) {
if (is_writable($filename)) {

6
scripts/version.inc.php Normal file → Executable file
View file

@ -20,12 +20,12 @@
* $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) $
* $Date: 2009-01-13 21:58:12 +0100 (Di, 13. Jan 2009) $
*/
define('JLOG_SOFTWARE_VERSION', '1.1.3');
define('JLOG_SOFTWARE_URL', 'http://jeenaparadies.net/projects/jlog');
define('JLOG_SOFTWARE_URL', 'https://github.com/jeena/jlog');
define('JLOG_SOFTWARE_PHPV', '4.1.1');
define('JLOG_SOFTWARE_MYSQLV', '4.1.0');
// eof
// eof

View file

@ -5,16 +5,17 @@
$c['meta']['title'] = $l['content_search_header'];
$c['main'] = "<h2 class='search'>".$l['content_search_header']."</h2>";
$searchstring = strip($_GET['q']);
$searchstring = isset($_GET['q']) ? strip($_GET['q']) : '';
$btnValue = htmlspecialchars($l['content_search']);
$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).'" />
<button class="send" value="'.$l['content_search'].'">'.htmlspecialchars($l['content_search']).'</button></p>
<button class="send" value="'.$btnValue.'">'.$btnValue.'</button></p>
</form>
<script type="text/javascript">jlog_searchpage = true;</script>
';
if(!empty($searchstring)) {
if(strlen($searchstring) > 0) {
$sql_searchstring = escape_for_mysql($searchstring);

View file

@ -11,15 +11,16 @@
error_reporting(E_ALL ^ E_NOTICE);
header("Content-Type: text/html; charset=UTF-8");
// defining to avoid notifications
define("JLOG_NEW_VERSION", '1.1.0');
define("JLOG_SETUP", true);
define("JLOG_ADMIN", false);
$basepath = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
// defining to avoid notifications
require_once('scripts'.DIRECTORY_SEPARATOR.'proto.inc.php');
define("JLOG_WEBSITE", $_SERVER["HTTP_HOST"]);
define("JLOG_PATH", dirname("http://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]));
define("JLOG_PATH", dirname(proto()."://{$_SERVER["HTTP_HOST"]}{$_SERVER["SCRIPT_NAME"]}"));
// read prefered language from browser
$dir = opendir('.'.DIRECTORY_SEPARATOR.'lang');
@ -45,7 +46,7 @@
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_NEW_VERSION", JLOG_SOFTWARE_VERSION); // causes warning because of redefinition
define("JLOG_PHPV", JLOG_SOFTWARE_PHPV);
define("JLOG_MYSQLV", JLOG_SOFTWARE_MYSQLV);
@ -54,6 +55,8 @@
$l['admin']['submit'] = $l['admin']['s_install'];
$setup = new Settings($l);
$c = ''; // content to display
if($_POST) {
$setup->importDataByArray(strip($_POST));
@ -176,9 +179,14 @@
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'];
$connect = new mysqli($data['jlog_db_url'], $data['jlog_db_user'], $data['jlog_db_pwd'], $data['jlog_db']);
if($connect === false) {
$errors[] = "Falsche Zugangsdaten"; // mysqli_error is not available (?)
}
# FIXME
elseif(!version_compare($connect->server_version, JLOG_MYSQLV, ">=") == 1) {
$errors[] = $l['admin']['s_mysqlv_tolow'];
}
else {
new Query("SET NAMES utf8");
$create['content'] = new Query($sql['content']);
@ -224,11 +232,11 @@
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">
return '<!DOCTYPE html>
<html lang="'.JLOG_LANGUAGE.'
<title>SETUP Jlog ' . JLOG_NEW_VERSION . '</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="scripts/css/admin.css" type="text/css" />
<style type="text/css">
body {
@ -237,7 +245,7 @@
font-family: verdana, sans-serif;
font-size: 100.01%;
}
#container {
main {
font-size: 0.9em;
background: white;
padding: 20px;
@ -264,17 +272,17 @@
</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>
<main>
<h1><a href="https://github.com/jeena/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>
</main>
</body>
</html>';
}
function getlang ($allowed, $default) {
$string = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
if (empty($string)) {
$string = $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? null;
if (null === $string) {
return $default;
}

View file

@ -30,7 +30,7 @@ class Jlog_GetPingback {
var $title = ""; // string
var $sid = ""; // string
function Jlog_GetPingback($db_content, $db_comments, $path, $sid = NULL) {
function __construct($db_content, $db_comments, $path, $sid = NULL) {
$this->db_content = $db_content;
$this->db_comments = $db_comments;
$this->path = $path;
@ -191,7 +191,7 @@ class Jlog_SendPingback {
var $pageslinkedto = array();
var $useragent = "";
function Jlog_SendPingback($html, $pagelinkedfrom, $useragent) {
function __construct($html, $pagelinkedfrom, $useragent) {
// neet to prevent &amp; in url
$this->pagelinkedfrom = htmlspecialchars_decode($pagelinkedfrom);
$this->useragent = $useragent;