Preparing graphic links, changes
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 22 Nov 2008 01:33:44 +0000 (01:33 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 22 Nov 2008 01:33:44 +0000 (01:33 +0000)
CHANGELOG.txt
admin/create_coy.php
admin/inst_lang.php
admin/inst_module.php
admin/view_print_transaction.php
gl/manage/gl_quick_entries.php
includes/ui/ui_controls.inc
includes/ui/ui_input.inc
includes/ui/ui_view.inc
reporting/includes/reporting.inc

index 2cac1a7fab65201b1fe27a1bef4634de9bc69ce3..2f466e1e2faa768f15b26cfc15a69e64a656ce86 100644 (file)
@@ -24,10 +24,16 @@ $ -> Affected files
   (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 
index 8324fa7d9d5a638789bbc1391df7914288db4ef9..cdcb971ec698b6a5b1fb48630b185cf281a9d52d 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -236,9 +245,17 @@ function display_companies()
                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();
        }
 
index bd23d383f9012a323279c5b56a2643ebeea3c37e..4233418ff12c0b475ed6a674f4aea7eb8decd5e3 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -265,10 +274,17 @@ function display_languages()
                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();
        }
 
index 1e0017682268c34a541a84328421b8b90edc6f5d..4b50573431dbde46363743ce08980ab1c6ef4751 100644 (file)
@@ -1,5 +1,14 @@
 <?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");
@@ -279,8 +288,16 @@ function display_modules()
                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();
        }
 
index 69a52f4350eb5b98651c18b5526ed0ac75ae4ffa..8f4c319c244456923bcdfc6c582286998e414e3b 100644 (file)
@@ -135,7 +135,7 @@ function handle_search()
                        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();
 
index 10e38ec23e7626b45a7985a26169eefa5af10003..fae60668a55553564b21f80487abc4b8aa85b987 100644 (file)
@@ -168,8 +168,8 @@ while ($myrow = db_fetch($result))
        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();
 }
 
@@ -236,8 +236,8 @@ if ($selected_id != -1)
                        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();
index fd2fefb3474498153648790ef244950ac42e1ef9..4fbdb984b4b8ffaf3eb72d265f6e103cedccc15e 100644 (file)
@@ -185,43 +185,45 @@ function table_header($labels)
        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="")
index ede685debba9582637a73e97a0eec1e2b2c95ff8..1fe5186e05ce35f6837b0bc0fa9d1124851b83aa 100644 (file)
@@ -1,4 +1,14 @@
 <?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='')
 {
@@ -194,7 +204,7 @@ function submit_return($name, $value, $title=false, $async=false)
        }
 }
 //---------------------------------------------------------------------------------
-
+/*
 function button($name, $value, $onclick, $title=false)
 {
        default_focus($name);
@@ -209,7 +219,7 @@ function button_cell($name, $value, $onclick, $title=false)
        button($name, $value, $onclick, $title);
        echo "</td>\n";
 }
-
+*/
 //-----------------------------------------------------------------------------------
 
 function check_value($name)
index 645cff995074378264efc6e61fbb737815bb2a02..b5c98534603071b2ee663969f9129f1deb7765d4 100644 (file)
@@ -1,11 +1,20 @@
 <?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;
 
@@ -29,6 +38,8 @@ function get_supplier_trans_view_str($type, $trans_no, $label="")
        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
@@ -46,9 +57,15 @@ function get_gl_view_str($type, $trans_no, $label="", $force=false)
        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;
@@ -65,7 +82,7 @@ function get_gl_view_str_cell($type, $trans_no, $label="")
 
 //--------------------------------------------------------------------------------------
 
-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;
 
@@ -91,12 +108,13 @@ function get_customer_trans_view_str($type, $trans_no, $label="")
   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
@@ -108,7 +126,7 @@ function get_customer_trans_view_str($type, $trans_no, $label="")
 
 //--------------------------------------------------------------------------------------
 
-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;
 
@@ -131,6 +149,8 @@ function get_banking_trans_view_str($type, $trans_no, $label="")
        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
@@ -141,7 +161,7 @@ function get_banking_trans_view_str($type, $trans_no, $label="")
 
 //--------------------------------------------------------------------------------------
 
-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;
 
@@ -160,6 +180,8 @@ function get_inventory_trans_view_str($type, $trans_no, $label="")
        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
@@ -170,7 +192,7 @@ function get_inventory_trans_view_str($type, $trans_no, $label="")
 
 //--------------------------------------------------------------------------------------
 
-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;
 
@@ -191,6 +213,8 @@ function get_manufacturing_trans_view_str($type, $trans_no, $label="")
        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
@@ -201,7 +225,7 @@ function get_manufacturing_trans_view_str($type, $trans_no, $label="")
 
 //--------------------------------------------------------------------------------------
 
-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;
 
@@ -218,6 +242,8 @@ function get_dimensions_trans_view_str($type, $trans_no, $label="")
        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
@@ -228,29 +254,29 @@ function get_dimensions_trans_view_str($type, $trans_no, $label="")
 
 //--------------------------------------------------------------------------------------
 
-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;
 
index f5c1bd384ee9584bf8fe23d8270b2a0133a2c4e4..d134c800890649a85768c3db5358850da8f52723 100644 (file)
@@ -1,10 +1,20 @@
 <?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");
@@ -62,12 +72,12 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no)
 //             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;
 
@@ -80,6 +90,8 @@ function print_link($link_text, $rep, $pars = array(), $dir = '')
        $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>";
 }