Source for file versioncheck.phpinc

Documentation is available at versioncheck.phpinc

  1. <?php
  2. /**
  3.   * VERSION CHECK
  4.   *
  5.   * this file is called to check if
  6.   * database and source are of a compatible version
  7.   *
  8.   * cms.conf should have antry like:
  9.   *
  10.   * $GLOBALS['CMS']['VERSION']=0;
  11.   *
  12.   * @project    Open CSP-Management
  13.   * @package    cms
  14.   *
  15.   * @author     Peter Krebs (pk)<p.krebs@lvus.at>
  16.   * @copyright  (c) 2003 by Peter Krebs and Landesverlag Unternehmensservice
  17.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  18.   *
  19.   ***/
  20.  
  21. /**
  22.   * @staticvar $_CSP-CMSVERSION current source version number
  23.   ***/
  24. $_CSP_CMSVERSION=2;
  25.  
  26. /**
  27.   * @staticvar $_CSP-UPDATESCRIPTS location of update scirpts
  28.   ***/
  29. $_CSP_UPDATESCRIPTS=$GLOBALS['PROJECT'];
  30.  
  31. if (intval($GLOBALS['CMS']['VERSION'$_CSP_CMSVERSION)) {
  32.     $setupDir=strtolower($GLOBALS['PROJECT']['PATH']."setup/dbmysql/cms/");
  33.     $tblArr['T_CMS_PROJECT']['TBLVER']  =10;
  34.     $tblArr['T_CMS_PROJECT']['FORMREV'=2;
  35.     $tblArr['T_CMS_PROJECT']['DB_TBL_SCRIPT']=$setupDir."T_CMS_PROJECT.mysql";
  36.  
  37.     echo "<h2 align='center'>Versioncheck</h2>";
  38.     echo "<p>Source Version$_CSP_CMSVERSION</p>";
  39.     echo "<p>Config Version: ".$GLOBALS['CMS']['VERSION']."</p>";
  40.  
  41.     foreach($tblArr as $tbl => $checkArray{
  42.         if (!$GLOBALS['USRDB']->tblExists($tbl)) {
  43.             if (($checkArray['DB_TBL_SCRIPT']&& (file_exists($checkArray['DB_TBL_SCRIPT']))) {
  44.                 $GLOBALS['USRDB']->execScript($checkArray['DB_TBL_SCRIPT']);
  45.             else {
  46.                 die($tbl ." NOT INSTALLED ");
  47.             }
  48.         }
  49.  
  50.         // get default form and check db columns useing it
  51.         $query="SELECT * FROM T_DBMS_FORM WHERE FRM_NAME='".$tbl."'";
  52.         if (!$frmRow=$GLOBALS['USRDB']->quickQuery($query)) {
  53.  
  54.         else if (intval($frmRow['FRM_REVISION']$checkArray['FORMREV']{
  55.  
  56.         }
  57.     }
  58.  
  59.            
  60.            
  61.  
  62.  
  63.           
  64.     
  65. }    
  66.  
  67. ?>

Documentation generated on Thu, 08 Jan 2009 17:49:24 +0100 by phpDocumentor 1.4.0a2