本文整理汇总了PHP中Controller::actionIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::actionIndex方法的具体用法?PHP Controller::actionIndex怎么用?PHP Controller::actionIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller::actionIndex方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$grdetail = new Grdetail('search');
$grdetail->unsetAttributes();
// clear any default values
if (isset($_GET['Grdetail'])) {
$grdetail->attributes = $_GET['Grdetail'];
}
$poheader = new Poheader('search');
$poheader->unsetAttributes();
// clear any default values
if (isset($_GET['Poheader'])) {
$poheader->attributes = $_GET['Poheader'];
}
$model = new Grheader('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Grheader'])) {
$model->attributes = $_GET['Grheader'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'poheader' => $poheader, 'grdetail' => $grdetail));
}
示例2: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
if (isset($_POST['startperiod'])) {
$this->pdf->title = 'General Ledger';
$this->pdf->AddPage('P', 'A4');
$connection = Yii::app()->db;
$sql = "select accountid,accountcode,accountname from account ";
if ($_POST['accountid'] !== '') {
$sql = $sql . " where accountid = " . $_POST['accountid'];
}
$command = $connection->createCommand($sql);
$dataReader = $command->queryAll();
$this->pdf->Text(10, $this->pdf->GetY(), date(Yii::app()->params['dateviewfromdb'], strtotime($_POST['startperiod'])) . ' - ' . date(Yii::app()->params['dateviewfromdb'], strtotime($_POST['endperiod'])));
foreach ($dataReader as $row) {
$this->pdf->setFont('Arial', 'B', 6);
$starty = 10;
$this->pdf->Text(10, $starty + $this->pdf->GetY(), 'Account Code : ' . $row['accountcode']);
$this->pdf->Text(60, $starty + $this->pdf->GetY(), 'Account Name : ' . $row['accountname']);
$sql1 = "select b.accountcode,b.accountname, a.debit,a.credit,a.postdate,c.currencyname,a.ratevalue\r\nfrom genledger a\r\nleft join account b on b.accountid = a.accountid\r\nleft join currency c on c.currencyid = a.currencyid\r\nwhere postdate between '" . $_POST['startperiod'] . "' and '" . $_POST['endperiod'] . "' and a.accountid = " . $row['accountid'] . " order by postdate";
$command1 = $connection->createCommand($sql1);
$dataReader1 = $command1->queryAll();
$starty = $this->pdf->GetY() + 15;
$this->pdf->setY($starty);
$this->pdf->setFont('Arial', 'B', 6);
$this->pdf->setwidths(array(30, 40, 40, 20, 30));
$this->pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
$this->pdf->setbordercell(array('LTRB', 'LTRB', 'LTRB', 'LTRB', 'LTRB'));
$this->pdf->row(array('Post Date', 'Debit', 'Credit', 'Currency Name', 'Rate'));
$this->pdf->setbordercell(array('LTRB', 'LTRB', 'LTRB', 'LTRB', 'LTRB'));
$this->pdf->SetTableData();
$totaldebit = 0;
$totalcredit = 0;
$selisih = 0;
$this->pdf->setaligns(array('L', 'R', 'R', 'L', 'R'));
foreach ($dataReader1 as $row1) {
$this->pdf->row(array(date(Yii::app()->params['dateviewfromdb'], strtotime($row1['postdate'])), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $row1['debit']), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $row1['credit']), $row1['currencyname'], Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $row1['ratevalue'])));
$totaldebit = $row1['debit'] * $row1['ratevalue'] + $totaldebit;
$totalcredit = $row1['credit'] * $row1['ratevalue'] + $totalcredit;
}
$this->pdf->row(array('Sub Total', Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totaldebit), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totalcredit), '', ''));
$this->pdf->row(array('Total', Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totaldebit >= $totalcredit ? $totaldebit - $totalcredit : 0), Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberprice"], $totaldebit < $totalcredit ? $totalcredit - $totaldebit : 0), ''));
}
$this->pdf->Output();
} else {
$this->render('index');
}
}
示例3: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$model = new Fakturpajak('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Fakturpajak'])) {
$model->attributes = $_GET['Fakturpajak'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model));
}
示例4: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$deliveryadvicedetail = new Deliveryadvicedetail('search');
$deliveryadvicedetail->unsetAttributes();
// clear any default values
if (isset($_GET['Deliveryadvicedetail'])) {
$deliveryadvicedetail->attributes = $_GET['Deliveryadvicedetail'];
}
$product = new Product('search');
$product->unsetAttributes();
// clear any default values
if (isset($_GET['Product'])) {
$product->attributes = $_GET['Product'];
}
$unitofmeasure = new Unitofmeasure('search');
$unitofmeasure->unsetAttributes();
// clear any default values
if (isset($_GET['Unitofmeasure'])) {
$unitofmeasure->attributes = $_GET['Unitofmeasure'];
}
$sloc = new Sloc('search');
$sloc->unsetAttributes();
// clear any default values
if (isset($_GET['Sloc'])) {
$sloc->attributes = $_GET['Sloc'];
}
$requestedby = new Requestedby('search');
$requestedby->unsetAttributes();
// clear any default values
if (isset($_GET['Requestedby'])) {
$requestedby->attributes = $_GET['Requestedby'];
}
$model = new Deliveryadvice('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Deliveryadvice'])) {
$model->attributes = $_GET['Deliveryadvice'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'deliveryadvicedetail' => $deliveryadvicedetail, 'product' => $product, 'unitofmeasure' => $unitofmeasure, 'sloc' => $sloc, 'requestedby' => $requestedby));
}
示例5: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$purchasingorg = new Purchasingorg('searchwstatus');
$purchasingorg->unsetAttributes();
// clear any default values
if (isset($_GET['Purchasingorg'])) {
$purchasingorg->attributes = $_GET['Purchasingorg'];
}
$model = new Purchasinggroup('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Purchasinggroup'])) {
$model->attributes = $_GET['Purchasinggroup'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'purchasingorg' => $purchasingorg));
}
示例6: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Menuauth('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Menuauth'])) {
$model->attributes = $_GET['Menuauth'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'menuaccess' => $this->menuaccess));
}
示例7: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Employeeschedule('searchwstatus');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Employeeschedule'])) {
$model->attributes = $_GET['Employeeschedule'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'employee' => $this->employee));
}
示例8: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Employeetype('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Employeetype'])) {
$model->attributes = $_GET['Employeetype'];
}
$this->render('index', array('model' => $model, 'snro' => $this->snro, 'sicksnro' => $this->sicksnro, 'sickstatus' => $this->sickstatus));
}
示例9: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$supplier = new Supplier('searchwstatus');
$supplier->unsetAttributes();
// clear any default values
if (isset($_GET['Supplier'])) {
$supplier->attributes = $_GET['Supplier'];
}
$product = new Product('searchwstatus');
$product->unsetAttributes();
// clear any default values
if (isset($_GET['Product'])) {
$product->attributes = $_GET['Product'];
}
$purchasinggroup = new Purchasinggroup('searchwstatus');
$purchasinggroup->unsetAttributes();
// clear any default values
if (isset($_GET['Purchasinggroup'])) {
$purchasinggroup->attributes = $_GET['Purchasinggroup'];
}
$currency = new Currency('searchwstatus');
$currency->unsetAttributes();
// clear any default values
if (isset($_GET['Currency'])) {
$currency->attributes = $_GET['Currency'];
}
$model = new Purchinforec('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Purchinforec'])) {
$model->attributes = $_GET['Purchinforec'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'supplier' => $supplier, 'product' => $product, 'purchasinggroup' => $purchasinggroup, 'currency' => $currency));
}
示例10: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$subdistrict = new Subdistrict('searchwstatus');
$subdistrict->unsetAttributes();
// clear any default values
if (isset($_GET['Subdistrict'])) {
$subdistrict->attributes = $_GET['Subdistrict'];
}
$model = new Kelurahan('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Kelurahan'])) {
$model->attributes = $_GET['Kelurahan'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'subdistrict' => $subdistrict));
}
示例11: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$parentmatgroup = new Materialgroup('searchwstatus');
$parentmatgroup->unsetAttributes();
// clear any default values
if (isset($_GET['Parentmatgroup'])) {
$parentmatgroup->attributes = $_GET['Parentmatgroup'];
}
$materialtype = new Materialtype('searchwstatus');
$materialtype->unsetAttributes();
// clear any default values
if (isset($_GET['Materialtype'])) {
$materialtype->attributes = $_GET['Materialtype'];
}
$model = new Materialgroup('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Materialgroup'])) {
$model->attributes = $_GET['Materialgroup'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'parentmatgroup' => $parentmatgroup, 'materialtype' => $materialtype));
}
示例12: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Account('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Account'])) {
$model->attributes = $_GET['Account'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'parentaccount' => $this->parentaccount, 'currency' => $this->currency, 'accounttype' => $this->accounttype));
}
示例13: Controller
<?php
/**
* Initialization of controller, calling methods of controller depending on user's actions;
* Including all needed files;
*/
include $_SERVER['DOCUMENT_ROOT'] . '/Model/Model.php';
include $_SERVER['DOCUMENT_ROOT'] . '/Model/QueryModel.php';
include $_SERVER['DOCUMENT_ROOT'] . '/Controller/Controller.php';
$controller = new Controller();
if ($file == 'index.php') {
if (is_null($_REQUEST['name'])) {
$controller->actionIndex();
}
}
if (isset($_REQUEST['name'])) {
$controller->actionCreateOrder($_REQUEST);
}
if ($file == 'Order_list.php') {
$controller->actionListOrders();
}
if ($file == 'User_orders.php') {
$controller->actionListUser($_REQUEST['user']);
}
示例14: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Jobs('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Jobs'])) {
$model->attributes = $_GET['Jobs'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'orgstructure' => $this->orgstructure, 'position' => $this->position));
}
示例15: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
parent::actionIndex();
$this->lookupdata();
$model = new Product('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Product'])) {
$model->attributes = $_GET['Product'];
}
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
// would interfere with pager and repetitive page size change
}
$this->render('index', array('model' => $model, 'productacc' => $this->productacc, 'productbasic' => $this->productbasic, 'productconversion' => $this->productconversion, 'productplant' => $this->productplant, 'productpurchase' => $this->productpurchase));
}