1 | <?php
|
---|
2 |
|
---|
3 | /***************************************************************************
|
---|
4 | * Dolphin Smart Community Builder
|
---|
5 | * -----------------
|
---|
6 | * begin : Mon Mar 23 2006
|
---|
7 | * copyright : (C) 2006 BoonEx Group
|
---|
8 | * website : http://www.boonex.com/
|
---|
9 | * This file is part of Dolphin - Smart Community Builder
|
---|
10 | *
|
---|
11 | * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
|
---|
12 | * http://creativecommons.org/licenses/by/3.0/
|
---|
13 | *
|
---|
14 | * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
---|
15 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
---|
16 | * See the Creative Commons Attribution 3.0 License for more details.
|
---|
17 | * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
|
---|
18 | * see license.txt file; if not, write to marketing@boonex.com
|
---|
19 | ***************************************************************************/
|
---|
20 |
|
---|
21 | require_once( 'inc/header.inc.php' );
|
---|
22 | require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
|
---|
23 | require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
|
---|
24 |
|
---|
25 | // --------------- page variables and login
|
---|
26 |
|
---|
27 | $_page['name_index'] = 44;
|
---|
28 |
|
---|
29 | check_logged();
|
---|
30 |
|
---|
31 | if ( $_GET['explain'] != 'imadd' ) {
|
---|
32 | $_page['header'] = _t( "_EXPLANATION_H" ).": "._t("_".$_GET['explain']);
|
---|
33 | $_page['header_text'] = _t( "_EXPLANATION_H" ).": "._t("_".$_GET['explain']);
|
---|
34 | } else {
|
---|
35 | $_page['header'] = _t("_User was added to im");
|
---|
36 | $_page['header_text'] = _t("_User was added to im");
|
---|
37 | }
|
---|
38 |
|
---|
39 | // --------------- page components
|
---|
40 |
|
---|
41 | $_ni = $_page['name_index'];
|
---|
42 | $_page_cont[$_ni]['body_onload'] = 'javascript: void(0)';
|
---|
43 | $_page_cont[$_ni]['page_main_code'] = DesignBoxContent($_page['header_text'], PageMainCode(), $oTemplConfig -> PageExplanation_db_num);
|
---|
44 |
|
---|
45 | // --------------- [END] page components
|
---|
46 |
|
---|
47 | PageCode();
|
---|
48 |
|
---|
49 | // --------------- page components functions
|
---|
50 |
|
---|
51 | function membershipActionsList($membershipID)
|
---|
52 | {
|
---|
53 | $resLevelActions = db_res("
|
---|
54 | SELECT IDAction,
|
---|
55 | Name,
|
---|
56 | AllowedCount,
|
---|
57 | AllowedPeriodLen,
|
---|
58 | AllowedPeriodStart,
|
---|
59 | AllowedPeriodEnd,
|
---|
60 | AdditionalParamName,
|
---|
61 | AdditionalParamValue
|
---|
62 | FROM `sys_acl_matrix`
|
---|
63 | INNER JOIN `sys_acl_actions`
|
---|
64 | ON `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
|
---|
65 | WHERE `sys_acl_matrix`.IDLevel = '{$membershipID}'
|
---|
66 | ORDER BY `sys_acl_actions`.Name");
|
---|
67 |
|
---|
68 | ob_start();
|
---|
69 | ?>
|
---|
70 | <!-- [START] List Membership Actions -->
|
---|
71 |
|
---|
72 | <style type="text/css">
|
---|
73 | table.allowedActionsTable{
|
---|
74 | border-bottom:1px solid;
|
---|
75 | border-right:1px solid;
|
---|
76 | }
|
---|
77 | table.allowedActionsTable td{
|
---|
78 | padding: 5px;
|
---|
79 | text-align: center;
|
---|
80 | border-top:1px solid;
|
---|
81 | border-left:1px solid;
|
---|
82 | }
|
---|
83 | </style>
|
---|
84 | <table cellpadding="0" cellspacing="0" border="0" style="font-size: 8pt" class="allowedActionsTable" align="center" width="100%">
|
---|
85 | <tr>
|
---|
86 | <td colspan="5" align="center"><?= _t("_Allowed actions") ?></td>
|
---|
87 | </tr>
|
---|
88 | <tr>
|
---|
89 | <td><b><?= _t("_Action") ?></b></td>
|
---|
90 | <td><b><?= _t("_Times allowed") ?></b></td>
|
---|
91 | <td><b><?= _t("_Period (hours)") ?></b></td>
|
---|
92 | <td><b><?= _t("_Allowed Since") ?></b></td>
|
---|
93 | <td><b><?= _t("_Allowed Until") ?></b></td>
|
---|
94 | </tr>
|
---|
95 | <?
|
---|
96 | if(mysql_num_rows($resLevelActions) <= 0) {
|
---|
97 | ?>
|
---|
98 | <tr>
|
---|
99 | <td colspan="5"><?= _t("_No actions allowed for this membership") ?></td>
|
---|
100 | </tr>
|
---|
101 | <?
|
---|
102 | }
|
---|
103 |
|
---|
104 | while($membershipAction = mysql_fetch_assoc($resLevelActions)) {
|
---|
105 | ?>
|
---|
106 | <tr>
|
---|
107 | <td style="text-align: left;"><b><?= _t("_mma_".str_replace(' ', '_', $membershipAction['Name'])) ?></b></td>
|
---|
108 | <td><?= $membershipAction['AllowedCount'] ? $membershipAction['AllowedCount'] : _t("_no limit") ?></td>
|
---|
109 | <td><?= $membershipAction['AllowedPeriodLen'] ? $membershipAction['AllowedPeriodLen'] : _t("_no limit") ?></td>
|
---|
110 | <td><?= $membershipAction['AllowedPeriodStart'] ? $membershipAction['AllowedPeriodStart'] : _t("_no limit") ?></td>
|
---|
111 | <td><?= $membershipAction['AllowedPeriodEnd'] ? $membershipAction['AllowedPeriodEnd'] : _t("_no limit") ?></td>
|
---|
112 | </tr>
|
---|
113 | <?
|
---|
114 | }
|
---|
115 | ?>
|
---|
116 | </table>
|
---|
117 |
|
---|
118 | <?
|
---|
119 | $result = ob_get_contents();
|
---|
120 | ob_end_clean();
|
---|
121 |
|
---|
122 | return $result;
|
---|
123 | }
|
---|
124 |
|
---|
125 | /**
|
---|
126 | * Prints HTML Code for explanation
|
---|
127 | */
|
---|
128 | function PageMainCode()
|
---|
129 | {
|
---|
130 | global $site;
|
---|
131 | global $oTemplConfig;
|
---|
132 |
|
---|
133 | $b = "<table width=".($oTemplConfig -> expl_db_w-5)." class=text cellspacing=0 cellpadding=0><td width=5><img src={$site['images']}spacer.gif alt=\"\" width=5></td><td width=".($oTemplConfig -> expl_db_w-15)."><div width=".($oTemplConfig -> expl_db_w-15)." align=justify>";
|
---|
134 | $a = "</div></td><td width=5><img src={$site['images']}spacer.gif alt=\"\" width=5></td></table>";
|
---|
135 | switch ( $_GET['explain'] )
|
---|
136 | {
|
---|
137 | case 'Unconfirmed': return $b._t("_ATT_UNCONFIRMED_E").$a;
|
---|
138 | case 'Approval': return $b._t("_ATT_APPROVAL_E").$a;
|
---|
139 | case 'Active': return $b._t("_ATT_ACTIVE_E").$a;
|
---|
140 | case 'Rejected': return $b._t("_ATT_REJECTED_E").$a;
|
---|
141 | case 'Suspended': return $b._t("_ATT_SUSPENDED_E", $site['title']).$a;
|
---|
142 | case 'membership': return membershipActionsList((int)$_GET['type']);
|
---|
143 | }
|
---|
144 | return "";
|
---|
145 | }
|
---|
146 |
|
---|
147 | ?> |
---|