Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

postgres.php File Reference

Contains the procedure for connecting to postgresql. More...

Go to the source code of this file.

Functions

 ShowDossier ($p_type, $p_first=0, $p_max=10, $p_Num=0)
 DbConnect ($p_db=-1, $p_type='dossier')
 connect to the database
 ExecSql ($p_connection, $p_string)
 send a sql string to the database
 GetAllUser ()
 Return all the users as an array.
 GetUid ($p_uid)
 Check if the User is valid and return an array with his property.
 GetPriv ($p_dossier, $p_login)
 Get the privilege of an user on a folder.
 ExisteJnt ($p_dossier, $p_user)
 Get the number of rows from table jnt_use_dos where $p_dossier = dos_id and use_id=$p_user.
 ExistePriv ($p_jntid)
 GetJnt ($p_dossier, $p_user)
 GetDbId ($p_name)
 CountSql ($p_conn, $p_sql)
 GetDossierName ($p_dossier)
 GetSequence ($p_cn, $p_seq)
 get the current sequence
 NextSequence ($p_cn, $p_seq)
 get the current sequence
 StartSql ($p_cn)
 EndSql ($p_cn)
 Commit ($p_cn)
 Rollback ($p_cn)
 AlterSequence ($p_cn, $p_name, $p_value)
 GetLogin ($p_uid)
 SyncRight ($p_dossier, $p_user)
 Synchronize les droits par défaut avec les journaux existants.
 GetUserProperty ($p_cn, $p_user)
 Get the properties of an user it means theme, profile, admin...
 GetModeleId ($p_cn, $p_modname)
 Give the mod_id from modeledef.
 GetArray ($p_cn, $p_sql)
 purpose return the result of a sql statment in a array
 save_upload_document ($cn, $seq)
 Save a "piece justificative".


Detailed Description

Contains the procedure for connecting to postgresql.

Definition in file postgres.php.


Function Documentation

AlterSequence p_cn,
p_name,
p_value
 

Definition at line 269 of file postgres.php.

References $Res, and ExecSql().

Commit p_cn  ) 
 

Definition at line 263 of file postgres.php.

References $Res, and ExecSql().

Referenced by Centralise(), Document_modele::Delete(), Document::Generate(), Invoice::Get(), Document_modele::Get(), Document::Get(), ImportCSV(), fiche::insert(), RecordInvoice(), RecordSell(), Document_modele::Save(), Document::SaveGenerated(), TransferCSV(), and Document::Upload().

CountSql p_conn,
p_sql
 

Definition at line 222 of file postgres.php.

References ExecSql().

Referenced by cl_user::AccessJrn(), AddFiche(), cl_user::Admin(), CheckDossier(), CheckIsAdmin(), CheckJrn(), DeleteRapt(), form_verify_input(), FormODS(), FormVenteView(), GetParent(), GetRappel(), fiche_def::HasAttribute(), fiche::insert(), InsertRapt(), ListJrn(), action::myList(), NextJrn(), Remove(), ShowDossier(), fiche::update(), UpdateFiche(), and ViewFiche().

DbConnect p_db = -1,
p_type = 'dossier'
 

connect to the database

Parameters:
: p_db : db_name
Returns:
the connection

Definition at line 72 of file postgres.php.

References $a, and echo_debug().

Referenced by cl_user::Admin(), cl_user::Check(), CheckAction(), CheckDossier(), CheckIsAdmin(), CheckJrn(), cl_user::cl_user(), ExisteJnt(), ExistePriv(), GetAllUser(), GetAvailableFolder(), GetDbId(), GetDossierName(), GetFirstJrnIdForJrnType(), GetJnt(), GetJrnProp(), GetLogin(), GetNumberLine(), GetPosteLibelle(), GetPriv(), GetUid(), html_page_start(), ListJrn(), MenuJrn(), RecordJrn(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrnUser(), SyncRight(), and ViewJrn().

EndSql p_cn  ) 
 

Definition at line 260 of file postgres.php.

References $Res, and ExecSql().

Referenced by Centralise().

ExecSql p_connection,
p_string
 

send a sql string to the database

Parameters:
$p_connection db connection
$p_string sql string
Returns:
false if error otherwise true

Definition at line 99 of file postgres.php.

References $ret, echo_debug(), echo_error(), and exit.

Referenced by AddFiche(), AddForm(), AddModele(), AlterSequence(), fiche::blank(), Centralise(), cl_user::CheckAction(), CheckAction(), CheckJrn(), Commit(), action::Confirm(), fiche::CountByDef(), CountSql(), Document_modele::Delete(), DeleteForm(), DeleteRapt(), fiche::Display(), action::Display(), DisplayDetailModele(), EncodeFiche(), EndSql(), ExecuteScript(), ExisteJnt(), ExistePriv(), FormPeriode(), FormPeriodeMult(), Document::Generate(), parm_code::Get(), Invoice::Get(), fiche_def_ref::Get(), fiche_def::Get(), Document_type::get(), Document_modele::Get(), Document::Get(), Get_attr_def(), Get_attr_min(), Get_fiche_def_ref(), fiche_def::GetAll(), GetAllUser(), GetAmount(), GetArray(), fiche::getAttribut(), fiche_def::GetAttribut(), GetAvailableFolder(), GetBaseFiche(), GetBaseFicheDefault(), fiche::GetByDef(), fiche::GetByQCode(), fiche::GetByType(), GetClass(), GetConcerned(), GetCreateAccount(), GetData(), GetDataForm(), GetDataGrpt(), GetDataJrn(), GetDataJrnJrId(), GetDataJrnPdf(), GetDataModele(), GetDataPoste(), GetDbId(), jrn::GetDefLine(), GetDossierName(), GetExercice(), getFicheAttribut(), GetFicheDef(), getFicheDefName(), GetFicheDefRef(), GetFicheJrn(), getFicheName(), getFicheNameById(), getFicheNameCode(), GetFirstJrnIdForJrnType(), GetFormName(), GetFormulaValue(), Customer::GetFromPoste(), cl_user::GetGlobalPref(), GetGrpt(), GetInternal(), GetJnt(), GetJrnName(), GetJrnProp(), GetJrnProperty(), GetLogin(), GetModeleId(), jrn::GetName(), fiche::getName(), GetNextFiche(), GetNumberLine(), GetPeriode(), getPeriodeFromDate(), getPeriodeFromMonth(), GetPosteLibelle(), cl_user::GetPreferences(), GetPriv(), GetQuantity(), GetRappel(), rapport::GetRow(), poste::GetRow(), jrn::GetRow(), Balance::GetRow(), jrn::GetRowSimple(), GetSequence(), GetSolde(), poste::GetSolde(), poste::GetSoldeDetail(), GetTvaPoste(), GetTvaRate(), GetUid(), GetUserProperty(), GetVersion(), html_page_start(), ImpHtml(), fiche::insert(), cl_user::insert_default_global_pref(), InsertJrn(), InsertJrnx(), InsertModeleLine(), InsertRapt(), InsertStockGoods(), isCentralize(), IsFicheOfJrn(), isValid(), ListJrn(), parm_code::LoadAll(), fiche_def_ref::LoadAll(), MenuJrn(), Invoice::myList(), Document_modele::myList(), action::myList(), new_fiche(), NextSequence(), Own::Own(), PeriodeClosed(), PosteForm(), RecordFin(), RecordInvoice(), RecordJrn(), RecordSell(), Remove(), fiche::remove(), Rollback(), parm_code::Save(), Invoice::Save(), fiche_def_ref::Save(), Document_modele::Save(), save_upload_document(), Document::SaveGenerated(), SaveModeleName(), action::SaveStage2(), SetInternalCode(), cl_user::SetPeriode(), ShowDevise(), ShowDossier(), ShowMenuComptaForm(), ShowMenuFiche(), ShowMenuJrn(), ShowMenuJrnUser(), ShowPeriode(), StartSql(), fiche::strAttribut(), SyncRight(), TransferCSV(), fiche::update(), cl_user::update_global_pref(), UpdateComment(), UpdateCSV(), UpdateFiche(), UpdateForm(), Document::Upload(), Customer::VatListing(), VerifImport(), ViewDetailStock(), ViewFiche(), ViewFicheDetail(), ViewJrn(), and ViewStock().

ExisteJnt p_dossier,
p_user
 

Get the number of rows from table jnt_use_dos where $p_dossier = dos_id and use_id=$p_user.

Definition at line 168 of file postgres.php.

References $cn, $Res, DbConnect(), and ExecSql().

ExistePriv p_jntid  ) 
 

Definition at line 179 of file postgres.php.

References $cn, $Res, DbConnect(), and ExecSql().

GetAllUser  ) 
 

Return all the users as an array.

Definition at line 117 of file postgres.php.

References $cn, $Num, $Res, $sql, $User, DbConnect(), echo_debug(), and ExecSql().

GetArray p_cn,
p_sql
 

purpose return the result of a sql statment in a array

Parameters:
$p_cn database connection
$p_sql sql query

Definition at line 353 of file postgres.php.

References $array, $r, echo_debug(), and ExecSql().

Referenced by FormAchInput(), and FormVenInput().

GetDbId p_name  ) 
 

Definition at line 201 of file postgres.php.

References $cn, $num, DbConnect(), and ExecSql().

GetDossierName p_dossier  ) 
 

Parameters:
id of a dossier
Returns:
Name of the dossier

Definition at line 232 of file postgres.php.

References $cn, $r, $Ret, DbConnect(), and ExecSql().

GetJnt p_dossier,
p_user
 

Definition at line 190 of file postgres.php.

References $cn, $Res, DbConnect(), and ExecSql().

GetLogin p_uid  ) 
 

Definition at line 273 of file postgres.php.

References $cn, $Res, DbConnect(), and ExecSql().

GetModeleId p_cn,
p_modname
 

Give the mod_id from modeledef.

Parameters:
$p_cn database connection (repository)
$p_modname template name
Returns:
template id or 0 if not found

Definition at line 340 of file postgres.php.

References $Res, and ExecSql().

GetPriv p_dossier,
p_login
 

Get the privilege of an user on a folder.

Definition at line 147 of file postgres.php.

References $cn, $i, $Num, $Res, DbConnect(), echo_debug(), and ExecSql().

Referenced by SyncRight().

GetSequence p_cn,
p_seq
 

get the current sequence

Definition at line 242 of file postgres.php.

References $Res, $seq, and ExecSql().

Referenced by AddFiche(), AddForm(), AddModele(), InsertJrn(), InsertJrnx(), Document::SaveGenerated(), and action::SaveStage2().

GetUid p_uid  ) 
 

Check if the User is valid and return an array with his property.

Definition at line 134 of file postgres.php.

References $cn, $Num, $Res, DbConnect(), and ExecSql().

GetUserProperty p_cn,
p_user
 

Get the properties of an user it means theme, profile, admin...

Parameters:
$p_user user login
$p_cn connection
Returns:
an array containing
  • use_admin
  • use_usertype
  • g_theme
  • use_name
  • use_login

Definition at line 315 of file postgres.php.

References $a, $Ret, $sql, and ExecSql().

NextSequence p_cn,
p_seq
 

get the current sequence

Definition at line 251 of file postgres.php.

References $Res, $seq, and ExecSql().

Referenced by Document::Generate(), fiche::insert(), RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), Document_modele::Save(), SetInternalCode(), and TransferCSV().

Rollback p_cn  ) 
 

Definition at line 266 of file postgres.php.

References $Res, and ExecSql().

Referenced by ExecuteScript(), RecordFin(), RecordInvoice(), RecordSell(), Invoice::Save(), Document_modele::Save(), save_upload_document(), Document::SaveGenerated(), TransferCSV(), and Document::Upload().

save_upload_document cn,
seq
 

Save a "piece justificative".

save_upload_document

Parameters:
$cn database connection
$seq jr_grpt_id

Definition at line 368 of file postgres.php.

References $old_oid, $r, $ret, echo_debug(), echo_error(), ExecSql(), exit, name, and Rollback().

Referenced by RecordInvoice(), and RecordSell().

ShowDossier p_type,
p_first = 0,
p_max = 10,
p_Num = 0
 

Parameters:
p_type string : all for all dossiers lim for only the dossier where we've got rights
Show the folder where user have access. Return : nothing ++

Definition at line 32 of file postgres.php.

References $_SESSION, $cn, $Max, $row, CountSql(), DbConnect(), echo_debug(), and ExecSql().

StartSql p_cn  ) 
 

Definition at line 257 of file postgres.php.

References $Res, and ExecSql().

Referenced by Centralise(), Document_modele::Delete(), Document::Generate(), Invoice::Get(), Document_modele::Get(), Document::Get(), ImportCSV(), fiche::insert(), RecordFin(), RecordInvoice(), RecordODS(), RecordSell(), Invoice::Save(), Document_modele::Save(), Document::SaveGenerated(), TransferCSV(), and Document::Upload().

SyncRight p_dossier,
p_user
 

Synchronize les droits par défaut avec les journaux existants.

SyncRight

Parameters:
$p_dossier dossier id
$p_user user id

Definition at line 289 of file postgres.php.

References $cn, $priv, $Res, $right, $sql, DbConnect(), ExecSql(), and GetPriv().


Generated on Fri Jun 23 00:12:47 2006 for phpcompta by  doxygen 1.4.4