diff --git a/wwwjuba/application/core/JUB_Controller.php b/wwwjuba/application/core/JUB_Controller.php
new file mode 100644
index 0000000..1a380fb
--- /dev/null
+++ b/wwwjuba/application/core/JUB_Controller.php
@@ -0,0 +1,80 @@
+ "
",
+ 'thead_open' => '',
+ 'thead_close' => '',
+ 'heading_row_start' => '',
+ 'heading_row_end' => '
',
+ 'heading_cell_start' => '',
+ 'heading_cell_end' => ' | ',
+ 'tbody_open' => '',
+ 'tbody_close' => '',
+ 'row_start' => '',
+ 'row_end' => '
',
+ 'cell_start' => '',
+ 'cell_end' => ' | ',
+ 'row_alt_start' => '',
+ 'row_alt_end' => '
',
+ 'cell_alt_start' => '',
+ 'cell_alt_end' => ' | ',
+ 'table_close' => '
'
+ );
+
+ public $data = array();
+
+ function __construct() {
+ parent::__construct();
+ }
+
+ protected function smart_htmlspecialchars($str) {
+ if (substr($str, 0, 1) == '<')
+ return $str;
+ return htmlspecialchars($str);
+ }
+
+ protected function sql_escape_func($inp) {
+ if (is_array($inp)) {
+ return array_map(__METHOD__, $inp);
+ }
+
+
+ if (!empty($inp) && is_string($inp)) {
+ return str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $inp);
+ }
+
+ return $inp;
+ }
+
+ protected function jubabox_webapi($action, $in, &$out) {
+ global $savvyext;
+ $ret = -1;
+ $in['pid'] = 115;
+
+ error_log("ret = $ret");
+ error_log(json_encode($out));
+
+ return $ret;
+ }
+
+ function formatedMesage($msgType, $theMessage) {
+ return "";
+ }
+
+ protected function renderPracticePage($page_name, $data) {
+ $this->load->view('secure/view_practice_header', $data);
+ $this->load->view('secure/' . $page_name, $data);
+ $this->load->view('secure/view_practice_footer', $data);
+ }
+
+
+ protected function renderAdminPage($page_name, $data) {
+ $this->load->view('admin/view_admin_header', $data);
+ $this->load->view('admin/' . $page_name, $data);
+ $this->load->view('admin/view_admin_footer', $data);
+ }
+
+
+}
diff --git a/wwwjuba/application/libraries/Member_Controller.php b/wwwjuba/application/libraries/Member_Controller.php
new file mode 100644
index 0000000..5b072da
--- /dev/null
+++ b/wwwjuba/application/libraries/Member_Controller.php
@@ -0,0 +1,21 @@
+input->post('username');
+ $_SESSION['firstname'] = $out["firstname"]; // $ret->firstname;
+ $_SESSION['lastname'] = $out["lastname"]; // $ret->lastname;
+ $_SESSION['email'] = $out["email"]; // $ret->email;
+ $_SESSION['user_id'] = $out["user_id"]; // $ret->id;
+ $_SESSION['pid'] = $out["pid"]; // $ret->id;
+ $_SESSION['loc'] = $out["loc"];
+ $_SESSION['practice'] = $out["practice"];
+ $_SESSION['PracticeID'] = $out["PracticeID"];
+ $_SESSION['UserId'] = $out["UserId"];
+ }
+
+ if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
+ $_SESSION['loc'] = $_SERVER['HTTP_CLIENT_IP'];
+ } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $_SESSION['loc'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ } else {
+ $_SESSION['loc'] = $_SERVER['REMOTE_ADDR'];
+ }
+ }
+
+ protected function testLoginInput(&$username, &$password,&$error_message, &$valid_entry) {
+ $valid_entry = true;
+ $username = trim($this->input->post('username'));
+ $password = trim($this->input->post('password'));
+ if ($username == '' or $password == '') {
+ $valid_entry = false;
+ $error_message = 'Enter a Username/Password & PracticeID to continue';
+ }
+ }
+
+}