if (isset ( $_GET ['d'] )) { $r = $db->select ( "select id,logo from ngo where id=" . $_GET ['d'] ); $row = $db->get_row ( $r, 'MYSQL_BOTH' ); if ($row ['logo'] == "") unlink ( "../uploads/" . $row ['logo'] ); $db->delete ( "delete from ngo where id=" . $row ['0'] ); //$db->print_last_query(); print ""; exit (); } if (! empty ( $_POST ['deleted_pdts'] )) { $r = $db->select ( "select id,logo from ngo where id IN(" . $_POST ['deleted_pdts'] . ")" ); while ( $row = $db->get_row ( $r, 'MYSQL_BOTH' ) ) { if ($row ['logo'] == "") unlink ( "../uploads/" . $row ['logo'] ); $db->delete ( "delete from ngo where id=" . $row ['0'] ); } //$db->print_last_query(); print ""; exit (); } ?>
insert_sql ( "insert into ngo(name,description,path)values('" . $_POST ['txt_name'] . "','" . $_POST ['txt_wysiwyg'] . "','" . $path1 . "')" ); //$db->print_last_query(); print ""; } ?>
update_sql ( "update ngo set name='" . $_POST ['txt_name'] . "',description='" . $_POST ['txt_wysiwyg'] . "',path='$i1' where id= " . $_GET ['id'] ); } //$db->print_last_query(); ?>