Esempio n. 1
0
 function __construct($content, $title)
 {
     parent::__construct();
     define(GOOGLE_CODE_TRACKER_NOT_ACTIF, true);
     $this->render = new Table();
     $this->render->setWidth("100%");
     // Header
     if (defined('SITE_META_OPENGRAPH_IMAGE') && SITE_META_OPENGRAPH_IMAGE != "") {
         $logo = new Picture(SITE_META_OPENGRAPH_IMAGE);
     } else {
         $logo = new Picture("img/logo_128x400_" . $_SESSION['lang'] . ".png", 128, 400);
     }
     $logo->setTitle(__(SITE_NAME));
     $logo_link = new Link($this->getPage()->getBaseLanguageURL(), Link::TARGET_NONE, $logo);
     $img_obj = new Object($logo_link);
     $img_obj->add("<br/><br/>");
     $this->render->addRow($img_obj);
     $this->render->addRow();
     // Error message
     $small_img = new Picture("wsp/img/warning_16.png", 16, 16, 0, "absmiddle");
     $title_header = new Object($small_img, $title);
     $error_box = new Box($title_header, true, Box::STYLE_MAIN, Box::STYLE_MAIN, '', 'error_box', 700);
     $error_box->setContent($content);
     $this->render->addRow($error_box);
 }
Esempio n. 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);
 }
 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, "&nbsp;", $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()));
 }
Esempio n. 4
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;
 }
 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()));
 }
Esempio n. 6
0
 /**
  * Method render
  * @access public
  * @param boolean $ajax_render [default value: false]
  * @return object generate html box with country flag
  * @since 1.0.33
  */
 public function render($ajax_render = false)
 {
     $lang_box = new Box(translate(BOX_LANGUAGE_TITLE), $this->shadow, $this->style_header, $this->style_content, "", "select_language_box");
     if ($this->icon_48_pixels != "") {
         $lang_box->setBigIcon($this->icon_48_pixels, $this->icon_48_pixels_text);
     } else {
         if ($this->icon_16_pixels != "") {
             $lang_box->setSmallIcon($this->icon_16_pixels, $this->icon_16_pixels_text);
         }
     }
     if ($this->width != "") {
         $lang_box->setWidth($this->width);
     }
     $lang_obj = new Object();
     if ($this->icon_48_pixels != "") {
         $lang_obj->add("<br/>");
     }
     for ($i = 0; $i < sizeof($this->languages); $i++) {
         $lang_obj->add(new Language($this->languages[$i]));
     }
     $lang_obj->add("<br/>");
     if ($this->icon_48_pixels != "") {
         $lang_obj->add("<br/>");
     }
     $lang_box->setContent($lang_obj);
     $this->object_change = false;
     return $lang_box->render();
 }