Location: PHPKode > projects > Cowtacular > cowtacular-0.51/scripts/dbstatus.php
<?php
// ******************************************************************
//  Cowtacular
//  (c) 2010 - Cowtacular LLC
//
//  http://www.cowtacular.com
//
// ******************************************************************

  $db_ignoreversion = 1;
  
  // Change the working directory to the proper location
  $scriptspath = $_SERVER["PWD"] ."/". $_SERVER["PHP_SELF"];
  if (! file_exists($scriptspath))
    die("\n\nStopping!  Could not find script at ". $scriptspath ."\n\n");
  $scriptspath = str_replace("/scripts/". basename($scriptspath), "", $scriptspath);
  chdir($scriptspath);

  // Load the configuration
  include_once('cow-config.php');
              
  // Include the global library
  include_once('global/lib.php');

  // DO STUFF HERE
  $status = "";
  
  if ($lib_version != db_getconfigvalue("DBVERSION"))
    $status .= "Upgrade required";
  else 
    $status = "Healthy";
    
  echo $status;
  
  // Close the databases
  db_writeobjectcache();
  db_close();  

?>
Return current item: Cowtacular