Exemplo n.º 1
0
function kirim_email_approve_pengajar($pengajar_id)
{
    $pengajar = get_row_data('pengajar_model', 'retrieve', array($pengajar_id));
    $login = get_row_data('login_model', 'retrieve', array(null, null, null, null, $pengajar_id));
    $tabel_profil = '<table border="1" cellspacing="0" cellpadding="5">
        <tr>
            <td valign="top">NIP</td>
            <td>' . $pengajar['nip'] . '</td>
        </tr>
        <tr>
            <td valign="top">Nama</td>
            <td>' . $pengajar['nama'] . '</td>
        </tr>
        <tr>
            <td valign="top">Jenis kelamin</td>
            <td>' . $pengajar['jenis_kelamin'] . '</td>
        </tr>
        <tr>
            <td valign="top">Tempat lahir</td>
            <td>' . $pengajar['tempat_lahir'] . '</td>
        </tr>
        <tr>
            <td valign="top">Tgl. Lahir</td>
            <td>' . tgl_indo($pengajar['tgl_lahir']) . '</td>
        </tr>
        <tr>
            <td valign="top">Alamat</td>
            <td>' . $pengajar['alamat'] . '</td>
        </tr>
    </table>';
    @kirim_email('email-template-approve-pengajar', $login['username'], array('nama' => $nama, 'nama_sekolah' => get_pengaturan('nama-sekolah', 'value'), 'tabel_profil' => $tabel_profil, 'url_login' => site_url('login')));
}
Exemplo n.º 2
0
 function lupa_password()
 {
     if (is_login()) {
         redirect('welcome');
     }
     $data = array();
     if ($this->form_validation->run('lupa_password') == true) {
         # retrieve
         $retrieve = $this->login_model->retrieve($id = null, $username = $this->input->post('email', true));
         $reset_kode = md5(time());
         # set reset kode
         $this->login_model->update($id = $retrieve['id'], $username = $retrieve['username'], $siswa_id = $retrieve['siswa_id'], $pengajar_id = $retrieve['pengajar_id'], $is_admin = $retrieve['is_admin'], $reset_kode = $reset_kode);
         # kirim email disini
         @kirim_email('email-template-link-reset', $retrieve['username'], array('link_reset' => site_url('login/reset_password/' . $reset_kode)));
         $this->session->set_flashdata('lupa_password', get_alert('success', 'Link reset password telah dikirimkan keemail anda.'));
         redirect('login/lupa_password');
     }
     $this->twig->display('lupa-password.html', $data);
 }