Home
MANUAL TECNICO
Contents
1. 26 id_file _GETT id Se genera la consulta a la tabla files apartir de la variable id_file obtenido por el metodo GET query SELECT FROM files WHERE id file id_file LIMIT 1 result pg_query conn query si no se obtienen resultados de la consulta que marco fallo de consulta if result echo Fallo query query lt br gt else si se generan resultados se crea la variable row asociando los resultados de la consulta row pg_fetch_assoc result ip rowf ip filename rowf file_name filename utf8_decode filename file filename IMnicia la descarga mediante la funcion down start down_start id_user id_file filename GetSize_down id_file file if file_exists filename f filename header Content Type application force download header Content Disposition attachment filename basename f header Content type application octet stream fp fopen f r fpassthru fp down_end id_user Envio notificacion al email de todos los q pertenecen al grupo queryg select from file grupo where id_file id_file consultag pg_query conn queryg columnag pg_fetch_assoc consultag id_grupo columnag id_grupo querym select from user grupo where id_user id_grupo consultam pg_query conn querym while columnam pg_fetch_assoc consultam senduser columnamI id_user query se
2. Se crean variables de sesion _SESSION connected 1 _SESSION usuario id_user se hace un update a la tabla users el cual cambia el valor de la sesion a si query UPDATE users SET sesion si where id_user id_user result pg_query conn query or die Fallo1 query query lt br gt Nos redirije a la pagina profile php header Location profile php 1 2 Funcionamiento del sistema de registro En el sistema de registro el usuario tendra que enviar sus datos mediante un formulario html estos datos se envian por m todo POST y se verifica si los datos coinciden procede a registrar el usuario ARCHIVO NEW_USER PHP lt php Se verifica si en realidad se envia algo del formulario de registro if isset _POST entrar De la misma se comprueba si se envia algo de los campos de usuario contrasena y nombre if isset _POST id_user amp amp isset _POST password amp amp isset _POST name Se incluye el archivo de conexion a la base de datos include dbconnect php se crea la variable id user apartir del dato enviado por POST id_user _POSTT id_user id_user filter_var id_user FILTER_SANITIZE_STRING se crea la variable name apartir del dato enviado por POST name _POST name name filter_var name FILTER_SANITIZE_STRING name htmlentities name se crea la variable password apartir del dato enviado por POST password POST password
3. se crea la variable nemail apartir del dato enviado por POST nemail _POST email se crea la variable avatar apartir del dato enviado por POST avatar images nueva png se realiza una consulta a la tabla usuarios enviando el dato de usuario query_1 SELECT FROM users WHERE id_user id_user result_1 pg_query conn query_1 or die Fallo query query lt br gt se crean las variables hora fecha y activacion hora date H i s 19 fecha date Y n d activacion uniqid Nerifica el resultado obtenido apartir de la consulta Si no existe algun usuario existente en la BD procede a realizar las siguientes funciones if pg_num_rows result_1 lt 0 En esta parte se hace una modificacion al campo de usuario Eliminan los caracteres asignados en el arreglo arreglo array a ND AI lr O SC S ea lo Na BA A CA O se crea la variable id_user ya limpia de caracteres especiales id_user str_replace arreglo id_user time time fecha del registro del usuario allowed no no se permite entrar hasta que revise su correo y valla al link type_user Normal tipo de usuario avatar2 resources img nenek png imagen por default se crea la carpeta del usuario con un md5 e uniqid name_folder_user md5 uniqid carpeta del usuario se realiza una insercion de datos a la tabla users query INSERT INTO users VALUES id_user name password
4. Para abrir una terminal se puede presionar la combinaci n de teclas Ctrl Alt T y en instantes aparecer una terminal para realizar operaciones En la terminal se procede a entrar como super usuario tecleando sudo s y posteriormente introduciendo la contrase a que el equipo solicita Una vez estando en modo root se procede a instalar y configurar Apache2 Php5 Postgresql para tener la aplicaci n de Nenek SAAC en el servidor lista y asi permitir la entrada de usuarios Despu s se proceder a instalar ADT Plugin para Eclipse 5 1 Instalacion de Apache2 Con una terminal en modo super usuario se procede a instalar el servidor web de apache2 tecleando en la terminal el comando descrito a continuaci n y seguido de la tecla enter apt get install apache2 root emmanuel pc home emmanuel sudo apt get install apache2f En seguida se muestra el proceso de instalaci n y la terminal nos pide nuestra autorizaci n para continuar con la instalaci n de apache2 Para autorizar basta con presionar la tecla S Y en el lenguaje ingles 0 N para cancelar Para comprobar que apache2 se ha instalado correctamente basta con abrir cualquier navegador web y teclear localhost en la barra de direcciones o URL y deber aparecer el mensaje It Works this is the default web page for this server 5 2 Instalaci n de Php5 El proceso para instalar el lenguaje de servidores Php5 es muy similar al anterior descrito la dife
5. 35 echo lt script gt document location href working_group php existe existe amp mostrar 1 lt script gt n gt 2 0 Funcionamiento para editar el perfil de usuario El usuario podr cambiar sus datos personales como la contrase a email nombre e imagen de perfil ARCHIVO EDIT_PROFILE PHP formulario para cambiar la contrase a lt form class well action lt php echo SERVER PHP_SELF id id_user gt method POST name pass gt lt p title Cambiar Contrase a gt lt php echo lang EDITAR_CAMBIAR_CONTRASENA gt lt p gt lt div gt lt div class d form gt lt label title Actual Contrase a gt lt php echo lang EDITAR_ACTUAL_CONTRASENA gt lt label gt lt div gt lt div class d form gt lt input type password id password name password gt lt div gt lt div gt lt div gt lt div class d form gt lt label title Nueva contrase a gt lt php echo lang EDITAR_NUEVA_CONTRASENA gt lt label gt lt div gt lt div class d form gt lt input type password id password name npassword gt lt div gt lt div gt lt div class d form gt lt button name Apply type submit value Apply title Guardar class btn btn primary gt lt php echo lang CUERPO_BTN_CARPETA gt lt button gt amp emsp lt div gt lt a href edit_profile php amp id lt php echo id_user gt title Atr amp aacute s gt lt img src
6. avatar hora Sfecha Sactivacion nemail Sname_fold er_user result pg_query conn query query2 INSERT INTO usuarios id_user password nombre email folder_user avatar time tipo usuario VALUES Sid_user password Sname Snemail Sname_tfolder_user Savatar2 time Stype_user query2 INSERT INTO usuarios VALUES id_user password result pg_query nenekcon query2 Parte donde se envia un mensaje al usuario donde se le da la bienvenida al sistema Nenek SAAC id_msg unigid fecha date Y m d hora date H i s asunto Bienvenido Nenek SAAC te da la Bienvenida msg Bienvenido id user tu contrasena es Spassword Nenek SAAC te da la Bienvenida y te invita a que uses las diferentes opciones de trabajo Grupos de trabajo Mensageria Interna y Almacenamiento de tus archivos personales query insert into mail values S id_msg TreeStore id_user S asunto 0 5msg hora Sfecha S id_user result pg_query conn query destinatario nemail asunto Activacion de cuenta Nenek SAAC link http www adaptivez org mx TreeStore activacion php activacion Sactivacion link lt a href link gt activar mi cuenta lt a gt cuerpo msg lt br gt Para activar tu cuenta en TreeStore entra a la siguiente direccion link headers MIME Version 1 0 r n headers Content type text html charset iso 8859 1 r n he
7. headers From TreeStore lt TreeStore adaptivez org mx gt r n mail destinatario fasunto cuerpo headers echo lt script gt document location href profile php id id_user lt script gt n Formulario donde se cambia la imagen del usuario lt form action lt php echo SERVER PHP_SELF id id_user gt method POST name login id login enctype multipart form data gt lt fieldset gt lt legend title Subir Archivo gt lt php echo lang EDITAR_SUBIR_ARCHIVO_TITLE gt lt legend gt lt input type hidden name MAX_FILE_SIZE value lt php echo value_size gt gt lt 5MB gt lt div class d form gt lt label gt lt php echo lang CUERPO_ARCHIVO gt lt label gt lt div gt lt div class d form gt lt input type file name upload gt lt div gt lt div class d form gt lt button id subir name subir type submit value Subir class form awesome btn btn primary title Subir gt lt php echo Slang EDITAR_SUBIR_ARCHIVO gt lt button gt lt div gt lt fieldset gt lt form gt Funcion php que perimte actualizar la imagen del perfil if isset _POST subir ruta profiles user_folder full_file FILES upload name tipo _FILES upload type file basename full_file target_path ruta file type pathinfo file 39 extension type extension if Sextension
8. lt tr gt lt td gt lt img src images close png alt Close title Close gt lt td gt echo lt td gt lt b gt envia lt td gt echo lt td gt lt b gt asunto lt td gt echo lt td gt lt a href mail php id_user id_user amp id_msg Sid_msg amp msg 1 amp type 1 amp mostrar 6 title ir gt lt i onclick refreshlit class fa fa arrow right fa 1x title K amp apos alej gt lt i gt amp nbsp lang CUERPO_TABLA_IR lt a gt lt td gt Mensaje no visto eliminar echo lt td gt lt a href eliminar_msg php id_user id_user amp id_msg id_msg amp msg 1 amp type 1 amp mostra r mostrar title Borrar gt lt i class fa fa times fa 1x title Pakuw gt lt i gt amp nbsp lang CUERPO_TABLA_BORRAR lt a gt lt td gt echo lt td gt lt b gt fecha lt td gt echo lt td gt lt b gt Hora lt td gt else echo lt tr gt lt td gt lt img src images open png alt Open name Abrir title Japiy gt lt td gt echo lt td gt envia lt td gt echo lt td gt asunto lt td gt echo lt td gt lt a href mail php id_user id_user amp id_msg Sid_msg amp msg 1 amp type 1 amp mostrar 6 title ir gt lt i onclick refreshit class fa fa arrow right fa 1x title K amp apos alej gt lt i gt amp nbsp lang CUERPO_TABLA_IR lt a gt lt td gt Mensaje visto eliminar echo lt td gt lt a
9. new JSONParser getting JSON string from URL JSONArray json jParser getUSONFromUrl url id user System out printin GruposTask Json pasandose return json Fin GruposTask 1 3 2 Archivos en los grupos Este apartado detalla una lista con los archivos que se encuentran en cada grupo de trabajo en el que un usuario se encuentre autorizado We need notify the adapter that the data have been changed archivosGrupoElegidoAdapter new SpecialAdapter context archivosGrupoElegido R layout archivos_item new String TAG_FILE TAG_ID TAG DATE TAG_TIME new ini R id vehicleType R id vehicleColor R id treadType R id horaType We need notify the adapter that the data have been changed setListAdapter archivosGrupoElegidoAdapter BaseAdapten archivosGrupoElegidoAdapter notifyDataSetChanged System out printin GroupFileTask Adaptador colocado super onPostExecute jsonUs selecting single ListView item lv getListView lv setTextFilterEnabled true 46 Iv setOnltemClickListener new OnltemClickListener Override public void onltemClick AdapterView lt gt parent View v int posicion long id TODO Auto generated method stub SuppressWarnings unchecked HashMap lt String String gt o HashMap lt String String gt lv getltemAtPosition posicion Obteniendo variables name_archivo o get nombre_file file_url o get url_movil Al
10. obteniendo variables para trabajar map put name varchivo obteniendo directo el nombre del map put tamano vtamano tama o map put type vtipo tipo map put fechas vfecha map put hora vhora map put url vurl jsonlist add map catch JSONException e TODO Auto generated catch block Toast makeT ext getApplicationContext getString R string ErrorArchivos Toast LENGTH_SHORT show e printStackTrace V fin catch fin for adapter new SpecialAdapter context jsonlist R layout archivos_item new String TAG_FILE TAG_SIZE TAG DATE TAG_TIME new int R id vehicleType R id vehicleColor R id treadType R id horaType We need notify the adapter that the data have been changed setListAdapter adapter BaseAdapter adapter notifyDataSetChanged System out printin Progres task Adaptador colocado super onPostExecute json selecting single ListView item lv getListView 43 lv setT extFilterEnabled true lv setOnltemClickListener new OnltemClickListener Override public void onltemClick AdapterView lt gt parent View v int posicion long id TODO Auto generated method stub SuppressWarnings unchecked HashMap lt String String gt o HashMap lt String String gt Iv getltemAtPosition posicion Obteniendo variables name_archivo o get name size o get tamano types o get type date o get fechas
11. time o get hora urlfile o get url Nueva actividad Intent i new Intent v getContext ArchivosElegido class add activity Bundle b new Bundle putExtra file name_archivo archivo putExtra id_user id usuario putExtra tam size tama o putExtra tipo types tipo putExtra fech date fecha putExtra horas time putExtra urlfile urlfile v getContext startActivity i y else Toast makeT ext getApplicationContext getString R string ErrorArchivos 2 Toast LENGTH_SHORT show pullToRefreshView onRefreshComplete protected JSONArray dolnBackground final String args if isCancelled return null JSONParser jParser new JSONParser getting JSON string from URL JSONArray json jParser getJSONFromUrl2 url id_user 1 System out printin ProgresTask Json pasandose return json 44 fin Progresstask 1 3 Funcionamiento de los grupos de trabajo Los grupos de trabajo se dividen en 3 secciones mis grupos archivos en los grupos trabajo colaborativo 1 3 1 Mis grupos de trabajo En esta secci n se detalla la l gica de los grupos que contiene un usuario para agregar usuarios y crear nuevos grupos private class GruposTask extends AsyncTask lt String Void JSONArray gt private ProgressDialog dialog private ListActivity activity private List lt Message gt
12. System out printin MyAsyncTask Aqui HttpParams httpParameters new BasicHttpParams HttpProtocolParams setContentCharset httpParameters HTTP UTF_8 HttpProtocolParams setHitpElementCharset httpParameters HTTP UTF_8 Create a new HttpClient and Post Header HttpClient httpclient new DefaultHttpClient HttpPost httppost new HitpPost getString R string ServicioURL getString R string LoginService System out printin MyAsyncTask Pasando url try Add your data List lt NameValuePair gt nameValuePairs new ArrayList lt NameValuePair gt nameValuePairs add new BasicNameValuePair myHttpData nombre nameValuePairs add new BasicNameValuePair password pass httppost setEntity new UrlEncodedFormEntity nameValuePairs HTTP UTF_8 System out printin MyAsyncTask Ejecutando envio de entidades Execute HTTP Post Request HttpResponse response httpclient execute httppost 41 HttpEntity enty response getEntity String text EntityUtils toString enty System out printin MyAsyncTask Retornando return text catch ClientProtocolException e TODO Auto generated catch block return Error con el servidor catch IOException e TODO Auto generated catch block return ErrorInternet V tin MyAsyncTask 1 2 Funcionamiento de la lista de archivos La lista de archivos es la ventana principal del usuario donde l puede ver sus contenidos de manera privada
13. amp nbsp lt th gt lt th gt Compartir amp nbsp amp nbsp lt th gt lt th gt Dueno lt th gt lt tr gt while row pg_fetch_assoc result grupo row nombre id_grupo row id_grupo dueno row dueno echo lt tr gt lt td gt grupo lt td gt echo lt td gt lt a href compartir_grupo php id id_user amp g id_grupo amp file id_file amp fn file amp gr grupo gt lt img src images compartir png alt Share title Share gt lt a gt lt td gt echo lt td gt dueno lt td gt 2 gt echo lt table gt 1 7 Funcionamiento para buscar archivos Para generar la b squeda de archivos se utilizan funciones con JavaScript HTML y PHP ARCHIVO PROFILE PHP Fragmento de c digo el cual genera la b squeda de los archivos en el archivo profile php Lista en la cual est el enlace el cual manda a llamar una funci n javascript la cual muestra un formulario donde se genera la consulta del archivo lt ul class nav nav pills gt lt li gt lt A HREF lt php echo 29 SERVER PHP_SELF id id_user amp mis_archivos 1 gt title Mis Archivos gt lt i class fa fa archive fa 1x gt 8nbsp lt i gt lt php echo Slang CUERPO_MIS_ARCHIVOS gt lt A gt lt li gt lt li gt lt A HREF lt php echo _ SERVER PHP_SELF id id_user amp grupos 1 gt title Mis Grupos de trabajo gt lt i class fa fa users fa 1x
14. images 2 png alt Atr amp aacute s title Atr amp aacute s gt amp nbsp lt php echo lang SOLICITUDES_ATRAS gt lt a gt lt p gt lt form gt funcion php donde comprueba que se envia algo del formulario y despues se haga una consulta a la base de datos donde se actualiza la nueva contrase a if isset _POST password 8 8 isset _POST npassword 36 password1 _POSTI password password2 _POST npassword if password1 pass query update users set password password2 where password password1 and id_user id_user result pg_query conn query echo lt script language javascript type text javascript gt alert Itmejits a Tsinat japixtalabil lt script gt else echo lt script language javascript type text javascript gt alert A tsinat japixtalabil yab jununul lt script gt Formulario donde se cambia el nombre del usuario lt form class well action lt php echo SERVER PHP_SELF id id_user gt method POST name name gt lt p gt ka jalk uy a Bij lt p gt lt div gt lt div class d form gt lt label title Nombre gt lt php echo lang CUERPO_NOMBRE_CARPETA gt lt label gt lt div gt lt div class d form gt lt input value lt php echo name gt readonly readonly id name name name gt lt div gt lt div gt lt div gt lt div class d form gt lt label title Nuev
15. Download k The Android SDK provides you the API libraries and Setting Up the ADT developer tools necessary to build test and debug Bundle apps for Android Setting Up an v A Existing IDE Ifyou re a new Android developer we recommend you y s download the ADT Bundle to quickly start developing Android Studio apps It includes the essential Android SDK Exploring the SDK components and a version of the Eclipse IDE with built in ADT Android Developer Tools to streamline Download the NDK your Android app development Workflow With a single download the ADT Bundle includes everything you need to begin developing apps Support Library v diia 5 paras Eclipse ADT plugin a Tanir Unin developer android com sdk index html linux bundle y Imagen de la p gina de descargas de Android developer Una vez descargado el ADT se crea una carpeta nueva con el nombre Android en el lugar donde se desee colocar este IDE y se busca dentro de la carpeta Eclipse el archivo eclipse Si se realiza desde una terminal usted puede ejecutar el comando dentro de la carpeta en la que se encuentre el archivo eclipse En caso de usar el modo grafico usted puede dar doble clic sobre el archivo que se muestra a continuaci n 12 lt i f Carpeta personal android adt bundle linux x86 20130917 eclipse Q v Lugares O recientes sl wai d d f Carpeta pers about_files configuration dropins features p2 mm Escritorio lt D06 Y
16. aMasTarde new Dialoginterface OnClickListener aqui mas tarde public void onClick Dialoginterface dialog int id Aqui ponemos el codigo a ejecutar al pulsar el boton Cancelar y AlertDialog alert alt_bld create 47 alert setTitle getString R string aListaGrupo Aqui ponemos el titulo de la ventana alert setlcon R drawable indicator_arrow Aqui ponemos el icono de la ventana alert show 1 3 3 Trabajo Colaborativo Esta secci n se utiliza para asignar tareas a los usuarios en un grupo de trabajo System out printin asignarTareaTask Mandando informacion HttpParams httpParameters new BasicHttpParams HttpProtocolParams setContentCharset httpParameters HTTP UTF_8 HttpProtocolParams setHttpElementCharset httpParameters HTTP UTF_8 Create a new HttpClient and Post Header HttpClient httpclient new DefaultHttpClient HttpPost httppost new HttpPost getString R string ServicioURL getString R string AsignarTarea System out printin asignarTareaTask Observando si try System out printin asignarTareaTask Se detiene Add your data List lt NameValuePair gt nameValuePairs new ArrayList lt NameValuePair gt nameValuePairs add new BasicNameValuePair id_user id_user nameValuePairs add new BasicNameValuePair tarea stringTituloTarea nameValuePairs add new BasicNameValuePair asignar asignar nameValuePairs add new B
17. gt amp nbsp lt i gt lt php echo lang CUERPO_MIS_GRUPOS_TRABAJO gt lt A gt lt li gt lt php if grupos 1 2 gt lt li gt lt a style cursor pointer onclick muestra_oculta contenido_a_mostrar title Buscar Archivos gt lt i class fa fa search fa 1x gt amp nbsp lt i gt lt php echo lang CUERPO_BUSCAR_ARCHIVOS gt lt a gt lt li gt lt li gt lt a style cursor pointer onclick muestra_oculta contenido_a_mostrar2 title Nueva Carpeta gt lt i class fa fa folder fa 1x gt amp nbsp lt i gt lt php echo lang CUERPO_NUEVA_CARPETA gt lt a gt lt li gt lt ul gt Formulario en el cual se genera la consulta del archivo a buscar lt Buscar Archivo gt lt div id contenido_a_mostrar gt lt form class well action lt php echo _SERVER PHP_SELF id id_user amp padre padre gt amp new 1 method POST name search id search gt lt fieldset gt lt legend title Buscar gt lt php echo lang CUERPO_BUSCAR_FILE gt lt legend gt lt div class d form gt lt label for file title Archivo gt lt php echo lang CUERPO_ARCHIVO gt lt label gt lt div gt lt div class d form gt lt input type text id file name file size 50px gt lt div gt lt div class d form gt lt label for extension title Extension gt Extension lt label gt lt div gt lt div class d form gt lt input type text id extension name exte
18. href eliminar_msg php id_user id_user amp id_msg Sid_msg amp msg 1 amp type 1 amp mostra r fmostrar title Borrar gt lt i class fa fa times fa 1x title Pakuw gt lt i gt 8nbsp lang CUERPO_TABLA_BORRAR lt a gt lt td gt echo lt td gt techa lt td gt 32 echo lt td gt Hora lt td gt echo lt tr gt lt th colspan 7 align right align center gt lt A HREF inicio_paginacion php id id_user amp inicio inicio amp pag_mail pag_mail amp m ostrar mostrar gt lt img class rooll src images inicio png width 28 height 18 title inicio gt lt A gt lt A HREF atras_paginacion php id id_user amp inicio inicio amp pag_mail pag_mail amp mo strar mostrar gt lt img class rooll src images atras png width 14 height 18 title atras gt lt A gt lt A HREF adelante_paginacion php id id_user amp inicio inicio amp pag_mail S pag_mail amp mostrar mostrar gt lt img class rooll src images adelante png width 14 height 18 title siguiente gt lt A gt lt A HREF fin_paginacion php id id_user amp inicio inicio amp pag_mail pag_mail amp mostr ar mostrar gt lt img class rooll src images fin png width 28 height 18 title fin gt lt A gt lt th gt lt tr gt echo lt tr gt echo lt table gt 1 9 Funcionamiento para crear grupos de tr
19. la l gica del funcionamiento se detalla con el siguiente c digo private class ProgressTask extends AsyncTask lt String Void JSONArray gt private ProgressDialog dialog private ListActivity activity private List lt Message gt messages public ProgressTask ListActivity activity this activity activity context activity dialog new ProgressDialog context progress dialog application context private Context context protected void onPreExecute this dialog setMessage getString R string Cargando this dialog show Override protected void onPostExecute JSONArray json if dialog isShowing dialog dismiss if json null jsonlist clear total 1 for int i 0 i lt json length i 42 archivo try JSONObject c json getUSONObject i String varchivo c getString TAG_FILE String vtamano c getString TAG_SIZE String vtipo c getString TAG_TYPE String vfecha c getString TAG_DATE String vhora c getString TAG_TIME String vurl c getString TAG_URL HashMap lt String String gt map new HashMap lt String String gt int in new Integer vtamano in in 1024 vtamano String valueOf in adding each child node to HashMap key gt value map put TAG_FILE varchivo map put TAG_SIZE vtamano Kb map put TAG_TYPE vtipo map put TAG_DATE vfecha map put TAG_TIME vhora
20. usuarios de la base de datos se debe teclear en una terminar la siguiente instrucci n nano etc postgresql 9 1 main pg_hba conf root emmanuel pc home emmanuel nano etc postgresql 9 1 main pg_hba conf E incluir ah la instrucci n que dar de alta a la base de datos local para que el servidor pueda acceder con libertad a ella mediante la siguiente l nea en la l nea 14 del archivo Host cenenek postgres 127 0 0 1 32 trust host cenenek postgres 127 0 0 1 32 trust Despu s de guardar este archivo nuevamente se reinicia el servicio de postgresql para que los cambios realizados surtan efecto con el siguiente comando etc init d postgresq restart root emmanuel pc home emmanuel etc init d po 6 3 Configuraci n de SDK Ahora que se tiene eclipse instalado se proceden a instalar los distintos emuladores de cada uno de los sistemas operativos con los que cuenta Android Hacer click en el icono de Android SDK y seleccionar los paquetes necesarios para instalar E Imagen del icono de SDK En nuestro caso se deber instalar como minimo todo el kit de Android 4 1 y 2 3 asi como tambi n todas las google API s que se ofertan 15 Android SDK Manager SDK Path Packages Wi Name API Rev Status gt EZ Android 4 3 API 18 gt EZ Android 4 2 2 API 17 gt Ez Android 4 1 2 API 16 gt EZ Android 4 0 3 API 15 gt Ez Android 4 0 API 14 gt Ez Android 3 2 API 13 gt Ez Android 3 1 AP
21. y se extraen los campos de la tabla donde se encuentran los mensajes del usuario ARCHIVO MAIL PHP Fragmento del c digo PHP que genera la consulta en la base de datos donde extrae los mensajes de cada usuario y los muestra en una tabla query select from mail where recibe id_user and dueno id_user and status 2 order by fecha desc hora desc limit 15 offset inicio result pg_query conn query if result echo Fallo query query lt hr gt else if pg_num_rows result 0 echo lt p title No hay mensajes gt Slang CUERPO_TABLA_NO_MENSAJES lt p gt else echo lt table class table table bordered gt lt thead gt lt tr gt lt th gt amp emsp lt th gt lt th title Enviado por gt lang CUERPO_TABLA_ENVIADO lt th gt lt th title Asunto gt lang CUERPO_TABLA_ASUNTO lt th gt lt th title Ir gt lang CUERPO_TABLA_IR lt th gt lt th title Borrar gt lang CUERPO_TABLA_BORRAR lt th gt lt th title Fecha gt lang CUERPO_TABLA_FECHA lt th gt 31 lt th title Hora gt Slang CUERPO_TABLA_HORA lt th gt lt tr gt lt thead gt while row pg_fetch_assoc result id_msg row id_msg envia row envia recibe row recibe asunto row asunto status row status cuerpo row cuerpo fecha row fecha Hora row hora if status 0 echo
22. AAC en ambientes m viles as como tambi n la aplicaci n nativa de Android 2 3 GingerBread a 4 1 JellyBean La implementaci n de Nenek SAAC en ambientes m viles web se basa en una adaptaci n para tel fonos m viles ya que se ha comprobado que conforme avanza la tecnolog a estos dispositivos cada vez adquieren mejor funcionamiento y mayor adaptabilidad a las diferentes tecnolog as en este caso el web por ello muchas personas han preferido este tipo de dispositivos ya que son m s pr cticos y f cil de llevar debido a su tama o y peso La implementaci n de la aplicaci n nativa de Android cuenta con una protecci n de la informaci n por lado del servidor as como tambi n se toma en cuenta los posibles ataques que pueden surgir en este nuevo medio y la utilizaci n de la misma es responsabilidad de cada usuario Resulta ser bastante f cil de implementar puesto solo es necesario instalar los paquetes b sicos disponibles en cualquier distribuci n de Ubuntu La interconexi n se centra en la gesti n de los contenidos producidos por las dem s aplicaciones que se encuentran en la plataforma de Nenek mx Con esto se tendr un control de las aplicaciones y se pueden generar estad sticas respecto a las preferencias de los usuarios 2 Aspectos del An lisis 2 1 Herramientas tecnologicas Los ambientes m viles abarcan un amplio mercado para los potenciales usuarios que se internan a las nuevas tecnolog as espec ficamente habla
23. AVD AVD Name Device Target CPU ABI Keyboard Skin Front Camera Back Camera Memory Options Internal Storage SD Card nuevo2 3 Nexus S 4 0 480 x 800 hdpi 2 Android 2 3 3 API Level 10 intel Atom x86 al Y Hardware keyboard present Display a skin with hardware controls None None gt RAM 343 VM Heap 32 200 Size Refresh File Cancel Creaci n de un nuevo AVD 87 Java Debug A 8A Of Poa 17 7 Funcionamiento de la aplicaci n para ambientes m viles En los siguientes funcionamientos se explica solo lo escencial para que funcionen las aplicaciones de la plataforma como por ejemplo realizar un registro control de acceso a la plataforma listado de archivos compartimiento de archivos etc 1 1 Funcionamiento del sistema de login En el sistema del login el usuario env a sus datos y se obtienen mediante un archivo que verifica si existe o no el usuario si existe permite el acceso al perfil ARCHIVO INDEX PHP lt IniciaPHP gt lt php session_start Se verifica si ya hay una sesi n activa si existe alguna lo redirige al archivo del perfil si no se queda en el index php if isset SESSION usuario header Location profile php else header index php Verifica el tipo de lenguaje seleccionado include_once common php Archivo que contiene la conexion a la base de datos i
24. Descargas dl dl ga D Documentos plugins readme about html artifacts xml eclipse Im genes star lt htmt P 2 ES plugi xmlns Af Af Af dd Musica ai pa ss s s H v deos eclipse ini epl v10 html hs_err_pid2556 log hs_err_pid3042 log hs_err_pid3106 log Papelera FA z Af FAt FAt FAt Af Dispositivos H sI SI H SI sI SI E volumen de hs_err_pid3111 log hs_err_pid3188 log hs_err_pid3561 log hs_err_pid4635 log hs_err_pid6702 log volume 2 O Volumen de E HA zipoe U GERA a s bs re Equipo hs_err_pid28982 hs_err_pid30582 icon xpm libcairo swt so notice html log log Red Examinar la Imagen del archivo eclipse ejecutable desde modo grafico 6 Configuracion de aplicaciones Para que las aplicaciones cumplan las funciones esperadas se deben configurar ciertos archivos internos de las mismas Para esto accederemos a una terminal en modo super usuario 6 1 Configuracion de apache2 La configuraci n de apache2 consta en modificar el directoryIndex para cambiar el orden de ejecuci n de archivos este se encuentra en el archivo dir conf para esto desde una terminal se debe teclear el siguiente comando nano etc apache2 mods enabled dir conf rootfGemmanuel pc home emmanuel nano Ah se encuentra el orden de ejecuci n de archivos por tanto se debe poner el archivo index php como primer archivo a ejecutar esto deber quedar as Directorylndex index php index cgi index pl inde
25. I 12 gt ER Android 3 0 API 11 gt Ez Android 2 3 3 API 10 gt Ez Android 2 2 API 8 gt Ex Android 2 1 API 7 gt Ca Android 1 6 API 4 gt Ez Android 1 5 API 3 A Android Support Repository 2 B Update available rev 3 El Android Support Library 18 B Update available rev 19 Show Y Updates New Y Installed Obsolete Select New or Updates Install 8 packages Sort by API level Repository Deselect All Delete 20 packages e Done loading packages Imagen del SDK Manager Ahora se debe crear un Android Virtual Device AVD el cual consiste de un emulador de un dispositivo celular Para ello se debe hacer click en el icono de Android AVD Imagen del icono de AVD Hacer click en new device y aparecera la siguiente ventana donde se debe elegir desde la versi n de Android que emulara el dispositivo la marca del tel fono su procesador etc tera 16 Java Nenek SAAC src com example nenek_saac Grupos java ADT CNS of lz Package Explore 2 Android Virtual Devices Device Definitions 8 gt S actionbarsherloch gt 2 AndroidDownloa gt 42 AndroidimageUpl gt 2 AndroidJSONpar gt 2 AndroidLoginAnd gt ES AndroidPostData gt 2 androidPostFile gt 4S AndroidSubirArck gt asincronas gt 59 AsyncTask gt 75 BankLogin gt 2 DownloadFileList gt 2 DownloadManag gt lt 3 DownloadManag gt 2 EscribirArchivosT gt 2 file
26. NObject c json getJSONObject i 49 String vtarea c getString TAG_TITULO String vuser c getString TAG_USER String vdesc c getString TAG_DESC String vfecha c getString TAG_FECHA String vstado c getString TAG_STAT String vinicio c getString TAG_INICIO String vid c getString TAG_ID HashMap lt String String gt map new HashMap lt String String gt adding each child node to HashMap key gt value map put TAG_TITULO vtarea map put TAG_USER vuser map put TAG_DESC vdesc map put TAG_FECHA vfecha map put TAG_STAT vstado Cambia por allowed o status map put TAG_INICIO vinicio map put TAG_ID vid AR RRR ami obteniendo variables para trabajar map put id String valueOf i numero de posicion dentro listview map put user vuser obteniendo el nombre del usuario map put desc vdesc descripcion de la tarea map put fecha vfecha fecha de solicitud map put titulo vtarea nombre de la tarea map put inicio vinicio linicio map put estado vstado lestado map put id_tarea vid tareaslist add map catch JSONException e TODO Auto generated catch block Toast makeText getApplicationContext getString R string ErrorArchivos Toast LENGTH_SHORT show e printStackTrace V fin catch fin for adapter new SpecialAdapter context tareaslist R layout archivos_item new String TAG_TITULO TAG_DESC TAG
27. PATIBLE ByteArrayOutputStream bos new ByteArrayOutputStream byte data bos toByteArray entity addPart uploaded new FileBody new File local_path mimeType entity addPart us new StringBody userT getText toString httpPost setEntity entity HttpResponse response httpClient execute httpPost localContext BufferedReader reader new BufferedReader new InputStreamReader response getEntity getContent UTF 8 String sResponse reader readLine System out printin sResponse return sResponse 1 7 2 Logica para descargar archivos Para descargar archivos se utiliza una de las clases reservadas de Android Download Manager esta funcionalidad se limita a versiones de API level 9 Android GingerBread 2 3 en adelante 51 dm DownloadManager getSystemService DOWNLOAD_SERVICE Request request new Request Uri parse file_url Restringe los tipos de conexion en las cuales se procedera la descarga request setAllowedNetworkTypes DownloadManager Request NETWORK_WIFI DownloadManager Request NETWORK_MOBILE Elige si la descarga se hara en una conexion con roaming request setAllowedOverRoaming false Descripcion de la descarga se mostrara en la notificacion si esta activada request setDescription getString R string Descarga La ubicacion donde se guardara el archivo en algun lugar de la memoria externa request setDestinationInExternalPublicDir NENEK SAAC a
28. Precise Pangolin o versiones superiores Manejador de Base de Datos Postgresq 9 1 Lenguaje de Programaci n PHP 5 4 HTML5 CSS3 Framework Bootstrap 2 8 JavaScript y Java JDK 7 Servidor de Aplicaciones Servidor Web Apache 2 0 Servidor Navegador Web Cualquier versi n de Google Chrome para trabajar en la aplicaci n y funciona en todos los exploradores Web IDE Android Developer Tools Plugin para Eclipse IDE Eclipse IDE SDK Tools Tel fono Celular Sistema operativo Android 2 3 GingerBread a 4 1 JellyBean 4 Diccionario de Datos Los datos a utilizar se manejaran en las tablas ya existentes de la base de datos de Nenek SAAC las cuales son users file_user tareas user_grupo files grupos file_grupo mail tareas Tabla 1 Estructura de la tabla users en la base de datos en Nenek SAAC Tipo A utilizar id_user Text name Text password Text o 9 3 3 O lt gt lt x lt hora time without time zone fecha Date sesion Text email Text folder_user Text lt gt lt gt lt Tabla 2 Estructura de la tabla file_user en la base de datos Nenek SAAC Tipo A utilizar autorizado text Id text X fecha text X Tabla 3 Estructura de la tabla tareas en la base de datos Nenek SAAC Campo Tipo A utilizar id_tarea text director text tarea text Inicio text x lt descripci n text id_user text id_grupo text allowed text lt gt lt gt lt status text Tab
29. R SEP 8 Institutos Tecnol gicos DIRECCI N GENERAL DE EDUCACI N SUPERIOR TECNOL GICA SEP INSTITUTO TECNOL GICO DE CD VALLES MANUAL TECNICO NENEK SAAC sistema adaptable para el almacenaje de contenidos producidos por comunidades virtuales de hablantes nativos CVLT Ingenier a en Sistemas Computacionales Emmanuel Dom nguez Izaguirre 09690078 Gerardo Alfredo Vazquez Mart nez 09690139 Selene Vega Guerrero 09690102 ASESOR INTERNO ASESOR EXTERNO Dr Jos Luis Gonz lez Compe n Dra Anuschka Johanna Van t Hooft t aamoy DO g PmIsaO ey Av Carr Al Ingenio Plan de Ayala km 2 Col Vista Hermosa Cd Valles S L P ME gt RSGC 589 C P 79010 Tels 01 481 381 20 44 y 381 46 05 Fax Ext 124 agar a anena e mail dir_itvalles dgest gob mx Pagina Web www itcdvalles edu mx ndice ils is JU oa TI AA cane scent cee E EAA 1 2 Aspectos O A de ee iS 2 3 Especificaciones T CNICAS it da 3 4 Diccionario d Datos avast ain eek in a nent nia 4 5 Instalaci n de aplicaciones ca ia 9 6 Configuraci n de aplicaciones ooonocccncinicininononcnnccnnnoncnnnnnnnononnnnnnnnnnnnnnncnnnnn 13 7 Funcionamiento de la aplicaci n para ambientes m viles 18 1 Funcionamiento de la aplicaci n nativa de Android 40 1 Introducci n El presente manual t cnico tiene como finalidad describir el dise o del prototipo para la gesti n de Nenek S
30. ValuePairs add new BasicNameValuePair id id_user nameValuePairs add new BasicNameValuePair usuario us nameValuePairs add new BasicNameValuePair password pass nameValuePairs add new BasicNameValuePair nuevoPassword newpass nameValuePairs add new BasicNameValuePair email email httppost setEntity new UrlEncodedFormEntity nameValuePairs HTTP UTF_8 email Execute HTTP Post Request HttpResponse response httpclient execute httppost HttpEntity enty response getEntity String text EntityUtils toString enty return text catch ClientProtocolException e TODO Auto generated catch block return ErrorServidor catch IOException e TODO Auto generated catch block return ErrorInternet La l gica para cambiar una imagen de perfil se puede apreciar en el punto 8 7 1 5 Funcionamiento de registro En el registro los nuevos usuarios pueden acceder a la plataforma de Nenek SAAC la forma en la que ellos ingresan se detalla a continuaci n 1 6 Funcionamiento de despliegue de tareas Al momento de recibir o asignar una tarea en grupos el usuario las puede visualizar en esta clase La l gica de muestra se aprecia en el siguiente c digo if json null tareaslist clear if TAG_DIRECTOR equals id_user TAG_STAT status TAG USER director else TAG_STAT allowed TAG_USER id_user for int i 0 i lt json length i try JSO
31. _USER TAG_FECHA new int R id vehicleType R id vehicleColor R id treadType R id horaType We need notify the adapter that the data have been changed setListAdapter adapter BaseAdapter adapter notifyDataSetChanged System out printin TareasTask Adaptador colocado super onPostExecute json 50 1 7 Funcionamiento de subir y descargar archivos En este apartado se detalla la funci n principal de Nenek SAAC para subir y descargar archivos ya sean im genes audio archivos comprimidos etc tera 1 7 1 L gica para subir archivos La subida de archivos se detalla a continuaci n obtengamos el tipo de extension ejemplo si es foto jpg image jpg etc String extention local_path substring local_path lastIndexOf String mimeTypeMap MimeTypeMap getFileExtensionFromUrl extention String mimeType MimeTypeMap getSingleton getMimeTypeFromExtension mimeT ypeMap Bien empecemos con la subida HttpParams httpParameters new BasicHttpParams HttpProtocolParams setContentCharset httpParameters HTTP UTF_8 HttpProtocolParams setHttpElementCharset httpParameters HTTP UTF_8 Haciendo la conexion HttpClient httpClient new DefaultHtipClient HttpContext localContext new BasicHttpContext HitpPost httpPost new HttpPost getString R string ServicioURL getString R string SubirService MultipartEntity entity new MultipartEntity HttpMultipartMode BROWSER_COM
32. abajo El funcionamiento para crear grupos de trabajo se basa en que cada usuario registrado pueda crear un grupo o tambien agregarse a otro grupo creado por otra persona registrada en la plataforma Nenek SAAC y asi poder compartir archivos ARCHIVO WORKING_GROUP PHP En este fragment de codigo se genera una lista de opciones entre la cual esta la de crear nuevo grupo lt ul class nav nav pills gt lt li gt lt A HREF lt php echo _SERVER PHP_SELF id_user id_user amp mostrar 1 gt title Nuevo Grupo gt lt i class fa fa plus square fa 1x title Nuevo Grupo gt lt i gt amp nbsp lt php echo lang GRUPOS_TRABAJO_NUEVO_GRUPO gt lt A gt lt li gt lt li gt lt A HREF lt php echo 33 _SERVER PHP_SELF id_user id_user amp mostrar 2 gt title Agregar usuarios a mis grupos gt lt i class fa fa plus fa 1x title Nuevo Grupo gt lt i gt amp nbsp lt i class fa fa user fa 1x title Nuevo Grupo gt lt i gt amp nbsp lt php echo Slang GRUPOS_ADD_USUARIOS_GRUPO gt lt A gt lt li gt lt li gt lt A HREF lt php echo _SERVER PHP_SELF id_user id_user amp mostrar 3 gt title Agregarme a otros grupos gt lt i class fa fa plus square fa 1x title Nuevo Grupo gt lt i gt amp nbsp lt php echo Slang GRUPOS_ADD_OTROS_GRUPOS gt lt A gt lt li gt lt li gt lt A HREF lt php echo _ SERVER PHP_SELF id_user id_user amp mostrar 4 gt
33. aders From Nenek SAAC lt TreeStore adaptivez org mx gt r n 20 mail destinatario fasunto cuerpo headers if ISresult echo Fallo query query lt hr gt if ISresult echo Fallo query query lt br gt else ruta profiles name folder user file1 index2 php file2 index php mkdir ruta 0777 true chmod ruta 0777 copy file1 ruta file2 include disperse_folders php header Location index php msg id_user else echo lt script language javascript type text javascript gt alert Ya existe un usuario con ese ID lt script gt else echo lt script language javascript type text javascript gt alert Debes llenar todos los campos lt script gt 2 gt 1 3 Funcionamiento del sistema de listado de archivos El listado de archivos se muestra en una tabla la cual contiene archivos con diferentes acciones como descargar archivo eliminar o compartirlo ARCHIVO PROFILE PHP Lista de Archivos mostrados en el perfil if Smis_archivos 1 Smostar_list 2 mostar_list 1 88 grupos 1 echo lt h3 gt lt p title Mis Archivos gt lang CUERPO_MIS_ARCHIVOS lt p gt lt h3 gt opcion 1 Funcion que muestra la lista de archivos en el perfil de usuario list_files id_user mostar_list file_search extension_search inicio redundancia compartido i d_grupo status
34. asicNameValuePair fin stringFecha nameValuePairs add new BasicNameValuePair desc stringDescripcionTarea user que recibe la tarea nameValuePairs add new BasicNameValuePair asign stringTareaUsuario grupo que recibe la tarea nameValuePairs add new BasicNameValuePair grupoasign stringTareaGrupo httppost setEntity new UrlEncodedFormEntity nameValuePairs HTTP UTF_8 Execute HTTP Post Request HttpResponse response httpclient execute httppost HttpEntity enty response getEntity String text EntityUtils toString enty return text 1 4 Funcionamiento de editar perfil Para editar el perfil un usuario puede subir una imagen de perfil cambiar su contrase a nombre y correo La l gica para cambiar la informaci n de un usuario se muestra a continuaci n public String postData String valuelWantToSend HttpParams httpParameters new BasicHttpParams HttpProtocolParams setContentCharset httpParameters HTTP UTF_8 HttpProtocolParams setHttpElementCharset httpParameters HTTP UTF_8 Create a new HttpClient and Post Header HttpClient httpclient new DefaultHtipClient 48 HttpPost httppost new HtipPost getString R string ServicioURL getString R string PerfilService try Add your data List lt NameValuePair gt nameValuePairs new ArrayList lt NameValuePair gt System out printin Variables id user us pass newpass name
35. browser ans wig 8 List of existing Android Virtual Devices located at home gerardo android avd AVD Name Android Virtual Device Manager Target Name Y android2 3 s Android 2 2 Y android 4 2 Y Avalid Android Virtual Device A repairable Android Virtual Device gt An Android Virtual Device that failed to load Click Details to see the error Android 4 2 2 Platform APiLevel CPU ABI 2 2 8 ARM armeabi Edit 4 2 2 17 ARM armeabi v7 Delete Repair Details Start Refresh Android Virtual Device Manager crear nuevo AVD amp Java Debug 218 GA DH oma Nota Entre mayor sea la capacidad de su AVD mas recursos consumira de su computadora Se recomienda crear un dispositivo 2 3 y uno 4 1 para realizar las pruebas boty HE Package Explore B gt 8 actionbarsherlock gt 2 AndroidDownloac gt 19 AndroidimageUpl gt 2 AndroidJSONpars gt 2 AndroidLoginAnd gt ES AndroidPostData gt 2 androidPostFile gt 99 AndroidSubirArch gt asincronas gt 2 AsyncTask gt 75 BankLogin gt 2 DownloadFileList gt 2 DownloadManage gt 2 DownloadManage gt 2 EscribirArchivosT gt 43 filebrowser O x Android Virtua List of existin AVD Name Y android2 3 Y android 4 Y Avalid Anc X An Androit A Java Nenek SA AC src com example nenek_saac Grupos java ADT Create new Android Virtual Device
36. c images adelante png width 14 height 18 title siguiente gt lt A gt lt A HREF fin_paginacion php id id_user amp inicio inicio src images fin png width 28 height 18 title fin gt lt A gt lt th gt echo lt tr gt echo lt table gt gt lt img class rooll gt lt img class rooll gt lt img class rooll 1 4 Funcionamiento del sistema de subida de archivos Para poder subir archivos a Nenek SAAC se requiere seleccionar el archivo en el formulario que se encuentra en profile php al subir el archivo se envia a la funcion php que comprueba que sea un archivo permitido si es asi procede a subirlo a la carpeta del usuario ARCHIVO PROFILE PHP Vefrifica si se envia algo en el formulario para subir archivos if isset _POST subir ok error Se crea la variable de la ruta donde se encuentra la carpeta del usuario target_path profiles user_folder se verifica si la direccion de carpeta del usuario existe para darle permisos de escritura if is_dir target_path Do nothing chmod profiles Suser_folder 0777 si no existe el directorio se crea y se le dan permisos else mkdir profiles S6user_folder 0777 Se asigna una variable al archivo subido full_file explode 6_ FILES upload name Se verifica la extension del archivo extension full_file 1 se crea un arreglo el cual sirv
37. dueno opcion padre lang 21 ARCHIVO CONFIG PHP funci n en la cual se generan las consultas y se crea la tabla en la cual se enlistan los archivos del usuario function list_files id_user mostar_list file_search extension_search inicio redundancia compartido id_grupo s tatus dueno opcion padre lang Se incluye el archivo de conexion con la bd include dbconnect php if Smostar_list 1 if Sinicio inicio 0 if padre query SELECT FROM files WHERE id user id_user and padre padre order by type id file desc limit 15 offset inicio else if compartido 1 d 1 query select from files file grupo where file_grupo id_grupo id_grupo and file_grupo id_file files id_file order by files type files id_file else query SELECT FROM files WHERE id user id_user and padre order by type id file desc limit 15 offset inicio result pg_query conn query if ISresult echo Fallo query query lt hr gt else if pg_num_rows result 0 echo lang TABLA_SIN_ARCHIVOS else echo lt table class table table bordered gt lt thead gt lt tr gt lt th title Archivos gt lang TABLA_ARCHIVOS lt th gt lt th colspan 4 title Opciones gt Opciones lt th gt lt th gt Logs lt th gt lt tr gt lt thead gt while row pg_fetch_assoc result id_file row id_file folde
38. er para eliminar los caracteres especiales al archivo subido arreglo array E E HY Sa ae A O A o E Da Be E A E files str_replace arreglo full_file O se crea la variable del archivo al cual se le asigna un date para verificar la fecha de subida mas la extension del archivo file files _ date h i Sextension 24 IRUTA PARA LA APK y lo Jquery ip SERVER SERVER_ADDR ruta_movil http ip nenek cenenek profiles user_folder file tipo_movil FILES upload type nombre_movil file size_file FILES upload size termina se genera la ruta del archivo completa target_path target_path file type pathinfo file Nerifica si la extension del archivo es exe bin php si es asi el archivo no se sube y envia un mensaje de archivo no permitido if extension exe extension bin extension php extension echo lt script language javascript type text javascript gt alert Tipo de archivo no Permitido lt script gt else Nerifica si ya existe el archivo if file_exists target_path ok lt small style font size 100 title Ya existe gt Ta kuajtits lt small gt file else si no existe el archivo lo mueve a la ruta de la carpeta del usuario if move_uploaded_file _FILES upload tmp_name target_path while file_exists target_path Hold on til it exists if file_exis
39. ertDialog Builder alt_bld new AlertDialog Builder Grupos this alt_bld setMessage getString R string aDescargar setCancelable false setPositiveButton getString R string aSi new DialogInterface OnClickListener en la alerta le dices que si public void onClick DialogInterface dialog int id Aqui ponemos el codigo a ejecutar al pulsar el boton guardar dm DownloadManager getSystemService DOWNLOAD_ SERVICE Request request new Request Uri parse file_url Restringe los tipos de conexion en las cuales se procedera la descarga request setAllowedNetworkTypes DownloadManager Request NETWORK_WIFI DownloadManager Request NETWORK_MOBILE Elige si la descarga se hara en una conexion con roaming request setAllowedOverRoaming false Descripcion de la descarga se mostrara en la notificacion si esta activada request setDescription getString R string Descarga La ubicacion donde se guardara el archivo en algun lugar de la memoria externa request setDestinationInExternalPublicDir NENEK SAAC name_archivo Colocando que la notificacion sea visible siempre que se termine la descarga if Build VERSION SDK_INT gt Build VERSION_CODES HONEYCOMB request setNotificationVisibility DownloadManager Request VISIBILITY_VISIBLE_NOTIFY_COMPLETED else request setShowRunningNotification true enqueue dm enqueue request setNegativeButton getString R string
40. este modulo conecta el servidor apache2 con el lenguaje de servidores php5 para instalarlo se teclea en una terminal la siguiente instrucci n apt get install libmod apache2 php5 root emmanuel pc home emmanuel sudo apt get install libapache2 mod phps 5 5 Instalacion de ADT plugin para Eclipse La instalacion del IDE para desarrollar en el sistema operativo Android tiene como nombre ADT existen diversas formas de instalar este IDE pero en este apartado se explica la forma m s sencilla de obtener este IDE listo para desarrollar Este plugin consta del IDE Eclipse un entorno de Java y el Software Development Kit SDK para Android Se comienza abriendo un navegador diferente a internet explorer 9 y se teclea la siguiente direcci n en su URL http developer android com tools index html Despu s ah acceder a la secci n Download y presionamos el bot n que dice Download the SDK ADT Bundle for Linux Este IDE tiene un peso aproximado de 430 megabytes por lo demorara un poco en conexiones de internet lentas 11 Android SDK Android Developers Chromium tig Android SDK Android De x lt D developer android com sdk index ZQU GM Nemeto instal Android Nueva pesta a android Brows Tutorial Subien J Uploading files y kwi 1 Developers Design Develop Distribute Q Training API Guides Reference Tools Google Services Samples Developer Tools Get the Android SDK a
41. exe extension bin error lt small style font size 100 title Tipo de archivo no permitido gt Axe xi t amp apos olab yab a wit amp apos al ka dhyagapos lt small gt else if move_uploaded_file _FILES upload tmp_name target_path while file_exists target_path Hold on til it exists if file_exists target_path query update users set avatar target_path where id_user id_user result pg_query conn query ok lt small style font size 100 title El archivo gt An t amp apos olab lt small gt basename _FILES upload name lt small style font size 100 title fue subido con amp eacute xito gt k amp apos adhij alwa amp apos lt small gt chmod target_path 0777 header Location edit_profile php else error lt small style font size 100 title Error al subir el archivo intente de nuevo gt Yab alwa amp apos k amp apos adhij an t amp apos olab ka taka amp apos junil lt small gt 1 Funcionamiento de la aplicacion nativa de Android Con todo ahora funcionando se explicar ahora el funcionamiento de la aplicaci n de nativa de Android la cual se maneja en Java 1 1 Funcionamiento del sistema de login El login consta de la obtencion de datos del usuario para posteriormente validarlo y por ultimo permitirle el acceso al usuario El siguiente c digo muestra la l gica para el login Tarea ejecutada p
42. gt lt div gt lt div gt lt div gt lt div class d form gt lt label title Nuevo Correo gt lt php echo lang EDITAR_NUEVO_EMAIL gt lt label gt lt div gt lt div class d form gt lt input id nemail name nemail gt lt div gt lt div gt lt button class btn btn primary name Apply type submit value Apply title Guardar gt lt php echo lang CUERPO_BTN_CARPETA gt lt button gt lt a href edit_profile php amp id lt php echo id_user gt title Atr amp aacute s gt lt img src images 2 png alt Atr amp aacute s title Atr amp aacute s gt amp nbsp lt php echo lang SOLICITUDES_ ATRAS gt lt a gt lt p gt lt form gt Funcion php que actualiza el email del usuario if isset _POST nemail nemail _POST nemail query update users set email nemail where id_user id_user result pg_query conn query 38 echo lt script language javascript type text javascript gt alert Itmejits a Bukudh kaw lt script gt activacion uniqid query update users set sesion si where id_user id_user result pg_query conn query destinatario nemail asunto Bienvenido a TreeStore link http www adaptivez org mx TreeStore cuerpo Bienvenido a TreeStore tu almacenamiento de archivos en la nube headers MIME Version 1 0 r n headers Content type text html charset iso 8859 1 r n
43. id Enviar name Enviar type submit value Enviar title Enviar gt lt php echo lang CUERPO_MENSAJES_ENVIAR gt lt button gt lt div gt lt fieldset gt 34 lt hr gt lt form gt ARCHIVO NEW_GRUPO PHP lt php include dbconnect php include sesion php Se crea la variable id user apartir de la variable de sesion id_user _SESSION usuario id_user GET id_user id_user utf8_encode id_user grupo POST grupo password md5 password echo id_user grupo exit id_grupo unigid query SELECT FROM grupos WHERE nombre grupo and dueno id_user result pg_query conn query or die Fallo query query lt br gt if pg_num_rows result lt 0 existe no fecha date Y m d Se insertan datos en la tabla grupos query INSERT INTO grupos VALUES id_grupo grupo id_user yes fecha result pg_query conn query if ISresult echo Fallo query query lt br gt exit query SELECT FROM user_grupo result pg_query conn query or die Fallo 4query query lt br gt num pg_num_rows result 1 Se insertan datos en la tabla user_grupo query INSERT INTO user_grupo VALUES id_grupo id_user si num fecha result pg_query conn query if ISresult echo Fallo query query lt br gt exit else existe si
44. la 4 Estructura de la tabla grupos en la base de datos de Nenek SAAC Campos Tipo A utilizar id_grupo text X nombre text X dueno text xX open text X fecha text X Tabla 5 Estructura de la tabla files en la base de datos de Nenek SAAC Tipo A utilizar id_file text X text size_file text fecha date hora time without time zone type text lt X lt X X X X lt lt gt lt X lt x gt lt Tabla 6 Estructura de la tabla file_users de la base de datos de Nenek SAAC Tipo A utilizar Tipo A utilizar fecha text X Tabla 8 Estructura de la tabla mail en la base de datos de Nenek SAAC Campos Tipo A utilizar X X Xx gt lt lt gt lt gt lt Tabla 9 Estructura de la tabla tareas en la base de datos de Nenek SAAC Campos Tipo A utilizar inicio text lt gt lt Xx gt lt status text lt gt lt gt lt gt lt x lt A continuaci n se describe brevemente la funci n de la aplicaci n para ambientes m viles web Nombre Funci n Localizaci n Tama No De fe Lineas Incluye Jil Archivo que permite www var nene 28 4 kb sesion php visualizar los archivos k cenenek dbconnect php del usuario tambi n common php poder subir archivos mail php Permite visualizar los www var nene 20 6kb 573 sesion php mensajes enviados y k cenenek dbconnect php recibidos por el common php usuario o grupo
45. lect from users where id_user senduser consulta pg_query conn query columna pg_fetch_assoc consulta email columna email destinatario email asunto Eliminaron un archivo link http www adaptivez org mx TreeStore cuerpo El usuario dueno dejo de compartir filename del grupo grupo lt br gt link headers MIME Version 1 0 r n headers Content type text html charset iso 8859 1 r n 27 mail destinatario asunto cuerpo headers query insert into email values destinatario id_user asunto result pg_query conn query header Refresh 0 url archivos_compartidos php g grupo TRUE 302 if _GET d perfil i header Refresh 0 url profile php TRUE 302 1 6 Funcionamiento para compartir archivos Para compartir archivos primeramente se selecciona el archivo de la lista donde se encuentra y como siguiente paso se de la al bot n compartir donde mandar a llamar las siguientes funciones para poder compartir el archivo ARCHIVO CONFIG PHP se presenta un fragmento del c digo que es el que contiene la funci n para compartir los archivos if Sopcion 1 if public 1 echo lt td gt lt a class popup href compartir php id id_user amp f id_file amp fn fn gt lt i class fa fa share fa 1x title Compartir gt lt i gt amp nbsp lang TABLA_COMPARTIR lt a gt l
46. messages public GruposTask ListActivity activity this activity activity context activity dialog new ProgressDialog context application context private Context context protected void onPreExecute agregarAlGrupo setVisibility View GONE progres setVisibility View VISIBLE Override protected void onPostExecute JSONArray json progres setVisibility View GONE if json null grupos clear for int i 0 i lt json length i try JSONObject c json getUSONObject i String vnombre_grupo c getString TAG_NOMBRE_GRUPO grupos add vnombre_ grupo catch JSONException e TODO Auto generated catch block Toast makeT ext getApplicationContext getString R string ErrorGrupos Toast LENGTH _SHORT show e printStackTrace 45 V fin catch M fin for adapter new ArrayAdapter lt String gt context android R layout simple_spinner_dropdown_item grupos adapter setDropDownViewResource android R layout simple_spinner_dropdown_item We need notify the adapter that the data have been changed SpinerGrupo setAdapter adapter autoCompleteGrupo setAdapter adapter adapter notifyDataSetChangea System out printin GruposTask Lista hecha super onPostExecute json else grupos add No tienes un grupo de trabajo protected JSONArray dolnBackground final String args if isCancelled return null JSONParser jParser
47. nclude dbconnect php include log php Comprueba si se envia algo en el formulario del login si se envia algo inicia la comprobacion de usuario if isset _POST entrar Se crean las variables que se obtienen por el metodo POST id_user htmispecialchars POST email ENT_QUOTES password htmlispecialchars _POST password ENT_QUOTES Se realiza la consulta para verificar si coinciden los datos enviados por el usuario query SELECT FROM users WHERE email id_user AND password password se obtienen los resultados de la busqueda y se almacenan en la variable result result pg_query conn query Si no encuentra resultados verdaderos en la consulta nos imprime un error de consulta if ISresult echo Fallo query query lt br gt else asocia los resultados a una variable num num pg_num_rows result comprueba si el numero de resultados es menor o igual que cero imprime un mensaje de error de usuario o contrase a if num lt 0 message lt small style font size 100 title Esta mal escrito tu usuario o contrase amp ntilde a gt lang LOGIN_USR_CTN_MAL lt small gt si los resultados son mayor que cero realiza las siguientes funciones 18 else asocia resultados obtenidos a una variable row row pg_fetch_assoc result activacion row sesion se crea una variable con la id del usuario id_user row id_user
48. ndo las comunidades virtuales de hablantes de la lengua ind gena CVLI Estos ltimos con el paso del tiempo desarrollaron un particular inter s por los antes mencionados con forme pasan los a os Estas nuevas tecnolog as involucran nuevos paradigmas de programaci n modelado de contenidos herramientas multimedia herramientas de conectividad a bases de datos herramientas de seguridad y hardware La aplicaci n web se puede utilizar en dispositivos m viles que soporte las nuevas tecnolog as de programaci n web en este caso html5 css3 y el framework bootstrap 2 8 En estos tiempos en que la tecnolog a ha avanzado la mayor a de los dispositivos m viles soportan este tipo de tecnolog a Es por ello que esta aplicaci n va orientada a ese tipo de dispositivos Una de las ventajas que se presentan en este tipo de tecnolog a es que tiene mayor portabilidad y por eso muchos usuarios la utilizan En su totalidad la aplicaci n nativa para Android solo puede operar en tel fonos con sistemas operativos Android que comprenden desde la versi n 2 3 GingerBread a la versi n 4 1 JellyBean El motivo de usar este sistema operativo se debe a la creciente popularidad la cual incrementa a un ritmo exponencial que conlleva esta plataforma respecto a sus competidores tambi n otra de las grandes ventajas que tiene esta plataforma es que se habla de un software libre 3 Especificaciones T cnicas Sistema Operativo GNU Linux Ubuntu 12 04
49. nsion title Ej doc xls jpg png gt lt div gt lt div class d form gt lt button id buscar name buscar type submit value Buscar class form awesome bin btn primary btn small title Buscar gt lt php echo lang CUERPO_BUSCAR_FILE gt lt button gt lt div gt lt fieldset gt lt form gt lt hr gt lt div gt Fragmento de c digo php para realizar la b squeda de los datos que se env an del formulario en el cual se genera una funci n en donde se env an los datos del archivo que se va a buscar 30 query_user SELECT FROM files WHERE file name padre LIMIT 1 result_user pg_query conn query_user or die Fallo query query lt br gt row pg_fetch_assoc result_user atrasp row padre echo lt h3 title Mis Archivos Carpeta gt lang TABLA_MIS_ ARCHIVOS_CARPETA J amp nbsp padre lt h3 gt echo lt a href profile php id id_user amp padre atrasp gt lt i class fa fa reply fa 1x gt amp nbsp lt i gt lang SOLICITUDES_ATRAS lt a gt lt br gt lt hr gt opcion 1 list_files id_user mostar_list file_search extension_search inicio sredundancia com partido Sid_grupo status dueno opcion padre lang 1 8 Funcionamiento para mostrar el listado de mensajes Para realizar un listado de los mensajes de cada usuario se hace una consulta a la base de datos a la tabla mail donde se verifica su id_user
50. o Nombre gt lt php echo lang EDITAR_NUEVO_NOMBRE gt lt label gt lt div gt lt div class d form gt lt input id nname name nname gt lt div gt lt div gt lt button name Apply type submit value Apply title Guardar class btn btn primary gt lt php echo lang CUERPO_BTN_CARPETA gt lt button gt lt a href edit_profile php 8id lt php echo id_user gt title Atr amp aacute s gt lt img src images 2 png alt Atr amp aacute s title Atr amp aacute s gt amp nbsp lt php echo lang SOLICITUDES_ATRAS gt lt a gt lt p gt lt form gt 37 Funcion php que actualiza el nombre del usuario if isset _POST nname nname POST nname query update users set name nname where id_user id_user result pg_query conn query echo lt script language javascript type text javascript gt alert Itmejits a Bij lt script gt Formulario para cambiar el email del usuario lt form class well action lt php echo SERVER PHP_SELF id id_user gt method POST name email gt lt p title Cambiar Email gt lt php echo lang EDITAR_CAMBIAR_EMAIL gt lt p gt lt div gt lt div class d form gt lt label title Email gt lt php echo lang LOGIN_EMAIL gt lt label gt lt div gt lt div class d form gt lt input value lt php echo email gt readonly readonly id email name email
51. or el login private class MyAsyncTask extends AsyncTask lt String Integer String gt private ProgressDialog progressDialog new ProgressDialog MainActivity this InputStream is null String result protected void onPreExecute progressDialog setMessage getString R string Validando progressDialog show progressDialog setOnCancelListener new OnCancelListener Override 40 public void onCancel Dialoginterface argo MyAsyncTask this cancel true Override protected String dolnBackground String params TODO Auto generated method stub System out printin MyAsyncTask Iniciando Login result postData params 0 return result protected void onPostExecute String result this progressDialog dismiss id_user result trim System out printin MyAsyncTask Recibiendo A validar la respuesta del servidor if result equals Errorlnternet Toast makeText getApplicationContext getString R string InternetError Toast LENGTH_LONG show value2 setText return if id_user equals invalido Toast makeText getApplicationContext getString R string VerificaDatos Toast LENGTH_LONG show value setText value2 setText return else iniciando la obtencion de el usuario System out printin MyAsyncTask Iniciando UserTask new UserTask execute userUrl id_user public String postData String valuelWantToSend
52. r row type ip rowf ip id_user2 row id_user file row file_name file utf8_decode file public row public echo lt tr gt lt td gt if folder 1 echo lt img src images type folder png alt folder gt 8nbsp else type pathinfo file extension type extension include extension_mime php echo basename file lt td gt fn basename file if dueno id_user 22 ver 1 oculta12 2 else if status yes ver 1 oculta12 2 else if status no ver 2 oculta1 2 2 if ver 1 if folder 1 echo lt td gt lt a href profile php id id_user amp padre file title Abrir gt lt i onclick refreshlt class fa fa arrow right fa 1x title Abrir gt lt i gt amp nbsp lang TABLA_ABRIR lt a gt lt td gt nfl 1 else echo lt td gt lt a href download php id id_file amp id_user id_user amp redundancy redundancia amp d perfil gt lt i onclick refreshlt class fa fa download fa 1x title Descargar gt lt i gt amp nbsp lang TABLA_DESCARGAR lt a gt lt td gt echo lt td gt lt a href delete php id id_user amp u id_file amp d d title Eliminar gt lt i class fa fa times fa 1x gt lt i gt amp nbsp lang TABLA_ELIMINAR lt a gt lt td gt if Sopcion 1 if public 1 echo lt td g
53. rchivo Colocando que la notificacion sea visible siempre que se termine la descarga if Build VERSION SDK_INT gt Build VERSION _CODES HONEYCOMB request setNotification Visibility DownloadManager Request VISIBILITY_VISIBLE_NOTIFY_COMPLETED else enqueue dm enqueue request request setShowRunningNotification true 52
54. rencia radica en que se debe cambiar el comando de instalaci n por apt get install php5 root emmanuel pc home emmanuel sudo apt get install phpsf Al igual que en apache2 se mostrar una ventana que nos pide la autorizaci n del sistema para continuar con la instalaci n Nuevamente se presiona la tecla S para permitir este proceso 5 3 Instalaci n de Postgresql Continuamos ahora con la instalaci n del sistema gestor de bases de datos Postgresql 9 1 el cual es muy similar a la instalaci n de php5 se debe tener una terminal con modo super usuario y se procede a teclear el siguiente comando apt get install postgresql root emmanuel pc home emmanuel sudo apt get install Pl Nuevamente aceptamos el proceso de instalaci n presionando la tecla S al momento de que la terminal nos pida nuestra autorizaci n 5 4 Conectando Apache2 con Postgresql y Php Ahora que se tienen instalados Apache2 Postgresql y Php5 se deben conectar todas estas aplicaciones esto se logra instalando ciertas librer as y m dulos como son pg _sal libmod apache2 php5 para comenzar se proceder a instalar php5 pgsa l el cual conecta el sistema gestor de bases de datos Postgresql con el lenguaje de programaci n Php5 Para instalar pgsql tecleamos en una terminal la siguiente instrucci n 10 apt get install php5 pgsql root emmanuel pc home emmanuel sudo apt get install php5 pgsqlff Ahora se instala libmod apache2 php5
55. s datos personales del usuario Interfaz para registrar nuevos usuarios Interfaz para aceptar peticiones de usuarios para entrar al grupo del usuario Interfaz para subir contenidos a Nenek SAAC Interfaz para cambiar la imagen de perfil del usuario Dialogo para compartir archivos Localizaci n Tama o src com src com src com src com src com src com src com src com src com src com src com src com 23 6 ko 18 5 kb 62 2 kb 2 7 kb 1 6 kb 11 5 ko 16 6 kb 9 9 kb 13 4 ko 13 2 kb 13 4 ko 11 kb No De Lineas 726 Incluye 475 1656 111 59 366 483 280 361 374 432 304 a un grupo autorizado beer 8 Dialogo para listar src com 14 3 kb 400 ass las tareas de un usuario ONES Constructor de src com helpe 5 4 kb 159 ass JSON rs Sotelo Clase gestora de src com helpe 5 6 kb 214 r class sesiones rs 5 Instalaci n de aplicaciones Para implementar de manera correcta Nenek SAAC en un servidor se deben primero instalar ciertos programas los cuales necesitan de una conexi n a internet de forma obligatoria La manera t pica de instalar programas en el sistema operativo Ubuntu es mediante una terminal o mediante el centro de software de ubuntu sin embargo algunos programas no requieren una instalaci n previa puesto que vienen preparados para funcionar tan pronto su descarga termina como es el caso de Eclipse
56. s de trabajo WT Mea En este archivo se wwwivar nene 18 4kb 512 sesion php roup php pueden crear grupos k cenenek dbconnect php de trabajo y tambi n common php colaborativ o php galeria php edit_profile php download php enviar php new_grupo php new_tarea php new user php busca use r php forgotpass php abandonar _grupo ph entrar en ellos y visualizar los archivos compartidos en cada grupo Archivo en el cual se visualizan las tareas asignadas a cada usuario as como tambi n las tareas personales Se obtienen las im genes subidas por el usuario y se visualizan en el presente archivo En este archivo se pueden actualizar los datos del usuario Archivo en cual se genera la funci n para poder descargar los archivos de cada usuario Archivo que contienen las funciones para enviar mensajes a usuarios o grupos de trabajo Permite crear y comprobar si existen grupos de usuarios en la base de datos Archivo que permite asignar tareas a usuarios y grupos registrados en Nenek SAAC Permite registrar y verificar si existe alg n usuario registrado en Nenek SAAC Permite realizar una b squeda de los usuarios registrados Permite recuperar la contrase a del usuario registrado Archivo que contiene la funciona para eliminar a un usuario www var nene k cenenek www var nene k cenenek www var nene k cenenek www var nene k cenenek ww
57. solo en esta parte se genera la descarga del archivo Funci n que genera la lista de archivos FUNCION QUE MUESTRA LA LISTA DE ARCHIVOS function list_files id_user mostar_list file_search Sextension_search inicio sredundancia com partido id_grupo status f dueno opcion padre lang Se incluye el archivo de conexion con la bd include dbconnect php Se generan las consultas para extraer los archivos if padre query SELECT FROM files WHERE id_user id_user and padre padre order by type id file desc limit 15 offset inicio else if compartido 1 d 1 query select from files file_grupo where file_grupo id_grupo id_grupo and file_grupo id_file files id_file order by files type files id_file else query SELECT FROM files WHERE id_user id_user and padre order by type id file desc limit 15 offset inicio parte del codigo completo de la tabla donde se genera la lista de archivos en esta parte es donde se genera el enlace de descarga else echo lt td gt lt a href download php id id_file amp id_user id_user amp redundancy redundancia amp d p erfil gt lt i onclick refreshlt class fa fa download fa 1 x title Descargar gt lt i gt amp nbsp lang TABLA_DESCARGAR lt a gt lt td gt ARCHIVO DOWNLOAD PHP Se crean las variables que se obtienen por el metodo GET grupo GETI d id_user _GETT id_user
58. t lt a class popup href compartir php id id_user amp f id_file amp fn fn gt lt i class fa fa share fa 1x title Compartir gt lt i gt amp nbsp lang TABLA_COMPARTIR lt a gt lt td gt lt td gt P amp uacute blico lt td gt else echo lt td gt lt a class popup href compartir php id id_user 8f id_file S fn fn title Compartir gt lt i class fa fa share fa 1x title Compartir gt lt i gt amp nbsp lang TABLA_COMPARTIR lt a gt lt td gt lt td gt Privado lt td gt echo lt td gt lt a class popup href info php id id_user amp u id_file gt lt img src images info png alt Info title Info gt lt a gt lt td gt else echo lt td gt sin permiso lt td gt echo lt td gt lt td gt echo lt td gt lt td gt echo lt td gt lt td gt echo lt td gt lt td gt echo lt td gt sin permiso lt td gt echo lt tr gt if compartido 1 echo lt tr gt lt th colspan 6 align center gt lt A HREF inicio_paginacion php id id_user Sinicio inicio gt lt img class rooll 23 src images inicio png width 28 height 18 title inicio gt lt A gt lt A HREF atras_paginacion php id id_user amp inicio inicio src images atras png width 14 height 18 title atras gt lt A gt lt A HREF adelante_paginacion php id id_user Sinicio inicio sr
59. t td gt lt td gt P amp uacute blico lt td gt else echo lt td gt lt a class popup href compartir php id id_user amp f id_file amp fn fn title Compartir gt lt i class fa fa share fa 1x title Compartir gt lt i gt amp nbsp lang TABLA_COMPARTIR lt a gt lt td gt lt td gt Privado lt td gt echo lt td gt lt a class popup href info php id id_user amp u id_file src images info png alt Info title Info gt lt a gt lt td gt gt lt img ARCHIVO COMPARTIR PHP En este archivo se presenta la funci n que hace que comparta el archivo con un grupo de trabajo lt php 28 se incluye la conexi n a la base de datos include dbconnect php Se genera la consulta a tabla grupos query select from grupos user_grupo where grupos id_grupo user_grupo id_grupo and user_grupo id_user id_user and user_grupo autorizado si result pg_query conn query si no existe ning n resultado que envi un error de consulta if ISresult echo Fallo query query lt hr gt else verifica si eres miembro de un grupo if pg_num_rows result 0 echo Aun no es miembro de ningun grupo de trabajo genera una tabla con la lista de los grupos a los que perteneces y a los cuales puedes compartir el archivo seleccionado else echo lt table class table table bordered gt lt tr gt lt th gt Grupo amp nbsp amp nbsp
60. title Mis grupos de trabajo gt lt i class fa fa group fa 1x gt amp nbsp lt i gt lt php echo lang GRUPOS_MIS_GRUPOS_TRABAJO gt lt A gt lt li gt lt lt A HREF lt php echo _SERVER PHP_SELF id_user id_user amp mostrar 5 gt gt Add me to Organization lt A gt gt lt ul gt Formulario para crear un grupo de trabajo lt Form para crear un grupo nuevo gt lt form class form inline action new_grupo php method POST name login id login enctype multipart form data gt lt small style font size 100 title Nuevo grupo de trabajo gt lt php echo Slang GRUPOS_NUEVO_GRUPO_TRABAJO gt lt small gt lt br gt lt br gt lt fieldset class well form m gt lt php if _GET existe si echo lt small style font size 18px title Un grupo ya existe con ese nombre gt lang GRUPOS_GRUPO_EXISTENTE lt small gt echo lt br gt lt br gt if _GET existe no echo lt small style font size 18px title Grupo creado gt lang GRUPOS_GRUPO_CREADO lt small gt echo lt br gt lt br gt 2 gt lt br gt lt div class d form gt lt small style font size 20px title Nombre gt lt php echo Slang CUERPO_NOMBRE_CARPETA gt lt small gt lt div gt lt div class d form gt lt input type text id Enviar name grupo size 50px gt lt div gt lt div class d form gt lt button class btn btn primary
61. ts target_path se genera una variable a la cual se le asigna el resultado de la funcion en la cual se va hacer el registro del archivo a la tabla files id_f save file Starget_path id_user client_ip padre ruta_movil tipo_movil nombre_movil size_file Se inicio la subida del archivo upload_start id_user id_f GetSize id_f target_path 1 Mensaje de archivo subido con exito ok lt small style font size 100 title El Archivo gt An t amp apos olab lt small gt basename _FILES upload name lt small style font size 100 title fue subido con amp eacute xito gt k amp apos adhij alwa amp apos lt small gt se le da permisos a la ruta de la carpeta del usuario chmod target_path 0777 else error lt small style font size 100 title Error al subir el archivo intente de nuevo gt Yab alwa amp apos k amp apos adhij an taapos olab ka taka amp apos junil lt small gt unset _POST upload_end id_user 25 1 5 Funcionamiento para la descarga de archivos Para poder descargar archivos se necesita hacer una consulta en la gue se comprueba el id del usuario as como tambi n la id del archivo Si estas coinciden se procede a realizar la descarga mediante el archivo download php que contiene las funciones esenciales para poder realizar la descarga ARCHIVO CONFIG PHP Se presenta solo un fragmento del c digo completo del archivo ya que
62. w var nene k cenenek www var nene k cenenek www var nene k cenenek www var nene k cenenek www var nene k cenenek www var nene k cenenek www var nene k cenenek 12 1 ko 4 7 kb 12 8 kb 3 8 kb 3 5 kb 1 3 kb 2 9 kb 10 1 ko 2 2 kb 4 5 kb 2 3 kb 314 147 305 79 94 47 91 245 79 126 48 sesion php dbconnect php common php sesion php dbconnect php common php sesion php dbconnect php common php dbconnect php config php dbconnect php sesion php dbconnect php dbconnect php dbconnect php dbconnect php dbconnect php common php dbconnect php p de un grupo de aceptar_so licitud php trabajo Permite aceptar usuarios a grupos de trabajo www var nene 3 1 kb k cenenek 65 dbconnect php A continuaci n se describe brevemente la funci n de la aplicaci n nativa para Android Nombre Archivos class ArchivoElegid o class Grupos class Inicio class Lenguaje clas s MainActivity cl ass Perfil class Registro class Solicitudes cla ss Subir class SubirFotoPerfi l class DialogCompar tir class Funcion Despliega una lista con los archivos de cada usuario Muesira al usuario un archivo especifico Interfaz para los grupos de trabajo Presentaci n de la aplicaci n Interfaz para realizar cambio de idioma Interfaz login Interfaz para poder cambiar lo
63. x html index xhtml index htm 13 lt IfModule mod_dir c gt DirectoryIndex index php index cgi index pl index html index xhtml index htm lt i fodule gt En seguida se guardan los cambios y se realiza un reinicio en el servidor con el commando etc init d apache2 restart 6 2 Configuraci n de Postgresql Para configurar el sistema gestor de bases de datos primero se debe editar el archivo postgresql conf tecleando en una terminal la siguiente l nea nano etc postgresq l 9 1 main postgresql conf rootfGemmanuel pc home emmanuel nano etc postgresql 9 1 main postgresql conf En este archivo se debe descomentar la l nea no 59 la cual indica listen addresses localhost Connection Settings fJisten_addresses localhost what IP address es to listen on comma separated list of addresses defaults to localhost all change requires restart port 5432 change requires restart max_connections 100 change requires restart Note Increasing max_connections costs 400 bytes of shared memory per connection slot plus lock space see max_locks_per_transaction Y escribir Listen addresses En seguida se guarda el documento y se reinicia el servicio de postgresql tecleando etc init d postgresql restart 14 Ahora se cuentan con la base de datos de Nenek SAAC la cual tiene por nombre cenenek por lo que ahora se le deben de dar los permisos a los
Download Pdf Manuals
Related Search
Related Contents
USER`S MANUAL - Square One Industries, Inc. User Manual - VIAIR Corporation Manuel d`utilisation Owners manual BETRIEBSANLEITUNG OPERATING INSTRUCTIONS SPECK Ruby Tech GS-1224L User's Manual User's Guide - roda computer GmbH 取扱説明書 - オーム電機 259 The Menu Editor Sitecom 300N Wireless USB Adapter Copyright © All rights reserved.
Failed to retrieve file