Merge pull request #1046 from emanuele45/init_templates

Some templates work
If no connection, mysqli can't return errors... maybe a string then?

Signed-off-by: emanuele <emanuele45@gmail.com>
Mostly moving things around trying to make the two look the same (postgre class)

Signed-off-by: emanuele <emanuele45@gmail.com>
One less query in ProfileAccount

Signed-off-by: emanuele <emanuele45@gmail.com>
Another query out of ProfileAccount.controller and a bit of readability improvement I think

Signed-off-by: emanuele <emanuele45@gmail.com>
And now ProfileAccount.controller is query-free

Signed-off-by: emanuele <emanuele45@gmail.com>
A couple of queries out of ProfileHistory.controller too

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #1063 from emanuele45/db_rand

An error, some moving around of queries, etc.
Something I wanted to do since a long time: move each language to its own directory - backward compatibility included FTW

Signed-off-by: emanuele <emanuele45@gmail.com>
Fixed install and upgrade

Signed-off-by: emanuele <emanuele45@gmail.com>
This should take care of the admin panel and editing of languages

Signed-off-by: emanuele <emanuele45@gmail.com>