public function render_msg() { $alert = get_alert(); if (!empty($alert)) { $type = $alert['type']; $msg = $alert['msg']; } else { if (!empty($this->mFlashMsg['error'])) { $type = 'danger'; $msg = implode('<br/>', $this->mFlashMsg['error']); } else { if (!empty($this->mFlashMsg['success'])) { $type = 'success'; $msg = $this->mFlashMsg['success']; } else { return ''; } } } return render_alert($type, $msg); }
<?php echo render_alert(); ?> <div class="row"> <div class="col-md-6"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Account Info</h3> </div> <div class="box-body"> <?php echo $form1->render(); ?> </div> </div> </div> <div class="col-md-6"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Change Password</h3> </div> <div class="box-body"> <?php echo $form2->render(); ?> </div>