XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
cp_functions.php
1<?php
13
14define('XOOPS_CPFUNC_LOADED', 1);
15
16function xoops_cp_header()
17{
18 //
19 // [Special Mission] Additional CHECK!!
20 // Old modules may call this file from other admin directory.
21 // In this case, the controller does not have Admin Module Object.
22 //
23 $root=&XCube_Root::getSingleton();
24 require_once XOOPS_ROOT_PATH . '/modules/legacy/kernel/Legacy_AdminControllerStrategy.class.php';
25
26 $strategy =new Legacy_AdminControllerStrategy($root->mController);
27
28 $root->mController->setStrategy($strategy);
29 $root->mController->setupModuleContext();
30 $root->mController->_mStrategy->setupModuleLanguage(); //< Umm...
31
32 require_once XOOPS_ROOT_PATH . '/header.php';
33}
34
35function xoops_cp_footer()
36{
37 require_once XOOPS_ROOT_PATH . '/footer.php';
38}
39
40// We need these because theme files will not be included
41function OpenTable()
42{
43 echo "<table><tr><td>\n";
44}
45
46function CloseTable()
47{
48 echo '</td></tr></table>';
49}
50
51function themecenterposts($title, $content)
52{
53 echo '<table class="outer"><thead><tr><td>'.$title.'</td></tr></thead><tbody><tr><td><br>'.$content.'<br></td></tr></tbody></table>';
54}
55
56function myTextForm($url, $value)
57{
58 return '<form action="'.$url.'" method="post"><input type="submit" value="'.$value.'"></form>';
59}
60
61function xoopsfwrite()
62{
63 if ('POST' != $_SERVER['REQUEST_METHOD']) {
64 return false;
65 }
66 if (!xoops_refcheck()) {
67 return false;
68 }
69 return true;
70}
71