Location: PHPKode > projects > Yoxel Systems > yoxel_v1.24beta/lms/lms_filter.php
<?php
// $Header: /home/CVS/rps/lms/lms_filter.php,v 1.6 2008/10/12 22:20:19 yoxel Exp $
/*
 * ----START-LICENCE----
 * Copyright 2002-2008 Yoxel Systems, Santa Clara, CA, USA (hide@address.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 * -----END-LICENCE-----
 */

  require_once('../includes/db.inc');
  require_once('includes/lms/lms.inc');

  $rts = new LicenseManager();
  $pqs_2d=&$rts->init_pqs();

  $FldList = array(
	'r|customer_id' => array(
		'name'=>'Account',
		'input' => 'select',
		'values' => &$customers_2d['name'],
		'vbc'=>TRUE),
	'r|state'=> array(
		'name'=>'State',
		'input' => 'select',
		'values' => &$rts->state2str,
		'vbc'=>TRUE),
	'class'=> array(
		'name'=>'Class',
		'input' => 'select',
		'values' => &$rts->class2str,
		'vbc'=>TRUE),
	'fixer_uid'=> array(
		'name'=>'Owner',
		'input' => 'select',
		'values' => '%workers',
		'vbc'=>FALSE),
	'filed_by'=> array(
		'name'=>'Submitter',
		'input' => 'select',
		'values' => '%submitters',
		'vbc'=>TRUE),
	'r|reg_date'=> array(
		'name'=>'Arrival Date',
		'input' => 'date',
		'vbc'=>TRUE),
	'synopsis'=>array(
		'name'=>'Synopsis',
		'input' => 'text',
		'vbc'=>TRUE),
	'r|description'=>array(
		'name'=>'Description',
		'input' => 'text',
		'vbc'=>TRUE),
	'rpp' => array(
		'name'=>'Requests Per Page',
		'input' => 'rselect',
		'local' => TRUE,
		'values' => array(25=>25,50=>50,100=>100),
		'vbc'=>TRUE)
	);


  // Refer to $rts->request_query_sqlstr function that defines an SQL query like this
  // SELECT r.rid, IF(q.parent=0,q.name,CONCAT(e.name, '/', q.name)) AS pq_name, r.synopsis, r.fixer_uid, q.it_mgr, r.class, r.state, r.phase_of_rid, r.customer_pri, r.filed_by, q.owner_jr, q.owner_sr, DATE_FORMAT(r.reg_date,'%m/%d/%y') AS rdate FROM itrequests AS r, queues AS q LEFT JOIN queues AS e ON q.parent=e.qid WHERE r.qid=q.qid;

  $ConfigJoins = array(
  	'std_join_pq' => FALSE,
  	'std_join_cust' => TRUE,
  	'custom_join' => "LEFT OUTER JOIN users AS u ON r.current_owner=u.uid",
  	'custom_fields' => "u.last_name AS lname");

  $OutputFormat =array(
	'ID' => array('field' => 'rid',
			'eval' => '$tmp=$row[\'phase_of_rid\']?(\'&#8658;&nbsp;\'.$row[\'rid\']):($row[\'rid\'].\'&nbsp;&nbsp;\');'),

	'Arrival' => array('field' => 'rdate', 'sort_field' => 'r.reg_date'),

	'Account' => array('field' => 'account_name'),

	'State' => array('field' => 'state',
			'align'=>'center',
			'eval'=>'$tmp=$obj->state2str[$row[\'state\']];'),

	'Responsible' => array('field' => 'lname',
			'eval'=>'$tmp=YxlUsers::name($row[\'current_owner\']); if(!$tmp) $tmp="N/A";',
			'align'=>'center'),

	'Synopsis' => array('field' => 'synopsis',
				'eval' => '$tmp=html_safe_text($row[\'synopsis\']);'),
	);


  require_once('includes/rts/rts_query_inc.php');
?>


Return current item: Yoxel Systems