本文整理汇总了PHP中Table::addRowColumns方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::addRowColumns方法的具体用法?PHP Table::addRowColumns怎么用?PHP Table::addRowColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::addRowColumns方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Load
public function Load()
{
parent::$PAGE_TITLE = __(CONFIGURE_BANNED_VISITORS);
if (!defined('MAX_BAD_URL_BEFORE_BANNED')) {
define("MAX_BAD_URL_BEFORE_BANNED", 4);
}
$this->array_wsp_banned_users = WspBannedVisitors::getBannedVisitors();
$this->table_ban = new Table();
$this->table_ban->setId("table_ban")->activateAdvanceTable()->activatePagination()->activateSort(2, "desc")->setWidth(500);
$this->table_ban->addRowColumns("IP", __(LAST_ACCESS), __(DURATION), __(AUTHORIZE))->setHeaderClass(0);
$ban_vistors_obj = new Object("<br/><br/>", $this->table_ban, "<br/><br/>");
$ban_ip_table = new Table();
$form = new Form($this);
$this->ip_edt = new TextBox($form);
$validation = new LiveValidation();
$validation->addValidatePresence();
$this->ip_edt->setLiveValidation($validation);
$this->duration_edt = new TextBox($form);
$this->duration_edt->setValue(0);
$validation = new LiveValidation();
$validation->addValidatePresence()->addValidateNumericality(true);
$this->duration_edt->setLiveValidation($validation);
$ip_btn = new Button($form);
$ip_btn->setValue(__(BAN_IP))->onClick("onBannedIP")->setAjaxEvent();
$ban_ip_table->addRowColumns("IP : ", $this->ip_edt);
$ban_ip_table->addRowColumns(__(DURATION) . " : ", $this->duration_edt);
$form->setContent(new Object($ban_ip_table, $ip_btn));
$ban_vistors_obj->add($form, "<br/><br/>");
$this->render = new AdminTemplateForm($this, $ban_vistors_obj);
}
示例2: Load
public function Load()
{
parent::$PAGE_TITLE = __(CHANGE_PASSWD);
$form = new Form($this, "Form_change_passwd");
if (extension_loaded('openssl')) {
//$form->setEncryptObject(new EncryptDataWspObject("change wsp password", 2048));
}
$table = new Table();
$table->addRow();
$this->edt_old_passwd = new Password($form, "wsp_old_password");
$this->edt_old_passwd->setFocus();
$live_validation = new LiveValidation();
$live_validation->addValidatePresence()->setFieldName(__(OLD_PASSWD));
$table->addRowColumns(__(OLD_PASSWD) . " : ", $this->edt_old_passwd->setLiveValidation($live_validation))->setStyle("color:black;");
$this->edt_new_passwd = new Password($form, "wsp_new_password");
$live_validation = new LiveValidation();
$live_validation->addValidatePresence()->setFieldName(__(NEW_PASSWD));
$table->addRowColumns(__(NEW_PASSWD) . " : ", $this->edt_new_passwd->setLiveValidation($live_validation))->setStyle("color:black;");
$this->edt_confirm_passwd = new Password($form, "wsp_confirm_password");
$live_validation = new LiveValidation();
$live_validation->addValidatePresence()->setFieldName(__(CONFIRM_PASSWD));
$live_validation->addValidateConfirmation("wsp_new_password");
$table->addRowColumns(__(CONFIRM_PASSWD) . " : ", $this->edt_confirm_passwd->setLiveValidation($live_validation))->setStyle("color:black;");
$table->addRow();
$this->validate_btn = new Button($form);
$this->validate_btn->setValue(__(CHANGE_PASSWD))->onClick("onChangePasswd")->setAjaxEvent();
$table->addRow($this->validate_btn)->setColspan(2)->setAlign(RowTable::ALIGN_CENTER);
$table->addRow();
$form->setContent($table);
$table = new Table();
$table->setWidth("100%");
$table->addRow($form, RowTable::ALIGN_CENTER);
$this->render = $table;
}
示例3: Load
public function Load()
{
require_once dirname(__FILE__) . "/includes/utils-unset-var.inc.php";
if (!$this->isAjaxPage()) {
unsetWspAdminVariables();
}
parent::$PAGE_TITLE = __(CONNECT_PAGE_TITLE);
$this->setUserRights("");
// Welcome message
$this->render = new Table();
$this->render->setWidth("100%");
$connect_box = new RoundBox(RoundBox::STYLE_SECOND, "connect_box", 420, 150);
$connect_box->setShadow(true);
$connect_box->setValign(RoundBox::VALIGN_CENTER);
$connect_table = new Table();
$connect_table->setWidth("100%")->setDefaultAlign(RowTable::ALIGN_LEFT);
$admin_pic = new Picture("img/wsp-admin/admin_128.png", 128, 128);
$this->auth_obj = new Authentication($this, "connect");
$this->auth_obj->setTableWidth(265);
$connect_table->addRowColumns($admin_pic, $this->auth_obj);
$connect_box->setContent($connect_table);
$this->render->addRow("<br/><br/><br/><br/><br/>");
$this->obj_br_before = new Object();
$this->obj_br_before->setId("divBrBefore");
$this->render->addRow($this->obj_br_before);
$this->mod_obj = new Object();
$this->mod_obj->setId("divConfigRecommandation")->setWidth(400);
$this->render->addRow($this->mod_obj);
$this->render->addRow("");
$this->render->addRow($connect_box, RowTable::ALIGN_CENTER, RowTable::VALIGN_CENTER);
$this->render->addRow("<br/>");
}
示例4: NewException
/**
* Constructor ContactForm
* @param Page $page_object
* @param string $send_method
* @param string $table_style
*/
function __construct($page_object, $send_method, $table_style = '')
{
parent::__construct();
if (!isset($page_object) || !isset($send_method)) {
throw new NewException("2 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
}
if (gettype($page_object) != "object" || !is_subclass_of($page_object, "Page")) {
throw new NewException("Argument page_object for " . get_class($this) . "::__construct() error", 0, getDebugBacktrace(1));
}
$this->page_object = $page_object;
$this->mail_to = SMTP_MAIL;
$this->mail_to_name = SMTP_NAME;
$table_main = new Table();
$table_main->setClass($table_style);
$form = new Form($this->page_object);
$name = new TextBox($form, "contact_name");
$name_validation = new LiveValidation();
$name->setLiveValidation($name_validation->addValidatePresence()->setFieldName(__(CONTACTFORM_NAME)));
$table_main->addRowColumns(__(CONTACTFORM_NAME) . ": ", $name->setFocus())->setColumnWidth(2, "100%");
$email = new TextBox($form, "contact_email");
$email_validation = new LiveValidation();
$email->setLiveValidation($email_validation->addValidateEmail()->addValidatePresence()->setFieldName(__(CONTACTFORM_EMAIL)));
$table_main->addRowColumns(__(CONTACTFORM_EMAIL) . ": ", $email);
$subject = new TextBox($form, "contact_subject");
$subject_validation = new LiveValidation();
$subject->setLiveValidation($subject_validation->addValidatePresence()->setFieldName(__(CONTACTFORM_SUBJECT)));
$table_main->addRowColumns(__(CONTACTFORM_SUBJECT) . ": ", $subject);
$table_main->addRow();
$editor = new Editor($form, "contact_message");
$editor_validation = new LiveValidation();
$editor->setLiveValidation($editor_validation->addValidatePresence()->setFieldName(__(CONTACTFORM_MESSAGE)));
$editor->setToolbar(Editor::TOOLBAR_SIMPLE);
$table_main->addRow(new Object(__(CONTACTFORM_MESSAGE) . ": ", "<br/>", $editor))->setColspan(3)->setAlign(RowTable::ALIGN_LEFT);
$table_main->addRow();
$this->captcha = new Captcha($form, "contact_captcha");
$table_main->addRow($this->captcha)->setColspan(3);
$table_main->addRow();
$this->send_button = new Button($form, "contact_send", "", __(CONTACTFORM_SEND));
$this->send_button->assignEnterKey()->onClick($send_method)->setAjaxEvent();
$table_main->addRow($this->send_button)->setColspan(3);
$table_main->addRow();
$form->setContent($table_main);
$this->render = $form;
}
示例5: Load
public function Load()
{
parent::$PAGE_TITLE = __(CONFIGURE_MODULES);
$config_modules_obj = new Object();
$construction_page = new Object(__(PAGE_IN_CONSTRUCTION));
$construction_page->setClass("warning");
$config_modules_obj->add($construction_page);
$config_modules_obj->add("<br/>", __(PRESENTATION), "<br/><br/>");
$sort_event_install = new SortableEvent($this);
$sort_event_install->onSort("onChangeModule")->setAjaxEvent()->disableAjaxWaitMessage();
$this->list_install_modules_obj = new Object();
$this->list_install_modules_obj->setId("list_install_modules");
$this->list_install_modules_obj->setSortable(true, $sort_event_install);
$list_all_install_modules_obj = new Object();
$module_style = "cursor:pointer;width:100px;border:1px solid gray;padding:2px;margin:2px;";
$array_active_modules = array();
$module_file = new File(dirname(__FILE__) . "/../../../wsp/config/modules.cnf");
while (($line = $module_file->read_line()) != false) {
if (trim($line) != "") {
$array_active_modules[] = trim($line);
$module_obj = new Object(trim($line));
$module_obj->setId("module_" . str_replace("-", "_", trim($line)))->forceDivTag();
if (trim($line) != "Authentication") {
$module_obj->setStyle($module_style);
$module_obj->setDraggable(true, false, null, true);
$this->list_install_modules_obj->add($module_obj);
} else {
$module_obj->setStyle($module_style . "cursor:none;");
$list_all_install_modules_obj->add($module_obj);
}
}
}
$module_file->close();
$list_all_install_modules_obj->add($this->list_install_modules_obj);
$sort_event = new SortableEvent($this);
$sort_event->onSort("onChangeModule")->setAjaxEvent()->disableAjaxWaitMessage();
$this->list_modules_obj = new Object();
$this->list_modules_obj->setId("list_modules");
$this->list_modules_obj->setSortable(true, $sort_event);
$folder = dirname(__FILE__) . "/../../../wsp/class/modules";
$array_module_dir = scandir($folder);
for ($i = 0; $i < sizeof($array_module_dir); $i++) {
if (is_dir($folder . "/" . $array_module_dir[$i]) && !in_array($array_module_dir[$i], $array_active_modules) && $array_module_dir[$i] != "." && $array_module_dir[$i] != ".." && $array_module_dir[$i] != ".svn") {
$module_obj = new Object($array_module_dir[$i]);
$module_obj->setId("module_" . str_replace("-", "_", $array_module_dir[$i]))->forceDivTag();
$module_obj->setDraggable(true, false, null, true)->setStyle($module_style);
$this->list_modules_obj->add($module_obj);
}
}
$config_table = new Table();
$config_table->setWidth(400)->setDefaultAlign(RowTable::ALIGN_CENTER);
$config_table->setDefaultValign(RowTable::VALIGN_TOP);
$config_table->addRowColumns(new Object(new Label(__(ALL_MODULES), true), "<br/>", $this->list_modules_obj), " ", new Object(new Label(__(INSTALLED_MODULES), true), "<br/>", $list_all_install_modules_obj));
$config_modules_obj->add($config_table, "<br/><br/>");
$this->render = new AdminTemplateForm($this, $config_modules_obj);
}
示例6: Load
public function Load()
{
parent::$PAGE_TITLE = __(CONFIGURE_SMTP);
// Admin
$form = new Form($this);
$table_form = new Table();
$table_form->addRow();
$this->edtHost = new TextBox($form);
$this->edtHost->setValue(SMTP_HOST);
$edtHostValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_HOST) . ": ", $this->edtHost->setLiveValidation($edtHostValidation->addValidatePresence()->setFieldName(__(EDT_HOST))), " (ssl://smtp.gmail.com)");
$this->edtPort = new TextBox($form);
$this->edtPort->setValue(SMTP_PORT);
$edtPortValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_PORT) . ": ", $this->edtPort->setLiveValidation($edtPortValidation->addValidateNumericality(true)->setFieldName(__(EDT_PORT))), " (465)");
$this->edtName = new TextBox($form);
$this->edtName->setValue(utf8encode(SMTP_NAME));
$edtNameValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_NAME) . ": ", $this->edtName->setLiveValidation($edtNameValidation->addValidatePresence()->setFieldName(__(EDT_NAME))), " (Robert Francis)");
$this->edtMail = new TextBox($form);
$this->edtMail->setValue(SMTP_MAIL);
$edtMailValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_MAIL) . ": ", $this->edtMail->setLiveValidation($edtMailValidation->addValidatePresence()->addValidateEmail()->setFieldName(__(EDT_MAIL))), " (robert.francis@gmail.com)");
$this->cmbAuth = new ComboBox($form);
$this->cmbAuth->addItem("false", __(DESACTIVATE), SMTP_AUTH == false ? true : false)->addItem("true", __(ACTIVATE), SMTP_AUTH == true ? true : false)->setWidth(143)->onChange("changeCmbAuth")->setAjaxEvent()->disableAjaxWaitMessage();
$table_form->addRowColumns(__(CMB_AUTH) . ": ", $this->cmbAuth, " (" . __(ACTIVATE) . ")");
$this->edtUser = new TextBox($form);
$this->edtUser->setValue(SMTP_USER);
if (SMTP_AUTH == false) {
$this->edtUser->disable();
}
$table_form->addRowColumns(__(EDT_USER) . ": ", $this->edtUser, " (robert.francis@gmail.com)");
$this->edtPassword = new Password($form);
$this->edtPassword->setValue(SMTP_PASS);
if (SMTP_AUTH == false) {
$this->edtPassword->disable();
}
$table_form->addRowColumns(__(EDT_PASS) . ": ", $this->edtPassword, " (*********)");
$table_form->addRow();
$btnValidate = new Button($form);
$btnValidate->setValue(__(BTN_VALIDATE))->onClick("configureSmtp")->setAjaxEvent();
$table_form->addRowColumns($btnValidate)->setColumnColspan(1, 3)->setColumnAlign(1, RowTable::ALIGN_CENTER);
$table_form->addRow();
$form->setContent($table_form);
$this->render = new AdminTemplateForm($this, $form);
}
示例7: Load
public function Load()
{
$dialog_update = new DialogBox(__(UPDATE_FRAMEWORK), new Url($this->getBaseLanguageURL() . "wsp-admin/update/update-framework.call?update=" . $_GET['update'] . "&parent_dialog_level=" . DialogBox::getCurrentDialogBoxLevel()));
$dialog_update->displayFormURL()->modal();
$button_yes = new Button($this);
$button_yes->onClickJs($dialog_update->render())->setValue(__(UPDATE_FRAMEWORK_YES));
$button_no = new Button($this);
$button_no->onClickJs(DialogBox::closeAll())->setValue(__(UPDATE_FRAMEWORK_NO));
$table_yes_no = new Table();
$table_yes_no->addRowColumns($button_yes, " ", $button_no);
if ($_GET['update'] == "update-wsp") {
$warning_lbl = new Label(__(UPDATE_FRAMEWORK_WSP_WARNING));
$warning_lbl->setColor("red")->setItalic();
$this->render = new Object(__(UPDATE_FRAMEWORK_CONFIRM, $_GET['text']), "<br/><br/>", $warning_lbl, "<br/><br/>", $table_yes_no);
} else {
$this->render = new Object(__(UPDATE_FRAMEWORK_CONFIRM, $_GET['text']), "<br/><br/>", $table_yes_no);
}
$this->render->setAlign(Object::ALIGN_CENTER);
}
示例8: Load
public function Load()
{
if (defined('SEND_ERROR_BY_MAIL') && SEND_ERROR_BY_MAIL == true && !isLocalDebug()) {
if ($this->is_trace) {
// standard msg "administrator is notified"
parent::$PAGE_TITLE = __(ERROR) . " - " . __(SITE_NAME);
$box_title = __(ERROR);
$debug_msg = __(ERROR_DEBUG_MAIL_SENT);
} else {
// no trace in the debug information
parent::$PAGE_TITLE = "Debug error - " . __(SITE_NAME);
$box_title = "Debug error";
$debug_msg = $_POST['debug'];
}
} else {
parent::$PAGE_TITLE = "Debug error - " . __(SITE_NAME);
$box_title = "Debug error";
$debug_msg = $_POST['debug'];
}
$error_title_table = new Table();
$error_title_table->addRowColumns(new Picture("wsp/img/warning.png", 48, 48, 0, "absmidlle"), " ", new Label(__(ERROR), true));
$obj_error_msg = new Object($error_title_table, "<br/>");
$debug_obj = new Object(utf8encode($debug_msg));
$debug_obj->setAlign(Object::ALIGN_LEFT);
$debug_obj->setWidth("80%");
$obj_error_msg->add($debug_obj, "<br/><br/>");
if ($GLOBALS['__AJAX_LOAD_PAGE__'] == false) {
$obj_error_msg->add("<a href=\"" . $_GET['from_url'] . "\">Refresh this page</a>", "<br/><br/>");
}
$obj_error_msg->add("<b>Consult <a href=\"http://www.php.net\" target=\"_blank\">PHP</a> or <a href=\"http://www.website-php.com\" target=\"_blank\">WebSite-PHP</a> documentations.</b>", "<br/>");
$obj_error_msg->add("<br/><br/>", "Go back to the main page", new Link(BASE_URL, Link::TARGET_NONE, __(SITE_NAME)));
$this->render = new ErrorTemplate($obj_error_msg, $box_title);
if (trim($_POST['debug']) != "") {
$cache_filename = "";
if (isset($_POST['cache_filename']) && trim($_POST['cache_filename']) != "") {
$cache_filename = $this->getRealCacheFileName($_POST['cache_filename']);
if (!file_exists($cache_filename)) {
$cache_filename = "";
}
}
NewException::sendErrorByMail($_POST['debug'], $cache_filename);
}
}
示例9: Load
public function Load()
{
parent::$PAGE_TITLE = __(HOME_PAGE_TITLE);
// Welcome message
$small_img = new Picture("img/logo_16x16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE);
$title_header = new Object($small_img, __(WELCOME));
$welcome_box = new Box($title_header, true, Box::STYLE_SECOND, Box::STYLE_SECOND, "", "welcome_box", 600);
$welcome_obj = new Object(__(WELCOME_MSG));
list($strAdminLogin, $strAdminPasswd, $strAdminRights) = getWspUserRightsInfo("admin");
$quickstart_obj = new Object(new Picture("img/quickstart_128.png", 64, 64), "<br/>", __(QUICKSTART));
$quickstart_link = new Link("http://www.website-php.com/" . $this->getLanguage() . "/quick-start.html", Link::TARGET_BLANK, $quickstart_obj);
$quickstart_box = new RoundBox(3, "quickstart_box", 120, 120);
$quickstart_box->setValign(RoundBox::VALIGN_CENTER);
$quickstart_box->setContent($quickstart_link);
$tutorial_obj = new Object(new Picture("img/tutorials_128.png", 64, 64), "<br/>", __(TUTORIALS));
$tutorial_link = new Link("http://www.website-php.com/" . $this->getLanguage() . "/tutorials.html", Link::TARGET_BLANK, $tutorial_obj);
$tutorial_box = new RoundBox(3, "tutorial_box", 120, 120);
$tutorial_box->setValign(RoundBox::VALIGN_CENTER);
$tutorial_box->setContent($tutorial_link);
$connect_obj = new Object(new Picture("img/wsp-admin/admin_128.png", 64, 64), "<br/>", __(CONNECT));
$connect_link = new Link("wsp-admin/connect.html", Link::TARGET_BLANK, $connect_obj);
$connect_box = new RoundBox(3, "connect_box", 120, 120);
$connect_box->setValign(RoundBox::VALIGN_CENTER);
$connect_box->setContent($connect_link);
$icon_table = new Table();
$icon_table->setDefaultAlign(RowTable::ALIGN_CENTER)->setDefaultValign(RowTable::VALIGN_TOP);
$icon_row = $icon_table->addRowColumns($quickstart_box, " ", $tutorial_box, " ", $connect_box);
$icon_row->setColumnWidth(5, 120);
if ($strAdminLogin == "admin" && $strAdminPasswd == sha1("admin")) {
$finalize = new Font(__(FINALIZE_INSTALL));
$finalize->setFontColor("red");
$finalize->setFontWeight(Font::FONT_WEIGHT_BOLD);
$welcome_obj->add("<br/>", $finalize, "<br/>", __(CONNECT_DEFAULT_PASSWD), "<br/>");
}
$welcome_obj->add("<br/>", $icon_table);
$welcome_box->setContent($welcome_obj);
// Footer
$this->render = new Template($welcome_box);
}
示例10: Load
//.........这里部分代码省略.........
$tree_folder = new TreeViewFolder($folder);
if ($expand) {
$tree_folder->expand();
} else {
$tree_folder->collapse();
}
$tree_items->add($tree_folder);
$parent_tree_items = new TreeViewItems();
$tree_folder->setTreeViewItems($parent_tree_items);
$array_folder[$folder] = $parent_tree_items;
}
}
$file_link = new Button($this->form);
$file_name_label = new Label($file_name);
$file_name_label->setId("file_label_" . str_replace("/", "_slashsep_", str_replace(".", "_", str_replace("-", "_", $file))));
$this->array_files_label[$file] = $file_name_label;
$file_link->setValue($file_name_label)->setIsLink();
$file_link->onClick("loadTranslation", $file, $this->hdn_old_file, $_GET['language'], 1)->setAjaxEvent();
$tree_file = new TreeViewFile($file_link);
$parent_tree_items->add($tree_file);
}
$tree_page_type->setTreeViewItems($tree_items);
}
$root->setTreeViewItems($tree_page_items);
$root_items = new TreeViewItems();
$root_items->add($root);
$tree->setTreeViewItems($root_items);
$language_selector = new Object();
$array_lang_dir = scandir($this->getRootWspDirectory() . "/lang", 0);
for ($i = 0; $i < sizeof($array_lang_dir); $i++) {
if (is_dir($this->getRootWspDirectory() . "/lang/" . $array_lang_dir[$i]) && $array_lang_dir[$i] != "" && $array_lang_dir[$i] != "." && $array_lang_dir[$i] != ".." && $array_lang_dir[$i] != ".svn" && strlen($array_lang_dir[$i]) == 2) {
$lang_link = $this->getCurrentURLWithoutParameters() . "?language=" . $array_lang_dir[$i];
$language_link = new Link($lang_link, Link::TARGET_NONE, new Picture("wsp/img/lang/" . $array_lang_dir[$i] . ".png", 24, 24, 0, Picture::ALIGN_ABSMIDDLE));
if ($array_lang_dir[$i] == $_GET['language']) {
$language_link->setStyle("border:1px solid red;padding-bottom: 4px;");
}
$language_link->setId("lang_link_" . $array_lang_dir[$i]);
$this->array_lang_link[] = $language_link;
$language_selector->add($language_link);
}
}
$lang_tree_obj = new Object($language_selector, "<br/>");
$tree_obj = new Object($tree);
$tree_obj->setAlign(Object::ALIGN_LEFT)->setWidth(200)->setHeight(608)->setMaxHeight(608);
$lang_tree_obj->add($tree_obj);
// create translate area with all translation labels and sortable
$this->translate_area = new Object();
$this->translate_area->setWidth(600)->setHeight(620)->setStyle("border:1px solid gray;overflow:auto;padding:5px;");
$this->translate_area->emptyObject()->setId("translate_area");
$this->sort_label_event = new SortableEvent($this->form);
$this->sort_label_event->onSort("onSort", "");
$this->sort_label_event->setAjaxEvent()->disableAjaxWaitMessage();
$this->translate_area->setSortable(true, $this->sort_label_event);
$translate_table->addRowColumns($lang_tree_obj, $this->translate_area);
$translate_table->addRow();
$this->btn_save = new Button($this->form);
$this->btn_save->setValue(__(BTN_SAVE))->onClick("save", "")->setAjaxEvent();
$this->btn_save->forceSpanTag();
if (Page::getInstance("wsp-admin/manage/manage-pages")->userHaveRights()) {
$this->btn_page = new Button($this);
$this->btn_page->setValue(__(BTN_PHP_PAGE))->forceSpanTag()->disable();
}
$this->btn_add_label = new Button($this);
$this->btn_add_label->setValue(__(ADD_LABEL))->onClick("addLabel", "")->setAjaxEvent();
$this->btn_add_label->forceSpanTag();
$translate_table->addRow(new Object($this->btn_page, " ", $this->btn_add_label, " ", $this->btn_save))->setColspan(2);
$translate_table->addRow();
$this->form->setContent($translate_table);
// Create a link to the page
// TODO
$this->render = new AdminTemplateForm($this, $content->add($this->form));
if ($this->btn_save->isClicked() || $this->sort_label_event->isSorted() || $this->btn_add_label->isClicked()) {
// do nothing, translation load is done by the callback function
} else {
if (isset($_GET['file'])) {
$this->loadTranslation(null, $_GET['file'], "", $_GET['language']);
if (isset($_GET['saved'])) {
alert(__(FILE_SAVED, $_GET['file']));
}
} else {
if (!$this->isAjaxPage()) {
$this->loadTranslation(null, "all.inc.php", "", $_GET['language']);
}
}
}
// Create addLabel form
$this->form_add_label = new Form($this);
$this->form_add_label->setAction($this->getCurrentURLWithoutParameters() . "?language=" . $_GET['language']);
$table_add_label = new Table();
$this->add_label_label_name = new TextBox($this->form_add_label, "add_label_label_name");
$this->add_label_label_name->setWidth(200);
$table_add_label->addRowColumns(__(LABEL_NAME) . ": ", $this->add_label_label_name);
$this->add_label_label_value = new TextArea($this->form_add_label, "add_label_label_value");
$this->add_label_label_value->setAutoHeight()->setWidth(200);
$table_add_label->addRowColumns(__(LABEL_VALUE) . ": ", $this->add_label_label_value);
$this->btn_create_label = new Button($this->form_add_label, "btn_create_label");
$this->btn_create_label->setValue(__(ADD_LABEL))->setAjaxEvent();
$table_add_label->addRowColumns($this->btn_create_label)->setColspan(2)->setAlign(RowTable::ALIGN_CENTER);
$this->form_add_label->setContent($table_add_label);
}
示例11: Loaded
public function Loaded()
{
$users_table = new Table();
$users_table->setId("users_table")->activateAdvanceTable()->activateSort(1)->setWidth(400);
$users_table->addRowColumns(__(LOGIN), __(RIGHTS), __(MODIFY), __(DELETE))->setHeaderClass(0);
$this->old_passwd_row->hide();
$this->validate_btn->show();
$this->modify_btn->hide();
$this->cancel_btn->hide();
$is_modify_mode = false;
$array_users = getAllWspUsers();
for ($i = 0; $i < sizeof($array_users); $i++) {
$edit_user = new Picture("img/wsp-admin/edit_16.png", 16, 16);
$edit_user->onClick($this, "refresh")->setAjaxEvent()->disableAjaxWaitMessage();
if ($edit_user->isClicked() && !$is_modify_mode) {
$this->old_passwd_row->show();
$this->validate_btn->hide();
$this->modify_btn->show();
$this->cancel_btn->show();
$this->edt_login->setValue($array_users[$i]['login']);
$this->edt_old_password->forceEmpty();
$this->edt_password->forceEmpty();
$this->edt_confirm_passwd->forceEmpty();
$is_modify_mode = true;
}
if ($array_users[$i]['login'] == $_SESSION['wsp-login']) {
$del_user = new Object();
} else {
$del_user = new Picture("img/wsp-admin/delete_16.png", 16, 16);
$del_user->setId("user_" . $array_users[$i]['login']);
$del_user->onClickJs("if (!confirm('" . __(DEL_CONFIRM) . "')) { return false; }");
$del_user->onClick($this, "removeWspUser", $array_users[$i]['login'])->setAjaxEvent();
if ($del_user->isClicked()) {
continue;
}
}
$users_table->addRowColumns($array_users[$i]['login'], $array_users[$i]['rights'], $edit_user, $del_user)->setColumnAlign(3, RowTable::ALIGN_CENTER)->setColumnAlign(4, RowTable::ALIGN_CENTER);
}
$this->users_table_obj->add($users_table);
}
示例12: Table
function __construct($page_object, $content, $right_side_content = null)
{
parent::__construct();
$page_object->includeJsAndCssFromObjectToPage("LiveValidation");
$this->render = new Table();
$this->render->setWidth("100%");
$this->render->setDefaultAlign(RowTable::ALIGN_CENTER);
$table = new Table();
$table->setWidth("800");
$table->setDefaultAlign(RowTable::ALIGN_LEFT);
// search parent link and current page icon, name
$pathway = "";
$page_icon_16 = "";
$wsp_admin_url = WSP_ADMIN_URL;
$array_menu = xml2array(file_get_contents(dirname(__FILE__) . "/../menu.xml"));
foreach ($array_menu['MenuItems']['MenuItem'] as $menuitems) {
if (find($menuitems['Menu_attr']['name'], "__(", 0, 0) > 0) {
eval("\$page_title = " . $menuitems['Menu_attr']['name'] . ";");
} else {
eval("\$page_title = \"" . $menuitems['Menu_attr']['name'] . "\";");
}
eval("\$page_link = \"" . $menuitems['Menu_attr']['url'] . "\";");
if (!isset($menuitems['MenuItems']['MenuItem'][0])) {
$sub_menuitems = $menuitems['MenuItems'];
} else {
$sub_menuitems = $menuitems['MenuItems']['MenuItem'];
}
foreach ($sub_menuitems as $menuitem) {
eval("\$sub_page_link = \"" . $menuitem['Menu_attr']['url'] . "\";");
if ($sub_page_link == $_GET['p'] . ".html") {
eval("\$page_icon_16 = \"" . $menuitem['Menu_attr']['icon_16'] . "\";");
if (find($menuitem['Menu_attr']['name'], "__(", 0, 0) > 0) {
eval("\$sub_page_title = " . $menuitem['Menu_attr']['name'] . ";");
} else {
eval("\$sub_page_title = \"" . $menuitem['Menu_attr']['name'] . "\";");
}
$pathway = new Object(new Link($page_link, Link::TARGET_NONE, $page_title), " > ", $sub_page_title);
break;
}
}
if ($pathway != "") {
break;
}
}
// Header
$logo_pic = new Picture("img/wsp-admin/logo_60x160_" . $_SESSION['lang'] . ".png", 60, 160, 0);
$table->addRowColumns(new AdminMenu($page_object, $array_menu), new Link("http://www.website-php.com", Link::TARGET_BLANK, $logo_pic))->setColumnAlign(2, RowTable::ALIGN_RIGHT);
// check WSP version
$alert_version_obj = getAlertVersiobObject($page_object);
if ($alert_version_obj != null) {
$table->addRowColumns($alert_version_obj)->setColspan(2);
}
// Main
$small_img = new Picture($page_icon_16, 16, 16, 0, Picture::ALIGN_ABSMIDDLE);
$title_header = new Object($small_img);
$title_header->add(new Object(new Link("wsp-admin/admin.html", Link::TARGET_NONE, __(ADMIN)), " > ", $pathway));
$box_width = 800;
if ($right_side_content != null) {
$box_width = 700;
}
$configure_box = new Box($title_header, true, Box::STYLE_SECOND, Box::STYLE_SECOND, "", "configure_database_box", $box_width);
$configure_box->setContent($content);
if ($right_side_content != null) {
$table->addRowColumns($configure_box, " ", $right_side_content)->setColumnColspan(1, 2)->setColumnWidth(1, $box_width)->setColumnWidth(2, 10);
} else {
$table->addRow($configure_box)->setColspan(2);
}
$this->render->addRow($table);
$this->render->addRow(__(CURRENT_WSP_VERSION, getCurrentWspVersion()));
}
示例13: foreach
function __construct($page_object, $menu_url)
{
parent::__construct();
$wsp_admin_url = WSP_ADMIN_URL;
$array_menu = xml2array(file_get_contents(dirname(__FILE__) . "/../menu.xml"));
foreach ($array_menu['MenuItems']['MenuItem'] as $menuitems) {
if ($menuitems['Menu_attr']['url'] == "\$wsp_admin_url/" . $menu_url) {
eval("\$icon_16 = \"" . $menuitems['Menu_attr']['icon_16'] . "\";");
if (find($menuitems['Menu_attr']['name'], "__(", 0, 0) > 0) {
eval("\$page_title = " . $menuitems['Menu_attr']['name'] . ";");
} else {
eval("\$page_title = \"" . $menuitems['Menu_attr']['name'] . "\";");
}
if ($menuitems['Menu_attr']['url'] == "\$wsp_admin_url/admin.html") {
$menuitems = $array_menu;
}
if (!isset($menuitems['MenuItems']['MenuItem'][0])) {
$sub_menuitems = $menuitems['MenuItems'];
} else {
$sub_menuitems = $menuitems['MenuItems']['MenuItem'];
}
foreach ($sub_menuitems as $menuitem) {
if ($menuitem['Menu_attr']['url'] != "\$wsp_admin_url/admin.html") {
eval("\$sub_page_icon_64 = \"" . $menuitem['Menu_attr']['icon_64'] . "\";");
if (find($menuitem['Menu_attr']['name'], "__(", 0, 0) > 0) {
eval("\$sub_page_title = " . $menuitem['Menu_attr']['name'] . ";");
} else {
eval("\$sub_page_title = \"" . $menuitem['Menu_attr']['name'] . "\";");
}
eval("\$sub_page_link = \"" . $menuitem['Menu_attr']['url'] . "\";");
$this->addLink($sub_page_icon_64, $sub_page_title, $sub_page_link);
}
}
break;
}
}
if ($page_title == "" && $icon_16 == "") {
throw new NewException("Administration page doesn't exists", 0, getDebugBacktrace(1));
}
$this->render = new Table();
$this->render->setWidth("100%");
$this->render->setDefaultAlign(RowTable::ALIGN_CENTER);
$table = new Table();
$table->setWidth("800");
$table->setDefaultAlign(RowTable::ALIGN_LEFT);
// Header
$logo_pic = new Picture("img/wsp-admin/logo_60x160_" . $_SESSION['lang'] . ".png", 60, 160, 0);
$table->addRowColumns(new AdminMenu($page_object, $array_menu), new Link("http://www.website-php.com", Link::TARGET_BLANK, $logo_pic))->setColumnAlign(2, RowTable::ALIGN_RIGHT);
// check WSP version
$alert_version_obj = getAlertVersiobObject($page_object);
if ($alert_version_obj != null) {
$table->addRowColumns($alert_version_obj)->setColspan(2);
}
// Main
$small_img = new Picture($icon_16, 16, 16, 0, Picture::ALIGN_ABSMIDDLE);
$title_header = new Object($small_img);
if ($page_title == __(ADMIN)) {
$title_header->add($page_title);
} else {
$title_header->add(new Object(new Link(WSP_ADMIN_URL . "/admin.html", Link::TARGET_NONE, __(ADMIN)), " > ", $page_title));
}
$admin_box = new Box($title_header, true, Box::STYLE_SECOND, Box::STYLE_SECOND, "", "admin_box", 800);
$admin_obj = new Object("<br/>");
$admin_obj->add(createTableFirstPagePic64($this->array_link_obj), "<br/><br/>");
$admin_box->setContent($admin_obj);
$table->addRow($admin_box)->setColspan(2);
$this->render->addRow($table);
$this->render->addRow(__(CURRENT_WSP_VERSION, getCurrentWspVersion()));
}
示例14: Load
public function Load()
{
parent::$PAGE_TITLE = __(CONFIGURE_DATABASE);
$this->includeJsAndCssFromObjectToPage("ComboBox(\$this)");
// Admin
$this->form = new Form($this);
$table_form = new Table();
$table_form->addRow();
$this->edtHost = new TextBox($this->form);
$this->edtHost->setValue(DB_HOST);
$edtHostValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_HOST) . ": ", $this->edtHost->setLiveValidation($edtHostValidation->addValidatePresence()->setFieldName(__(EDT_HOST))));
$this->edtPort = new TextBox($this->form);
$this->edtPort->setValue(DB_PORT);
$edtPortValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_PORT) . ": ", $this->edtPort->setLiveValidation($edtPortValidation->addValidateNumericality(true)->setFieldName(__(EDT_PORT))));
$this->edtRoot = new TextBox($this->form);
$this->edtRoot->setValue(DB_ROOT);
$edtRootValidation = new LiveValidation();
$table_form->addRowColumns(__(EDT_ROOT) . ": ", $this->edtRoot->setLiveValidation($edtRootValidation->addValidatePresence()->setFieldName(__(EDT_ROOT))));
$this->edtPassword = new Password($this->form);
$this->edtPassword->setValue(DB_PASSWORD);
$table_form->addRowColumns(__(EDT_PASSWORD) . ": ", $this->edtPassword);
$this->edtDatabase = new TextBox($this->form);
$this->edtDatabase->setValue(DB_DATABASE);
$table_form->addRowColumns(__(EDT_DATABASE) . ": ", $this->edtDatabase);
$table_form->addRow();
$this->btnValidate = new Button($this->form);
$this->btnValidate->setValue(__(BTN_VALIDATE))->onClick("configureDatabase")->setAjaxEvent();
$table_form->addRowColumns($this->btnValidate)->setColumnColspan(1, 2)->setColumnAlign(1, RowTable::ALIGN_CENTER);
$table_form->addRow();
$table_form->addRow();
$this->form->setContent($table_form);
$this->render = new AdminTemplateForm($this, $this->form);
// generate database object part
$this->objCreateDbClass = new Object();
$this->objCreateDbClass->setId("idCreateDbClass");
$table_form->addRow($this->objCreateDbClass)->setColspan(2);
$table_gen = new Table();
$table_gen->addRow(__(GENERATE_DATABASE_OBJECTS))->setColspan(2);
$table_gen->addRow();
$this->cmb_databases = new ComboBox($this->form);
$this->cmb_databases->onChange("configureGenDbObject")->setAjaxEvent();
$table_gen->addRowColumns(__(DATABASES) . ": ", $this->cmb_databases);
$this->cmb_tables = new ComboBox($this->form);
$table_gen->addRowColumns(__(TABLES) . ": ", $this->cmb_tables);
$table_gen->addRow();
$btnGenObject = new Button($this->form);
$btnGenObject->setValue(__(GENERATE_OBJECTS))->onClick("generateDbObject")->setAjaxEvent();
$table_gen->addRow($btnGenObject)->setColspan(2);
$table_gen->addRow();
$this->objCreateDbClass->add($table_gen);
// database list
if ($this->testDbConnexion(null)) {
$this->loadAllDatabases();
$this->configureGenDbObject(null);
}
}
示例15: createExamples
public function createExamples($ind)
{
$table_box = new Table();
$table_box->setWidth(250)->setDefaultAlign(RowTable::ALIGN_LEFT);
$table_box->addRow();
$body_obj = new Object();
$body_obj->setAlign(Object::ALIGN_CENTER);
//->setId("id_body_obj")->setStyle("padding:5px;background:".$this->background_body->getValue().";");
$text_obj = new Object(__(TEXT_ON_BODY));
$body_obj->add($text_obj->setId("id_body_text"), "<br/>");
$link_obj = new Object(new Link("javascript:void(0);", Link::TARGET_BLANK, __(LINK_ON_BODY)));
$body_obj->add($link_obj->setId("id_body_link"), "<br/>");
$body_obj->add($this->text_link_note_obj, "<br/>");
$table_box->addRow($body_obj);
$table_box->addRow();
$table_box->addRow();
$button_1 = new Button($this);
$button_1->setWidth(245);
$table_box->addRow($button_1->setValue("Button [style jquery]"));
$table_box->addRow();
$tabs = new Tabs("tab-sample");
$tabs->addTab("Tab1", "");
$tabs->addTab("Tab2", "");
$tabs->addTab("Tab3", "");
$table_box->addRow($tabs);
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$dialogbox = new DialogBox(__(DIALOGBOX_TITLE), __(DIALOGBOX_CONTENT));
$dialogbox->setWidth(245)->activateOneInstance()->setPosition("");
$dialogbox_link = new Object(new Link($dialogbox, Link::TARGET_NONE, __(VIEW_DIALOGBOX)));
$table_box->addRow($dialogbox_link->setId("id_dialogbox_link"));
$dialogbox->setPositionX("\$('#" . $dialogbox_link->getId() . "').position().left-f_scrollLeft()");
$dialogbox->setPositionY("\$('#" . $dialogbox_link->getId() . "').position().top-f_scrollTop()-70");
$this->addObject(clone $dialogbox);
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$table_box->addRow();
$style1_box_text = new Box("text", false, $this->current_style_val, $this->current_style_val, "", "box_text_" . $this->current_style_val, 245);
if ($this->background_picture_1->getValue() != "") {
$style1_box_text->forceBoxWithPicture(true, $this->border_table_1->getValue());
} else {
$style1_box_text->forceBoxWithPicture(false);
}
$table_box->addRow($style1_box_text->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]"));
$style1_box = new Box("link", false, $this->current_style_val, $this->current_style_val, "javascript:void(0);", "box_" . $this->current_style_val, 245);
if ($this->background_picture_1->getValue() != "") {
$style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue());
} else {
$style1_box->forceBoxWithPicture(false);
}
$style1_box->setShadow(true);
$table_box->addRow($style1_box->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]"));
$style1_box = new RoundBox($this->current_style_val, "round_box_" . $this->current_style_val, 245);
$style1_box->setShadow(true);
if ($this->background_picture_1->getValue() != "") {
$style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue());
} else {
$style1_box->forceBoxWithPicture(false);
}
$table_box->addRow($style1_box->setContent("RoundBox Object<br/>[style " . $this->current_style_val . "]"));
$table_box->addRow();
if (!defined('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val)) {
define('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val, $this->border_table_1->getValue());
}
$table = new Table();
$table->setId("table_sample")->setWidth(245);
$table->addRowColumns("header1", "header2", "header3")->setHeaderClass($this->current_style_val);
$table->addRowColumns("cel 1-1", "cel 1-2", "cel 1-3")->setId("table_tr_sample")->setBorderPredefinedStyle($this->current_style_val)->setAlign(RowTable::ALIGN_CENTER);
$table_box->addRow($table);
return $table_box;
}