From c114da4e51f746427d2e027893d08f552762fd78 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 17 Aug 2014 23:02:56 +0200 Subject: [PATCH] added basic install script and readme --- README.md | 6 + config.php | 51 ++ ext/rain.tpl.class.php | 1043 ++++++++++++++++++++++++++++++++++++++++ install.php | 106 ++++ 4 files changed, 1206 insertions(+) create mode 100644 README.md create mode 100644 config.php create mode 100644 ext/rain.tpl.class.php create mode 100644 install.php diff --git a/README.md b/README.md new file mode 100644 index 0000000..0620890 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# 3words + +## Installation + +Edit `config.php` to your needs. Afterwards, run `install.php`. Make sure to +delete this file after installation. \ No newline at end of file diff --git a/config.php b/config.php new file mode 100644 index 0000000..6a5ed26 --- /dev/null +++ b/config.php @@ -0,0 +1,51 @@ +connect_errno) { + echo ''; +} + +// some useful functions +function gen_salt($length, $charset='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') { + $str = ''; + $count = strlen($charset); + while ($length--) { + $str .= $charset[mt_rand(0, $count-1)]; + } + return $str; +} + +function crypt_password ($pass, $salt) { + return crypt($pass, "$2y$08$" . $salt); +} + +// the +session_start(); + +if (!isset($notemplate)) { + require_once 'ext/rain.tpl.class.php'; + + raintpl::configure("path_replace", false); + raintpl::configure("tpl_dir", "views/"); + + $tpl = new RainTPL; +} \ No newline at end of file diff --git a/ext/rain.tpl.class.php b/ext/rain.tpl.class.php new file mode 100644 index 0000000..1b23ce6 --- /dev/null +++ b/ext/rain.tpl.class.php @@ -0,0 +1,1043 @@ +), stylesheet (), script (