Example #1
0
         echo '</div>';
         echo '</body></html>';
         exit;
     }
     /////////////////////////////////////////////////////////////////////////////
     // load a file
     /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
 // load a file
 /////////////////////////////////////////////////////////////////////////////
 case 'loadfile':
     if ($access == 'W' && isset($_FILES)) {
         $cn->start();
         // remove the file
         $grpt = $cn->get_value('select jr_grpt_id from jrn where jr_id=$1', array($jr_id));
         $cn->save_upload_document($grpt);
         $cn->commit();
         // Show a link to the new file
         $op->get();
         $obj = $op->get_quant();
         /* return an obj. ACH / FIN or VEN or null if nothing is found*/
         echo "<html><head>";
         $repo = new Database();
         $theme = $repo->get_value("select the_filestyle from theme where the_name=\$1", array($_SESSION['g_theme']));
         echo "   <LINK REL=\"stylesheet\" type=\"text/css\" href=\"{$theme}\" media=\"screen\">";
         echo "</head>";
         if (!isset($_REQUEST['ajax'])) {
             echo "<body class=\"op_detail_frame\">";
         } else {
             echo "<body>";
         }