Exemple #1
0
$focus->popup_type = $popuptype;
$url_string .= '&popuptype=' . $popuptype;
if (isset($_REQUEST['select']) && $_REQUEST['select'] == 'enable') {
    $url_string .= '&select=enable';
}
if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != '') {
    $url_string .= '&return_module=' . $_REQUEST['return_module'];
}
$smarty->assign("URLSTRING", $url_string);
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
$listview_header_search = getSearchListHeaderValues($focus, $currentModule, $url_string, $sorder, $order_by);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$smarty->assign("ALPHABETICAL", $alphabetical);
$listview_header = getSearchListViewHeader($focus, $currentModule, $url_string, $sorder, $order_by);
$smarty->assign("LISTHEADER", $listview_header);
$listview_entries = getSearchListViewEntries($focus, $currentModule, $list_result, $navigation_array);
$smarty->assign("LISTENTITY", $listview_entries);
$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string, $currentModule, "Popup", $viewid);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("RECORD_COUNTS", $record_string);
$smarty->assign("POPUPTYPE", $popuptype);
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("PopupContents.tpl");
} else {
    $smarty->display("Popup.tpl");
}
?>

    $url_string .= '&select=enable';
}
if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != '') {
    $url_string .= '&return_module=' . vtlib_purify($_REQUEST['return_module']);
}
if ($popuptype == 'set_return_emails') {
    $tabid = getTabid($currentModule);
    $mail_arr = getMailFields($tabid);
    if (!empty($mail_arr)) {
        $tablename = str_replace("vtiger_", "", $mail_arr['tablename']);
        $fieldname = $mail_arr['fieldname'];
        $fieldlabel = $mail_arr['fieldlabel'];
        $focus->search_fields[$fieldlabel] = array($tablename => $fieldname);
        $focus->search_fields_name[$fieldlabel] = $fieldname;
    }
}
$listview_header = getSearchListViewHeader($focus, "{$currentModule}", $url_string, $sorder, $order_by);
$smarty->assign("LISTHEADER", $listview_header);
$smarty->assign("HEADERCOUNT", count($listview_header) + 1);
$listview_entries = getSearchListViewEntries($focus, "{$currentModule}", $list_result, $navigation_array, $form);
$smarty->assign("LISTENTITY", $listview_entries);
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, "Popup");
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("RECORD_COUNTS", $record_string);
$smarty->assign("POPUPTYPE", $popuptype);
$smarty->assign("PARENT_MODULE", vtlib_purify($_REQUEST['parent_module']));
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("PopupContents.tpl");
} else {
    $smarty->display("Popup.tpl");
}