本文整理汇总了PHP中astercrm::getTicketNumRows方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::getTicketNumRows方法的具体用法?PHP astercrm::getTicketNumRows怎么用?PHP astercrm::getTicketNumRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astercrm
的用法示例。
在下文中一共展示了astercrm::getTicketNumRows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createTikcetGrid
/**
* generate grid HTML code
* @param start int record start
* @param limit int how many records need
* @param filter string the field need to search
* @param content string the contect want to match
* @param divName string which div grid want to be put
* @param order string data order
* @return html string grid HTML code
*/
function createTikcetGrid($Cid = 0, $Ctype = "", $start = 0, $limit = 1, $filter = null, $content = null, $order = null, $divName = "", $ordering = "", $stype = array())
{
global $locate;
$_SESSION['ordering'] = $ordering;
if ($filter == null or $content == null or $content == 'Array' or $filter == 'Array') {
$numRows =& astercrm::getTicketNumRows($filter, $content, $Ctype, $Cid);
$arreglo =& astercrm::getAllTicketRecords($start, $limit, $order, $Ctype, $Cid);
$content = null;
$filter = null;
} else {
foreach ($content as $value) {
if (trim($value) != "") {
//搜索内容有值
$flag = "1";
break;
}
}
foreach ($filter as $value) {
if (trim($value) != "") {
//搜索条件有值
$flag2 = "1";
break;
}
}
foreach ($stype as $value) {
if (trim($value) != "") {
//搜索方式有值
$flag3 = "1";
break;
}
}
if ($flag != "1" || $flag2 != "1") {
//无值
$numRows =& astercrm::getTicketNumRows($filter, $content, $Ctype, $Cid);
$arreglo =& astercrm::getAllTicketRecords($start, $limit, $order, $Ctype, $Cid);
} elseif ($flag3 != 1) {
$order = "id";
$numRows =& astercrm::getTicketNumRowsMore($filter, $content, $Ctype, $Cid);
$arreglo =& astercrm::getTicketRecordsFilteredMore($start, $limit, $filter, $content, $order, $Ctype, $Cid);
} else {
$order = "id";
$numRows =& astercrm::getTicketNumRowsMorewithstype($filter, $content, $stype, $table, $Ctype, $Cid);
$arreglo =& astercrm::getTicketRecordsFilteredMorewithstype($start, $limit, $filter, $content, $stype, $order, $table, $Ctype, $Cid);
}
}
// Select Box: type table.
$typeFromSearch = array();
$typeFromSearch[] = 'like';
$typeFromSearch[] = 'equal';
$typeFromSearch[] = 'more';
$typeFromSearch[] = 'less';
// Selecct Box: Labels showed on searchtype select box.
$typeFromSearchShowAs = array();
$typeFromSearchShowAs[] = $locate->Translate("like");
$typeFromSearchShowAs[] = '=';
$typeFromSearchShowAs[] = '>';
$typeFromSearchShowAs[] = '<';
// Editable zone
// Databse Table: fields
$fields = array();
if ($Ctype == 'agent_tickets') {
$fields[] = 'id';
$fields[] = 'ticketname';
$fields[] = 'customer';
$fields[] = 'status';
$fields[] = 'memo';
$fields[] = 'creby';
} else {
$fields[] = 'id';
$fields[] = 'ticketcategoryname';
$fields[] = 'ticketname';
$fields[] = 'customer';
$fields[] = 'assignto';
$fields[] = 'status';
$fields[] = 'memo';
$fields[] = 'creby';
}
// HTML table: Headers showed
$headers = array();
$headers[] = $locate->Translate("Ticket Id");
if ($Ctype != 'agent_tickets') {
$headers[] = $locate->Translate("TicketCategory Name");
}
$headers[] = $locate->Translate("Ticket Name");
$headers[] = $locate->Translate("Customer");
if ($Ctype != 'agent_tickets') {
$headers[] = $locate->Translate("AssignTo");
}
$headers[] = $locate->Translate("Status");
$headers[] = $locate->Translate("Memo");
//.........这里部分代码省略.........