Beispiel #1
0
 /**
  * Constructor Form
  * @param mixed $page_object 
  * @param string $name 
  * @param string $id 
  * @param string $method [default value: POST]
  */
 function __construct($page_object, $name = '', $id = '', $method = "POST")
 {
     parent::__construct();
     if (!isset($page_object) || 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));
     }
     if ($name == "") {
         $name = $page_object->createObjectName($this);
     } else {
         $exist_object = $page_object->existsObjectName($name);
         if ($exist_object != false) {
             throw new NewException("Tag name \"" . $name . "\" for object " . get_class($this) . " already use for other object " . get_class($exist_object), 0, getDebugBacktrace(1));
         }
         $page_object->addEventObject($this);
     }
     $this->page_object = $page_object;
     $this->name = $name;
     if ($id == "") {
         $this->id = $name;
     } else {
         $this->id = $id;
     }
     $this->method = $method;
     JavaScriptInclude::getInstance()->add("form.js", "", true);
     if ($this->page_object->isAjaxLoadPage()) {
         $this->onSubmitJs("return false;");
     }
 }
Beispiel #2
0
 /**
  * Constructor JavaScript
  * @param string $code_javascript 
  * @param boolean $add_js_to_page [default value: false]
  */
 function __construct($code_javascript, $add_js_to_page = false)
 {
     parent::__construct();
     if (!isset($code_javascript)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->code_javascript = $code_javascript;
     $this->is_javascript_object = true;
     if ($add_js_to_page) {
         $page_object = Page::getInstance($_GET['p']);
         if (gettype($code_javascript) != "object") {
             // search in javascript if begin by $(document).ready(
             // then put javascript to the end (for AJAX because doc is already loaded)
             $tmp_code_javascript = trim(str_replace("\t", "", $code_javascript));
             $pos_doc_ready = find($tmp_code_javascript, "\$(document).ready(", 1);
             $pos_jquery_ready = find($tmp_code_javascript, "jQuery(document).ready(", 1);
             if ($pos_doc_ready >= 18 && $pos_doc_ready <= 30 || $pos_jquery_ready >= 23 && $pos_jquery_ready <= 35) {
                 // 30|35: beacause of tag //<![CDATA[
                 $page_object->addObject($this, false, true);
             } else {
                 $page_object->addObject($this);
             }
         } else {
             $page_object->addObject($this);
         }
     }
 }
 /**
  * Constructor LiveValidation
  * @param boolean $onlyOnSubmit [default value: false]
  */
 function __construct($onlyOnSubmit = false)
 {
     parent::__construct();
     $this->onlyOnSubmit = $onlyOnSubmit;
     $this->addCss(BASE_URL . "wsp/css/live_validation.css", "", true);
     $this->addJavaScript(BASE_URL . "wsp/js/livevalidation_standalone.compressed.js", "", true);
 }
Beispiel #4
0
 /**
  * Constructor Captcha
  * @param mixed $page_or_form_object 
  * @param string $name 
  * @param boolean $refresh [default value: true]
  * @param boolean $sound [default value: true]
  */
 function __construct($page_or_form_object, $name = '', $refresh = true, $sound = true)
 {
     parent::__construct();
     if (!isset($page_or_form_object) || gettype($page_or_form_object) != "object" || !is_subclass_of($page_or_form_object, "Page") && get_class($page_or_form_object) != "Form") {
         throw new NewException("Argument page_or_form_object for " . get_class($this) . "::__construct() error", 0, getDebugBacktrace(1));
     }
     if (is_subclass_of($page_or_form_object, "Page")) {
         $this->class_name = get_class($page_or_form_object);
         $this->page_object = $page_or_form_object;
         $this->form_object = null;
     } else {
         $this->page_object = $page_or_form_object->getPageObject();
         $this->class_name = get_class($this->page_object) . "_" . $page_or_form_object->getName();
         $this->form_object = $page_or_form_object;
     }
     if ($name == "") {
         $name = $this->page_object->createObjectName($this);
         $this->name = $name;
     } else {
         $exist_object = $this->page_object->existsObjectName($name);
         $this->name = $name;
         if ($exist_object != false) {
             throw new NewException("Tag name \"" . $name . "\" for object " . get_class($this) . " already use for other object " . get_class($exist_object), 0, getDebugBacktrace(1));
         }
         $this->page_object->addEventObject($this, $this->form_object);
     }
     $this->refresh = $refresh;
     $this->sound = $sound;
 }
 /**
  * Constructor TwiterLikeButton
  * @param string $url 
  * @param mixed $count [default value: TwitterLikeButton::BUTTON_STANDARD]
  * @param string $via 
  * @param mixed $size [default value: TwitterLikeButton::BUTTON_SIZE_STANDARD]
  */
 function __construct($url = '', $count = TwitterLikeButton::BUTTON_STANDARD, $via = '', $size = TwitterLikeButton::BUTTON_SIZE_STANDARD)
 {
     parent::__construct();
     $this->url = $url;
     $this->count = $count;
     $this->via = $via;
     $this->size = $size;
 }
Beispiel #6
0
 /**
  * Constructor Tabs
  * @param string $id 
  */
 function __construct($id = '')
 {
     parent::__construct();
     if (!isset($id) || $id == "") {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->id = $id;
 }
 /**
  * Constructor GoogleLikeButton
  * @param string $type_button 
  * @param boolean $count [default value: true]
  * @param string $url 
  * @param string $callback 
  */
 function __construct($type_button = '', $count = true, $url = '', $callback = '')
 {
     parent::__construct();
     $this->type_button = $type_button;
     $this->count = $count;
     $this->url = $url;
     $this->callback = $callback;
 }
Beispiel #8
0
 /**
  * Constructor Url
  * @param mixed $url 
  */
 function __construct($url)
 {
     parent::__construct();
     if (!isset($url)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->url = $url;
 }
Beispiel #9
0
 /**
  * Constructor Label
  * @param string $label 
  * @param boolean $bold [default value: false]
  * @param boolean $italic [default value: false]
  * @param boolean $underline [default value: false]
  */
 function __construct($label = '', $bold = false, $italic = false, $underline = false)
 {
     parent::__construct();
     $this->label = $label;
     $this->bold = $bold;
     $this->italic = $italic;
     $this->underline = $underline;
 }
 /**
  * Constructor DockMenuItem
  * @param mixed $img 
  * @param mixed $value 
  * @param string $link 
  */
 function __construct($img, $value, $link = '')
 {
     parent::__construct();
     if (!isset($img) && !isset($value)) {
         throw new NewException("2 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->img = $img;
     $this->value = $value;
     $this->link = $link;
 }
 /**
  * Constructor VideoYoutube
  * @param mixed $youtube_video_key 
  * @param integer $width 
  * @param integer $height 
  */
 function __construct($youtube_video_key, $width, $height)
 {
     parent::__construct();
     if (!isset($youtube_video_key) && !isset($width) && !isset($height)) {
         throw new NewException("3 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->youtube_video_key = $youtube_video_key;
     $this->width = $width;
     $this->height = $height;
 }
Beispiel #12
0
 /**
  * Constructor LanguageBox
  * @param boolean $shadow if box has shadow [default value: false]
  * @param string $style_header style of the header (Box::STYLE_MAIN or Box::STYLE_SECOND) [default value: 1]
  * @param string $style_content style of the content (Box::STYLE_MAIN or Box::STYLE_SECOND) [default value: 1]
  */
 function __construct($shadow = false, $style_header = '1', $style_content = '1')
 {
     parent::__construct();
     $this->shadow = $shadow;
     $this->style_header = $style_header;
     $this->style_content = $style_content;
     if (!$this->getPage()->isAjaxPage() && !$this->getPage()->isAjaxLoadPage()) {
         $this->addCss(BASE_URL . "wsp/css/angle.css.php", "", true);
     }
 }
 /**
  * Constructor DraggableEvent
  * @param Page $page_object 
  */
 function __construct($page_object)
 {
     parent::__construct();
     if (!isset($page_object) || 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->name = $this->page_object->createObjectName($this);
     $this->id = $name;
 }
Beispiel #14
0
 /**
  * Constructor RowTable
  * @param string $align [default value: center]
  * @param string $width 
  * @param string $class 
  * @param string $valign 
  */
 function __construct($align = 'center', $width = '', $class = '', $valign = '')
 {
     parent::__construct();
     $this->width = $width;
     $this->align = $align;
     $this->class = $class;
     $this->valign = $valign;
     $this->style = "";
     $this->is_header_row = false;
 }
Beispiel #15
0
 /**
  * Constructor Criteo
  * @param mixed $criteo_zone_id 
  * @param string $width 
  * @param string $height 
  */
 function __construct($criteo_zone_id, $width = '', $height = '')
 {
     parent::__construct();
     if (!isset($criteo_zone_id)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->criteo_zone_id = $criteo_zone_id;
     $this->width = $width;
     $this->height = $height;
 }
 /**
  * Constructor TreeViewItems
  * @param TreeViewItem $treeview_item_object [default value: null]
  * @param TreeViewItem $treeview_item_object2 [default value: null]
  * @param TreeViewItem $treeview_item_object3 [default value: null]
  * @param TreeViewItem $treeview_item_object4 [default value: null]
  * @param TreeViewItem $treeview_item_object5 [default value: null]
  */
 function __construct($treeview_item_object = null, $treeview_item_object2 = null, $treeview_item_object3 = null, $treeview_item_object4 = null, $treeview_item_object5 = null)
 {
     parent::__construct();
     $args = func_get_args();
     for ($i = 0; $i < sizeof($args); $i++) {
         if ($args[$i] != null) {
             $this->add($args[$i]);
         }
     }
 }
Beispiel #17
0
 /**
  * Constructor TreeView
  * @param string $id 
  */
 function __construct($id)
 {
     parent::__construct();
     if (!isset($id)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->id = $id;
     $this->addCss(BASE_URL . "wsp/css/jquery.treeview.css", "", true);
     $this->addJavaScript(BASE_URL . "wsp/js/jquery.treeview.min.js", "", true);
 }
 /**
  * Constructor DownloadButton
  * @param mixed $link 
  * @param mixed $download_text 
  * @param string $download_sub_text 
  * @param string $link_target 
  */
 function __construct($link, $download_text, $download_sub_text = '', $link_target = '')
 {
     parent::__construct();
     if (!isset($link) || !isset($download_text)) {
         throw new NewException("2 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->link = $link;
     $this->download_text = $download_text;
     $this->download_sub_text = $download_sub_text;
     $this->link_target = $link_target;
 }
 /**
  * Constructor FacebookLikeButton
  * @param string $type_button 
  * @param string $url 
  * @param boolean $send_button [default value: false]
  * @param double $width [default value: 450]
  * @param boolean $show_faces [default value: false]
  * @param string $action 
  * @param string $color 
  */
 function __construct($type_button = '', $url = '', $send_button = false, $width = 450, $show_faces = false, $action = '', $color = '')
 {
     parent::__construct();
     $this->type_button = $type_button;
     $this->url = $url;
     $this->send_button = $send_button;
     $this->width = $width;
     $this->show_faces = $show_faces;
     $this->action = $action;
     $this->color = $color;
 }
Beispiel #20
0
 /**
  * Constructor VideoHTML5
  * @param integer $width 
  * @param integer $height 
  */
 function __construct($width, $height)
 {
     parent::__construct();
     if (!isset($width) || !isset($height)) {
         throw new NewException("2 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->width = $width;
     $this->height = $height;
     $this->addJavaScript(BASE_URL . "wsp/js/video.js", "", true);
     $this->addCss(BASE_URL . "wsp/css/video/video-js.css");
 }
Beispiel #21
0
 /**
  * Constructor Link
  * @param mixed $link 
  * @param string $target 
  * @param object $content [default value: null]
  */
 function __construct($link, $target = '', $content = null)
 {
     parent::__construct();
     /*if (!isset($link)) {
     			throw new NewException("1 argument for ".get_class($this)."::__construct() is mandatory", 0, getDebugBacktrace(1));
     		}*/
     $this->link = $link;
     $this->target = $target;
     $this->content = $content;
     $this->tagH = "";
 }
Beispiel #22
0
 /**
  * Constructor DockMenu
  * @param string $id [default value: menu_dock]
  * @param string $align 
  * @param double $top [default value: 0]
  * @param double $left [default value: 0]
  * @param double $img_size [default value: 48]
  * @param string $opacity 
  */
 function __construct($id = 'menu_dock', $align = '', $top = 0, $left = 0, $img_size = 48, $opacity = '')
 {
     parent::__construct();
     $this->id = $id;
     $this->img_size = $img_size;
     $this->align = $align;
     $this->top = $top;
     $this->left = $left;
     $this->opacity = $opacity;
     $this->addJavaScript(BASE_URL . "wsp/js/jquery.jqDock.min.js", "", true);
 }
Beispiel #23
0
 /**
  * Constructor LinkPage
  * @param mixed $page 
  * @param mixed $title_object 
  * @param string $picture_16 
  */
 function __construct($page, $title_object, $picture_16 = '')
 {
     parent::__construct();
     if (!isset($page) || !isset($title_object)) {
         throw new NewException("2 argument for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->page = $page;
     $this->object = $title_object;
     $this->picture_16 = $picture_16;
     $this->tagH = "";
 }
Beispiel #24
0
 /**
  * Constructor MenuItem
  * @param mixed $value 
  * @param string $link 
  * @param string $img 
  * @param boolean $current [default value: false]
  */
 function __construct($value, $link = '', $img = '', $current = false)
 {
     parent::__construct();
     if (!isset($value)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->value = $value;
     $this->link = $link;
     $this->img = $img;
     $this->current = $current;
 }
Beispiel #25
0
 /**
  * Constructor Font
  * @param object $content_object 
  * @param string $font_size 
  * @param string $font_family 
  * @param string $font_weight 
  */
 function __construct($content_object, $font_size = '', $font_family = '', $font_weight = '')
 {
     parent::__construct();
     if (!isset($content_object)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->content_object = $content_object;
     $this->font_size = $font_size;
     $this->font_family = $font_family;
     $this->font_weight = $font_weight;
 }
Beispiel #26
0
 /**
  * Constructor Adsense
  * @param mixed $google_ad_client 
  * @param mixed $google_ad_slot 
  * @param mixed $google_ad_width 
  * @param mixed $google_ad_height 
  */
 function __construct($google_ad_client, $google_ad_slot, $google_ad_width, $google_ad_height)
 {
     parent::__construct();
     if (!isset($google_ad_client) && !isset($google_ad_slot) && !isset($google_ad_width) && !isset($google_ad_height)) {
         throw new NewException("4 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->google_ad_client = $google_ad_client;
     $this->google_ad_slot = $google_ad_slot;
     $this->google_ad_width = $google_ad_width;
     $this->google_ad_height = $google_ad_height;
 }
Beispiel #27
0
 /**
  * Constructor Menu
  * @param string $position [default value: Horizontal]
  * @param string $id [default value: listMenu]
  */
 function __construct($position = 'Horizontal', $id = 'listMenu')
 {
     parent::__construct();
     $this->id = $id;
     $this->addCss(BASE_URL . "wsp/css/menu/superfish.css", "", true);
     $this->addJavaScript(BASE_URL . "wsp/js/menu/hoverIntent.js", "", true);
     $this->addJavaScript(BASE_URL . "wsp/js/menu/jquery.bgiframe.min.js", "", true);
     $this->addJavaScript(BASE_URL . "wsp/js/menu/superfish.js", "", true);
     $this->addJavaScript(BASE_URL . "wsp/js/menu/supersubs.js", "", true);
     $this->setPosition($position);
 }
Beispiel #28
0
 /**
  * Constructor DialogBox
  * @param string $title 
  * @param string|object|Url $content_or_url_object 
  * @param string $width 
  */
 function __construct($title, $content_or_url_object, $width = '')
 {
     parent::__construct();
     if (!isset($title) || !isset($content_or_url_object)) {
         throw new NewException("2 arguments for " . get_class($this) . "::__construct() are mandatory", 0, getDebugBacktrace(1));
     }
     $this->title = $title;
     $this->content = $content_or_url_object;
     $this->width = $width;
     $this->is_javascript_object = true;
     $this->setDialogBoxLevel(DialogBox::getFirstAvailableDialogBoxLevel());
 }
 /**
  * Constructor FacebookComments
  * @param string $url_to_comment 
  * @param double $number_post [default value: 2]
  * @param double $width [default value: 500]
  * @param string $style [default value: light]
  */
 function __construct($url_to_comment = '', $number_post = 2, $width = 500, $style = 'light')
 {
     parent::__construct();
     if ($url_to_comment == "") {
         $this->url_to_comment = $this->getPage()->getCurrentURLWithoutParameters();
     } else {
         $this->url_to_comment = $url_to_comment;
     }
     $this->number_post = $number_post;
     $this->width = $width;
     $this->style = $style;
 }
 /**
  * Constructor TreeViewItem
  * @param string $value node text
  * @param string $link node link
  * @param boolean $is_file is the node a file [default value: true]
  * @param string $path path to the file (if $is_file is true)
  */
 function __construct($value, $link = '', $is_file = true, $path = '')
 {
     parent::__construct();
     if (!isset($value)) {
         throw new NewException("1 argument for " . get_class($this) . "::__construct() is mandatory", 0, getDebugBacktrace(1));
     }
     $this->id = "";
     $this->value = $value;
     $this->old_value = $value;
     $this->link = $link;
     $this->path = str_replace("\\", "/", $path);
     $this->is_file = $is_file;
 }