-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathdefault.php
More file actions
47 lines (40 loc) · 1.25 KB
/
default.php
File metadata and controls
47 lines (40 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* @author Matthew McNaney <mcnaney at gmail dot com>
* @version $Id$
*/
$default['label'] = 'No label';
$default['toolbar'] = 'no';
$default['menubar'] = 'no';
$default['location'] = 'no';
$default['scrollbars'] = 'yes';
$default['resizable'] = 'yes';
$default['width'] = '400';
$default['height'] = '300';
$default['titlebar'] = 'no';
$default['link_title'] = '';
$default['window_name'] = 'default' . rand();
$default['class'] = 'js-open-window';
$default['center'] = 1;
if (isset($data['type'])) {
if ($data['type'] == 'button') {
$bodyfile = PHPWS_SOURCE_DIR . 'javascript/open_window/body2.js';
}
}
if (isset($data['center'])) {
$data['center'] = (bool)$data['center'] ? 1 : 0;
}
$site_address = \phpws\PHPWS_Core::getHomeHttp();
if (!stristr($data['address'], $site_address)) {
$data['address'] = $site_address . $data['address'];
}
if (!empty($data['secure'])) {
if (!isset($_GLOBALS['open_window_reset'])) {
unset($_SESSION['secure_open_window']);
$_GLOBALS['open_window_reset'] = true;
}
$rand = PHPWS_Text::randomString();
$data['address'] .= '&owpop=' . $rand;
$_SESSION['secure_open_window'][] = $rand;
$data['id'] = $rand;
}