diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 25eb0ea..d347798 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -79,6 +79,12 @@ $routes->group('user', ['filter' => 'role:user'], static function ($routes) { $routes->get('dashboard/viewAccess/(:any)', 'UserController::viewAccess/$1'); }); +// sampling +$routes->group('sampling', ['filter' => 'role:sampling'], static function ($routes) { + $routes->get('', 'samplingController::index'); + $routes->get('dashboard/viewAccess/(:any)', 'SamplingController::viewAccess/$1'); +}); + // fo $routes->group('fo', ['filter' => 'role:fo'], static function ($routes) { $routes->get('', 'FoController::index'); diff --git a/app/Controllers/SamplingController.php b/app/Controllers/SamplingController.php new file mode 100644 index 0000000..51781f4 --- /dev/null +++ b/app/Controllers/SamplingController.php @@ -0,0 +1,44 @@ +query($sql); + $results = $query->getResultArray(); + $data['data'] = $results; + $data['accessnumber'] = $accessnumber; + return view('sampling/dashboard_viewAccess', $data); + } + + public function changePass() { + if ($this->request->getMethod() === 'POST') { + $password1 = $this->request->getVar('password1'); + $password2 = $this->request->getVar('password2'); + $data['password1'] = $password1; + $data['password2'] = $password2; + if($password1 == $password2) { + $password = password_hash($password1,PASSWORD_DEFAULT); + $db = \Config\Database::connect(); + $sql = "update cmod.dbo.CM_USERS set PASSWORD='$password' where USERID='$userid'"; + $db->query($sql); + return redirect()->to("/"); + } else { + return redirect()->to("/auth/setpass/$userid")->with('flash_error', 'password is not the same.'); + } + } + return view('changePass'); + } +} diff --git a/app/Views/admin/dictChapters_index.php b/app/Views/admin/dictChapters_index.php index 02f152e..1b6deef 100644 --- a/app/Views/admin/dictChapters_index.php +++ b/app/Views/admin/dictChapters_index.php @@ -2,8 +2,10 @@ = $this->section('content') ?>
| ' + maptype + ' | ' + '' + hiscode+ ' | ' + liscode + ' | ' + '' + descs + ' | ' + '' + editBtn + ' | ' + diff --git a/app/Views/admin/dictTests_index.php b/app/Views/admin/dictTests_index.php index 9ba8154..d79b1d6 100644 --- a/app/Views/admin/dictTests_index.php +++ b/app/Views/admin/dictTests_index.php @@ -2,8 +2,10 @@ = $this->section('content') ?>
| ' + data[i].USERROLEID + ' | ' + '' + data[i].USERROLENAME+ ' | ' + '' + editBtn + ' | ' + diff --git a/app/Views/admin/users_index.php b/app/Views/admin/users_index.php index 484aeb6..560c636 100644 --- a/app/Views/admin/users_index.php +++ b/app/Views/admin/users_index.php @@ -2,6 +2,9 @@ = $this->section('content') ?>
| Order | +MR | +Patient | +Request | +Hosp | +Test | +Status | ++ + + + |
|---|
| Access# | : | =$accessnumber;?> |
|---|---|---|
| Patient | : | =$patnumber;?> - =$name;?> |
| Coll. | Recv. | Sample Name | Action | Comment |
|---|---|---|---|---|
| All | ++ + + + + | +|||
| Collection | ++ | "; + } else { + echo " | "; + } + if($tubestatus==4) { + echo " | "; + } else { + echo " | "; + } + echo " | $sampletext | "; + echo "+ + + + + | "; + echo "$comment | ";
+ echo " ";
+ }
+ ?>
+
+
Summit-CRM
+Summit-CRM
+