upload photo is not work, do you have solution?
- Single Page
Posted 05 October 2012 - 06:12 AM
Posted 07 October 2012 - 04:12 AM
Try to comments the "ob_end_clean()" in application/libraries/grocery_crud.php.
It appears in 10 times in this file.
Posted 08 October 2012 - 02:49 AM
Posted 08 October 2012 - 04:13 AM
Check this attach file.[attachment=308:grocery_crud.php]
Posted 08 October 2012 - 04:32 AM
Thanks a lot for
i hope can work
Posted 08 October 2012 - 06:47 AM
function employee()
{
$crud = new grocery_CRUD();
$crud->set_table('aap_employee');
$crud ->set_subject('Employee Profile')
->columns('employee_fullname','employee_datebirth','employee_placebirth','employee_gender','employee_photo','employee_alamat','employee_provinsi','employee_kota','employee_notlp')
->fields('employee_fullname','employee_datebirth','employee_placebirth','employee_gender','employee_photo','employee_alamat','employee_provinsi','employee_kota','employee_notlp')
->display_as('employee_fullname','Fullname')
->display_as('employee_datebirth','Tanggal Lahir')
->display_as('employee_placebirth','Tempat Lahir')
->display_as('employee_gender','Jenis Kelamin')
->display_as('employee_photo','Foto')
->display_as('employee_alamat','Alamat')
->display_as('employee_notlp','No Telepon')
->display_as('employee_provinsi','Provinsi')
->display_as('employee_kota','Kota')
->change_field_type('employee_datebirth','date')
->change_field_type('time_add','hidden')
->change_field_type('time_update','hidden');
$crud->set_js('assets/grocery_crud/js/jquery_plugins/config/jquery.tine_mce.config.js');
$crud->set_js('assets/grocery_crud/texteditor/jquery.tinymce.js');
$crud ->callback_before_insert(array($this,'employee_sebelum_insert'))
->callback_before_update(array($this,'employee_sebelum_update'));
$crud ->set_relation('employee_provinsi', 'aap_mstr_provinsi', 'nama_provinsi')
->set_relation('employee_kota', 'aap_mstr_kota', 'nama_kota');
$crud->set_field_upload('employee_photo','assets/uploads/foto');
$crud->callback_column('employee_photo',array($this,'pic_callback'));
$output = $crud->render();
$this->_v('config',$output);
}
function pic_callback($value, $row)
{
return $value.'<img src="http://aapialang.co.id/icare/assets/uploads/foto/'.$row->employee_photo.'" style= margin: 0px; align="center" class="foto_user">';
}
//Pengaturan Time insert
function employee_sebelum_insert($post_array)
{
$post_array['time_add'] = date('Y-m-d H:i:s');
return $post_array;
}
//Pengaturan Time update
function employee_sebelum_update($post_array)
{
$post_array['time_update'] = date('Y-m-d H:i:s');
return $post_array;
}
Posted 09 October 2012 - 19:25 PM
echo $_SERVER['HTTP_HOST'];.
What result do you have?
Posted 10 October 2012 - 03:51 AM
Thanks a lot for the suggestion
Posted 10 October 2012 - 07:01 AM
Posted 10 October 2012 - 07:52 AM