From 26f06632c0772f79770f7561ede5fd7410f072a5 Mon Sep 17 00:00:00 2001 From: Alan Kawamara Date: Tue, 23 May 2017 08:24:48 +0300 Subject: [PATCH] Added installer --- setup/.htaccess | 5 + setup/functions.php | 293 ++++++++ setup/img/logo.png | Bin 0 -> 5867 bytes setup/img/no.png | Bin 0 -> 450 bytes setup/img/yes.png | Bin 0 -> 411 bytes setup/index.php | 26 + setup/install.php | 160 +++++ setup/license.html | 30 + setup/modrewrite.php | 10 + setup/safe_config.php | 61 ++ setup/script.js | 52 ++ setup/sql/sampledata.sql | 200 ++++++ setup/sql/structure.sql | 945 ++++++++++++++++++++++++++ setup/style.css | 253 +++++++ setup/templates/configuration.tpl.php | 81 +++ setup/templates/finish.tpl.php | 40 ++ setup/templates/pre_install.tpl.php | 120 ++++ 17 files changed, 2276 insertions(+) create mode 100644 setup/.htaccess create mode 100644 setup/functions.php create mode 100644 setup/img/logo.png create mode 100644 setup/img/no.png create mode 100644 setup/img/yes.png create mode 100644 setup/index.php create mode 100644 setup/install.php create mode 100644 setup/license.html create mode 100644 setup/modrewrite.php create mode 100644 setup/safe_config.php create mode 100644 setup/script.js create mode 100644 setup/sql/sampledata.sql create mode 100644 setup/sql/structure.sql create mode 100644 setup/style.css create mode 100644 setup/templates/configuration.tpl.php create mode 100644 setup/templates/finish.tpl.php create mode 100644 setup/templates/pre_install.tpl.php diff --git a/setup/.htaccess b/setup/.htaccess new file mode 100644 index 0000000..51f1a35 --- /dev/null +++ b/setup/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine On + RewriteBase /setup/ + RewriteRule ^modrewrite.test*$ modrewrite.php [L] + \ No newline at end of file diff --git a/setup/functions.php b/setup/functions.php new file mode 100644 index 0000000..cdde2b8 --- /dev/null +++ b/setup/functions.php @@ -0,0 +1,293 @@ + +'; + echo ''.$aDir .CMS_DS.''; + echo ''; + echo is_writable(DDPBASE.$aDir) ? 'Writeable' : 'Unwriteable'; + echo ''; + echo ''; + } + + /** + * sanitize() + * + * @param mixed $string + * @param bool $trim + * @return + */ + function sanitize($string, $trim = false) + { + $string = filter_var($string, FILTER_SANITIZE_STRING); + $string = trim($string); + $string = stripslashes($string); + $string = strip_tags($string); + $string = str_replace(array('‘','’','“','”'), array("'","'",'"','"'), $string); + if($trim) + $string = substr($string, 0, $trim); + + return $string; + } + + /** + * parse_mysql_dump() + * + * @param mixed $filename + * @param mixed $dblink + * @return + */ + function parse_mysql_dump($filename, $dblink) + { + global $success, $msg; + + $templine = ''; + $lines = file($filename); + foreach ($lines as $line_num => $line) { + if (substr($line, 0, 2) != '--' && $line != '') { + $templine .= $line; + if (substr(trim($line), -1, 1) == ';') { + if (!mysqli_query($dblink, $templine)) { + $success = false; + $msg = "
'" . mysqli_errno($dblink) . " " . mysqli_errno($dblink) . "' during the following query:
+
{$templine}
"; + } + $templine = ''; + } + + } + } + } + + /** + * testModRewrite() + * + * @return + */ + function testModRewrite() + { + global $script_path; + + if ($script_path == "/") + $script_path = ""; + + if ($content = @file_get_contents(".htaccess")) { + $content = str_replace("RewriteBase /setup/", "RewriteBase " . $script_path . "/setup/", $content); + if (is_writable(".htaccess")) { + $continue = true; + } else { + if (@chmod(".htaccess", 0755)) { + $continue = true; + } else { + $continue = false; + } + } + if ($continue) { + if ($handle = @fopen(".htaccess", "w")) { + @fwrite($handle, $content); + @fclose($handle); + } + @chmod(".htaccess", 0644); + } + } + } + + /** + * writeConfigFile() + * + * @param mixed $host + * @param mixed $username + * @param mixed $password + * @param mixed $name + * @return + */ + function writeConfigFile($host, $username, $password, $name) + { + + $content = ""; + + $confile = '../lib/config.ini.php'; + if (is_writable('../lib/')) { + $handle = fopen($confile, 'w'); + fwrite($handle, $content); + fclose($handle); + $success = true; + } else { + $success = false; + } + } + + /** + * safeConfig() + * + * @param mixed $host + * @param mixed $username + * @param mixed $password + * @param mixed $name + * @return + */ + function safeConfig($host, $username, $password, $name) + { + $content = ""; + + return $content; + } + + /** + * cmsHeader() + * + * @return + */ + function cmsHeader() + { + echo ''; + echo ''; + echo ''; + echo ''; + echo 'Mem - Quickstart'; + echo ''; + echo ' '; + echo ''; + echo '
'; + } + + + /** + * cmsFooter() + * + * @return + */ + function cmsFooter() + { + global $err; + + echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + } +?> \ No newline at end of file diff --git a/setup/img/logo.png b/setup/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d412111071cd6ab01ddd535052406ce4ec079949 GIT binary patch literal 5867 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 I1$T@2A6nju6aWAK literal 0 HcmV?d00001 diff --git a/setup/img/no.png b/setup/img/no.png new file mode 100644 index 0000000000000000000000000000000000000000..9cd4f32a8cfa8524c6585051693e0348d4a7aec9 GIT binary patch literal 450 zcmV;z0X_bSP)2iT==7?7fi=s|RmOWGrL-UB}cz6?99hS=qt_R)n#O_GE{Y_{b&<@B`K zmfyg%k_J9jVA^cUuT;|0<{>{v2uUOW%V{4TwJ%Ozobn|%U0LKKA%U}CaFQ`{|nClM=2j5$E;5KW`+XG2s(y@`jKf*oQd zkW|CPr2$o9mY9K?{1AIgA{>yKLMY^Bqj-#~#B4?#d61gH0l@zLczoAb+8Z>I9nUf2 sLQ-ibQO)e|mjCnp>)3d&b@w5}e-i*pLEpO%I{*Lx07*qoM6N<$f*C}|+W-In literal 0 HcmV?d00001 diff --git a/setup/img/yes.png b/setup/img/yes.png new file mode 100644 index 0000000000000000000000000000000000000000..663c68e7b6a3deb0ec94a6128f5da7abf8cac9d5 GIT binary patch literal 411 zcmV;M0c8G(P)W*Zf|)poc~C6-o_iHNJ#PH3)Yx7r|Nl`x@E_ zCz9~=c$N@1rO-!sz1K_sV1QPt+kk_nxqX?u-wVeW;2GWVri05E;AH>+002ovPDHLk FV1l25#GwEH literal 0 HcmV?d00001 diff --git a/setup/index.php b/setup/index.php new file mode 100644 index 0000000..51c2c74 --- /dev/null +++ b/setup/index.php @@ -0,0 +1,26 @@ + +" + . "" + . "Note:The config file is missing, therefore installation cannot commence."); + } + } else { + die("
" + . "" + . "Note: The file config.ini.php already exists.
If you want to reinstall Membao, first delete config.ini.php
"); + } +?> \ No newline at end of file diff --git a/setup/install.php b/setup/install.php new file mode 100644 index 0000000..b4ad925 --- /dev/null +++ b/setup/install.php @@ -0,0 +1,160 @@ + +'; + } + + if (!mysqli_select_db($link, $_POST['dbname'])) { + $error = true; + $msg .= 'Could not select database ' . sanitize($_POST['dbname']) . ': ' . mysqli_error($link); + } + + /** Writing to database **/ + if (!$error) { + mysqli_query($link, "CREATE DATABASE `" . $_POST['dbname'] . "`;"); + mysqli_select_db($link, $_POST['dbname']); + + $success = true; + parse_mysql_dump("sql/structure.sql", $link); + + if ($success) + writeConfigFile($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpwd'], $_POST['dbname']); + + if ($script_path == "/") + $script_path = ""; + + if ($content = @file_get_contents("../.htaccess")) { + if (!stristr($content, "RewriteBase " . $script_path . "/")) { + $content = str_replace("RewriteBase /", "RewriteBase " . $script_path . "/", $content); + $content = str_replace("ErrorDocument 404 /404.php", "ErrorDocument 404 " . $script_path . "/404.php", $content); + if (is_writable("../.htaccess")) { + $continue = true; + } else { + if (@chmod("../.htaccess", 0755)) { + $continue = true; + } else { + $continue = false; + } + } + if ($continue) { + if ($handle = @fopen("../.htaccess", "w")) { + @fwrite($handle, $content); + @fclose($handle); + } + @chmod("../.htaccess", 0644); + } + } + } + } + + if (!$error && isset($_POST['install_data'])) { + $success = true; + parse_mysql_dump("sql/sampledata.sql", $link); + if (!$success) { + $msg = "Error in adding demo data
The installation can continue, but the application will be blank, without any data."; + } + } + + $user = (isset($_POST['admin_username'])) ? $_POST['admin_username'] : ""; + $pass = (isset($_POST['admin_password'])) ? sanitize($_POST['admin_password']) : ""; + $modrew = (isset($_COOKIE['modrew']) == "true") ? 1 : 0; + $url = (isset($_POST['site_url'])) ? $_POST['site_url'] : ""; + $sdir = (isset($_POST['site_dir'])) ? $_POST['site_dir'] : ""; + $sitename = (isset($_POST['site_name'])) ? $_POST['site_name'] : ""; + $company = (isset($_POST['company'])) ? $_POST['company'] : ""; + $site_email = (isset($_POST['site_email'])) ? $_POST['site_email'] : ""; + + mysqli_query($link, "INSERT INTO `users` (id, username, password, email, fname, lname, created, userlevel, active) + VALUES ('1','" . sanitize($user) . "','" . sha1($pass) . "','" . sanitize($site_email) . "','App', 'Admin',NOW(),'9','y')"); + + mysqli_query($link, "UPDATE `settings` SET + site_name = '" . sanitize($sitename) . "', + company = '" . sanitize($company) . "', + site_url = '" . sanitize($url) . "', + site_dir = '" . sanitize($sdir) . "', + site_email = '" . sanitize($site_email) . "', + seo ='" . $modrew . "'"); + + mysqli_close($link); + + if (!$error) { + if (!file_exists("../lib/config.inc.php")) { + cmsHeader(); + include ("templates/finish.tpl.php"); + cmsFooter(); + exit; + } + } + } + } + +?> + + + \ No newline at end of file diff --git a/setup/license.html b/setup/license.html new file mode 100644 index 0000000..75ea10d --- /dev/null +++ b/setup/license.html @@ -0,0 +1,30 @@ + + + + +License agreement + + + + + +

Thank you for choosing Digital Downloads Pro
+ Copyright WoJo Scripts! 2010
+ www.wojoscripts.com

+

At WoJo Scripts! we exercise a very simple and flexible license/usage
+policy. Please read the FAQ below:

+

-------------------------------------------------------------------------------------
+ Q. Am I allowed to install Digital Downloads Pro on more than one of my domains?

+

A. Yes you are. But you may only install Digital Downloads Pro on domains that you own.
+ -------------------------------------------------------------------------------------
+ Q. Can I resell or redistribute Digital Downloads Pro

+

A. No. You must not resell or in any way redistribute Digital Downloads Pro
+ -------------------------------------------------------------------------------------
+Thank you for supporting us!

+

Digital Downloads Pro
+ Copyright 2010 WoJo Scripts!
+www.wojoscripts.com

+ + \ No newline at end of file diff --git a/setup/modrewrite.php b/setup/modrewrite.php new file mode 100644 index 0000000..98526c4 --- /dev/null +++ b/setup/modrewrite.php @@ -0,0 +1,10 @@ + + \ No newline at end of file diff --git a/setup/safe_config.php b/setup/safe_config.php new file mode 100644 index 0000000..8cb23e0 --- /dev/null +++ b/setup/safe_config.php @@ -0,0 +1,61 @@ + +"; + +echo $content; + +?> \ No newline at end of file diff --git a/setup/script.js b/setup/script.js new file mode 100644 index 0000000..d02def1 --- /dev/null +++ b/setup/script.js @@ -0,0 +1,52 @@ + function getXMLHttpRequestObject() { + var xmlobj; + try { + //Native support: Gecko,Opera,IE7,Safari etc + xmlobj = new XMLHttpRequest(); + } catch(e) { + try { + //ActiveX support: IE6 + xmlobj = new ActiveXObject("Msxml2.XMLHTTP"); + } catch(e) { + try { + //ActiveX support: IE5.5,IE5 + xmlobj = new ActiveXObject("Microsoft.XMLHTTP"); + } catch(e) { + //Ajax not supported + xmlobj = null; + return false; + } + } + } + return xmlobj; + } + + //Request url content + function requestContent(url) { + xmlHttpRequest.open("GET", url, true); + xmlHttpRequest.onreadystatechange = statusListener; + xmlHttpRequest.send(null); + } + + function statusListener() { + if (xmlHttpRequest.readyState == 4) { + if (xmlHttpRequest.status == 200) { + document.getElementById('modrewcont').innerHTML = 'AvailableUnavailable'; + var today = new Date(); + var the_cookie_date = new Date(today.getTime() + (1000 * 60 * 60)); + var the_cookie = "modrew=false"; + var the_cookie = the_cookie + ";expires=" + the_cookie_date; + document.cookie = the_cookie; + } + } + } + + xmlHttpRequest = getXMLHttpRequestObject(); + document.onload = requestContent("modrewrite.test?nocache=" + new Date().getTime()); \ No newline at end of file diff --git a/setup/sql/sampledata.sql b/setup/sql/sampledata.sql new file mode 100644 index 0000000..0345c45 --- /dev/null +++ b/setup/sql/sampledata.sql @@ -0,0 +1,200 @@ +-- ================================================================ +-- +-- @package Membao +-- @Author Alan Kawamara +-- @copyright 2017. +-- +-- ================================================================ +-- Database data +-- ================================================================ + +-- +-- Dumping data for table `bills` +-- + +INSERT INTO `bills` (`id`, `title`, `slug`, `description`, `date_introduced`, `status`, `mover`, `bill_type`, `committee`, `created`, `vote_up`, `vote_down`, `metakeys`, `metadesc`, `featured`) VALUES +(1, 'Sierra Leone Water Company Act, 2017', 'sierra-leone-water-company-act-2017', '<p>The bill intends to&nbsp;provide for the continuance in existence of the Sierra Leone Water Company, to provide for a more efficient and effective management of community and rural water supply systems in specific areas, to provide for the facilitation of water sanitation and delivery in Sierra Leone and to provide for other related matters. </p>', '2017-02-27', 3, 0, 2, 2, '2017-03-12 17:28:10', 0, 0, 'provide,sierra,leone,water', 'The bill intends to provide for the continuance in existence of the Sierra Leone Water Company,…', 0); + + +-- +-- Dumping data for table `bills_recent` +-- + +INSERT INTO `bills_recent` (`id`, `bid`, `user_id`) VALUES +(1, 1, '6b73e5ca2b37c276861e5577609332188884d7fd'), +(2, 1, 'e52cee2d0c7467177c281e8ce23d5f861d616111'), +(3, 1, '816fe3c8a7b2dc5b65794654923a23eae03e905b'), +(4, 1, '161e16eb6d22a411ef2216519f0104849ab4433d'), +(5, 1, '391e06eb22e0baebc7953139b795964b4e1b48d9'), +(6, 1, '81cf2fcad4d6908b76fd8b9887f8d2dc75932b80'), +(7, 1, '31c8f4ec57f894155c3ee568637dbbd8029c4828'), +(8, 1, 'f218d4a3c9a8891ad753734fbc464d8f891e76ae'), +(9, 1, '9975e11b8da3c7a767641be42f15cc8835f91b2e'), +(10, 1, '23885fc7fb5a2c408b51ec9c258367ed5d620847'), +(11, 1, '3f8a068f7883562084dbf0143c49b8ada4637b90'); + +-- +-- Dumping data for table `bills_stats` +-- + +INSERT INTO `bills_stats` (`id`, `day`, `bid`, `hits`, `uhits`) VALUES +(1, '2017-03-15', 1, 6, 2), +(2, '2017-03-16', 1, 14, 2), +(3, '2017-03-19', 1, 51, 3), +(4, '2017-03-20', 1, 2, 1), +(5, '2017-03-21', 1, 5, 2), +(6, '2017-03-22', 1, 1, 1), +(7, '2017-03-25', 1, 1, 1), +(8, '2017-03-31', 1, 1, 1), +(9, '2017-04-03', 1, 2, 1), +(10, '2017-04-08', 1, 1, 1), +(11, '2017-04-10', 1, 1, 1); + +-- +-- Dumping data for table `bills_status` +-- + +INSERT INTO `bills_status` (`id`, `bill`, `status_date`, `status`) VALUES +(1, 1, '2017-02-28', 1), +(2, 1, '2017-03-03', 2), +(3, 1, '2017-03-21', 3); + + +-- +-- Dumping data for table `committees` +-- + +INSERT INTO `committees` (`id`, `name`, `slug`, `description`, `committees_type`, `created`, `metakeys`, `metadesc`) VALUES +(1, 'Privileges and Ethics Committee', 'privileges-and-ethics-committee', '<div>The duty of the Committee is to oversee and uphold the&nbsp;privileges, laws and customs of the House as well as the responsibilities of Members of Parliament and standards of Parliamentary conduct. It is also entrusted to investigate and report on prima facie cases of&nbsp;contempt and breach of Parliamentary privilege committed to it by the House.</div>', 1, '2017-02-25 11:41:48', 'nbsp,house,parliamentary', 'The duty of the Committee is to oversee and uphold the privileges, laws and customs of the House…'), +(2, 'Legislative Committee', 'legislative-committee', '<p>There shall be a Committee to be known as the legislative Committee consisting of a maximum of 16 members to be nominated by the Committee of Selection for approval by the Plenary, after the beginning of each session of parliament, but in any case not later than twenty-one days thereafter.</p><div>It shall &nbsp;be the duty of the Committee to scrutinise bills committed to it after Second Reading passage or, as the case may be, to assess, prior to the inception of passage, their appropriateness for introduction in the House; to examine constitutional and statutory instruments laid on the table of the House pursuant to subsection (7) of Section 70 of the Constitution; and to oversee the Judiciary.</div>', 1, '2017-03-12 13:43:32', 'committee,case,passage,house', 'There shall be a Committee to be known as the legislative Committee consisting of a maximum of 16 members…'); + + +-- +-- Dumping data for table `committees_meetings` +-- + +INSERT INTO `committees_meetings` (`id`, `name`, `slug`, `meeting_date`, `meeting_type`, `description`, `committee`, `attendance_status`, `file_id`, `created`, `metakeys`, `metadesc`) VALUES +(13, 'Morbi pretium laoreet erat ac vehicula', 'morbi-pretium-laoreet-erat-ac-vehicula', '2017-04-28', 1, '<p>Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus, orci ac ultrices pulvinar, justo nisl rutrum nibh, in ultricies sapien velit in augue. Fusce convallis nulla nec tellus venenatis, ut eleifend purus semper. Duis porta tincidunt velit sit amet consectetur. Morbi pretium laoreet erat ac vehicula. Nam volutpat vel est sed porttitor. Nulla nec mauris vulputate, blandit velit id, iaculis nisi. Morbi ac viverra eros. Integer ut quam augue. Aliquam accumsan sem sed elit blandit, sed scelerisque nibh varius. Ut scelerisque in velit sed molestie. Quisque et sodales ligula. Mauris quis urna vehicula, dictum justo sit amet, imperdiet sapien. </p>', 1, 0, 0, '2017-03-19 09:06:37', 'amet,consectetur,elit,justo,nibh,sapien,velit,augue,nulla,morbi,vehicula,mauris,blandit,scelerisque', 'Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus, orci ac ultrices pulvinar,…'), +(24, 'Quisque et sodales ligula', 'quisque-et-sodales-ligula', '2017-03-19', 1, '<p>Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus, orci ac ultrices pulvinar, justo nisl rutrum nibh, in ultricies sapien velit in augue. Fusce convallis nulla nec tellus venenatis, ut eleifend purus semper. Duis porta tincidunt velit sit amet consectetur. Morbi pretium laoreet erat ac vehicula. Nam volutpat vel est sed porttitor. Nulla nec mauris vulputate, blandit velit id, iaculis nisi. Morbi ac viverra eros. Integer ut quam augue. Aliquam accumsan sem sed elit blandit, sed scelerisque nibh varius. Ut scelerisque in velit sed molestie. Quisque et sodales ligula. Mauris quis urna vehicula, dictum justo sit amet, imperdiet sapien. </p>', 1, 0, 0, '2017-03-19 10:34:04', 'amet,consectetur,elit,justo,nibh,sapien,velit,augue,nulla,morbi,vehicula,mauris,blandit,scelerisque', 'Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus, orci ac ultrices pulvinar,…'), +(12, 'Meeting tipsum dolor sit amet', 'meeting-tipsum-dolor-sit-amet', '2017-03-27', 1, '<p>Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus, orci ac ultrices pulvinar, justo nisl rutrum nibh, in ultricies sapien velit in augue. Fusce convallis nulla nec tellus venenatis, ut eleifend purus semper. Duis porta tincidunt velit sit amet consectetur. Morbi pretium laoreet erat ac vehicula. Nam volutpat vel est sed porttitor. Nulla nec mauris vulputate, blandit velit id, iaculis nisi. Morbi ac viverra eros. Integer ut quam augue. Aliquam accumsan sem sed elit blandit, sed scelerisque nibh varius. Ut scelerisque in velit sed molestie. Quisque et sodales ligula. Mauris quis urna vehicula, dictum justo sit amet, imperdiet sapien.</p>', 1, 0, 0, '2017-03-11 03:39:19', 'amet,consectetur,elit,justo,nibh,sapien,velit,augue,nulla,morbi,vehicula,mauris,blandit,scelerisque', 'Lorem ipsum a dolor sit amet, consectetur adipiscing elit. Vestibulum dapibus, orci ac ultrices pulvinar,…'); + + +-- +-- Dumping data for table `committees_meetings_attendance` +-- + +INSERT INTO `committees_meetings_attendance` (`id`, `meeting_id`, `leader_id`, `status`) VALUES +(33, 24, 32, 0), +(32, 24, 31, 1), +(31, 24, 30, 0), +(30, 24, 29, 1), +(29, 24, 28, 1), +(28, 24, 27, 0), +(27, 24, 26, 1), +(26, 24, 25, 1), +(25, 24, 14, 1), +(24, 24, 24, 1), +(23, 24, 23, 1), +(22, 24, 16, 1), +(21, 24, 22, 1), +(20, 24, 15, 1), +(19, 24, 21, 1), +(18, 24, 5, 1); + +-- +-- Dumping data for table `committees_members` +-- + +INSERT INTO `committees_members` (`id`, `committee`, `member`, `role`) VALUES +(96, 2, 20, 3), +(95, 2, 19, 3), +(94, 2, 18, 3), +(93, 2, 17, 3), +(92, 2, 16, 3), +(91, 2, 15, 3), +(90, 2, 1, 3), +(89, 2, 14, 3), +(88, 2, 13, 3), +(87, 2, 12, 3), +(86, 2, 11, 3), +(85, 2, 10, 3), +(84, 2, 6, 3), +(83, 2, 9, 3), +(82, 2, 8, 2), +(81, 2, 7, 1), +(112, 1, 32, 3), +(111, 1, 31, 3), +(110, 1, 30, 3), +(109, 1, 29, 3), +(108, 1, 28, 3), +(107, 1, 27, 3), +(106, 1, 26, 3), +(105, 1, 25, 3), +(104, 1, 14, 3), +(103, 1, 24, 3), +(102, 1, 23, 3), +(101, 1, 16, 3), +(100, 1, 22, 3), +(99, 1, 15, 3), +(98, 1, 21, 2), +(97, 1, 5, 1); + +-- +-- Dumping data for table `committees_type` +-- + +INSERT INTO `committees_type` (`id`, `name`, `description`) VALUES +(1, 'Standing committee', '<p>Standing committees operate continuously and concentrate on examining bills and issues relating to particular subjects.&nbsp; </p>'); + + +-- +-- Dumping data for table `faq` +-- + +INSERT INTO `faq` (`id`, `question`, `answer`, `position`) VALUES +(1, 'What is a bill?', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 1), +(2, 'What is a committee', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 2), +(3, 'What is the role of an MP?', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 3), +(4, 'How many sittings does Parliament have?', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 4), +(5, 'What is a term', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 5); + +-- +-- Dumping data for table `files` +-- + +INSERT INTO `files` (`id`, `name`, `alias`, `filesize`, `created`, `active`) VALUES +(1, 'testfile1.zip', 'Demo File 1', '19456', '2011-07-21 15:42:11', 1), +(2, 'testfile2.zip', 'Demo File 2', '23552', '2011-07-21 15:42:21', 1), +(3, 'testfile3.zip', 'Demo File 3', '11264', '2011-07-21 15:42:29', 1), +(4, 'testfile4.zip', 'Demo File 4', '7168', '2011-07-21 15:42:37', 1), +(5, 'testfile5.zip', 'Demo File 5', '9216', '2011-07-21 15:42:49', 1), +(6, 'testpdf1.pdf', 'Demo File 6', '19456', '2011-07-21 15:47:18', 1), +(7, 'testpdf2.pdf', 'Demo File 7', '23552', '2011-07-21 15:47:29', 1), +(8, 'testpdf3.pdf', 'Demo File 8', '11264', '2011-07-21 15:47:44', 1), +(9, 'testfilems1.doc', 'Demo File 9', '19456', '2011-07-21 15:51:16', 1), +(10, 'testfilems2.docx', 'Demo File 10', '23552', '2011-07-21 15:51:24', 1), +(11, 'testfilems4.xls', 'Demo File 11', '7168', '2011-07-21 15:51:32', 1), +(12, 'testfilems5.xlsx', 'Demo File 12', '9216', '2011-07-21 15:51:43', 1); + + +-- +-- Dumping data for table `menus` +-- + +INSERT INTO `menus` (`id`, `page_id`, `name`, `content_type`, `link`, `target`, `position`, `active`) VALUES +(1, 4, 'Contact', 'page', '', '', 6, 1), +(2, 1, 'Home', 'page', NULL, '', 1, 0), +(3, 2, 'About', 'page', '', '', 5, 1), +(7, 0, 'Alerts', 'web', '#', '_self', 4, 1); + +-- +-- Dumping data for table `pages` +-- + +INSERT INTO `pages` (`id`, `title`, `slug`, `body`, `created`, `contact`, `faq`, `home_page`, `active`) VALUES +(1, 'Welcome to Memba-O!', 'welcome-to-memba-o', '<p>Memba-O! aims to act as a parliamentary watchdog, enabling citizens to track what is going on in Parliament. </p>', '2017-01-08 00:00:00', 0, 0, 1, 1), +(2, 'About Us', 'about-us', '<p><b>All about us!</b><br><br>Suspendisse vel nibh at eros blandit aliquet non vel ligula. Praesent laoreet nibh sit amet neque imperdiet eu tempor felis pharetra. <br>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. <br><br>Vivamus iaculis tristique sapien quis consectetur. Curabitur sollicitudin, ante at sagittis suscipit, nulla risus facilisis neque, eu consectetur mi sem sed lectus. Aliquam erat volutpat. Proin in ante risus. Etiam pulvinar vestibulum laoreet. <br><br>Vivamus venenatis consectetur libero quis consequat. Vivamus ut lorem diam. Cras interdum sem sed risus dictum fringilla. Sed sagittis turpis ut nisi faucibus pellentesque. Nunc sit amet semper erat.</p>', '2014-09-02 00:00:00', 0, 0, 0, 1), +(3, 'F.A.Q.', 'faq', 'Here you can find most common questions regarding DDP', '2014-08-06 00:00:00', 0, 1, 0, 1), +(4, 'Contact Us', 'contact-us', '<p style="font-family: Arial, Verdana; line-height: normal; "><b>Need to contact us?</b></p>\n<p style="font-family: Arial, Verdana; line-height: normal; ">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris congue vehicula enim id condimentum. <br>Integer at leo lobortis libero fermentum cursus. Mauris nulla nibh, condimentum ac cursus ac, ullamcorper eu orci. <br><br>Nunc at ligula erat. Nunc tempor dictum commodo. Nulla aliquam scelerisque luctus. Donec non suscipit enim. <br>Donec diam turpis, facilisis et pretium vitae, adipiscing id nibh. Nullam vel orci vitae erat mattis mattis. <br><br>Quisque at vehicula ante. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed turpis felis, egestas vitae tincidunt nec, ullamcorper non nisi.</p>', '2014-09-01 00:00:00', 1, 0, 0, 1), +(5, 'Other page', 'other-page', '<p>Sed eu lorem ut diam feugiat vulputate sed a enim. Aenean interdum, dui a varius facilisis, metus est imperdiet justo, pharetra auctor ipsum lorem non mauris. Mauris laoreet lectus lacus. Maecenas ut enim diam, non malesuada sapien. Fusce ullamcorper pretium risus, eu volutpat dolor dapibus sit amet</p>', '2014-08-07 00:00:00', 0, 0, 0, 1); + diff --git a/setup/sql/structure.sql b/setup/sql/structure.sql new file mode 100644 index 0000000..75156c4 --- /dev/null +++ b/setup/sql/structure.sql @@ -0,0 +1,945 @@ +-- ================================================================ +-- +-- @package Membao +-- @author Alan Kawamara +-- @copyright 2017 +-- +-- ================================================================ +-- Database structure +-- ================================================================ + +-- +-- Table structure for table `bills` +-- + +CREATE TABLE `bills` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(150) NOT NULL, + `slug` varchar(150) NOT NULL, + `description` text, + `date_introduced` date NOT NULL, + `status` int(1) NOT NULL DEFAULT '1', + `mover` int(6) NOT NULL DEFAULT '0', + `bill_type` int(1) NOT NULL, + `committee` int(6) NOT NULL, + `created` datetime NOT NULL, + `vote_up` int(6) DEFAULT '0', + `vote_down` int(6) DEFAULT '0', + `metakeys` text, + `metadesc` text, + `featured` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +-- +-- Table structure for table `bills_recent` +-- + +CREATE TABLE `bills_recent` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `bid` int(11) NOT NULL DEFAULT '0', + `user_id` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +-- +-- Table structure for table `bills_stats` +-- + +CREATE TABLE `bills_stats` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `day` date NOT NULL DEFAULT '0000-00-00', + `bid` int(11) NOT NULL DEFAULT '0', + `hits` int(11) NOT NULL DEFAULT '0', + `uhits` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `bills_status` +-- + +CREATE TABLE `bills_status` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `bill` int(11) NOT NULL, + `status_date` date NOT NULL, + `status` int(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `committees` +-- + +CREATE TABLE `committees` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `slug` varchar(150) NOT NULL, + `description` text, + `committees_type` int(6) NOT NULL DEFAULT '0', + `created` datetime NOT NULL, + `metakeys` text, + `metadesc` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `committees_meetings` +-- + +CREATE TABLE `committees_meetings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `slug` varchar(150) NOT NULL, + `meeting_date` date NOT NULL, + `meeting_type` int(2) NOT NULL, + `description` text, + `committee` int(11) NOT NULL, + `attendance_status` int(1) NOT NULL DEFAULT '0', + `file_id` int(5) NOT NULL, + `created` datetime NOT NULL, + `metakeys` text, + `metadesc` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `committees_meetings_attendance` +-- + +CREATE TABLE `committees_meetings_attendance` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `meeting_id` int(11) NOT NULL DEFAULT '0', + `leader_id` int(11) NOT NULL DEFAULT '0', + `status` int(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `committees_members` +-- + +CREATE TABLE `committees_members` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `committee` int(11) NOT NULL, + `member` int(11) NOT NULL, + `role` int(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `committees_type` +-- + +CREATE TABLE `committees_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `description` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `constituencies` +-- + +CREATE TABLE `constituencies` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `district` varchar(150) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `constituencies` +-- + +INSERT INTO `constituencies` (`id`, `name`, `district`) VALUES +(1, 'Constituency 1', 'Kailahun'), +(2, 'Constituency 2', 'Kailahun'), +(3, 'Constituency 3', 'Kailahun'), +(4, 'Constituency 4', 'Kailahun'), +(5, 'Constituency 5', 'Kailahun'), +(6, 'Constituency 6', 'Kailahun'), +(7, 'Constituency 7', 'Kailahun'), +(8, 'Constituency 8', 'Kailahun'), +(9, 'Constituency 9', 'Kenema'), +(10, 'Constituency 10', 'Kenema'), +(11, 'Constituency 11', 'Kenema'), +(12, 'Constituency 12', 'Kenema'), +(13, 'Constituency 13', 'Kenema'), +(14, 'Constituency 14', 'Kenema'), +(15, 'Constituency 15', 'Kenema'), +(16, 'Constituency 16', 'Kenema'), +(17, 'Constituency 17', 'Kenema'), +(18, 'Constituency 18', 'Kenema'), +(19, 'Constituency 19', 'Kenema'), +(20, 'Constituency 20', 'Kono'), +(21, 'Constituency 21', 'Kono'), +(22, 'Constituency 22', 'Kono'), +(23, 'Constituency 23', 'Kono'), +(24, 'Constituency 24', 'Kono'), +(25, 'Constituency 25', 'Kono'), +(26, 'Constituency 26', 'Kono'), +(27, 'Constituency 27', 'Kono'), +(28, 'Constituency 28', 'Bombali'), +(29, 'Constituency 29', 'Bombali'), +(30, 'Constituency 30', 'Bombali'), +(31, 'Constituency 31', 'Bombali'), +(32, 'Constituency 32', 'Bombali'), +(33, 'Constituency 33', 'Bombali'), +(34, 'Constituency 34', 'Bombali'), +(35, 'Constituency 35', 'Bombali'), +(36, 'Constituency 36', 'Bombali'), +(37, 'Constituency 37', 'Kambia'), +(38, 'Constituency 38', 'Kambia'), +(39, 'Constituency 39', 'Kambia'), +(40, 'Constituency 40', 'Kambia'), +(41, 'Constituency 41', 'Kambia'), +(42, 'Constituency 42', 'Kambia'), +(43, 'Constituency 43', 'Koinadugu'), +(44, 'Constituency 44', 'Koinadugu'), +(45, 'Constituency 45', 'Koinadugu'), +(46, 'Constituency 46', 'Koinadugu'), +(47, 'Constituency 47', 'Koinadugu'), +(48, 'Constituency 48', 'Koinadugu'), +(49, 'Constituency 49', 'Port Loko'), +(50, 'Constituency 50', 'Port Loko'), +(51, 'Constituency 51', 'Port Loko'), +(52, 'Constituency 52', 'Port Loko'), +(53, 'Constituency 53', 'Port Loko'), +(54, 'Constituency 54', 'Port Loko'), +(55, 'Constituency 55', 'Port Loko'), +(56, 'Constituency 56', 'Port Loko'), +(57, 'Constituency 57', 'Port Loko'), +(58, 'Constituency 58', 'Port Loko'), +(59, 'Constituency 59', 'Tonkolili'), +(60, 'Constituency 60', 'Tonkolili'), +(61, 'Constituency 61', 'Tonkolili'), +(62, 'Constituency 62', 'Tonkolili'), +(63, 'Constituency 63', 'Tonkolili'), +(64, 'Constituency 64', 'Tonkolili'), +(65, 'Constituency 65', 'Tonkolili'), +(66, 'Constituency 66', 'Tonkolili'), +(67, 'Constituency 67', 'Bo'), +(68, 'Constituency 68', 'Bo'), +(69, 'Constituency 69', 'Bo'), +(70, 'Constituency 70', 'Bo'), +(71, 'Constituency 71', 'Bo'), +(72, 'Constituency 72', 'Bo'), +(73, 'Constituency 73', 'Bo'), +(74, 'Constituency 74', 'Bo'), +(75, 'Constituency 75', 'Bo'), +(76, 'Constituency 76', 'Bo'), +(77, 'Constituency 77', 'Bo'), +(78, 'Constituency 78', 'Bonthe'), +(79, 'Constituency 79', 'Bonthe'), +(80, 'Constituency 80', 'Bonthe'), +(81, 'Constituency 81', 'Moyamba'), +(82, 'Constituency 82', 'Moyamba'), +(83, 'Constituency 83', 'Moyamba'), +(84, 'Constituency 84', 'Moyamba'), +(85, 'Constituency 85', 'Moyamba'), +(86, 'Constituency 86', 'Moyamba'), +(87, 'Constituency 87', 'Pujehun'), +(88, 'Constituency 88', 'Pujehun'), +(89, 'Constituency 89', 'Pujehun'), +(90, 'Constituency 90', 'Pujehun'), +(91, 'Constituency 91', 'Pujehun'), +(92, 'Constituency 92', 'Western Rural'), +(93, 'Constituency 93', 'Western Rural'), +(94, 'Constituency 94', 'Western Rural'), +(95, 'Constituency 95', 'Western Rural'), +(96, 'Constituency 96', 'Western Urban'), +(97, 'Constituency 97', 'Western Urban'), +(98, 'Constituency 98', 'Western Urban'), +(99, 'Constituency 99', 'Western Urban'), +(100, 'Constituency 100', 'Western Urban'), +(101, 'Constituency 101', 'Western Urban'), +(102, 'Constituency 102', 'Western Urban'), +(103, 'Constituency 103', 'Western Urban'), +(104, 'Constituency 104', 'Western Urban'), +(105, 'Constituency 105', 'Western Urban'), +(106, 'Constituency 106', 'Western Urban'), +(107, 'Constituency 107', 'Western Urban'), +(108, 'Constituency 108', 'Western Urban'), +(109, 'Constituency 109', 'Western Urban'), +(110, 'Constituency 110', 'Western Urban'), +(111, 'Constituency 111', 'Western Urban'), +(112, 'Constituency 112', 'Western Urban'), +(113, 'Bo District', 'Bo District'), +(114, 'Kailhun District', 'Kailhun District'), +(115, 'Pujehun District', 'Pujehun District'), +(116, 'Tonkolili District', 'Tonkolili District'), +(117, 'Bonthe District', 'Bonthe District'), +(118, 'Koinadugu District', 'Koinadugu District'), +(119, 'Moyamba District', 'Moyamba District'), +(120, 'Kono District', 'Kono District'), +(121, 'Bombali District', 'Bombali District'), +(122, 'Kenema District', 'Kenema District'), +(123, 'Kambia District', 'Kambia District'), +(124, 'Port Loko District', 'Port Loko District'); + +-- +-- Table structure for table `countries` +-- + +CREATE TABLE IF NOT EXISTS `countries` ( + `id` smallint(6) DEFAULT NULL, + `abbr` varchar(6) DEFAULT NULL, + `name` varchar(210) DEFAULT NULL, + `active` tinyint(1) DEFAULT NULL, + `home` tinyint(1) DEFAULT NULL, + `vat` decimal(7,0) DEFAULT NULL, + `sorting` smallint(6) DEFAULT NULL, + KEY `idx` (`abbr`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `countries` +-- + +INSERT INTO `countries` (`id`, `abbr`, `name`, `active`, `home`, `vat`, `sorting`) VALUES +(1, 'AF', 'Afghanistan', 1, NULL, '0', 0), +(2, 'AL', 'Albania', 1, NULL, '0', 0), +(3, 'DZ', 'Algeria', 1, NULL, '0', 0), +(4, 'AS', 'American Samoa', 1, NULL, '0', 0), +(5, 'AD', 'Andorra', 1, NULL, '0', 0), +(6, 'AO', 'Angola', 1, NULL, '0', 0), +(7, 'AI', 'Anguilla', 1, NULL, '0', 0), +(8, 'AQ', 'Antarctica', 1, NULL, '0', 0), +(9, 'AG', 'Antigua and Barbuda', 1, NULL, '0', 0), +(10, 'AR', 'Argentina', 1, NULL, '0', 0), +(11, 'AM', 'Armenia', 1, NULL, '0', 0), +(12, 'AW', 'Aruba', 1, NULL, '0', 0), +(13, 'AU', 'Australia', 1, NULL, '0', 0), +(14, 'AT', 'Austria', 1, NULL, '0', 0), +(15, 'AZ', 'Azerbaijan', 1, NULL, '0', 0), +(16, 'BS', 'Bahamas', 1, NULL, '0', 0), +(17, 'BH', 'Bahrain', 1, NULL, '0', 0), +(18, 'BD', 'Bangladesh', 1, NULL, '0', 0), +(19, 'BB', 'Barbados', 1, NULL, '0', 0), +(20, 'BY', 'Belarus', 1, NULL, '0', 0), +(21, 'BE', 'Belgium', 1, NULL, '0', 0), +(22, 'BZ', 'Belize', 1, NULL, '0', 0), +(23, 'BJ', 'Benin', 1, NULL, '0', 0), +(24, 'BM', 'Bermuda', 1, NULL, '0', 0), +(25, 'BT', 'Bhutan', 1, NULL, '0', 0), +(26, 'BO', 'Bolivia', 1, NULL, '0', 0), +(27, 'BA', 'Bosnia and Herzegowina', 1, NULL, '0', 0), +(28, 'BW', 'Botswana', 1, NULL, '0', 0), +(29, 'BV', 'Bouvet Island', 1, NULL, '0', 0), +(30, 'BR', 'Brazil', 1, NULL, '0', 0), +(31, 'IO', 'British Indian Ocean Territory', 1, NULL, '0', 0), +(32, 'VG', 'British Virgin Islands', 1, NULL, '0', 0), +(33, 'BN', 'Brunei Darussalam', 1, NULL, '0', 0), +(34, 'BG', 'Bulgaria', 1, NULL, '0', 0), +(35, 'BF', 'Burkina Faso', 1, NULL, '0', 0), +(36, 'BI', 'Burundi', 1, NULL, '0', 0), +(37, 'KH', 'Cambodia', 1, NULL, '0', 0), +(38, 'CM', 'Cameroon', 1, NULL, '0', 0), +(39, 'CA', 'Canada', 1, 1, '13', 1000), +(40, 'CV', 'Cape Verde', 1, NULL, '0', 0), +(41, 'KY', 'Cayman Islands', 1, NULL, '0', 0), +(42, 'CF', 'Central African Republic', 1, NULL, '0', 0), +(43, 'TD', 'Chad', 1, NULL, '0', 0), +(44, 'CL', 'Chile', 1, NULL, '0', 0), +(45, 'CN', 'China', 1, NULL, '0', 0), +(46, 'CX', 'Christmas Island', 1, NULL, '0', 0), +(47, 'CC', 'Cocos (Keeling) Islands', 1, NULL, '0', 0), +(48, 'CO', 'Colombia', 1, NULL, '0', 0), +(49, 'KM', 'Comoros', 1, NULL, '0', 0), +(50, 'CG', 'Congo', 1, NULL, '0', 0), +(51, 'CK', 'Cook Islands', 1, NULL, '0', 0), +(52, 'CR', 'Costa Rica', 1, NULL, '0', 0), +(53, 'CI', 'Cote D'ivoire', 1, NULL, '0', 0), +(54, 'HR', 'Croatia', 1, NULL, '0', 0), +(55, 'CU', 'Cuba', 1, NULL, '0', 0), +(56, 'CY', 'Cyprus', 1, NULL, '0', 0), +(57, 'CZ', 'Czech Republic', 1, NULL, '0', 0), +(58, 'DK', 'Denmark', 1, NULL, '0', 0), +(59, 'DJ', 'Djibouti', 1, NULL, '0', 0), +(60, 'DM', 'Dominica', 1, NULL, '0', 0), +(61, 'DO', 'Dominican Republic', 1, NULL, '0', 0), +(62, 'TP', 'East Timor', 1, NULL, '0', 0), +(63, 'EC', 'Ecuador', 1, NULL, '0', 0), +(64, 'EG', 'Egypt', 1, NULL, '0', 0), +(65, 'SV', 'El Salvador', 1, NULL, '0', 0), +(66, 'GQ', 'Equatorial Guinea', 1, NULL, '0', 0), +(67, 'ER', 'Eritrea', 1, NULL, '0', 0), +(68, 'EE', 'Estonia', 1, NULL, '0', 0), +(69, 'ET', 'Ethiopia', 1, NULL, '0', 0), +(70, 'FK', 'Falkland Islands (Malvinas)', 1, NULL, '0', 0), +(71, 'FO', 'Faroe Islands', 1, NULL, '0', 0), +(72, 'FJ', 'Fiji', 1, NULL, '0', 0), +(73, 'FI', 'Finland', 1, NULL, '0', 0), +(74, 'FR', 'France', 1, NULL, '0', 0), +(75, 'GF', 'French Guiana', 1, NULL, '0', 0), +(76, 'PF', 'French Polynesia', 1, NULL, '0', 0), +(77, 'TF', 'French Southern Territories', 1, NULL, '0', 0), +(78, 'GA', 'Gabon', 1, NULL, '0', 0), +(79, 'GM', 'Gambia', 1, NULL, '0', 0), +(80, 'GE', 'Georgia', 1, NULL, '0', 0), +(81, 'DE', 'Germany', 1, NULL, '0', 0), +(82, 'GH', 'Ghana', 1, NULL, '0', 0), +(83, 'GI', 'Gibraltar', 1, NULL, '0', 0), +(84, 'GR', 'Greece', 1, NULL, '0', 0), +(85, 'GL', 'Greenland', 1, NULL, '0', 0), +(86, 'GD', 'Grenada', 1, NULL, '0', 0), +(87, 'GP', 'Guadeloupe', 1, NULL, '0', 0), +(88, 'GU', 'Guam', 1, NULL, '0', 0), +(89, 'GT', 'Guatemala', 1, NULL, '0', 0), +(90, 'GN', 'Guinea', 1, NULL, '0', 0), +(91, 'GW', 'Guinea-Bissau', 1, NULL, '0', 0), +(92, 'GY', 'Guyana', 1, NULL, '0', 0), +(93, 'HT', 'Haiti', 1, NULL, '0', 0), +(94, 'HM', 'Heard and McDonald Islands', 1, NULL, '0', 0), +(95, 'HN', 'Honduras', 1, NULL, '0', 0), +(96, 'HK', 'Hong Kong', 1, NULL, '0', 0), +(97, 'HU', 'Hungary', 1, NULL, '0', 0), +(98, 'IS', 'Iceland', 1, NULL, '0', 0), +(99, 'IN', 'India', 1, NULL, '0', 0), +(100, 'ID', 'Indonesia', 1, NULL, '0', 0), +(101, 'IQ', 'Iraq', 1, NULL, '0', 0), +(102, 'IE', 'Ireland', 1, NULL, '0', 0), +(103, 'IR', 'Islamic Republic of Iran', 1, NULL, '0', 0), +(104, 'IL', 'Israel', 1, NULL, '0', 0), +(105, 'IT', 'Italy', 1, NULL, '0', 0), +(106, 'JM', 'Jamaica', 1, NULL, '0', 0), +(107, 'JP', 'Japan', 1, NULL, '0', 0), +(108, 'JO', 'Jordan', 1, NULL, '0', 0), +(109, 'KZ', 'Kazakhstan', 1, NULL, '0', 0), +(110, 'KE', 'Kenya', 1, NULL, '0', 0), +(111, 'KI', 'Kiribati', 1, NULL, '0', 0), +(112, 'KP', 'Korea, Dem. Peoples Rep of', 1, NULL, '0', 0), +(113, 'KR', 'Korea, Republic of', 1, NULL, '0', 0), +(114, 'KW', 'Kuwait', 1, NULL, '0', 0), +(115, 'KG', 'Kyrgyzstan', 1, NULL, '0', 0), +(116, 'LA', 'Laos', 1, NULL, '0', 0), +(117, 'LV', 'Latvia', 1, NULL, '0', 0), +(118, 'LB', 'Lebanon', 1, NULL, '0', 0), +(119, 'LS', 'Lesotho', 1, NULL, '0', 0), +(120, 'LR', 'Liberia', 1, NULL, '0', 0), +(121, 'LY', 'Libyan Arab Jamahiriya', 1, NULL, '0', 0), +(122, 'LI', 'Liechtenstein', 1, NULL, '0', 0), +(123, 'LT', 'Lithuania', 1, NULL, '0', 0), +(124, 'LU', 'Luxembourg', 1, NULL, '0', 0), +(125, 'MO', 'Macau', 1, NULL, '0', 0), +(126, 'MK', 'Macedonia', 1, NULL, '0', 0), +(127, 'MG', 'Madagascar', 1, NULL, '0', 0), +(128, 'MW', 'Malawi', 1, NULL, '0', 0), +(129, 'MY', 'Malaysia', 1, NULL, '0', 0), +(130, 'MV', 'Maldives', 1, NULL, '0', 0), +(131, 'ML', 'Mali', 1, NULL, '0', 0), +(132, 'MT', 'Malta', 1, NULL, '0', 0), +(133, 'MH', 'Marshall Islands', 1, NULL, '0', 0), +(134, 'MQ', 'Martinique', 1, NULL, '0', 0), +(135, 'MR', 'Mauritania', 1, NULL, '0', 0), +(136, 'MU', 'Mauritius', 1, NULL, '0', 0), +(137, 'YT', 'Mayotte', 1, NULL, '0', 0), +(138, 'MX', 'Mexico', 1, NULL, '0', 0), +(139, 'FM', 'Micronesia', 1, NULL, '0', 0), +(140, 'MD', 'Moldova, Republic of', 1, NULL, '0', 0), +(141, 'MC', 'Monaco', 1, NULL, '0', 0), +(142, 'MN', 'Mongolia', 1, NULL, '0', 0), +(143, 'MS', 'Montserrat', 1, NULL, '0', 0), +(144, 'MA', 'Morocco', 1, NULL, '0', 0), +(145, 'MZ', 'Mozambique', 1, NULL, '0', 0), +(146, 'MM', 'Myanmar', 1, NULL, '0', 0), +(147, 'NA', 'Namibia', 1, NULL, '0', 0), +(148, 'NR', 'Nauru', 1, NULL, '0', 0), +(149, 'NP', 'Nepal', 1, NULL, '0', 0), +(150, 'NL', 'Netherlands', 1, NULL, '0', 0), +(151, 'AN', 'Netherlands Antilles', 1, NULL, '0', 0), +(152, 'NC', 'New Caledonia', 1, NULL, '0', 0), +(153, 'NZ', 'New Zealand', 1, NULL, '0', 0), +(154, 'NI', 'Nicaragua', 1, NULL, '0', 0), +(155, 'NE', 'Niger', 1, NULL, '0', 0), +(156, 'NG', 'Nigeria', 1, NULL, '0', 0), +(157, 'NU', 'Niue', 1, NULL, '0', 0), +(158, 'NF', 'Norfolk Island', 1, NULL, '0', 0), +(159, 'MP', 'Northern Mariana Islands', 1, NULL, '0', 0), +(160, 'NO', 'Norway', 1, NULL, '0', 0), +(161, 'OM', 'Oman', 1, NULL, '0', 0), +(162, 'PK', 'Pakistan', 1, NULL, '0', 0), +(163, 'PW', 'Palau', 1, NULL, '0', 0), +(164, 'PA', 'Panama', 1, NULL, '0', 0), +(165, 'PG', 'Papua New Guinea', 1, NULL, '0', 0), +(166, 'PY', 'Paraguay', 1, NULL, '0', 0), +(167, 'PE', 'Peru', 1, NULL, '0', 0), +(168, 'PH', 'Philippines', 1, NULL, '0', 0), +(169, 'PN', 'Pitcairn', 1, NULL, '0', 0), +(170, 'PL', 'Poland', 1, NULL, '0', 0), +(171, 'PT', 'Portugal', 1, NULL, '0', 0), +(172, 'PR', 'Puerto Rico', 1, NULL, '0', 0), +(173, 'QA', 'Qatar', 1, NULL, '0', 0), +(174, 'RE', 'Reunion', 1, NULL, '0', 0), +(175, 'RO', 'Romania', 1, NULL, '0', 0), +(176, 'RU', 'Russian Federation', 1, NULL, '0', 0), +(177, 'RW', 'Rwanda', 1, NULL, '0', 0), +(178, 'LC', 'Saint Lucia', 1, NULL, '0', 0), +(179, 'WS', 'Samoa', 1, NULL, '0', 0), +(180, 'SM', 'San Marino', 1, NULL, '0', 0), +(181, 'ST', 'Sao Tome and Principe', 1, NULL, '0', 0), +(182, 'SA', 'Saudi Arabia', 1, NULL, '0', 0), +(183, 'SN', 'Senegal', 1, NULL, '0', 0), +(184, 'RS', 'Serbia', 1, NULL, '0', 0), +(185, 'SC', 'Seychelles', 1, NULL, '0', 0), +(186, 'SL', 'Sierra Leone', 1, NULL, '0', 0), +(187, 'SG', 'Singapore', 1, NULL, '0', 0), +(188, 'SK', 'Slovakia', 1, NULL, '0', 0), +(189, 'SI', 'Slovenia', 1, NULL, '0', 0), +(190, 'SB', 'Solomon Islands', 1, NULL, '0', 0), +(191, 'SO', 'Somalia', 1, NULL, '0', 0), +(192, 'ZA', 'South Africa', 1, NULL, '0', 0), +(193, 'ES', 'Spain', 1, NULL, '0', 0), +(194, 'LK', 'Sri Lanka', 1, NULL, '0', 0), +(195, 'SH', 'St. Helena', 1, NULL, '0', 0), +(196, 'KN', 'St. Kitts and Nevis', 1, NULL, '0', 0), +(197, 'PM', 'St. Pierre and Miquelon', 1, NULL, '0', 0), +(198, 'VC', 'St. Vincent and the Grenadines', 1, NULL, '0', 0), +(199, 'SD', 'Sudan', 1, NULL, '0', 0), +(200, 'SR', 'Suriname', 1, NULL, '0', 0), +(201, 'SJ', 'Svalbard and Jan Mayen Islands', 1, NULL, '0', 0), +(202, 'SZ', 'Swaziland', 1, NULL, '0', 0), +(203, 'SE', 'Sweden', 1, NULL, '0', 0), +(204, 'CH', 'Switzerland', 1, NULL, '0', 0), +(205, 'SY', 'Syrian Arab Republic', 1, NULL, '0', 0), +(206, 'TW', 'Taiwan', 1, NULL, '0', 0), +(207, 'TJ', 'Tajikistan', 1, NULL, '0', 0), +(208, 'TZ', 'Tanzania, United Republic of', 1, NULL, '0', 0), +(209, 'TH', 'Thailand', 1, NULL, '0', 0), +(210, 'TG', 'Togo', 1, NULL, '0', 0), +(211, 'TK', 'Tokelau', 1, NULL, '0', 0), +(212, 'TO', 'Tonga', 1, NULL, '0', 0), +(213, 'TT', 'Trinidad and Tobago', 1, NULL, '0', 0), +(214, 'TN', 'Tunisia', 1, NULL, '0', 0), +(215, 'TR', 'Turkey', 1, NULL, '0', 0), +(216, 'TM', 'Turkmenistan', 1, NULL, '0', 0), +(217, 'TC', 'Turks and Caicos Islands', 1, NULL, '0', 0), +(218, 'TV', 'Tuvalu', 1, NULL, '0', 0), +(219, 'UG', 'Uganda', 1, NULL, '0', 0), +(220, 'UA', 'Ukraine', 1, NULL, '0', 0), +(221, 'AE', 'United Arab Emirates', 1, NULL, '0', 0), +(222, 'GB', 'United Kingdom (GB)', 1, NULL, '23', 999), +(224, 'US', 'United States', 1, NULL, '8', 998), +(225, 'VI', 'United States Virgin Islands', 1, NULL, '0', 0), +(226, 'UY', 'Uruguay', 1, NULL, '0', 0), +(227, 'UZ', 'Uzbekistan', 1, NULL, '0', 0), +(228, 'VU', 'Vanuatu', 1, NULL, '0', 0), +(229, 'VA', 'Vatican City State', 1, NULL, '0', 0), +(230, 'VE', 'Venezuela', 1, NULL, '0', 0), +(231, 'VN', 'Vietnam', 1, NULL, '0', 0), +(232, 'WF', 'Wallis And Futuna Islands', 1, NULL, '0', 0), +(233, 'EH', 'Western Sahara', 1, NULL, '0', 0), +(234, 'YE', 'Yemen', 1, NULL, '0', 0), +(235, 'ZR', 'Zaire', 1, NULL, '0', 0), +(236, 'ZM', 'Zambia', 1, NULL, '0', 0), +(237, 'ZW', 'Zimbabwe', 1, NULL, '0', 0); + + +-- +-- Table structure for table `email_templates` +-- + +CREATE TABLE IF NOT EXISTS `email_templates` ( + `id` tinyint(2) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `subject` varchar(255) NOT NULL, + `help` text, + `body` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `email_templates` +-- + +INSERT INTO `email_templates` (`id`, `name`, `subject`, `help`, `body`) VALUES +(1, 'Registration Email', 'Please verify your email', 'This template is used to send Registration Verification Email, when Configuration->Registration Verification is set to YES', '<div style="color:#000;margin-top:20px;margin-left:auto;margin-right:auto;max-width:800px;background-color:#F4F4F4">\n <table style="font-family: Helvetica Neue,Helvetica,Arial, sans-serif; font-size:13px;background: #F4F4F4; width: 100%; border: 4px solid #bbbbbb;" cellpadding="10" cellspacing="5">\n<tbody>\n<tr>\n<th style="background-color: rgb(204, 204, 204); font-size:16px;padding:5px;border-bottom-width:2px; border-bottom-color:#fff; border-bottom-style:solid">\nWelcome [NAME]\n</th>\n</tr>\n<tr>\n<td style="text-align: left;" valign="top">\nHello, <br>\n<br>\nYou're now a member of [SITE_NAME]. \n<br>\nHere are your login details. Please keep them in a safe place:\n</td>\n</tr>\n<tr>\n<td style="text-align: left;" valign="top">\n<table style="font-family: Helvetica Neue,Helvetica,Arial, sans-serif; font-size:13px;" border="0" width="100%" cellpadding="5" cellspacing="2">\n<tbody>\n<tr>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed" align="right" width="130">\n<b>Username:</b>\n</td>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed">\n[USERNAME]\n</td>\n</tr>\n<tr>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed" align="right">\n<b>Password:</b>\n</td>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed">\n[PASSWORD]\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n<tr>\n<td style="text-align: left;" valign="top">\nThe administrator of this site has requested all new accounts\nto be activated by the users who created them thus your account\nis currently inactive. \n<br>\nTo activate your account,\nplease visit the link below and enter the following:\n</td>\n</tr>\n<tr>\n<td style="text-align: left;" valign="top">\n<table border="0" cellpadding="4" cellspacing="2">\n<tbody>\n<tr>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed" align="right" width="130">\n<b>Token:</b>\n</td>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed">\n[TOKEN]\n</td>\n</tr>\n<tr>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed" align="right">\n<b>Email:</b>\n</td>\n<td style="border-bottom-width:1px; border-bottom-color:#bbb; border-bottom-style:dashed">\n[EMAIL]\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n<tr>\n<td style="text-align: left;" valign="top">\n<a href="[LINK]"><b>Click here to activate your account</b></a>\n</td>\n</tr>\n<tr>\n<td style="text-align: left; background-color:#fff;border-top-width:2px; border-top-color:#ccc; border-top-style:solid" valign="top">\n<i>Thanks,<br>\n[SITE_NAME] Team\n<br>\n<a href="[URL]">[URL]</a></i>\n</td>\n</tr>\n</tbody>\n</table>\n</div>'); + + +-- +-- Table structure for table `faq` +-- + +CREATE TABLE IF NOT EXISTS `faq` ( + `id` tinyint(3) NOT NULL AUTO_INCREMENT, + `question` varchar(150) DEFAULT NULL, + `answer` text, + `position` tinyint(3) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `files` +-- + +CREATE TABLE IF NOT EXISTS `files` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `alias` varchar(255) DEFAULT NULL, + `filesize` varchar(80) NOT NULL DEFAULT '0', + `created` datetime NOT NULL, + `active` int(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +-- +-- Table structure for table `leaders` +-- + +CREATE TABLE `leaders` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `first_name` varchar(150) NOT NULL, + `other_name` varchar(150) NOT NULL, + `last_name` varchar(150) NOT NULL, + `slug` varchar(150) NOT NULL, + `gender` int(1) NOT NULL DEFAULT '0', + `dob` date NOT NULL, + `party` int(6) NOT NULL DEFAULT '0', + `office` int(1) NOT NULL DEFAULT '0', + `constituency` int(6) NOT NULL DEFAULT '0', + `description` text, + `file_id` int(5) NOT NULL, + `thumb` varchar(50) DEFAULT NULL, + `created` datetime NOT NULL, + `sittings` int(11) NOT NULL DEFAULT '0', + `vote_up` int(6) DEFAULT '0', + `vote_down` int(6) DEFAULT '0', + `rating` int(11) NOT NULL DEFAULT '0', + `ratingc` int(6) NOT NULL DEFAULT '0', + `metakeys` text, + `metadesc` text, + `featured` tinyint(1) NOT NULL DEFAULT '0', + `active` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `leaders` +-- + +INSERT INTO `leaders` (`id`, `first_name`, `other_name`, `last_name`, `slug`, `gender`, `dob`, `party`, `office`, `constituency`, `description`, `file_id`, `thumb`, `created`, `sittings`, `vote_up`, `vote_down`, `rating`, `ratingc`, `metakeys`, `metadesc`, `featured`, `active`) VALUES +(1, 'Bu-Buakei', '', 'Jabbi', 'bu-buakeijabbi', 1, '1945-05-07', 1, 1, 8, NULL, 0, 'IMG_6B2648-F01639-D983D4-8C6C2E-5AC485-E42730.jpg', '2017-01-08 12:42:20', 3, 0, 0, 0, 0, 'buakei,jabbi,sierra,leone,people,party,slpp,member,parliament,constituency,kailahun,district,dispute', 'Bu-Buakei Jabbi is a Sierra Leonean lawyer and politician from the Sierra Leone People's Party (SLPP).…', 1, 1), +(2, 'Andrew', '', 'Lungay', 'andrewlungay', 1, '1942-05-16', 1, 1, 12, NULL, 0, 'IMG_738DD3-A1F146-0C6FA2-F4E25E-E9B0EA-BB9BB9.jpg', '2017-01-09 06:30:21', 2, 1, 0, 5, 1, 'andrew,lungay,sierra,leone,party,member,election,social,finishers', 'Andrew Victor Lungay is a Sierra Leonean politician from the Sierra Leone People's Party (SLPP).…', 0, 1), +(3, 'Bernadette', '', 'Lahai', 'bernadettelahai', 2, '1960-12-30', 1, 1, 13, NULL, 0, 'IMG_731CD3-9A84CB-5575D3-F6E4E4-B6B6DB-D191B7.jpg', '2017-01-09 06:34:48', 2, 1, 0, 0, 0, '', 'Bernadette Lahai', 1, 1), +(4, 'Frank', '', 'Kposowa', 'frankkposowa', 1, '1945-11-25', 1, 1, 71, NULL, 0, 'IMG_BFEEF1-433BEB-D488A1-86E188-8295E1-F447E5.jpg', '2017-01-09 06:41:13', 3, 1, 0, 0, 0, 'sierra,leone', 'Frank Kposowa is a Sierra Leonean politician. He is a member of the Sierra Leone People's Party…', 0, 1), +(5, 'Ansumana', 'Jaia', 'Kaikai', 'ansumanajaiakaikai', 1, '0000-00-00', 1, 1, 87, NULL, 0, 'IMG_1A559A-EAC588-EA2035-786825-454F0F-6595EF.jpg', '2017-01-09 06:49:24', 2, 0, 0, 0, 0, '', 'Ansumana Kaikai', 0, 1), +(9, 'Chernor', '', 'Bah', 'chernorbah', 1, '0000-00-00', 2, 1, 110, NULL, 0, 'IMG_1031F0-8EA5B8-B1EF52-67A7EC-E3BE94-BBD98D.jpg', '2017-03-12 12:34:28', 2, 0, 0, 0, 0, '', 'Chernor Bah', 0, 1), +(6, 'Ibrahim', '', 'Kamara', 'ibrahimkamara', 1, '0000-00-00', 2, 1, 105, NULL, 0, 'IMG_8D4A84-4924FF-73063C-4197E1-89DC4B-108538.jpg', '2017-02-17 06:37:16', 3, 0, 0, 0, 0, '', 'Ibrahim Kamara', 0, 1), +(7, 'Ajibola', '', 'Manly Spaine', 'ajibolamanly-spaine', 1, '0000-00-00', 2, 1, 106, NULL, 0, 'IMG_9CF9E4-7E4E98-1698FC-DBC091-34A715-B3EDFE.jpg', '2017-03-12 12:11:17', 2, 0, 0, 0, 0, '', 'Ajibola Manly Spaine', 0, 1), +(8, 'Daniel', '', 'Koroma', 'danielkoroma', 1, '0000-00-00', 2, 1, 46, NULL, 0, 'IMG_AE5FA5-499C2E-7C86C7-1D0F3D-F67A64-FB4067.jpg', '2017-03-12 12:31:56', 2, 0, 0, 0, 0, '', 'Daniel Koroma', 0, 1), +(10, 'Benneh', '', 'Bangura', 'bennehbangura', 1, '0000-00-00', 2, 1, 55, NULL, 0, 'IMG_A8CD00-9367A0-7270B2-7A1AE8-7FCF76-B47733.jpg', '2017-03-12 12:47:16', 2, 0, 0, 0, 0, '', 'Benneh Bangura', 0, 1), +(11, 'Abdu', '', 'Salaam Kanu', 'abdusalaam-kanu', 1, '0000-00-00', 2, 1, 101, NULL, 0, 'IMG_21101F-9D443C-D60994-80D6FD-B23EAE-F74466.jpg', '2017-03-12 12:49:21', 2, 1, 0, 0, 0, '', 'Abdu Salaam Kanu', 1, 1), +(12, 'Alhaji', '', 'Serray Dumbuya', 'alhajiserray-dumbuya', 1, '0000-00-00', 2, 1, 49, NULL, 0, 'IMG_04E8D6-BA0747-A224F7-5A8115-0813F1-B30D82.jpg', '2017-03-12 12:52:00', 2, 0, 0, 0, 0, '', 'Alhaji Serray Dumbuya', 0, 1), +(13, 'Alhassan', '', 'Kamara', 'alhassankamara', 1, '0000-00-00', 2, 1, 96, NULL, 0, 'IMG_E6363F-06B04F-97CCB5-B6DDDB-A1D52B-B24AA7.jpg', '2017-03-12 12:53:59', 2, 0, 0, 0, 0, '', 'Alhassan Kamara', 0, 1), +(14, 'Sallieu', '', 'Osman Sesay', 'sallieu-osman-sesay', 1, '0000-00-00', 2, 1, 29, NULL, 0, 'IMG_6E6EAC-7D18AE-C069C8-708452-00AFE2-BE3D6D.jpg', '2017-03-12 12:56:29', 2, 0, 0, 0, 0, '', 'Sallieu Osman Sesay', 0, 1), +(15, 'Mustapha', '', 'Brima', 'mustaphabrima', 1, '0000-00-00', 1, 1, 2, NULL, 0, 'IMG_D7D5BA-B724E7-AE8B27-F1897A-E4CE9E-C6F681.jpg', '2017-03-12 12:59:40', 2, 0, 0, 0, 0, '', 'Mustapha Brima', 0, 1), +(16, 'Segepoh', '', 'Solomon Thomas', 'segepoh-solomon-thomas', 1, '0000-00-00', 1, 1, 78, NULL, 0, 'IMG_DA1F62-3B9E79-66A18B-9F8577-A894E0-8B32D3.jpg', '2017-03-12 13:02:20', 2, 0, 0, 0, 0, '', 'Segepoh Solomon Thomas', 0, 1), +(17, 'Dickson', '', 'Rogers', 'dicksonrogers', 1, '0000-00-00', 1, 1, 89, NULL, 0, 'IMG_FB94E4-2FDACB-A356DD-7B3DCA-F7CB08-3A1EA3.jpg', '2017-03-12 13:04:32', 2, 0, 0, 0, 0, '', 'Dickson Rogers', 0, 1), +(18, 'Emma', '', 'Kowa', 'emmakowa', 2, '0000-00-00', 1, 1, 76, NULL, 0, 'IMG_58B112-7651B2-D324B6-8F1D80-B9AEF0-0349BF.jpg', '2017-03-12 13:06:16', 2, 0, 0, 3, 1, '', 'Emma Kowa', 1, 1), +(19, 'Samuel', '', 'Brima', 'samuelbrima', 1, '0000-00-00', 1, 1, 16, NULL, 0, 'IMG_F731ED-1F7DF4-D80A69-5818CC-21CBE6-54F18B.jpg', '2017-03-12 13:08:12', 3, 0, 0, 0, 0, '', 'Samuel Brima', 0, 1), +(20, 'Prince Lappia', '', 'Boima IV', 'prince-lappiaboima-iv', 1, '0000-00-00', 0, 2, 113, NULL, 0, 'IMG_3BDBF0-A91F51-84AF75-239853-FBD0F9-F6374E.jpg', '2017-03-12 13:23:31', 2, 0, 0, 0, 0, '', 'Prince Lappia Boima IV', 0, 1), +(21, 'James', '', 'N. Alie', 'jamesn-alie', 1, '0000-00-00', 1, 1, 81, NULL, 0, 'IMG_750409-D2087A-7522F8-F8B804-85DAA4-8A63BF.jpg', '2017-03-19 07:44:04', 0, 0, 0, 0, 0, '', 'James N. Alie', 0, 1), +(22, 'Mima', '', 'Sobba-Stephens', 'mimasobba-stephens', 2, '0000-00-00', 1, 1, 84, NULL, 0, 'IMG_5AAD0D-5DC532-6BF31C-B484D9-55D3CD-633A86.jpg', '2017-03-19 07:48:30', 0, 0, 0, 0, 0, '', 'Mima Sobba-Stephens', 0, 1), +(23, 'Moiwa', '', 'Momoh', 'moiwamomoh', 1, '0000-00-00', 1, 1, 6, NULL, 0, 'IMG_85419F-908148-3BDA72-0B77F6-E9B9AA-0E1212.jpg', '2017-03-19 07:50:39', 0, 0, 0, 0, 0, '', 'Moiwa Momoh', 0, 1), +(24, 'Patrick', '', 'Lahai Kargbo', 'patricklahai-kargbo', 1, '0000-00-00', 2, 1, 39, NULL, 0, 'IMG_B29B59-08E5F7-43325E-F253CF-80604A-F9A8D7.jpg', '2017-03-19 07:53:12', 0, 0, 0, 0, 0, '', 'Patrick Lahai Kargbo', 0, 1), +(25, 'Ibrahim', '', 'Nox Sankoh', 'ibrahimnox-sankoh', 1, '0000-00-00', 2, 1, 97, NULL, 0, 'IMG_E938D2-E36348-2FCFD9-68C1F2-33BD37-39676B.jpg', '2017-03-19 07:55:04', 0, 0, 0, 0, 0, '', 'Ibrahim Nox Sankoh', 0, 1), +(26, 'Leonard', '', 'Fofanah', 'leonardfofanah', 1, '0000-00-00', 2, 1, 15, NULL, 0, 'IMG_817201-38485B-981BE4-4C912D-DFEB9B-C8EE8E.jpg', '2017-03-19 07:56:44', 0, 0, 0, 0, 0, '', 'Leonard Fofanah', 0, 1), +(27, 'Songowa', '', 'Bundu', 'songowabundu', 2, '0000-00-00', 2, 1, 61, NULL, 0, 'IMG_48557E-C3E373-85D4DC-2402D1-1C5F65-03A679.jpg', '2017-03-19 07:58:27', 0, 0, 0, 0, 0, '', 'Songowa Bundu', 1, 1), +(28, 'Albert', '', 'Deen Kamara', 'albertdeen-kamara', 1, '0000-00-00', 2, 1, 34, NULL, 0, 'IMG_8B3AF6-157D9A-9C760C-A57EEB-9FCE11-2E295A.jpg', '2017-03-19 07:59:47', 0, 0, 0, 0, 0, '', 'Albert Deen Kamara', 0, 1), +(29, 'Aiah', '', 'Dabundeh', 'aiahdabundeh', 1, '0000-00-00', 2, 1, 20, NULL, 0, 'IMG_7ACFB0-109C32-51A71A-FD3DD4-261F14-C8635F.jpg', '2017-03-19 08:02:41', 0, 0, 0, 0, 0, '', 'Aiah Dabundeh', 0, 1), +(30, 'Ibrahim', '', 'Ben Kargbo', 'ibrahimben-kargbo', 1, '0000-00-00', 2, 1, 30, NULL, 0, 'IMG_0D2A92-262314-CA34EE-6684EB-4545FA-5A957B.jpg', '2017-03-19 08:10:25', 0, 0, 0, 0, 0, '', 'Ibrahim Ben Kargbo', 0, 1), +(31, 'Suliaman', '', 'Muluku', 'suliamanmuluku', 1, '0000-00-00', 2, 1, 33, NULL, 0, 'IMG_0B89D2-53992E-88FAC6-0E7BD8-E30A68-911AFE.jpg', '2017-03-19 08:13:17', 0, 0, 0, 0, 0, '', 'Suliaman Muluku', 0, 1), +(32, 'Alex', '', 'M. J. Kainpumu', 'alexm-j-kainpumu', 1, '0000-00-00', 0, 2, 117, NULL, 0, 'IMG_BF6A40-CF8D86-D076D5-F68262-B32B83-12FE53.jpg', '2017-03-19 08:15:20', 0, 0, 0, 0, 0, '', 'Alex M. J. Kainpumu', 0, 1); + + + +-- +-- Table structure for table `menus` +-- + +CREATE TABLE IF NOT EXISTS `menus` ( + `id` tinyint(2) NOT NULL AUTO_INCREMENT, + `page_id` tinyint(2) NOT NULL DEFAULT '0', + `name` varchar(100) NOT NULL, + `content_type` varchar(20) NOT NULL, + `link` varchar(255) DEFAULT NULL, + `target` enum('_self','_blank') NOT NULL DEFAULT '_blank', + `position` tinyint(2) NOT NULL DEFAULT '0', + `active` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `content_id` (`active`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `news` +-- + +CREATE TABLE IF NOT EXISTS `news` ( + `id` tinyint(2) NOT NULL AUTO_INCREMENT, + `title` varchar(55) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `body` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `author` varchar(55) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `created` date NOT NULL DEFAULT '0000-00-00', + `active` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `pages` +-- + +CREATE TABLE IF NOT EXISTS `pages` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(150) NOT NULL, + `slug` varchar(50) NOT NULL, + `body` longtext, + `created` datetime NOT NULL, + `contact` tinyint(1) NOT NULL DEFAULT '0', + `faq` tinyint(1) NOT NULL DEFAULT '0', + `home_page` tinyint(1) NOT NULL DEFAULT '0', + `active` int(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `parties` +-- + +CREATE TABLE `parties` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(120) DEFAULT NULL, + `abbr` varchar(11) DEFAULT NULL, + `slug` varchar(120) DEFAULT NULL, + `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `parties` +-- + +INSERT INTO `parties` (`id`, `name`, `abbr`, `slug`, `created`) VALUES +(1, 'Sierra Leone People's Party', 'SLPP', NULL, '2017-01-08 11:27:16'), +(2, 'All Peoples Congress', 'APC', NULL, '2017-01-08 11:35:32'), +(3, 'Grand Alliance Party', 'GAP', NULL, '2017-01-08 11:38:41'), +(4, 'Peace and Liberation Party', 'PLP', NULL, '2017-01-08 11:39:11'), +(5, 'People's Democratic Party', 'PDP', NULL, '2017-01-08 11:39:39'), +(6, 'People's Movement for Democratic Change', 'PMDC', NULL, '2017-01-08 11:40:04'), +(7, 'Revolutionary United Front', 'RUF', NULL, '2017-01-08 11:40:20'), +(8, 'United National People's Party', 'UNPP', NULL, '2017-01-08 11:40:36'), +(9, 'Young People's Party', 'YPP', NULL, '2017-01-08 11:40:53'), +(10, 'National Alliance Democratic Party', 'NADP', NULL, '2017-01-08 11:41:09'), +(11, 'Unity for National Development', 'UND', NULL, '2017-01-08 11:41:29'); + + +-- +-- Table structure for table `recent` +-- + +CREATE TABLE IF NOT EXISTS `recent` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `lid` int(11) NOT NULL DEFAULT '0', + `user_id` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `settings` +-- + +CREATE TABLE `settings` ( + `site_name` varchar(100) NOT NULL, + `company` varchar(100) NOT NULL, + `site_url` varchar(150) NOT NULL, + `site_dir` varchar(60) DEFAULT NULL, + `site_email` varchar(50) NOT NULL, + `seo` tinyint(1) NOT NULL DEFAULT '0', + `perpage` tinyint(4) NOT NULL DEFAULT '10', + `backup` varchar(25) NOT NULL, + `thumb_w` varchar(3) NOT NULL, + `thumb_h` varchar(3) NOT NULL, + `img_w` varchar(5) NOT NULL, + `img_h` varchar(5) NOT NULL, + `show_home` tinyint(1) NOT NULL DEFAULT '1', + `show_slider` tinyint(1) NOT NULL DEFAULT '1', + `file_dir` varchar(200) DEFAULT NULL, + `short_date` varchar(50) NOT NULL, + `long_date` varchar(50) NOT NULL, + `time_format` varchar(20) DEFAULT NULL, + `dtz` varchar(120) DEFAULT NULL, + `locale` varchar(120) DEFAULT NULL, + `featured` tinyint(2) NOT NULL DEFAULT '10', + `popular` tinyint(2) NOT NULL DEFAULT '6', + `hlayout` tinyint(4) NOT NULL DEFAULT '0', + `homelist` tinyint(1) NOT NULL DEFAULT '4', + `free_allowed` tinyint(1) NOT NULL DEFAULT '0', + `logo` varchar(100) DEFAULT NULL, + `theme` varchar(30) DEFAULT NULL, + `psize` varchar(10) DEFAULT NULL, + `bills_description` text, + `committees_description` text, + `meetings_description` text, + `lang` varchar(10) DEFAULT NULL, + `currency` varchar(8) DEFAULT NULL, + `cur_symbol` varchar(6) DEFAULT NULL, + `reg_verify` tinyint(1) NOT NULL DEFAULT '1', + `auto_verify` tinyint(1) NOT NULL DEFAULT '1', + `reg_allowed` tinyint(1) NOT NULL DEFAULT '1', + `user_limit` int(6) NOT NULL DEFAULT '0', + `notify_admin` tinyint(1) NOT NULL DEFAULT '0', + `offline` tinyint(1) NOT NULL DEFAULT '0', + `offline_msg` text, + `offline_d` date DEFAULT NULL, + `offline_t` time DEFAULT NULL, + `metakeys` text, + `metadesc` text, + `analytics` text, + `mailer` enum('PHP','SMTP','SMAIL') DEFAULT NULL, + `smtp_host` varchar(150) DEFAULT NULL, + `smtp_user` varchar(50) DEFAULT NULL, + `smtp_pass` varchar(50) DEFAULT NULL, + `smtp_port` smallint(3) DEFAULT NULL, + `is_ssl` tinyint(1) NOT NULL DEFAULT '0', + `sendmail` varchar(100) DEFAULT NULL, + `version` varchar(10) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +-- +-- Dumping data for table `settings` +-- + +INSERT INTO `settings` (`site_name`, `company`, `site_url`, `site_dir`, `site_email`, `seo`, `perpage`, `backup`, `thumb_w`, `thumb_h`, `img_w`, `img_h`, `show_home`, `show_slider`, `file_dir`, `short_date`, `long_date`, `time_format`, `dtz`, `locale`, `featured`, `popular`, `hlayout`, `homelist`, `free_allowed`, `logo`, `theme`, `psize`, `bills_description`, `committees_description`, `meetings_description`, `lang`, `currency`, `cur_symbol`, `reg_verify`, `auto_verify`, `reg_allowed`, `user_limit`, `notify_admin`, `offline`, `offline_msg`, `offline_d`, `offline_t`, `metakeys`, `metadesc`, `analytics`, `mailer`, `smtp_host`, `smtp_user`, `smtp_pass`, `smtp_port`, `is_ssl`, `sendmail`, `version`) VALUES +('Memba-O!', 'Memba-O!', '', '', '', 1, 12, '', '300', '350', '0', '0', 1, 1, 'uploads', '%d %b %Y', '%B %d, %Y %I:%M %p', '%I:%M %p', 'Africa/Freetown', 'en_us_utf8,English (US)', 12, 6, 1, 4, 0, 'logo.png', 'camembao', '', '<p>A Bill is a proposal for a new law, or a proposal to change an existing law that is presented for debate before Parliament.</p><p>Bills are introduced in Parliament as Public Bills by either sitting MPs (Private Member's Bill) or representatives of Government (Government Bill) for examination, discussion and amendment.</p>', '<p>The Parliamentary Committees are empowered by Section 93 (3) of the 1991 Constitution of Sierra Leone to investigate or inquire into the activities or administration of such Government Ministries or Departments and Agencies (MDAs) as may be assigned to them, "and such investigation or inquiry may extend to proposals for legislation."&nbsp;</p><p>More specifically,&nbsp;they can&nbsp;review/scrutinize.</p><ol><li>The laws governing the administration and general operations of the &nbsp;MDAs assign to them.</li><li>The programmes, policy objectives of the MDAs, legislation, and the effectiveness of their implementation.</li><li>The immediate, medium and long term expenditure plans of the MDA and &nbsp;the effectiveness of the budget execution thereof</li><li>Analyze the relative success of the MDAs in meeting their objectives.</li><li>Exercise general oversight of the executive activities etc.</li></ol>', '<p>Parliament&nbsp;Committees in their line of work usually&nbsp;invite selected people or groups to appear before the committee to provide further evidence or answer questions from committee members in a bid to make informed recommendations to Parliament.</p><p>The media often attend and report on proceedings.&nbsp;After&nbsp;the public hearings are finished, the committee writes a report which is formally presented to the Parliament. Members of parliament often use evidence from a committee report to propose bills or amendments to existing laws. Sometimes these meetings are held in-camera, due to the sensitivity of the issues being discussed.</p>', 'en', '', '', 1, 1, 1, 0, 1, 0, '<p></p>', '0000-00-00', '00:00:00', 'sierra-leone, parliament, membao, mps, code4africa', 'Memba-O! aims to act as a parliamentary watchdog, enabling citizens to track what is going on in Parliament.', '', 'PHP', 'mail.hostname.com', 'yourusername', 'yourpass', 127, 0, '', '3.10'); + +-- +-- Table structure for table `sitting_attendance` +-- + +CREATE TABLE `sitting_attendance` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `sitting_id` int(11) NOT NULL DEFAULT '0', + `leader_id` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `sitting_attendance` +-- + +INSERT INTO `sitting_attendance` (`id`, `sitting_id`, `leader_id`) VALUES +(13, 1, 1), +(50, 2, 1), +(32, 3, 1), +(19, 1, 19), +(20, 1, 4), +(21, 1, 6), +(22, 1, 15), +(23, 1, 20), +(24, 3, 11), +(25, 3, 7), +(26, 3, 12), +(27, 3, 13), +(28, 3, 2), +(29, 3, 5), +(30, 3, 10), +(31, 3, 3), +(33, 3, 9), +(34, 3, 8), +(35, 3, 17), +(36, 3, 18), +(37, 3, 4), +(38, 3, 6), +(39, 3, 14), +(40, 3, 19), +(41, 3, 16), +(42, 2, 11), +(43, 2, 7), +(44, 2, 12), +(45, 2, 13), +(46, 2, 2), +(47, 2, 5), +(48, 2, 10), +(49, 2, 3), +(51, 2, 9), +(52, 2, 8), +(53, 2, 17), +(54, 2, 18), +(55, 2, 4), +(56, 2, 6), +(57, 2, 15), +(58, 2, 20), +(59, 2, 14), +(60, 2, 19), +(61, 2, 16); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `sitting_calendar` +-- + +CREATE TABLE `sitting_calendar` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `year` int(4) NOT NULL DEFAULT '0', + `date` datetime NOT NULL, + `sitting_type` int(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `sitting_calendar` +-- + +INSERT INTO `sitting_calendar` (`id`, `year`, `date`, `sitting_type`) VALUES +(1, 2017, '2017-01-04 00:00:00', 1), +(2, 2017, '2017-01-05 00:00:00', 1), +(3, 2017, '2017-01-06 00:00:00', 1); + +-- +-- Table structure for table `stats` +-- + +CREATE TABLE IF NOT EXISTS `stats` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `day` date NOT NULL DEFAULT '0000-00-00', + `lid` int(11) NOT NULL DEFAULT '0', + `hits` int(11) NOT NULL DEFAULT '0', + `uhits` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +-- +-- Table structure for table `users` +-- + +CREATE TABLE `users` ( + `id` int(11) NOT NULL, + `username` varchar(50) NOT NULL, + `password` varchar(80) NOT NULL, + `fname` varchar(100) NOT NULL, + `lname` varchar(100) NOT NULL, + `email` varchar(150) NOT NULL, + `newsletter` tinyint(1) NOT NULL DEFAULT '0', + `cookie_id` varchar(50) NOT NULL DEFAULT '0', + `token` varchar(50) NOT NULL DEFAULT '0', + `created` datetime DEFAULT '0000-00-00 00:00:00', + `avatar` varchar(50) DEFAULT NULL, + `address` varchar(150) DEFAULT NULL, + `city` varchar(100) DEFAULT NULL, + `state` varchar(100) DEFAULT NULL, + `zip` varchar(20) DEFAULT NULL, + `country` varchar(4) DEFAULT NULL, + `notes` text, + `info` text, + `lastlogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastip` varchar(16) DEFAULT NULL, + `userlevel` tinyint(1) NOT NULL DEFAULT '1', + `active` enum('y','n','t','b') NOT NULL DEFAULT 'n' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/setup/style.css b/setup/style.css new file mode 100644 index 0000000..9d5ce40 --- /dev/null +++ b/setup/style.css @@ -0,0 +1,253 @@ +@import url(http://fonts.googleapis.com/css?family=Roboto:300,400,700); +body { + font-family: "Roboto", sans-serif; + margin: 0px; + padding: 0px; + color: #fff; + text-rendering: optimizeLegibility; + font-weight: 400; + background: #333; + display: table; + margin: 0 auto; +} +div.field { + font-size: 12px; + font-weight: 700; + margin-bottom: 10px +} +.logo { + width: 820px; + margin: 20px auto; + text-align: center; + height:50px; + background-image: url(img/logo.png); + background-repeat: no-repeat; +} +a.no { + text-decoration: none +} +img { + border: none +} +.all { + background-image: none; + font-weight: 700 +} +.nav { + background: #4a1916; + border-radius: 3px; + box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.1), 0 1px 0 0 rgba(255,255,255,0.1); + font-weight: 300; + padding: 15px +} +input, +textarea, +select, +.inputbox-sml { + font-family: Arial, Helvetica, sans-serif; + font-size: 13px; + border: 2px solid #4a1916; + border-radius: 3px; + color: #fff; + background: rgba(0, 0, 0, 0.1); + padding: 8px 5px +} +input:focus, +textarea:focus { + background: rgba(0, 0, 0, 0.2) +} +select { + border: 1px solid #ccc; + border-radius: 5px; + -moz-border-radius: 5px; + padding: 4px 8px +} +a:active { + color: #000 +} +p { + font-size: 12px; + background: rgba(0,0,0,0.1); + border-radius: 4px; + box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.2), 0 1px 0 0 rgba(255,255,255,0.2); + margin: 5px 0 10px; + padding:10px +} +div#installation { + width: 800px; + background-color: #982420; + margin-right: auto; + margin-bottom: 20px; + margin-left: auto; + border-radius: 5px; + padding: 15px +} +table.inner-content { + background-color: #982420; + border-radius: 3px; + box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.2), 0 1px 0 0 rgba(255,255,255,0.2); + width: 100%; + border: 0; + border-collapse: collapse; + border-spacing: 0; +} +table.inner-content.data tr td:first-child { + width: 200px +} +table.inner-content thead tr th, +table.inner-content tbody tr td { + font-size: 14px; + font-weight: 300; + text-align: left; + background: #5e1f1c; + box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.2), 0 1px 0 0 rgba(255,255,255,0.2); + padding: 10px 5px +} +table.inner-content thead tr th:first-child{ + border-radius: 3px 0 0 0; +} +table.inner-content thead tr th:last-child{ + border-radius: 0 3px 0 0; +} +table.inner-content tbody tr td { + background: none; + box-shadow: 0 1px 0 0 rgba(255,255,255,0.1); + font-size: 12px +} +table.inner-content tbody tr td img { + vertical-align: middle +} +.lgn { + text-align: right; + margin: 0 10px 10px 0 +} +#copyright { + line-height: 16px; + text-align: center; + width: 492px; + margin: 0 auto 10px +} +div.error { + border: 1px solid #333; + color: #fff; + font-size: 11px; + font-weight: 300; + line-height: 20px; + background-color: #DA4141; + padding: 10px +} +.err { + color: #DA4141; + display: none; + font-size: 11px; + line-height: 16px; + white-space: nowrap; + padding: 0 0 0 20px +} +h2#install { + font-size: 32px; + line-height: 36px; + font-weight: lighter; + display: block; + height: 32px; + margin: 10px 0; + padding: 0 +} +h2#install img { + float: left; + margin-right: 10px +} +h3 { + font-size: 16px; + font-weight: 300; + box-shadow: 0 3px 0 0 rgba(255,255,255,0.1), 0 1px 0 0 rgba(0,0,0,0.2); + margin: 20px 0 10px; + padding: 0 0 5px +} +span.no { + color: #DA4141; + font-weight: 400 +} +span.yes { + color: #8BC31B; + font-weight: 400 +} +td.elem { + font-weight: 700; + vertical-align: top; + width: 150px +} +.license { + background-color: #FFF; + height: 400px; + width: 780px; + margin: 10px +} +td.item-desc { + padding-left: 15px +} +div.query { + border: 1px dotted #222; + color: #777; + font-size: 10px; + margin: 0 0 10px +} +div.qerror { + color: red; + font-size: 10px; + margin: 0 0 5px +} +div.db_errors { + border: 1px solid #777; + height: 300px; + overflow: scroll; + width: 300px; + margin: 10px 0 0; + padding: 5px +} +div.remove_install { + background-color: #4a1916; + border: 1px solid #333; + color: #fff; + font-weight: 300; + text-align: center; + padding: 5px 0 +} +.btn { + margin-top: 10px +} +form { + display: inline-block; + margin: 0; + padding: 0 +} +.btn button { + border: 2px solid #9f322d; + font-family: Roboto, Arial, Helvetica, sans-serif; + font-size: 14px; + color: #FFF; + background-color: #4a1916; + text-align: center; + cursor: pointer; + font-weight: 400; + -webkit-transition: all .35s ease; + -moz-transition: all .35s ease; + -o-transition: all .35s ease; + transition: all .35s ease; + outline: none; + margin: 0; + padding: 5px 20px +} +.btn button:hover { + background-color: #9f322d; + -webkit-transition: all .55s ease; + -moz-transition: all .55s ease; + -o-transition: all .35s ease; + transition: all .55s ease; + outline: none +} +.nav b, +a:link, +a:visited { + color: #8BC31B +} \ No newline at end of file diff --git a/setup/templates/configuration.tpl.php b/setup/templates/configuration.tpl.php new file mode 100644 index 0000000..d58bdbd --- /dev/null +++ b/setup/templates/configuration.tpl.php @@ -0,0 +1,81 @@ + +

General Configuration

+{$msg}" : '';?> +
+

Follow the 2 steps to have Memba-O! run on your server. It is recommended to install the sample data.

+

1. MySQL database configuration:

+ + + + + + + + + + + + + + + + + + + + + +
MySQL Hostname: + Please input correct MySQL hostname.
User Name: + Please input correct MySQL username.
Password:
Database Name: + Please input correct database name.
Install sample data:
+ +

2. Common configuration

+

Configure correct paths and URLs to your Memba-O! installation. Please select the camembao theme as your template.

+ + + + + + + + + + + + + + + + + + + + + +
URL:
Install Directory:" size="30"/>
Application Name:
Organisation Name:
Application Email:
+

3. Administrator configuration

+

Set your admin username and password. You will use these credentials to log into your administrator section and manage your data. All application notifications will be sent from this email and can be changed in your admin panel later.

+ + + + + + + + + + + + + +
Admin Username: + Please input correct admin username.
Admin Password: + Please input password.
Admin Password[confirm]: + Entered passwords do not match.
+
+ +    + +
+
\ No newline at end of file diff --git a/setup/templates/finish.tpl.php b/setup/templates/finish.tpl.php new file mode 100644 index 0000000..a7d5bf0 --- /dev/null +++ b/setup/templates/finish.tpl.php @@ -0,0 +1,40 @@ + +

Installation completed

+

Installation log:

+

A copy of the configuration file will be downloaded to your computer when you click the button 'Download config.ini.php'. You should upload this file to the same directory where you have placed the Memba-O! application files. After this is done, log in to your admin panel using the credentials you provided on the previous form.
+

+ + + + + + + + + + + + + + + +
Database Installation + Error during MySQL queries execution:
'; ?> + + OK'; ?> +
Configuration FileAvailable for download
+ Should you have issues creating the config file, save config.inc.php file to your local PC and then upload to the application's lib directory. Click here to view the content of config.ini.php file.
+
+ +
DELETE 'setup' directory from your server.
+
+
Please for security reasons chmod your /lib/ directory to 0755.
+
+ +    + +
\ No newline at end of file diff --git a/setup/templates/pre_install.tpl.php b/setup/templates/pre_install.tpl.php new file mode 100644 index 0000000..d7ad79c --- /dev/null +++ b/setup/templates/pre_install.tpl.php @@ -0,0 +1,120 @@ + + +

Pre-installation check

+

1. Server configuration

+

If any of these items are highlighted in red then please take actions to correct them. Failure to do so could lead to your installation not functioning correctly.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PHP SettingsCurrent SettingsRequired SettingsStatus
PHP Version:5.3+= '5.3') ? 'Good' : 'Bad'; ?>
Register Globals:Off' : 'Bad'; ?>
Safe Mode:Off' : 'Bad'; ?>
Magic Quotes GPC:Off' : 'Bad'; ?>
File Uploads:On' : 'Bad'; ?>
Php Memory:64MB= 64) ? 'Good' : 'Bad'; ?>
Session Auto Start:Off' : 'Bad'; ?>
+

2. Server Extensions

+

These settings are recommended for PHP in order to ensure full compatibility with Digital Downloads Pro. + However, Digital Downloads Pro will still operate if your settings do not quite match the recommended.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExtensionCurrent SettingsRequired SettingsStatus
MySqli:On' : 'Bad'; ?>
GD:On' : 'Bad'; ?>
Curl Enabled:On' : 'Bad'; ?>
ZIP:On' : 'Bad'; ?>
+

3. Directory & File Permissions

+

In order for Digital Downloads Pro to function correctly it needs to be able to access or write to certain files or directories. If you see "Unwriteable" you need to change the permissions on the file or directory to allow Digital Downloads Pro to write to it.

+ + + + + + + + + + + + +
.htaccessWriteable'; + else: + echo 'Unwriteable'; + endif; + ?>
Apache mod_rewrite
+
+ +    + +