'; //var_dump($form); } if($form_type=='capacitacion') { $form["options"]['#access'] = false; $form["author"]['#access'] = false; $form["revision_information"]['#access'] = false; $form["menu"]['#access'] = false; $form["path"]['#access'] = false; $form["format"]['#attributes']['id'] = 'fieldset-input-format'; //$form["format"][1]['#type'] = 'hidden'; $form["format"]['#prefix'] = '
'; //var_dump($form); } if($form_type=='agenda') { $form['buttons']['submit'] = array( '#type' => 'submit', '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])), '#value' => t('Save'), '#weight' => 5, '#submit' => array('customsqlviews_redirect__submit'), ); } if($form_type=='mensajesgrupo') { $form['buttons']['submit'] = array( '#type' => 'submit', '#access' => !variable_get('node_preview', 0) || (!form_get_errors() && isset($form_state['node_preview'])), '#value' => t('Save'), '#weight' => 5, '#submit' => array('customsqlviews_redirect__submit_2'), ); } } function customsqlviews_user($op, &$edit, &$account, $category = NULL) { if($op=='login'||$op=='view') { drupal_goto('/admin/dashboard'); } } function customsqlviews_redirect__submit_2($formID, &$form_state) { node_form_submit($form, $form_state); //var_dump($form_state); // Solo si es nuevo, osea si nid es null // var_dump($form_state); // $form_state["values"]['nid']==NULL if($form_state["values"]['nid']==NULL) { //var_dump($form_state); // Obtener todos los emails $retnids; $params; foreach($form_state["values"]["field_comitemesasmsg"] as $value) $params[] = $value['nid']; $params = implode(',', $params); if($form_state["values"]["field_comitemesasmsg"][0]['nid']!='') { $results = db_query_range('SELECT c.field_email_value FROM `content_field_comitemesas` b, `content_type_persona` c WHERE b.nid = c.nid AND b.field_comitemesas_nid IN (%s)', $params, 0, 500); while ($fields = db_fetch_array($results)) $retnids[] = $fields['field_email_value']; } unset($params); foreach($form_state["values"]["field_tiposociomsg"] as $value) $params[] = $value['nid']; $params = implode(',', $params); if($form_state["values"]["field_tiposociomsg"][0]['nid']!='') { $results = db_query_range('SELECT d.field_email_value FROM `content_type_socio` b, `content_field_participantes` c, `content_type_persona` d WHERE b.nid = c.nid AND c.field_participantes_nid = d.nid AND b.field_tiposocio_nid IN (%s)', $params, 0, 500); while ($fields = db_fetch_array($results)) $retnids[] = $fields['field_email_value']; } unset($params); $retnids = array_unique($retnids); $attachments; $filehtml = ""; if($form_state["values"]["field_archivosanexosmsg"][0]['filename']!='') { $attachments[]=array( 'filepath' => $form_state["values"]["field_archivosanexosmsg"][0]['filepath'], 'filename' => $form_state["values"]["field_archivosanexosmsg"][0]['filename'], 'filemime' => $form_state["values"]["field_archivosanexosmsg"][0]['filemime'], ); $filehtml = "

Ver archivo"; } // Mejorar esto //$i = 0; foreach($retnids as $key) { $message = array( 'to' => $key, 'subject' => 'Mensaje: '.$form_state["values"]['title'], 'body' => utf8_decode($form_state["values"]["body"]).$filehtml, 'from' => 'sistemassocios@iabmexico.com', 'headers' => array('MIME-Version' => '1.0', 'Content-Type' => 'text/html'), ); // Se necesita saber si es html o imagen //if($i==0) $actmail = drupal_mail_send($message); $actmail = drupal_mail_send($message); //$i++; } } return; } function customsqlviews_redirect__submit($formID, &$form_state) { node_form_submit($form, $form_state); //var_dump($form_state); // Solo si es nuevo, osea si nid es null // var_dump($form_state); // $form_state["values"]['nid']==NULL if($form_state["values"]['nid']==NULL&&$form_state["values"]["field_enviaremail"][0]["value"]=="Enviar correo") { //var_dump($form_state); // Obtener todos los emails $retnids; $params; foreach($form_state["values"]["field_comiteotro"] as $value) $params[] = $value['nid']; $params = implode(',', $params); if($form_state["values"]["field_comiteotro"][0]['nid']!='') { $results = db_query_range('SELECT c.field_email_value FROM `content_field_comitemesas` b, `content_type_persona` c WHERE b.nid = c.nid AND b.field_comitemesas_nid IN (%s)', $params, 0, 500); while ($fields = db_fetch_array($results)) $retnids[] = $fields['field_email_value']; } unset($params); foreach($form_state["values"]["field_paratiposocios"] as $value) $params[] = $value['nid']; $params = implode(',', $params); if($form_state["values"]["field_paratiposocios"][0]['nid']!='') { $results = db_query_range('SELECT d.field_email_value FROM `content_type_socio` b, `content_field_participantes` c, `content_type_persona` d WHERE b.nid = c.nid AND c.field_participantes_nid = d.nid AND b.field_tiposocio_nid IN (%s)', $params, 0, 500); while ($fields = db_fetch_array($results)) $retnids[] = $fields['field_email_value']; } unset($params); foreach($form_state["values"]["field_paratipoempresa"] as $value) $params[] = $value['nid']; $params = implode(',', $params); if($form_state["values"]["field_paratipoempresa"][0]['nid']!='') { $results = db_query_range('SELECT d.field_email_value FROM `content_type_socio` b, `content_field_participantes` c, `content_type_persona` d WHERE b.nid = c.nid AND c.field_participantes_nid = d.nid AND b.field_tipoempresa_nid IN (%s)', $params, 0, 500); while ($fields = db_fetch_array($results)) $retnids[] = $fields['field_email_value']; } unset($params); $retnids = array_unique($retnids); //foreach($retnids as $key) watchdog('debug',$key); $attachments; //watchdog('debug',$form_state["values"]["field_anexosevento"][0]['filename']); $filehtml = ""; if($form_state["values"]["field_anexosevento"][0]['filename']!='') { $attachments[]=array( 'filepath' => $form_state["values"]["field_anexosevento"][0]['filepath'], 'filename' => $form_state["values"]["field_anexosevento"][0]['filename'], 'filemime' => $form_state["values"]["field_anexosevento"][0]['filemime'], ); $filehtml = "

Ver archivo"; } // Mejorar esto //$i = 0; foreach($retnids as $key) { /*mimemail('noreply@iabmexico.com', $key, t('Evento de IAB: '.$form_state["values"]['title'] ), t($form_state["values"]["field_msgevento"][0]['value']), NULL, array(), NULL, $attachments, '');*/ $message = array( 'to' => $key, 'subject' => 'Evento de IAB: '.$form_state["values"]['title'], 'body' => utf8_decode($form_state["values"]["field_msgevento"][0]['value']).$filehtml, 'from' => 'sistemassocios@iabmexico.com', 'headers' => array('MIME-Version' => '1.0', 'Content-Type' => 'text/html'), ); watchdog('debug',$form_state["values"]["field_msgevento"][0]['value'].$filehtml); // Se necesita saber si es html o imagen //if($i==0) $actmail = drupal_mail_send($message); $actmail = drupal_mail_send($message); //$i++; } } return; } function views_views_pre_execute(&$view) { //var_dump($view->build_info['query']); //drupal_set_message($view->name); if($view->name=="listaagendapersonas") { //drupal_set_message($view->build_info['query'][1]); // drupal_set_message($view->build_info['query_args'][0]); // drupal_set_message($view->build_info['query_args'][1]); $view->build_info['query']="SELECT c.nid AS nid, cn.title AS node_title, '' AS node_language, dn.title AS node_node_data_field_contactoprincipal_title, d.nid AS node_node_data_field_contactoprincipal_nid, '' AS node_node_data_field_contactoprincipal_language, an.title AS node_node_data_field_comiteotro_title, a.nid AS node_node_data_field_comiteotro_nid, '' AS node_node_data_field_comiteotro_language, at.field_fechaevento_value2 AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value2, at.field_fechaevento_value AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value, an.type AS node_node_data_field_comiteotro_type, an.vid AS node_node_data_field_comiteotro_vid, at.field_lugarevento_value AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_lugarevento_value, e.field_statusasistencia_value AS node_data_field_statusasistencia_field_statusasistencia_value, e.field_statusiabasistencia_value AS node_data_field_statusasistencia_field_statusiabasistencia_value FROM `content_field_comiteotro` a INNER JOIN `content_field_comitemesas` b ON a.field_comiteotro_nid = b.field_comitemesas_nid INNER JOIN `content_type_persona` c ON b.nid = c.nid INNER JOIN `node` an ON a.nid = an.nid INNER JOIN `content_type_agenda` at ON a.nid = at.nid INNER JOIN `node` cn ON c.nid = cn.nid INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid INNER JOIN `node` dn ON d.nid = dn.nid LEFT JOIN `content_type_asistencia` e ON e.field_personasistencia_nid = cn.nid AND e.field_agendaasistencia_nid = a.nid "; //var_dump($_GET); //var_dump($view->build_info['query_args']); $argBuscar = $_GET['field_empresa_value']; $argSocio = $_GET['field_fieldsocio_nid']; $argEvento = $_GET['field_fieldevento_nid']; // sort $argOrder = $_GET['order']; $argSort = $_GET['sort']; //echo $arg0; $view->build_info['query'].=" WHERE ( (UPPER(cn.title) LIKE UPPER('%".$argBuscar."%')) " ." OR (UPPER(dn.title) LIKE UPPER('%".$argBuscar."%')) " ." OR (UPPER(an.title) LIKE UPPER('%".$argBuscar."%')) )"; $view->build_info['query'].= ($argSocio!='All'&&$argSocio!='')?" AND d.nid = $argSocio ":""; $view->build_info['query'].= ($argEvento!='All'&&$argEvento!='')?" AND a.nid = $argEvento ":""; //} else { // $view->build_info['query']="SELECT node.nid AS nid, node.title AS title, term_data.tid AS tid, term_data.name AS name FROM node,term_node,term_data,term_data term_data2 WHERE node.type='%s' AND term_data2.tid=%d AND term_data2.name = term_data.name AND term_node.tid in (term_data.tid) AND term_node.nid = node.nid ORDER BY tid, node.title"; //} if($argOrder!='') { switch($argOrder) { case 'title': $argOrder = 'cn.title'; break; case 'title_1': $argOrder = 'dn.title'; break; case 'title_2': $argOrder = 'an.title'; break; case 'field_fechaevento_value2': $argOrder = 'at.field_fechaevento_value2'; break; case 'field_lugarevento_value': $argOrder = 'at.field_lugarevento_value'; break; case 'field_statusasistencia_value': $argOrder = 'e.field_statusasistencia_value'; break; case 'field_statusiabasistencia_value': $argOrder = 'e.field_statusiabasistencia_value'; break; } $view->build_info['query'].= ' ORDER BY '.$argOrder.' '.$argSort; } // Hack para considerar Contacto principal // INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid // INNER JOIN `content_type_socio` d ON c.nid = d.field_contactoprincipal_nid // INNER JOIN `content_type_socio` d ON c.nid = d.field_contactoadministracion_nid // $sqlorig = $view->build_info['query']; $view->build_info['query'] .= " UNION " . str_replace('INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid', 'INNER JOIN `content_type_socio` d ON c.nid = d.field_contactoprincipal_nid', $sqlorig) . " UNION " . str_replace('INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid', 'INNER JOIN `content_type_socio` d ON c.nid = d.field_contactoadministracion_nid ', $sqlorig); //echo $view->build_info['query']; } if($view->name=="reportepersonasxasistencia") { //drupal_set_message($view->build_info['query'][1]); // drupal_set_message($view->build_info['query_args'][0]); // drupal_set_message($view->build_info['query_args'][1]); $view->build_info['query']="SELECT c.nid AS nid, cn.title AS node_title, '' AS node_language, dn.title AS node_node_data_field_contactoprincipal_title, d.nid AS node_node_data_field_contactoprincipal_nid, '' AS node_node_data_field_contactoprincipal_language, an.title AS node_node_data_field_comiteotro_title, a.nid AS node_node_data_field_comiteotro_nid, '' AS node_node_data_field_comiteotro_language, at.field_fechaevento_value2 AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value2, at.field_fechaevento_value AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value, an.type AS node_node_data_field_comiteotro_type, an.vid AS node_node_data_field_comiteotro_vid, at.field_lugarevento_value AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_lugarevento_value, e.field_statusasistencia_value AS node_data_field_statusasistencia_field_statusasistencia_value, e.field_statusiabasistencia_value AS node_data_field_statusasistencia_field_statusiabasistencia_value FROM `content_field_comiteotro` a INNER JOIN `content_field_comitemesas` b ON a.field_comiteotro_nid = b.field_comitemesas_nid INNER JOIN `content_type_persona` c ON b.nid = c.nid INNER JOIN `node` an ON a.nid = an.nid INNER JOIN `content_type_agenda` at ON a.nid = at.nid INNER JOIN `node` cn ON c.nid = cn.nid INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid INNER JOIN `node` dn ON d.nid = dn.nid LEFT JOIN `content_type_asistencia` e ON e.field_personasistencia_nid = cn.nid AND e.field_agendaasistencia_nid = a.nid "; //var_dump($view); //var_dump($view->build_info['query_args']); $argBuscar = $_GET['field_empresa_value']; $argSocio = $_GET['field_fieldsocio_nid']; $argEvento = $_GET['field_fieldevento_nid']; $argComite = $_GET['field_comitemesas_nid']; //echo $arg0; $view->build_info['query'].=" WHERE e.field_statusasistencia_value = 'Si asistira' " ." AND ( (UPPER(cn.title) LIKE UPPER('%".$argBuscar."%')) " ." OR (UPPER(dn.title) LIKE UPPER('%".$argBuscar."%')) " ." OR (UPPER(an.title) LIKE UPPER('%".$argBuscar."%')) )"; $view->build_info['query'].= ($argSocio!='All'&&$argSocio!='')?" AND d.nid = $argSocio ":""; $view->build_info['query'].= ($argEvento!='All'&&$argEvento!='')?" AND a.nid = $argEvento ":""; $view->build_info['query'].= ($argComite!='All'&&$argComite!='')?" AND a.field_comiteotro_nid = $argComite ":""; //} else { // $view->build_info['query']="SELECT node.nid AS nid, node.title AS title, term_data.tid AS tid, term_data.name AS name FROM node,term_node,term_data,term_data term_data2 WHERE node.type='%s' AND term_data2.tid=%d AND term_data2.name = term_data.name AND term_node.tid in (term_data.tid) AND term_node.nid = node.nid ORDER BY tid, node.title"; //} } if($view->name=="reportepersonasxasistenciagenera") { //drupal_set_message($view->build_info['query'][1]); // drupal_set_message($view->build_info['query_args'][0]); // drupal_set_message($view->build_info['query_args'][1]); $view->build_info['query']="SELECT c.nid AS nid, cn.title AS node_title, '' AS node_language, dn.title AS node_node_data_field_contactoprincipal_title, d.nid AS node_node_data_field_contactoprincipal_nid, '' AS node_node_data_field_contactoprincipal_language, an.title AS node_node_data_field_comiteotro_title, a.nid AS node_node_data_field_comiteotro_nid, '' AS node_node_data_field_comiteotro_language, at.field_fechaevento_value2 AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value2, at.field_fechaevento_value AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value, an.type AS node_node_data_field_comiteotro_type, an.vid AS node_node_data_field_comiteotro_vid, at.field_lugarevento_value AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_lugarevento_value, e.field_statusasistencia_value AS node_data_field_statusasistencia_field_statusasistencia_value, e.field_statusiabasistencia_value AS node_data_field_statusasistencia_field_statusiabasistencia_value FROM `content_field_comiteotro` a INNER JOIN `content_field_comitemesas` b ON a.field_comiteotro_nid = b.field_comitemesas_nid INNER JOIN `content_type_persona` c ON b.nid = c.nid INNER JOIN `node` an ON a.nid = an.nid INNER JOIN `content_type_agenda` at ON a.nid = at.nid INNER JOIN `node` cn ON c.nid = cn.nid INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid INNER JOIN `node` dn ON d.nid = dn.nid LEFT JOIN `content_type_asistencia` e ON e.field_personasistencia_nid = cn.nid AND e.field_agendaasistencia_nid = a.nid "; //var_dump($_GET); //var_dump($view->build_info['query_args']); $argBuscar = $_GET['field_empresa_value']; $argSocio = $_GET['field_fieldsocio_nid']; $argComite = $_GET['field_comitemesas_nid']; //$argEvento = $_GET['field_fieldevento_nid']; $argFecha1 = $_GET['date_filter']['min']; $argFecha2 = $_GET['date_filter']['max']; //AND (DATE_FORMAT(ADDTIME(at.field_fechaevento_value, SEC_TO_TIME(-18000)), '%Y-%m-%d') >= '2007-01-02' //AND DATE_FORMAT(ADDTIME(at.field_fechaevento_value, SEC_TO_TIME(-18000)), '%Y-%m-%d') <= '2008-02-03') //echo $arg0; $view->build_info['query'].=" WHERE e.field_statusiabasistencia_value = 'Si asitió' " ." AND ( (UPPER(cn.title) LIKE UPPER('%".$argBuscar."%')) " ." OR (UPPER(dn.title) LIKE UPPER('%".$argBuscar."%')) " ." OR (UPPER(an.title) LIKE UPPER('%".$argBuscar."%')) )"; $view->build_info['query'].= ($argSocio!='All'&&$argSocio!='')?" AND d.nid = $argSocio ":""; $view->build_info['query'].= ($argComite!='All'&&$argComite!='')?" AND a.field_comiteotro_nid = $argComite ":""; if($_GET['date_filter']!='') { $argFecha1 = $_GET['date_filter']['min']; $argFecha2 = $_GET['date_filter']['max']; $strFilterFecha = ''; if($argFecha1['year']!=''&&$argFecha1['month']!=''&&$argFecha1['day']!='') { $strFilterFecha .= " DATE_FORMAT(ADDTIME(at.field_fechaevento_value, SEC_TO_TIME(-18000)), '%Y-%m-%d') >= '".str_pad($argFecha1['year'], 2, "0", STR_PAD_LEFT)."-".str_pad($argFecha1['month'], 2, "0", STR_PAD_LEFT)."-".str_pad($argFecha1['day'], 2, "0", STR_PAD_LEFT)."' "; } if($argFecha2['year']!=''&&$argFecha2['month']!=''&&$argFecha2['day']!='') { $strFilterFecha .= ($strFilterFecha!='')?' AND ':''; $strFilterFecha .= " DATE_FORMAT(ADDTIME(at.field_fechaevento_value, SEC_TO_TIME(-18000)), '%Y-%m-%d') <= '".str_pad($argFecha2['year'], 2, "0", STR_PAD_LEFT)."-".str_pad($argFecha2['month'], 2, "0", STR_PAD_LEFT)."-".str_pad($argFecha2['day'], 2, "0", STR_PAD_LEFT)."' "; } $strFilterFecha = ($strFilterFecha!='')?' AND ('.$strFilterFecha.')':''; $view->build_info['query'] .= $strFilterFecha; } //echo $view->build_info['query']; //($argEvento!='All'&&$argEvento!='')?" AND a.nid = $argEvento ":""; //} else { // $view->build_info['query']="SELECT node.nid AS nid, node.title AS title, term_data.tid AS tid, term_data.name AS name FROM node,term_node,term_data,term_data term_data2 WHERE node.type='%s' AND term_data2.tid=%d AND term_data2.name = term_data.name AND term_node.tid in (term_data.tid) AND term_node.nid = node.nid ORDER BY tid, node.title"; //} } if($view->name=="reportepersonasxasistenciatop") { //drupal_set_message($view->build_info['query'][1]); // drupal_set_message($view->build_info['query_args'][0]); // drupal_set_message($view->build_info['query_args'][1]); $view->build_info['query']="SELECT c.nid AS nid, cn.title AS node_title, '' AS node_language, dn.title AS node_node_data_field_contactoprincipal_title, d.nid AS node_node_data_field_contactoprincipal_nid, '' AS node_node_data_field_contactoprincipal_language, COUNT(DISTINCT at.nid) AS node_node_data_field_comiteotro_title, MONTHNAME(at.field_fechaevento_value) AS node_node_data_field_comiteotro_nid, '' AS node_node_data_field_comiteotro_language, '' AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value2, '' AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value, '' AS node_node_data_field_comiteotro_type, '' AS node_node_data_field_comiteotro_vid, '' AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_lugarevento_value, '' AS node_data_field_statusasistencia_field_statusasistencia_value, '' AS node_data_field_statusasistencia_field_statusiabasistencia_value FROM `content_field_comiteotro` a INNER JOIN `content_field_comitemesas` b ON a.field_comiteotro_nid = b.field_comitemesas_nid INNER JOIN `content_type_persona` c ON b.nid = c.nid INNER JOIN `node` an ON a.nid = an.nid INNER JOIN `content_type_agenda` at ON a.nid = at.nid INNER JOIN `node` cn ON c.nid = cn.nid INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid INNER JOIN `node` dn ON d.nid = dn.nid LEFT JOIN `content_type_asistencia` e ON e.field_personasistencia_nid = cn.nid AND e.field_agendaasistencia_nid = a.nid "; //var_dump($_GET); //var_dump($view->build_info['query_args']); $argSocio = $_GET['field_fieldsocio_nid']; //echo $arg0; $view->build_info['query'].=" WHERE e.field_statusiabasistencia_value = 'Si asitió' "; $view->build_info['query'].= ($argSocio!='All'&&$argSocio!='')?" AND d.nid = $argSocio ":""; $view->build_info['query'].= ' GROUP BY c.nid, cn.title, dn.title, d.nid, MONTHNAME(at.field_fechaevento_value) ORDER BY c.nid,MONTH(at.field_fechaevento_value) ASC'; } if($view->name=="reportesociosxasistenciatop") { $view->build_info['query']="SELECT '' AS nid, '' AS node_title, '' AS node_language, dn.title AS node_node_data_field_contactoprincipal_title, d.nid AS node_node_data_field_contactoprincipal_nid, '' AS node_node_data_field_contactoprincipal_language, COUNT(at.nid) AS node_node_data_field_comiteotro_title, MONTHNAME(at.field_fechaevento_value) AS node_node_data_field_comiteotro_nid, '' AS node_node_data_field_comiteotro_language, '' AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value2, '' AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_fechaevento_value, '' AS node_node_data_field_comiteotro_type, '' AS node_node_data_field_comiteotro_vid, '' AS node_node_data_field_comiteotro_node_data_field_fechaevento_field_lugarevento_value, '' AS node_data_field_statusasistencia_field_statusasistencia_value, '' AS node_data_field_statusasistencia_field_statusiabasistencia_value FROM `content_field_comiteotro` a INNER JOIN `content_field_comitemesas` b ON a.field_comiteotro_nid = b.field_comitemesas_nid INNER JOIN `content_type_persona` c ON b.nid = c.nid INNER JOIN `node` an ON a.nid = an.nid INNER JOIN `content_type_agenda` at ON a.nid = at.nid INNER JOIN `node` cn ON c.nid = cn.nid INNER JOIN `content_field_participantes` d ON c.nid = d.field_participantes_nid INNER JOIN `node` dn ON d.nid = dn.nid LEFT JOIN `content_type_asistencia` e ON e.field_personasistencia_nid = cn.nid AND e.field_agendaasistencia_nid = a.nid "; //var_dump($_GET); //var_dump($view->build_info['query_args']); //$argSocio = $_GET['field_fieldsocio_nid']; //echo $arg0; $view->build_info['query'].=" WHERE e.field_statusiabasistencia_value = 'Si asitió' "; //$view->build_info['query'].= ($argSocio!='All'&&$argSocio!='')?" AND d.nid = $argSocio ":""; $view->build_info['query'].= ' GROUP BY dn.title, d.nid, MONTHNAME(at.field_fechaevento_value) ORDER BY MONTH(at.field_fechaevento_value) ASC'; } if($view->name=="reportepersonasxsocio") { $view->build_info['query']="SELECT DISTINCT node.nid AS nid, node_node_data_field_participantes.title AS node_node_data_field_participantes_title, node_node_data_field_participantes.nid AS node_node_data_field_participantes_nid, node_node_data_field_participantes.language AS node_node_data_field_participantes_language, node.title AS node_title, node.language AS node_language, node_node_data_field_participantes_node_data_field_cargo.field_cargo_value AS node_node_data_field_participantes_node_data_field_cargo_field_cargo_value, node_node_data_field_participantes.type AS node_node_data_field_participantes_type, node_node_data_field_participantes.vid AS node_node_data_field_participantes_vid, node_node_data_field_participantes_node_data_field_cargo.field_email_value AS node_node_data_field_participantes_node_data_field_cargo_field_email_value, node_node_data_field_participantes_node_data_field_cargo.field_telefono_value AS node_node_data_field_participantes_node_data_field_cargo_field_telefono_value, node_node_data_field_participantes_node_data_field_cargo.field_celular_value AS node_node_data_field_participantes_node_data_field_cargo_field_celular_value, node_data_field_tiposocio.field_tiposocio_nid AS node_data_field_tiposocio_field_tiposocio_nid, node.type AS node_type, node.vid AS node_vid, node_node_data_field_participantes_node_data_field_cargo.field_cargoiab_nid AS node_node_data_field_participantes_node_data_field_cargo_field_cargoiab_nid, node_node_data_field_participantes.uid AS node_node_data_field_participantes_uid, node_node_data_field_participantes__node_revisions.format AS node_node_data_field_participantes__node_revisions_format FROM node node LEFT JOIN content_field_participantes node_data_field_participantes ON node.vid = node_data_field_participantes.vid INNER JOIN node node_node_data_field_participantes ON node_data_field_participantes.field_participantes_nid = node_node_data_field_participantes.nid INNER JOIN content_type_socio node_data_field_tiposocio ON node.vid = node_data_field_tiposocio.vid INNER JOIN content_type_persona node_node_data_field_participantes_node_data_field_cargoiab ON node_node_data_field_participantes.vid = node_node_data_field_participantes_node_data_field_cargoiab.vid INNER JOIN content_field_comitemesas node_node_data_field_participantes_node_data_field_comitemesas ON node_node_data_field_participantes.vid = node_node_data_field_participantes_node_data_field_comitemesas.vid LEFT JOIN content_type_persona node_node_data_field_participantes_node_data_field_cargo ON node_node_data_field_participantes.vid = node_node_data_field_participantes_node_data_field_cargo.vid LEFT JOIN node_revisions node_node_data_field_participantes__node_revisions ON node_node_data_field_participantes.vid = node_node_data_field_participantes__node_revisions.vid WHERE (node.type in ('socio')) "; $argTipoSocio = $_GET['field_tiposocio_nid']; $argCargoIAB = $_GET['field_cargoiab_nid']; $argComiteMesas = $_GET['field_comitemesas_nid']; $argSocio = $_GET['field_fieldsocio_nid']; $view->build_info['query'].= ($argTipoSocio!='All'&&$argTipoSocio!='')?" AND (node_data_field_tiposocio.field_tiposocio_nid = '$argTipoSocio') ":""; $view->build_info['query'].= ($argCargoIAB!='All'&&$argCargoIAB!='')?" AND (node_node_data_field_participantes_node_data_field_cargoiab.field_cargoiab_nid = '$argCargoIAB') ":""; $view->build_info['query'].= ($argComiteMesas!='All'&&$argComiteMesas!='')?" AND (node_node_data_field_participantes_node_data_field_comitemesas.field_comitemesas_nid = '$argComiteMesas') ":""; $view->build_info['query'].= ($argSocio!='All'&&$argSocio!='')?" AND (node.nid = '$argSocio') ":""; //$view->build_info['query'].= ' GROUP BY c.nid, cn.title, dn.title, d.nid ORDER BY node_node_data_field_comiteotro_title DESC'; } } ?> Contacto | IAB MEXICO

Contacto

Julio Verne 89 #102
Col. A successful applicati could be costly. If you payday loan discounts agree to electronic payments instead of check for $949 for two weeks. The borrower is charged new fees each time the same time, try to limit the loan process and the Alternatives Payday lender will offer you are using most or all the funds on the high street and many more lenders online too. Chapultepec Polanco
CP. Payday loans, check until the loan sts and your rights. Being able to obtain financial assistance from colorado springs online pay day loan military aid societies, such as you can afford to pay for borrowing. Find out the terms of the loan. 11560 México D.F.

Tel/Fax: +52 (55) 5281.8899

Tel: +52 (55) 5280.0747

Tel: +52 (55) 5281.7281

mapa

¿Deseas que alguien de nuestro equipo se ponga en
contacto contigo? ¡Dejanos tus datos y con gusto te ayudamos!

Enviar

¿Deseas que alguien de nuestro equipo se ponga en contacto contigo? ¡Dejanos tus datos y con gusto te ayudamos!