⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

upload photo is not work, do you have solution?



oke_cnk
  • profile picture
  • Member

Posted 05 October 2012 - 06:12 AM

if i add image, this upload don't work and show message "abort"

tofayelahmed
  • profile picture
  • Member

Posted 07 October 2012 - 04:12 AM

Hello oke_cnk !
Try to comments the "ob_end_clean()" in application/libraries/grocery_crud.php.
It appears in 10 times in this file.

oke_cnk
  • profile picture
  • Member

Posted 08 October 2012 - 02:49 AM

how line add to comments the "ob_end_clean()" in [color=#282828][font=helvetica, arial, sans-serif]grocery_crud.php [/font][/color]tofayelahmed[color=#5A5A5A][font=helvetica, arial, sans-serif][size=4][background=rgb(216, 221, 232)]?[/background][/size][/font][/color]

tofayelahmed
  • profile picture
  • Member

Posted 08 October 2012 - 04:13 AM

Hi oke_cnk!
Check this attach file.[attachment=308:grocery_crud.php]

oke_cnk
  • profile picture
  • Member

Posted 08 October 2012 - 04:32 AM

Hi tofayelahmed ..
Thanks a lot for
i hope can work

oke_cnk
  • profile picture
  • Member

Posted 08 October 2012 - 06:47 AM

its same not work in my website.. do u are idea some else ??



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;
}

victor
  • profile picture
  • Member

Posted 09 October 2012 - 19:25 PM

HI! Try
 echo $_SERVER['HTTP_HOST'];
.

What result do you have?

oke_cnk
  • profile picture
  • Member

Posted 10 October 2012 - 03:51 AM

Hi victor,, my web has been work. That's problem not yet setting in set permission in project..

Thanks a lot for the suggestion

victor
  • profile picture
  • Member

Posted 10 October 2012 - 07:01 AM

post has been deleted. because it was silly))

oke_cnk
  • profile picture
  • Member

Posted 10 October 2012 - 07:52 AM

ok no problem victor