Skip to content

Commit

Permalink
CIAS updated to CI - v3.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kishor10d committed Jan 4, 2018
1 parent bc1429e commit d88c201
Show file tree
Hide file tree
Showing 220 changed files with 41,769 additions and 25,131 deletions.
10 changes: 5 additions & 5 deletions application/controllers/login.php
Expand Up @@ -51,16 +51,16 @@ public function loginMe()
{
$this->load->library('form_validation');

$this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|xss_clean|trim');
$this->form_validation->set_rules('password', 'Password', 'required|max_length[32]|');
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|trim');
$this->form_validation->set_rules('password', 'Password', 'required|max_length[32]');

if($this->form_validation->run() == FALSE)
{
$this->index();
}
else
{
$email = $this->input->post('email');
$email = $this->security->xss_clean($this->input->post('email'));
$password = $this->input->post('password');

$result = $this->login_model->loginMe($email, $password);
Expand Down Expand Up @@ -125,15 +125,15 @@ function resetPasswordUser()

$this->load->library('form_validation');

$this->form_validation->set_rules('login_email','Email','trim|required|valid_email|xss_clean');
$this->form_validation->set_rules('login_email','Email','trim|required|valid_email');

if($this->form_validation->run() == FALSE)
{
$this->forgotPassword();
}
else
{
$email = $this->input->post('login_email');
$email = $this->security->xss_clean($this->input->post('login_email'));

if($this->login_model->checkEmailExist($email))
{
Expand Down
26 changes: 13 additions & 13 deletions application/controllers/user.php
Expand Up @@ -42,7 +42,7 @@ function userListing()
}
else
{
$searchText = $this->input->post('searchText');
$searchText = $this->security->xss_clean($this->input->post('searchText'));
$data['searchText'] = $searchText;

$this->load->library('pagination');
Expand Down Expand Up @@ -110,24 +110,24 @@ function addNewUser()
{
$this->load->library('form_validation');

$this->form_validation->set_rules('fname','Full Name','trim|required|max_length[128]|xss_clean');
$this->form_validation->set_rules('email','Email','trim|required|valid_email|xss_clean|max_length[128]');
$this->form_validation->set_rules('fname','Full Name','trim|required|max_length[128]');
$this->form_validation->set_rules('email','Email','trim|required|valid_email|max_length[128]');
$this->form_validation->set_rules('password','Password','required|max_length[20]');
$this->form_validation->set_rules('cpassword','Confirm Password','trim|required|matches[password]|max_length[20]');
$this->form_validation->set_rules('role','Role','trim|required|numeric');
$this->form_validation->set_rules('mobile','Mobile Number','required|min_length[10]|xss_clean');
$this->form_validation->set_rules('mobile','Mobile Number','required|min_length[10]');

if($this->form_validation->run() == FALSE)
{
$this->addNew();
}
else
{
$name = ucwords(strtolower($this->input->post('fname')));
$email = $this->input->post('email');
$name = ucwords(strtolower($this->security->xss_clean($this->input->post('fname'))));
$email = $this->security->xss_clean($this->input->post('email'));
$password = $this->input->post('password');
$roleId = $this->input->post('role');
$mobile = $this->input->post('mobile');
$mobile = $this->security->xss_clean($this->input->post('mobile'));

$userInfo = array('email'=>$email, 'password'=>getHashedPassword($password), 'roleId'=>$roleId, 'name'=> $name,
'mobile'=>$mobile, 'createdBy'=>$this->vendorId, 'createdDtm'=>date('Y-m-d H:i:s'));
Expand Down Expand Up @@ -192,24 +192,24 @@ function editUser()

$userId = $this->input->post('userId');

$this->form_validation->set_rules('fname','Full Name','trim|required|max_length[128]|xss_clean');
$this->form_validation->set_rules('email','Email','trim|required|valid_email|xss_clean|max_length[128]');
$this->form_validation->set_rules('fname','Full Name','trim|required|max_length[128]');
$this->form_validation->set_rules('email','Email','trim|required|valid_email|max_length[128]');
$this->form_validation->set_rules('password','Password','matches[cpassword]|max_length[20]');
$this->form_validation->set_rules('cpassword','Confirm Password','matches[password]|max_length[20]');
$this->form_validation->set_rules('role','Role','trim|required|numeric');
$this->form_validation->set_rules('mobile','Mobile Number','required|min_length[10]|xss_clean');
$this->form_validation->set_rules('mobile','Mobile Number','required|min_length[10]');

if($this->form_validation->run() == FALSE)
{
$this->editOld($userId);
}
else
{
$name = ucwords(strtolower($this->input->post('fname')));
$email = $this->input->post('email');
$name = ucwords(strtolower($this->security->xss_clean($this->input->post('fname'))));
$email = $this->security->xss_clean($this->input->post('email'));
$password = $this->input->post('password');
$roleId = $this->input->post('role');
$mobile = $this->input->post('mobile');
$mobile = $this->security->xss_clean($this->input->post('mobile'));

$userInfo = array();

Expand Down
8 changes: 8 additions & 0 deletions application/views/errors/cli/error_404.php
@@ -0,0 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";
8 changes: 8 additions & 0 deletions application/views/errors/cli/error_db.php
@@ -0,0 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

echo "\nDatabase error: ",
$heading,
"\n\n",
$message,
"\n\n";
21 changes: 21 additions & 0 deletions application/views/errors/cli/error_exception.php
@@ -0,0 +1,21 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

An uncaught Exception was encountered

Type: <?php echo get_class($exception), "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $exception->getFile(), "\n"; ?>
Line Number: <?php echo $exception->getLine(); ?>

<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>

Backtrace:
<?php foreach ($exception->getTrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>

<?php endif ?>
8 changes: 8 additions & 0 deletions application/views/errors/cli/error_general.php
@@ -0,0 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

echo "\nERROR: ",
$heading,
"\n\n",
$message,
"\n\n";
21 changes: 21 additions & 0 deletions application/views/errors/cli/error_php.php
@@ -0,0 +1,21 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

A PHP Error was encountered

Severity: <?php echo $severity, "\n"; ?>
Message: <?php echo $message, "\n"; ?>
Filename: <?php echo $filepath, "\n"; ?>
Line Number: <?php echo $line; ?>

<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>

Backtrace:
<?php foreach (debug_backtrace() as $error): ?>
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
File: <?php echo $error['file'], "\n"; ?>
Line: <?php echo $error['line'], "\n"; ?>
Function: <?php echo $error['function'], "\n\n"; ?>
<?php endif ?>
<?php endforeach ?>

<?php endif ?>
11 changes: 11 additions & 0 deletions application/views/errors/cli/index.html
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>

<p>Directory access is forbidden.</p>

</body>
</html>
64 changes: 64 additions & 0 deletions application/views/errors/html/error_404.php
@@ -0,0 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>404 Page Not Found</title>
<style type="text/css">

::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }

body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}

a {
color: #003399;
background-color: transparent;
font-weight: normal;
}

h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}

code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}

#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}

p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
64 changes: 64 additions & 0 deletions application/views/errors/html/error_db.php
@@ -0,0 +1,64 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database Error</title>
<style type="text/css">

::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }

body {
background-color: #fff;
margin: 40px;
font: 13px/20px normal Helvetica, Arial, sans-serif;
color: #4F5155;
}

a {
color: #003399;
background-color: transparent;
font-weight: normal;
}

h1 {
color: #444;
background-color: transparent;
border-bottom: 1px solid #D0D0D0;
font-size: 19px;
font-weight: normal;
margin: 0 0 14px 0;
padding: 14px 15px 10px 15px;
}

code {
font-family: Consolas, Monaco, Courier New, Courier, monospace;
font-size: 12px;
background-color: #f9f9f9;
border: 1px solid #D0D0D0;
color: #002166;
display: block;
margin: 14px 0 14px 0;
padding: 12px 10px 12px 10px;
}

#container {
margin: 10px;
border: 1px solid #D0D0D0;
box-shadow: 0 0 8px #D0D0D0;
}

p {
margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
<div id="container">
<h1><?php echo $heading; ?></h1>
<?php echo $message; ?>
</div>
</body>
</html>
32 changes: 32 additions & 0 deletions application/views/errors/html/error_exception.php
@@ -0,0 +1,32 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>An uncaught Exception was encountered</h4>

<p>Type: <?php echo get_class($exception); ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $exception->getFile(); ?></p>
<p>Line Number: <?php echo $exception->getLine(); ?></p>

<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>

<p>Backtrace:</p>
<?php foreach ($exception->getTrace() as $error): ?>

<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>

<p style="margin-left:10px">
File: <?php echo $error['file']; ?><br />
Line: <?php echo $error['line']; ?><br />
Function: <?php echo $error['function']; ?>
</p>
<?php endif ?>

<?php endforeach ?>

<?php endif ?>

</div>

0 comments on commit d88c201

Please sign in to comment.