Location: PHPKode > projects > The NO-SOD Project > DMS/fly.php
<?php
/* 
   This file is part of the NO-SOD Framework (http://www.no-sod.org)
   Owner of this file content: ROOTFUSION.COM

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/


include('../adodb/adodb.inc.php'); 		// Load ADODB 
require_once("conf/dbaccess.php");		// Load DB access settings 

require_once("conf/language.php");		// Load language settings 
if (isset($_GET["lang"])) {setlang($_GET["lang"]);$lang=$_GET["lang"];} 

require_once("conf/edms.php");			// Load dms settings 
require_once("class/edms_common.php");		// Load dms general functions 



$message="";						// Init message variable

$jscfrbody='';					// Init Javascript variables for screen time out
$jscfr='';

$sendemail="";					// Init mailing buffer
$sendemailplus=array();
$emailitems=array();

session_start();

$act="getlogin";
if (isset($_GET["act"]))
 {
  $act=$_GET["act"];
 }
else
 {
  if (isset($_POST["act"]))
   {
    $act=$_POST["act"];
   }
 }

 
if (((!isset($_SESSION["userprofile"])) or ($act=="getlogin")) and ($act!="login"))
{
 // New session
 session_destroy();
 session_start();
 $act="getlogin";
}

// Ensure session time
$mywork=@file_get_contents("actions/session.src");
eval($mywork);


$prevact=null;$gui=null;
while ($act!=$prevact)
{
 $prevact=$act;$mywork=@file_get_contents("actions/".$act.".src");
 if ($mywork!=false)
  {
   eval($mywork);
  }
 else {echo htmlspecialchars(gettext("Action File not found")); }
}

freerecordlock("","",true); // FREE RECORDS IF ANY
sendemailbuffer();
if ($gui!=null)
{
 
 $mywork=addslashes(@file_get_contents("html/".$gui.".html"));
 $jscfrbody=getjscfr('jscfrbody');
 $jscfr=getjscfr('jscfr');
 if (isset($morejs)) $jscfr.=$morejs;

 eval( "\$mywork = \"$mywork\";" );$mywork=stripslashes($mywork);echo $mywork;
}

function getcurdate()
{
 return(date("Y-m-d"));
}

function gettimestamp()
{
 return(date("YmdHis"));
}


function rfdbconnect($dbconnector)
{
 // This abstraction to the db connection is used to update the connection type when permanent is required
 global $$dbconnector;


 $dbserver=$dbconnector."server";
 $dbuser=$dbconnector."user";
 $dbpassword=$dbconnector."password";
 $dbdatabase=$dbconnector."database";

 global $$dbserver;global $$dbuser;global $$dbpassword;global $$dbdatabase;

 $res = $$dbconnector->Connect($$dbserver, $$dbuser, $$dbpassword, $$dbdatabase); 
}


function getjscfr($arg)
{
 global $CFRcompliant;
 if (!$CFRcompliant)
  {
   return('');
  }
 else
  {
   global $session_timeout;
   if ($arg=='jscfrbody') return("onLoad=\"startClock()\" onMouseMove=\"resetClock()\" onKeyPress=\"resetClock()\"");
   else
    {
   if ($arg=='jscfr') return("

var timerid
var timerstarted = 0
var cfrtimex = $session_timeout;
var cfrtimey = 1

function resetClock()
{
 cfrtimex=$session_timeout;
}


function startClock()
 {
  cfrtimex = cfrtimex-cfrtimey;
  timerid = setTimeout(\"startClock()\", 1000);
  if(cfrtimex==0){ alert(\"".gettext("Sorry, this screen timed out, and will close")."\"); location.replace('fly.php');  }
 }

");


   }
 }
}

?>
Return current item: The NO-SOD Project