NOTA: Aquí també pots trobar la pàgina d\'intercanvi de la Base de dades.

'; } else { switch($sub) { case 'cartes': $html=fitxers($admin_mode); $contingut=getBody($html); break; case 'cartes.update': $fitxer=$_POST['fitxer']; $novadesc=$_POST['novadesc']; $res=update('edit',$fitxer,$novadesc); header('Location: index.php?sub=cartes'); exit; //$html=fitxers($admin_mode); //$contingut=getBody($html); //$contingut=$res.$contingut; break; case 'cartes.upload': $desc=$_POST['descripcio']; $nom=$_POST['nom']; $res=uploadFile($nom,$desc,$_FILES); header('Location: index.php?sub=cartes'); exit; //$html=fitxers($admin_mode); //$contingut=getBody($html); //$contingut=$res.$contingut; break; case 'cartes.delete': $res=update('delete',$fitxer,''); header('Location: index.php?sub=cartes'); exit; //$html=fitxers($admin_mode); //$contingut=getBody($html); //$contingut=$res.$contingut; break; case 'cartes.edit': $html=edita($fitxer); $contingut=getBody($html); save_user_task($user,"secretaria:cartes"); break; case 'cartes.add': $html=add(); $contingut=getBody($html); break; case 'tramits': $html=tramits_index(); $contingut=getBody($html); break; case 'tramits.update': save_user_task($user,"secretaria:tramits"); $res=tramits_update($_POST); header('Location: index.php?sub=tramits'); exit; //$html=tramits_index(); //$contingut=$res.getBody($html); break; case 'tramits.soci': $contingut=loadWebpage('tramits/templates/socis.html'); break; case 'tramits.dvd': if(!tramit_obert('dvd')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } else { $contingut=getBody(dvd_index($admin_mode)); save_user_task($current_user,"secretaria:tramits.dvd"); } break; case 'tramits.dvd.formulari': if(!tramit_obert('dvd')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } else { $contingut=getBody(dvd_formulari()); } break; case 'tramits.dvd.consulta': if(!tramit_obert('dvd')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(dvd_consulta()); break; case 'tramits.dvd.comanda': if(tramit_obert('dvd')) { $html=comanda_dvd(); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.aplec': $drets=rights(who()); if(!tramit_obert('aplec')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } else { //$contingut=loadWebpage('tramits/aplec/templates/formulari.html'); $contingut=getBody(formulari_aplec()); save_user_task($user,"secretaria:tramits.aplec"); } break; case 'tramits.aplec.envia': if(tramit_obert('aplec')) { $html=envia_aplec(); $contingut=getBody($html); } else{ caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula': //$drets=rights(who()); if(tramit_obert('matricula')) { $html=matricula_list(); $contingut=getBody($html); save_user_task($user,"secretaria:tramits.matricula"); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.formulari': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_formulari($_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.processa': $res=matricula_processa(); if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.esborra': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $res=matricula_esborra($_REQUEST['id']); header('Location: index.php?sub=tramits.matricula'); exit; break; case 'tramits.matricula.enviada': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(matricula_enviada($_REQUEST['id'])); break; case 'tramits.matricula.detalls': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(matricula_detalls($_REQUEST['id'])); break; case 'tramits.matricula.fitxapersonal': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_edita_salmo($_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.generafitxapersonal': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } matricula_genera_salmo($_REQUEST['id']); break; case 'tramits.matricula.fitxamedica': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_edita_blanca($_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.generafitxamedica': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } matricula_genera_blanca($_REQUEST['id']); break; case 'tramits.matricula.autoritzacioweb': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_edita_web($_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.generaautoritzacioweb': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } matricula_genera_web($_REQUEST['id']); break; case 'tramits.matricula.vehicle': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_vehicle($_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.generavehicle': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } matricula_genera_vehicle($_REQUEST['id']); break; case 'tramits.matricula.fet': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } matricula_marca_fet($_REQUEST['id'],$_REQUEST['tasca']); break; case 'tramits.matricula.pendent': if(!tramit_obert('matricula')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } matricula_marca_pendent($_REQUEST['id'],$_REQUEST['tasca']); break; /*case 'tramits.matricula.pendentsenyal': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_pendents('accepted'); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.pendentdocs': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_pendents('documentacio'); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.pendentsegon': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_pendents('docok'); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.notificapendentsenyal': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_notifica_pendent('accepted',$_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.notificapendentdocs': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_notifica_pendent('documentacio',$_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break; case 'tramits.matricula.notificapendentsegon': if(tramit_obert('matricula')) { //Visible pels administradors de tràmits per fer proves. $html=matricula_notifica_pendent('docok',$_REQUEST['id']); $contingut=getBody($html); } else { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } break;*/ case 'tramits.sopars': if(!tramit_obert('sopars')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(sopars_index($admin_mode)); save_user_task($user,"secretaria:tramits.sopars"); break; case 'tramits.sopars.formulari': if(!tramit_obert('sopars')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(sopars_formulari()); break; case 'tramits.sopars.envia': if(!tramit_obert('sopars')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(sopars_envia()); break; case 'tramits.sopars.download': sopars_download(); break; case 'tramits.sopars.consulta': if(!tramit_obert('sopars')) { caixaError('Tràmit no disponible.'); header('Location: index.php?sub=tramits'); exit; } $contingut=getBody(sopars_consulta()); break; case 'access.download': access_get_matricules(); break; case 'access.denega': access_marca($_REQUEST['id'],'denied',$_REQUEST['motiu']); break; case 'access.espera': access_marca($_REQUEST['id'],'queue'); break; case 'access.accept': access_marca($_REQUEST['id'],'accepted'); break; case 'access.numero': access_numero($_REQUEST['id'],$_REQUEST['num']); break; case 'access.baixa': access_marca($_REQUEST['id'],'baixa'); break; case 'access.docbits': $docbits=(int)$_REQUEST['docbits']; if($docbits) if($docbits==1) access_marca($_REQUEST['id'],'docok',$_REQUEST['docbits']); else access_marca($_REQUEST['id'],'pending',$_REQUEST['docbits']); else access_marca($_REQUEST['id'],'completed'); break; case 'access.pagaisenyal': access_marca($_REQUEST['id'],'senyal'); break; case 'access.grup': access_grup($_REQUEST['id'],$_REQUEST['grup']); break; case 'access.tutors': access_tutors($_REQUEST['tutorlist']); break; case 'access.tutor': access_tutor($_REQUEST['codi'],$_REQUEST['tutors']); break; case 'access.massgrups': access_gruplist($_REQUEST['gruplist']); break; case 'access.override': access_override($_REQUEST['id'],$_REQUEST['field'],$_REQUEST['value']); exit; break; case 'access.getfitxes': access_fitxes_download(); break; case 'access.getoverrides': access_get_overrides($_REQUEST['id']); break; case 'access.sid': access_get_sid(); break; case 'bd': $html=bd_main(); $contingut=getBody($html); break; case 'bd.download': $html=download(); $contingut=getBody($html); break; case 'bd.upload': $res=upload(); header('Location: index.php?sub=bd'); exit; break; case 'bd.testpdf': test_pdf(); break; case 'contacte': $contingut=loadWebPage('contacte.html'); break; default: $contingut=loadWebpage('tonteria'); break; } } if(strstr($sub,'tramits')!==false) { list($tr,$id)=explode('.',$sub); if($id!='') if(tramit_obert($id) && estat_tramit($id)==false) $contingut="
Mode administrador. El tràmit està tancat.
$contingut"; } echo applytemplate($template,$topmenu,$leftmenu,$contingut); saveURL($HTTP_SERVER_VARS['REQUEST_URI']); ?>