<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Problem with editing customer contacts]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5669&amp;type=atom" />
	<updated>2017-02-13T07:53:49Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5669</id>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27510#p27510" />
			<content type="html"><![CDATA[<p>@AjayPrajapti,&nbsp; can you tell us which version of&nbsp; FA and your php version. also enable debugging mode and tells what is the error you see on the screen.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2017-02-13T07:53:49Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27510#p27510</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27503#p27503" />
			<content type="html"><![CDATA[<p>Dear Joe, I downloaded ui_controls.inc from post 3 and replace in /includes/ui/ui_controls.inc but still unable to see previous customer list into scroll botton.. please reply me with solution or procedure to fix it.</p>]]></content>
			<author>
				<name><![CDATA[AjayPrajapati]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=40946</uri>
			</author>
			<updated>2017-02-10T15:18:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27503#p27503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23998#p23998" />
			<content type="html"><![CDATA[<p>Files in the Git repo can be linked, but others not there will need to be put into the Github&#039;s Wiki or attached to the GitHub Issues - most will not take the trouble to do it.</p><p>Thanks for looking into it anyway. It is probably set so to avoid bandwidth leeching.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-08-06T02:52:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23998#p23998</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23987#p23987" />
			<content type="html"><![CDATA[<p>There are no setup options to make that in the maintenance setup.<br />However we can hack the code manually if this should be done.</p><p>Another option in these situations is to create a link to the file in the Git repository, where the file can be downloaded.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-08-03T17:31:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23987#p23987</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23985#p23985" />
			<content type="html"><![CDATA[<p>@joe: It might be useful to enable downloads without registration so that we do not have a bloated set of users with 0 posts. Can then delete users with 0 posts as well.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-08-03T14:23:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23985#p23985</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23981#p23981" />
			<content type="html"><![CDATA[<p><strong>Here it the patch so you do not have to register to download the file</strong></p><br /><div class="codebox"><pre><code>&lt;?php
/**********************************************************************
    Copyright (C) FrontAccounting, LLC.
    Released under the terms of the GNU General Public License, GPL, 
    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 &lt;http://www.gnu.org/licenses/gpl-3.0.html&gt;.
***********************************************************************/
/*
    Retrieve value of POST variable(s).
    For $name passed as array $dflt is not used, 
    default values can be passed as values with non-numeric keys instead.
    If some field have user formatted numeric value, pass float default value to
    convert automatically to POSIX.
*/
function get_post($name, $dflt=&#039;&#039;)
{
    if (is_array($name)) {
        $ret = array();
        foreach($name as $key =&gt; $dflt)
            if (!is_numeric($key)) {
                $ret[$key] = is_float($dflt) ? input_num($key, $dflt) : get_post($key, $dflt);
            } else {
                $ret[$dflt] = get_post($dflt, null);
            }
        return $ret;
    } else
        return is_float($dflt) ? input_num($name, $dflt) : 
                ((!isset($_POST[$name]) || $_POST[$name] === &#039;&#039;) ? $dflt : $_POST[$name]);
}
//---------------------------------------------------------------------------------

function start_form($multi=false, $dummy=false, $action=&quot;&quot;, $name=&quot;&quot;)
{
    // $dummy - leaved for compatibility with 2.0 API

    if ($name != &quot;&quot;)
        $name = &quot;name=&#039;$name&#039;&quot;;
    if ($action == &quot;&quot;)
        $action = $_SERVER[&#039;PHP_SELF&#039;];

    if ($multi)
        echo &quot;&lt;form enctype=&#039;multipart/form-data&#039; method=&#039;post&#039; action=&#039;$action&#039; $name&gt;\n&quot;;
    else
        echo &quot;&lt;form method=&#039;post&#039; action=&#039;$action&#039; $name&gt;\n&quot;;

}

/*
    Flush hidden fields buffer.
*/
function output_hidden()
{
    global $hidden_fields;

    if (is_array($hidden_fields))
        echo implode(&#039;&#039;, $hidden_fields);
    $hidden_fields = array();
}
//---------------------------------------------------------------------------------

function end_form($breaks=0)
{
    global $Ajax, $hidden_fields;

    $_SESSION[&#039;csrf_token&#039;] = hash(&#039;sha256&#039;, uniqid(mt_rand(), true));
    if ($breaks)
        br($breaks);
    hidden(&#039;_focus&#039;);
    hidden(&#039;_modified&#039;, get_post(&#039;_modified&#039;, 0));
    hidden(&#039;_token&#039;, $_SESSION[&#039;csrf_token&#039;]);
    
    output_hidden();
    echo &quot;&lt;/form&gt;\n&quot;;
    $Ajax-&gt;activate(&#039;_token&#039;);
}

function check_csrf_token()
{
    if ($_SESSION[&#039;csrf_token&#039;] != @$_POST[&#039;_token&#039;])
    {
        display_error(_(&quot;Request from outside of this page is forbidden.&quot;));
        error_log(_(&quot;CSRF attack detected from: &quot;).@$_SERVER[&#039;HTTP_HOST&#039;].&#039; (&#039;.@$_SERVER[&#039;HTTP_REFERER&#039;].&#039;)&#039;);
        return false;
    }
    return true;
}

function start_table($class=false, $extra=&quot;&quot;, $padding=&#039;2&#039;, $spacing=&#039;0&#039;)
{
    echo &quot;&lt;center&gt;&lt;table&quot;;
    if ($class == TABLESTYLE_NOBORDER)
        echo &quot; class=&#039;tablestyle_noborder&#039;&quot;;
    elseif ($class == TABLESTYLE2)
        echo &quot; class=&#039;tablestyle2&#039;&quot;;
    elseif ($class == TABLESTYLE)
        echo &quot; class=&#039;tablestyle&#039;&quot;;
    if ($extra != &quot;&quot;)
        echo &quot; $extra&quot;;
    echo &quot; cellpadding=&#039;$padding&#039; cellspacing=&#039;$spacing&#039;&gt;\n&quot;;
}

function end_table($breaks=0)
{
    echo &quot;&lt;/table&gt;&lt;/center&gt;\n&quot;;
    output_hidden();
    if ($breaks)
        br($breaks);
}

function start_outer_table($class=false, $extra=&quot;&quot;, $padding=&#039;2&#039;, $spacing=&#039;0&#039;, $br=false)
{
    if ($br)
        br();
    start_table($class, $extra, $padding, $spacing);
    echo &quot;&lt;tr valign=top&gt;&lt;td&gt;\n&quot;; // outer table
}

function table_section($number=1, $width=false)
{
    if ($number &gt; 1)
    {
        echo &quot;&lt;/table&gt;\n&quot;;
        output_hidden();
        $width = ($width ? &quot;width=&#039;$width&#039;&quot; : &quot;&quot;);
        //echo &quot;&lt;/td&gt;&lt;td class=&#039;tableseparator&#039; $width&gt;\n&quot;; // outer table
        echo &quot;&lt;/td&gt;&lt;td style=&#039;border-left:1px solid #cccccc;&#039; $width&gt;\n&quot;; // outer table
    }
    echo &quot;&lt;table class=&#039;tablestyle_inner&#039;&gt;\n&quot;;
}    

function end_outer_table($breaks=0, $close_table=true)
{
    if ($close_table)
    {
        echo &quot;&lt;/table&gt;\n&quot;;
        output_hidden();
    }
    echo &quot;&lt;/td&gt;&lt;/tr&gt;\n&quot;;
    end_table($breaks);
}
//
//  outer table spacer
//
function vertical_space($params=&#039;&#039;)
{
    echo &quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=center $params&gt;&quot;;
}

function meta_forward($forward_to, $params=&quot;&quot;)
{
    global $Ajax;
    echo &quot;&lt;meta http-equiv=&#039;Refresh&#039; content=&#039;0; url=$forward_to?$params&#039;&gt;\n&quot;;
    echo &quot;&lt;center&gt;&lt;br&gt;&quot; . _(&quot;You should automatically be forwarded.&quot;);
    echo &quot; &quot; . _(&quot;If this does not happen&quot;) . &quot; &quot; . &quot;&lt;a href=&#039;$forward_to?$params&#039;&gt;&quot; . _(&quot;click here&quot;) . &quot;&lt;/a&gt; &quot; . _(&quot;to continue&quot;) . &quot;.&lt;br&gt;&lt;br&gt;&lt;/center&gt;\n&quot;;
    if ($params !=&#039;&#039;) $params = &#039;?&#039;.$params;
    $Ajax-&gt;redirect($forward_to.$params);
    exit;
}

//-----------------------------------------------------------------------------------
// Find and replace hotkey marker.
// if $clean == true marker is removed and clean label is returned 
// (for use in wiki help system), otherwise result is array of label 
// with underlined hotkey letter and access property string.
//
function access_string($label, $clean=false)
{
    $access = &#039;&#039;;
    $slices = array();

    if (preg_match(&#039;/(.*)&amp;([a-zA-Z0-9])(.*)/&#039;, $label, $slices))    
    {
        $label = $clean ? $slices[1].$slices[2].$slices[3] :
            $slices[1].&#039;&lt;u&gt;&#039;.$slices[2].&#039;&lt;/u&gt;&#039;.$slices[3];
        $access = &quot; accesskey=&#039;&quot;.strtoupper($slices[2]).&quot;&#039;&quot;;
    }
    
    $label = str_replace( &#039;&amp;&amp;&#039;, &#039;&amp;&#039;, $label);

    return $clean ? $label : array($label, $access);
}

function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0, $final=false)
{
    global $path_to_root;

    if ($center)
        echo &quot;&lt;center&gt;&quot;;
    $id = 0;    
    if ($no_menu &amp;&amp; $trans_no != 0)
    {
        include_once($path_to_root.&quot;/admin/db/attachments_db.inc&quot;);
        $id = has_attachment($type_no, $trans_no);
        $attach = get_attachment_string($type_no, $trans_no);
        echo $attach;    
    }
    $width = ($id != 0 ? &quot;30%&quot; : &quot;20%&quot;);    
    start_table(false, &quot;width=&#039;$width&#039;&quot;);
    start_row();
    if ($no_menu)
    {
        echo &quot;&lt;td align=center&gt;&lt;a href=&#039;javascript:window.print();&#039;&gt;&quot;._(&quot;Print&quot;).&quot;&lt;/a&gt;&lt;/td&gt;\n&quot;;
    }
    echo &quot;&lt;td align=center&gt;&lt;a href=&#039;javascript:goBack(&quot;.($final ? &#039;-2&#039; : &#039;&#039;).&quot;);&#039;&gt;&quot;.($no_menu ? _(&quot;Close&quot;) : _(&quot;Back&quot;)).&quot;&lt;/a&gt;&lt;/td&gt;\n&quot;;
    end_row();
    end_table();
    if ($center)
        echo &quot;&lt;/center&gt;&quot;;
    echo &quot;&lt;br&gt;&quot;;
}

function hyperlink_no_params($target, $label, $center=true)
{
    $id = default_focus();
    $pars = access_string($label);
    if ($target == &#039;&#039;)
        $target = $_SERVER[&#039;PHP_SELF&#039;];
    if ($center)
        echo &quot;&lt;br&gt;&lt;center&gt;&quot;;
    echo &quot;&lt;a href=&#039;$target&#039; id=&#039;$id&#039; $pars[1]&gt;$pars[0]&lt;/a&gt;\n&quot;;
    if ($center)
        echo &quot;&lt;/center&gt;&quot;;
}

function hyperlink_no_params_td($target, $label)
{
    echo &quot;&lt;td&gt;&quot;;
    hyperlink_no_params($target, $label);
    echo &quot;&lt;/td&gt;\n&quot;;
}

function viewer_link($label, $url=&#039;&#039;, $class=&#039;&#039;, $id=&#039;&#039;,  $icon=null)
{
    global $path_to_root;
    
    if ($class != &#039;&#039;)
        $class = &quot; class=&#039;$class&#039;&quot;;

    if ($id != &#039;&#039;)
        $class = &quot; id=&#039;$id&#039;&quot;;

    if ($url != &quot;&quot;)
    {
        $pars = access_string($label);
        if (user_graphic_links() &amp;&amp; $icon)
            $pars[0] = set_icon($icon, $pars[0]);
        $preview_str = &quot;&lt;a target=&#039;_blank&#039; $class $id href=&#039;$path_to_root/$url&#039; onclick=\&quot;javascript:openWindow(this.href,this.target); return false;\&quot;$pars[1]&gt;$pars[0]&lt;/a&gt;&quot;;
    }
    else
        $preview_str = $label;
 return $preview_str;
}

function menu_link($url, $label, $id=null)
{

    $id = default_focus($id);
    $pars = access_string($label);
    return &quot;&lt;a href=&#039;$url&#039; class=&#039;menu_option&#039; id=&#039;$id&#039; $pars[1]&gt;$pars[0]&lt;/a&gt;&quot;;
}

function submenu_option($title, $url, $id=null)
{
    global $path_to_root;
    display_note(menu_link($path_to_root . $url, $title, $id), 0, 1);
}

function submenu_view($title, $type, $number, $id=null)
{
    display_note(get_trans_view_str($type, $number, $title, false, &#039;viewlink&#039;, $id), 0, 1);
}

function submenu_print($title, $type, $number, $id=null, $email=0, $extra=0)
{
    display_note(print_document_link($number, $title, true, $type, false, &#039;printlink&#039;, $id, $email, $extra), 0, 1);
}
//-----------------------------------------------------------------------------------

function hyperlink_params($target, $label, $params, $center=true)
{
    $id = default_focus();
    
    $pars = access_string($label);
    if ($target == &#039;&#039;)
        $target = $_SERVER[&#039;PHP_SELF&#039;];
    if ($center)
        echo &quot;&lt;br&gt;&lt;center&gt;&quot;;
    echo &quot;&lt;a id=&#039;$id&#039; href=&#039;$target?$params&#039;$pars[1]&gt;$pars[0]&lt;/a&gt;\n&quot;;
    if ($center)
        echo &quot;&lt;/center&gt;&quot;;
}

function hyperlink_params_td($target, $label, $params)
{
    echo &quot;&lt;td&gt;&quot;;
    hyperlink_params($target, $label, $params, false);
    echo &quot;&lt;/td&gt;\n&quot;;
}

//-----------------------------------------------------------------------------------

function hyperlink_params_separate($target, $label, $params, $center=false)
{
    $id = default_focus();

    $pars = access_string($label);
    if ($center)
        echo &quot;&lt;br&gt;&lt;center&gt;&quot;;
    echo &quot;&lt;a target=&#039;_blank&#039; id=&#039;$id&#039; href=&#039;$target?$params&#039; $pars[1]&gt;$pars[0]&lt;/a&gt;\n&quot;;
    if ($center)
        echo &quot;&lt;/center&gt;&quot;;
}

function hyperlink_params_separate_td($target, $label, $params)
{
    echo &quot;&lt;td&gt;&quot;;
    hyperlink_params_separate($target, $label, $params);
    echo &quot;&lt;/td&gt;\n&quot;;
}

//--------------------------------------------------------------------------------------------------

function alt_table_row_color(&amp;$k, $extra_class=null)
{
    $classes = $extra_class ? array($extra_class) : array();
    if ($k == 1)
    {
        array_push($classes, &#039;oddrow&#039;);
        $k = 0;
    }
    else
    {
        array_push($classes, &#039;evenrow&#039;);
        $k++;
    }
    echo &quot;&lt;tr class=&#039;&quot;.implode(&#039; &#039;, $classes).&quot;&#039;&gt;\n&quot;;
}

function table_section_title($msg, $colspan=2)
{
    echo &quot;&lt;tr&gt;&lt;td colspan=$colspan class=&#039;tableheader&#039;&gt;$msg&lt;/td&gt;&lt;/tr&gt;\n&quot;;
}

function table_header($labels, $params=&#039;&#039;)
{
    start_row();
    foreach ($labels as $label)
        labelheader_cell($label, $params);
    end_row();
}
//-----------------------------------------------------------------------------------

function start_row($param=&quot;&quot;)
{
    if ($param != &quot;&quot;)
        echo &quot;&lt;tr $param&gt;\n&quot;;
    else
        echo &quot;&lt;tr&gt;\n&quot;;
}

function end_row()
{
    echo &quot;&lt;/tr&gt;\n&quot;;
}

function br($num=1)
{
    for ($i = 0; $i &lt; $num; $i++)
        echo &quot;&lt;br&gt;&quot;;
}

$ajax_divs = array();

function div_start($id=&#039;&#039;, $trigger=null, $non_ajax=false)
{
    global $ajax_divs;

    if ($non_ajax) { // div for non-ajax elements
           array_push($ajax_divs, array($id, null));
           echo &quot;&lt;div style=&#039;display:none&#039; class=&#039;js_only&#039; &quot;.($id !=&#039;&#039; ? &quot;id=&#039;$id&#039;&quot; : &#039;&#039;).&quot;&gt;&quot;;
    } else { // ajax ready div
           array_push($ajax_divs, array($id, $trigger===null ? $id : $trigger));
           echo &quot;&lt;div &quot;. ($id !=&#039;&#039; ? &quot;id=&#039;$id&#039;&quot; : &#039;&#039;).&quot;&gt;&quot;;
           ob_start();
    }
}

function div_end()
{
    global $ajax_divs, $Ajax;

    output_hidden();
    if (count($ajax_divs))
    {
        $div = array_pop($ajax_divs);
        if ($div[1] !== null)
            $Ajax-&gt;addUpdate($div[1], $div[0], ob_get_flush());
    }
    echo &quot;&lt;/div&gt;&quot;;
}

//-----------------------------------------------------------------------------
//    Tabbed area:
//     $name - prefix for widget internal elements:
//        Nth tab submit name:  {$name}_N
//        div id:    _{$name}_div
//        sel (hidden) name: _{$name}_sel
// $tabs - array of tabs; string: tab title or array(tab_title, enabled_status)

function tabbed_content_start($name, $tabs, $dft=&#039;&#039;) {
    global $Ajax;

    $selname = &#039;_&#039;.$name.&#039;_sel&#039;;
    $div = &#039;_&#039;.$name.&#039;_div&#039;;

    $sel = find_submit($name.&#039;_&#039;, false);
    if($sel==null)
        $sel = get_post($selname, (string)($dft===&#039;&#039; ? key($tabs) : $dft));

    if ($sel!==@$_POST[$selname])
        $Ajax-&gt;activate($name);

    $_POST[$selname] = $sel;

    div_start($name);
    $str = &quot;&lt;ul class=&#039;ajaxtabs&#039; rel=&#039;$div&#039;&gt;\n&quot;;
    foreach($tabs as $tab_no =&gt; $tab) {
        
        $acc = access_string(is_array($tab) ? $tab[0] : $tab);
        $disabled = (is_array($tab) &amp;&amp; !$tab[1])  ? &#039;disabled &#039; : &#039;&#039;;
        $str .= ( &quot;&lt;li&gt;&quot;
            .&quot;&lt;button type=&#039;submit&#039; name=&#039;{$name}_&quot;.$tab_no
            .&quot;&#039; class=&#039;&quot;.((string)$tab_no===$sel ? &#039;current&#039;:&#039;ajaxbutton&#039;).&quot;&#039; $acc[1] $disabled&gt;&quot;
            .&quot;&lt;span&gt;$acc[0]&lt;/span&gt;&quot;
            .&quot;&lt;/button&gt;\n&quot;
            .&quot;&lt;/li&gt;\n&quot; );
    }

    $str .= &quot;&lt;/ul&gt;\n&quot;;
    $str .= &quot;&lt;div class=&#039;spaceBox&#039;&gt;&lt;/div&gt;\n&quot;;
    $str .= &quot;&lt;input type=&#039;hidden&#039; name=&#039;$selname&#039; value=&#039;$sel&#039;&gt;\n&quot;;
    $str .= &quot;&lt;div class=&#039;contentBox&#039; id=&#039;$div&#039;&gt;\n&quot;;
    echo $str;
}

function tabbed_content_end() {
    output_hidden();
    echo &quot;&lt;/div&gt;&quot;; // content box (don&#039;t change to div_end() unless div_start() is used above)
    div_end(); // tabs widget
}

function tab_changed($name)
{
    $to = find_submit(&quot;{$name}_&quot;, false);
    if (!$to) return null;

    return array(&#039;from&#039; =&gt; $from = get_post(&quot;_{$name}_sel&quot;),
        &#039;to&#039; =&gt; $to);
}

/* Table editor interfaces. Key is editor type
    0 =&gt; url of editor page
    1 =&gt; hotkey code
    2 =&gt; context help
*/
$popup_editors = array(
    &#039;customer&#039; =&gt; array(&#039;/sales/manage/customers.php?debtor_no=&#039;, 
        113,    _(&quot;Customers&quot;), 900, 500),
    &#039;branch&#039; =&gt; array(&#039;/sales/manage/customer_branches.php?SelectedBranch=&#039;, 
        114, _(&quot;Branches&quot;), 900, 700),
    &#039;supplier&#039; =&gt; array(&#039;/purchasing/manage/suppliers.php?supplier_id=&#039;, 
        113, _(&quot;Suppliers&quot;), 900, 700),
    &#039;item&#039; =&gt; array(&#039;/inventory/manage/items.php?stock_id=&#039;, 
        115, _(&quot;Items&quot;), 800, 600)
);
/*
    Bind editors for various selectors.
    $type - type of editor
    $input - name of related input field
    $caller - optional function key code (available values F1-F12: 112-123,
        true: default)
*/
function set_editor($type, $input, $caller=true)
{
    global $path_to_root, $Editors, $popup_editors, $Pagehelp;

    $key = $caller===true ? $popup_editors[$type][1] : $caller;

    $Editors[$key] = array( $path_to_root . $popup_editors[$type][0], $input, 
        $popup_editors[$type][3], $popup_editors[$type][4]);
    
    $help = &#039;F&#039; . ($key - 111) . &#039; - &#039;;
    $help .= $popup_editors[$type][2];
    $Pagehelp[] = $help;
}
//------------------------------------------------------------------------------
// Procedures below are now obsolete. Preserved for eventual future use.

/*
    External page call with saving current context.
    $call - url of external page
    $ctx - optional. name of SESSION context object or array of names of POST 
        variables saved on call
*/
function context_call($call, $ctx=&#039;&#039;)
{
    if (is_array($ctx)) 
    {
        foreach($ctx as $postname)
        {
             $context[$postname] = get_post($postname);
        }
    } else 
        $context = isset($_SESSION[$ctx]) ? $_SESSION[$ctx] : null;

    array_unshift($_SESSION[&#039;Context&#039;], array(&#039;name&#039; =&gt; $ctx, 
        &#039;ctx&#039; =&gt; $context,
        &#039;caller&#039; =&gt; $_SERVER[&#039;PHP_SELF&#039;],
        &#039;ret&#039; =&gt; array()));
    meta_forward($call);
}
/*
    Restores context after external page call and
    returns array of data passed by external page.
*/
function context_restore()
{
    if ( count($_SESSION[&#039;Context&#039;])) {
        if ($_SERVER[&#039;PHP_SELF&#039;] == $_SESSION[&#039;Context&#039;][0][&#039;caller&#039;]) {
            $ctx = array_shift($_SESSION[&#039;Context&#039;]);
            if ($ctx) {
                if (is_array($ctx[&#039;ctx&#039;])) {
                    foreach($ctx[&#039;ctx&#039;] as $name =&gt; $val) 
                    {
                        $_POST[$name] = $val;
                    }
                } else
                    if ($ctx[&#039;name&#039;]!=&#039;&#039;)
                        $_SESSION[$ctx[&#039;name&#039;]] = $ctx[&#039;ctx&#039;];
                return $ctx[&#039;ret&#039;];
            }
        }
    }
    return false;
}

/*
    Return to caller page if the page was called from external context.
*/
function context_return($ret)
{
    if ( count($_SESSION[&#039;Context&#039;])) {
        $ctx = &amp;$_SESSION[&#039;Context&#039;][0];
        $ctx[&#039;ret&#039;] = $ret;
        meta_forward( $ctx[&#039;caller&#039;] );
    }
}
/*
    Clearing context stack after page cancel.
*/
function context_reset()
{
    $_SESSION[&#039;Context&#039;] = array();
}
/*
    Context stack initialization
*/
if (!isset($_SESSION[&#039;Context&#039;])) {
        context_reset();
}
/*
    Redirector for selector F4 calls.
    $sel_editors is array of selname=&gt;editor_page
*/
function editor_redirect($sel_editors, $save_fun=&#039;&#039;) {
    foreach ($sel_editors as $selname=&gt;$editor)
        if (isset($_POST[&#039;_&#039;.$selname.&#039;_editor&#039;])) {
            if (function_exists($save_fun))
                $save_fun();
            unset($_POST[&#039;_&#039;.$selname.&#039;_editor&#039;]);
            context_call($editor, array_keys($_POST));
        }
}
/*
    Return procedure for selector F4 calls
*/
function editor_return($vars, $restore_fun=&#039;&#039;) {
    if (function_exists($restore_fun))
        $restore_fun();

    if ($ret = context_restore()) {
        foreach ($vars as $postname=&gt;$retname)
            if (isset($ret[$retname])) {
                $_POST[$postname] = $ret[$retname];
                set_focus($postname);
            }
    }
}

function confirm_dialog($submit, $msg) {
    if (find_post($submit)) {
        display_warning($msg);
        br();
        submit_center_first(&#039;DialogConfirm&#039;, _(&quot;Proceed&quot;), &#039;&#039;, true);
        submit_center_last(&#039;DialogCancel&#039;, _(&quot;Cancel&quot;), &#039;&#039;, &#039;cancel&#039;);
        return 0;
    } else
        return get_post(&#039;DialogConfirm&#039;, 0);
}

/*
    Block menu/shortcut links during transaction procesing.
*/
function page_processing($msg = false)
{
    global $Ajax;

    if ($msg === true)
        $msg = _(&#039;Entered data has not been saved yet.\nDo you want to abandon changes?&#039;);

    $js = &quot;_validate._processing=&quot; . (
        $msg ? &#039;\&#039;&#039;.strtr($msg, array(&quot;\n&quot;=&gt;&#039;\\n&#039;)) . &#039;\&#039;;&#039; : &#039;null;&#039;);
    if (in_ajax()) {
        $Ajax-&gt;addScript(true, $js);
    } else
        add_js_source($js);
}

function page_modified($status = true)
{
    global $Ajax;

    $js = &quot;_validate._modified=&quot; . ($status ? 1:0).&#039;;&#039;;
    if (in_ajax()) {
        $Ajax-&gt;addScript(true, $js);
    } else
        add_js_source($js);
}

?&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ui-fix-put-on-sourcefor]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20600</uri>
			</author>
			<updated>2015-08-02T01:51:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23981#p23981</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23781#p23781" />
			<content type="html"><![CDATA[<p>Eek! Thanks for this fix from me too! I was wondering if I was doing something wrong. </p><p>Marc</p>]]></content>
			<author>
				<name><![CDATA[Marc Paré]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20403</uri>
			</author>
			<updated>2015-06-30T20:23:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23781#p23781</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23770#p23770" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>joe wrote:</cite><blockquote><p>This bug was first detected after the release of 2.3.24. </p><p>Please use the link 5 posts earlier and replace your download, /includes/ui/ui_controls.inc, in your setup.</p><p>Joe</p></blockquote></div><p>I did that. <br />You got about 30-50 <em>download per day</em>?&nbsp; Why not release 2.3.24.1 and save hundreds of people hundreds of hours?</p>]]></content>
			<author>
				<name><![CDATA[RandomName]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20525</uri>
			</author>
			<updated>2015-06-30T06:11:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23770#p23770</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23769#p23769" />
			<content type="html"><![CDATA[<p>This bug was first detected after the release of 2.3.24. </p><p>Please use the link 5 posts earlier and replace your download, /includes/ui/ui_controls.inc, in your setup.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-06-30T04:55:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23769#p23769</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23765#p23765" />
			<content type="html"><![CDATA[<p>I downloaded the latest version (few days back) and this bug is still there.</p><p>https:/sourceforge.net/projects/frontaccounting/files/latest/download <br />frontaccounting-2.3.24.tar.gz</p>]]></content>
			<author>
				<name><![CDATA[RandomName]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20525</uri>
			</author>
			<updated>2015-06-29T16:29:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23765#p23765</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23115#p23115" />
			<content type="html"><![CDATA[<p>The bug was first detected after the 2.3.24 release :-(</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-04-05T17:55:40Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23115#p23115</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23114#p23114" />
			<content type="html"><![CDATA[<p>Thanks joe for the quick fix but i wonder why its not included in the v2.3.24 released?</p>]]></content>
			<author>
				<name><![CDATA[kevs]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20294</uri>
			</author>
			<updated>2015-04-05T16:33:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23114#p23114</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23095#p23095" />
			<content type="html"><![CDATA[<p>Thanks for your quick response and clear instruction how to implement your patch!<br />Now it works as expected.<br />I look forward to an equally clear instruction later regarding &#039;Security Role Clone / Addition errors on the edit / save&#039;.<br />Best regards!</p>]]></content>
			<author>
				<name><![CDATA[pilotspelman]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20279</uri>
			</author>
			<updated>2015-04-04T09:34:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23095#p23095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23094#p23094" />
			<content type="html"><![CDATA[<p>This has now been fixed.</p><p>If you need the fix then please download ui_controls.inc and replace in</p><p>/includes/ui/ui_controls.inc</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-04-04T09:19:06Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23094#p23094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with editing customer contacts]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=23090#p23090" />
			<content type="html"><![CDATA[<p>You are right. We are looking into this.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-04-04T06:15:17Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=23090#p23090</id>
		</entry>
</feed>
