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. 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: Features:
- English, Arabic and Russian localization - English, Arabic and Russian localization
@ -14,6 +14,7 @@ Features:
- Replies - Replies
- Locked and sticky posts - Locked and sticky posts
- Special fields - Special fields
- Feedback form mode
Working examples: Working examples:
http://arabic.freecluster.eu 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) 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: Using:

View File

@ -233,16 +233,19 @@ function AddSearchBar() {
global $Titles; global $Titles;
global $GBsearch; global $GBsearch;
global $GBcategoryfield; global $GBcategoryfield;
if ($GBsearch) { global $GBfeedbackFormMode;
echo "<form action=index.php method=post>"; if (!$GBfeedbackFormMode) {
if ($GBcategoryfield) { if ($GBsearch) {
echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">"; echo "<form action=index.php method=post>";
echo "<datalist id=\"browsers\">"; if ($GBcategoryfield) {
foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">"; echo "<input type=text name=\"serachq\" value=\"\" maxlength=255 list=\"browsers\">";
echo "</datalist>"; echo "<datalist id=\"browsers\">";
} else echo "<input type=text name=\"serachq\" value=\"\" maxlength=255>"; foreach ($GBcategoryfield as $category) echo " <option value=\"",$category,"\">";
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">"; echo "</datalist>";
echo "</form>"; } else echo "<input type=text name=\"serachq\" value=\"\" maxlength=255>";
echo "<input type=submit name=\"search\" value=\"",$Titles["Search"],"\">";
echo "</form>";
}
} }
} }
@ -320,6 +323,8 @@ function EntriesView() {
global $GBcategoryfield; global $GBcategoryfield;
global $GBreplies; global $GBreplies;
global $GBstickylocked; global $GBstickylocked;
global $GBfeedbackFormMode;
if ($GBfeedbackFormMode) return;
if (isset($_SESSION["reply"])) { if (isset($_SESSION["reply"])) {
echo $Titles["Replying"],"<br>\n"; echo $Titles["Replying"],"<br>\n";
} }

View File

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