예제 #1
0
// Include prepend.inc to load Qcodo
require '../includes/prepend.inc.php';
/* if you DO NOT have "includes/" in your include_path */
// require('prepend.inc.php');				/* if you DO have "includes/" in your include_path */
// Include the classfile for RoleListFormBase
require __FORMBASE_CLASSES__ . '/RoleListFormBase.class.php';
// Security check for ALLOW_REMOTE_ADMIN
// To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below
QApplication::CheckRemoteAdmin();
/**
 * This is a quick-and-dirty draft form object to do the List All functionality
 * of the Role class.  It extends from the code-generated
 * abstract RoleListFormBase class.
 *
 * Any display customizations and presentation-tier logic can be implemented
 * here by overriding existing or implementing new methods, properties and variables.
 *
 * Additional qform control objects can also be defined and used here, as well.
 * 
 * @package My Application
 * @subpackage FormDraftObjects
 * 
 */
class RoleListForm extends RoleListFormBase
{
}
// Go ahead and run this form object to generate the page and event handlers, using
// generated/role_list.tpl.php as the included HTML template file
RoleListForm::Run('RoleListForm', 'generated/role_list.tpl.php');
예제 #2
0
        // Enable AJAX - this won't work while using the DB profiler
        $this->dtgRole->UseAjax = true;
        // Enable Pagination, and set to 20 items per page
        $objPaginator = new QPaginator($this->dtgRole);
        $this->dtgRole->Paginator = $objPaginator;
        $this->dtgRole->ItemsPerPage = 20;
        $this->dtgRole->AddColumn(new QDataGridColumn('Role', '<?= $_ITEM->__toStringWithLink("bluelink") ?>', array('OrderByClause' => QQ::OrderBy(QQN::Role()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Role()->ShortDescription, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
        $this->dtgRole->AddColumn(new QDataGridColumn('Description', '<?= $_ITEM->LongDescription ?>', array('Width' => "200", 'OrderByClause' => QQ::OrderBy(QQN::Role()->LongDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Role()->LongDescription, false), 'CssClass' => "dtg_column")));
        $this->dtgRole->AddColumn(new QDataGridColumn('Created By', '<?= $_ITEM->CreatedByObject->__toStringFullName() ?>', array('OrderByClause' => QQ::OrderBy(QQN::Role()->CreatedByObject->LastName, false, QQN::Role()->CreatedByObject->FirstName, false), 'ReverseOrderByClause' => QQ::OrderBy(QQN::Role()->CreatedByObject->LastName, QQN::Role()->CreatedByObject->FirstName), 'CssClass' => "dtg_column")));
        $this->dtgRole->SortColumnIndex = 0;
        $this->dtgRole->SortDirection = 0;
        $objStyle = $this->dtgRole->RowStyle;
        $objStyle->ForeColor = '#000000';
        $objStyle->BackColor = '#FFFFFF';
        $objStyle->FontSize = 12;
        $objStyle = $this->dtgRole->AlternateRowStyle;
        $objStyle->BackColor = '#EFEFEF';
        $objStyle = $this->dtgRole->HeaderRowStyle;
        $objStyle->ForeColor = '#000000';
        $objStyle->BackColor = '#EFEFEF';
        $objStyle->CssClass = 'dtg_header';
    }
    protected function btnNew_Click()
    {
        QApplication::Redirect('role_edit.php');
    }
}
// Go ahead and run this form object to generate the page and event handlers, using
// generated/role_edit.php.inc as the included HTML template file
RoleListForm::Run('RoleListForm', __DOCROOT__ . __SUBDIRECTORY__ . '/admin/role_list.tpl.php');