CMS
Version 3.9
link_libraries.inc
Go to the documentation of this file.
1
<?php
2
/**************************************************************
3
4
Copyright (c) 2010 Sonjara, Inc
5
6
Permission is hereby granted, free of charge, to any person
7
obtaining a copy of this software and associated documentation
8
files (the "Software"), to deal in the Software without
9
restriction, including without limitation the rights to use,
10
copy, modify, merge, publish, distribute, sublicense, and/or sell
11
copies of the Software, and to permit persons to whom the
12
Software is furnished to do so, subject to the following
13
conditions:
14
15
The above copyright notice and this permission notice shall be
16
included in all copies or substantial portions of the Software.
17
18
Except as contained in this notice, the name(s) of the above
19
copyright holders shall not be used in advertising or otherwise
20
to promote the sale, use or other dealings in this Software
21
without prior written authorization.
22
23
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
25
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
27
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
28
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30
OTHER DEALINGS IN THE SOFTWARE.
31
32
*****************************************************************/
33
34
Fakoli::using
(
"link_library"
);
35
Fakoli::usingFeature
(
"data_view"
);
36
37
$menu_item
=
"Links"
;
38
39
$hidden
= checkNumeric($_GET[
"hidden"
]);
40
41
if
(!
$hidden
)
42
{
43
$constraint
=
"WHERE hidden=0"
;
44
$checked
=
""
;
45
}
46
else
47
{
48
$checked
=
"checked='checked'"
;
49
}
50
51
$libraries
= Query::create(
LinkLibrary
,
"$constraint ORDER BY name"
)->execute();
52
53
$view
=
new
AdminLinkLibraryListView
(
$libraries
);
54
55
$script
.=
$view
->writeScript();
56
?>
57
<input type=
'checkbox'
class
=
'checkbox'
value=
'1'
name=
'hidden'
<?echo
$checked
?> onchange=
'go("?hidden=" + (this.checked ? "1" : "0")); return false'
/>&
nbsp
;Show Hidden Link Libraries<br/><br/>
58
<?
59
$view
->drawView();
60
?>
61
<br/>
62
<a href=
"/admin/link_library_form"
class
=
"button"
>Create a Link Library</a>
$constraint
$constraint
Definition:
activity_report.inc:13
nbsp
& nbsp
Definition:
index.inc:49
AdminLinkLibraryListView
Definition:
link_library_view.inc:49
Fakoli\usingFeature
static usingFeature()
Uses the specified framework feature(s).
Definition:
core.inc:388
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
LinkLibrary
Definition:
link_library.inc:41
$checked
$checked
Definition:
content_inventory.inc:33
$libraries
$libraries
Definition:
link_libraries.inc:51
$hidden
$hidden
Definition:
link_libraries.inc:39
$menu_item
$menu_item
Definition:
link_libraries.inc:37
$view
$view
Definition:
link_libraries.inc:53
$script
$script
Definition:
link_libraries.inc:55
code
cms.sonjara.com
cms
components
link_library
admin
link_libraries.inc
Generated on Tue Mar 23 2021 15:36:13 for CMS by
1.9.1