• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getListQuery函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getListQuery函数的典型用法代码示例。如果您正苦于以下问题:PHP getListQuery函数的具体用法?PHP getListQuery怎么用?PHP getListQuery使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getListQuery函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getKeyMetricsWithCount

 protected function getKeyMetricsWithCount()
 {
     global $current_user, $adb;
     $current_user = Users_Record_Model::getCurrentUserModel();
     require_once 'modules/CustomView/ListViewTop.php';
     $metriclists = getMetricList();
     foreach ($metriclists as $key => $metriclist) {
         $metricresult = NULL;
         if ($metriclist['module'] == "Calendar") {
             $listquery = getListQuery($metriclist['module']);
             $oCustomView = new CustomView($metriclist['module']);
             $metricsql = $oCustomView->getModifiedCvListQuery($metriclist['id'], $listquery, $metriclist['module']);
             $metricresult = $adb->query(Vtiger_Functions::mkCountQuery($metricsql));
         } else {
             $queryGenerator = new QueryGenerator($metriclist['module'], $current_user);
             $queryGenerator->initForCustomViewById($metriclist['id']);
             $metricsql = $queryGenerator->getQuery();
             $metricresult = $adb->query(Vtiger_Functions::mkCountQuery($metricsql));
         }
         if ($metricresult) {
             $rowcount = $adb->fetch_array($metricresult);
             $metriclists[$key]['count'] = $rowcount['count'];
         }
     }
     return $metriclists;
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:26,代码来源:Notebook.php


示例2: loadHtmlList

function loadHtmlList(&$base, &$list)
{
    $base->hasObjectRights($hasRight, "load", TRUE);
    $query = getListQuery($base);
    $base->loadObjectsSQL($query, $list, TRUE);
    return ok;
}
开发者ID:alencarmo,项目名称:OCF,代码行数:7,代码来源:htmllist.php


示例3: getEntity

 public function getEntity()
 {
     $db = PearDatabase::getInstance();
     $module = 'Calendar';
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $query = getListQuery($module);
     $params = array();
     if ($this->get('start') && $this->get('end')) {
         $dbStartDateOject = DateTimeField::convertToDBTimeZone($this->get('start'));
         $dbStartDateTime = $dbStartDateOject->format('Y-m-d H:i:s');
         $dbEndDateObject = DateTimeField::convertToDBTimeZone($this->get('end'));
         $dbEndDateTime = $dbEndDateObject->format('Y-m-d H:i:s');
         $query .= " AND (concat(date_start, ' ', time_start)  >= ? AND concat(due_date, ' ', time_end) <= ?) ";
         $params[] = $dbStartDateTime;
         $params[] = $dbEndDateTime;
     }
     if ($this->get('types')) {
         $query .= " AND vtiger_activity.activitytype IN ('" . implode("','", $this->get('types')) . "')";
     }
     if ($this->get('user')) {
         if (is_array($this->get('user'))) {
             $query .= ' AND vtiger_crmentity.smownerid IN (' . implode(",", $this->get('user')) . ')';
         } else {
             $query .= ' AND vtiger_crmentity.smownerid IN (' . $this->get('user') . ')';
         }
     }
     $query .= ' ORDER BY date_start,time_start ASC';
     $queryResult = $db->pquery($query, $params);
     $result = array();
     for ($i = 0; $i < $db->num_rows($queryResult); $i++) {
         $record = $db->raw_query_result_rowdata($queryResult, $i);
         $item = array();
         $crmid = $record['activityid'];
         $activitytype = $record['activitytype'];
         $item['id'] = $crmid;
         $item['title'] = $record['subject'];
         $item['url'] = 'index.php?module=' . $module . '&view=Detail&record=' . $crmid;
         $dateTimeFieldInstance = new DateTimeField($record['date_start'] . ' ' . $record['time_start']);
         $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue($currentUser);
         $dateTimeComponents = explode(' ', $userDateTimeString);
         $dateComponent = $dateTimeComponents[0];
         $startTimeFormated = $dateTimeComponents[1];
         //Conveting the date format in to Y-m-d . since full calendar expects in the same format
         $startDateFormated = DateTimeField::__convertToDBFormat($dateComponent, $currentUser->get('date_format'));
         $dateTimeFieldInstance = new DateTimeField($record['due_date'] . ' ' . $record['time_end']);
         $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue($currentUser);
         $dateTimeComponents = explode(' ', $userDateTimeString);
         $dateComponent = $dateTimeComponents[0];
         $endTimeFormated = $dateTimeComponents[1];
         //Conveting the date format in to Y-m-d . since full calendar expects in the same format
         $endDateFormated = DateTimeField::__convertToDBFormat($dateComponent, $currentUser->get('date_format'));
         $item['start'] = $startDateFormated . ' ' . $startTimeFormated;
         $item['end'] = $endDateFormated . ' ' . $endTimeFormated;
         $item['allDay'] = $record['allday'] == 1 ? true : false;
         $item['className'] = ' userCol_' . $record['smownerid'] . ' calCol_' . $activitytype;
         $result[] = $item;
     }
     return $result;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:59,代码来源:Calendar.php


示例4: getKeyMetrics

/** to get the details of a KeyMetrics on Home page 
 * @returns  $customviewlist Array in the following format
 * $values = Array('Title'=>Array(0=>'image name',
 *				 1=>'Key Metrics',
 *			 	 2=>'home_metrics'
 *			 	),
 *		  'Header'=>Array(0=>'Metrics',
 *	  			  1=>'Count'
 *			  	),
 *		  'Entries'=>Array($cvid=>Array(
 *			  			0=>$customview name,
 *						1=>$no of records for the view
 *					       ),
 *				   $cvid=>Array(
 *                                               0=>$customview name,
 *                                               1=>$no of records for the view
 *                                              ),
 *					|
 *					|
 *				   $cvid=>Array(
 *                                               0=>$customview name,
 *                                               1=>$no of records for the view
 *                                              )	
 *				  )
 *
 */
function getKeyMetrics()
{
    require_once "data/Tracker.php";
    require_once 'modules/CustomView/CustomView.php';
    require_once 'include/logging.php';
    require_once 'include/ListView/ListView.php';
    global $app_strings;
    global $adb;
    global $log;
    global $current_language;
    $metricviewnames = "'Hot Leads'";
    $current_module_strings = return_module_language($current_language, "CustomView");
    $log = LoggerManager::getLogger('metrics');
    $metriclists = getMetricList();
    $log->info("Metrics :: Successfully got MetricList to be displayed");
    if (isset($metriclists)) {
        foreach ($metriclists as $key => $metriclist) {
            $listquery = getListQuery($metriclist['module']);
            if (empty($listquery)) {
                if (is_file("modules/" . $metriclist['module'] . "/" . $metriclist['module'] . ".php")) {
                    include_once "modules/" . $metriclist['module'] . "/" . $metriclist['module'] . ".php";
                    $metric_focus = new $metriclist['module']();
                    $listquery = $metric_focus->getListQuery('');
                }
            }
            $oCustomView = new CustomView($metriclist['module']);
            $metricsql = $oCustomView->getMetricsCvListQuery($metriclist['id'], $listquery, $metriclist['module']);
            $metricresult = $adb->query($metricsql);
            if ($metricresult) {
                $rowcount = $adb->fetch_array($metricresult);
                if (isset($rowcount)) {
                    $metriclists[$key]['count'] = $rowcount['count'];
                }
            }
        }
        $log->info("Metrics :: Successfully build the Metrics");
    }
    $title = array();
    $title[] = 'keyMetrics.gif';
    $title[] = $app_strings['LBL_HOME_KEY_METRICS'];
    $title[] = 'home_metrics';
    $header = array();
    $header[] = $app_strings['LBL_HOME_METRICS'];
    $header[] = $app_strings['LBL_HOME_COUNT'];
    $entries = array();
    if (isset($metriclists)) {
        $oddRow = true;
        foreach ($metriclists as $metriclist) {
            $value = array();
            $metric_fields = array('ID' => $metriclist['id'], 'NAME' => $metriclist['name'], 'COUNT' => $metriclist['count'], 'MODULE' => $metriclist['module']);
            $value[] = '<a href="index.php?action=index&module=' . $metriclist['module'] . '&viewname=' . $metriclist['id'] . '">' . $metriclist['name'] . '</a>';
            $value[] = '<a href="index.php?action=index&module=' . $metriclist['module'] . '&viewname=' . $metriclist['id'] . '">' . $metriclist['count'] . '</a>';
            $entries[$metriclist['id']] = $value;
        }
    }
    $values = array('Title' => $title, 'Header' => $header, 'Entries' => $entries);
    //if ( ($display_empty_home_blocks ) || (count($value)!= 0) )
    return $values;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:85,代码来源:ListViewTop.php


示例5: getTopPotentials

function getTopPotentials($maxval, $calCnt)
{
    $log = LoggerManager::getLogger('top opportunity_list');
    $log->debug("Entering getTopPotentials() method ...");
    require_once "data/Tracker.php";
    require_once 'modules/Potentials/Potentials.php';
    require_once 'include/logging.php';
    require_once 'include/ListView/ListView.php';
    global $app_strings;
    global $adb;
    global $current_language;
    global $current_user;
    $current_module_strings = return_module_language($current_language, "Potentials");
    $title = array();
    $title[] = 'myTopOpenPotentials.gif';
    $title[] = $current_module_strings['LBL_TOP_OPPORTUNITIES'];
    $title[] = 'home_mypot';
    $where = "AND vtiger_potential.sales_stage not in ('Closed Won','Closed Lost','" . $current_module_strings['Closed Won'] . "','" . $current_module_strings['Closed Lost'] . "') AND vtiger_crmentity.smownerid='" . $current_user->id . "'";
    $header = array();
    $header[] = $current_module_strings['LBL_LIST_OPPORTUNITY_NAME'];
    //$header[]=$current_module_strings['LBL_LIST_ACCOUNT_NAME'];
    $currencyid = fetchCurrency($current_user->id);
    $rate_symbol = getCurrencySymbolandCRate($currencyid);
    $rate = $rate_symbol['rate'];
    $curr_symbol = $rate_symbol['symbol'];
    $header[] = $current_module_strings['LBL_LIST_AMOUNT'] . '(' . $curr_symbol . ')';
    $list_query = getListQuery("Potentials", $where);
    $list_query .= " ORDER BY amount DESC";
    $list_query .= " LIMIT " . $adb->sql_escape_string($maxval);
    if ($calCnt == 'calculateCnt') {
        $list_result_rows = $adb->query(mkCountQuery($list_query));
        return $adb->query_result($list_result_rows, 0, 'count');
    }
    $list_result = $adb->query($list_query);
    $open_potentials_list = array();
    $noofrows = $adb->num_rows($list_result);
    $entries = array();
    if ($noofrows) {
        for ($i = 0; $i < $noofrows; $i++) {
            $open_potentials_list[] = array('name' => $adb->query_result($list_result, $i, 'potentialname'), 'id' => $adb->query_result($list_result, $i, 'potentialid'), 'amount' => $adb->query_result($list_result, $i, 'amount'));
            $potentialid = $adb->query_result($list_result, $i, 'potentialid');
            $potentialname = $adb->query_result($list_result, $i, 'potentialname');
            $Top_Potential = strlen($potentialname) > 20 ? substr($potentialname, 0, 20) . '...' : $potentialname;
            $value = array();
            $value[] = '<a href="index.php?action=DetailView&module=Potentials&record=' . $potentialid . '">' . $Top_Potential . '</a>';
            $value[] = convertFromDollar($adb->query_result($list_result, $i, 'amount'), $rate);
            $entries[$potentialid] = $value;
        }
    }
    $search_qry = "&query=true&Fields0=vtiger_crmentity.smownerid&Condition0=is&Srch_value0=" . $current_user->column_fields['user_name'] . "&Fields1=vtiger_potential.sales_stage&Condition1=dcts&Srch_value1=closed&searchtype=advance&search_cnt=2&matchtype=all";
    $values = array('ModuleName' => 'Potentials', 'Title' => $title, 'Header' => $header, 'Entries' => $entries, 'search_qry' => $search_qry);
    if ($display_empty_home_blocks && count($open_potentials_list) == 0 || count($open_potentials_list) > 0) {
        $log->debug("Exiting getTopPotentials method ...");
        return $values;
    }
}
开发者ID:p6,项目名称:VF,代码行数:56,代码来源:ListViewTop.php


示例6: getEntity

 public function getEntity()
 {
     $db = PearDatabase::getInstance();
     $module = 'Reservations';
     $currentUser = Users_Record_Model::getCurrentUserModel();
     $query = getListQuery($module);
     $params = array();
     if ($this->get('start') && $this->get('end')) {
         $query .= ' AND vtiger_reservations.date_start >= ? AND vtiger_reservations.due_date <= ?';
         $params[] = $this->get('start');
         $params[] = $this->get('end');
     }
     if ($this->get('types')) {
         $query .= " AND vtiger_reservations.type IN ('" . implode("','", $this->get('types')) . "')";
     }
     if ($this->get('user')) {
         if (is_array($this->get('user'))) {
             $query .= ' AND vtiger_crmentity.smownerid IN (' . implode(",", $this->get('user')) . ')';
         } else {
             $query .= ' AND vtiger_crmentity.smownerid IN (' . $this->get('user') . ')';
         }
     }
     $instance = CRMEntity::getInstance($module);
     $securityParameter = $instance->getUserAccessConditionsQuerySR($module, $currentUser);
     if ($securityParameter != '') {
         $query .= ' AND ' . $securityParameter;
     }
     $query .= ' ORDER BY date_start,time_start ASC';
     $queryResult = $db->pquery($query, $params);
     $result = array();
     for ($i = 0; $i < $db->num_rows($queryResult); $i++) {
         $record = $db->raw_query_result_rowdata($queryResult, $i);
         $item = array();
         $crmid = $record['reservationsid'];
         $item['id'] = $crmid;
         $item['title'] = vtranslate($record['name'], $module);
         $item['url'] = 'index.php?module=Reservations&view=Detail&record=' . $crmid;
         $dateTimeFieldInstance = new DateTimeField($record['date_start'] . ' ' . $record['time_start']);
         $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue($currentUser);
         $dateTimeComponents = explode(' ', $userDateTimeString);
         $dateComponent = $dateTimeComponents[0];
         //Conveting the date format in to Y-m-d . since full calendar expects in the same format
         $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $currentUser->get('date_format'));
         $item['start'] = $dataBaseDateFormatedString . ' ' . $dateTimeComponents[1];
         $dateTimeFieldInstance = new DateTimeField($record['due_date'] . ' ' . $record['time_end']);
         $userDateTimeString = $dateTimeFieldInstance->getDisplayDateTimeValue($currentUser);
         $dateTimeComponents = explode(' ', $userDateTimeString);
         $dateComponent = $dateTimeComponents[0];
         //Conveting the date format in to Y-m-d . since full calendar expects in the same format
         $dataBaseDateFormatedString = DateTimeField::__convertToDBFormat($dateComponent, $currentUser->get('date_format'));
         $item['end'] = $dataBaseDateFormatedString . ' ' . $dateTimeComponents[1];
         $item['className'] = ' userCol_' . $record['smownerid'] . ' calCol_' . $record['type'];
         $result[] = $item;
     }
     return $result;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:56,代码来源:Calendar.php


示例7: getModuleFilterDetails

 protected function getModuleFilterDetails($filterid)
 {
     global $adb;
     $result = $adb->pquery("SELECT * FROM vtiger_customview WHERE cvid=?", array($filterid));
     if ($result && $adb->num_rows($result)) {
         $resultrow = $adb->fetch_array($result);
         $module = $resultrow['entitytype'];
         $view = new CustomView($module);
         $viewid = $resultrow['cvid'];
         $view->getCustomViewByCvid($viewid);
         $viewQuery = $view->getModifiedCvListQuery($viewid, getListQuery($module), $module);
         $countResult = $adb->pquery(Vtiger_Functions::mkCountQuery($viewQuery), array());
         $count = 0;
         if ($countResult && $adb->num_rows($countResult)) {
             $count = $adb->query_result($countResult, 0, 'count');
         }
         $filter = $this->prepareFilterDetailUsingResultRow($resultrow);
         $filter['userName'] = getUserName($resultrow['userid']);
         $filter['count'] = $count;
         return $filter;
     }
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:22,代码来源:FilterDetailsWithCount.php


示例8: ismember_check

 /** Function to check if the product is member of other product
  */
 function ismember_check()
 {
     global $adb;
     $ismember_query = $adb->pquery(getListQuery("Products") . " AND (vtiger_products.productid IN (SELECT crmid from vtiger_seproductsrel WHERE vtiger_seproductsrel.crmid = ? AND vtiger_seproductsrel.setype='Products'))", array($this->id));
     $ismember = $adb->num_rows($ismember_query);
     return $ismember;
 }
开发者ID:kikojover,项目名称:corebos,代码行数:9,代码来源:Products.php


示例9: rgb

    $smarty->assign("CUSTOMVIEW_PERMISSION", $statusdetails);
    $smarty->assign("CV_EDIT_PERMIT", $edit_permit);
    $smarty->assign("CV_DELETE_PERMIT", $delete_permit);
}
// END
$smarty->assign("VIEWID", $viewid);
if ($viewinfo['viewname'] == 'All') {
    $smarty->assign('ALL', 'All');
}
if ($viewid == 0) {
    echo "<table border='0' cellpadding='5' cellspacing='0' width='100%' height='450px'><tr><td align='center'>";
    echo "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 55%; position: relative; z-index: 10000000;'>\n\n\t\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t<tbody><tr>\n\t\t<td rowspan='2' width='11%'><img src='" . vtiger_imageurl('denied.gif', $theme) . "' ></td>\n\t\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'><span clas\n\t\ts='genHeaderSmall'>{$app_strings['LBL_PERMISSION']}</span></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td class='small' align='right' nowrap='nowrap'>\n\t\t<a href='javascript:window.history.back();'>{$app_strings['LBL_GO_BACK']}</a><br>\n\t\t</td>\n\t\t</tr>\n\t\t</tbody></table>\n\t\t</div>";
    echo "</td></tr></table>";
    exit;
}
$listquery = getListQuery($currentModule);
$list_query = $customView->getModifiedCvListQuery($viewid, $listquery, $currentModule);
if ($where != '') {
    $list_query = "{$list_query} AND {$where}";
}
// Sorting
if (!empty($order_by)) {
    if ($order_by == 'smownerid') {
        $list_query .= ' ORDER BY user_name ' . $sorder;
    } else {
        $tablename = getTableNameForField($currentModule, $order_by);
        $tablename = $tablename != '' ? $tablename . '.' : '';
        $list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder;
    }
}
//Postgres 8 fixes
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:31,代码来源:ListView.php


示例10: getTopInvoice

function getTopInvoice($maxval, $calCnt)
{
    require_once "data/Tracker.php";
    require_once 'modules/Invoice/Invoice.php';
    require_once 'include/logging.php';
    require_once 'include/ListView/ListView.php';
    require_once 'include/utils/utils.php';
    require_once 'modules/CustomView/CustomView.php';
    global $app_strings, $current_language, $current_user, $adb, $list_max_entries_per_page, $theme;
    $current_module_strings = return_module_language($current_language, 'Invoice');
    $log = LoggerManager::getLogger('invoice_list');
    $url_string = '';
    $sorder = '';
    $oCustomView = new CustomView("Invoice");
    $customviewcombo_html = $oCustomView->getCustomViewCombo();
    if (isset($_REQUEST['viewname']) == false || $_REQUEST['viewname'] == '') {
        if ($oCustomView->setdefaultviewid != "") {
            $viewid = $oCustomView->setdefaultviewid;
        } else {
            $viewid = "0";
        }
    }
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    //Retreive the list from Database
    //<<<<<<<<<customview>>>>>>>>>
    $date_var = date('Y-m-d');
    //Changed for Patch 2 by Don
    $where = ' and vtiger_crmentity.smownerid=' . $current_user->id . ' and  vtiger_invoice.invoicestatus != \'Paid\'';
    $query = getListQuery("Invoice", $where);
    $query .= " ORDER BY total DESC";
    //<<<<<<<<customview>>>>>>>>>
    $query .= " LIMIT " . $adb->sql_escape_string($maxval);
    if ($calCnt == 'calculateCnt') {
        $list_result_rows = $adb->query(mkCountQuery($query));
        return $adb->query_result($list_result_rows, 0, 'count');
    }
    $list_result = $adb->query($query);
    //Retreiving the no of rows
    $noofrows = $adb->num_rows($list_result);
    //Retreiving the start value from request
    if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
        $start = vtlib_purify($_REQUEST['start']);
    } else {
        $start = 1;
    }
    //Retreive the Navigation array
    $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page);
    if ($navigation_array['start'] == 1) {
        if ($noofrows != 0) {
            $start_rec = $navigation_array['start'];
        } else {
            $start_rec = 0;
        }
        if ($noofrows > $list_max_entries_per_page) {
            $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1;
        } else {
            $end_rec = $noofrows;
        }
    } else {
        if ($navigation_array['next'] > $list_max_entries_per_page) {
            $start_rec = $navigation_array['next'] - $list_max_entries_per_page;
            $end_rec = $navigation_array['next'] - 1;
        } else {
            $start_rec = $navigation_array['prev'] + $list_max_entries_per_page;
            $end_rec = $noofrows;
        }
    }
    $focus = new Invoice();
    $title = array('myTopInvoices.gif', $current_module_strings['LBL_MY_TOP_INVOICE'], 'home_mytopinv');
    //Retreive the List View Table Header
    $listview_header = getListViewHeader($focus, "Invoice", $url_string, $sorder, $order_by, "HomePage", $oCustomView);
    $header = array($listview_header[1], $listview_header[2]);
    $listview_entries = getListViewEntries($focus, "Invoice", $list_result, $navigation_array, "HomePage", "", "EditView", "Delete", $oCustomView);
    foreach ($listview_entries as $crmid => $valuearray) {
        $entries[$crmid] = array($valuearray[1], $valuearray[2]);
    }
    $search_qry = "&query=true&Fields0=vtiger_invoice.invoicestatus&Condition0=isn&Srch_value0=Paid&Fields1=vtiger_crmentity.smownerid&Condition1=is&Srch_value1=" . $current_user->column_fields['user_name'] . "&searchtype=advance&search_cnt=2&matchtype=all";
    $values = array('ModuleName' => 'Invoice', 'Title' => $title, 'Header' => $header, 'Entries' => $entries, 'search_qry' => $search_qry);
    if ($display_empty_home_blocks && $noofrows == 0 || $noofrows > 0) {
        return $values;
    }
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:83,代码来源:ListTopInvoice.php


示例11: getListQuery

$smarty->assign("CUSTOMVIEW_OPTION", $customviewcombo_html);
$smarty->assign("VIEWID", $viewid);
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Note');
$smarty->assign("BUTTONS", $other_text);
$smarty->assign("CATEGORY", $category);
//Retreive the list from Database
//<<<<<<<<<customview>>>>>>>>>
if ($viewid != "0") {
    $listquery = getListQuery("Notes");
    $query = $oCustomView->getModifiedCvListQuery($viewid, $listquery, "Notes");
} else {
    $query = getListQuery("Notes");
}
//<<<<<<<<customview>>>>>>>>>
if (isset($where) && $where != '') {
    $query .= ' and ' . $where;
}
//Retreiving the no of rows
$count_result = $adb->query(mkCountQuery($query));
$noofrows = $adb->query_result($count_result, 0, "count");
//Storing Listview session object
if ($_SESSION['lvs'][$currentModule]) {
    setSessionVar($_SESSION['lvs'][$currentModule], $noofrows, $list_max_entries_per_page);
}
$start = $_SESSION['lvs'][$currentModule]['start'];
//Retreive the Navigation array
$navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page);
开发者ID:Pengzw,项目名称:c3crm,代码行数:31,代码来源:ListView.php


示例12: getListQuery

if (isPermitted('Emails', 'EditView', '') == 'yes') {
    $other_text['s_mail'] = $app_strings[LBL_SEND_MAIL_BUTTON];
}
if (isset($CActionDtls)) {
    $other_text['s_cmail'] = $app_strings[LBL_SEND_CUSTOM_MAIL_BUTTON];
}
if ($viewnamedesc['viewname'] == 'All') {
    $smarty->assign("ALL", 'All');
}
//Retreive the list from Database
//<<<<<<<<<customview>>>>>>>>>
if ($viewid != "0") {
    $listquery = getListQuery("Contacts");
    $list_query = $oCustomView->getModifiedCvListQuery($viewid, $listquery, "Contacts");
} else {
    $list_query = getListQuery("Contacts");
}
//<<<<<<<<customview>>>>>>>>>
if (isset($where) && $where != '') {
    $list_query .= " AND " . $where;
    $_SESSION['export_where'] = $where;
} else {
    unset($_SESSION['export_where']);
}
if (isset($order_by) && $order_by != '') {
    if ($order_by == 'smownerid') {
        if ($adb->dbType == "pgsql") {
            $list_query .= ' GROUP BY user_name';
        }
        $list_query .= ' ORDER BY user_name ' . $sorder;
    } else {
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:ListView.php


示例13: Products

$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$focus = new Products();
if (isset($_REQUEST['order_by'])) {
    $order_by = $adb->sql_escape_string($_REQUEST['order_by']);
}
$url_string = '';
// assigning http url string
$sorder = 'ASC';
// Default sort order
if (isset($_REQUEST['sorder']) && $_REQUEST['sorder'] != '') {
    $sorder = $adb->sql_escape_string($_REQUEST['sorder']);
}
//Retreive the list of Products
$list_query = getListQuery("Products");
if (isset($order_by) && $order_by != '') {
    $list_query .= ' and vtiger_products.discontinued<>0  ORDER BY ' . $order_by . ' ' . $sorder;
}
$list_query .= " and vtiger_products.discontinued<>0 group by vtiger_crmentity.crmid";
$list_result = $adb->query($list_query);
$num_rows = $adb->num_rows($list_result);
$record_string = "Total No of Product Available : " . $num_rows;
//Retreiving the array of already releated products
$sql1 = "select productid from vtiger_pricebookproductrel \r\n\t\t INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_pricebookproductrel.productid \r\n\t\t WHERE vtiger_crmentity.setype='Products' AND vtiger_crmentity.deleted=0 AND pricebookid=?";
$res1 = $adb->pquery($sql1, array($pricebook_id));
$num_prod_rows = $adb->num_rows($res1);
$prod_array = array();
for ($i = 0; $i < $num_prod_rows; $i++) {
    $prodid = $adb->query_result($res1, $i, "productid");
    $prod_array[$prodid] = $prodid;
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:AddProductsToPriceBook.php


示例14: unset

$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Memday');
$smarty->assign("BUTTONS", $other_text);
$smarty->assign("CATEGORY", $category);
//Retreive the list from Database
//<<<<<<<<<customview>>>>>>>>>
if (isset($where) && $where != '') {
    $_SESSION['export_where'] = $where;
    $where = ' and ' . $where;
} else {
    unset($_SESSION['export_where']);
}
if ($viewid != "0") {
    //change by xiaoyang on 2012-09-14
    //$listquery = $focus->getListQuery($where);
    $listquery = getListQuery("Memdays");
    $query = $oCustomView->getModifiedCvListQuery($viewid, $listquery, "Memdays");
} else {
    $query = $focus->getListQuery($where);
}
//<<<<<<<<customview>>>>>>>>>
//Retreiving the no of rows
$count_result = $adb->query(mkCountQuery($query));
$noofrows = $adb->query_result($count_result, 0, "count");
//Storing Listview session object
if ($_SESSION['lvs'][$currentModule]) {
    setSessionVar($_SESSION['lvs'][$currentModule], $noofrows, $list_max_entries_per_page);
}
$start = $_SESSION['lvs'][$currentModule]['start'];
//Retreive the Navigation array
$navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page);
开发者ID:Pengzw,项目名称:c3crm,代码行数:31,代码来源:ListView.php


示例15: getMyNotes

/**	function used to get the top 5 notes from the ListView query
 *	@return array $values - array with the title, header and entries like  Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries
 */
function getMyNotes()
{
    require_once "data/Tracker.php";
    require_once 'modules/Notes/Notes.php';
    require_once 'include/logging.php';
    require_once 'include/ListView/ListView.php';
    require_once 'include/database/PearDatabase.php';
    require_once 'include/ComboUtil.php';
    require_once 'include/utils/utils.php';
    require_once 'modules/CustomView/CustomView.php';
    global $app_strings, $current_language, $current_user;
    $current_module_strings = return_module_language($current_language, 'Notes');
    global $list_max_entries_per_page, $adb, $theme, $mod_strings;
    $log = LoggerManager::getLogger('note_list');
    $url_string = '';
    $sorder = '';
    $oCustomView = "";
    $focus = new Notes();
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    //Retreive the list from Database
    //<<<<<<<<<customview>>>>>>>>>
    $date_var = date('Y-m-d');
    $where = ' and smownerid=' . $current_user->id;
    $query = getListQuery("Notes", $where);
    $query .= " ORDER BY modifiedtime DESC";
    //<<<<<<<<customview>>>>>>>>>
    $list_result = $adb->limitQuery($query, 0, 5);
    //Retreiving the no of rows
    $noofrows = $adb->num_rows($list_result);
    //Retreiving the start value from request
    if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
        $start = $_REQUEST['start'];
    } else {
        $start = 1;
    }
    //Retreive the Navigation array
    $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page);
    if ($navigation_array['start'] == 1) {
        if ($noofrows != 0) {
            $start_rec = $navigation_array['start'];
        } else {
            $start_rec = 0;
        }
        if ($noofrows > $list_max_entries_per_page) {
            $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1;
        } else {
            $end_rec = $noofrows;
        }
    } else {
        if ($navigation_array['next'] > $list_max_entries_per_page) {
            $start_rec = $navigation_array['next'] - $list_max_entries_per_page;
            $end_rec = $navigation_array['next'] - 1;
        } else {
            $start_rec = $navigation_array['prev'] + $list_max_entries_per_page;
            $end_rec = $noofrows;
        }
    }
    $title = array('TopOpenNotes.gif', $current_module_strings['LBL_MY_TOP_NOTE'], 'home_mytopnote');
    //Retreive the List View Table Header
    $listview_header = getListViewHeader($focus, "Notes", $url_string, $sorder, $order_by, "HomePage", $oCustomView);
    $listview_entries = getListViewEntries($focus, "Notes", $list_result, $navigation_array, "HomePage", "", "EditView", "Delete", $oCustomView);
    $values = array('Title' => $title, 'Header' => $listview_header, 'Entries' => $listview_entries);
    //if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) )
    return $values;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:69,代码来源:ListNotes.php


示例16: getParentTab

$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Invoice');
$smarty->assign("CUSTOMVIEW_OPTION", $customviewcombo_html);
$smarty->assign("VIEWID", $viewid);
$smarty->assign("BUTTONS", $other_text);
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
//Retreive the list from Database
//<<<<<<<<<customview>>>>>>>>>
if ($viewid != "0") {
    $listquery = getListQuery("Invoice");
    $query = $oCustomView->getModifiedCvListQuery($viewid, $listquery, "Invoice");
} else {
    $query = getListQuery("Invoice");
}
//<<<<<<<<customview>>>>>>>>>
if (isset($where) && $where != '') {
    $query .= ' and ' . $where;
}
//$url_qry = getURLstring($focus);
if (isset($order_by) && $order_by != '') {
    if ($order_by == 'smownerid') {
        if ($adb->dbType == "pgsql") {
            $query .= ' GROUP BY user_name';
        }
        $query .= ' ORDER BY user_name ' . $sorder;
    } else {
        $tablename = getTableNameForField('Invoice', $order_by);
        $tablename = $tablename != '' ? $tablename . "." : '';
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:ListView.php


示例17: vtlib_purify

 if (!file_exists("modules/{$module}/language/" . $current_language . ".lang.php")) {
     $current_language = 'en_us';
 }
 require_once "modules/{$module}/language/" . $current_language . ".lang.php";
 global $mod_strings;
 global $app_strings;
 $smarty->assign("MOD", $mod_strings);
 $smarty->assign("APP", $app_strings);
 $smarty->assign("THEME", $theme);
 $smarty->assign("IMAGE_PATH", $image_path);
 $smarty->assign("MODULE", $module);
 $smarty->assign("TAG_SEARCH", $search_tag);
 $smarty->assign("SEARCH_MODULE", vtlib_purify($_REQUEST['search_module']));
 $smarty->assign("SINGLE_MOD", $module);
 $smarty->assign("SEARCH_STRING", htmlentities($search_val, ENT_QUOTES, $default_charset));
 $listquery = getListQuery($module);
 $oCustomView = '';
 $oCustomView = new CustomView($module);
 //Instead of getting current customview id, use cvid of All so that all entities will be found
 //$viewid = $oCustomView->getViewId($module);
 $cv_res = $adb->pquery("select cvid from vtiger_customview where viewname='All' and entitytype=?", array($module));
 $viewid = $adb->query_result($cv_res, 0, 'cvid');
 $customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
 $listquery = $oCustomView->getModifiedCvListQuery($viewid, $listquery, $module);
 if ($module == "Calendar") {
     if (!isset($oCustomView->list_fields['Close'])) {
         $oCustomView->list_fields['Close'] = array('activity' => 'status');
     }
     if (!isset($oCustomView->list_fields_name['Close'])) {
         $oCustomView->list_fields_name['Close'] = 'status';
     }
开发者ID:jaimeaga84,项目名称:corebos,代码行数:31,代码来源:UnifiedSearch.php


示例18: Services

$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("IMAGE_PATH", $image_path);
$focus = new Services();
if (isset($_REQUEST['order_by'])) {
    $order_by = $adb->sql_escape_string($_REQUEST['order_by']);
}
$url_string = '';
// assigning http url string
$sorder = 'ASC';
// Default sort order
if (isset($_REQUEST['sorder']) && $_REQUEST['sorder'] != '') {
    $sorder = $adb->sql_escape_string($_REQUEST['sorder']);
}
//Retreive the list of Services
$list_query = getListQuery("Services");
if (isset($order_by) && $order_by != '') {
    $list_query .= ' and vtiger_service.discontinued<>0  ORDER BY ' . $order_by . ' ' . $sorder;
}
$list_query .= " and vtiger_service.discontinued<>0 group by vtiger_crmentity.crmid";
$list_result = $adb->query($list_query);
$num_rows = $adb->num_rows($list_result);
$record_string = "Total No of Service Available : " . $num_rows;
//Retreiving the array of already releated services
$sql1 = "select productid as serviceid from vtiger_pricebookproductrel \n\t\t INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_pricebookproductrel.productid \n\t\t WHERE vtiger_crmentity.setype='Services' AND vtiger_crmentity.deleted=0 AND pricebookid=?";
$res1 = $adb->pquery($sql1, array($pricebook_id));
$num_prod_rows = $adb->num_rows($res1);
$prod_array = array();
for ($i = 0; $i < $num_prod_rows; $i++) {
    $prodid = $adb->query_result($res1, $i, "serviceid");
    $prod_array[$prodid] = $prodid;
开发者ID:latechdirect,项目名称:vtiger,代码行数:31,代码来源:AddServicesToPriceBook.php


示例19: getKeyMetrics

/** to get the details of a KeyMetrics on Home page 
 * @returns  $customviewlist Array in the following format
 * $values = Array('Title'=>Array(0=>'image name',
 *				 1=>'Key Metrics',
 *			 	 2=>'home_metrics'
 *			 	),
 *		  'Header'=>Array(0=>'Metrics',
 *	  			  1=>'Count'
 *			  	),
 *		  'Entries'=>Array($cvid=>Array(
 *			  			0=>$customview name,
 *						1=>$no of r 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getListViewEntries函数代码示例发布时间:2022-05-15
下一篇:
PHP getListOfModels函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap