<?php
|
|
|
|
class crm_manage_controller extends adminCommon
|
{
|
|
function index_action()
|
{
|
|
$crmM = $this->MODEL('crm');
|
|
$where['PHPYUNBTWSTART_A'] = '';
|
$where['did'][] = array('=', 0, '');
|
$where['did'][] = array('isnull', '', 'or');
|
$where['PHPYUNBTWEND_A'] = '';
|
|
$where['is_crm'] = 1;
|
|
if (isset($_GET['order']) && isset($_GET['t'])) {
|
|
$where['orderby'] = $_GET['t'].','.$_GET['order'];
|
$urlarr['order'] = $_GET['order'];
|
$urlarr['t'] = $_GET['t'];
|
} else {
|
|
$where['orderby'] = array('uid,desc');
|
}
|
|
$rows = $crmM->getCrmList($where);
|
$this->yunset(array('rows' => $rows));
|
$this->yuntpl(array('admin/crm_manage'));
|
}
|
|
|
function getData_action()
|
{
|
|
|
$crmM = $this->MODEL('crm');
|
|
$return = $crmM->getManageData();
|
|
echo json_encode($return);
|
die();
|
}
|
|
|
}
|
|
?>
|