18 require_once SQ_CORE_PACKAGE_PATH.
'/designs/design_area/design_area.inc';
43 parent::__construct($assetid);
58 $assetid = (int) $this->
attr(
'assetid');
59 $url = $this->
attr(
'url');
62 if (empty($assetid) && empty($url)) {
67 if (!empty($assetid)) {
69 $constant_btn_'.$this->attr(
'id_name').
'_url = $am->getAssetURL('.$assetid.
').((SQ_LIMBO_EDITING) ? \'/\'.SQ_CONF_LIMBO_SUFFIX.\'?SQ_BACKEND_PAGE=main\' : \'\');
84 return ($this->
attr(
'url')) || ($this->
attr(
'assetid'));
100 public function printVar($var, Array $args, $value_prefix=
'', $value_suffix=
'')
104 $assetid = (int) $this->
attr(
'assetid');
106 if (empty($assetid)) {
107 $url_code = $this->
attr(
'url');
109 $url_code =
'<'.
'?php echo $constant_btn_'.$this->
attr(
'id_name').
'_url; ?'.
'>';
113 if ($this->
attr(
'new_window')) {
114 $width = (int) $this->
attr(
'new_window_width');
115 $height = (int) $this->
attr(
'new_window_height');
117 if ($width <= 0) $width = 640;
118 if ($height <= 0) $height = 600;
119 $url_code =
'Javascript: new_window = window.open(\''.$url_code.
'\', \
'constant_btn_'.$this->attr(
'id_name').
'\', \
'toolbar=no,width='.$width.
',height='.$height.
',titlebar=false,scrollbars=yes\');new_window.focus();';
122 echo
'href="'.$url_code.
'"';
126 parent::printVar($var, $args);