当前位置: 首页>>代码示例>>PHP>>正文


PHP astercrm::getAllTicketRecords方法代码示例

本文整理汇总了PHP中astercrm::getAllTicketRecords方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::getAllTicketRecords方法的具体用法?PHP astercrm::getAllTicketRecords怎么用?PHP astercrm::getAllTicketRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在astercrm的用法示例。


在下文中一共展示了astercrm::getAllTicketRecords方法的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");
//.........这里部分代码省略.........
开发者ID:ljhcj,项目名称:IRISCC,代码行数:101,代码来源:astercrm.class.php


注:本文中的astercrm::getAllTicketRecords方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。