-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathphpfn.php
More file actions
95 lines (88 loc) · 2.47 KB
/
Copy pathphpfn.php
File metadata and controls
95 lines (88 loc) · 2.47 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/** CONFIG YOUR MAIN PROJECT NAMESPACE HERE!!! **/
use PHPMaker2019\gsadmin as phpfn;
/* **************************************** */
define("EW_PROJECT_NAME", phpfn\PROJECT_NAME, TRUE); // Project name
define("EW_TABLE_MASTER_TABLE", phpfn\TABLE_MASTER_TABLE, TRUE); // Master table
define("EW_CHARSET", phpfn\PROJECT_CHARSET, TRUE);
define("EW_TOKEN_NAME", phpfn\TOKEN_NAME, TRUE);
class Language extends phpfn\Language{}
class UserProfile extends phpfn\UserProfile{}
class AdvancedSecurity extends phpfn\AdvancedSecurity{}
class PrevNextPager extends phpfn\PrevNextPager{}
class ExportJson extends phpfn\ExportJson{
public function &GetItems() { return $this->Items; }
}
function CurrentPage(){
return phpfn\CurrentPage();
}
function isLoggedIn(){
return phpfn\isLoggedIn();
}
function AddClientScript($src, $attrs = NULL) {
return phpfn\AddClientScript($src, $attrs);
}
function AddStylesheet($href, $attrs = NULL) {
return phpfn\AddStylesheet($href, $attrs);
}
function CurrentPageName() {
return phpfn\CurrentPageName();
}
// Get breadcrumb object
function &Breadcrumb() {
return phpfn\Breadcrumb();
}
// Check if mobile device
function IsMobile() {
return phpfn\IsMobile();
}
// Check if tablet device
function IsTablet() {
global $MobileDetect, $IsTablet;
if (isset($IsTablet))
return $IsTablet;
if (!isset($MobileDetect)) {
$MobileDetect = new \Mobile_Detect();
$IsTablet = $MobileDetect->isTablet();
}
return $IsTablet;
}
function CurrentPageID(){
return phpfn\CurrentPageID();
}
function CurrentProjectID() {
return phpfn\CurrentProjectID();
}
// Permission denied message
function DeniedMessage() {
return phpfn\DeniedMessage();
}
function UploadTempPath($fld = NULL, $idx = -1, $tableLevel = FALSE) {
return phpfn\UploadTempPath($fld, $idx, $tableLevel);
}
function &GetExportDocument(&$tbl, $style) {
$type = strtolower($tbl->Export);
$inst = NULL;
if($type == "json"){
$inst = new ExportJson($tbl, $style);
return $inst;
}
return phpfn\GetExportDocument($tbl, $style);
}
// Get current page heading
function CurrentPageHeading() {
return "<span class='ew-page-heading'>".phpfn\CurrentPageHeading()."</span>";
}
// Get domain URL
function DomainUrl() {
return phpfn\DomainUrl();
}
// Get current URL
function CurrentUrl() {
return phpfn\CurrentUrl();
}
// Remove CrLf from text
function RemoveCrLf($str){
return str_replace(["\r", "\n", "\t"], ["", "", ""], $str);
}
?>