From 5e9f25e430553a1253a124375cf642127aa15ba0 Mon Sep 17 00:00:00 2001 From: feder Date: Fri, 27 Jan 2017 13:28:04 +0300 Subject: [PATCH] Add notifications and new CSS --- README | 4 +- administration.php | 6 +- anthrstlsht.css | 166 +++++++++++++++++++++++++++++++++++++++++++++ index.php | 28 ++++++-- page.php | 9 ++- settings.php | 6 +- settings_ru.php | 6 +- 7 files changed, 211 insertions(+), 14 deletions(-) create mode 100644 anthrstlsht.css diff --git a/README b/README index b363173..6b4e32c 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ -PHPCSV Guestbook version 0.9 +PHPCSV Guestbook version 0.92 Simple php guestbook with csv file data storage. -PHPCSV Guestbook 0.9 requires PHP 5.0 or higher version. +PHPCSV Guestbook 0.92 requires PHP 5.0 or higher version. Installation: diff --git a/administration.php b/administration.php index b0f981d..53cf422 100644 --- a/administration.php +++ b/administration.php @@ -1,6 +1,6 @@ <?php echo $Titles[HeadTitle];?> + + +

+
diff --git a/anthrstlsht.css b/anthrstlsht.css new file mode 100644 index 0000000..5b093f9 --- /dev/null +++ b/anthrstlsht.css @@ -0,0 +1,166 @@ +/** + * anthrstlsht.css (another style sheet) v0.8 + * https://github.com/zlaxy/anthrstlsht + * DWTWL 2.5 license: https://soundragon.su/license/license.html + * fonts connection: http://font.ubuntu.com/web/ , for example: + * + */ + +html { + font-family: sans-serif; +} + +body { + margin: 0; + font-family: Ubuntu, sans-serif; + color: #222; +} + +.container { + width: 95%; + margin: auto; +} + +div.entry { + border: #eee solid 1px; + box-shadow: 4px 4px 10px #ddd; +} + +div.messages_header { + border-bottom: 1px solid #eee; +} + +font.text { + color: #000; + color: rgba(0, 0, 0, 0); +} + +h1, h2, h3, h4 { + margin-top: 0; + margin-bottom: 0; + font-weight: 500; +} + +h1 { + font-size: 3.6rem; +} + +h2 { + font-size: 3.2rem; +} + +h3 { + font-size: 2.6rem; +} + +h4 { + font-size: 2.0rem; +} + +hr { + border-width: 0; + border-top: 1px solid #bbb; +} + +p { + margin-top: 0; + margin-bottom: 0; +} + +img { + border: 0; +} + +.button, +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + padding: 0 20px; + color: #555; + text-align: center; + font-family: Ubuntu, sans-serif; + font-weight: 800; + line-height: 28px; + background-color: transparent; + border-radius: 6px; + border: 1px solid #bbb; + cursor: pointer; +} + +.button:hover, +button:hover, +input[type="button"]:hover, +input[type="reset"]:hover, +input[type="submit"]:hover, +.button:focus, +button:focus, +input[type="button"]:focus, +input[type="reset"]:focus, +input[type="submit"]:focus { + color: #333; + border-color: #999; + outline: 0; +} + +button[disabled], +html input[disabled] { + cursor: default; +} + +input[type="email"], +input[type="number"], +input[type="search"], +input[type="text"], +input[type="tel"], +input[type="url"], +input[type="password"], +textarea, +select { + height: 28px; + padding: 3px 5px; + border: 1px solid #bbb; + border-radius: 6px; + box-shadow: none; +} + +input[type="email"]:focus, +input[type="number"]:focus, +input[type="search"]:focus, +input[type="text"]:focus, +input[type="tel"]:focus, +input[type="url"]:focus, +input[type="password"]:focus, +textarea:focus, +select:focus { + border: 1px solid #888; + outline: 0; +} + +code { + font-family: monospace, monospace; + padding: .2rem .2rem; + font-size: 80%; + background: #eee; + white-space: pre; + border: 1px solid #ccc; + border-radius: 6px; +} + +ul { + list-style: circle; +} + +ol, ul, li { + margin-top: 0; + margin-bottom: 0; +} + +button, +.button, +input, +textarea, +select, +fieldset { + margin-bottom: .1rem; +} diff --git a/index.php b/index.php index cf84c9c..30667e8 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@
\n"; echo " $Titles[Email]: ($Titles[NotPublic])
\n"; echo " $Titles[Text]:
\n
\n"; - echo " $Titles[Captcha]: $captchanumber11$captchanumber11$captchanumber12 $Titles[CaptchaPlus] $captchanumber21$captchanumber22$captchanumber21 = ?
\n"; + echo " $Titles[Captcha]: $captchanumber11$captchanumber11$captchanumber12 $Titles[CaptchaPlus] $captchanumber21$captchanumber22$captchanumber21 = ?
\n"; echo " \n"; echo "\n"; if ($PageStatus=="emptyname") echo "$Titles[EmptyName]
\n"; @@ -73,16 +85,16 @@ function EntriesView() { else { $Entries=array_reverse($Entries); foreach($Entries as $e=>$Entry) { - echo " ",$Entry[7],". "; + echo "

",$Entry[7],". "; if ($Entry[2]) echo ""; echo "",$Entry[0],""; if ($Entry[2]) echo ""; if ($Entry[1]) echo " ",$Titles[From]," ",$Entry[1],""; - echo ", ",date("j.m.Y, H:i",$Entry[5]),", ",$Titles[Wrote],":
\n"; + echo ", ",date("j.m.Y, H:i",$Entry[5]),", ",$Titles[Wrote],":


\n"; echo " ",nl2br($Entry[4]),"
\n"; if ($Entry[6]) echo "
$Titles[Response]:
\n"; if ($Entry[6]) echo nl2br($Entry[6]),"

\n"; - echo "
\n"; + echo "

\n"; } } } @@ -91,8 +103,10 @@ if($_POST['submit']) { if(!$_POST['text']) $PageStatus="emptytext"; if(!$_POST['name']) $PageStatus="emptyname"; if(($_POST['name'])&&($_POST['text'])) - if ($_POST["captcha"]&&(md5(base64_encode($_POST["captcha"]))==$_SESSION["captcha"])) AddEntry(); - else $PageStatus="wrongcaptcha"; + if ($_POST["captcha"]&&(md5(base64_encode($_POST["captcha"]))==$_SESSION["captcha"])) { + AddEntry(); + if ($GBnotificationmailto) SendMail(); + } else $PageStatus="wrongcaptcha"; if (($PageStatus)&&!($PageStatus=="added")) { $SESSION["value"]["name"]=$_POST['name']; $SESSION["value"]["from"]=$_POST['from']; diff --git a/page.php b/page.php index c9d4ce4..d69e13e 100644 --- a/page.php +++ b/page.php @@ -1,17 +1,22 @@ +?> + <?php echo $Titles[HeadTitle];?> + + +

+
diff --git a/settings.php b/settings.php index 70b41ea..97ddf34 100644 --- a/settings.php +++ b/settings.php @@ -1,6 +1,6 @@ diff --git a/settings_ru.php b/settings_ru.php index ae683a8..528c05d 100644 --- a/settings_ru.php +++ b/settings_ru.php @@ -1,6 +1,6 @@