Go to the source code of this file.
Functions | |
GetVersion ($p_cn) | |
ExecuteScript ($p_cn, $script) | |
Variables | |
$inc_path = get_include_path() | |
$flag_php = 0 | |
$sql = "select lanname from pg_language where lanname='plpgsql'" | |
$Res = CountSql($cn,$sql) | |
$flag = 0 | |
$a = DbConnect() | |
else print Connect to database | success< br > |
$cn = DbConnect() | |
$Resdossier = ExecSql($cn,"select dos_id, dos_name from ac_dossier") | |
$MaxDossier = pg_NumRows($Resdossier) | |
$db = DbConnect($db_row['dos_id'],'dossier') | |
$Max = pg_NumRows($Res) | |
$Res2 = ExecSql($db,'select coalesce(max(jr_grpt_id),1) as l from jrn') | |
$Max2 = pg_NumRows($Res2) | |
$M = $Row['l'] |
Definition in file setup.php.
|
Definition at line 104 of file setup.php. References $sql, ExecSql(), exit, print, and Rollback(). 00104 { 00105 $hf=fopen($script,'r'); 00106 if ( $hf == false ) { 00107 echo 'Ne peut ouvrir '.$script; 00108 exit(); 00109 } 00110 $sql=""; 00111 $flag_function=false; 00112 while (!feof($hf)) { 00113 $buffer=fgets($hf); 00114 $buffer=str_replace ("$","\$",$buffer); 00115 print $buffer."<br>"; 00116 // comment are not execute 00117 if ( substr($buffer,0,2) == "--" ) { 00118 //echo "comment $buffer"; 00119 continue; 00120 } 00121 // Blank Lines Are Skipped 00122 If ( Strlen($buffer)==0) { 00123 //echo "Blank $buffer"; 00124 Continue; 00125 } 00126 if ( strpos(strtolower($buffer),"create function")===0 ) { 00127 echo "found a function"; 00128 $flag_function=true; 00129 $sql=$buffer; 00130 continue; 00131 } 00132 if ( strpos(strtolower($buffer),"create or replace function")===0 ) { 00133 echo "found a function"; 00134 $flag_function=true; 00135 $sql=$buffer; 00136 continue; 00137 } 00138 // No semi colon -> multiline command 00139 if ( $flag_function== false && strpos($buffer,';') == false ) { 00140 $sql.=$buffer; 00141 continue; 00142 } 00143 if ( $flag_function ) { 00144 if ( strpos(strtolower($buffer), "language plpgsql") === false && 00145 strpos(strtolower($buffer), "language 'plpgsql'") === false ) { 00146 $sql.=$buffer; 00147 continue; 00148 } 00149 } else { 00150 // cut the semi colon 00151 $buffer=str_replace (';','',$buffer); 00152 } 00153 $sql.=$buffer; 00154 if ( ExecSql($p_cn,$sql) == false ) { 00155 Rollback($p_cn); 00156 if ( DEBUG=='false' ) ob_end_flush(); 00157 print "ERROR : $sql"; 00158 exit(); 00159 } 00160 $sql=""; 00161 $flag_function=false; 00162 print "<hr>"; 00163 } // while (feof) 00164 fclose($hf); 00165 }
|
|
Definition at line 87 of file setup.php. References $a, $Res, and ExecSql(). 00087 { 00088 $Res=ExecSql($p_cn,"select val from version"); 00089 $a=pg_fetch_array($Res,0); 00090 return $a['val']; 00091 }
|
|
|
|
|
|
Definition at line 396 of file setup.php. Referenced by ViewJrn(). |
|
Definition at line 269 of file setup.php. Referenced by AddFiche(), ComputeTotalVat(), FormFin(), FormODS(), and fiche::getAttribut(). |
|
|
|
|
|
Definition at line 438 of file setup.php. Referenced by DisplayDetailModele(), and Balance::GetRow(). |
|
|
|
|
|
|
|
|
Definition at line 433 of file setup.php. Referenced by Centralise(), CheckJrn(), TransferCSV(), and Customer::VatListing(). |
|
|
|
|
|
|