* Update web view with shared accounts
* Update TODO
This commit is contained in:
parent
6568acbae7
commit
ed8225407c
4
INSTALL
4
INSTALL
|
@ -4,7 +4,11 @@ libsqlite3-dev
|
|||
libwxgtk2.8-dev
|
||||
g++
|
||||
make
|
||||
gettext
|
||||
|
||||
Optionnal :
|
||||
poeditor
|
||||
php5
|
||||
|
||||
** Compilation of extra libraries **
|
||||
cd lib/wxsqlite3-1.9.9
|
||||
|
|
|
@ -30,7 +30,7 @@ class User
|
|||
foreach($this->categories as $i => $category)
|
||||
if ($category["id"] == "$id") return $category;
|
||||
|
||||
return "";
|
||||
return LoadCategory($this, $id);
|
||||
}
|
||||
|
||||
function GetAccountName($id)
|
||||
|
|
|
@ -92,6 +92,12 @@ function LoadUser($name)
|
|||
|
||||
$user->accounts = array();
|
||||
|
||||
while ($row = $result->fetchArray())
|
||||
array_push($user->accounts, $row);
|
||||
|
||||
// Shared accounts
|
||||
$result = $db->query("SELECT * FROM account WHERE id IN (SELECT account FROM shared_account WHERE user='$user->id') ORDER BY name ASC");
|
||||
|
||||
while ($row = $result->fetchArray())
|
||||
array_push($user->accounts, $row);
|
||||
|
||||
|
@ -117,6 +123,21 @@ function LoadUser($name)
|
|||
return $user;
|
||||
}
|
||||
|
||||
function LoadCategory(&$user, $id)
|
||||
{
|
||||
$result = $db->query("SELECT * FROM category WHERE id='$id'");
|
||||
|
||||
if ($row = $result->fetchArray())
|
||||
{
|
||||
ExtractStyle($row);
|
||||
array_push($user->categories, $row);
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function GetAccountAmount($id, $month, $year)
|
||||
{
|
||||
global $db;
|
||||
|
@ -150,7 +171,6 @@ function LoadMonth($user, $month, $year)
|
|||
$req .= $user->preferences["operation_order"];
|
||||
|
||||
return $db->query($req);
|
||||
|
||||
}
|
||||
|
||||
function GetAllOperations($user, &$last_year, &$last_month)
|
||||
|
|
Loading…
Reference in New Issue
Block a user