teamspeak init

This commit is contained in:
Naeltard 2015-06-26 04:06:51 +02:00
commit dd34f7a8da
77 changed files with 1693 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/nbproject/private/

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "lib/system"]
path = lib/system
url = git@mojotrollz.eu:system.git

13
index.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require_once 'lib/autoload.inc'; //SYSTEM Classes
require_once 'teamspeak/autoload.inc'; //Project Classes
require_once '/home/web/web/config/get_config.php';
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
\SYSTEM\system::include_ExceptionShortcut();
\SYSTEM\system::include_ResultShortcut();
\SYSTEM\system::register_errorhandler_dbwriter();
\SYSTEM\system::register_errorhandler_jsonoutput();
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_teamspeak', array_merge($_POST,$_GET), 1, false, true);
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");

3
lib/autoload.inc Normal file
View File

@ -0,0 +1,3 @@
<?php
require_once dirname(__FILE__).'/system/autoload.inc';
require_once dirname(__FILE__).'/tsstatus/autoload.inc';

1
lib/system Submodule

@ -0,0 +1 @@
Subproject commit a6b7f7e7885d9d7e8983b6c6e99ca4acbb70458a

133
lib/tsstatus/README.txt Normal file
View File

@ -0,0 +1,133 @@
TSStatus: Teamspeak 3 viewer for php5
-------------------------------------
Installation
------------
- Extract the whole tsstatus directory from the the archive and upload it to your website root
- Navigate to http://www.yoursite.com/tsstatus/tsstatusgen.php
- You will get a red warning because the generator is disabled by default
- To enable the generator you have to edit tsstatusgen.php and replace $enableGenerator = false; by $enableGenerator = true; on line 10
- Now you can test and customize TSStatus. The generator will output the php/html codes needed to display your Teamspeak server status.
- Don't forget to disable the script when you have done!
Advanced usage
--------------
useServerId: use specific server udp port
$tsstatus->useServerPort(9987);
useServerPort: define server id
$tsstatus->useServerId($sid);
imagePath: path to the TSStatus icons directory
$tsstatus->imagePath = "/tsstatus/img/";
clearServerGroupFlags: clear all server groups flags
$tsstatus->clearServerGroupFlags();
setServerGroupFlag: define a server group flag
$tsstatus->setServerGroupFlag(6, 'servergroup_300.png');
clearChannelGroupFlags: clear all channel groups flags
$tsstatus->clearChannelGroupFlags();
setChannelGroupFlag: define a channel group flag
$tsstatus->setChannelGroupFlag(5, 'changroup_100.png');
$tsstatus->setChannelGroupFlag(6, 'changroup_200.png');
showNicknameBox: show/hide the nickname box
$tsstatus->showNicknameBox = true/false;
timeout: The timeout, in seconds, for connect, read, write operations
$tsstatus->timeout = 2;
showPasswordBox: show/hide the password box
$tsstatus->showPasswordBox = false; // never render the password box
$tsstatus->showPasswordBox = true; // the box will be rendered only if the server have a password
setLoginPassword: set the ServerQuery login/password
$tsstatus->setLoginPassword("ServerQueryLogin", "ServerQueryPassword");
setCache: activate caching system to prevent bans from the server... you are banned extra_msg=you may retry in XXX seconds
$tsstatus->setCache(5);
$tsstatus->setCache(5, "/tmp/mycachefile");
The first parameter is the cache time in seconds
The second parameter is the file were the datas will be stored (.../tsstatus/tsstatus.php.cache if not specified)
The cache file MUST be writable
limitToChannels: define a list of channel to render, others will be ignored
$tsstatus->limitToChannels(1, 5, 17); // only render channels with ids equal to 1, 5 and 17
hideEmptyChannels:
$tsstatus->hideEmptyChannels = true/false;
hideParentChannels: Use this options with limitToChannels or hideEmptyChannels
$tsstatus->hideParentChannels = true/false;
Recognized Status
-----------------
Clients:
- client is talking
- client is away
- harware input muted
- harware output muted
- input muted
- output muted
Channels:
- channel is full
- passworded channel
Recognized flags
-----------------
Clients:
- Server admin
- Channel admin
- Channel operator
Channels
- default channel
- passworded channel
- moderated channel
Contact
-------
Sebastien Gerard <seb@sebastien.me>
http://tsstatus.sebastien.me/
Changelog
---------
2013-08-31
- select server by udp port or server id
- better special characters support
- users are now sorted by talk power
- channels ids are now used for connect links, this prevent bugs with special characters
- bug fixes when multiple servers are diplayed on one page
- some visual improvements
- removed decodeUTF8
- new features, hideEmptyChannels and hideParentChannels
2010-02-26:
- work with BETA 18 servers
- added showPasswordBox, setLoginPassword, setCache and limitToChannels methods. See "Advanced usage" section for more informations. All these new features are implemented in the generator.
- as suggested by COOLover on the official Teamspeak forum, TSStatus now send servergrouplist and channelgrouplist commands and call setServerGroupFlag and setChannelGroupFlag according to the received datas.
2009-12-26
- tested with severs BETA 3,5,6,7,8
- first release of the TSStatus generator script
- added a new property, showNicknameBox, to show/hide the nickname box
- improved error messages. sockets and Teamspeak servers errors are now displayed with the error message and error number
- added a timeout property for connect, read, write operations
- properly disconnect from server and send the quit message
- code cleanup
2009-12-23
- work with BETA 5 servers
- added a decodeUTF8 method for specials chars

428
lib/tsstatus/TSStatus.php Normal file
View File

@ -0,0 +1,428 @@
<?php
/**
* TSStatus: Teamspeak 3 viewer for php5
* @author Sebastien Gerard <seb@sebastien.me>
* @see http://tsstatus.sebastien.me/
* @version 2013-08-31
**/
class TSStatus
{
private $_host;
private $_queryPort;
private $_serverDatas;
private $_channelDatas;
private $_userDatas;
private $_serverGroupFlags;
private $_channelGroupFlags;
private $_login;
private $_password;
private $_cacheFile;
private $_cacheTime;
private $_channelList;
private $_useCommand;
private $_javascriptName;
private $_socket;
public $imagePath;
public $showNicknameBox;
public $timeout;
public $hideEmptyChannels;
public $hideParentChannels;
public function TSStatus($host, $queryPort = 10011)
{
$this->_host = $host;
$this->_queryPort = $queryPort;
$this->_socket = null;
$this->_serverDatas = array();
$this->_channelDatas = array();
$this->_userDatas = array();
$this->_serverGroupFlags = array();
$this->_channelGroupFlags = array();
$this->_login = false;
$this->_password = false;
$this->_cacheTime = 0;
$this->_cacheFile = __FILE__ . ".cache";
$this->_channelList = array();
$this->_useCommand = "use port=9987";
$this->imagePath = "img/";
$this->showNicknameBox = true;
$this->showPasswordBox = false;
$this->timeout = 2;
$this->hideEmptyChannels = false;
$this->hideParentChannels = false;
}
public function useServerId($serverId)
{
$this->_useCommand = "use sid=$serverId";
}
public function useServerPort($serverPort)
{
$this->_useCommand = "use port=$serverPort";
}
public function setLoginPassword($login, $password)
{
$this->_login = $login;
$this->_password = $password;
}
public function setCache($time, $file = false)
{
$this->_cacheTime = $time;
if($file !== false) $this->_cacheFile = $file;
}
public function clearServerGroupFlags()
{
$this->_serverGroupFlags = array();
}
public function setServerGroupFlag($serverGroupId, $image)
{
$this->_serverGroupFlags[$serverGroupId] = $image;
}
public function clearChannelGroupFlags()
{
$this->_channelGroupFlags = array();
}
public function setChannelGroupFlag($channelGroupId, $image)
{
$this->_channelGroupFlags[$channelGroupId] = $image;
}
public function limitToChannels()
{
$this->_channelList = func_get_args();
}
private function ts3decode($str, $reverse = false)
{
$find = array('\\\\', "\/", "\s", "\p", "\a", "\b", "\f", "\n", "\r", "\t", "\v");
$rplc = array(chr(92), chr(47), chr(32), chr(124), chr(7), chr(8), chr(12), chr(10), chr(3), chr(9), chr(11));
if(!$reverse) return str_replace($find, $rplc, $str);
return str_replace($rplc, $find, $str);
}
private function toHTML($string)
{
return htmlentities($string, ENT_QUOTES, "UTF-8");
}
private function sortUsers($a, $b)
{
if($a["client_talk_power"] != $b["client_talk_power"]) return $a["client_talk_power"] > $b["client_talk_power"] ? -1 : 1;
return strcasecmp($a["client_nickname"], $b["client_nickname"]);
}
private function parseLine($rawLine)
{
$datas = array();
$rawItems = explode("|", $rawLine);
foreach ($rawItems as $rawItem)
{
$rawDatas = explode(" ", $rawItem);
$tempDatas = array();
foreach($rawDatas as $rawData)
{
$ar = explode("=", $rawData, 2);
$tempDatas[$ar[0]] = isset($ar[1]) ? $this->ts3decode($ar[1]) : "";
}
$datas[] = $tempDatas;
}
return $datas;
}
private function sendCommand($cmd)
{
fputs($this->_socket, "$cmd\n");
$response = "";
do
{
$response .= fread($this->_socket, 8096);
}while(strpos($response, 'error id=') === false);
if(strpos($response, "error id=0") === false)
{
throw new Exception("TS3 Server returned the following error: " . $this->ts3decode(trim($response)));
}
return $response;
}
private function queryServer()
{
$this->_socket = @fsockopen($this->_host, $this->_queryPort, $errno, $errstr, $this->timeout);
if($this->_socket)
{
@socket_set_timeout($this->_socket, $this->timeout);
$isTs3 = trim(fgets($this->_socket)) == "TS3";
if(!$isTs3) throw new Exception("Not a Teamspeak 3 server/bad query port");
if($this->_login !== false)
{
$this->sendCommand("login client_login_name=" . $this->_login . " client_login_password=" . $this->_password);
}
$response = "";
$response .= $this->sendCommand($this->_useCommand);
$response .= $this->sendCommand("serverinfo");
$response .= $this->sendCommand("channellist -topic -flags -voice -limits");
$response .= $this->sendCommand("clientlist -uid -away -voice -groups");
$response .= $this->sendCommand("servergrouplist");
$response .= $this->sendCommand("channelgrouplist");
$this->disconnect();
return $response;
}
else throw new Exception("Socket error: $errstr [$errno]");
}
private function disconnect()
{
@fputs($this->_socket, "quit\n");
@fclose($this->_socket);
}
private function update()
{
$response = $this->queryServer();
$lines = explode("error id=0 msg=ok\n\r", $response);
if(count($lines) == 7)
{
$this->_serverDatas = $this->parseLine($lines[1]);
$this->_serverDatas = $this->_serverDatas[0];
$tmpChannels = $this->parseLine($lines[2]);
$hide = count($this->_channelList) > 0 || $this->hideEmptyChannels;
foreach ($tmpChannels as $channel)
{
$channel["show"] = !$hide;
$this->_channelDatas[$channel["cid"]] = $channel;
}
$tmpUsers = $this->parseLine($lines[3]);
usort($tmpUsers, array($this, "sortUsers"));
foreach ($tmpUsers as $user)
{
if($user["client_type"] == 0)
{
if(!isset($this->_userDatas[$user["cid"]])) $this->_userDatas[$user["cid"]] = array();
$this->_userDatas[$user["cid"]][] = $user;
}
}
$serverGroups = $this->parseLine($lines[4]);
foreach ($serverGroups as $sg) if($sg["iconid"] > 0) $this->setServerGroupFlag($sg["sgid"], 'group_' . $sg["iconid"] . '.png');
$channelGroups = $this->parseLine($lines[5]);
foreach ($channelGroups as $cg) if($cg["iconid"] > 0) $this->setChannelGroupFlag($cg["cgid"], 'group_' . $cg["iconid"] . '.png');
}
else throw new Exception("Invalid server response");
}
private function setShowFlag($channelIds)
{
if(!is_array($channelIds)) $channelIds = array($channelIds);
foreach ($channelIds as $cid)
{
if(isset($this->_channelDatas[$cid]))
{
$this->_channelDatas[$cid]["show"] = true;
if(!$this->hideParentChannels && $this->_channelDatas[$cid]["pid"] != 0)
{
$this->setShowFlag($this->_channelDatas[$cid]["pid"]);
}
}
}
}
private function getCache()
{
if($this->_cacheTime > 0 && file_exists($this->_cacheFile) && (filemtime($this->_cacheFile) + $this->_cacheTime >= time()) )
{
return file_get_contents($this->_cacheFile);
}
return false;
}
private function saveCache($content)
{
if($this->_cacheTime > 0)
{
if(!@file_put_contents($this->_cacheFile, $content))
{
throw new Exception("Unable to write to file: " . $this->_cacheFile);
}
}
}
private function renderFlags($flags)
{
$content = "";
foreach ($flags as $flag) $content .= '<img src="' . $this->imagePath . $flag . '" />';
return $content;
}
private function renderOptionBox($name, $label)
{
$key = "tsstatus-" . $this->_javascriptName . "-$name";
$value = isset($_COOKIE[$key]) ? htmlspecialchars($_COOKIE[$key]) : "";
return '<label>' . $label . ': <input type="text" id="' . $key . '" value="' . $value . '" /></label>';
}
private function renderUsers($channelId)
{
$content = "";
if(isset($this->_userDatas[$channelId]))
{
$imagePath = $this->imagePath;
foreach ($this->_userDatas[$channelId] as $user)
{
if($user["client_type"] == 0)
{
$name = $this->toHTML($user["client_nickname"]);
$icon = "16x16_player_off.png";
if($user["client_away"] == 1) $icon = "16x16_away.png";
else if($user["client_flag_talking"] == 1) $icon = "16x16_player_on.png";
else if($user["client_output_hardware"] == 0) $icon = "16x16_hardware_output_muted.png";
else if($user["client_output_muted"] == 1) $icon = "16x16_output_muted.png";
else if($user["client_input_hardware"] == 0) $icon = "16x16_hardware_input_muted.png";
else if($user["client_input_muted"] == 1) $icon = "16x16_input_muted.png";
$flags = array();
if(isset($this->_channelGroupFlags[$user["client_channel_group_id"]]))
{
$flags[] = $this->_channelGroupFlags[$user["client_channel_group_id"]];
}
$serverGroups = explode(",", $user["client_servergroups"]);
foreach ($serverGroups as $serverGroup)
{
if(isset($this->_serverGroupFlags[$serverGroup]))
{
$flags[] = $this->_serverGroupFlags[$serverGroup];
}
}
$flags = $this->renderFlags($flags);
$content .= <<<HTML
<div class="tsstatusItem">
<img src="$imagePath$icon" />$name
<div class="tsstatusFlags">
$flags
</div>
</div>
HTML;
}
}
}
return $content;
}
private function renderChannels($channelId)
{
$content = "";
$imagePath = $this->imagePath;
foreach ($this->_channelDatas as $channel)
{
if($channel["pid"] == $channelId)
{
if($channel["show"])
{
$name = $this->toHTML($channel["channel_name"]);
$title = $name . " [" . $channel["cid"] . "]";
$link = "javascript:tsstatusconnect('" . $this->_javascriptName . "'," . $channel["cid"] . ")";
$icon = "16x16_channel_green.png";
if( $channel["channel_maxclients"] > -1 && ($channel["total_clients"] >= $channel["channel_maxclients"])) $icon = "16x16_channel_red.png";
else if( $channel["channel_maxfamilyclients"] > -1 && ($channel["total_clients_family"] >= $channel["channel_maxfamilyclients"])) $icon = "16x16_channel_red.png";
else if($channel["channel_flag_password"] == 1) $icon = "16x16_channel_yellow.png";
$flags = array();
if($channel["channel_flag_default"] == 1) $flags[] = '16x16_default.png';
if($channel["channel_needed_talk_power"] > 0) $flags[] = '16x16_moderated.png';
if($channel["channel_flag_password"] == 1) $flags[] = '16x16_register.png';
$flags = $this->renderFlags($flags);
$users = $this->renderUsers($channel["cid"]);
$childs = $this->renderChannels($channel["cid"]);
$cid = $channel["cid"];
$content .= <<<HTML
<div class="tsstatusItem">
<a href="$link" title="$title">
<img src="$imagePath$icon" />$name
<div class="tsstatusFlags">
$flags
</div>
$users
</a>
$childs
</div>
HTML;
}
else $content .= $this->renderChannels($channel["cid"]);
}
}
return $content;
}
public function render()
{
try
{
$cache = $this->getCache();
if($cache != false) return $cache;
$this->update();
if($this->hideEmptyChannels && count($this->_channelList) > 0) $this->setShowFlag(array_intersect($this->_channelList, array_keys($this->_userDatas)));
else if($this->hideEmptyChannels) $this->setShowFlag(array_keys($this->_userDatas));
else if(count($this->_channelList) > 0) $this->setShowFlag($this->_channelList);
$host = $this->_host;
$port = $this->_serverDatas["virtualserver_port"];
$name = $this->toHTML($this->_serverDatas["virtualserver_name"]);
$icon = $this->imagePath . "16x16_server_green.png";
$this->_javascriptName = $javascriptName = preg_replace("#[^a-z-A-Z0-9]#", "-", $host . "-" . $port);
$options = "";
if ($this->showNicknameBox) $options .= $this->renderOptionBox("nickname", "Nickname");
if($this->showPasswordBox && isset($this->_serverDatas["virtualserver_flag_password"]) && $this->_serverDatas["virtualserver_flag_password"] == 1) $options .= $this->renderOptionBox("password", "Password");
$channels = $this->renderChannels(0);
$content = <<<HTML
<div class="tsstatus">
<input type="hidden" id="tsstatus-$javascriptName-hostport" value="$host:$port" />
$options
<div class="tsstatusItem tsstatusServer">
<a href="javascript:tsstatusconnect('$javascriptName')"><img src="$icon" />$name</a>
$channels
</div>
</div>
HTML;
$this->saveCache($content);
}
catch (Exception $ex)
{
$this->disconnect();
$content = '<div class="tsstatusError">' . $ex->getMessage() . '</div>';
}
return $content;
}
}
?>

View File

@ -0,0 +1,2 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

0
lib/tsstatus/index.php Normal file
View File

77
lib/tsstatus/tsstatus.css Normal file
View File

@ -0,0 +1,77 @@
/**
* TSStatus: Teamspeak 3 viewer for php5
* @author Sebastien Gerard <seb@sebastien.me>
* @see http://tsstatus.sebastien.me/
* @version 2013-08-31
**/
.tsstatus, .tsstatuserror{
background-color: #ffffff;
width: 300px;
}
.tsstatus, .tsstatus *, .tsstatuserror{
color: #00000;
font-family: Verdana;
font-size: 10px;
}
.tsstatus label{
border-bottom: 1px solid #aaaaaa;
}
.tsstatusItem a{
color: #000000;
}
.tsstatusItem a:hover{
background-color: #f6f6f6;
color: #000099;
}
.tsstatuserror{
color: #ff0000;
}
.tsstatus, .tsstatus *{
vertical-align: middle;
margin: 0;
padding: 0;
}
.tsstatus{
position: relative;
overflow: hidden;
}
.tsstatus label{
display: block;
padding: 2px 0;
}
.tsstatusItem{
margin-left: 16px;
position: relative;
white-space:nowrap;
}
.tsstatusItem a{
display: block;
text-decoration: none;
}
.tsstatusItem img{
border: 0;
vertical-align: middle;
margin-right: 2px;
}
.tsstatusFlags{
position: absolute;
right: 0;
top: 0;
}
.tsstatusServer{
margin-left: 0;
}

33
lib/tsstatus/tsstatus.js Normal file
View File

@ -0,0 +1,33 @@
/**
* TSStatus: Teamspeak 3 viewer for php5
* @author Sebastien Gerard <seb@sebastien.me>
* @see http://tsstatus.sebastien.me/
* @version 2013-08-31
**/
function tsstatusconnect(id, channel)
{
var id = "tsstatus-" + id;
var hostport = document.getElementById(id + "-hostport").value;
var nickname = document.getElementById(id + "-nickname");
var password = document.getElementById(id + "-password");
var command = "ts3server://" + hostport.replace(":", "?port=");
var dateExpire = new Date;
dateExpire.setMonth(dateExpire.getMonth()+1);
if(channel != null){
command += "&cid=" + channel;
}
if(nickname != null && nickname.value != ""){
command += "&nickname=" + escape(nickname.value);
document.cookie = id + "-nickname=" + escape(nickname.value) + "; expires=" + dateExpire.toGMTString();
}
if(password != null && password.value != ""){
command += "&password=" + escape(password.value);
document.cookie = id + "-password=" + escape(password.value) + "; expires=" + dateExpire.toGMTString();
}
(window.open(command)).close();
}

View File

View File

@ -0,0 +1,235 @@
<?php
/**
* TSStatus: Teamspeak 3 viewer for php5
* @author Sebastien Gerard <seb@sebastien.me>
* @see http://tsstatus.sebastien.me/
* @version 2013-08-31
**/
$enableGenerator = false;
$absoluteDir = dirname(__FILE__) . "/";
$wwwDir = substr($_SERVER["SCRIPT_NAME"], 0, strrpos($_SERVER["SCRIPT_NAME"], "/") + 1);
$host = isset($_POST["host"]) ? $_POST["host"] : "";
$qport = isset($_POST["qport"]) ? intval($_POST["qport"]) : 10011;
$portOrId = isset($_POST["portOrId"]) ? intval($_POST["portOrId"]) : 1;
$port = isset($_POST["port"]) ? intval($_POST["port"]) : 9987;
$sid = isset($_POST["sid"]) ? intval($_POST["sid"]) : 1;
$showNicknameBox = !isset($_POST["showNicknameBox"]);
$timeout = isset($_POST["timeout"]) ? intval($_POST["timeout"]) : 2;
$showPasswordBox = !isset($_POST["showPasswordBox"]);
$serverQueryLogin = isset($_POST["serverQueryLogin"]) ? $_POST["serverQueryLogin"] : "";
$serverQueryPassword = isset($_POST["serverQueryPassword"]) ? $_POST["serverQueryPassword"] : "";
$cacheTime = isset($_POST["cacheTime"]) ? intval($_POST["cacheTime"]) : 0;
$cacheFile = isset($_POST["cacheFile"]) ? $_POST["cacheFile"] : "";
$limitToChannels = isset($_POST["limitToChannels"]) ? $_POST["limitToChannels"] : "";
$hideEmptyChannels = !isset($_POST["hideEmptyChannels"]);
$hideParentChannels = !isset($_POST["hideParentChannels"]);
if($timeout < 1) $timeout = 0;
else if($timeout > 10) $timeout = 10;
$htmlCode = '<link rel="stylesheet" type="text/css" href="' . $wwwDir . 'tsstatus.css" />
<script type="text/javascript" src="' . $wwwDir . 'tsstatus.js"></script>';
echo $htmlCode;
$phpCode = "<?php\n";
$phpCode .= 'require_once("' . $absoluteDir . 'tsstatus.php");' . "\n";
$phpCode .= '$tsstatus = new TSStatus("' . $host . '", ' . $qport . ');' . "\n";
if($portOrId == 1) $phpCode .= '$tsstatus->useServerPort(' . $port . ');' . "\n";
if($portOrId == 2) $phpCode .= '$tsstatus->useServerId(' . $sid . ');' . "\n";
$phpCode .= '$tsstatus->imagePath = "' . $wwwDir . 'img/";' . "\n";
$phpCode .= '$tsstatus->timeout = ' . $timeout . ";\n";
if($serverQueryLogin != "") $phpCode .= '$tsstatus->setLoginPassword("'.$serverQueryLogin.'", "'.$serverQueryPassword.'");' . "\n";
if($cacheTime > 0 && $cacheFile == "") $phpCode .= '$tsstatus->setCache('.$cacheTime.');' . "\n";
if($cacheTime > 0 && $cacheFile != "") $phpCode .= '$tsstatus->setCache('.$cacheTime.', "'.$cacheFile.'");' . "\n";
if($limitToChannels != "") $phpCode .= '$tsstatus->limitToChannels('.$limitToChannels.');' . "\n";
$phpCode .= '$tsstatus->hideEmptyChannels = ' . (!$hideEmptyChannels ? "true" : "false") . ";\n";
$phpCode .= '$tsstatus->hideParentChannels = ' . (!$hideParentChannels ? "true" : "false") . ";\n";
$phpCode .= '$tsstatus->showNicknameBox = ' . ($showNicknameBox ? "true" : "false") . ";\n";
$phpCode .= '$tsstatus->showPasswordBox = ' . ($showPasswordBox ? "false" : "true") . ";\n";
$phpCode .= 'echo $tsstatus->render();' . "\n?>";
?>
<html>
<head>
<title>TSStatus generator</title>
<style type="text/css">
body, table{
font-family: Verdana;
font-size: 12px;
}
th{
text-align: right;
}
td{
font-style: italic;
}
label{
font-style: normal;
}
h3{
font-size: 14px;
padding-bottom: 4px;
border-bottom: 1px solid #aaa;
}
.warning{
color: red;
}
</style>
</head>
<body>
<h3>TSStatus generator</h3>
<form action="" method="post">
<table>
<tr>
<th>Host</th>
<td><input type="text" name="host" value="<?php echo htmlentities($host); ?>" /></td>
<td>Your Teamspeak server hostname or ip</td>
</tr>
<tr>
<th>Query port</th>
<td><input type="text" name="qport" value="<?php echo $qport; ?>" /></td>
<td>Server's query port, not the client port! (default 10011)</td>
</tr>
<tr>
<th>Server Port</th>
<td>
<input type="radio" name="portOrId" value="1" <?php if($portOrId == 1) echo "checked"; ?> />
<input type="text" name="port" value="<?php echo $port; ?>" />
</td>
<td>You must define a server port or a server id to connect to</td>
</tr>
<tr>
<th>Server Id</th>
<td>
<input type="radio" name="portOrId" value="2" <?php if($portOrId == 2) echo "checked"; ?> />
<input type="text" name="sid" value="<?php echo $sid; ?>" />
</td>
</tr>
<tr>
<th>Timeout</th>
<td><input type="text" name="timeout" value="<?php echo $timeout; ?>" /></td>
<td>The timeout, in seconds, for connect, read, write operations</td>
</tr>
<tr>
<th>ServerQuery login</th>
<td><input type="text" name="serverQueryLogin" value="<?php echo $serverQueryLogin; ?>" /></td>
<td>[Optional] The ServerQuery login used by tsstatus</td>
</tr>
<tr>
<th>ServerQuery password</th>
<td><input type="text" name="serverQueryPassword" value="<?php echo $serverQueryPassword; ?>" /></td>
<td>[Optional] The ServerQuery password</td>
</tr>
<tr>
<th>Cache time</th>
<td><input type="text" name="cacheTime" value="<?php echo $cacheTime; ?>" /></td>
<td>
[Optional] Cache datas for X seconds before updating (prevent bans from the server). 0 =&gt; disabled
</td>
</tr>
<tr>
<th>Cache file</th>
<td><input type="text" name="cacheFile" value="<?php echo $cacheFile; ?>" /></td>
<td>
[Optional] The file were the datas will be stored (.../tsstatus/tsstatus.php.cache if not specified)
</td>
</tr>
<tr>
<th>Limit to these channels</th>
<td><input type="text" name="limitToChannels" value="<?php echo $limitToChannels; ?>" /></td>
<td>
[Optional] Comma seperated list of channels ID to display. If set TSStatus will only render these channels
</td>
</tr>
<tr>
<th></th>
<td><label><input type="checkbox" name="hideEmptyChannels" <?php echo (!$hideEmptyChannels ? "checked" : "") ?> /> Hide empty channels</label></td>
<td></td>
</tr>
<tr>
<th></th>
<td><label><input type="checkbox" name="hideParentChannels" <?php echo (!$hideParentChannels ? "checked" : "") ?> /> Hide parents channels</label></td>
<td>To use with "Limit to these channels" and "Hide empty channels" options</td>
</tr>
<tr>
<th></th>
<td><label><input type="checkbox" name="showNicknameBox" <?php echo (!$showNicknameBox ? "checked" : "") ?> /> Hide nickname box</label></td>
<td></td>
</tr>
<tr>
<th></th>
<td><label><input type="checkbox" name="showPasswordBox" <?php echo (!$showPasswordBox ? "checked" : "") ?> /> Show password box</label></td>
<td>The box will only be visible if the the server have a password</td>
</tr>
<?php if ($enableGenerator):?>
<tr>
<td colspan="3" style="text-align: center"><input type="submit" value="Test TSStatus!" /></td>
</tr>
<?php endif;?>
</table>
</form>
<?php
if($enableGenerator)
{
if($host != "")
{
echo "<h3>TSStatus result</h3>\n";
require_once($absoluteDir . "tsstatus.php");
$tsstatus = new TSStatus($host, $qport);
$tsstatus->imagePath = $wwwDir . "img/";
if($portOrId == 1) $tsstatus->useServerPort($port);
if($portOrId == 2) $tsstatus->useServerId($sid);
$tsstatus->timeout = $timeout;
if($serverQueryLogin != "") $tsstatus->setLoginPassword($serverQueryLogin, $serverQueryPassword);
if($cacheTime > 0 && $cacheFile == "") $tsstatus->setCache($cacheTime);
if($cacheTime > 0 && $cacheFile != "") $tsstatus->setCache($cacheTime, $cacheFile);
if($limitToChannels != "")
{
$ids = explode(",", $limitToChannels);
call_user_func_array(array($tsstatus, "limitToChannels"), $ids);
}
$tsstatus->hideEmptyChannels = !$hideEmptyChannels;
$tsstatus->hideParentChannels = !$hideParentChannels;
$tsstatus->showNicknameBox = $showNicknameBox;
$tsstatus->showPasswordBox = !$showPasswordBox;
echo $tsstatus->render();
echo "<h3>HTML code</h3>\n";
highlight_string($htmlCode);
echo "<h3>PHP code</h3>\n";
highlight_string($phpCode);
echo "<h3>Full page sample</h3>\n";
highlight_string("<html>\n<head>\n<title>TSStatus</title>\n$htmlCode\n</head>\n<body>\n$phpCode\n</body>\n</html>");
echo '<br /><br /><br /><div class="warning">Don\'t forget to disable this script once finished testing!</div>';
}
}
else
{
echo '
<div class="warning">
This script is disabled by default for security purposes!<br />
To enable the script you have to edit <strong>tsstatusgen.php</strong> and replace <strong>$enableGenerator = false;</strong> by <strong>$enableGenerator = true;</strong> on <strong>line 10</strong><br />
Don\'t forget to disable this script once finished testing!
</div>';
}
?>
</body>
</html>

View File

@ -0,0 +1,7 @@
include.path=${php.global.include.path}
php.version=PHP_55
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=false
web.root=.

9
nbproject/project.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>teamspeak</name>
</data>
</configuration>
</project>

13
sai.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require_once 'lib/autoload.inc'; //SYSTEM Classes
require_once 'teamspeak/autoload.inc'; //Project Classes
require_once '/home/web/web/config/get_config.php';
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR()
SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult()
SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register)
SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller
$sai = new SYSTEM\SAI\saigui();
echo $sai->html();

View File

@ -0,0 +1,14 @@
<?php
class api_teamspeak extends \SYSTEM\API\api_system {
public static function call_billing_action_customer($token){
return webcraft_satelite::getCustomer($token);}
public static function call_billing_action_project($token){
return webcraft_satelite::getProject($token);}
public static function call_billing_action_billing($token){
return webcraft_satelite::getBilling($token);}
public static function call_billing_action_bill($token,$ID){
return webcraft_satelite::getBill($token,$ID);}
public static function call_map_action_markers(){
return map::markers();}
}

View File

@ -0,0 +1,4 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/webcraft_billing','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/map','');

14
teamspeak/api/map/map.php Normal file
View File

@ -0,0 +1,14 @@
<?php
class map {
public static function markers(){
$result = array();
$markers = \DBD\WEBCRAFT_PROJECT_MARKERS::QQ();
while($marker = $markers->next()){
$result[]= array( 'ID' => $marker['ID'],
'lon' => $marker['lon'],
'lat' => $marker['lat']);
}
return JsonResult::toString($result);}
}

View File

@ -0,0 +1,31 @@
<?php
class webcraft_satelite {
public static function getCustomer($token){
return JsonResult::toString(\DBD\WEBCRAFT_CUSTOMER_TOKEN::Q1(array($token)));}
public static function getProject($token){
return JsonResult::toString(\DBD\WEBCRAFT_PROJECT_TOKEN::QA(array($token)));}
public static function getBilling($token){
return JsonResult::toString(\DBD\WEBCRAFT_BILL_TOKEN::QA(array($token)));}
public static function getBill($token,$ID){
$bill = \DBD\WEBCRAFT_BILL_ID::Q1(array($token,$ID));
if(!$bill){
throw new ERROR('No such Bill for your Account. Bill ID: '.$ID);}
$bill['items'] = '';
$bill['date'] = date("d.m.Y", strtotime($bill['date']));
$bill['balance'] = number_format($bill['balance'], 2, ",", ".");
$items = DBD\WEBCRAFT_BILL_ITEM_ID::QQ(array($ID));
$count = 1;
while($item = $items->next()){
$item['count'] = $count++;
$item['cost'] = number_format($item['cost'], 2, ",", ".");
$bill['items'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing/saimod_webcraft_billing_pdf_item.tpl'), $item);}
$bill = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing/saimod_webcraft_billing_pdf.tpl'), $bill);
require_once(\SYSTEM\SERVERPATH(new PSAI(),'saimod_webcraft_billing/dompdf/dompdf_config.inc.php'));
$dompdf = new DOMPDF();
$dompdf->load_html($bill);
$dompdf->set_paper("a4", 'portrait');
$dompdf->render();
$dompdf->stream("rechnung.pdf", array("Attachment" => 0));
return;
}
}

10
teamspeak/autoload.inc Normal file
View File

@ -0,0 +1,10 @@
<?php
require_once dirname(__FILE__).'/path/autoload.inc.php';
require_once dirname(__FILE__).'/page/autoload.inc';
require_once dirname(__FILE__).'/docu/autoload.inc.php';
require_once dirname(__FILE__).'/dbd/autoload.inc.php';
require_once dirname(__FILE__).'/api/autoload.inc.php';
require_once dirname(__FILE__).'/config/autoload.inc.php';
require_once dirname(__FILE__).'/sai/autoload.inc';
require_once dirname(__FILE__).'/files/autoload.inc.php';
require_once dirname(__FILE__).'/cron/autoload.inc.php';

View File

@ -0,0 +1,2 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');

View File

@ -0,0 +1,5 @@
<?php
class config_ids extends \SYSTEM\CONFIG\config_ids {
const WEBCRAFT_BILLING_TOKEN = 1000;
}

View File

@ -0,0 +1,2 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');

View File

@ -0,0 +1,6 @@
<?php
class cron_webcraft_monthly_backup extends \SYSTEM\CRON\cronjob {
public static function run(){
return \SYSTEM\CRON\cronstatus::CRON_STATUS_SUCCESFULLY;
}
}

View File

@ -0,0 +1,12 @@
<?php
class cron_webcraft_monthly_bill extends \SYSTEM\CRON\cronjob {
public static function run(){
$res = \DBD\WEBCRAFT_MONTHLY_BILL_PROJECTS::QQ();
while($row = $res->next()){
//für jede rechnungsvorlage eine rechnung
//rechnung verschicken
mail('service@webcraft-media.de', 'Rechnung', 'message', 'From: Webcraft-Media <service@webcraft-media.de>');
}
return \SYSTEM\CRON\cronstatus::CRON_STATUS_SUCCESFULLY;
}
}

View File

@ -0,0 +1,3 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq','DBD');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/tbl','DBD');

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class WEBCRAFT_MONTHLY_BILL_PROJECTS extends \SYSTEM\DB\QQ {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT * FROM webcraft_project LEFT JOIN webcraft_bill ON webcraft_project.repeat_bill = webcraft_bill.ID WHERE webcraft_bill.`group` = 1;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class WEBCRAFT_PROJECT_DETAILS extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT * FROM webcraft_project WHERE lon IS NOT NULL AND lat IS NOT NULL AND ID = ?;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class WEBCRAFT_PROJECT_MARKERS extends \SYSTEM\DB\QQ {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT * FROM webcraft_project WHERE lon IS NOT NULL AND lat IS NOT NULL;'
);}}

View File

@ -0,0 +1,7 @@
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (0, 0, 0, -1, NULL, 'call', NULL);
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1, 0, 0, 0, NULL, 'action', NULL);
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (10, 0, 2, 1, 'customer', 'token', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (11, 0, 2, 1, 'billing', 'token', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (12, 0, 2, 1, 'bill', 'token', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (13, 0, 2, 1, 'bill', 'ID', 'UINT');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (14, 0, 2, 1, 'project', 'token', 'STRING');

View File

@ -0,0 +1,2 @@
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (0, 1, 0, -1, NULL, 'page', NULL);
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1, 1, 2, 0, 'details', 'projectid', 'UINT');

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
<?php
namespace DBD;
class locale_string extends \SYSTEM\DBD\system_locale_string {
const CATEGORY_WEBCRAFT_TEXT = 100;
}

View File

@ -0,0 +1,3 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
require_once dirname(__FILE__).'/register_docu.php';

View File

@ -0,0 +1,7 @@
<?php
class docu_categories extends \SYSTEM\DOCU\docu_categories{
const DOCU_WEBCRAFT_WEBCRAFT = 'Webcraft';
const DOCU_WEBCRAFT_PROJECTS = 'Projects';
const DOCU_WEBCRAFT_TODO = 'TODO';
const DOCU_WEBCRAFT_HOWTO = 'How to';
}

View File

@ -0,0 +1,64 @@
?[text](./api.php?call=files&cat=how_to&id=Anonymous-Seal.jpg)
Websites von Webcraft
=====================
Anleitung für einfaches Handling
--------------------------------
Dieses Kurzanleitung soll Ihnen einen Überblick über die Möglichkeiten zur Pflege und Verwaltung Ihrer Webcraft Website geben.
Sie finden hier eine Anleitung für Ihre Onlineverwaltung, die Einrichtung Ihres e-mail Postfachs, sowie nützliche Tipps und Tricks, um Ihnen das Handling Ihrer Website so unkompliziert wie möglich zu gestalten.
1. Erste Schritte
Alle Webseiten von webcraft-media sind mit einem sogenannten „back end“ ausgestattet: dem System Admin Interface, kurz SAI. Dieses ermöglicht Ihnen, die Inhalte ihrer Webseite einfach zu pflegen und zu verwalten.
Sie erreichen das SAI, indem Sie in die Addresszeile nach der URL Ihrer Seite „/sai.php“ eintippen.
Beispiel: http://www.meine-seite.de/sai.php
Hier können Sie unter Anderem Ihre Texte, Bilder und Dateien verwalten, Einstellungen vornehmen und Ihre Rechnungen einsehen.
Sollten Sie noch keinen Account von uns zugewiesen bekommen haben, klicken Sie auf die Schaltfläche Login am oberen rechten Rand. Klicken Sie anschließend auf den Link „Register new Account“, und geben Sie Ihre Daten ein.
Sollten Sie Probleme mit der Anmeldung am SAI haben, schreiben Sie uns bitte eine E-Mail an support@webcraft-media.de oder kontaktieren Sie uns telefonisch unter 0176/66802813.
2. Texte verwalten
Um Ihre Texte auf der Webseite zu pflegen, ist es wichtig einen einfachen Editierzugang zu haben. SAI bietet die Möglichkeit unter dem Reiter Text (siehe Grafik) schnell und unkompliziert Texte auf Ihrer Webseite zu aktualisieren.
Die Texte werden in verschiedene Gruppen unterschieden. In der Regel gibt es dabei eine Gruppe für Standardtexte wie Fehlermeldungen, Hinweise, AGBs oder ähnliches. Die auf Ihrer Seite angezeigten inhaltlichen Texte sind ebenfalls in eine oder ggf. mehrere Gruppen zusammengefasst. Um zum gewünschten Text zu gelangen, wählen Sie die entsprechende Gruppe aus.
Die Texte werden Ihnen nun in Form einer Liste angezeigt.
Dabei wird in der Spalte ID der Name des Textes angezeigt, und in der Sprachspalte (deDE, enUS, huHU etc.) der eigendliche Text in der jeweiligen Sprache.
Um einen bestimmten Text zu editieren, klicken Sie beim jeweiligen Text auf edit, um zum Editor zu gelangen. Um ihn zu löschen, klicken Sie delete.
HINWEIS
Sollten Sie Ihren Text irrtümlich oder unbeabsichtigt löschen, so können Sie ihn wiederherstellen, indem Sie einen neuen Text mit identischer ID und Category (Category = Gruppe) anlegen.
Im Editor können Sie ihren Text in allen freigeschalteten Sprachen anpassen. Dabei steht ihnen ein einfacher, HTML kompatibler Editor zur Verfügung.
1Wenn Sie mit Ihrer Änderung zufrieden sind, klicken sie unter dem Editorfenster erneut auf edit. Sie sollten nun eine Erfolgsmeldung erhalten. Ihr Text wurde editiert.
3. Bilder und Dateien verwalten
Um Bilder z.B. in Galerien oder Dateien die zum Download angeboten werden zu aktualisieren, zu ersetzen, oder zu löschen, stellt SAI Ihnen ein online-Verwaltungssystem zur Verfügung.
Um in die SAI-Dateiverwaltung zu gelangen, wählen Sie den Reiter „Files“ in der oberen Menuleiste aus.
Ähnlich dem Textmodul, sind Ihre Dateien in Verschiedene Gruppen zusammengefasst. Zum Beispiel alle Bilder einer Galerie, oder alle Dokumente, die zum Download bereitstehen. Die Namen der Gruppen deuten in der Regel auf den Inhalt hin.
Haben Sie eine Gruppe ausgewählt, werden Ihnen die Dateien ähnlich wie in der Textverwaltung als Liste angezeigt.
1. Die Spalte Name bezeichnet den Namen der hochgeladenen Datei.
2. Die Spalte Extension bezieht sich auf das jeweilige Dateiformat. (z.B. .zip, .mp3, .jpg)
3. URL zeigt Ihnen den Direktlink der Datei an.
4. Unter Action finden Sie die Optionen „Delete“ für das Löschen einer Datei und „Rename“ um Sie umzubenennen.
2.1 Dateien hochladen
Um eine Datei von Ihrem Computer ins SAI hochzuladen, wählen Sie zunächst die Gruppe, in die Sie hochgeladen werden soll aus. Wählen Sie nun am Ende der Liste die Option „Choose file“.
Nun öffnet sich ein Windows- Dialogfenster. Wählen Sie die ensprechende Datei von Ihrem Computer aus und klicken Sie auf unten rechts auf „Öffnen“.
Name und Dateiformat werden Ihnen nun angezeigt.
Klicken Sie nun auf Upload am rechten Tabellenrand. Wenn der Upload beendet ist, wird Ihnen eine Erfolgsmeldung als Popup angezeigt. Dies kann bis zu einigen Minuten dauern, je nach Größe der Datei. Haben Sie die Erfolgsmeldung erhalten, klicken Sie erneut auf „Files“ oder drücken Sie die F5 Taste, um Ihre neue Datei angezeigt zu bekommen.
2.2 Dateien umbenennen
HINWEIS
Sollten Sie eine vorhandene Datei umbenennen, die auf Ihrer Webseite via Link eingebunden ist, wird diese auf der Seite ohne Weiteres nicht mehr verfügbar sein. Sie können die Verfügbarkeit wiederherstellen, indem Sie der Datei den ursprünglichen Namen wieder geben.
Um eine bereits Hochgeladene Datei umzubennenen, geben Sie den gewünschten Namen in das dafür vorgesehene Eingabefeld ein.

View File

@ -0,0 +1,5 @@
<?php
//\SYSTEM\DOCU\docu::registerFolder(dirname(__FILE__).'/webcraft',docu_categories::DOCU_WEBCRAFT_WEBCRAFT);
//\SYSTEM\DOCU\docu::registerFolder(dirname(__FILE__).'/projects',docu_categories::DOCU_WEBCRAFT_PROJECTS);
\SYSTEM\DOCU\docu::registerFolder(dirname(__FILE__).'/todo',docu_categories::DOCU_WEBCRAFT_TODO);
\SYSTEM\DOCU\docu::registerFolder(dirname(__FILE__).'/how_to',docu_categories::DOCU_WEBCRAFT_HOWTO);

View File

@ -0,0 +1,89 @@
Webcraft
--------
- CRON Modul (done?), CRON STRUKTUR (done?)
- worldmap
- design
- coole map
- worldchat
Danube
------
- 450/6.5€ (where is da money?)
- GALLERY einbinden
- Domain Transfere
- sai fix(structure fix)
Mojotrollz
----------
- Repo wechseln
- start page
- www fix
UVote
-----
- Backend?
- www fix
Rhein
-----
- 420/6.5€
- treffen ulf do
Da-Sense
--------
- Chron Hook
- New Database Model
Redestoffmusik
--------------
- redesign ???
- downloadstuff ???
Akademischer Börsenverein Frankfurt
-----------------------------------
- 600/6.5€
- Auf Rücksprache
Jörg
----
- Ole Anfrage
Karate Zwingenberg
------------------
- Tobi muss mehr Druck machen
Lichtblick
----------
- Tobi Anfrage
Schönheitschirurg
-----------------
- Ole Anfrage(in Zeit)
Frisöse Zwbg
------------
- Ole Di treffen
Synagogenverein Zwingenberg
---------------------------
- Do anfrage Ulf
Kunstfaser stuff
----------------
- Tobi muss mhr rumstressen

View File

@ -0,0 +1,50 @@
Webcraft
--------
- CRON Modul, CRON STRUKTUR
* bild (worldmap, worldchat, websitemap)
* bild
-> Webcraft design done
Danube
------
GALLERY
-> done
Mojotrollz
----------
- Repo wechseln
- start page
UVote
-----
- Backend?
Rhein
-----
- 420/6.5€ alles !
- >
- Transferieren (test war ok!)
- Redesign (Schatten etc)
- Gallery Modul (done)
- EMail Server fixen / SSL Cert benötigt? (done)
Da-Sense
--------
- Docu
- Chron Hook
- New Database Model
Redestoffmusik
--------------
- transferieren (done)

View File

@ -0,0 +1,82 @@
Webcraft
--------
- CRON Modul, CRON STRUKTUR
- worldmap
- design
- coole map
- worldchat
Danube
------
- 450/6.5€ (where is da money?)
- GALLERY einbinden
- Domain Transfere
- sai fix(structure fix)
Mojotrollz
----------
- Repo wechseln
- start page
- www fix
UVote
-----
- Backend?
- www fix
Rhein
-----
- 420/6.5€
- Redesign
- Schatten (done)
- Farben (done)
- Banner
- Gallery Style (done)
- email schreiben mit pws (done) -> Modul wtf? where is it?
- rechnung 420/6.5€
- spam filter (done)
Da-Sense
--------
- Docu
- Chron Hook
- New Database Model
Redestoffmusik
--------------
- redesign
- downloadstuff
Akademischer Börsenverein Frankfurt
-----------------------------------
- 600/6.5€
- Auf Rücksprache
Jörg
----
- Ole Anfrage
Karate Zwingenberg
------------------
- Tobi muss Druck machen
Lichtblick
----------
- Tobi Anfrage
Schönheitschirurg
-----------------
- Ole Anfrage(in Zeit)

View File

@ -0,0 +1,83 @@
Webcraft
--------
- CRON Modul, CRON STRUKTUR
- worldmap
- markers (done)
- popup (done)
- design
- coole map
- worldchat
- sai lang switcher (done)
- www fix (done)
Danube
------
- 450/6.5€
- GALLERY einbinden
- Domain Transfere
- sai fix(structure fix)
Mojotrollz
----------
- Repo wechseln
- start page
- www fix
UVote
-----
- Backend?
- www fix
Rhein
-----
- 420/6.5€
- Transferieren (done)
- Anfrage Api (done)
- Sai Startpage (done)
- Redesign
- Schatten
- Farben
- Banner
- Gallery Style
- sai fix(structure fix) (done)
- gallery in saimod (done)
- danube gallery einbinden (done)
- rechnungs mod einbinden (done)
- anrufen (done)
- Karte Rand (done)
- Files Umbenennen fixen (done)
- www fix (done)
- email problem lösen (weiterleitung) (done?)
- email schreiben mit pws (done) -> Modul wtf? where is it?
- rechnung
- spam filter (done)
Da-Sense
--------
- Docu
- Chron Hook
- New Database Model
Redestoffmusik
--------------
- redesign
- downloadstuff
- sai fix(structure fix) (done)
- www fix (done)
Akademischer Börsenverein Frankfurt
-----------------------------------
- 600/6.5€
- klären -> Montag 26.5
- design
- MENU Modul

View File

@ -0,0 +1,105 @@
Textmodul
---------
- Backbutton
- Delete Nachfrage
- post/get zeichenproblem
- Timestamp für texte
- Blocksatz
Karate Zwingenberg
------------------
- Trainingskalender (Ulf)
- News
- user Rechte für Texgruppen?
- Design
- Original Logo
- Schwarzer Balken muss weg
- bottom bar mit spk logo und impressum-webcraft
Webcraft
--------
- CRON Modul (done?), CRON STRUKTUR (done?)
- worldmap
- design
- text bricht aus den divs (generelles problem?)
- mehr backgrounds
- coole map (done)
- worldchat
Rhein
-----
- 420/6.5€
- treffen ulf do
Danube
------
- 450/6.5€ (where is da money?)
- GALLERY einbinden
- Domain Transfere
- sai fix(structure fix)
Mojotrollz
----------
- Repo wechseln
- start page
- www fix
UVote
-----
- Backend?
- www fix
Da-Sense
--------
- Chron Hook
- New Database Model
Redestoffmusik
--------------
- Sascha bescheid sagen, dass er den shit hochladen muss
- MMONE Album einbinden
Akademischer Börsenverein Frankfurt
-----------------------------------
- 600/6.5€
- Auf Rücksprache
Jörg
----
- Ole Anfrage
Lichtblick
----------
- Tobi Anfrage
Schönheitschirurg
-----------------
- Ole Anfrage(in Zeit)
Frisöse Zwbg
------------
- Ole Di treffen
Synagogenverein Zwingenberg
---------------------------
- Do anfrage Ulf

View File

@ -0,0 +1,3 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
require_once dirname(__FILE__).'/register_files.php';

View File

@ -0,0 +1,5 @@
<?php
//\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/how_to/','how_to');
//\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/websites/','websites');
//\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/content/','content');
//\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/references/','references');

View File

@ -0,0 +1,5 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page/qq','DBD');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_impressum','');

View File

@ -0,0 +1,6 @@
<?php
class default_impressum extends SYSTEM\PAGE\Page {
public function html() {
return \SYSTEM\PAGE\text::get('impressum');
}
}

View File

@ -0,0 +1,33 @@
<?php
class default_page extends SYSTEM\PAGE\Page {
public static function js(){
return '<script src="'.\LIB\lib_jquery::js().'" type="text/javascript"></script>'.
'<script src="'.\LIB\lib_bootstrap::js().'" type="text/javascript"></script>'.
'<script src="'.\LIB\lib_jqbootstrapvalidation::js().'" type="text/javascript"></script>'.
'<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/js/default_page.js').'"></script>'.
'<script type="text/javascript" src="'.\SYSTEM\SERVERPATH(new PLIB(),'tsstatus/tsstatus.js').'"></script>';}
public static function css(){
return '<link rel="stylesheet" href="'.\LIB\lib_bootstrap::css().'" type="text/css" />'.
'<link rel="stylesheet" href="'.\LIB\lib_system::css().'" type="text/css" />'.
'<link rel="stylesheet" href="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/css/default_page.css').'" type="text/css" />'.
'<link rel="stylesheet" href="'.\SYSTEM\SERVERPATH(new PLIB(),'tsstatus/tsstatus.css').'" type="text/css" />';}
private static function ts_app(){
$ts = new TSStatus('mojotrollz.eu');
$ts->setLoginPassword('mojotrollztsquery', '9aYllYkG');
$ts->imagePath = \SYSTEM\SERVERPATH(new PLIB(),'tsstatus/img/');
return $ts->render();
}
public function html($_escaped_fragment_ = NULL) {
$vars = array();
$vars['css'] = self::css();
$vars['js'] = '';
if(!$_escaped_fragment_){
$vars['js'] = self::js();}
$vars['ts_app'] = self::ts_app();
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('teamspeak'));
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/teamspeak.tpl'), $vars);
}
}

View File

@ -0,0 +1,6 @@
$(document).ready(function() {
//new SYSTEM('./api.php',1,'start'); //state system not in use yet
$('#impressum').click(function(){
$('#modal_text').modal('show');});
});

View File

@ -0,0 +1 @@
${ts_app}

View File

@ -0,0 +1,9 @@
<?php
class page_teamspeak extends \SYSTEM\API\api_default {
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_impressum(){
return (new default_impressum())->html();}
}

5
teamspeak/path/PAPI.php Normal file
View File

@ -0,0 +1,5 @@
<?php
class PAPI extends \SYSTEM\PATH {
public static function getPath(){
return \SYSTEM\C_ROOT.'webcraft/api/'.\SYSTEM\C_SUBPATH;}
}

5
teamspeak/path/PLIB.php Normal file
View File

@ -0,0 +1,5 @@
<?php
class PLIB extends \SYSTEM\PATH {
public static function getPath(){
return \SYSTEM\C_ROOT.'lib/'.\SYSTEM\C_SUBPATH;}
}

5
teamspeak/path/PPAGE.php Normal file
View File

@ -0,0 +1,5 @@
<?php
class PPAGE extends \SYSTEM\PATH {
public static function getPath(){
return \SYSTEM\C_ROOT.'teamspeak/page/'.\SYSTEM\C_SUBPATH;}
}

5
teamspeak/path/PSAI.php Normal file
View File

@ -0,0 +1,5 @@
<?php
class PSAI extends \SYSTEM\PATH {
public static function getPath(){
return \SYSTEM\C_ROOT.'webcraft/sai/'.\SYSTEM\C_SUBPATH;}
}

View File

@ -0,0 +1,2 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');

View File

@ -0,0 +1,4 @@
<?php
require_once dirname(__FILE__).'/saimod_webcraft_billing/autoload.inc';
//require_once dirname(__FILE__).'/saimod_webcraft_billing_satelite/autoload.inc';
require_once dirname(__FILE__).'/saimod_webcraft_acquisition/autoload.inc';