0) { print_data_row($TbMsg['LABEL_HASPROF'], $data['hasprof'], $data['labs']); print_data_row($TbMsg['LABEL_REMOTELAB'], $data['remotelab'], $data['labs']); print_data_row($TbMsg['LABEL_CLIENTS'], $data['clients']); print_data_row($TbMsg['LABEL_HASCONFIG'], $data['hasconfig'], $data['clients']); print_data_row($TbMsg['LABEL_HASREPO'], $data['hasrepo'], $data['clients']); print_data_row($TbMsg['LABEL_HASHARD'], $data['hashard'], $data['clients']); print_data_row($TbMsg['LABEL_HASSERIAL'], $data['hasserial'], $data['clients']); } print_data_row($TbMsg['LABEL_REPOS'], $data['repos']); if ($data['repos'] > 0) { print_data_row($TbMsg['LABEL_IMAGES'], $data['images']); if ($data['images'] > 0) { print_data_row($TbMsg['LABEL_MONOIMG'], $data['monoimg'], $data['images']); print_data_row($TbMsg['LABEL_HASSOFT'], $data['hassoft'], $data['images']); print_data_row($TbMsg['LABEL_REMOTEIMG'], $data['remoteimg'], $data['images']); print_data_row($TbMsg['LABEL_OSES'], $data['oses']); } } print_data_row($TbMsg['LABEL_MENUS'], $data['menus']); print_data_row($TbMsg['LABEL_PROCS'], $data['procs']); print_data_row($TbMsg['LABEL_TASKS'], $data['tasks']); ?>

Volver
texto = << 0, idaula, NULL)) AS hasprof, COUNT(DISTINCT IF(aulas.inremotepc = 1, idaula, NULL)) AS remotelab, COUNT(idordenador) AS clients, COUNT(numserie) AS hasconfig, COUNT(IF(idrepositorio > 0, 1, NULL)) AS hasrepo, COUNT(IF(idperfilhard > 0, 1, NULL)) AS hashard, COUNT(IF(numserie = '', NULL, 1)) AS hasserial FROM centros LEFT JOIN aulas USING(idcentro) LEFT JOIN ordenadores USING(idaula) WHERE idcentro = $id) AS t1, (SELECT COUNT(*) AS repos FROM repositorios WHERE idcentro = $id) AS t2, (SELECT COUNT(*) AS images, COUNT(IF(tipo = 1, 1, NULL)) AS monoimg, COUNT(IF(idperfilsoft > 0, 1, NULL)) AS hassoft, COUNT(IF(inremotepc = 1, 1, NULL)) AS remoteimg, COUNT(DISTINCT idnombreso) AS oses FROM imagenes LEFT JOIN perfilessoft USING(idperfilsoft) LEFT JOIN nombresos USING(idnombreso) WHERE imagenes.idcentro = $id) AS t3, (SELECT COUNT(*) AS menus FROM menus WHERE idcentro = $id) AS t4, (SELECT COUNT(*) as procs FROM procedimientos WHERE idcentro = $id) AS t5, (SELECT COUNT(*) as tasks FROM tareas WHERE idcentro = $id) AS t6; EOT; $rs->Comando=&$cmd; if (!$rs->Abrir()) { return(null); // Error opening the record set } $rs->Primero(); $data = $rs->campos; $rs->Cerrar(); return($data); } /** * @param string $label * @param int $value * @param int $total */ function print_data_row($label, $value, $total=0) { echo "\t\t $label:  $value" . ($total>0 ? " (".intval($value*100/$total)."%)" : "") . " \n"; }