コード例 #1
0
 function __construct()
 {
     global $conn, $Language;
     global $UserTable, $UserTableConn;
     $GLOBALS["Page"] =& $this;
     $this->TokenTimeout = ew_SessionTimeoutTime();
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Parent constuctor
     parent::__construct();
     // Table object (view2)
     if (!isset($GLOBALS["view2"]) || get_class($GLOBALS["view2"]) == "cview2") {
         $GLOBALS["view2"] =& $this;
         $GLOBALS["Table"] =& $GLOBALS["view2"];
     }
     // Initialize URLs
     $this->ExportPrintUrl = $this->PageUrl() . "export=print";
     $this->ExportExcelUrl = $this->PageUrl() . "export=excel";
     $this->ExportWordUrl = $this->PageUrl() . "export=word";
     $this->ExportHtmlUrl = $this->PageUrl() . "export=html";
     $this->ExportXmlUrl = $this->PageUrl() . "export=xml";
     $this->ExportCsvUrl = $this->PageUrl() . "export=csv";
     $this->ExportPdfUrl = $this->PageUrl() . "export=pdf";
     $this->AddUrl = "view2add.php";
     $this->InlineAddUrl = $this->PageUrl() . "a=add";
     $this->GridAddUrl = $this->PageUrl() . "a=gridadd";
     $this->GridEditUrl = $this->PageUrl() . "a=gridedit";
     $this->MultiDeleteUrl = "view2delete.php";
     $this->MultiUpdateUrl = "view2update.php";
     // Table object (user)
     if (!isset($GLOBALS['user'])) {
         $GLOBALS['user'] = new cuser();
     }
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'list', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'view2', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect($this->DBID);
     }
     // User table object (user)
     if (!isset($UserTable)) {
         $UserTable = new cuser();
         $UserTableConn = Conn($UserTable->DBID);
     }
     // List options
     $this->ListOptions = new cListOptions();
     $this->ListOptions->TableVar = $this->TableVar;
     // Export options
     $this->ExportOptions = new cListOptions();
     $this->ExportOptions->Tag = "div";
     $this->ExportOptions->TagClassName = "ewExportOption";
     // Other options
     $this->OtherOptions['addedit'] = new cListOptions();
     $this->OtherOptions['addedit']->Tag = "div";
     $this->OtherOptions['addedit']->TagClassName = "ewAddEditOption";
     $this->OtherOptions['detail'] = new cListOptions();
     $this->OtherOptions['detail']->Tag = "div";
     $this->OtherOptions['detail']->TagClassName = "ewDetailOption";
     $this->OtherOptions['action'] = new cListOptions();
     $this->OtherOptions['action']->Tag = "div";
     $this->OtherOptions['action']->TagClassName = "ewActionOption";
     // Filter options
     $this->FilterOptions = new cListOptions();
     $this->FilterOptions->Tag = "div";
     $this->FilterOptions->TagClassName = "ewFilterOption fview2listsrch";
     // List actions
     $this->ListActions = new cListActions();
 }
コード例 #2
0
 function __construct()
 {
     global $conn, $Language;
     global $UserTable, $UserTableConn;
     $GLOBALS["Page"] =& $this;
     $this->TokenTimeout = ew_SessionTimeoutTime();
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Parent constuctor
     parent::__construct();
     // Table object (view2)
     if (!isset($GLOBALS["view2"]) || get_class($GLOBALS["view2"]) == "cview2") {
         $GLOBALS["view2"] =& $this;
         $GLOBALS["Table"] =& $GLOBALS["view2"];
     }
     // Table object (user)
     if (!isset($GLOBALS['user'])) {
         $GLOBALS['user'] = new cuser();
     }
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'edit', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'view2', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect($this->DBID);
     }
     // User table object (user)
     if (!isset($UserTable)) {
         $UserTable = new cuser();
         $UserTableConn = Conn($UserTable->DBID);
     }
 }