本文整理汇总了PHP中Page::setFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::setFile方法的具体用法?PHP Page::setFile怎么用?PHP Page::setFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page::setFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Module
/**
* dashboard module declaration
*/
$MMCApp =& MMCApp::getInstance();
/* Get the base module instance reference */
$base =& $MMCApp->getModule('base');
/* Get the main sub-module instance reference */
$main =& $base->getSubmod('main');
$mod = new Module("dashboard");
$mod->setVersion("3.0.94");
$mod->setRevision('');
$mod->setDescription(_T("Dashboard", "dashboard"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(-10);
$submod = new SubModule("main", _T("Dashboard", "dashboard"));
$submod->setImg('modules/dashboard/graph/navbar/dashboard');
$submod->setDefaultPage("dashboard/main/default");
$submod->setPriority(-10);
/* Add the dashboard to the main module */
$page = new Page("default", _T("Dashboard", "dashboard"));
$page->setFile("modules/dashboard/main/default.php");
$submod->addPage($page);
$main->addPage($page);
$page = new Page("ajaxPanels", _T("Panels", "dashboard"));
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp->addModule($mod);
# hide status submod in base module
$status =& $base->getSubmod('status');
$status->setVisibility(False);
示例2: Module
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* module declaration
*/
$mod = new Module("bulkimport");
$mod->setVersion("2.5.95");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("Bulk user manager via CSV files", "bulkimport"));
$mod->setAPIVersion('0:0:0');
/* Get the base module instance reference */
$base =& $MMCApp->getModule('base');
/* Get the computers sub-module instance reference */
$users =& $base->getSubmod('users');
/* Add the page to the module */
$page = new Page("bulkimport", _T("Bulk import (CSV)", "bulkimport"));
$page->setFile("modules/bulkimport/import/index.php");
$page->setImg("modules/base/graph/users/img/icn_addUser_active.gif", "modules/base/graph/users/img/icn_addUser.gif");
$users->addPage($page);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
unset($page);
unset($users);
示例3: Page
$page = new Page("ajaxPendingPackageList");
$page->setFile("modules/pkgs/pkgs/ajaxPendingPackageList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxAppstreamActivatedPackageList");
$page->setFile("modules/pkgs/pkgs/ajaxAppstreamActivatedPackageList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxAppstreamAvailablePackageList");
$page->setFile("modules/pkgs/pkgs/ajaxAppstreamAvailablePackageList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxPackageList");
$page->setFile("modules/pkgs/pkgs/ajaxPackageList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxBundleList");
$page->setFile("modules/pkgs/pkgs/ajaxBundleList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxAutocompleteSearch");
$page->setFile("modules/pkgs/pkgs/ajaxAutocompleteSearch.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("viewAppstreamUpdates", _T("Appstream Updates list", "pkgs"));
$page->setFile("modules/pkgs/pkgs/viewAppstreamUpdates.php");
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
示例4: Tab
$page->addTab($tab);
$tab = new Tab("tab6", _T("History tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab7", _T("Antivirus tab (GLPI)", 'glpi'));
$page->addTab($tab);
$submod->addPage($page);
$page = new Page("glpitabs", _T("Inventory (GLPI) on machine", "glpi"));
$page->setFile("modules/glpi/glpi/tabs.php");
$page->setOptions(array("visible" => False));
$tab = new Tab("tab0", _T("Summary tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab1", _T("Hardware tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab2", _T("Storage tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab3", _T("Network tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab4", _T("Softwares tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab5", _T("Administrative tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab6", _T("History tab (GLPI)", 'glpi'));
$page->addTab($tab);
$tab = new Tab("tab7", _T("Antivirus tab (GLPI)", 'glpi'));
$page->addTab($tab);
$submod->addPage($page);
$page = new Page("ajaxViewPart");
$page->setFile("modules/glpi/glpi/ajaxViewPart.php", array("AJAX" => True, "visible" => False));
$submod->addPage($page);
unset($submod);
/* groupes dynamiques end */
示例5: Page
$page = new Page("addEntityRule", _T('Add entity rule', 'inventory'));
$page->setFile("modules/inventory/inventory/addEntityRule.php");
$submod->addPage($page);
$page = new Page("deleteEntityRule", _T("Delete entity rule", "inventory"));
$page->setFile("modules/inventory/inventory/deleteEntityRule.php");
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
$page = new Page("EditEntity", _T('Edit Entity', 'inventory'));
$page->setFile("modules/inventory/inventory/EditEntity.php");
$submod->addPage($page);
$page = new Page("deleteEntity", _T('Delete Entity', 'inventory'));
$page->setFile("modules/inventory/inventory/deleteEntity.php");
$submod->addPage($page);
}
$page = new Page("get_file", _("Download inventory of one machine"));
$page->setFile("modules/base/computers/get_file.php");
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
}
/**
* ACL properties
*/
$mod->addACL("jpegPhoto", _("User photo"));
$mod->addACL("uid", _("User login"));
$mod->addACL("sn", _("User name"));
$mod->addACL("givenName", _("User firstname"));
$mod->addACL("homeDir", _("User home directory"));
$mod->addACL("loginShell", _("Login shell"));
$mod->addACL("title", _("User title"));
$mod->addACL("mail", _("Mail address"));
示例6: Page
$submod->setAlias('shares');
$page = new Page("index", _T("SAMBA configuration", "samba"));
$submod->addPage($page);
$page = new Page("restart", _T("restart SAMBA service", "samba"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("reload", _T("Reload SAMBA service", "samba"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
/**
* Declare ACL
*/
$mod->addACL("isSamba", _T("Add/delete SAMBA's attributes", "samba"));
$mod->addACL("isSmbDesactive", _T("Enable/Disable account", "samba"));
$mod->addACL("isSmbLocked", _T("Lock/Unlock account", "samba"));
$mod->addACL("hasProfile", _T("Network profile", "samba"));
$mod->addACL("sambaPwdCanChange", _T("Can change password", "samba"));
$mod->addACL("sambaPwdLastSet", _T("Must change password", "samba"));
$mod->addACL("sambaKickoffTime", _T("Account expiration", "samba"));
$mod->addACL("sambaLogonScript", _T("Logon script", "samba"));
$mod->addACL("sambaHomePath", _T("Home path", "samba"));
$mod->addACL("sambaHomeDrive", _T("Home drive", "samba"));
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
//add status page
$base =& $MMCApp->getModule('base');
$status =& $base->getSubmod('status');
$page = new Page("sambastatus", _T("SAMBA status", "samba"));
$page->setFile("modules/samba/status/index.php");
$status->addPage($page);
示例7: array
$page->setFile("modules/mail/domains/ajaxMailDomainFilter.php", array("AJAX" => True, "visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
$mod->addACL($attrs["maildrop"], _T("Forward to", "mail"));
} else {
$mod->addACL($attrs["maildrop"], _T("Mail drop", "mail"));
}
if (hasVAliasesSupport()) {
$submod = new SubModule("aliases");
$submod->setDescription(_T("Mail", "mail"));
$submod->setImg('modules/mail/graph/img/mail');
$submod->setDefaultPage("mail/aliases/index");
$submod->setVisibility($showAliasesModule);
$submod->setPriority(10);
$page = new Page("index", _T("Virtual aliases", "mail"));
$submod->addPage($page);
$page = new Page("add", _T("Add a virtual alias", "mail"));
$submod->addPage($page);
$page = new Page("edit", _T("Edit a virtual alias", "mail"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("delete", _T("Delete a virtual alias", "mail"));
$page->setFile("modules/mail/aliases/delete.php", array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("ajaxAliasesFilter");
$page->setFile("modules/mail/aliases/ajaxAliasesFilter.php", array("AJAX" => True, "visible" => False));
$submod->addPage($page);
$mod->addSubmod($submod);
}
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
示例8: Page
$page = new Page("servicerestart", _T("Network service restart", "network"));
$page->setOptions(array("noHeader" => True, "visible" => False, "AJAX" => true));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
/* Add DHCP service log viewer */
/* LogView is deprecated ! */
$base =& $MMCApp->getModule("base");
$logview =& $base->getSubmod("logview");
if ($logview) {
$page = new Page("dhcpindex", _T("DHCP service log", "network"));
$page->setFile("modules/network/dhcplogview/index.php", array("expert" => true));
$logview->addPage($page);
$page = new Page("dhcpshow");
$page->setFile("modules/network/dhcplogview/ajax_showlog.php", array("AJAX" => True, "visible" => False));
$logview->addPage($page);
$page = new Page("dhcpsetsearch");
$page->setFile("modules/network/dhcplogview/ajax_setSearch.php", array("AJAX" => True, "visible" => False));
$logview->addPage($page);
/* Add DNS service log viewer */
$page = new Page("dnsindex", _T("DNS service log", "network"));
$page->setFile("modules/network/dnslogview/index.php", array("expert" => true));
$logview->addPage($page);
$page = new Page("dnsshow");
$page->setFile("modules/network/dnslogview/ajax_showlog.php", array("AJAX" => True, "visible" => False));
$logview->addPage($page);
$page = new Page("dnssetsearch");
$page->setFile("modules/network/dnslogview/ajax_setSearch.php", array("AJAX" => True, "visible" => False));
$logview->addPage($page);
}
示例9: Page
$page->setFile("modules/backuppc/backuppc/restoreZip.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("restoreToHost");
$page->setFile("modules/backuppc/backuppc/restoreToHost.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
// AJAX PAGES
$page = new Page('ajaxBackupStatus');
$page->setFile("modules/backuppc/backuppc/ajaxBackupStatus.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxBrowseBackups");
$page->setFile("modules/backuppc/backuppc/ajaxBrowseBackups.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxBrowseShareNames");
$page->setFile("modules/backuppc/backuppc/ajaxBrowseShareNames.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxBrowseFiles");
$page->setFile("modules/backuppc/backuppc/ajaxBrowseFiles.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxFileSearch");
$page->setFile("modules/backuppc/backuppc/ajaxFileSearch.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
示例10: Module
* (at your option) any later version.
*
* MMC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "modules/sshlpk/includes/sshlpk-xmlrpc.php";
$MMCApp =& MMCApp::getInstance();
$mod = new Module("sshlpk");
$mod->setVersion("2.5.89");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("LDAP Public SSH key management", "sshlpk"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(600);
$mod->addACL("showsshkey", _T("Show/Hide SSH key list", "sshlpk"));
$mod->addACL("sshkeylist", _T("Manage SSH keys", "sshlpk"));
$MMCApp->addModule($mod);
/* Add the ssh edit page to the users module */
$page = new Page("sshkeys", _T("Change SSH keys", "sshlpk"));
$page->setFile("modules/sshlpk/keys/edit.php");
$page->setImg("modules/base/graph/access/img/icn_global_active.gif", "modules/base/graph/access/img/icn_global.gif");
if ($_SESSION["login"] == 'root') {
$page->setOptions(array("visible" => False));
}
$base =& $MMCApp->getModule('base');
$users =& $base->getSubmod('users');
$users->addPage($page);
示例11: Module
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* module declaration
*/
require_once "modules/pulse2/version.php";
$mod = new Module("pulse2");
$mod->setVersion(VERSION);
$mod->setRevision(REVISION);
$mod->setDescription(_T("Pulse2", "pulse2"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(700);
/* Get the base module instance */
$base =& $MMCApp->getModule('base');
/* Get the computers sub-module instance */
$submod =& $base->getSubmod('computers');
$page = new Page("computers_list", _T("Computers list", "pulse2"));
$page->setOptions(array("visible" => False));
$page->setFile("modules/pulse2/pulse2/computers_list.php");
$submod->addPage($page);
$page = new Page("select_location", _T("Location selection in computer edit", "pulse2"));
$page->setOptions(array("visible" => False));
$page->setFile("modules/pulse2/includes/select_location.php");
$submod->addPage($page);
unset($submod);
示例12: Page
$page = new Page("edit", _T('Edit a package', 'pkgs'));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("pending", _T('See pending packages', 'pkgs'));
$submod->addPage($page);
$page = new Page("ajaxRefreshPackageTempDir", 'Display Package API Temporary Dir');
$page->setOptions(array("AJAX" => True, "visible" => False, "noHeader" => True));
$submod->addPage($page);
$page = new Page("ajaxGetSuggestedCommand", 'Get suggested command');
$page->setOptions(array("AJAX" => True, "visible" => False, "noHeader" => True));
$submod->addPage($page);
$page = new Page("ajaxDisplayUploadForm", 'Display upload form');
$page->setOptions(array("AJAX" => True, "visible" => False, "noHeader" => True));
$submod->addPage($page);
$page = new Page("rsync", _T("Show mirror status", 'pkgs'));
$page->setFile("modules/pkgs/pkgs/rsync.php", array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("delete", _T("Delete a package", 'pkgs'));
$page->setFile("modules/pkgs/pkgs/remove.php", array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("ajaxPendingPackageList");
$page->setFile("modules/pkgs/pkgs/ajaxPendingPackageList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxPackageList");
$page->setFile("modules/pkgs/pkgs/ajaxPackageList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
示例13: Tab
$tab = new Tab("tab1", _T("Software tab for a computer", "inventory"));
$page->addTab($tab);
$tab = new Tab("tab2", _T("Network tab for a computer", "inventory"));
$page->addTab($tab);
$tab = new Tab("tab3", _T("Controller tab for a computer", "inventory"));
$page->addTab($tab);
$tab = new Tab("tab4", _T("Registry tab for a computer", "inventory"));
$page->addTab($tab);
$submod->addPage($page);
$page = new Page("invdiff", _T("Differences between two inventories", "inventory"));
$page->setFile("modules/inventory/inventory/inventory_diff.php");
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("ajaxEntityList", _T('Entities (ajax)', 'inventory'));
$page->setFile("modules/inventory/inventory/ajaxEntityList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("ajaxEntityRules", _T('Entity rules (ajax)', 'inventory'));
$page->setFile("modules/inventory/inventory/ajaxEntityRules.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$page = new Page("moveRuleUp", _T("Change entity rule order (up)", "inventory"));
$page->setFile("modules/inventory/inventory/moveRuleUp.php");
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
$page = new Page("moveRuleDown", _T("Change entity rule order (down)", "inventory"));
$page->setFile("modules/inventory/inventory/moveRuleDown.php");
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
unset($submod);
}
示例14: Page
$page->setImg("modules/base/graph/access/img/icn_global_active.gif", "modules/base/graph/access/img/icn_global.gif");
$page->setFile("modules/ppolicy/default/index.php");
$users->addPage($page);
$page = new Page("addppolicy", _T("Add a password policy", "ppolicy"));
$page->setImg("modules/base/graph/access/img/icn_global_active.gif", "modules/base/graph/access/img/icn_global.gif");
$page->setFile("modules/ppolicy/default/add.php");
$users->addPage($page);
$page = new Page("editppolicy", _T("Edit a password policy", "ppolicy"));
$page->setFile("modules/ppolicy/default/edit.php");
$page->setOptions(array("visible" => False));
$users->addPage($page);
$page = new Page("deleteppolicy", _T("Delete a password policy", "ppolicy"));
$page->setFile("modules/ppolicy/default/delete.php", array("noHeader" => True, "visible" => False));
$users->addPage($page);
$page = new Page("ajaxPPoliciesFilter");
$page->setFile("modules/ppolicy/default/ajaxPPoliciesFilter.php", array("AJAX" => True, "visible" => False));
$users->addPage($page);
/* Declare variable to will can set hiden it */
$ppolicyattr = getPPolicyAttributesKeys();
foreach ($ppolicyattr as $key => $info) {
// separate right between Global Password Policies Attributes from User PPolicy Attributes
$mod->addACL('g' . $key, _T("Default " . $info[0], "ppolicy"));
}
$mod->addACL("ppolicyactivated", _T("Enable user specific password policy", "ppolicy"));
foreach ($ppolicyattr as $key => $info) {
// foreach the list of Supported Attributes
$mod->addACL($key, _T($info[0], "ppolicy"));
}
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);
/* You should unset the references when you finished using them */
示例15: Page
$submod->setPriority(3);
$page = new Page("index", _("Computer list"));
$submod->addPage($page);
$page = new Page("add", _("Add computer"));
if (!canAddComputer()) {
$page->setOptions(array("visible" => False));
}
$submod->addPage($page);
$page = new Page("edit", _("Edit computer"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("delete", _("Delete a computer"));
$page->setFile("modules/base/computers/delete.php", array("noHeader" => True, "visible" => False));
$submod->addPage($page);
$page = new Page("ajaxComputersList", _("Ajax part of computers list"));
$page->setFile("modules/base/computers/ajaxComputersList.php");
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
}
/**
* ACL properties
*/
$mod->addACL("jpegPhoto", _("User photo"));
$mod->addACL("uid", _("User login"));
$mod->addACL("sn", _("User name"));
$mod->addACL("givenName", _("User firstname"));
$mod->addACL("homeDir", _("User home directory"));
$mod->addACL("loginShell", _("Login shell"));
$mod->addACL("title", _("User title"));
$mod->addACL("mail", _("Mail address"));