<label class="err"> assistenze attualmente in corso.</label> </th> </tr> <tr><th colspan="5"><br /></th></tr> <tr> <th>Rag. Sociale:</th> <th>Inizio:</th> <th>Trascorsi:</th> <th>Utente:</th> <th></th> </tr> <tr><th colspan="5"><hr /></th></tr> <?php foreach ($InCorso as $key => $field) { $inizio = Inverti_DataTime($field['inizio']); $diff = DateTimeDiff($field['inizio'], date("Y-m-d H:i:s")); ?> <tr> <td><?php echo $field['ragione_sociale']; ?> </td> <td><?php echo $inizio; ?> </td> <td><label class="err"><?php echo $diff, " ore"; ?> </label></td> <td><?php
public function forget_pass($code) { $data['code'] = $code; $rs = $this->users->check_code_for_repass($code); $data['id'] = $rs->id; $data['username'] = $rs->username; $time = DateTimeDiff(date('Y-m-d H:i:s'), $rs->date_repass) / 60; if ($time > 30) { $data['alert'] = "<div class='alert alert-danger text-center'>ระยะเวลา เปลี่ยนรหัสผ่าน หมด อายุ เกิน 30 นาที"; $data['alert'] .= "<a href='" . site_url('users/login') . "'><br><i class='glyphicon glyphicon-refresh'></i> ขอเปลี่ยนรหัสผ่านใหม่</a></div>"; $this->layout->setLayout('login_layout'); $this->layout->view('users/forget_view', $data); } else { if ($data['id'] != '') { $data['alert'] = ''; $this->layout->setLayout('login_layout'); $this->layout->view('users/forget_view', $data); } else { $this->layout->view('users/login_view'); } } }