PHP Classes

eXperience GuestBook: Application for users to send guestbook messages

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 37 All time: 10,991 This week: 81Up
Version License PHP version Categories
experience-guestbook 1.0Custom (specified...8PHP 5, Content management, Applications
Description 

Author

This package provides an application for users to send guestbook messages.

It presents Web pages allowing users to enter messages and their email address and country that will be stored in a MySQL database.

The application can also list the messages entered by the users replacing smiley characters with the respective icons.

Picture of Luca Liscio
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

 

Example

<?php
   
/*
     * index.php
     *
     * __ __ _
     * ___\ \/ /_ __ ___ _ __(_) ___ _ __ ___ ___
     * / _ \\ /| '_ \ / _ \ '__| |/ _ \ '_ \ / __/ _ \
     * | __// \| |_) | __/ | | | __/ | | | (_| __/
     * \___/_/\_\ .__/ \___|_| |_|\___|_| |_|\___\___|
     * |_| HZKnight free PHP Scripts
     *
     * lucliscio <lucliscio@h0model.org>, ITALY
     *
     * GuestBook Ver.1.0.0
     *
     * -------------------------------------------------------------------------------------------
     * Lincense
     * -------------------------------------------------------------------------------------------
     * Copyright (C)2022 HZKnight
     *
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU Affero General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     * GNU Affero General Public License for more details.
     *
     * You should have received a copy of the GNU Affero General Public License
     * along with this program. If not, see <http://www.gnu.org/licenses/agpl-3.0.html>.
     * -------------------------------------------------------------------------------------------
     */

    /**
     * Modulo di avvio dell'applicazione.
     *
     * @author lucliscio <lucliscio@h0model.org>
     * @version v 1.0.0
     * @copyright Copyright 2022 HZKnight
     * @license http://www.gnu.org/licenses/agpl-3.0.html GNU/AGPL3
     *
     * @package eXperience
     * @filesource
     */

    //Request
   
require_once "env/config.class.php";
    require
"env/exceptions.def.php";
    require_once
"env/dbmanager.class.php";
    require
"env/rain.tpl.class.php";
    require
"env/httprequest.class.php";
    require
"env/controller.class.php";
    require
"env/php7support.inc.php";
   
    include
"assets/lang/it_IT.php"; //default language
  
   
   
$config;
   
$db;
   
$view;
     
    try{
      
       
$config = new Config("./config.json");
       
$db = new DbManager($config->get_param('database'));
       
$req = new HttpRequest();
       
$app = new Controller();
      
       
RainTPL::$tpl_ext = "tpl";
       
RainTPL::$tpl_dir = "assets/templates/";
       
RainTPL::$cache_dir = "temp/templates_c/";
       
RainTPL::$path_replace = false;
       
$view = new RainTPL();
      
       
$view->assign("base_path", get_basePath());
       
$view->assign("ver", $config->get_param("version"));
       
$view->assign("title", $config->get_param("title"));
      
       
//Verifico se devo aggiungere l'action di default
       
if(!$req->has("action")){
           
$req->setParam("action", "guestbook");
        }

       
//Avvio l'aplicazione
       
$app->doService($req);
          
    } catch (
ConfigException $ex) {
        echo
$ex->getCode()." - ".$ex->getMessage()."<br><pre>".$ex->getTraceAsString()."</pre>";
    } catch (
PDOException $ex) {
        echo
$ex->getCode()." - ".$ex->getMessage()."<br><pre>".$ex->getTraceAsString()."</pre>";
    } catch (
Exception $ex) {
        echo
$ex->getCode()." - ".$ex->getMessage()."<br><pre>".$ex->getTraceAsString()."</pre>";
    }

    function
get_basePath(){
        return (
dirname($_SERVER['PHP_SELF']) == "/") ? dirname($_SERVER['PHP_SELF']) : dirname($_SERVER['PHP_SELF'])."/";
    }
?>


Details

#eXperiance GuestBook

Experience-GuestBook Release Pre-release) Lincense Issue Code Climate Open Source Love

Lincenses

  • eXperience GuestBook code ©2022 by HZKnight is licensed under AGPL 3.0
  • eXperience GuestBook User Guide and all related documentation ©2022 by HZKnight is licensed under CC BY 4.0

Descriprion

A small PHP Guestbook

Docker image: https://hub.docker.com/r/h0model/experience-guestbook


  Files folder image Files (170)  
File Role Description
Files folder image.github (1 directory)
Files folder image.vscode (1 file)
Files folder imagedoc (36 files, 1 directory)
Files folder imageDocker (4 files)
Files folder imagesrc (4 files, 5 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Dockerfile Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:37
This week:0
All time:10,991
This week:81Up