add feedback form mode

This commit is contained in:
ivan 2018-05-20 11:27:01 +03:00
parent 6b15e03ac4
commit c6034244b8
4 changed files with 23 additions and 14 deletions

View File

@ -1,4 +1,4 @@
phpcsvguestbook is released under the DWTW license
PHPCSV Guestbook is released under the DWTW license
This program is free software; you can redistribute it and/or modify it under the terms of the Do What Thou Wilt License.

7
README
View File

@ -1,6 +1,6 @@
PHPCSV Guestbook version 0.99.6
PHPCSV Guestbook version 0.99.8
Simple php guestbook with csv file data storage.
Simple php guestbook/feedback form with csv file data storage.
Features:
- English, Arabic and Russian localization
@ -14,6 +14,7 @@ Features:
- Replies
- Locked and sticky posts
- Special fields
- Feedback form mode
Working examples:
http://arabic.freecluster.eu
@ -30,7 +31,7 @@ Archive: https://github.com/zlaxy/phpcsvguestbook/archive/master.zip
2. Edit settings.php: change $GBadmin and $GBpassword (and other variables if necessary)
3. Check privileges for access to files: data storage (default: gbdb.csv) must have write permissions. If you enabled upload feature, 'upload' directory must have rwx permissions. Other files need only read rights.
3. Check privileges for access to files: data storage (default: .htgbdb.csv) must have write permissions. If you enabled upload feature, 'upload' directory must have rwx permissions. Other files need only read rights.
Using:

View File

@ -233,6 +233,8 @@ function AddSearchBar() {
global $Titles;
global $GBsearch;
global $GBcategoryfield;
global $GBfeedbackFormMode;
if (!$GBfeedbackFormMode) {
if ($GBsearch) {
echo "<form action=index.php method=post>";
if ($GBcategoryfield) {
@ -245,6 +247,7 @@ function AddSearchBar() {
echo "</form>";
}
}
}
function SinlgeEntry($Entry) {
global $Titles;
@ -320,6 +323,8 @@ function EntriesView() {
global $GBcategoryfield;
global $GBreplies;
global $GBstickylocked;
global $GBfeedbackFormMode;
if ($GBfeedbackFormMode) return;
if (isset($_SESSION["reply"])) {
echo $Titles["Replying"],"<br>\n";
}

View File

@ -10,6 +10,9 @@ $GBdata=".htgbdb.csv";
$GBadmin="root";
$GBpassword="password";
$GBfeedbackFormMode=false; // feedback form mode (does not show any records)
// نموذج التعليقات (لا تظهر أي سجلات)
// режим формы обратной связи (не показывать опубликованные записи)
$GBpagination=10; // pagination for entries, 0 - disabled
// عدد الإدخالات في الصفحة الواحدة, 0 - معطل
// количество записей на странице, 0 - все записи на одной странице