Highway to PSR2
[openemr.git] / interface / main / calendar / modules / PostCalendar / plugins / function.pc_popup.php
blobc7ff1967759259a1dba3258b5388441a5ab09ca1
1 <?php
2 /**
3 * $Id$
5 * PostCalendar::PostNuke Events Calendar Module
6 * Copyright (C) 2002 The PostCalendar Team
7 * http://postcalendar.tv
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * To read the license please read the docs/license.txt or visit
24 * http://www.gnu.org/copyleft/gpl.html
27 function smarty_function_pc_popup($args)
29 // if we're not using popups just return an empty string
30 if (!_SETTING_USE_POPUPS) {
31 return;
34 extract($args);
36 if (empty($text) && !isset($inarray) && empty($function)) {
37 $text = "overlib: attribute 'text' or 'inarray' or 'function' required";
40 if (empty($trigger)) {
41 $trigger = "onMouseOver";
44 echo $trigger.'="return overlib(\''.pc_clean($text).'\'';
45 if ($sticky) {
46 echo ",STICKY";
49 if (!empty($caption)) {
50 echo ",CAPTION,'".pc_clean($caption)."'";
53 if (!empty($fgcolor)) {
54 echo ",FGCOLOR,'$fgcolor'";
57 if (!empty($bgcolor)) {
58 echo ",BGCOLOR,'$bgcolor'";
61 if (!empty($textcolor)) {
62 echo ",TEXTCOLOR,'$textcolor'";
65 if (!empty($capcolor)) {
66 echo ",CAPCOLOR,'$capcolor'";
69 if (!empty($closecolor)) {
70 echo ",CLOSECOLOR,'$closecolor'";
73 if (!empty($textfont)) {
74 echo ",TEXTFONT,'$textfont'";
77 if (!empty($captionfont)) {
78 echo ",CAPTIONFONT,'$captionfont'";
81 if (!empty($closefont)) {
82 echo ",CLOSEFONT,'$closefont'";
85 if (!empty($textsize)) {
86 echo ",TEXTSIZE,$textsize";
89 if (!empty($captionsize)) {
90 echo ",CAPTIONSIZE,$captionsize";
93 if (!empty($closesize)) {
94 echo ",CLOSESIZE,$closesize";
97 if (!empty($width)) {
98 echo ",WIDTH,$width";
101 if (!empty($height)) {
102 echo ",HEIGHT,$height";
105 if (!empty($left)) {
106 echo ",LEFT";
109 if (!empty($right)) {
110 echo ",RIGHT";
113 if (!empty($center)) {
114 echo ",CENTER";
117 if (!empty($above)) {
118 echo ",ABOVE";
121 if (!empty($below)) {
122 echo ",BELOW";
125 if (isset($border)) {
126 echo ",BORDER,$border";
129 if (isset($offsetx)) {
130 echo ",OFFSETX,$offsetx";
133 if (isset($offsety)) {
134 echo ",OFFSETY,$offsety";
137 if (!empty($fgbackground)) {
138 echo ",FGBACKGROUND,'$fgbackground'";
141 if (!empty($bgbackground)) {
142 echo ",BGBACKGROUND,'$bgbackground'";
145 if (!empty($closetext)) {
146 echo ",CLOSETEXT,'".pc_clean($closetext)."'";
149 if (!empty($noclose)) {
150 echo ",NOCLOSE";
153 if (!empty($status)) {
154 echo ",STATUS,'".pc_clean($status)."'";
157 if (!empty($autostatus)) {
158 echo ",AUTOSTATUS";
161 if (!empty($autostatuscap)) {
162 echo ",AUTOSTATUSCAP";
165 if (isset($inarray)) {
166 echo ",INARRAY,'$inarray'";
169 if (isset($caparray)) {
170 echo ",CAPARRAY,'$caparray'";
173 if (!empty($capicon)) {
174 echo ",CAPICON,'$capicon'";
177 if (!empty($snapx)) {
178 echo ",SNAPX,$snapx";
181 if (!empty($snapy)) {
182 echo ",SNAPY,$snapy";
185 if (isset($fixx)) {
186 echo ",FIXX,$fixx";
189 if (isset($fixy)) {
190 echo ",FIXY,$fixy";
193 if (!empty($background)) {
194 echo ",BACKGROUND,'$background'";
197 if (!empty($padx)) {
198 echo ",PADX,$padx";
201 if (!empty($pady)) {
202 echo ",PADY,$pady";
205 if (!empty($fullhtml)) {
206 echo ",FULLHTML";
209 if (!empty($frame)) {
210 echo ",FRAME,'$frame'";
213 if (isset($timeout)) {
214 echo ",TIMEOUT,$timeout";
217 if (!empty($function)) {
218 echo ",FUNCTION,'$function'";
221 if (isset($delay)) {
222 echo ",DELAY,$delay";
225 if (!empty($hauto)) {
226 echo ",HAUTO";
229 if (!empty($vauto)) {
230 echo ",VAUTO";
233 echo ');" onMouseOut="nd();"';