Beispiel #1
0
 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/>");
 }
Beispiel #2
0
 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, "&nbsp;", $tutorial_box, "&nbsp;", $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);
 }
Beispiel #3
0
 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;
 }