Added striptags setting
This commit is contained in:
parent
6710a295d0
commit
8e3f90f6c0
27
index.php
27
index.php
|
@ -70,16 +70,29 @@ function AddEntry() {
|
||||||
global $GBlinkfield;
|
global $GBlinkfield;
|
||||||
global $GBsubjectfield;
|
global $GBsubjectfield;
|
||||||
global $GBcategoryfield;
|
global $GBcategoryfield;
|
||||||
$NewEntry[name]=$_POST['name'];
|
global $GBstriptags;
|
||||||
if ($GBcityfield) $NewEntry[from]=$_POST['from']; else $NewEntry[from]="";
|
if (!$GBstriptags) $NewEntry[name]=$_POST['name'];
|
||||||
if ($GBlinkfield) $NewEntry[link]=$_POST['link']; else $NewEntry[link]="";
|
else $NewEntry[name]=strip_tags($_POST['name']);
|
||||||
|
if ($GBcityfield) {
|
||||||
|
if (!$GBstriptags) $NewEntry[from]=$_POST['from'];
|
||||||
|
else $NewEntry[from]=strip_tags($_POST['from']);
|
||||||
|
} else $NewEntry[from]="";
|
||||||
|
if ($GBlinkfield) {
|
||||||
|
if (!$GBstriptags) $NewEntry[link]=$_POST['link'];
|
||||||
|
else $NewEntry[link]=strip_tags($_POST['link']);
|
||||||
|
} else $NewEntry[link]="";
|
||||||
$NewEntry[email]=$_POST['email'];
|
$NewEntry[email]=$_POST['email'];
|
||||||
if ($UploadedFile) $NewEntry[text]=$_POST['text']." <br><img src=\"$UploadedFile\">";
|
if (!$GBstriptags) $NewEntry[text]=$_POST['text'];
|
||||||
else $NewEntry[text]=$_POST['text'];
|
else $NewEntry[text]=strip_tags($_POST['text']);
|
||||||
|
if ($UploadedFile) $NewEntry[text]=$NewEntry[text]." <br><img src=\"$UploadedFile\">";
|
||||||
$NewEntry[datetime]=time();
|
$NewEntry[datetime]=time();
|
||||||
$NewEntry[response]="";
|
$NewEntry[response]="";
|
||||||
if ($GBsubjectfield) $NewEntry[subj]=$_POST['subj']; else $NewEntry[subj]="";
|
if ($GBsubjectfield) {
|
||||||
if ($GBcategoryfield) $NewEntry[category]=$_POST['category']; else $NewEntry[category]="";
|
if (!$GBstriptags) $NewEntry[subj]=$_POST['subj'];
|
||||||
|
else $NewEntry[subj]=strip_tags($_POST['subj']);
|
||||||
|
} else $NewEntry[subj]="";
|
||||||
|
if ($GBcategoryfield) $NewEntry[category]=strip_tags($_POST['category']);
|
||||||
|
else $NewEntry[category]="";
|
||||||
$NewEntry[parameters]="";
|
$NewEntry[parameters]="";
|
||||||
$fhandle=fopen($GBdata,"a");
|
$fhandle=fopen($GBdata,"a");
|
||||||
fputcsv($fhandle,$NewEntry);
|
fputcsv($fhandle,$NewEntry);
|
||||||
|
|
|
@ -13,7 +13,7 @@ $GBpassword="password";
|
||||||
$GBpagination=10; // pagination for entries, 0 - disabled
|
$GBpagination=10; // pagination for entries, 0 - disabled
|
||||||
$GBreadmore=255; // number of symbols for 'Read More' feature, 0 - shows full entries
|
$GBreadmore=255; // number of symbols for 'Read More' feature, 0 - shows full entries
|
||||||
$GBsearch=true; // enable or disable search bar
|
$GBsearch=true; // enable or disable search bar
|
||||||
$GBcaptcha=true; // enable or disable captcha
|
$GBcaptcha=false; // enable or disable captcha
|
||||||
$GBupload=true; // enable or disable upload image feature
|
$GBupload=true; // enable or disable upload image feature
|
||||||
$GBimagesize=1048576; // maximum image size
|
$GBimagesize=1048576; // maximum image size
|
||||||
$GBnotificationmailto=""; // leave empty if you don't want send notification
|
$GBnotificationmailto=""; // leave empty if you don't want send notification
|
||||||
|
@ -29,6 +29,7 @@ $GBcategoryfield=array(
|
||||||
3=>"Suppot",
|
3=>"Suppot",
|
||||||
4=>"Order",
|
4=>"Order",
|
||||||
5=>"Other");
|
5=>"Other");
|
||||||
|
$GBstriptags=true; // enable or disable strip tags function during adding new entry
|
||||||
$Titles[HeadTitle]="Guestbook";
|
$Titles[HeadTitle]="Guestbook";
|
||||||
$Titles[Page]="Guestbook";
|
$Titles[Page]="Guestbook";
|
||||||
$Titles[Name]="Your name";
|
$Titles[Name]="Your name";
|
||||||
|
|
|
@ -30,6 +30,7 @@ $GBcategoryfield=array(
|
||||||
3=>"Suppot",
|
3=>"Suppot",
|
||||||
4=>"Order",
|
4=>"Order",
|
||||||
5=>"Other");
|
5=>"Other");
|
||||||
|
$GBstriptags=true; // включение или отключение функции обрезания тегов при добавлении новой записи
|
||||||
$Titles[HeadTitle]="Гостевая книга";
|
$Titles[HeadTitle]="Гостевая книга";
|
||||||
$Titles[Page]="Гостевая книга";
|
$Titles[Page]="Гостевая книга";
|
||||||
$Titles[Name]="Ваше имя";
|
$Titles[Name]="Ваше имя";
|
||||||
|
|
Loading…
Reference in New Issue