require_once('../include/orm.php'); require_once('../include/globals.php'); require_once('../include/util.php'); $_crm4_interesados_db_connected = $Link == ''; if($_crm4_interesados_db_connected) $Link = connectDb(); define('DBCONNECTED', 1); debugstartpage(); if( isset($_x) ) { //if( $_x != '' ) { $_x = $_x == '' ? array() : StringTokenize($_x, ","); $_result = array(); $_result['version'] = array('actual' => 833); $_result['visibility'] = array(); $_initialvars = arrayExclude(get_defined_vars(), array("_*", "form_*", "s_*", "GLOBALS", "Link", "thisname")); } require('../main/base.events.php'); // isbasewindow: // On Open while( ($__action == "" or $__action == "executedonopen") and (empty($_x) or in('onopen', $_x)) ) { $__action = "executedonopen"; $__tempresult = sqlexec($Link, "select count(*) from cmest where enembudo = 'S' and estado not in ('PERDIDO')"); while( $__temprow = mysql_fetch_array($__tempresult)) { $cantestados = $__temprow[0]; } // Si puso header location para ir a otra pagina cierra el script if( !isset($_x) and $__exiting ) { disconnectDb($Link); exit(0); } break; } // PHP Vars while( ($__action == "" or $__action == "executedonopen") and isset($_GET['_x']) and empty($_x) ) { $__row0 = array(); $_result['morevars'] = $__row0; break; } if( has($_x, 'pdf') or has($_x, 'pdfprint') or has($_x, 'pdfprint2') ) { require_once('../include/fpdfreport.php'); $_pdf = new PDF((isset($_orientation) ? $_orientation : 'P'),'pt', (isset($_size) ? $_size : 'A4' )); $_pdf->initialPage = ($_page != '' ? $_page : 1); //$_pdf->SetAutoPageBreak(true); $_pdf->title = ""; $_pdf->SetTopMargin(50); $_pdf->AliasNbPages(); $_pdf->AddPage(); } if( has($_x, 'filtroproyecto_select') ) { list($_result['filtroproyecto_select'], $_result['filtroproyecto_columns'], $_result['filtroproyecto_types']) = sqltoarraydd($Link, "select id,contacto from cmcont where stipo = 2 and tipo = 'proyecto' "); } while( has($_x, "filtroproyecto__onchange") ) { redirect("?filtroproyecto=$filtroproyecto&filtroresponsable=$filtroresponsable"); ; break; } if( has($_x, 'filtroresponsable_select') ) { list($_result['filtroresponsable_select'], $_result['filtroresponsable_columns'], $_result['filtroresponsable_types']) = sqltoarraydd($Link, "select id, contacto from cmcont where tipo = 'Usuario' and perfil in ('Comercial','adminsitrador','Gerenciadora','Inmobiliaria','Operadora') "); } while( has($_x, "filtroresponsable__onchange") ) { redirect("?filtroproyecto=$filtroproyecto&filtroresponsable=$filtroresponsable"); ; break; } if( has($_x, 'filtroetiquetas_select') ) { list($_result['filtroetiquetas_select'], $_result['filtroetiquetas_columns'], $_result['filtroetiquetas_types']) = sqltoarraydd($Link, "select nombre, nombre from cmetiq"); } while( has($_x, "filtroetiquetas__onchange") ) { redirect("?filtroproyecto=$filtroproyecto&filtroresponsable=$filtroresponsable&filtroetiquetas=$filtroetiquetas"); ; break; } if( isset($_GET['_x']) and empty($_x) ) { $_result['visibility']['vacio'] = (sqlget($Link, "SELECT count(*) FROM cmcont as c cross join cmactiv as a on c.id = a.contacto WHERE a.tipo = 'P' and a.estado = '$estado'") == 0); } if( has($_x, 'pdf') or has($_x, 'pdfprint') or has($_x, 'pdfprint2') ) { $_pdf->Output(); } ?> if( !isset($_x) ) { ?> if( isset($_export) ) { ?> header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=interesados.xls"); //echo(''); //echo(''); echo(''); ?> } else { ?>
require('../main/base.head.php'); ?> class="popup" } ?> >