//Retreive the List View Table Header
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
$listview_header = getListViewHeader($focus, "SalesOrder", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = getSearchListHeaderValues($focus, "SalesOrder", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = getListViewEntries($focus, "SalesOrder", $list_result, $navigation_array, '', '&return_module=SalesOrder&return_action=index', 'EditView', 'Delete', $oCustomView);
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("SELECT_SCRIPT", $view_script);
//Added to select Multiple records in multiple pages
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries), ";"));
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "SalesOrder", 'index', $viewid);
$alphabetical = AlphabeticalSearch($currentModule, 'index', 'subject', 'true', 'basic', "", "", "", "", $viewid);
$fieldnames = getAdvSearchfields($module);
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("CUSTOMVIEW_OPTION", $customviewcombo_html);
$smarty->assign("VIEWID", $viewid);
$smarty->assign("BUTTONS", $other_text);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$_SESSION[$currentModule . '_listquery'] = $list_query;
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("ListViewEntries.tpl");
Example #2
0
    if (!isset($oCustomView->list_fields_name['Close'])) {
        $oCustomView->list_fields_name['Close'] = 'eventstatus';
    }
}
$listview_header = getListViewHeader($focus, "Calendar", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = getSearchListHeaderValues($focus, "Calendar", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = getListViewEntries($focus, "Calendar", $list_result, $navigation_array, "", "", "EditView", "Delete", $oCustomView);
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("SELECT_SCRIPT", $view_script);
//Added to select Multiple records in multiple pages
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries), ";"));
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "Calendar", "ListView", $viewid);
$alphabetical = AlphabeticalSearch($currentModule, 'ListView', 'subject', 'true', 'basic', "", "", "", "", $viewid);
$fieldnames = getAdvSearchfields($module);
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("NAVIGATION", $navigationOutput);
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$_SESSION[$currentModule . '_listquery'] = $list_query;
// Gather the custom link information to display
include_once 'vtlib/Vtiger/Link.php';
$customlink_params = array('MODULE' => $currentModule, 'ACTION' => vtlib_purify($_REQUEST['action']), 'CATEGORY' => $category);
Example #3
0
    $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");
}
Example #4
0
    $noofrows = null;
}
$queryMode = isset($_REQUEST['query']) && $_REQUEST['query'] == 'true';
$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode);
$navigation_array = VT_getSimpleNavigationValues($start, $list_max_entries_per_page, $noofrows);
$limit_start_rec = ($start - 1) * $list_max_entries_per_page;
if ($adb->dbType == "pgsql") {
    $list_result = $adb->pquery($list_query . " OFFSET {$limit_start_rec} LIMIT {$list_max_entries_per_page}", array());
} else {
    $list_result = $adb->pquery($list_query . " LIMIT {$limit_start_rec}, {$list_max_entries_per_page}", array());
}
$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec);
$smarty->assign('recordListRange', $recordListRangeMsg);
$smarty->assign("CUSTOMVIEW_OPTION", $customview_html);
// Navigation
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, 'index', $viewid);
$smarty->assign("NAVIGATION", $navigationOutput);
$listview_header = getListViewHeader($focus, $currentModule, $url_string, $sorder, $order_by, '', $customView);
$listview_entries = getListViewEntries($focus, $currentModule, $list_result, $navigation_array, '', '', 'EditView', 'Delete', $customView);
$listview_header_search = getSearchListHeaderValues($focus, $currentModule, $url_string, $sorder, $order_by, '', $customView);
$smarty->assign('LISTHEADER', $listview_header);
$smarty->assign('LISTENTITY', $listview_entries);
$smarty->assign('SEARCHLISTHEADER', $listview_header_search);
// Module Search
$alphabetical = AlphabeticalSearch($currentModule, 'index', $focus->def_basicsearch_col, 'true', 'basic', '', '', '', '', $viewid);
$fieldnames = getAdvSearchfields($currentModule);
$criteria = getcriteria_options();
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule, "available_fields"));
    $url_string .= "&viewname=" . $viewid;
}
$listview_header = getListViewHeader($focus, "Contacts", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = getSearchListHeaderValues($focus, "Contacts", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = getListViewEntries($focus, "Contacts", $list_result, $navigation_array, "", "", "EditView", "Delete", $oCustomView);
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("SELECT_SCRIPT", $view_script);
$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule, "available_fields"));
$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule, "fileds_to_merge"));
//Added to select Multiple records in multiple pages
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries), ";"));
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "Contacts", "index", $viewid);
$alphabetical = AlphabeticalSearch($currentModule, 'index', 'lastname', 'true', 'basic', "", "", "", "", $viewid);
$fieldnames = getAdvSearchfields($currentModule);
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Contact');
$check_button = Button_Check($currentModule);
$smarty->assign("CHECK", $check_button);
$_SESSION[$currentModule . '_listquery'] = $list_query;
if (isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') {
    $smarty->display("ListViewEntries.tpl");
} else {
/**
 * Function creates HTML to display Todos ListView
 * @param array  $todo_list     - collection of strings(Todo Information)
 * @param array  $cal           - collection of objects and strings 
 * return string $list_view     - html tags in string format
 */
function constructTodoListView($todo_list, $cal, $subtab, $navigation_array = '')
{
    global $mod_strings, $cal_log, $adb, $theme;
    $cal_log->debug("Entering constructTodoListView() method...");
    global $current_user, $app_strings;
    $date_format = $current_user->date_format;
    $format = $cal['calendar']->hour_format;
    $date = new DateTimeField(null);
    $endDate = new DateTimeField(date("Y-m-d H:i:s", time() + 1 * 24 * 60 * 60));
    $hour_startat = $date->getDisplayTime();
    $hour_endat = $endDate->getDisplayTime();
    $time_arr = getaddEventPopupTime($hour_startat, $hour_endat, $format);
    //to get date in user selected date format
    $temp_date = $date->getDisplayDate();
    if ($cal['calendar']->day_start_hour != 23) {
        $endtemp_date = $temp_date;
    } else {
        $endtemp_date = $endDate->getDisplayDate();
    }
    $list_view = "";
    //labels of listview header
    if ($cal['view'] == 'day') {
        $colspan = 9;
        $header = array('0' => '#', '1' => $mod_strings['LBL_TIME'], '2' => $mod_strings['LBL_START_DATE'], '3' => $mod_strings['LBL_DUE_DATE'], '4' => $mod_strings['LBL_TODO']);
        $header_width = array('0' => '5%', '1' => '10%', '2' => '10%', '3' => '38%');
        if (getFieldVisibilityPermission('Calendar', $current_user->id, 'taskstatus') == '0') {
            array_push($header, $mod_strings['LBL_STATUS']);
            array_push($header_width, '10%');
        }
        if (isPermitted("Calendar", "EditView") == "yes" || isPermitted("Calendar", "Delete") == "yes") {
            array_push($header, $mod_strings['LBL_ACTION']);
            array_push($header_width, '10%');
        }
        array_push($header, $mod_strings['LBL_ASSINGEDTO']);
        array_push($header_width, '15%');
    } else {
        $colspan = 10;
        $header = array('0' => '#', '1' => $mod_strings['LBL_TIME'], '2' => $mod_strings['LBL_START_DATE'], '3' => $mod_strings['LBL_DUE_DATE'], '4' => $mod_strings['LBL_TODO']);
        $header_width = array('0' => '5%', '1' => '10%', '2' => '10%', '3' => '10%', '4' => '28%');
        if (getFieldVisibilityPermission('Calendar', $current_user->id, 'taskstatus') == '0') {
            array_push($header, $mod_strings['LBL_STATUS']);
            array_push($header_width, '10%');
        }
        if (isPermitted("Calendar", "EditView") == "yes" || isPermitted("Calendar", "Delete") == "yes") {
            array_push($header, $mod_strings['LBL_ACTION']);
        }
        array_push($header, $mod_strings['LBL_ASSINGEDTO']);
        array_push($header_width, '15%');
    }
    if ($current_user->column_fields['is_admin'] == 'on') {
        $Res = $adb->pquery("select * from vtiger_activitytype", array());
    } else {
        $roleid = $current_user->roleid;
        $subrole = getRoleSubordinates($roleid);
        if (count($subrole) > 0) {
            $roleids = $subrole;
            array_push($roleids, $roleid);
        } else {
            $roleids = $roleid;
        }
        if (count($roleids) > 1) {
            $Res = $adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid in (" . generateQuestionMarks($roleids) . ") and picklistid in (select picklistid from vtiger_picklist) order by sortid asc", array($roleids));
        } else {
            $Res = $adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid = ? and picklistid in (select picklistid from vtiger_picklist) order by sortid asc", array($roleid));
        }
    }
    $eventlist = '';
    for ($i = 0; $i < $adb->num_rows($Res); $i++) {
        $eventlist .= $adb->query_result($Res, $i, 'activitytype') . ";";
    }
    $list_view .= "<table align='center' border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t<tr><td colspan='3'>&nbsp;</td></tr>";
    //checking permission for Create/Edit Operation
    if (isPermitted("Calendar", "EditView") == "yes") {
        $list_view .= "<tr>\n\t\t\t\t<td class='calAddButton' onMouseOver='fnAddEvent(this,\"addEventDropDown\",\"" . $temp_date . "\",\"" . $endtemp_date . "\",\"" . $time_arr['starthour'] . "\",\"" . $time_arr['startmin'] . "\",\"" . $time_arr['startfmt'] . "\",\"" . $time_arr['endhour'] . "\",\"" . $time_arr['endmin'] . "\",\"" . $time_arr['endfmt'] . "\",\"\",\"" . $subtab . "\",\"" . $eventlist . "\");'style='border: 1px solid #666666;cursor:pointer;height:30px' align='center' width='10%'>\n                                        " . $mod_strings['LBL_ADD'] . "\n                                        <img src='" . vtiger_imageurl('menuDnArrow.gif', $theme) . "' style='padding-left: 5px;' border='0'>                                                                                                                         </td>";
    } else {
        $list_view .= "<tr><td>&nbsp;</td>";
    }
    $list_view .= "<td align='center' width='60%'><span  id='total_activities'>" . getTodoInfo($cal, 'listcnt') . "</span>&nbsp;</td>\n\t\t\t\t<td align='right' width='28%'>&nbsp;</td>\n\t\t\t</tr>\n\t\t</table>\n\n\t\t\t<br><table style='background-color: rgb(204, 204, 204);' class='small' align='center' border='0' cellpadding='5' cellspacing='1' width='98%'>\n                        ";
    $header_rows = count($header);
    $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "Calendar", "index");
    if ($navigationOutput != '') {
        $list_view .= "<tr width=100% bgcolor=white><td align=center colspan={$header_rows}>";
        $list_view .= "<table align=center width='98%'><tr>" . $navigationOutput . "</tr></table></td></tr>";
    }
    $list_view .= "<tr>";
    for ($i = 0; $i < $header_rows; $i++) {
        $list_view .= "<td class='lvtCol' width='" . $header_width[$i] . "' nowrap='nowrap'>" . $header[$i] . "</td>";
    }
    $list_view .= "</tr>";
    $rows = count($todo_list);
    if ($rows != 0) {
        for ($i = 0; $i < count($todo_list); $i++) {
            $list_view .= "<tr style='height: 25px;' bgcolor='white'>";
            foreach ($todo_list[$i] as $key => $entry) {
                $list_view .= "<td>" . $entry . "</td>";
            }
            $list_view .= "</tr>";
        }
    } else {
        $list_view .= "<tr><td style='background-color:#efefef;height:340px' align='center' colspan='" . $colspan . "'>";
        $list_view .= "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 45%; position: relative; z-index: 5000;'>\n\t\t\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t<tr>\n\t\t\t\t<td rowspan='2' width='25%'>\n\t\t\t\t\t<img src='" . vtiger_imageurl('empty.jpg', $theme) . "' height='60' width='61'></td>\n\t\t\t\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='75%'><span class='genHeaderSmall'>" . $app_strings['LBL_NO'] . " " . $app_strings['Todos'] . " " . $app_strings['LBL_FOUND'] . " !</span></td>\n\t\t\t</tr>\n\t\t\t<tr>";
        //checking permission for Create/Edit Operation
        if (isPermitted("Calendar", "EditView") == "yes") {
            $list_view .= "<td class='small' align='left' nowrap='nowrap'>" . $app_strings['LBL_YOU_CAN_CREATE'] . "&nbsp;" . $app_strings['LBL_A'] . "&nbsp;" . $app_strings['Todo'] . "&nbsp;" . $app_strings['LBL_NOW'] . ".&nbsp;" . $app_strings['LBL_CLICK_THE_LINK'] . "&nbsp;:<br>\n\t\t\t\t\t&nbsp;&nbsp;-<a href='javascript:void(0);' onClick='gshow(\"createTodo\",\"todo\",\"" . $temp_date . "\",\"" . $temp_date . "\",\"" . $time_arr['starthour'] . "\",\"" . $time_arr['startmin'] . "\",\"" . $time_arr['startfmt'] . "\",\"" . $time_arr['endhour'] . "\",\"" . $time_arr['endmin'] . "\",\"" . $time_arr['endfmt'] . "\",\"listview\",\"todo\");'>" . $app_strings['LBL_CREATE'] . " " . $app_strings['LBL_A'] . " " . $app_strings['Todo'] . "</a>\n\t\t\t\t\t</td>";
        } else {
            $list_view .= "<td class='small' align='left' nowrap='nowrap'>" . $app_strings['LBL_YOU_ARE_NOT_ALLOWED_TO_CREATE'] . "&nbsp;" . $app_strings['LBL_A'] . "&nbsp;" . $app_strings['Todo'] . "<br></td>";
        }
        $list_view .= "</tr>\n\t\t\t</table>\n\t\t\t</div>";
        $list_view .= "</td></tr>";
    }
    $list_view .= "</table><br>";
    $cal_log->debug("Exiting constructTodoListView() method...");
    return $list_view;
}
Example #7
0
        $limit_start_rec = ($start[$folder_id] - 1) * $max_entries_per_page;
        if ($adb->dbType == "pgsql") {
            $list_result = $adb->pquery($query . " OFFSET {$limit_start_rec} LIMIT {$max_entries_per_page}", array());
        } else {
            $list_result = $adb->pquery($query . " LIMIT {$limit_start_rec}, {$max_entries_per_page}", array());
        }
        //navigation end
        $folder_details = array();
        $folderid = $adb->query_result($result, $i, "folderid");
        $folder_details['folderid'] = $folderid;
        $folder_details['foldername'] = $adb->query_result($result, $i, "foldername");
        $foldername = $folder_details['foldername'];
        $folder_details['description'] = $adb->query_result($result, $i, "description");
        $folder_files = $controller->getListViewEntries($focus, $currentModule, $list_result, $navigation_array);
        $folder_details['entries'] = $folder_files;
        $folder_details['navigation'] = getTableHeaderSimpleNavigation($navigation_array, $url_string, "Documents", $folder_id, $viewid);
        $folder_details['recordListRange'] = getRecordRangeMessage($list_result, $limit_start_rec, $num_records);
        if ($displayFolder == true) {
            $folders[$foldername] = $folder_details;
        } else {
            $emptyfolders[$foldername] = $folder_details;
        }
        if ($folderid == 1) {
            $default_folder_details = $folder_details;
        }
    }
    if (count($folders) == 0) {
        $folders[$default_folder_details['foldername']] = $default_folder_details;
    }
} else {
    $smarty->assign("NO_FOLDERS", "yes");
Example #8
0
 } else {
     $start = 1;
 }
 $navigation_array = VT_getSimpleNavigationValues($start, $list_max_entries_per_page, $noofrows);
 $limitStartRecord = ($navigation_array['start'] - 1) * $list_max_entries_per_page;
 if ($adb->dbType == "pgsql") {
     $listquery = $listquery . " OFFSET {$limitStartRecord} LIMIT {$list_max_entries_per_page}";
 } else {
     $listquery = $listquery . " LIMIT {$limitStartRecord}, {$list_max_entries_per_page}";
 }
 $list_result = $adb->query($listquery);
 $moduleRecordCount[$module]['recordListRangeMessage'] = getRecordRangeMessage($list_result, $limitStartRecord, $noofrows);
 $info_message = '&recordcount=' . $_REQUEST['recordcount'] . '&noofrows=' . $_REQUEST['noofrows'] . '&message=' . $_REQUEST['message'] . '&skipped_record_count=' . $_REQUEST['skipped_record_count'];
 $url_string = '&modulename=' . $_REQUEST['modulename'] . '&nav_module=' . $module_name . $info_message;
 $viewid = '';
 $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $module, "UnifiedSearch", $viewid);
 $listview_header = getListViewHeader($focus, $module, "", "", "", "global", $oCustomView);
 $listview_entries = getListViewEntries($focus, $module, $list_result, $navigation_array, "", "", "", "", $oCustomView);
 //Do not display the Header if there are no entires in listview_entries
 if (count($listview_entries) > 0) {
     $display_header = 1;
     if (vtlib_isModuleActive('ListViewColors') && count($listview_entries) == 2) {
         $listview_entries_for1 = $listview_entries;
     } elseif (!vtlib_isModuleActive('ListViewColors') && count($listview_entries) == 1) {
         $listview_entries_for1 = $listview_entries;
     }
 } else {
     $display_header = 0;
 }
 $smarty->assign("NAVIGATION", $navigationOutput);
 $smarty->assign("LISTHEADER", $listview_header);
Example #9
0
    $noofrows = $adb->query_result($count_result, 0, "count");
} else {
    $noofrows = null;
}
$queryMode = isset($_REQUEST['query']) && $_REQUEST['query'] == 'true';
$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, '', $queryMode);
$navigation_array = VT_getSimpleNavigationValues($start, $list_max_entries_per_page, $noofrows);
$limit_start_rec = ($start - 1) * $list_max_entries_per_page;
if ($adb->dbType == "pgsql") {
    $list_result = $adb->pquery($list_query . " OFFSET {$limit_start_rec} LIMIT {$list_max_entries_per_page}", array());
} else {
    $list_result = $adb->pquery($list_query . " LIMIT {$limit_start_rec}, {$list_max_entries_per_page}", array());
}
$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec, $noofrows);
$smarty->assign('recordListRange', $recordListRangeMsg);
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "Users", "index", '');
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("CMOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("CURRENT_USERID", $current_user->id);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("CATEGORY", $category);
$smarty->assign("LIST_HEADER", getListViewHeader($focus, "Users", $url_string, $sorder, $order_by, "", ""));
$smarty->assign("LIST_ENTRIES", getListViewEntries($focus, "Users", $list_result, $navigation_array, "", "", "EditView", "Delete", ""));
$smarty->assign("PAGE_START_RECORD", $limit_start_rec);
$smarty->assign("RECORD_COUNTS", $record_string);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("USER_IMAGES", getUserImageNames());
if ($_REQUEST['ajax'] != '') {
    $smarty->display("UserListViewContents.tpl");
Example #10
0
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
$controller = new ListViewController($adb, $current_user, $queryGenerator);
$listview_header = $controller->getListViewHeader($focus, $currentModule, $url_string, $sorder, $order_by);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = $controller->getBasicSearchFieldInfoList();
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = $controller->getListViewEntries($focus, $currentModule, $list_result, $navigation_array);
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("SELECT_SCRIPT", $view_script);
//Added to select Multiple records in multiple pages
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries), ";"));
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "PurchaseOrder", "index", $viewid);
$alphabetical = AlphabeticalSearch($currentModule, 'index', 'subject', 'true', 'basic', "", "", "", "", $viewid);
$fieldnames = $controller->getAdvancedSearchOptionString();
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("NAVIGATION", $navigationOutput);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
ListViewSession::setSessionQuery($currentModule, $query, $viewid);
// Gather the custom link information to display
include_once 'vtlib/Vtiger/Link.php';
$customlink_params = array('MODULE' => $currentModule, 'ACTION' => vtlib_purify($_REQUEST['action']), 'CATEGORY' => $category);
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), array('LISTVIEWBASIC', 'LISTVIEW'), $customlink_params));
// END
Example #11
0
}
$controller = new ListViewController($adb, $current_user, $queryGenerator);
$listview_header = $controller->getListViewHeader($focus, $currentModule, $url_string, $sorder, $order_by);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = $controller->getBasicSearchFieldInfoList();
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = $controller->getListViewEntries($focus, $currentModule, $list_result, $navigation_array);
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("SELECT_SCRIPT", $view_script);
$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule, "available_fields"));
$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule, "fileds_to_merge"));
//Added to select Multiple records in multiple pages
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries), ";"));
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "HelpDesk", "index", $viewid);
$alphabetical = AlphabeticalSearch($currentModule, 'index', 'ticket_title', 'true', 'basic', "", "", "", "", $viewid);
$fieldnames = $controller->getAdvancedSearchOptionString();
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("NAVIGATION", $navigationOutput);
$check_button = Button_Check($currentModule);
$smarty->assign("CHECK", $check_button);
ListViewSession::setSessionQuery($currentModule, $list_query, $viewid);
// Gather the custom link information to display
include_once 'vtlib/Vtiger/Link.php';
$customlink_params = array('MODULE' => $currentModule, 'ACTION' => vtlib_purify($_REQUEST['action']), 'CATEGORY' => $category);
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), array('LISTVIEWBASIC', 'LISTVIEW'), $customlink_params));
// END
Example #12
0
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", getTranslatedString('SINGLE_' . $currentModule, $currentModule));
$smarty->assign("BUTTONS", $other_text);
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
if ($viewid != '') {
    $url_string .= "&viewname=" . $viewid;
}
if (isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '') {
    $url_string .= "&folderid=" . vtlib_purify($_REQUEST['folderid']);
}
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, $_REQUEST['folderid'], $viewid);
$smarty->assign("NAVIGATION", $navigationOutput);
$listview_header = getListViewHeader($focus, "Emails", $url_string, $sorder, $order_by, "", $oCustomView);
$smarty->assign("LISTHEADER", $listview_header);
$listview_entries = getListViewEntries($focus, "Emails", $list_result, $navigation_array, "", "", "EditView", "Delete", $oCustomView);
//--------------------------added to fix the ticket(4386)------------------------START
foreach ($listview_entries as $key => $value) {
    $sql = "select email_flag from vtiger_emaildetails where emailid=?";
    $result = $adb->pquery($sql, array($key));
    $email_flag = $adb->query_result($result, 0, "email_flag");
    $emailid[$key] = $email_flag;
}
$smarty->assign("EMAILFALG", $emailid);
//--------------------------added to fix the ticket(4386)------------------------END
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("SELECT_SCRIPT", $view_script);