. * * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. */ /* * Created on 13-02-2008 * * @author David Callizaya */ switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) { case - 2: G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' ); G::header( 'location: ../login/login' ); die(); break; case - 1: G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' ); G::header( 'location: ../login/login' ); die(); break; } require_once ("classes/model/AppDocumentPeer.php"); $oAppDocument = new AppDocument(); $oAppDocument->Fields = $oAppDocument->load( $_GET['a'] ); $sAppDocUid = $oAppDocument->getAppDocUid(); $info = pathinfo( $oAppDocument->getAppDocFilename() ); if (! isset( $_GET['ext'] )) { $ext = $info['extension']; } else { if ($_GET['ext'] != '') { $ext = $_GET['ext']; } else { $ext = $info['extension']; } } $realPath = PATH_DOCUMENT . G::getPathFromUID($_SESSION['APPLICATION']) . '/outdocs/' . $info['basename'] . '.' . $ext; G::streamFile( $realPath, true );