Browse Source

add feedback form mode

master
ivan 3 years ago
parent
commit
c6034244b8
4 changed files with 23 additions and 14 deletions
  1. +1
    -1
      LICENSE
  2. +4
    -3
      README
  3. +15
    -10
      index.php
  4. +3
    -0
      settings.php

+ 1
- 1
LICENSE 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.


+ 4
- 3
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:


+ 15
- 10
index.php View File

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


+ 3
- 0
settings.php 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 - все записи на одной странице


Loading…
Cancel
Save