* @version $Id$
* @package FrontAccounting
* @copyright (C) 2005 - 2008 FrontAccounting
-* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
+* @license http://www.gnu.org/copyleft/agpl-3.0.html GNU/AGPL
* FrontAccounting is Free Software
*/
! -> Note
$ -> Affected files
+21-Nov-2008 Joe Hunt
++ Preparing for Graphic Links instead of Text Links (user display option, default)
+ (new field in 0_users, graphic_links)
+$ config.php
+ /admin/display_prefs.php
+ /admin/db/users_db.inc
+ /includes/current_user.inc
+ /includes/prefs/userprefs.inc
+ /includes/ui/ui_controls.inc
+ /sql/alter2.1.sql
+ /themes/default/images/add.png, credit.gif, delete.gif, download.gif, edit.gif, gl.png,
+ invoice.gif, money.png, pdf.gif, print.png, remove.png, report.png, view.gif
+ /themes/aqua/images/add.png, credit.gif, delete.gif, download.gif, edit.gif, gl.png,
+ invoice.gif, money.png, pdf.gif, print.png, remove.png, report.png, view.gif
+ /themes/cool/images/add.png, credit.gif, delete.gif, download.gif, edit.gif, gl.png,
+ invoice.gif, money.png, pdf.gif, print.png, remove.png, report.png, view.gif
+
20-Nov-2008 Joe Hunt
+ Added new AGPL license file
$ /doc/license.txt (new file)
2. Copyright and disclaimer
---------------------------
-This application is opensource software released under the GPL. Please
+This application is opensource software released under the AGPL. Please
see source code and the LICENSE file
\ No newline at end of file
<?php
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
function add_user($user_id, $real_name, $password, $phone, $email, $full_access,
$language, $profile, $rep_popup, $pos)
function update_user_display_prefs($user_id, $price_dec, $qty_dec, $exrate_dec,
$percent_dec, $showgl, $showcodes, $date_format, $date_sep, $tho_sep,
- $dec_sep, $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size)
+ $dec_sep, $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size, $graphic_links)
{
$sql = "UPDATE ".TB_PREF."users SET
prices_dec=".db_escape($price_dec).",
show_hints=$show_hints,
print_profile=".db_escape($profile).",
rep_popup=$rep_popup,
- query_size=$query_size
+ query_size=$query_size,
+ graphic_links=$graphic_links
WHERE user_id = ".db_escape($user_id);
db_query($sql, "could not update user display prefs for $user_id");
<?php
-
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security =10;
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
$_POST['date_format'], $_POST['date_sep'],
$_POST['tho_sep'], $_POST['dec_sep'],
$_POST['theme'], $_POST['page_size'], check_value('show_hints'),
- $_POST['profile'], check_value('rep_popup'), (int)($_POST['query_size']));
+ $_POST['profile'], check_value('rep_popup'), (int)($_POST['query_size']), check_value('graphic_links'));
language::set_language($_POST['language']);
check_row(_("Use popup window to display reports:"), 'rep_popup', user_rep_popup(),
false, _('Set this option to on if your browser directly supports pdf files'));
+check_row(_("Use icons instead of text links:"), 'graphic_links', user_graphic_links(),
+ false, _('Set this option to on for using icons instead of text links'));
+
text_row_ex(_("Query page size:"), 'query_size', 5, 5, '', user_query_size());
table_section_title(_("Language"));
<?php
- /*--------------------------------------------------\
- | | | config.php |
- |---------------------------------------------------|
- | FrontAccounting |
- | http://frontaccounting.com/ |
- | by FrontAccounting |
- |---------------------------------------------------|
- | |
- \--------------------------------------------------*/
-
- //--------------------------------------------------
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
+ //--------------------------------------------------
// User configurable variables
//---------------------------------------------------
// additional js source included in header
$js_lib = $js_userlib = array();
+if (!defined('ICON_EDIT'))
+{
+ define("ICON_EDIT", "edit.gif");
+ define("ICON_DELETE", "delete.gif");
+ define("ICON_ADD", "add.png");
+ define("ICON_GL", "gl.png");
+ define("ICON_PRINT", "print.png");
+ define("ICON_PDF", "pdf.gif");
+ define("ICON_DOC", "invoice.gif");
+ define("ICON_CREDIT", "credit.gif");
+ define("ICON_DOWN", "download.gif");
+ define("ICON_MONEY", "money.png");
+ define("ICON_REMOVE", "remove.png");
+ define("ICON_REPORT", "report.png");
+ define("ICON_VIEW", "view.gif");
+}
?>
\ No newline at end of file
<?php
-
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
$page_security = 3;
$path_to_root="../..";
include($path_to_root . "/includes/session.inc");
label_cell($myrow['description']);
label_cell($deposit_text);
label_cell($bank_text);
- edit_button_cell("Edit".$myrow["id"], _("Edit"));
- edit_button_cell("Delete".$myrow["id"], _("Delete"));
+ edit_button_cell("Edit".$myrow["id"], _("Edit"), false, ICON_EDIT);
+ edit_button_cell("Delete".$myrow["id"], _("Delete"), false, ICON_DELETE);
end_row();
}
label_cell(get_dimension_string($myrow['dimension_id'], true));
if ($dim > 1)
label_cell(get_dimension_string($myrow['dimension2_id'], true));
- edit_button_cell("BEd".$myrow["id"], _("Edit"));
- edit_button_cell("BDel".$myrow["id"], _("Delete"));
+ edit_button_cell("BEd".$myrow["id"], _("Edit"), false, ICON_EDIT);
+ edit_button_cell("BDel".$myrow["id"], _("Delete"), false, ICON_DELETE);
end_row();
}
end_table();
<?php
-
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
include_once($path_to_root . "/includes/prefs/userprefs.inc");
//--------------------------------------------------------------------------
function update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec,
$showgl, $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep,
- $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size) {
+ $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size, $graphic_links) {
update_user_display_prefs($this->username, $price_dec,
$qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
$date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize,
- $show_hints, $profile, $rep_popup, $query_size);
+ $show_hints, $profile, $rep_popup, $query_size, $graphic_links);
// re-read the prefs
$user = get_user($this->username);
return $_SESSION["wa_current_user"]->prefs->query_size();
}
+function user_graphic_links()
+{
+ return $_SESSION["wa_current_user"]->prefs->graphic_links();
+}
+
function set_user_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
$date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints,
- $print_profile, $rep_popup, $query_size)
+ $print_profile, $rep_popup, $query_size, $graphic_links)
{
$_SESSION["wa_current_user"]->update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
$date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints,
- $print_profile, $rep_popup, $query_size);
+ $print_profile, $rep_popup, $query_size, $graphic_links);
}
function add_user_js_data() {
<?php
-
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
class user_prefs
{
var $pagesize; // for printing
var $show_hints;
var $query_size; // table pager page length
+ var $graphic_links; // use graphic links
function user_prefs(&$user)
{
$this->print_profile = $user["print_profile"];
$this->rep_popup = $user["rep_popup"];
$this->query_size = $user["query_size"];
+ $this->graphic_links = $user["graphic_links"];
}
function language()
return $this->query_size;
}
+ function graphic_links()
+ {
+ return $this->graphic_links;
+ }
+
function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes)
{
$this->price_dec = $price_dec;
<?php
-
+/**********************************************************************
+ Copyright (C) 2005-2008 FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
//---------------------------------------------------------------------------------
function start_form($multi=false, $sid=false, $action="", $name="")
.($title ? " title='$title'":'') .">" . _("Delete") . "</a>", "nowrap");
}
-function edit_button($name, $value, $title=false)
+function edit_button($name, $value, $title=false, $icon=false)
{
-// php silently changes dots,spaces,'[' and characters 128-159
-// to underscore in POST names, to maintain compatibility with register_globals
- echo "<input type=\"submit\" class=\"editbutton\" name=\""
- .htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B')))
- ."\" value=\"$value\""
- .($title ? " title='$title'":'')." />\n";
+ // php silently changes dots,spaces,'[' and characters 128-159
+ // to underscore in POST names, to maintain compatibility with register_globals
+ if (user_graphic_links() && $icon)
+ {
+ global $path_to_root;
+ $name = htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B')));
+ echo "<button type='submit' class='editbutton' name='$name' value='' /><img src='$path_to_root/themes/".user_theme().
+ "/images/$icon' width='14' height='14' border='0' ".($title ? "title='$title'" : "title='$value'")." />\n";
+ }
+ else
+ echo "<input type=\"submit\" class=\"editbutton\" name=\""
+ .htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B')))
+ ."\" value=\"$value\""
+ .($title ? " title='$title'":'')." />\n";
}
-function edit_button_cell($name, $value, $title=false)
+function edit_button_cell($name, $value, $title=false, $icon=false)
{
echo "<td>";
- edit_button($name, $value, $title);
+ edit_button($name, $value, $title, $icon);
echo "</td>";
}
ALTER TABLE `0_users` DROP COLUMN `query_size`;
ALTER TABLE `0_users` ADD `query_size` TINYINT(1) DEFAULT '10';
+ALTER TABLE `0_users` DROP COLUMN `graphic_links`;
+ALTER TABLE `0_users` ADD `graphic_links` TINYINT(1) DEFAULT '1';
+
DROP TABLE IF EXISTS `0_sales_pos`;
CREATE TABLE `0_sales_pos` (