Commit 84b44f0a by Jansa Jose

Merge branch 'jansa'

parents 2807efc5 949e7d3e
...@@ -25,12 +25,12 @@ class Settings extends CI_Controller { ...@@ -25,12 +25,12 @@ class Settings extends CI_Controller {
if(isset($_POST) && !empty($_POST)){ if(isset($_POST) && !empty($_POST)){
$updateArray = $_POST; $updateArray = $_POST;
$updateArray['site_title'] = decrypt_data($updateArray['site_title']); $updateArray['site_title'] = encrypt_data($updateArray['site_title']);
$updateArray['mini_title'] = decrypt_data($updateArray['mini_title']); $updateArray['mini_title'] = encrypt_data($updateArray['mini_title']);
$updateArray['site_title'] = decrypt_data($updateArray['smtp_host']); $updateArray['site_title'] = encrypt_data($updateArray['smtp_host']);
$updateArray['smtp_username'] = decrypt_data($updateArray['smtp_username']); $updateArray['smtp_username'] = encrypt_data($updateArray['smtp_username']);
$updateArray['smtp_password'] = decrypt_data($updateArray['smtp_password']); $updateArray['smtp_password'] = encrypt_data($updateArray['smtp_password']);
$updateArray['ipok_fee'] = decrypt_data($updateArray['ipok_fee']); $updateArray['ipok_fee'] = encrypt_data($updateArray['ipok_fee']);
$result = $this->Settings_model->update_sitetitle($updateArray); $result = $this->Settings_model->update_sitetitle($updateArray);
if($result){ if($result){
$this->session->set_flashdata('message', array('message' => 'Successfully Changed', 'title' => 'Success !', 'class' => 'success')); $this->session->set_flashdata('message', array('message' => 'Successfully Changed', 'title' => 'Success !', 'class' => 'success'));
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div class="form-group col-xs-4"> <div class="form-group col-xs-4">
<label>Site Title</label> <label>Site Title</label>
<?php $site_title =encrypt_data($data['site_title']); ?> <?php $site_title =decrypt_data($data['site_title']); ?>
<input type="text" name="site_title" class="form-control required" placeholder="Enter Site Title" value="<?php echo $site_title;?>"> <input type="text" name="site_title" class="form-control required" placeholder="Enter Site Title" value="<?php echo $site_title;?>">
</div> </div>
<div class="form-group col-xs-4"> <div class="form-group col-xs-4">
...@@ -60,24 +60,24 @@ ...@@ -60,24 +60,24 @@
<div class="row"> <div class="row">
<div class="form-group col-xs-4"> <div class="form-group col-xs-4">
<label>SMTP Username</label> <label>SMTP Username</label>
<?php $smtp_username =encrypt_data($data['smtp_username']); ?> <?php $smtp_username =decrypt_data($data['smtp_username']); ?>
<input type="text" name="smtp_username" class="form-control required" placeholder="Enter SMTP Username" value="<?php echo $smtp_username;?>"> <input type="text" name="smtp_username" class="form-control required" placeholder="Enter SMTP Username" value="<?php echo $smtp_username;?>">
</div> </div>
<div class="form-group col-xs-4"> <div class="form-group col-xs-4">
<label>SMTP Password</label> <label>SMTP Password</label>
<?php $smtp_password =encrypt_data($data['smtp_password']); ?> <?php $smtp_password =decrypt_data($data['smtp_password']); ?>
<input type="text" name="smtp_password" class="form-control required" placeholder="Enter SMTP Password" value="<?php echo $smtp_password;?>"> <input type="text" name="smtp_password" class="form-control required" placeholder="Enter SMTP Password" value="<?php echo $smtp_password;?>">
</div> </div>
<div class="form-group col-xs-4"> <div class="form-group col-xs-4">
<label>SMTP Host</label> <label>SMTP Host</label>
<?php $smtp_host =encrypt_data($data['smtp_host']); ?> <?php $smtp_host =decrypt_data($data['smtp_host']); ?>
<input type="text" name="smtp_host" class="form-control required" placeholder="Enter Host Name" value="<?php echo $smtp_host;?>"> <input type="text" name="smtp_host" class="form-control required" placeholder="Enter Host Name" value="<?php echo $smtp_host;?>">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-xs-4"> <div class="form-group col-xs-4">
<br><label>IPOK Fee(in %)</label> <br><label>IPOK Fee(in %)</label>
<?php $ipok_fee =encrypt_data($data['ipok_fee']); ?> <?php $ipok_fee =decrypt_data($data['ipok_fee']); ?>
<input type="text" name="ipok_fee" class="form-control required" placeholder="Enter IPOK Fee" value="<?php echo $ipok_fee;?>"> <input type="text" name="ipok_fee" class="form-control required" placeholder="Enter IPOK Fee" value="<?php echo $ipok_fee;?>">
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment