Git Product home page Git Product logo

sarabanda-latina's Introduction

SarabandaLatina

Web application to manage video courses of a cuban latin dance school. It is written mostly in italian, is completely responsive and it uses:

  • Front end: AngularJS, HTML, CSS
  • Back end: PHP
  • Database: MySQL

File structure

  • root HTML pages
  • ajax PHP files, used as back end, these are the files called by JS to connect with the DB
  • config Here are the files to configure the application
  • css Only css files
  • file In this folder there are files created by the application, uploaded by the administrator
  • img All images, icons and logos of the site
  • js Only javascript files
  • lib All libraries used by the application

Libraries

  • AngularJS It is a JavaScript-based web framework for developing single-page applications.
  • AngularJS Material It provides a set of reusable and accessible UI components for AngularJS
  • ngStorage An AngularJS module that makes Web Storage working in the Angular Way

Database

The database was designed for MySQL, it has these tables:

  • tabella_file Table contains files uploaded by the administrator. It cointains only information, the real files are saved in the filesystem, into the folder file
  • utenti All users registered on the web application

Configuration

In the config folder there are 2 files that are used to configure the application to connect correctly with the frontend, backend and DB

  • config.js It is used to connect Javascript with PHP throw ajax calls.
    It consider if the current url starts with http or https protocol, and if contains www or not, then add the backend address

    var url_location = window.location;
    var http_https = "https://";
    var www = "";
    
    if (url_location.protocol) {
      http_https = url_location.protocol + "//";
    }
    
    if (url_location.host.startsWith("www.")) {
      www = "www.";
    }
    
    var url = http_https + www + "sarabandalatina.it/"; // edit this line: address url of the application
  • config.php This file is inluded at the start of each php file.
    It is used to configure general PHP settings and the connection with DB:

    • variables to connect to DB
    • connection to DB
    • start session
    // connection data
    $server = "localhost";            // edit this line: server address
    $username = "sarabandalatina";    // edit this line: username
    $password = "sarabandalatina";    // edit this line: password
    $db = "sarabandalatina";          // edit this line: name of the database
    
    // start connection to DB
    try {
        $dbh = new PDO("mysql:host=$server;dbname=$db", $username, $password);
        $dbh->exec("set names utf8");
    }
    catch (PDOException $e) {
        echo "Connessione database fallita: " . $e->getMessage() . "\n";
        exit;
    }
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    
    // start session
    if (session_status() == PHP_SESSION_NONE) {
        session_start();
    }

Screenshots

sarabandalatina altervista org_ sarabandalatina altervista org_home html sarabandalatina altervista org_home(mobile) html

sarabanda-latina's People

Contributors

davide-murro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.