예제 #1
0
        if (!empty($_GET['date1'])) {
            if (!empty($_GET['date1']) && !empty($_GET['date2'])) {
                $fromdate = $_GET['date1'];
                $todate = $_GET['date2'];
                setvar("fromdate", $fromdate);
                setvar("todate", $todate);
                $condition = "create_on BETWEEN ";
                $condition .= "'" . $_GET['date1'] . "'";
                $condition .= " AND ";
                $condition .= "'" . $_GET['date2'] . "'";
                $conditions[] = $condition;
            }
        }
    }
    if ($do == "del" && !empty($id)) {
        //$keyword->del($id);
    }
}
setvar("Status", $_PB_CACHE['common_status']);
$amount = $download->findCount(null, $conditions, "id", null);
$page->setPagenav($amount);
//$joins[] = "INNER JOIN {$tb_prefix}customers mf ON Download.req_key=mf.req_key";
$joins[] = null;
$fields = "Id,msisdn,req_id,create_on,short_code,game_id,user_name,cp_id,cp_game_id";
$result = $download->findAll($fields, $joins, $conditions, "id DESC", $page->firstcount, $page->displaypg);
//print_r($result);
//exit;
setvar("TotalRequest", $amount);
setvar("Items", $result);
setvar("ByPages", $page->getPagenav());
template($tpl_file);
예제 #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Requests('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Requests'])) {
         $model->attributes = $_GET['Requests'];
     }
     $criteria = new CDbCriteria();
     $criteria->with = array('user', 'doc');
     $criteria->compare('doc.state', 'Inquiry');
     $criteria->compare('t.state', 'WAIT');
     $dataProvider = $model->findAll($criteria);
     $this->render('admin', array('model' => $model, 'dataProvider' => $dataProvider));
 }