5 * @author Cristian NAVALICI (lemonsoftware [..] gmail [.] com)
9 require_once('DBC_cfunctions.php');
13 // ----------------------------------------------------------------------------
20 function dc_yearly_closing() {
23 // take all opened DBC
24 $r = mysql_query("SELECT * FROM cl_axes WHERE ax_open = 1");
25 while ( $row = mysql_fetch_array($r) ) {
26 // and calculate the age
27 $age = df_dbc_age($row['ax_id']);
29 $newid = duplicate_dbc($row['ax_id']);
30 df_cronlog("DBC id: {$row['ax_id']} was duplicated with DBC id: $newid ");
35 //-----------------------------------------------------------------------------
39 make the connections to openemr database
40 the variables are taken from sqlconf.php
45 function dc_connect() {
46 require_once(dirname(__FILE__
) . '/sqlconf.php');
47 global $host, $login, $pass, $dbase;
49 $link = mysql_connect($host, $login, $pass);
51 die('Could not connect: ' . mysql_error());
54 mysql_query("USE " . $dbase);