Giter Site home page Giter Site logo

baka-neko's Introduction

#Baka-neko

Minimalistic independent PHP CMS created for programmers. The CMS is meant to only include the most important functions to connect to a DB, to be secure and easy to use. The name is derived from Japanese and means "Foolish cat".

Getting started

It's suggested that you use something like Twig to handle templates. Baka-neko is NOT made to handle design.

As a note, file names that start with an underscore (_) should be hidden and not accessible by the public. You decide where it should be placed yourself and how to handle it, there is no good system to switch the file path right now, you have to change it in your files yourself.

Preparing the server

  1. Using MySQL (or your SQL of choice), insert db.sql (edit it as needed)
  2. Edit _config (lays in /php/) according to your DB setup

Congratulations! It should work, there's examples of a login (login.php) and update (updatePosts.php) using ajax in the /php/ and root folder.

##Support## ###_DB class### Important: Baka-neko does not escape HTML, you have to add it yourself.

  • Uses PDO, so it's easy to switch between different databases.
  • The class that handles connections (core) uses a singleton pattern so it's just included once
  • Uses prepared statements with dynamic input (look API)
  • Easy to access config file (_config.php)
  • Proper hashing (Implemented pbkdf2 in PHP with SHA256, credits in file)

##API## ###/php/ _DB.php ### Initiate with new i.e $thedatabase = new DB();

Login
Returns: Boolean true or false
Optional parameters: $table (returns to default from _config.php)
Usage: ->login($user, $pass, $table)
Example file: Login.php

Insert
Returns: String true or errorCode (might change to array like in dosql)
Optional parameters: $table (returns to default from _config.php)
Note: object to change.
Usage: ->insert($array, $table)
Example file: updatePosts.php

dosql
Returns: Array {status: true or false, result: false (on true) or errorCode}
Optional parameters: $table (returns to default from _config.php)
Note: Not secure against SQL injections, don't use on user inputs.
Usage: ->dosql($query)
Example file: index.php

/static/ Form.js

No API yet! Currently porting to class (form-class.js)

baka-neko's People

Watchers

Jon Brede Skaug avatar  avatar

Forkers

ncgordan

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.