(new field in 0_users, graphic_links)
$ config.php
/admin/display_prefs.php
+ /admin/create_coy.php
+ /admin/inst_lang.php
+ /admin/inst_module.php
/admin/db/users_db.inc
/includes/current_user.inc
/includes/prefs/userprefs.inc
/includes/ui/ui_controls.inc
+ /includes/ui/ui_input.inc
+ /includes/ui/ui_view.inc
+ /reporting/includes/reporting.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
<?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 = 20;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
label_cell($conn[$i]['dbname']);
label_cell($conn[$i]['tbpref']);
label_cell($what);
- label_cell("<a href=" . $_SERVER['PHP_SELF']. "?selected_id=" . $i . ">" . _("Edit") . "</a>");
+ $edit = _("Edit");
+ $delete = _("Delete");
+ if (user_graphic_links())
+ {
+ global $path_to_root;
+ $edit = "<img src='$path_to_root/themes/".user_theme()."/images/".ICON_EDIT."' width='14' height='14' border='0' title='$edit' />\n";
+ $delete = "<img src='$path_to_root/themes/".user_theme()."/images/".ICON_DELETE."' width='14' height='14' border='0' title='$delete' />\n";
+ }
+ label_cell("<a href='" . $_SERVER['PHP_SELF']. "?selected_id=$i'>$edit</a>");
label_cell( $i == $coyno ? '' :
- "<a href='javascript:deleteCompany(" . $i . ")'>" . _("Delete") . "</a>");
+ "<a href='javascript:deleteCompany(" . $i . ")'>$delete</a>");
end_row();
}
<?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 = 20;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
else
$rtl = _("No");
label_cell($rtl);
- edit_link_cell("selected_id=" . $i);
-
+ $edit = _("Edit");
+ $delete = _("Delete");
+ if (user_graphic_links())
+ {
+ global $path_to_root;
+ $edit = "<img src='$path_to_root/themes/".user_theme()."/images/".ICON_EDIT."' width='14' height='14' border='0' title='$edit' />\n";
+ $delete = "<img src='$path_to_root/themes/".user_theme()."/images/".ICON_DELETE."' width='14' height='14' border='0' title='$delete' />\n";
+ }
+ label_cell("<a href='" . $_SERVER['PHP_SELF']. "?selected_id=$i'>$edit</a>");
label_cell($conn[$i]['code'] == $lang ? '' :
- "<a href='javascript:deleteLanguage(" . $i . ")'>" . _("Delete") . "</a>");
+ "<a href='javascript:deleteLanguage(" . $i . ")'>$delete</a>");
end_row();
}
<?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 = 20;
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
label_cell($mods[$i]['name']);
label_cell($mods[$i]['path']);
label_cell($mods[$i]['filename']);
- edit_link_cell("selected_id=" . $i);
- label_cell("<a href='javascript:deleteModule(".$i.", \"" . $mods[$i]['name'] . "\")'>" . _("Delete") . "</a>");
+ $edit = _("Edit");
+ $delete = _("Delete");
+ if (user_graphic_links())
+ {
+ global $path_to_root;
+ $edit = "<img src='$path_to_root/themes/".user_theme()."/images/".ICON_EDIT."' width='14' height='14' border='0' title='$edit' />\n";
+ $delete = "<img src='$path_to_root/themes/".user_theme()."/images/".ICON_DELETE."' width='14' height='14' border='0' title='$delete' />\n";
+ }
+ label_cell("<a href='" . $_SERVER['PHP_SELF']. "?selected_id=$i'>$edit</a>");
+ label_cell("<a href='javascript:deleteModule(".$i.", \"" . $mods[$i]['name'] . "\")'>$delete</a>");
end_row();
}
label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View")));
if ($print_out)
label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type));
- label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name], _("View GL")));
+ label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name]));
end_row();
label_cell($myrow['description']);
label_cell($deposit_text);
label_cell($bank_text);
- edit_button_cell("Edit".$myrow["id"], _("Edit"), false, ICON_EDIT);
- edit_button_cell("Delete".$myrow["id"], _("Delete"), false, ICON_DELETE);
+ edit_button_cell("Edit".$myrow["id"], _("Edit"));
+ delete_button_cell("Delete".$myrow["id"], _("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"), false, ICON_EDIT);
- edit_button_cell("BDel".$myrow["id"], _("Delete"), false, ICON_DELETE);
+ edit_button_cell("BEd".$myrow["id"], _("Edit"));
+ delete_button_cell("BDel".$myrow["id"], _("Delete"));
end_row();
}
end_table();
end_row();
}
-function edit_link_cell($param, $title=false)
-{
- label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'"
- .($title ? " title='$title'":'').">" . _("Edit") . "</a>", "nowrap");
-}
-
-function delete_link_cell($param, $title=false)
-{
- label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'"
- .($title ? " title='$title'":'') .">" . _("Delete") . "</a>", "nowrap");
-}
+//-----------------------------------------------------------------------------------
-function edit_button($name, $value, $title=false, $icon=false)
+function 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
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";
+ echo "<button type='submit' class='editbutton' name='".
+ htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B'))).
+ "' 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=\""
+ echo "<input type='submit' class='editbutton' name='"
.htmlentities(strtr($name, array('.'=>'=2E',' '=>'=20','='=>'=3D','['=>'=5B')))
- ."\" value=\"$value\""
+ ."' value='$value'"
.($title ? " title='$title'":'')." />\n";
+
}
-function edit_button_cell($name, $value, $title=false, $icon=false)
+function button_cell($name, $value, $title=false, $icon=false)
{
echo "<td>";
- edit_button($name, $value, $title, $icon);
+ button($name, $value, $title, $icon);
echo "</td>";
}
+function delete_button_cell($name, $value, $title=false)
+{
+ button_cell($name, $value, $title, ICON_DELETE);
+}
+
+function edit_button_cell($name, $value, $title=false)
+{
+ button_cell($name, $value, $title, ICON_EDIT);
+}
+
//-----------------------------------------------------------------------------------
function start_row($param="")
<?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 get_post($name, $dflt='')
{
}
}
//---------------------------------------------------------------------------------
-
+/*
function button($name, $value, $onclick, $title=false)
{
default_focus($name);
button($name, $value, $onclick, $title);
echo "</td>\n";
}
-
+*/
//-----------------------------------------------------------------------------------
function check_value($name)
<?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 . "/admin/db/voiding_db.inc");
include_once($path_to_root . "/includes/types.inc");
//--------------------------------------------------------------------------------------
-function get_supplier_trans_view_str($type, $trans_no, $label="")
+function get_supplier_trans_view_str($type, $trans_no, $label="", $icon=false)
{
global $path_to_root;
if ($viewer != "")
{
$pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$preview_str = "<a target='_blank' href='$path_to_root/purchasing/view/$viewer?trans_no=$trans_no' onclick=\"javascript:openWindow(this.href,this.target); return false;\"$pars[1]>$pars[0]</a>";
}
else
if (!$force && !user_show_gl_info())
return "";
+ $icon = false;
if ($label == "")
+ {
$label = _("GL");
+ $icon = ICON_GL;
+ }
$pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$gl_view = "<a target='_blank' href='$path_to_root/gl/view/gl_trans_view.php?type_id=$type&trans_no=$trans_no' onclick=\"javascript:openWindow(this.href,this.target); return false;\"$pars[1]>$pars[0]</a>";
return $gl_view;
//--------------------------------------------------------------------------------------
-function get_customer_trans_view_str($type, $trans_no, $label="")
+function get_customer_trans_view_str($type, $trans_no, $label="", $icon=false)
{
global $path_to_root;
foreach($trans_no as $trans) {
if ($label == "")
$lbl = $trans;
-
if($preview_str!='') $preview_str .= ',';
if ($viewer != "")
{
$pars = access_string($lbl);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$preview_str .= "<a target='_blank' href='$path_to_root/sales/view/$viewer?trans_no=$trans' onclick=\"javascript:openWindow(this.href,this.target); return false;\" $pars[1]>$pars[0]</a>";
}
else
//--------------------------------------------------------------------------------------
-function get_banking_trans_view_str($type, $trans_no, $label="")
+function get_banking_trans_view_str($type, $trans_no, $label="", $icon=false)
{
global $path_to_root;
if ($viewer != "")
{
$pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$preview_str = "<a target='_blank' href='$path_to_root/gl/view/$viewer?trans_no=$trans_no' onclick=\"javascript:openWindow(this.href,this.target); return false;\"$pars[1]>$pars[0]</a>";
}
else
//--------------------------------------------------------------------------------------
-function get_inventory_trans_view_str($type, $trans_no, $label="")
+function get_inventory_trans_view_str($type, $trans_no, $label="", $icon=false)
{
global $path_to_root;
if ($viewer != "")
{
$pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$preview_str = "<a target='_blank' href='$path_to_root/inventory/view/$viewer?trans_no=$trans_no' onclick=\"javascript:openWindow(this.href,this.target); return false;\"$pars[1]>$pars[0]</a>";
}
else
//--------------------------------------------------------------------------------------
-function get_manufacturing_trans_view_str($type, $trans_no, $label="")
+function get_manufacturing_trans_view_str($type, $trans_no, $label="", $icon=false)
{
global $path_to_root;
if ($viewer != "")
{
$pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$preview_str = "<a target='_blank' href='$path_to_root/manufacturing/view/$viewer?trans_no=$trans_no' onclick=\"javascript:openWindow(this.href,this.target); return false;\"$pars[1]>$pars[0]</a>";
}
else
//--------------------------------------------------------------------------------------
-function get_dimensions_trans_view_str($type, $trans_no, $label="")
+function get_dimensions_trans_view_str($type, $trans_no, $label="", $icon=false)
{
global $path_to_root;
if ($viewer != "")
{
$pars = access_string($label);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
$preview_str = "<a target='_blank' href='$path_to_root/dimensions/view/$viewer?trans_no=$trans_no' onclick=\"javascript:openWindow(this.href,this.target); return false;\"$pars[1]>$pars[0]</a>";
}
else
//--------------------------------------------------------------------------------------
-function get_trans_view_str($type, $trans_no, $label="")
+function get_trans_view_str($type, $trans_no, $label="", $icon=false)
{
- $view_str = get_customer_trans_view_str($type, $trans_no, $label);
+ $view_str = get_customer_trans_view_str($type, $trans_no, $label, $icon);
if ($view_str != null)
return $view_str;
- $view_str = get_supplier_trans_view_str($type, $trans_no, $label);
+ $view_str = get_supplier_trans_view_str($type, $trans_no, $label, $icon);
if ($view_str != null)
return $view_str;
- $view_str = get_banking_trans_view_str($type, $trans_no, $label);
+ $view_str = get_banking_trans_view_str($type, $trans_no, $label, $icon);
if ($view_str != null)
return $view_str;
- $view_str = get_inventory_trans_view_str($type, $trans_no, $label);
+ $view_str = get_inventory_trans_view_str($type, $trans_no, $label, $icon);
if ($view_str != null)
return $view_str;
- $view_str = get_manufacturing_trans_view_str($type, $trans_no, $label);
+ $view_str = get_manufacturing_trans_view_str($type, $trans_no, $label, $icon);
if ($view_str != null)
return $view_str;
- $view_str = get_dimensions_trans_view_str($type, $trans_no, $label);
+ $view_str = get_dimensions_trans_view_str($type, $trans_no, $label, $icon);
if ($view_str != null)
return $view_str;
<?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>.
+***********************************************************************/
// Link to printing single document with bulk report template file.
// Ex. label_cell(print_document_link($myrow['order_no'], _("Print")), $type);
// or display_note(print_document_link($order_no, _("Print this order")));
// You only need full parameter list for invoices/credit notes
-function print_document_link($doc_no, $link_text, $link=true, $type_no)
+function print_document_link($doc_no, $link_text, $link=true, $type_no, $icon=false)
{
global $path_to_root;
include_once($path_to_root . "/includes/types.inc");
// default: $ar = array();
}
- return print_link($link_text, $rep, $ar);
+ return print_link($link_text, $rep, $ar, "", $icon);
}
//
// Universal link to any kind of report.
//
-function print_link($link_text, $rep, $pars = array(), $dir = '')
+function print_link($link_text, $rep, $pars = array(), $dir = '', $icon=false)
{
global $path_to_root, $pdf_debug;
$url .= implode ('&', $pars);
$class = $pdf_debug ? '' : "class='printlink'";
$pars = access_string($link_text);
+ if (user_graphic_links() && $icon)
+ $pars[0] = "<img src='$path_to_root/themes/".user_theme()."/images/$icon' width='14' height='14' border='0' title='$pars[0]' />\n";
return "<a $class target='_blank' href='$url'$pars[1]>$pars[0]</a>";
}