init
This commit is contained in:
parent
868d5666ce
commit
f7738233a2
2
go-trainer/api/api_demo_basic.php
Normal file
2
go-trainer/api/api_demo_basic.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
class api_demo_basic extends \SYSTEM\API\api_system {}
|
||||
3
go-trainer/api/autoload.inc
Normal file
3
go-trainer/api/autoload.inc
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
//SYSTEM\autoload::registerFolder(dirname(__FILE__).'/elements','');
|
||||
8
go-trainer/autoload.inc
Normal file
8
go-trainer/autoload.inc
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__).'/path/autoload.inc';
|
||||
require_once dirname(__FILE__).'/page/autoload.inc';
|
||||
require_once dirname(__FILE__).'/files/autoload.inc';
|
||||
require_once dirname(__FILE__).'/api/autoload.inc';
|
||||
require_once dirname(__FILE__).'/sql/autoload.inc';
|
||||
require_once dirname(__FILE__).'/sai/autoload.inc';
|
||||
require_once dirname(__FILE__).'/cron/autoload.inc';
|
||||
2
go-trainer/cron/autoload.inc
Normal file
2
go-trainer/cron/autoload.inc
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__));
|
||||
3
go-trainer/files/autoload.inc
Normal file
3
go-trainer/files/autoload.inc
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/img/','img','*.*');
|
||||
8
go-trainer/page/autoload.inc
Normal file
8
go-trainer/page/autoload.inc
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_start','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_about','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_impressum','');
|
||||
|
||||
|
||||
0
go-trainer/page/default_about/css/default_about.css
Normal file
0
go-trainer/page/default_about/css/default_about.css
Normal file
11
go-trainer/page/default_about/default_about.php
Normal file
11
go-trainer/page/default_about/default_about.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class default_about extends SYSTEM\PAGE\Page {
|
||||
public static function js(){
|
||||
return array( new PPAGE('default_about/js/default_about.js'));}
|
||||
public static function css(){
|
||||
return array( new PPAGE('default_about/css/default_about.css'));}
|
||||
public function html(){
|
||||
$vars = \SYSTEM\PAGE\text::tag('example');
|
||||
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_about/tpl/default_about.tpl'))->SERVERPATH(), $vars);
|
||||
}
|
||||
}
|
||||
2
go-trainer/page/default_about/js/default_about.js
Normal file
2
go-trainer/page/default_about/js/default_about.js
Normal file
@ -0,0 +1,2 @@
|
||||
function init_about(){
|
||||
}
|
||||
3
go-trainer/page/default_about/tpl/default_about.tpl
Normal file
3
go-trainer/page/default_about/tpl/default_about.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
${basic_example}
|
||||
</div>
|
||||
11
go-trainer/page/default_impressum/default_impressum.php
Normal file
11
go-trainer/page/default_impressum/default_impressum.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class default_impressum extends \SYSTEM\PAGE\Page {
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars['impressum'] = \SYSTEM\PAGE\text::get('webcraft_imprint');
|
||||
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_impressum/tpl/impressum.tpl'))->SERVERPATH(), $vars);
|
||||
}
|
||||
public static function js(){
|
||||
return array( new PPAGE('default_impressum/js/default_impressum.js'));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
function init_impressum(){
|
||||
}
|
||||
1
go-trainer/page/default_impressum/tpl/impressum.tpl
Normal file
1
go-trainer/page/default_impressum/tpl/impressum.tpl
Normal file
@ -0,0 +1 @@
|
||||
<div>${impressum}</div>
|
||||
78
go-trainer/page/default_page/css/default_page.css
Normal file
78
go-trainer/page/default_page/css/default_page.css
Normal file
@ -0,0 +1,78 @@
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#headbanner_frame {
|
||||
width: 55%;
|
||||
max-height: 35%;
|
||||
margin: auto;
|
||||
background: white;
|
||||
}
|
||||
|
||||
#headbanner {
|
||||
font-family: fantasy;
|
||||
padding-left: 25px;
|
||||
box-shadow: 0 0px 0px 0px white, 0 0px 0px 0px white, 5px 0 5px -4px rgba(102, 102, 102, 0.8), -5px 0 5px -5px rgba(102, 102, 102, 0.8);
|
||||
}
|
||||
|
||||
#menu {
|
||||
width: 100%;
|
||||
background: #cc3333;
|
||||
}
|
||||
|
||||
#menu_content {
|
||||
font-family: Arial;
|
||||
font-size: 16pt;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#menu_content a:visited{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#menu_content a:hover{
|
||||
text-decoration: none;
|
||||
text-shadow: 1px 0px white;
|
||||
}
|
||||
|
||||
#menu_content a:link{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#content {
|
||||
background: white;
|
||||
width: 55%;
|
||||
padding: 25px;
|
||||
margin: auto;
|
||||
color: #666666;
|
||||
box-shadow: 0 0px 0px 0px white, 0 0px 0px 0px white, 5px 0 5px -4px rgba(102, 102, 102, 0.8), -5px 0 5px -5px rgba(102, 102, 102, 0.8);
|
||||
}
|
||||
|
||||
#footer {
|
||||
height: 20px;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
background: #666666;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#footer a:link{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#footer a:visited{
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
24
go-trainer/page/default_page/default_page.php
Normal file
24
go-trainer/page/default_page/default_page.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
class default_page extends \SYSTEM\PAGE\Page {
|
||||
private static function js(){
|
||||
return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()->WEBPATH()).
|
||||
\SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()->WEBPATH()).
|
||||
\SYSTEM\HTML\html::script(\LIB\lib_system::js()->WEBPATH()).
|
||||
\SYSTEM\HTML\html::script((new PPAGE('default_page/js/default_page.js'))->WEBPATH());
|
||||
}
|
||||
|
||||
private static function css(){
|
||||
return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH()).
|
||||
\SYSTEM\HTML\html::link((new PPAGE('default_page/css/default_page.css'))->WEBPATH());
|
||||
}
|
||||
|
||||
public function html($_escaped_fragment_ = null){
|
||||
$vars = array();
|
||||
$vars['js'] = '';
|
||||
if(!$_escaped_fragment_){
|
||||
$vars['js'] = self::js();}
|
||||
$vars['css'] = self::css();
|
||||
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('demo_basic'));
|
||||
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/default_page.tpl'))->SERVERPATH(), $vars);
|
||||
}
|
||||
}
|
||||
3
go-trainer/page/default_page/js/default_page.js
Normal file
3
go-trainer/page/default_page/js/default_page.js
Normal file
@ -0,0 +1,3 @@
|
||||
$(document).ready(function() {
|
||||
new SYSTEM('./api.php',1,'start');
|
||||
});
|
||||
35
go-trainer/page/default_page/tpl/default_page.tpl
Normal file
35
go-trainer/page/default_page/tpl/default_page.tpl
Normal file
@ -0,0 +1,35 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="${meta_description}">
|
||||
<meta name="keywords" content="${meta_keywords}">
|
||||
<meta name="author" content="${meta_author}">
|
||||
<title>${meta_title}</title>
|
||||
${css}
|
||||
${js}
|
||||
<link rel="shortcut icon" href="./api.php?call=files&cat=img&id=favicon.png" type="image/x-icon" />
|
||||
</head>
|
||||
<body style="background: #cccccc; padding-top: 10px;">
|
||||
<div class="modal fade" id="modal_text" style="" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" id="modaltext"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn" data-dismiss="modal" id="edit_close">Close</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<div id="menu">
|
||||
<div id="menu_content">
|
||||
<a href="#!start">${menu_start}</a>
|
||||
<a href="#!about">${menu_about}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content"></div>
|
||||
<div id="footer">
|
||||
<a href="#!impressum" id="impressum">${menu_imprint}</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
go-trainer/page/default_page/tpl/menu.tpl
Normal file
1
go-trainer/page/default_page/tpl/menu.tpl
Normal file
@ -0,0 +1 @@
|
||||
<a href="#!start">${menu_start}</a>  -
|
||||
5
go-trainer/page/default_start/css/default_start.css
Normal file
5
go-trainer/page/default_start/css/default_start.css
Normal file
@ -0,0 +1,5 @@
|
||||
#start_main{
|
||||
width: 100%;
|
||||
background: white;
|
||||
}
|
||||
|
||||
12
go-trainer/page/default_start/default_start.php
Normal file
12
go-trainer/page/default_start/default_start.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class default_start extends SYSTEM\PAGE\Page {
|
||||
public static function js(){
|
||||
return array( new PPAGE('default_start/js/default_start.js'));}
|
||||
public static function css(){
|
||||
return array( new PPAGE('default_start/css/default_start.css'));}
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('demo_basic'));
|
||||
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_start/tpl/default_start.tpl'))->SERVERPATH(), $vars);
|
||||
}
|
||||
}
|
||||
3
go-trainer/page/default_start/js/default_start.js
Normal file
3
go-trainer/page/default_start/js/default_start.js
Normal file
@ -0,0 +1,3 @@
|
||||
function init_start(){
|
||||
|
||||
}
|
||||
3
go-trainer/page/default_start/tpl/default_start.tpl
Normal file
3
go-trainer/page/default_start/tpl/default_start.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
<div id="start_main">
|
||||
${start_content}
|
||||
</div>
|
||||
3
go-trainer/page/default_start/tpl/text.tpl
Normal file
3
go-trainer/page/default_start/tpl/text.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
${text}
|
||||
<br>
|
||||
<br>
|
||||
19
go-trainer/page/page_demo_basic.php
Normal file
19
go-trainer/page/page_demo_basic.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
class page_demo_basic extends \SYSTEM\API\api_default {
|
||||
public static function get_apigroup(){
|
||||
return 1;}
|
||||
public static function get_class($params = null){
|
||||
return self::class;}
|
||||
|
||||
public static function default_page($_escaped_fragment_ = null){
|
||||
return (new default_page())->html($_escaped_fragment_);}
|
||||
|
||||
public static function page_start(){
|
||||
return (new default_start())->html();}
|
||||
|
||||
public static function page_about(){
|
||||
return (new default_about())->html();}
|
||||
|
||||
public static function page_impressum(){
|
||||
return (new default_impressum())->html();}
|
||||
}
|
||||
5
go-trainer/path/PLIB.php
Normal file
5
go-trainer/path/PLIB.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class PLIB extends \SYSTEM\PATH {
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'lib/', $subpath);}
|
||||
}
|
||||
5
go-trainer/path/PPAGE.php
Normal file
5
go-trainer/path/PPAGE.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class PPAGE extends \SYSTEM\PATH {
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'demo_basic/page/', $subpath);}
|
||||
}
|
||||
5
go-trainer/path/PSAI.php
Normal file
5
go-trainer/path/PSAI.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class PSAI extends \SYSTEM\PATH {
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'demo_basic/sai/', $subpath);}
|
||||
}
|
||||
5
go-trainer/path/PSQL.php
Normal file
5
go-trainer/path/PSQL.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class PSQL extends \SYSTEM\PATH {
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'demo_basic/sql/', $subpath);}
|
||||
}
|
||||
2
go-trainer/path/autoload.inc
Normal file
2
go-trainer/path/autoload.inc
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
2
go-trainer/sai/autoload.inc
Normal file
2
go-trainer/sai/autoload.inc
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
//require_once dirname(__FILE__).'/saimod_*/autoload.inc';
|
||||
9
go-trainer/sql/DATA_DEMO_BASIC.php
Normal file
9
go-trainer/sql/DATA_DEMO_BASIC.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace SQL;
|
||||
class DATA_DEMO_BASIC extends \SYSTEM\DB\QI {
|
||||
public static function get_class(){return \get_class();}
|
||||
public static function files_mysql(){
|
||||
return array( (new \PSQL('/mysql/system_page.sql'))->SERVERPATH(),
|
||||
(new \PSQL('/mysql/webcraft_imprint.sql'))->SERVERPATH());
|
||||
}
|
||||
}
|
||||
4
go-trainer/sql/autoload.inc
Normal file
4
go-trainer/sql/autoload.inc
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SQL');
|
||||
|
||||
\SYSTEM\SQL\setup::register('SQL\\DATA_DEMO_BASIC');
|
||||
3
go-trainer/sql/mysql/system_page.sql
Normal file
3
go-trainer/sql/mysql/system_page.sql
Normal file
@ -0,0 +1,3 @@
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (10, 1, 'start', 'start', -1, 0, 0, '#content', './?page=start', 'init_start', 'default_start');
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (15, 1, 'impressum', 'impressum', -1, 0, 0, '#content', './?page=impressum', 'init_impressum', 'default_impressum');
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (20, 1, 'about', 'about', -1, 0, 0, '#content', './?page=about', 'init_about', 'default_about');
|
||||
3
go-trainer/sql/mysql/webcraft_imprint.sql
Normal file
3
go-trainer/sql/mysql/webcraft_imprint.sql
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user