Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F2114291
group_select.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Nov 18, 4:04 PM
Size
5 KB
Mime Type
text/x-php
Expires
Fri, Nov 20, 4:04 PM (33 m, 56 s)
Engine
blob
Format
Raw Data
Handle
994365
Attached To
rINP In-Portal
group_select.php
View Options
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
define
(
'IS_POPUP'
,
1
);
// new startup: begin
define
(
'REL_PATH'
,
'admin/users'
);
$relation_level
=
count
(
explode
(
'/'
,
REL_PATH
)
);
define
(
'FULL_PATH'
,
realpath
(
dirname
(
__FILE__
)
.
str_repeat
(
'/..'
,
$relation_level
)
)
);
require_once
FULL_PATH
.
'/kernel/startup.php'
;
// new startup: end
$pathtolocal
=
$pathtoroot
.
"kernel/"
;
require_once
(
$pathtoroot
.
$admin
.
"/include/elements.php"
);
require_once
(
$pathtoroot
.
"kernel/admin/include/navmenu.php"
);
require_once
(
$pathtolocal
.
"admin/include/navmenu.php"
);
require_once
(
$pathtoroot
.
$admin
.
"/toolbar.php"
);
require_once
(
$pathtoroot
.
$admin
.
"/listview/listview.php"
);
$pathtolocal
=
$pathtoroot
;
//Set Section
$section
=
'in-portal:groupselect'
;
//Set Environment Variable
$envar
=
"env="
.
BuildEnv
();
//Display header
$objListToolBar
=
new
clsToolBar
();
$objListToolBar
->
Set
(
"section"
,
$section
);
$objListToolBar
->
Set
(
"load_menu_func"
,
""
);
$objListToolBar
->
Set
(
"CheckClass"
,
"GroupChecks"
);
$listImages
=
array
();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar
->
Add
(
"select"
,
"la_ToolTip_Select"
,
"#"
,
"swap('select','toolbar/tool_select_f2.gif');"
,
"swap('select', 'toolbar/tool_select.gif');"
,
"SelectSubmit();"
,
"tool_select.gif"
);
$objListToolBar
->
Add
(
"cancel"
,
"la_ToolTip_Stop"
,
"#"
,
"swap('cancel','toolbar/tool_stop_f2.gif');"
,
"swap('cancel', 'toolbar/tool_stop.gif');"
,
"window.close();"
,
"tool_stop.gif"
);
/*$objListToolBar->Add("divider");
$objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");*/
$objListToolBar
->
AddToInitScript
(
$listImages
);
$objListToolBar
->
AddToInitScript
(
"fwLoadMenus();"
);
$order
=
$objConfig
->
Get
(
"GroupSelect_SortOrder"
);
$SelectorType
=
GetVar
(
'Selector'
);
if
(!
$SelectorType
)
$SelectorType
=
'checkbox'
;
$source
=
GetVar
(
'source'
);
$objGroups
->
Page
=
GetVar
(
'lpn'
);
// NEW: begin
$application
=&
kApplication
::
Instance
();
$db
=&
$application
->
GetADODBConnection
();
switch
(
$source
)
{
case
'addcategory_permissions'
:
$SelectorType
=
'radio'
;
$exclude_sql
=
'SELECT DISTINCT(GroupId)
FROM '
.
TABLE_PREFIX
.
'Permissions
WHERE CatId = '
.
$application
->
GetVar
(
'CatId'
).
' AND Type = 0'
;
break
;
case
'adduser_groups'
:
$SelectorType
=
'radio'
;
$exclude_sql
=
'SELECT GroupId
FROM '
.
$objSession
->
GetEditTable
(
'UserGroup'
).
'
WHERE PortalUserId = '
.
$application
->
GetVar
(
'UserId'
);
break
;
default
:
$exclude_sql
=
''
;
break
;
}
$skip_groups
=
$exclude_sql
?
$db
->
GetCol
(
$exclude_sql
)
:
Array
();
$where_clause
=
$skip_groups
?
'GroupId NOT IN ('
.
implode
(
','
,
$skip_groups
).
')'
:
'1'
;
$objGroups
->
LoadGroups
(
'(Personal = 0) AND ('
.
$where_clause
.
')'
,
trim
(
$objConfig
->
Get
(
'GroupSelect_SortField'
).
' '
.
$order
));
// NEW: end
$objListView
=
new
clsListView
(
$objListToolBar
,
$objGroups
);
$objListView
->
IdField
=
"ResourceId"
;
$objListView
->
PageLinkTemplate
=
$pathtoroot
.
$admin
.
"/templates/user_page_link.tpl"
;
$objListView
->
ColumnHeaders
->
Add
(
"Name"
,
admin_language
(
"la_prompt_Name"
),
1
,
0
,
$order
,
"width=
\"
20%
\"
"
,
"GroupSelect_SortField"
,
"GroupSelect_SortOrder"
,
"Name"
);
$objListView
->
ColumnHeaders
->
Add
(
"Description"
,
admin_language
(
"la_prompt_Description"
),
1
,
0
,
$order
,
"width=
\"
30%
\"
"
,
"GroupSelect_SortField"
,
"GroupSelect_SortOrder"
,
"Description"
);
$objListView
->
ColumnHeaders
->
SetSort
(
$objConfig
->
Get
(
"GroupSelect_SortField"
),
$order
);
$objListView
->
PrintToolBar
=
FALSE
;
$objListView
->
CurrentPageVar
=
"Page_Grouplist"
;
$objListView
->
PerPageVar
=
"Perpage_Grouplist"
;
$objListView
->
CheckboxName
=
"itemlist[]"
;
$objListView
->
TotalItemCount
=
$objGroups
->
QueryItemCount
;
$objListView
->
SelectorType
=
$SelectorType
;
$objListView
->
extra_env
=
'destform='
.
GetVar
(
'destform'
).
'&destfield='
.
GetVar
(
'destfield'
).
'&Selector='
.
GetVar
(
'Selector'
);
$title
=
'Select Group'
;
int_header
(
$objListToolBar
,
NULL
,
$title
);
$values
=
GetVar
(
'values'
);
if
(
$values
)
$current_value
=
explode
(
','
,
$values
);
?>
<FORM method="POST" ACTION="" NAME="grouplistform" ID="grouplistform">
<?php
print
$objListView
->
PrintList
();
?>
<input type="hidden" name="Action" value="">
</FORM>
<!-- CODE FOR VIEW MENU -->
<form method="post" action="
<?php
echo
$_SERVER
[
"PHP_SELF"
].
"?"
.
$_SERVER
[
"QUERY_STRING"
];
?>
" name="viewmenu">
<input type="hidden" name="fieldname" value="">
<input type="hidden" name="varvalue" value="">
<input type="hidden" name="varvalue2" value="">
<input type="hidden" name="Action" value="">
</form>
<script src="
<?php
echo
$adminURL
;
?>
/listview/listview.js"></script>
<script>
initSelectiorContainers();
<?php
echo
$objListToolBar
->
Get
(
"CheckClass"
).
".setImages();"
;
?>
</script>
<!-- END CODE-->
<?php
int_footer
();
?>
Event Timeline
Log In to Comment