Initial commit: Kimai TMS
Kimai time management system (PHP 5.6 / MySQL) with custom extensions: - Budget tracking (ki_budget) - Change request form (ki_changerequest) - Invoice generation (ki_invoice) - Expense tracking (ki_expenses) - Flexi time (ki_flexitime) - Export, admin panel, timesheets, tasks, summary Database: ~900K time entries, 2,000+ users, 439 projects. Config: includes/autoconf.php — localhost/kimai/kimai
This commit is contained in:
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Kimai TMS
|
||||||
|
compile/*
|
||||||
|
temporary/*
|
||||||
|
*.log
|
||||||
|
error_log
|
||||||
|
*.zip
|
||||||
|
core.*
|
||||||
|
installer/
|
||||||
|
nbproject/
|
||||||
|
cgi-bin/
|
||||||
|
shellscripts/
|
||||||
|
info.php
|
||||||
84
Bitte_Lesen.txt
Normal file
84
Bitte_Lesen.txt
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
Installationsanleitung:
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
# Benutzen Sie einen *aktuellen* Browser!
|
||||||
|
# Sie brauchen Zugriff auf eine (MySQL) Datenbank und PHP
|
||||||
|
# Rufen Sie mit dem Browser das Kimai-Verzeichnis auf.
|
||||||
|
# Seit v0.8 gibt es einen Step-by-Step Installer.
|
||||||
|
Befolgen Sie einfach die Anweisungen des Installers.
|
||||||
|
|
||||||
|
**********************************************************************
|
||||||
|
* Anmelden koennen Sie sich mit dem voreingestellten Benutzerkonto: *
|
||||||
|
* Benutzer: admin / Passwort: changeme *
|
||||||
|
**********************************************************************
|
||||||
|
|
||||||
|
WICHTIG! Entfernen Sie nach der Installation das Verzeichnis
|
||||||
|
'installer'!
|
||||||
|
|
||||||
|
Wenn sich Kimai nicht starten laesst, liegt das wahrscheinlich an
|
||||||
|
falschen Schreibrechten fuer Dateien und Ordner! Der Installer zeigt
|
||||||
|
Ihnen, welche Rechte Sie aendern muessen. Weiter unten finden Sie
|
||||||
|
noch weitere Hinweise zur Installation.
|
||||||
|
|
||||||
|
Sollten trotzdem Probleme bei der Installation auftauchen, lesen Sie
|
||||||
|
bitte im Forum unter http://forum.kimai.org (Rubrik 'Support').
|
||||||
|
|
||||||
|
|
||||||
|
Eine neue Version aktualisiert, falls notwendig, selbstaendig die
|
||||||
|
Datenbankstruktur. Vorher wird jeweils ein Backup angelegt.
|
||||||
|
Sollte dabei mal etwas schief laufen, koennen die Daten per phpMyAdmin
|
||||||
|
(wir arbeiten an einem Tool mit dem Sie das direkt in Kimai machen koennen)
|
||||||
|
wieder hergestellt werden.
|
||||||
|
|
||||||
|
|
||||||
|
Updates:
|
||||||
|
--------
|
||||||
|
|
||||||
|
ES KÖNNEN NUR VERSIONEN HÖHER ALS 7.0 UPGEDATET WERDEN!
|
||||||
|
|
||||||
|
Um eine neue Version zu installieren, ersetzen Sie einfach das gesamte
|
||||||
|
Kimai-Verzeichnis durch das neue Package. Sie muessen dabei lediglich
|
||||||
|
die Datei '/includes/autoconf.php' von der alten Version behalten.
|
||||||
|
|
||||||
|
Zusätzlich müssen sie sicherstellen, dass die Berechtigungen noch stimmen. Die folgenden
|
||||||
|
Ordner und Dateien müssen für den Webserver schreibbar sein:
|
||||||
|
/compile
|
||||||
|
/extensions/ki_timesheets/compile
|
||||||
|
/extensions/ki_adminpanel/compile
|
||||||
|
/extensions/ki_expenses/compile
|
||||||
|
/extensions/ki_export/compile
|
||||||
|
/extensions/ki_budget/compile
|
||||||
|
/extensions/ki_invoice/compile
|
||||||
|
/temporary
|
||||||
|
/temporary/logfile.txt
|
||||||
|
/includes/autoconf.php
|
||||||
|
|
||||||
|
|
||||||
|
=== Update wenn noch keine autoconf.php existiert ===
|
||||||
|
|
||||||
|
Existiert bereits eine autoconf.php sind diese Schritte nicht durchzuführen.
|
||||||
|
|
||||||
|
Die Datei conf.php in autoconf.php umbenennen.
|
||||||
|
|
||||||
|
Anschließend müssen 3 Variablen zu autoconf.php hinzugefügt werden:
|
||||||
|
|
||||||
|
$server_type = 'mysql'; // the database type (needed for PDO) usually 'mysql'
|
||||||
|
// check the PHP PDO manual if you are using a different
|
||||||
|
// database
|
||||||
|
$server_conn = "mysql";
|
||||||
|
|
||||||
|
$password_salt = "";
|
||||||
|
|
||||||
|
Die Installation laeuft dann nicht mit PDO. Soll PDO genutzt werden,
|
||||||
|
muss $server_conn = "pdo" gesetzt werden.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Noch ein Hinweis:
|
||||||
|
-----------------
|
||||||
|
Diese Software ist kostenlos. Wir bitten Sie die Copyright-Vermerke auf dem
|
||||||
|
Login-Screen und im About-Fenster nicht zu entfernen.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Have Fun!
|
||||||
90
How_To_Install.txt
Normal file
90
How_To_Install.txt
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
Installation:
|
||||||
|
-------------
|
||||||
|
|
||||||
|
# Use a *modern* Browser!
|
||||||
|
# You need PHP 5 and access to a MySQL-database.
|
||||||
|
# Start your Browser and go to your Kimai directory.
|
||||||
|
# Since 0.8 Kimai has a step-by-step installation program.
|
||||||
|
Just follow the instructions of the installer.
|
||||||
|
|
||||||
|
IMPORTANT! Remove the 'installer' directory when you’ve successfully
|
||||||
|
installed Kimai.
|
||||||
|
|
||||||
|
***********************************************
|
||||||
|
* You can login via the preinstalled account: *
|
||||||
|
* User: admin / Password: changeme *
|
||||||
|
***********************************************
|
||||||
|
|
||||||
|
When Kimai doesn't start the reason is probably wrong writing permissions
|
||||||
|
of certain files and folders! The installer shows you which permissions
|
||||||
|
are to be set.
|
||||||
|
|
||||||
|
If you have problems installing, please read the section 'Support'
|
||||||
|
in the forum. -> http://forum.kimai.org
|
||||||
|
|
||||||
|
A new version updates the database automatically (is nessesary).
|
||||||
|
Before that a backup of your data will be created. Normally you'll
|
||||||
|
not even notice this process. If anything goes wrong during the
|
||||||
|
database-update you can recover the data via phpMyAdmin (we're
|
||||||
|
also working on a tool for recoverage...)
|
||||||
|
|
||||||
|
|
||||||
|
Updates:
|
||||||
|
--------
|
||||||
|
|
||||||
|
YOU CAN ONLY UPDATE VERSIONS HIGHER THAN 7.0!
|
||||||
|
|
||||||
|
|
||||||
|
To install a new version just replace the entire directory with the new
|
||||||
|
package EXCEPT the file 'autoconf.php' which sits inside the 'includes' folder.
|
||||||
|
|
||||||
|
Additionally you have to make sure the permissions are still correct. The following
|
||||||
|
folders and files need to be writeable for the webserver:
|
||||||
|
/compile
|
||||||
|
/extensions/ki_timesheets/compile
|
||||||
|
/extensions/ki_adminpanel/compile
|
||||||
|
/extensions/ki_expenses/compile
|
||||||
|
/extensions/ki_export/compile
|
||||||
|
/extensions/ki_budget/compile
|
||||||
|
/extensions/ki_invoice/compile
|
||||||
|
/temporary
|
||||||
|
/temporary/logfile.txt
|
||||||
|
/includes/autoconf.php
|
||||||
|
|
||||||
|
|
||||||
|
Once again: Kimai will NOT work with wrong writing permissions!
|
||||||
|
|
||||||
|
|
||||||
|
=== Update when no autoconf.php exists ===
|
||||||
|
|
||||||
|
If you already have a autoconf.php in your installation skip this.
|
||||||
|
|
||||||
|
Rename your conf.php file to autoconf.php.
|
||||||
|
|
||||||
|
Then edit it and add three new variables:
|
||||||
|
|
||||||
|
$server_type = 'mysql'; // the database type (needed for PDO) usually 'mysql'
|
||||||
|
// check the PHP PDO manual if you are using a different
|
||||||
|
// database
|
||||||
|
$server_conn = "mysql";
|
||||||
|
|
||||||
|
$password_salt = "";
|
||||||
|
|
||||||
|
Kimai will then work in non-PDO mode. If you want to
|
||||||
|
use PDO $server_conn must be set to "pdo".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Finally visit your Kimai installation with your web browser and the
|
||||||
|
auto update process will perform all further necessary updates.
|
||||||
|
|
||||||
|
|
||||||
|
Some final words:
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
This software is free of charge. We ask you to NOT remove the copyright-notes
|
||||||
|
on the login-panel and in the credits-window.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Have Fun!
|
||||||
81
auth/base.php
Normal file
81
auth/base.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base class for authentication methods. All methods have to subclass this
|
||||||
|
* class and implement the authenticate function.
|
||||||
|
*
|
||||||
|
* The order of the functions is closely related to the order they are called.
|
||||||
|
*
|
||||||
|
* First it is checked if automatic login is possible with this method.
|
||||||
|
* If so it is tried via the performAutoLogin function.
|
||||||
|
* When a user provides credentials the authenticate function is called.
|
||||||
|
*
|
||||||
|
* @author sl
|
||||||
|
*/
|
||||||
|
abstract class AuthBase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decides whether this authentication method should be used to authenticate
|
||||||
|
* users before they have provided any credentials.
|
||||||
|
*
|
||||||
|
* This allows users to be logged in automatically. Mostly used with SSO (single sign on) solutions.
|
||||||
|
*
|
||||||
|
* @return boolean <code>true</code> if this authentication method can login users without credentials,
|
||||||
|
* <code>false</code> otherwise
|
||||||
|
*/
|
||||||
|
public function autoLoginPossible() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Try to authenticate the user before he sees the login page.
|
||||||
|
*
|
||||||
|
* @param int $userId is set to the id of the user in Kimai. If none exists it will be <code>false</code>
|
||||||
|
* @return boolean either <code>true</code> if the user could be authenticated or <code>false</code> otherwise
|
||||||
|
**/
|
||||||
|
public function performAutoLogin(&$userId) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate a combination of username and password. Both is given as
|
||||||
|
* the user wrote it into the input fields.
|
||||||
|
*
|
||||||
|
* @param string $username name of the user who wants to authenticate
|
||||||
|
* @param string $plainPassword password in plaintext the user has provided
|
||||||
|
* @param int $userId is set to the id of the user in Kimai. If none exists it will be <code>false</code>
|
||||||
|
* @return boolean either <code>true</code> if the credentials were correct, or <code>false</code> otherwise
|
||||||
|
**/
|
||||||
|
abstract public function authenticate($username,$plainPassword,&$userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the id of a group to which users should be added, if they authenticated but are not known to Kimai.
|
||||||
|
* The default implementation uses the first group it can find.
|
||||||
|
*
|
||||||
|
* @return integer id of the group to add the user to
|
||||||
|
**/
|
||||||
|
public function getDefaultGroupId() {
|
||||||
|
$groups = get_arr_grp();
|
||||||
|
return $groups[0]['grp_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// There should be NO trailing whitespaces.
|
||||||
|
?>
|
||||||
48
auth/kimai.php
Normal file
48
auth/kimai.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
require(WEBROOT.'auth/base.php');
|
||||||
|
|
||||||
|
|
||||||
|
class KimaiAuth extends AuthBase {
|
||||||
|
|
||||||
|
|
||||||
|
public function authenticate($username,$password,&$userId) {
|
||||||
|
global $kga;
|
||||||
|
|
||||||
|
$passCrypt = md5($kga['password_salt'].$password.$kga['password_salt']);
|
||||||
|
|
||||||
|
$result = mysql_query(sprintf("SELECT * FROM %susr WHERE usr_name ='%s';",$kga['server_prefix'],mysql_real_escape_string($username)));
|
||||||
|
if (mysql_num_rows($result) != 1) {
|
||||||
|
$userId = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = mysql_fetch_assoc($result);
|
||||||
|
$pass = $row['pw'];
|
||||||
|
$ban = $row['ban'];
|
||||||
|
$banTime = $row['banTime'];
|
||||||
|
$userId = $row['usr_ID'];
|
||||||
|
|
||||||
|
return $pass==$passCrypt && $username!="";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// There should be NO trailing whitespaces.
|
||||||
|
?>
|
||||||
30
core/checkupdate.php
Normal file
30
core/checkupdate.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query the Kimai project server for information about a new version.
|
||||||
|
* The response will simply be passed through.
|
||||||
|
*/
|
||||||
|
error_reporting(0);
|
||||||
|
require('../includes/basics.php');
|
||||||
|
|
||||||
|
// check the latest stable version of Kimai on the web
|
||||||
|
$request = join( '', file('http://versioncheck.kimai.de?revision='.$kga['revision']."&lang=".$kga['language']));
|
||||||
|
echo strip_tags($request, '<span><a>');
|
||||||
|
?>
|
||||||
145
core/example.php
Normal file
145
core/example.php
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$hostname = "localhost";
|
||||||
|
$username = "kimai";
|
||||||
|
$password = "kimai";
|
||||||
|
$dbname = "kimai";
|
||||||
|
|
||||||
|
$con = mysqli_connect($hostname, $username, $password, $dbname) or die("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.')</script></html>");
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_007.php
|
||||||
|
// Begin : 2008-03-04
|
||||||
|
// Last Update : 2013-05-14
|
||||||
|
//
|
||||||
|
// Description : Example 007 for TCPDF class
|
||||||
|
// Two independent columns with WriteHTMLCell()
|
||||||
|
//
|
||||||
|
// Author: Nicola Asuni
|
||||||
|
//
|
||||||
|
// (c) Copyright:
|
||||||
|
// Nicola Asuni
|
||||||
|
// Tecnick.com LTD
|
||||||
|
// www.tecnick.com
|
||||||
|
// info@tecnick.com
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an example PDF TEST document using TCPDF
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @abstract TCPDF - Example: Two independent columns with WriteHTMLCell()
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @since 2008-03-04
|
||||||
|
*/
|
||||||
|
// Include the main TCPDF library (search for installation path).
|
||||||
|
require_once('../extensions/ki_changerequest/templates/tcpdf/tcpdf.php');
|
||||||
|
|
||||||
|
// create new PDF document
|
||||||
|
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||||
|
|
||||||
|
// set document information
|
||||||
|
$pdf->SetCreator(PDF_CREATOR);
|
||||||
|
$pdf->SetAuthor('Nicola Asuni');
|
||||||
|
$pdf->SetTitle('TCPDF Example 028');
|
||||||
|
$pdf->SetSubject('TCPDF Tutorial');
|
||||||
|
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||||
|
|
||||||
|
// remove default header/footer
|
||||||
|
$pdf->setPrintHeader(false);
|
||||||
|
$pdf->setPrintFooter(false);
|
||||||
|
|
||||||
|
// set default monospaced font
|
||||||
|
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||||
|
|
||||||
|
// set margins
|
||||||
|
$pdf->SetMargins(10, PDF_MARGIN_TOP, 10);
|
||||||
|
|
||||||
|
// set auto page breaks
|
||||||
|
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||||
|
|
||||||
|
// set image scale factor
|
||||||
|
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||||
|
|
||||||
|
// set some language-dependent strings (optional)
|
||||||
|
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||||
|
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||||
|
$pdf->setLanguageArray($l);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
$pdf->SetDisplayMode('fullpage', 'SinglePage', 'UseNone');
|
||||||
|
|
||||||
|
// set font
|
||||||
|
$pdf->SetFont('times', 'B', 20);
|
||||||
|
|
||||||
|
$pdf->AddPage('P', 'A4');
|
||||||
|
$column_company_name = "<h1>Company Name</h1>";
|
||||||
|
$query = "select k.knd_name as 'company_name' from kimai15_knd k where k.knd_trash = 0 order by k.knd_name";
|
||||||
|
|
||||||
|
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_company_name .= '<input type="checkbox" value="' . $row['company_name'] . '" name="' . $row['company_name'] . '"' . ">" . $row['company_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$column_project_name = "<h1>Project Name</h1>";
|
||||||
|
$query = "select DISTINCT right(p.pct_name,CHAR_LENGTH(p.pct_name) - 8 ) as 'project_name' from kimai15_pct p
|
||||||
|
where p.pct_trash = 0
|
||||||
|
order by project_name";
|
||||||
|
|
||||||
|
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_project_name .= '<input type="checkbox" value="' . $row['project_name'] . '" name="' . $row['project_name'] . '"' . ">" . $row['project_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$column_division_name = "<h1>Divisions</h1>";
|
||||||
|
$query = "select DISTINCT left(p.pct_name,3) as 'pdivision_name' from kimai15_pct p
|
||||||
|
where p.pct_trash = 0
|
||||||
|
order by division_name";
|
||||||
|
|
||||||
|
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_division_name .= '<input type="checkbox" value="' . $row['division_name'] . '" name="' . $row['division_name'] . '"' . ">" . $row['division_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
|
||||||
|
// get current vertical position
|
||||||
|
$y = $pdf->getY();
|
||||||
|
|
||||||
|
// write the first column
|
||||||
|
$pdf->writeHTMLCell(30, '', '', $y, $column_company_name, 1, 0, 0, false, 'L', true);
|
||||||
|
|
||||||
|
|
||||||
|
// write the second column
|
||||||
|
$pdf->writeHTMLCell(30, '', '', '', $column_project_name, 1, 0, 0, false, 'L', false);
|
||||||
|
|
||||||
|
// write the third column
|
||||||
|
$pdf->writeHTMLCell(45, '', '', '', $column_division_name, 1, 1, 0, false, 'L', false);
|
||||||
|
|
||||||
|
|
||||||
|
$pdf->AddPage('L', 'A4');
|
||||||
|
$pdf->writeHTMLCell(45, '', '', '', $column_task_name, 1, 1, 0, false, 'L', true);
|
||||||
|
|
||||||
|
|
||||||
|
$pdf->lastPage();
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
//Close and output PDF document
|
||||||
|
$pdf->Output('example_028.pdf', 'I');
|
||||||
515
core/exportsummary.php
Normal file
515
core/exportsummary.php
Normal file
@@ -0,0 +1,515 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$hostname = "localhost";
|
||||||
|
$username = "kimai";
|
||||||
|
$password = "kimai";
|
||||||
|
$dbname = "kimai";
|
||||||
|
$dbport = "3306";
|
||||||
|
$conn = mysqli_connect($hostname, $username, $password, $dbname, $dbport) or die("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.'),history.go(-1)</script></html>");
|
||||||
|
$file="demo.xls";
|
||||||
|
header("Content-type: application/vnd.ms-excel");
|
||||||
|
header("Content-Disposition: attachment; filename=$file");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$in = $_POST['in'];
|
||||||
|
$out = $_POST['out'];
|
||||||
|
$usrname = $_POST['usrname'];
|
||||||
|
|
||||||
|
|
||||||
|
$date_string = '';
|
||||||
|
$fromdate = gmdate("Y-m-d", $in);
|
||||||
|
$todate = gmdate("Y-m-d", $out);
|
||||||
|
|
||||||
|
|
||||||
|
$date = $todate;
|
||||||
|
$date1 = str_replace('-', '/', $date);
|
||||||
|
$todate = date('Y-m-d', strtotime($date1 . "+1 days"));
|
||||||
|
|
||||||
|
$date = $fromdate;
|
||||||
|
$date1 = str_replace('-', '/', $date);
|
||||||
|
$fromdate = date('Y-m-d', strtotime($date1 . "+1 days"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "select u.reported_div from kimai15_usr u where u.usr_name = '$usrname'";
|
||||||
|
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
|
$selected_division = $row['reported_div'];
|
||||||
|
}
|
||||||
|
|
||||||
|
mysqli_query($con, "SET SESSION sql_mode = 'TRADITIONAL'");
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1>Time Analysis for <?php echo $selected_division ?> division(s) </h1>
|
||||||
|
<h2><?php echo $fromdate . " - " . gmdate("Y-m-d", $out); ?></h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<legend>Project Chart</legend>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
try {
|
||||||
|
if ($selected_division == "ALL") {
|
||||||
|
$wheresub = "";
|
||||||
|
$where = "";
|
||||||
|
} else {
|
||||||
|
$wheresub = " and usr.usr_div = '$selected_division' ";
|
||||||
|
$where = " and u.usr_div = '$selected_division' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
$con = new PDO("mysql:host=$hostname;dbname=$dbname", "$username", "$password");
|
||||||
|
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
$query = "SELECT un.name,un.division,
|
||||||
|
b.Billable,
|
||||||
|
nb.Non_Billable as 'Non-billable',
|
||||||
|
up.Unproductive,
|
||||||
|
(case when th.Total_Hours is null then 0.00 else th.Total_Hours end) as 'Total Hours',
|
||||||
|
(5 * (DATEDIFF('$todate', '$fromdate') DIV 7) + MID('0123455501234445012333450122234501101234000123450', 7 * WEEKDAY('$fromdate') + WEEKDAY('$todate') + 1, 1)) * 8.5 as 'Core Working Hours',
|
||||||
|
round((((case when th.Total_Hours is null then 0.00 else th.Total_Hours end))-((5 * (DATEDIFF('$todate', '$fromdate') DIV 7) + MID('0123455501234445012333450122234501101234000123450', 7 * WEEKDAY('$fromdate') + WEEKDAY('$todate') + 1, 1)) * 8.5)),2) as 'Difference'
|
||||||
|
FROM
|
||||||
|
(select u.usr_alias as 'Name', u.usr_div as 'Division'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
u.usr_active = 1
|
||||||
|
$where
|
||||||
|
group by u.usr_name) un
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT usr.usr_alias, (case when (round(sum(zef.zef_time) / 3600,2)) is null then 0 else (round(sum(zef.zef_time) / 3600,2)) end) as Total_Hours
|
||||||
|
FROM kimai15_zef zef
|
||||||
|
INNER JOIN kimai15_usr usr on zef.zef_usrID = usr.usr_ID
|
||||||
|
inner join kimai15_pct pct on zef.zef_pctID=pct.pct_ID
|
||||||
|
WHERE zef.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d'))
|
||||||
|
and zef.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d')) group by usr.usr_name) th
|
||||||
|
ON (un.name=th.usr_alias)
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT usr.usr_alias, round(sum(zef.zef_time) / 3600,2) as Billable FROM kimai15_zef zef
|
||||||
|
INNER JOIN kimai15_usr usr on zef.zef_usrID = usr.usr_ID
|
||||||
|
INNER JOIN kimai15_pct pct on zef.zef_pctID=pct.pct_ID
|
||||||
|
WHERE pct.pct_billable = 0
|
||||||
|
and zef.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d'))
|
||||||
|
and zef.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d')) group by usr.usr_name) b
|
||||||
|
ON (un.name=b.usr_alias)
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT usr.usr_alias, round(sum(zef.zef_time) / 3600,2) AS Non_Billable FROM kimai15_zef zef
|
||||||
|
INNER JOIN kimai15_usr usr on zef.zef_usrID = usr.usr_ID
|
||||||
|
INNER JOIN kimai15_pct pct on zef.zef_pctID=pct.pct_ID
|
||||||
|
WHERE pct.pct_billable = 1
|
||||||
|
and zef.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d'))
|
||||||
|
and zef.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d')) group by usr.usr_name) nb
|
||||||
|
ON (un.name=nb.usr_alias)
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT usr.usr_alias, round(sum(zef.zef_time) / 3600,2) AS Unproductive FROM kimai15_zef zef
|
||||||
|
INNER JOIN kimai15_usr usr on zef.zef_usrID = usr.usr_ID
|
||||||
|
INNER JOIN kimai15_pct pct on zef.zef_pctID=pct.pct_ID
|
||||||
|
WHERE pct.pct_billable = 2
|
||||||
|
and zef.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d'))
|
||||||
|
and zef.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d')) group by usr.usr_name) up
|
||||||
|
ON (un.name=up.usr_alias)";
|
||||||
|
//echo $query;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo '<table id="myTable" border="1" cellpadding="3" cellspacing="0">';
|
||||||
|
$result = $con->query($query);
|
||||||
|
//return only the first row (we only need field names)
|
||||||
|
$row = $result->fetch(PDO::FETCH_ASSOC);
|
||||||
|
echo " <tr> \n";
|
||||||
|
foreach ($row as $field => $value) {
|
||||||
|
echo " <th>$field</th> \n";
|
||||||
|
} // end foreach
|
||||||
|
echo " </tr> \n";
|
||||||
|
//second query gets the data
|
||||||
|
$data = $con->query($query);
|
||||||
|
$data->setFetchMode(PDO::FETCH_ASSOC);
|
||||||
|
foreach ($data as $row) {
|
||||||
|
echo " <tr> \n";
|
||||||
|
foreach ($row as $name => $value) {
|
||||||
|
echo " <td>$value</td> \n";
|
||||||
|
} // end field loop
|
||||||
|
echo " </tr> \n";
|
||||||
|
} // end record loop
|
||||||
|
echo "</table> \n";
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo 'ERROR: ' . $e->getMessage();
|
||||||
|
} // end try
|
||||||
|
?>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<legend>Total Hours by Billable Projects</legend>
|
||||||
|
<table class="mytable" border="1px" style="margin: 10px; width: 99%; font-size: 9px">
|
||||||
|
<thead class="myth">
|
||||||
|
<tr class="myth">
|
||||||
|
<th class="myth">Company Name</th>
|
||||||
|
<th class="myth">Project Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sqlyu = "select u.usr_name as 'name', u.usr_alias as 'alias' from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_billable = 0
|
||||||
|
$where
|
||||||
|
group by u.usr_name
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
$resultyu = mysqli_query($conn, $sqlyu);
|
||||||
|
|
||||||
|
while ($rowyu = mysqli_fetch_array($resultyu)) {
|
||||||
|
|
||||||
|
$nameyu = $rowyu['name'];
|
||||||
|
$aliasyu = $rowyu['alias'];
|
||||||
|
echo "<th class='myth'>$aliasyu</th>";
|
||||||
|
$namesyu[] = $nameyu;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th class="myth">TOTAL</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sqlyu = "select k.knd_name as companyname, p.pct_name as project, ROUND(SUM(e.zef_time) / 3600, 2) as project_total from kimai15_zef e
|
||||||
|
join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
inner join kimai15_knd k on p.pct_kndID=k.knd_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_billable = 0
|
||||||
|
$where
|
||||||
|
group by p.pct_name
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
$resultyu = mysqli_query($conn, $sqlyu);
|
||||||
|
$totalforreportyu = 0;
|
||||||
|
while ($rowyu = mysqli_fetch_array($resultyu)) {
|
||||||
|
$projecttotalyu = $rowyu['project_total'];
|
||||||
|
$projectyu = $rowyu['project'];
|
||||||
|
$companynameyu = $rowyu['companyname'];
|
||||||
|
echo "<tr><td class='mytd'>$companynameyu</td><td class='mytd'>$projectyu</td>";
|
||||||
|
foreach ($namesyu as $nameyu) {
|
||||||
|
$sqlayu = "select ROUND(SUM(e.zef_time) / 3600, 2) as 'totaltime'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_name = '$projectyu'
|
||||||
|
and u.usr_name = '$nameyu'
|
||||||
|
and p.pct_billable = 0
|
||||||
|
$where
|
||||||
|
group by p.pct_name";
|
||||||
|
$result1yu = mysqli_query($conn, $sqlayu);
|
||||||
|
|
||||||
|
|
||||||
|
$totalyu = 0;
|
||||||
|
if (mysqli_num_rows($result1yu) != 0) {
|
||||||
|
while ($rowyu = mysqli_fetch_array($result1yu)) {
|
||||||
|
$timeyu = $rowyu['totaltime'];
|
||||||
|
echo "<td>$timeyu</td>";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "<td></td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<td>$projecttotalyu</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
$totalforreportyu = $totalforreportyu + $projecttotalyu;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>TOTAL</td><td></td>
|
||||||
|
<?php
|
||||||
|
foreach ($namesyu as $nameyu) {
|
||||||
|
$sqlyu = "select u.usr_alias as name, ROUND(SUM(e.zef_time) / 3600, 2) as 'totaltime'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and u.usr_name = '$nameyu'
|
||||||
|
and p.pct_billable = 0
|
||||||
|
$where
|
||||||
|
group by u.usr_name";
|
||||||
|
$resultyu = mysqli_query($conn, $sqlyu);
|
||||||
|
|
||||||
|
while ($rowyu = mysqli_fetch_array($resultyu)) {
|
||||||
|
$timeyu = $rowyu['totaltime'];
|
||||||
|
echo "<td>$timeyu</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<td>$totalforreportyu</td>";
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<legend>Total Hours by Non-billable Projects</legend>
|
||||||
|
<table class="mytable" border="1px" style="margin: 10px; width: 99%; font-size: 9px">
|
||||||
|
<thead class="myth">
|
||||||
|
<tr class="myth">
|
||||||
|
<th class="myth">Company Name</th>
|
||||||
|
<th class="myth">Project Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql = "select u.usr_name as 'name', u.usr_alias as 'alias' from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_billable = 1
|
||||||
|
$where
|
||||||
|
group by u.usr_name
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
$name = $row['name'];
|
||||||
|
$alias = $row['alias'];
|
||||||
|
echo "<th class='myth'>$alias</th>";
|
||||||
|
$names[] = $name;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th class="myth">TOTAL</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql = "select k.knd_name as companyname, p.pct_name as project, ROUND(SUM(e.zef_time) / 3600, 2) as project_total from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
inner join kimai15_knd k on p.pct_kndID=k.knd_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_billable = 1
|
||||||
|
$where
|
||||||
|
group by p.pct_name
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
$totalforreport = 0;
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
$projecttotal = $row['project_total'];
|
||||||
|
$project = $row['project'];
|
||||||
|
$companyname = $row['companyname'];
|
||||||
|
echo "<tr><td class='mytd'>$companyname</td><td class='mytd'>$project</td>";
|
||||||
|
foreach ($names as $name) {
|
||||||
|
$sqla = "select ROUND(SUM(e.zef_time) / 3600, 2) as 'totaltime'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_name = '$project'
|
||||||
|
and u.usr_name = '$name'
|
||||||
|
and p.pct_billable = 1
|
||||||
|
$where
|
||||||
|
group by p.pct_name";
|
||||||
|
$result1 = mysqli_query($conn, $sqla);
|
||||||
|
|
||||||
|
|
||||||
|
$total = 0;
|
||||||
|
if (mysqli_num_rows($result1) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result1)) {
|
||||||
|
$time = $row['totaltime'];
|
||||||
|
echo "<td>$time</td>";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "<td></td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<td>$projecttotal</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
$totalforreport = $totalforreport + $projecttotal;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>TOTAL</td><td></td>
|
||||||
|
<?php
|
||||||
|
foreach ($names as $name) {
|
||||||
|
$sql = "select u.usr_alias as name, ROUND(SUM(e.zef_time) / 3600, 2) as 'totaltime'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and u.usr_name = '$name'
|
||||||
|
and p.pct_billable = 1
|
||||||
|
$where
|
||||||
|
group by u.usr_name";
|
||||||
|
$result = mysqli_query($conn, $sql);
|
||||||
|
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
$time = $row['totaltime'];
|
||||||
|
echo "<td>$time</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<td>$totalforreport</td>";
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<legend>Total Hours by Unproductive Projects</legend>
|
||||||
|
<table class="mytable" border="1px" style="margin: 10px; width: 99%; font-size: 9px">
|
||||||
|
<thead class="myth">
|
||||||
|
<tr class="myth">
|
||||||
|
<th class="myth">Company Name</th>
|
||||||
|
<th class="myth">Project Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sqlui = "select u.usr_name as 'name', u.usr_alias as 'alias' from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_billable = 2
|
||||||
|
$where
|
||||||
|
group by u.usr_name
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
$resultui = mysqli_query($conn, $sqlui);
|
||||||
|
|
||||||
|
while ($rowui = mysqli_fetch_array($resultui)) {
|
||||||
|
|
||||||
|
$nameui = $rowui['name'];
|
||||||
|
$aliasui = $rowui['alias'];
|
||||||
|
echo "<th class='myth'>$aliasui</th>";
|
||||||
|
$namesui[] = $nameui;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th class="myth">TOTAL</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sqlui = "select k.knd_name as companyname ,p.pct_name as project, ROUND(SUM(e.zef_time) / 3600, 2) as project_total from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
inner join kimai15_knd k on p.pct_kndID=k.knd_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_billable = 2
|
||||||
|
$where
|
||||||
|
group by p.pct_name
|
||||||
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$resultui = mysqli_query($conn, $sqlui);
|
||||||
|
$totalforreportui = 0;
|
||||||
|
while ($rowui = mysqli_fetch_array($resultui)) {
|
||||||
|
$projecttotalui = $rowui['project_total'];
|
||||||
|
$projectui = $rowui['project'];
|
||||||
|
$companynameui = $rowui['companyname'];
|
||||||
|
echo "<tr><td class='mytd'>$companynameui</td><td class='mytd'>$projectui</td>";
|
||||||
|
foreach ($namesui as $nameui) {
|
||||||
|
$sqlaui = "select ROUND(SUM(e.zef_time) / 3600, 2) as 'totaltime'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and p.pct_name = '$projectui'
|
||||||
|
and u.usr_name = '$nameui'
|
||||||
|
and p.pct_billable = 2
|
||||||
|
$where
|
||||||
|
group by p.pct_name";
|
||||||
|
$result1ui = mysqli_query($conn, $sqlaui);
|
||||||
|
|
||||||
|
|
||||||
|
$totalui = 0;
|
||||||
|
if (mysqli_num_rows($result1ui) != 0) {
|
||||||
|
while ($rowui = mysqli_fetch_array($result1ui)) {
|
||||||
|
$timeui = $rowui['totaltime'];
|
||||||
|
echo "<td>$timeui</td>";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "<td></td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<td>$projecttotalui</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
$totalforreportui = $totalforreportui + $projecttotalui;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>TOTAL</td><td></td>
|
||||||
|
<?php
|
||||||
|
foreach ($namesui as $nameui) {
|
||||||
|
$sqlui = "select u.usr_alias as name, ROUND(SUM(e.zef_time) / 3600, 2) as 'totaltime'
|
||||||
|
from kimai15_zef e
|
||||||
|
inner join kimai15_usr u on e.zef_usrID=u.usr_ID
|
||||||
|
inner join kimai15_pct p on e.zef_pctID=p.pct_ID
|
||||||
|
where
|
||||||
|
e.zef_in > UNIX_TIMESTAMP(DATE_FORMAT('$fromdate','%Y-%m-%d')) and
|
||||||
|
e.zef_in < UNIX_TIMESTAMP(DATE_FORMAT('$todate','%Y-%m-%d'))
|
||||||
|
and u.usr_name = '$nameui'
|
||||||
|
and p.pct_billable = 2
|
||||||
|
$where
|
||||||
|
group by u.usr_name";
|
||||||
|
$resultui = mysqli_query($conn, $sqlui);
|
||||||
|
|
||||||
|
while ($rowui = mysqli_fetch_array($resultui)) {
|
||||||
|
$timeui = $rowui['totaltime'];
|
||||||
|
echo "<td>$timeui</td>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<td>$totalforreportui</td>";
|
||||||
|
?>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
230
core/floaters.php
Normal file
230
core/floaters.php
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* =============================
|
||||||
|
* = Floating Window Generator =
|
||||||
|
* =============================
|
||||||
|
*
|
||||||
|
* Called via AJAX from the Kimai user interface. Depending on $axAction
|
||||||
|
* some HTML will be returned, which will then be shown in a floater.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// insert KSPI
|
||||||
|
$isCoreProcessor = 1;
|
||||||
|
$dir_templates = "templates/floaters/"; // folder of the template files
|
||||||
|
require("../includes/kspi.php");
|
||||||
|
|
||||||
|
|
||||||
|
switch ($axAction) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the credits floater. The copyright will automatically be
|
||||||
|
* set from 2006 to the current year.
|
||||||
|
*/
|
||||||
|
case 'credits':
|
||||||
|
$tpl->assign('devtimespan', '2006-'.date('y'));
|
||||||
|
|
||||||
|
$tpl->display("credits.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the timesheet floater.
|
||||||
|
*/
|
||||||
|
case 'printTimesheet':
|
||||||
|
|
||||||
|
$sel = makeSelectBox("tpl", "name");
|
||||||
|
$tpl->assign('sel_tpl_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_tpl_IDs', $sel[1]);
|
||||||
|
$sel = get_arr_tpl("name");
|
||||||
|
$tpl->assign('tpl_template', $sel);
|
||||||
|
|
||||||
|
$tpl->assign('usr_usr_ID', $kga['usr']['usr_ID']);
|
||||||
|
|
||||||
|
//var_dump($data);
|
||||||
|
$tpl->display("timesheet.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the credits floater. The copyright will automatically be
|
||||||
|
* set from 2006 to the current year.
|
||||||
|
*/
|
||||||
|
case 'securityWarning':
|
||||||
|
if ($axValue == 'installer') {
|
||||||
|
|
||||||
|
$tpl->display("security_warning.tpl");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the preferences dialog.
|
||||||
|
*/
|
||||||
|
case 'prefs':
|
||||||
|
if (isset($kga['customer'])) die();
|
||||||
|
|
||||||
|
$tpl->assign('skins', ls("../skins"));
|
||||||
|
$tpl->assign('langs', langs());
|
||||||
|
$tpl->assign('timezones', timezoneList());
|
||||||
|
$tpl->assign('usr', $kga['usr']);
|
||||||
|
$tpl->assign('rate', get_rate($kga['usr']['usr_ID'],NULL,NULL));
|
||||||
|
|
||||||
|
$tpl->display("preferences.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the dialog to add or edit a customer.
|
||||||
|
*/
|
||||||
|
case 'add_edit_knd':
|
||||||
|
if (isset($kga['customer']) || $kga['usr']['usr_sts']==2) die();
|
||||||
|
|
||||||
|
if ($id) {
|
||||||
|
// Edit mode. Fill the dialog with the data of the customer.
|
||||||
|
|
||||||
|
$data = knd_get_data($id);
|
||||||
|
if ($data) {
|
||||||
|
$tpl->assign('knd_name' , $data['knd_name' ]);
|
||||||
|
$tpl->assign('knd_comment' , $data['knd_comment' ]);
|
||||||
|
$tpl->assign('knd_password' , $data['knd_password']);
|
||||||
|
$tpl->assign('knd_company' , $data['knd_company' ]);
|
||||||
|
$tpl->assign('knd_vat' , $data['knd_vat' ]);
|
||||||
|
$tpl->assign('knd_contact' , $data['knd_contact' ]);
|
||||||
|
$tpl->assign('knd_street' , $data['knd_street' ]);
|
||||||
|
$tpl->assign('knd_zipcode' , $data['knd_zipcode' ]);
|
||||||
|
$tpl->assign('knd_city' , $data['knd_city' ]);
|
||||||
|
$tpl->assign('knd_tel' , $data['knd_tel' ]);
|
||||||
|
$tpl->assign('knd_fax' , $data['knd_fax' ]);
|
||||||
|
$tpl->assign('knd_mobile' , $data['knd_mobile' ]);
|
||||||
|
$tpl->assign('knd_mail' , $data['knd_mail' ]);
|
||||||
|
$tpl->assign('knd_homepage' , $data['knd_homepage']);
|
||||||
|
$tpl->assign('knd_visible' , $data['knd_visible' ]);
|
||||||
|
$tpl->assign('knd_filter' , $data['knd_filter' ]);
|
||||||
|
$tpl->assign('grp_selection', knd_get_grps($id));
|
||||||
|
$tpl->assign('id', $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// create the <select> element for the groups
|
||||||
|
$sel = makeSelectBox("grp",$kga['usr']['usr_grp']);
|
||||||
|
$tpl->assign('sel_grp_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_grp_IDs', $sel[1]);
|
||||||
|
|
||||||
|
// A new customer is assigned to the group of the current user by default.
|
||||||
|
if (!$id) {
|
||||||
|
$grp_selection[]=$kga['usr']['usr_grp'];
|
||||||
|
$tpl->assign('grp_selection', $grp_selection);
|
||||||
|
$tpl->assign('id', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->display("add_edit_knd.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the dialog to add or edit a project.
|
||||||
|
*/
|
||||||
|
case 'add_edit_pct':
|
||||||
|
if (isset($kga['customer']) || $kga['usr']['usr_sts']==2) die();
|
||||||
|
|
||||||
|
if ($id) {
|
||||||
|
$data = pct_get_data($id);
|
||||||
|
if ($data) {
|
||||||
|
$tpl->assign('pct_name' , $data['pct_name' ]);
|
||||||
|
$tpl->assign('pct_comment' , $data['pct_comment' ]);
|
||||||
|
$tpl->assign('pct_visible' , $data['pct_visible' ]);
|
||||||
|
$tpl->assign('pct_internal' , $data['pct_internal' ]);
|
||||||
|
$tpl->assign('pct_filter' , $data['pct_filter' ]);
|
||||||
|
$tpl->assign('pct_budget' , $data['pct_budget' ]);
|
||||||
|
$tpl->assign('knd_selection' , $data['pct_kndID' ]);
|
||||||
|
$tpl->assign('evt_selection' , pct_get_evts($id) );
|
||||||
|
$tpl->assign('pct_default_rate', $data['pct_default_rate']);
|
||||||
|
$tpl->assign('pct_my_rate' , $data['pct_my_rate' ]);
|
||||||
|
$tpl->assign('grp_selection', pct_get_grps($id));
|
||||||
|
$tpl->assign('id', $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Create a <select> element to chosse the customer.
|
||||||
|
$sel = makeSelectBox("knd",$kga['usr']['usr_grp'],isset($data)?$data['pct_kndID']:null);
|
||||||
|
$tpl->assign('sel_knd_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_knd_IDs', $sel[1]);
|
||||||
|
|
||||||
|
// Create a <select> element to chosse the events.
|
||||||
|
$sel = makeSelectBox("evt",$kga['usr']['usr_grp']);
|
||||||
|
$tpl->assign('sel_evt_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_evt_IDs', $sel[1]);
|
||||||
|
|
||||||
|
// Create a <select> element to chosse the groups.
|
||||||
|
$sel = makeSelectBox("grp",$kga['usr']['usr_grp']);
|
||||||
|
$tpl->assign('sel_grp_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_grp_IDs', $sel[1]);
|
||||||
|
|
||||||
|
// Set defaults for a new project.
|
||||||
|
if (!$id) {
|
||||||
|
$grp_selection[]=$kga['usr']['usr_grp'];
|
||||||
|
$tpl->assign('grp_selection', $grp_selection);
|
||||||
|
|
||||||
|
$tpl->assign('knd_selection', null);
|
||||||
|
$tpl->assign('id', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->display("add_edit_pct.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the dialog to add or edit an event.
|
||||||
|
*/
|
||||||
|
case 'add_edit_evt':
|
||||||
|
if (isset($kga['customer']) || $kga['usr']['usr_sts']==2) die();
|
||||||
|
|
||||||
|
if ($id) {
|
||||||
|
$data = evt_get_data($id);
|
||||||
|
if ($data) {
|
||||||
|
$tpl->assign('evt_name' , $data['evt_name' ]);
|
||||||
|
$tpl->assign('evt_comment' , $data['evt_comment' ]);
|
||||||
|
$tpl->assign('evt_visible' , $data['evt_visible' ]);
|
||||||
|
$tpl->assign('evt_filter' , $data['evt_filter' ]);
|
||||||
|
$tpl->assign('evt_default_rate', $data['evt_default_rate']);
|
||||||
|
$tpl->assign('evt_my_rate' , $data['evt_my_rate' ]);
|
||||||
|
$tpl->assign('grp_selection', evt_get_grps($id));
|
||||||
|
$tpl->assign('pct_selection', evt_get_pcts($id));
|
||||||
|
$tpl->assign('id', $id);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a <select> element to chosse the groups.
|
||||||
|
$sel = makeSelectBox("grp",$kga['usr']['usr_grp']);
|
||||||
|
$tpl->assign('sel_grp_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_grp_IDs', $sel[1]);
|
||||||
|
|
||||||
|
// Create a <select> element to chosse the projects.
|
||||||
|
$sel = makeSelectBox("pct",$kga['usr']['usr_grp']);
|
||||||
|
$tpl->assign('sel_pct_names', $sel[0]);
|
||||||
|
$tpl->assign('sel_pct_IDs', $sel[1]);
|
||||||
|
|
||||||
|
// Set defaults for a new project.
|
||||||
|
if (!$id) {
|
||||||
|
$grp_selection[]=$kga['usr']['usr_grp'];
|
||||||
|
$tpl->assign('grp_selection', $grp_selection);
|
||||||
|
$tpl->assign('id', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->display("add_edit_evt.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
502
core/kimai.php
Normal file
502
core/kimai.php
Normal file
@@ -0,0 +1,502 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
if ($_POST['changebillable_submit']) {
|
||||||
|
foreach ($_POST as $key => $value) {
|
||||||
|
$con = new PDO('mysql:host=localhost;dbname=kimai', "kimai", "kimai");
|
||||||
|
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
if ($key == "changebillable_submit") {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE kimai15_pct SET `pct_billable`=$value WHERE `pct_ID`=$key;";
|
||||||
|
$result = $con->query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
|
header('Location: ' . $actual_link);
|
||||||
|
}
|
||||||
|
|
||||||
|
// =============================
|
||||||
|
// = Smarty (initialize class) =
|
||||||
|
// =============================
|
||||||
|
require_once('../libraries/smarty/Smarty.class.php');
|
||||||
|
$tpl = new Smarty();
|
||||||
|
$tpl->template_dir = '../templates/';
|
||||||
|
$tpl->compile_dir = '../compile/';
|
||||||
|
|
||||||
|
// prevent IE from caching the response
|
||||||
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
header('Access-Control-Allow-Origin: *');
|
||||||
|
|
||||||
|
// ==================================
|
||||||
|
// = implementing standard includes =
|
||||||
|
// ==================================
|
||||||
|
include('../includes/basics.php');
|
||||||
|
|
||||||
|
$usr = checkUser();
|
||||||
|
if ($_POST['selected_division']) {
|
||||||
|
$selected_division = $_POST['selected_division'];
|
||||||
|
$usrname = $usr['usr_name'];
|
||||||
|
$con = mysqli_connect("localhost", "kimai", "kimai", "kimai");
|
||||||
|
if (mysqli_connect_errno()) {
|
||||||
|
echo "Failed to connect to MySQL: " . mysqli_connect_error();
|
||||||
|
}
|
||||||
|
$sql = "UPDATE kimai15_usr SET `reported_div`='$selected_division' WHERE `usr_name`='$usrname';";
|
||||||
|
mysqli_query($con, $sql);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
|
header('Location: ' . $actual_link);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Jedes neue update schreibt seine Versionsnummer in die Datenbank.
|
||||||
|
// Beim nächsten Update kommt dann in der Datei /includes/var.php die neue V-Nr. mit.
|
||||||
|
// der updater.php weiss dann welche Aenderungen an der Datenbank vorgenommen werden muessen.
|
||||||
|
checkDBversion("..");
|
||||||
|
|
||||||
|
$tpl->assign('browser', get_agent());
|
||||||
|
|
||||||
|
// =========================================
|
||||||
|
// = PARSE EXTENSION CONFIGS (ext_configs) =
|
||||||
|
// =========================================
|
||||||
|
|
||||||
|
if ($handle = opendir('../extensions/')) {
|
||||||
|
chdir("../extensions/");
|
||||||
|
$ext_configs = array();
|
||||||
|
|
||||||
|
$css_extension_files = array();
|
||||||
|
$js_extension_files = array();
|
||||||
|
$extensions = array();
|
||||||
|
$tab_change_trigger = array();
|
||||||
|
$tss_hooks = array();
|
||||||
|
$rec_hooks = array();
|
||||||
|
$stp_hooks = array();
|
||||||
|
$chu_hooks = array();
|
||||||
|
$chk_hooks = array();
|
||||||
|
$chp_hooks = array();
|
||||||
|
$che_hooks = array();
|
||||||
|
$lft_hooks = array(); // list filter hooks
|
||||||
|
$rsz_hooks = array(); // resize hooks
|
||||||
|
$timeouts = array();
|
||||||
|
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
|
||||||
|
if (is_dir($file) AND ( $file != ".") AND ( $file != "..") AND ( substr($file, 0) != ".") AND ( substr($file, 0, 1) != "#")) {
|
||||||
|
if (file_exists($file . '/config.ini')) {
|
||||||
|
$settings = parse_ini_file($file . '/config.ini');
|
||||||
|
|
||||||
|
// Check if user has the correct rank to use this extension
|
||||||
|
if (isset($kga['usr']))
|
||||||
|
switch ($kga['usr']['usr_sts']) {
|
||||||
|
case 0:
|
||||||
|
if ($settings['ADMIN_ALLOWED'] == "1") {
|
||||||
|
$extensions[] = $settings;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if ($settings['GROUP_LEADER_ALLOWED'] == "1") {
|
||||||
|
$extensions[] = $settings;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if ($settings['USER_ALLOWED'] == "1") {
|
||||||
|
$extensions[] = $settings;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} else if ($settings['CUSTOMER_ALLOWED'] == "1")
|
||||||
|
$extensions[] = $settings;
|
||||||
|
|
||||||
|
foreach ($settings as $key => $value) {
|
||||||
|
|
||||||
|
// add CSS files
|
||||||
|
if ($key == 'CSS_INCLUDE_FILES') {
|
||||||
|
if (is_array($value)) {
|
||||||
|
foreach ($value as $subvalue) {
|
||||||
|
if (!in_array($subvalue, $css_extension_files)) {
|
||||||
|
$css_extension_files[] = $subvalue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!in_array($value, $css_extension_files)) {
|
||||||
|
$css_extension_files[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add JavaScript files
|
||||||
|
if ($key == 'JS_INCLUDE_FILES') {
|
||||||
|
if (is_array($value)) {
|
||||||
|
foreach ($value as $subvalue) {
|
||||||
|
if (!in_array($subvalue, $js_extension_files)) {
|
||||||
|
$js_extension_files[] = $subvalue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!in_array($value, $js_extension_files)) {
|
||||||
|
$js_extension_files[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// read trigger function for tab change
|
||||||
|
if ($key == 'TAB_CHANGE_TRIGGER') {
|
||||||
|
$tab_change_trigger[] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// read hook triggers
|
||||||
|
if ($key == 'TIMESPACE_CHANGE_TRIGGER') {
|
||||||
|
$tss_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'BUZZER_RECORD_TRIGGER') {
|
||||||
|
$rec_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'BUZZER_STOP_TRIGGER') {
|
||||||
|
$stp_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'CHANGE_USR_TRIGGER') {
|
||||||
|
$chu_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'CHANGE_KND_TRIGGER') {
|
||||||
|
$chk_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'CHANGE_PCT_TRIGGER') {
|
||||||
|
$chp_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'CHANGE_EVT_TRIGGER') {
|
||||||
|
$che_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'LIST_FILTER_TRIGGER') {
|
||||||
|
$lft_hooks[] = $value;
|
||||||
|
}
|
||||||
|
if ($key == 'RESIZE_TRIGGER') {
|
||||||
|
$rsz_hooks[] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add Timeout clearing
|
||||||
|
|
||||||
|
if ($key == 'REG_TIMEOUTS') {
|
||||||
|
if (is_array($value)) {
|
||||||
|
foreach ($value as $subvalue) {
|
||||||
|
if (!in_array($subvalue, $timeouts)) {
|
||||||
|
$timeouts[] = $subvalue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!in_array($value, $timeouts)) {
|
||||||
|
$timeouts[] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================
|
||||||
|
// = initialize currently displayed timespace =
|
||||||
|
// ============================================
|
||||||
|
$timespace = get_timespace();
|
||||||
|
$in = $timespace[0];
|
||||||
|
$out = $timespace[1];
|
||||||
|
|
||||||
|
// ===============================================
|
||||||
|
// = get time for the probably running stopwatch =
|
||||||
|
// ===============================================
|
||||||
|
$current_timer = array();
|
||||||
|
if (isset($kga['customer'])) {
|
||||||
|
$current_timer['all'] = 0;
|
||||||
|
$current_timer['hour'] = 0;
|
||||||
|
$current_timer['min'] = 0;
|
||||||
|
$current_timer['sec'] = 0;
|
||||||
|
} else
|
||||||
|
$current_timer = get_current_timer();
|
||||||
|
|
||||||
|
// =======================================
|
||||||
|
// = Display date and time in the header =
|
||||||
|
// =======================================
|
||||||
|
$wd = $kga['lang']['weekdays_short'][date("w", time())];
|
||||||
|
|
||||||
|
$dp_start = 0;
|
||||||
|
if ($kga['calender_start'] != "")
|
||||||
|
$dp_start = $kga['calender_start'];
|
||||||
|
else if (isset($kga['usr']))
|
||||||
|
$dp_start = date("d/m/Y", getjointime($kga['usr']['usr_ID']));
|
||||||
|
|
||||||
|
|
||||||
|
$dp_today = date("d/m/Y", time());
|
||||||
|
|
||||||
|
$tpl->assign('dp_start', $dp_start);
|
||||||
|
$tpl->assign('dp_today', $dp_today);
|
||||||
|
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$tpl->assign('total', formatDuration(get_zef_time($in, $out, null, array($kga['customer']['knd_ID']))));
|
||||||
|
else
|
||||||
|
$tpl->assign('total', formatDuration(get_zef_time($in, $out, $kga['usr']['usr_ID'])));
|
||||||
|
|
||||||
|
// ===========================
|
||||||
|
// = DatePicker localization =
|
||||||
|
// ===========================
|
||||||
|
$localized_DatePicker = "";
|
||||||
|
|
||||||
|
$tpl->assign('weekdays_array', sprintf("['%s','%s','%s','%s','%s','%s','%s']\n"
|
||||||
|
, $kga['lang']['weekdays'][0], $kga['lang']['weekdays'][1], $kga['lang']['weekdays'][2], $kga['lang']['weekdays'][3], $kga['lang']['weekdays'][4], $kga['lang']['weekdays'][5], $kga['lang']['weekdays'][6]));
|
||||||
|
|
||||||
|
$tpl->assign('weekdays_short_array', sprintf("['%s','%s','%s','%s','%s','%s','%s']\n"
|
||||||
|
, $kga['lang']['weekdays_short'][0], $kga['lang']['weekdays_short'][1], $kga['lang']['weekdays_short'][2], $kga['lang']['weekdays_short'][3], $kga['lang']['weekdays_short'][4], $kga['lang']['weekdays_short'][5], $kga['lang']['weekdays_short'][6]));
|
||||||
|
|
||||||
|
$tpl->assign('months_array', sprintf("['%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s']\n", $kga['lang']['months'][0], $kga['lang']['months'][1], $kga['lang']['months'][2], $kga['lang']['months'][3], $kga['lang']['months'][4], $kga['lang']['months'][5], $kga['lang']['months'][6], $kga['lang']['months'][7], $kga['lang']['months'][8], $kga['lang']['months'][9], $kga['lang']['months'][10], $kga['lang']['months'][11]));
|
||||||
|
|
||||||
|
$tpl->assign('months_short_array', sprintf("['%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s']", $kga['lang']['months_short'][0], $kga['lang']['months_short'][1], $kga['lang']['months_short'][2], $kga['lang']['months_short'][3], $kga['lang']['months_short'][4], $kga['lang']['months_short'][5], $kga['lang']['months_short'][6], $kga['lang']['months_short'][7], $kga['lang']['months_short'][8], $kga['lang']['months_short'][9], $kga['lang']['months_short'][10], $kga['lang']['months_short'][11]));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ==============================
|
||||||
|
// = assign smarty placeholders =
|
||||||
|
// ==============================
|
||||||
|
$tpl->assign('current_timer_hour', $current_timer['hour']);
|
||||||
|
$tpl->assign('current_timer_min', $current_timer['min']);
|
||||||
|
$tpl->assign('current_timer_sec', $current_timer['sec']);
|
||||||
|
$tpl->assign('current_timer_start', $current_timer['all'] ? $current_timer['all'] : time());
|
||||||
|
$tpl->assign('current_time', time());
|
||||||
|
|
||||||
|
$tpl->assign('timespace_in', $in);
|
||||||
|
$tpl->assign('timespace_out', $out);
|
||||||
|
|
||||||
|
$tpl->assign('kga', $kga);
|
||||||
|
|
||||||
|
$tpl->assign('extensions', $extensions);
|
||||||
|
$tpl->assign('css_extension_files', $css_extension_files);
|
||||||
|
$tpl->assign('js_extension_files', $js_extension_files);
|
||||||
|
|
||||||
|
if (isset($kga['usr']))
|
||||||
|
$tpl->assign('recstate', get_rec_state($kga['usr']['usr_ID']));
|
||||||
|
else
|
||||||
|
$tpl->assign('recstate', 0);
|
||||||
|
|
||||||
|
$tpl->assign('lang_checkUsername', $kga['lang']['checkUsername']);
|
||||||
|
$tpl->assign('lang_checkGroupname', $kga['lang']['checkGroupname']);
|
||||||
|
|
||||||
|
|
||||||
|
$knd_data = array('knd_ID' => false, 'knd_name' => '');
|
||||||
|
$pct_data = array('pct_ID' => false, 'pct_name' => '');
|
||||||
|
$evt_data = array('evt_ID' => false, 'evt_name' => '');
|
||||||
|
|
||||||
|
if (!isset($kga['customer'])) {
|
||||||
|
//$lastZefRecord = zef_get_data(false);
|
||||||
|
$last_pct = pct_get_data($kga['usr']['lastProject']);
|
||||||
|
$last_evt = evt_get_data($kga['usr']['lastEvent']);
|
||||||
|
if (!$last_pct['pct_trash']) {
|
||||||
|
$pct_data = $last_pct;
|
||||||
|
$knd_data = knd_get_data($last_pct['pct_kndID']);
|
||||||
|
}
|
||||||
|
if (!$last_evt['evt_trash'])
|
||||||
|
$evt_data = $last_evt;
|
||||||
|
}
|
||||||
|
$tpl->assign('knd_data', $knd_data);
|
||||||
|
$tpl->assign('pct_data', $pct_data);
|
||||||
|
$tpl->assign('evt_data', $evt_data);
|
||||||
|
|
||||||
|
|
||||||
|
// =========================================
|
||||||
|
// = INCLUDE EXTENSION PHP FILE =
|
||||||
|
// =========================================
|
||||||
|
$extDir = WEBROOT . 'extensions';
|
||||||
|
if ($handle = opendir($extDir)) {
|
||||||
|
chdir($extDir);
|
||||||
|
$ext_configs = array();
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
if (is_dir($file) AND ( $file != ".") AND ( $file != "..") AND ( substr($file, 0) != ".") AND ( substr($file, 0, 1) != "#")) {
|
||||||
|
if ($subhandle = opendir($extDir . DIRECTORY_SEPARATOR . $file)) {
|
||||||
|
while (false !== ($phpfile = readdir($subhandle))) {
|
||||||
|
if ($phpfile == "kimai_include.php") {
|
||||||
|
require_once($extDir . DIRECTORY_SEPARATOR . $file . DIRECTORY_SEPARATOR . $phpfile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($subhandle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// =======================
|
||||||
|
// = display user table =
|
||||||
|
// =======================
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_usr = array();
|
||||||
|
else
|
||||||
|
$arr_usr = get_arr_watchable_users($kga['usr']['usr_ID']);
|
||||||
|
if (count($arr_usr) > 0) {
|
||||||
|
$tpl->assign('arr_usr', $arr_usr);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_usr', '0');
|
||||||
|
}
|
||||||
|
$tpl->assign('usr_display', $tpl->fetch("lists/usr.tpl"));
|
||||||
|
|
||||||
|
// ==========================
|
||||||
|
// = display customer table =
|
||||||
|
// ========================
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_knd = array(array(
|
||||||
|
'knd_ID' => $kga['customer']['knd_ID'],
|
||||||
|
'knd_name' => $kga['customer']['knd_name'],
|
||||||
|
'knd_visible' => $kga['customer']['knd_visible']));
|
||||||
|
else
|
||||||
|
$arr_knd = get_arr_knd($kga['usr']['usr_grp']);
|
||||||
|
if (count($arr_knd) > 0) {
|
||||||
|
$tpl->assign('arr_knd', $arr_knd);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_knd', '0');
|
||||||
|
}
|
||||||
|
$tpl->assign('knd_display', $tpl->fetch("lists/knd.tpl"));
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// = display project table =
|
||||||
|
// =========================
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_pct = get_arr_pct_by_knd("all", $kga['customer']['knd_ID']);
|
||||||
|
else
|
||||||
|
$arr_pct = get_arr_pct($kga['usr']['usr_grp']);
|
||||||
|
if (count($arr_pct) > 0) {
|
||||||
|
$tpl->assign('arr_pct', $arr_pct);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_pct', '0');
|
||||||
|
}
|
||||||
|
$tpl->assign('pct_display', $tpl->fetch("lists/pct.tpl"));
|
||||||
|
|
||||||
|
// ========================
|
||||||
|
// = display events table =
|
||||||
|
// ========================
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_evt = get_arr_evt_by_knd($kga['customer']['knd_ID']);
|
||||||
|
else if ($pct_data['pct_ID'])
|
||||||
|
$arr_evt = get_arr_evt_by_pct($kga['usr']['usr_grp'], $pct_data['pct_ID']);
|
||||||
|
else
|
||||||
|
$arr_evt = get_arr_evt($kga['usr']['usr_grp']);
|
||||||
|
if (count($arr_evt) > 0) {
|
||||||
|
$tpl->assign('arr_evt', $arr_evt);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_evt', '0');
|
||||||
|
}
|
||||||
|
$tpl->assign('evt_display', $tpl->fetch("lists/evt.tpl"));
|
||||||
|
|
||||||
|
if (isset($kga['usr']))
|
||||||
|
$tpl->assign('showInstallWarning', $kga['usr']['usr_sts'] == 0 && file_exists(WEBROOT . 'installer'));
|
||||||
|
else
|
||||||
|
$tpl->assign('showInstallWarning', false);
|
||||||
|
|
||||||
|
|
||||||
|
// ========================
|
||||||
|
// = BUILD HOOK FUNCTIONS =
|
||||||
|
// ========================
|
||||||
|
|
||||||
|
$hook_tss = "";
|
||||||
|
if (is_array($tss_hooks)) {
|
||||||
|
foreach ($tss_hooks as $hook) {
|
||||||
|
$hook_tss .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_bzzRec = "";
|
||||||
|
if (is_array($rec_hooks)) {
|
||||||
|
foreach ($rec_hooks as $hook) {
|
||||||
|
$hook_bzzRec .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_bzzStp = "";
|
||||||
|
if (is_array($stp_hooks)) {
|
||||||
|
foreach ($stp_hooks as $hook) {
|
||||||
|
$hook_bzzStp .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_chgUsr = "";
|
||||||
|
if (is_array($chu_hooks)) {
|
||||||
|
foreach ($chu_hooks as $hook) {
|
||||||
|
$hook_chgUsr .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_chgKnd = "";
|
||||||
|
if (is_array($chk_hooks)) {
|
||||||
|
foreach ($chk_hooks as $hook) {
|
||||||
|
$hook_chgKnd .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_chgPct = "";
|
||||||
|
if (is_array($chp_hooks)) {
|
||||||
|
foreach ($chp_hooks as $hook) {
|
||||||
|
$hook_chgPct .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_chgEvt = "";
|
||||||
|
if (is_array($che_hooks)) {
|
||||||
|
foreach ($che_hooks as $hook) {
|
||||||
|
$hook_chgEvt .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_filter = "";
|
||||||
|
if (is_array($lft_hooks)) {
|
||||||
|
foreach ($lft_hooks as $hook) {
|
||||||
|
$hook_filter .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$hook_resize = "";
|
||||||
|
if (is_array($rsz_hooks)) {
|
||||||
|
foreach ($rsz_hooks as $hook) {
|
||||||
|
$hook_resize .= $hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->assign('hook_tss', $hook_tss);
|
||||||
|
$tpl->assign('hook_bzzRec', $hook_bzzRec);
|
||||||
|
$tpl->assign('hook_bzzStp', $hook_bzzStp);
|
||||||
|
$tpl->assign('hook_chgUsr', $hook_chgUsr);
|
||||||
|
$tpl->assign('hook_chgKnd', $hook_chgKnd);
|
||||||
|
$tpl->assign('hook_chgPct', $hook_chgPct);
|
||||||
|
$tpl->assign('hook_chgEvt', $hook_chgEvt);
|
||||||
|
$tpl->assign('hook_filter', $hook_filter);
|
||||||
|
$tpl->assign('hook_resize', $hook_resize);
|
||||||
|
|
||||||
|
$timeoutlist = "";
|
||||||
|
foreach ($timeouts as $timeout) {
|
||||||
|
$timeoutlist .= "kill_timeout('" . $timeout . "');";
|
||||||
|
}
|
||||||
|
$tpl->assign('timeoutlist', $timeoutlist);
|
||||||
|
|
||||||
|
$tpl->display('core/main.tpl');
|
||||||
|
?>
|
||||||
259
core/pdf.php
Normal file
259
core/pdf.php
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
<?php
|
||||||
|
$hostname = "localhost";
|
||||||
|
$username = "kimai";
|
||||||
|
$password = "kimai";
|
||||||
|
$dbname = "kimai";
|
||||||
|
$dbport = "3306";
|
||||||
|
|
||||||
|
$con = mysqli_connect($hostname, $username, $password, $dbname, $dbport) or die("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.')</script></html>");
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_010.php
|
||||||
|
// Begin : 2008-03-04
|
||||||
|
// Last Update : 2013-05-14
|
||||||
|
//
|
||||||
|
// Description : Example 010 for TCPDF class
|
||||||
|
// Text on multiple columns
|
||||||
|
//
|
||||||
|
// Author: Nicola Asuni
|
||||||
|
//
|
||||||
|
// (c) Copyright:
|
||||||
|
// Nicola Asuni
|
||||||
|
// Tecnick.com LTD
|
||||||
|
// www.tecnick.com
|
||||||
|
// info@tecnick.com
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an example PDF TEST document using TCPDF
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @abstract TCPDF - Example: Text on multiple columns
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @since 2008-03-04
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include the main TCPDF library (search for installation path).
|
||||||
|
require_once('../extensions/ki_changerequest/templates/tcpdf/tcpdf.php');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extend TCPDF to work with multiple columns
|
||||||
|
*/
|
||||||
|
class MC_TCPDF extends TCPDF {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print chapter
|
||||||
|
* @param $num (int) chapter number
|
||||||
|
* @param $title (string) chapter title
|
||||||
|
* @param $file (string) name of the file containing the chapter body
|
||||||
|
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
public function PrintChapter($num, $title, $file, $mode=false) {
|
||||||
|
// disable existing columns
|
||||||
|
$this->resetColumns();
|
||||||
|
// print chapter title
|
||||||
|
$this->ChapterTitle($num, $title);
|
||||||
|
// set columns
|
||||||
|
$this->setEqualColumns(4,57);
|
||||||
|
// print chapter body
|
||||||
|
$this->ChapterBody($file, $mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set chapter title
|
||||||
|
* @param $num (int) chapter number
|
||||||
|
* @param $title (string) chapter title
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
public function ChapterTitle($num, $title, $width=60) {
|
||||||
|
$this->SetFont('helvetica', '', 14);
|
||||||
|
$this->SetFillColor(200, 220, 255);
|
||||||
|
$this->Cell($width, 6, $title, 0, 1, '', 1);
|
||||||
|
$this->Ln(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print chapter body
|
||||||
|
* @param $file (string) name of the file containing the chapter body
|
||||||
|
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
public function ChapterBody($file, $mode=false) {
|
||||||
|
$this->selectColumn();
|
||||||
|
// get esternal file content
|
||||||
|
$content = $file;
|
||||||
|
// set font
|
||||||
|
$this->SetFont('times', '', 9);
|
||||||
|
$this->SetTextColor(50, 50, 50);
|
||||||
|
// print content
|
||||||
|
if ($mode) {
|
||||||
|
// ------ HTML MODE ------
|
||||||
|
$this->writeHTML($content, true, false, true, false, 'J');
|
||||||
|
} else {
|
||||||
|
// ------ TEXT MODE ------
|
||||||
|
$this->Write(0, $content, '', 0, 'J', true, 0, false, true, 0);
|
||||||
|
}
|
||||||
|
$this->Ln();
|
||||||
|
}
|
||||||
|
} // end of extended class
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// EXAMPLE
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// create new PDF document
|
||||||
|
$pdf = new MC_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||||
|
|
||||||
|
// set document information
|
||||||
|
$pdf->SetCreator(PDF_CREATOR);
|
||||||
|
$pdf->SetAuthor('Nicola Asuni');
|
||||||
|
$pdf->SetTitle('TCPDF Example 010');
|
||||||
|
$pdf->SetSubject('TCPDF Tutorial');
|
||||||
|
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||||
|
|
||||||
|
$header_logo = 'alteram_logo.png';
|
||||||
|
|
||||||
|
// set default header data
|
||||||
|
$pdf->SetHeaderData($header_logo, PDF_HEADER_LOGO_WIDTH, 'Time Sheet Management', 'Change Request Form');
|
||||||
|
|
||||||
|
// set header and footer fonts
|
||||||
|
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||||
|
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||||
|
|
||||||
|
// set default monospaced font
|
||||||
|
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||||
|
|
||||||
|
// set margins
|
||||||
|
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||||
|
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||||
|
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||||
|
|
||||||
|
// set auto page breaks
|
||||||
|
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||||
|
|
||||||
|
// set image scale factor
|
||||||
|
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||||
|
|
||||||
|
// set some language-dependent strings (optional)
|
||||||
|
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||||
|
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||||
|
$pdf->setLanguageArray($l);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//GET COMPANIES FROM DATABASE
|
||||||
|
$column_company_name = "";
|
||||||
|
$query = "select k.knd_name as 'company_name' from kimai15_knd k where k.knd_trash = 0 order by k.knd_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_company_name .= '<input type="checkbox" padding="10" value="' . $row['company_name'] . '" name="' . $row['company_name'] . '"' . ">" . $row['company_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET PROJECTS FROM DATABASE
|
||||||
|
$column_project_name = "";
|
||||||
|
$query = "select DISTINCT right(p.pct_name,CHAR_LENGTH(p.pct_name) - 5 ) as 'project_name' from kimai15_pct p
|
||||||
|
where p.pct_trash = 0
|
||||||
|
order by project_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_project_name .= '<input type="checkbox" value="' . $row['project_name'] . '" name="' . $row['project_name'] . '"' . ">" . $row['project_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET DIVISIONS FROM DATABASE
|
||||||
|
$column_division_name = "";
|
||||||
|
$query = "select DISTINCT left(p.pct_name,3) as 'division_name' from kimai15_pct p
|
||||||
|
where p.pct_trash = 0
|
||||||
|
order by division_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_division_name .= '<input type="checkbox" value="' . $row['division_name'] . '" name="' . $row['division_name'] . '"' . ">" . $row['division_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET TASKS FROM DB
|
||||||
|
$column_task_name = "";
|
||||||
|
$query = "select e.evt_name as 'task_name' from kimai15_evt e
|
||||||
|
where e.evt_trash = 0
|
||||||
|
order by task_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_task_name .= '<input type="checkbox" value="' . $row['task_name'] . '" name="' . $row['task_name'] . '"' . ">" . $row['task_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADD PAGE
|
||||||
|
$pdf->AddPage('P');
|
||||||
|
|
||||||
|
//ADD FORM
|
||||||
|
$pdf->setFormDefaultProp(array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 200), 'strokeColor'=>array(255, 128, 128)));
|
||||||
|
$pdf->SetFont('helvetica', '', 12);
|
||||||
|
|
||||||
|
// First name
|
||||||
|
$pdf->Cell(35, 5, 'First name:');
|
||||||
|
$pdf->TextField('firstname', 50, 5);
|
||||||
|
$pdf->Ln(10);
|
||||||
|
|
||||||
|
// Last name
|
||||||
|
$pdf->Cell(35, 5, 'Last name:');
|
||||||
|
$pdf->TextField('lastname', 50, 5);
|
||||||
|
$pdf->Ln(10);
|
||||||
|
|
||||||
|
$pdf->writeHTMLCell(51, 7, 49, 25, '', 1, 0, 0, false, 'L', true);
|
||||||
|
$pdf->writeHTMLCell(51, 7, 49, 35, '', 1, 0, 0, false, 'L', true);
|
||||||
|
$pdf->Ln(10);
|
||||||
|
|
||||||
|
//ADD First Column
|
||||||
|
//$pdf->resetColumns();
|
||||||
|
$pdf->setEqualColumns(3, 57, 0);
|
||||||
|
$pdf->selectColumn();
|
||||||
|
$pdf->ChapterTitle(0,"Company Name", 60);
|
||||||
|
$pdf->ChapterBody($column_company_name, true);
|
||||||
|
|
||||||
|
//Second Column
|
||||||
|
$pdf->resetColumns();
|
||||||
|
$pdf->setEqualColumns(3, 57, 45);
|
||||||
|
$pdf->selectColumn(1);
|
||||||
|
$pdf->ChapterTitle(0,"Project Name",60);
|
||||||
|
$pdf->ChapterBody($column_project_name, true);
|
||||||
|
|
||||||
|
//Third Column
|
||||||
|
$pdf->resetColumns();
|
||||||
|
$pdf->setEqualColumns(3, 57, 45);
|
||||||
|
$pdf->selectColumn(2);
|
||||||
|
$pdf->ChapterTitle(0,"Division", 60);
|
||||||
|
$pdf->ChapterBody($column_division_name, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ADD PAGE
|
||||||
|
$pdf->AddPage('L');
|
||||||
|
|
||||||
|
// PRINT SECOND CHAPTER
|
||||||
|
$pdf->PrintChapter(2, 'Task List', $column_task_name, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
//Close and output PDF document
|
||||||
|
$pdf->Output('example_010.pdf', 'I');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
258
core/pdf1.php
Normal file
258
core/pdf1.php
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
<?php
|
||||||
|
$hostname = "localhost";
|
||||||
|
$username = "kimai";
|
||||||
|
$password = "kimai";
|
||||||
|
$dbname = "kimai";
|
||||||
|
|
||||||
|
$con = mysqli_connect($hostname, $username, $password, $dbname) or die("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.')</script></html>");
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_010.php
|
||||||
|
// Begin : 2008-03-04
|
||||||
|
// Last Update : 2013-05-14
|
||||||
|
//
|
||||||
|
// Description : Example 010 for TCPDF class
|
||||||
|
// Text on multiple columns
|
||||||
|
//
|
||||||
|
// Author: Nicola Asuni
|
||||||
|
//
|
||||||
|
// (c) Copyright:
|
||||||
|
// Nicola Asuni
|
||||||
|
// Tecnick.com LTD
|
||||||
|
// www.tecnick.com
|
||||||
|
// info@tecnick.com
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an example PDF TEST document using TCPDF
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @abstract TCPDF - Example: Text on multiple columns
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @since 2008-03-04
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include the main TCPDF library (search for installation path).
|
||||||
|
require_once('../extensions/ki_changerequest/templates/tcpdf/tcpdf.php');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extend TCPDF to work with multiple columns
|
||||||
|
*/
|
||||||
|
class MC_TCPDF extends TCPDF {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print chapter
|
||||||
|
* @param $num (int) chapter number
|
||||||
|
* @param $title (string) chapter title
|
||||||
|
* @param $file (string) name of the file containing the chapter body
|
||||||
|
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
public function PrintChapter($num, $title, $file, $mode=false) {
|
||||||
|
// disable existing columns
|
||||||
|
$this->resetColumns();
|
||||||
|
// print chapter title
|
||||||
|
$this->ChapterTitle($num, $title);
|
||||||
|
// set columns
|
||||||
|
$this->setEqualColumns(4,57);
|
||||||
|
// print chapter body
|
||||||
|
$this->ChapterBody($file, $mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set chapter title
|
||||||
|
* @param $num (int) chapter number
|
||||||
|
* @param $title (string) chapter title
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
public function ChapterTitle($num, $title, $width) {
|
||||||
|
$this->SetFont('helvetica', '', 14);
|
||||||
|
$this->SetFillColor(200, 220, 255);
|
||||||
|
$this->Cell($width, 6, $title, 0, 1, '', 1);
|
||||||
|
$this->Ln(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print chapter body
|
||||||
|
* @param $file (string) name of the file containing the chapter body
|
||||||
|
* @param $mode (boolean) if true the chapter body is in HTML, otherwise in simple text.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
public function ChapterBody($file, $mode=false) {
|
||||||
|
$this->selectColumn();
|
||||||
|
// get esternal file content
|
||||||
|
$content = $file;
|
||||||
|
// set font
|
||||||
|
$this->SetFont('times', '', 9);
|
||||||
|
$this->SetTextColor(50, 50, 50);
|
||||||
|
// print content
|
||||||
|
if ($mode) {
|
||||||
|
// ------ HTML MODE ------
|
||||||
|
$this->writeHTML($content, true, false, true, false, 'J');
|
||||||
|
} else {
|
||||||
|
// ------ TEXT MODE ------
|
||||||
|
$this->Write(0, $content, '', 0, 'J', true, 0, false, true, 0);
|
||||||
|
}
|
||||||
|
$this->Ln();
|
||||||
|
}
|
||||||
|
} // end of extended class
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// EXAMPLE
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
// create new PDF document
|
||||||
|
$pdf = new MC_TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||||
|
|
||||||
|
// set document information
|
||||||
|
$pdf->SetCreator(PDF_CREATOR);
|
||||||
|
$pdf->SetAuthor('Nicola Asuni');
|
||||||
|
$pdf->SetTitle('TCPDF Example 010');
|
||||||
|
$pdf->SetSubject('TCPDF Tutorial');
|
||||||
|
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
|
||||||
|
|
||||||
|
$header_logo = 'alteram_logo.png';
|
||||||
|
|
||||||
|
// set default header data
|
||||||
|
$pdf->SetHeaderData($header_logo, PDF_HEADER_LOGO_WIDTH, 'Time Sheet Management', 'Change Request Form');
|
||||||
|
|
||||||
|
// set header and footer fonts
|
||||||
|
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||||
|
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||||
|
|
||||||
|
// set default monospaced font
|
||||||
|
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||||
|
|
||||||
|
// set margins
|
||||||
|
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||||
|
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||||
|
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||||
|
|
||||||
|
// set auto page breaks
|
||||||
|
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||||
|
|
||||||
|
// set image scale factor
|
||||||
|
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||||
|
|
||||||
|
// set some language-dependent strings (optional)
|
||||||
|
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
|
||||||
|
require_once(dirname(__FILE__).'/lang/eng.php');
|
||||||
|
$pdf->setLanguageArray($l);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//GET COMPANIES FROM DATABASE
|
||||||
|
$column_company_name = "";
|
||||||
|
$query = "select k.knd_name as 'company_name' from kimai15_knd k where k.knd_trash = 0 order by k.knd_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_company_name .= '<input type="checkbox" value="' . $row['company_name'] . '" name="' . $row['company_name'] . '"' . ">" . $row['company_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET PROJECTS FROM DATABASE
|
||||||
|
$column_project_name = "";
|
||||||
|
$query = "select DISTINCT right(p.pct_name,CHAR_LENGTH(p.pct_name) - 8 ) as 'project_name' from kimai15_pct p
|
||||||
|
where p.pct_trash = 0
|
||||||
|
order by project_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_project_name .= '<input type="checkbox" value="' . $row['project_name'] . '" name="' . $row['project_name'] . '"' . ">" . $row['project_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET DIVISIONS FROM DATABASE
|
||||||
|
$column_division_name = "";
|
||||||
|
$query = "select DISTINCT left(p.pct_name,3) as 'division_name' from kimai15_pct p
|
||||||
|
where p.pct_trash = 0
|
||||||
|
order by division_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_division_name .= '<input type="checkbox" value="' . $row['division_name'] . '" name="' . $row['division_name'] . '"' . ">" . $row['division_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET TASKS FROM DB
|
||||||
|
$column_task_name = "";
|
||||||
|
$query = "select e.evt_name as 'task_name' from kimai15_evt e
|
||||||
|
where e.evt_trash = 0
|
||||||
|
order by task_name";
|
||||||
|
$result = mysqli_query($con, $query);
|
||||||
|
if (mysqli_num_rows($result) != 0) {
|
||||||
|
while ($row = mysqli_fetch_array($result)) {
|
||||||
|
|
||||||
|
|
||||||
|
$column_task_name .= '<input type="checkbox" value="' . $row['task_name'] . '" name="' . $row['task_name'] . '"' . ">" . $row['task_name'] . "<br/>" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADD PAGE
|
||||||
|
$pdf->AddPage('P');
|
||||||
|
|
||||||
|
//ADD FORM
|
||||||
|
$pdf->setFormDefaultProp(array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 200), 'strokeColor'=>array(255, 128, 128)));
|
||||||
|
$pdf->SetFont('helvetica', '', 12);
|
||||||
|
|
||||||
|
// First name
|
||||||
|
$pdf->Cell(35, 5, 'First name:');
|
||||||
|
$pdf->TextField('firstname', 50, 5);
|
||||||
|
$pdf->Ln(10);
|
||||||
|
|
||||||
|
// Last name
|
||||||
|
$pdf->Cell(35, 5, 'Last name:');
|
||||||
|
$pdf->TextField('lastname', 50, 5);
|
||||||
|
$pdf->Ln(10);
|
||||||
|
|
||||||
|
$pdf->writeHTMLCell(51, 7, 49, 25, '', 1, 0, 0, false, 'L', true);
|
||||||
|
$pdf->writeHTMLCell(51, 7, 49, 35, '', 1, 0, 0, false, 'L', true);
|
||||||
|
$pdf->Ln(10);
|
||||||
|
|
||||||
|
//ADD First Column
|
||||||
|
//$pdf->resetColumns();
|
||||||
|
$pdf->setEqualColumns(3, 57, 0);
|
||||||
|
$pdf->selectColumn();
|
||||||
|
$pdf->ChapterTitle(0,"Company Name", 60);
|
||||||
|
$pdf->ChapterBody($column_company_name, true);
|
||||||
|
|
||||||
|
//Second Column
|
||||||
|
$pdf->resetColumns();
|
||||||
|
$pdf->setEqualColumns(3, 57, 45);
|
||||||
|
$pdf->selectColumn(1);
|
||||||
|
$pdf->ChapterTitle(0,"Project Name",60);
|
||||||
|
$pdf->ChapterBody($column_project_name, true);
|
||||||
|
|
||||||
|
//Third Column
|
||||||
|
$pdf->resetColumns();
|
||||||
|
$pdf->setEqualColumns(3, 57, 45);
|
||||||
|
$pdf->selectColumn(2);
|
||||||
|
$pdf->ChapterTitle(0,"Division", 60);
|
||||||
|
$pdf->ChapterBody($column_division_name, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ADD PAGE
|
||||||
|
$pdf->AddPage('L');
|
||||||
|
|
||||||
|
// PRINT SECOND CHAPTER
|
||||||
|
$pdf->PrintChapter(2, 'Task List', $column_task_name, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
|
//Close and output PDF document
|
||||||
|
$pdf->Output('example_010.pdf', 'I');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
340
core/processor.php
Normal file
340
core/processor.php
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ==================
|
||||||
|
* = Core Processor =
|
||||||
|
* ==================
|
||||||
|
*
|
||||||
|
* Called via AJAX from the Kimai user interface. Depending on $axAction
|
||||||
|
* actions are performed, e.g. editing preferences or returning a list
|
||||||
|
* of customers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// insert KSPI
|
||||||
|
$isCoreProcessor = 1;
|
||||||
|
$dir_templates = "templates/core/";
|
||||||
|
require("../includes/kspi.php");
|
||||||
|
|
||||||
|
switch ($axAction) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append a new entry to the logfile.
|
||||||
|
*/
|
||||||
|
case 'logfile':
|
||||||
|
logfile("JavaScript: " . $axValue);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remember which project and event the user has selected for
|
||||||
|
* the quick recording via the buzzer.
|
||||||
|
*/
|
||||||
|
case 'saveBuzzerPreselection':
|
||||||
|
if (!isset($kga['usr'])) return;
|
||||||
|
|
||||||
|
$data= array();
|
||||||
|
if (isset($_REQUEST['project']))
|
||||||
|
$data['lastProject'] = $_REQUEST['project'];
|
||||||
|
if (isset($_REQUEST['event']))
|
||||||
|
$data['lastEvent'] = $_REQUEST['event'];
|
||||||
|
|
||||||
|
usr_edit($kga['usr']['usr_ID'],$data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store the user preferences entered in the preferences dialog.
|
||||||
|
*/
|
||||||
|
case 'editPrefs':
|
||||||
|
if (isset($kga['customer'])) die();
|
||||||
|
|
||||||
|
$preferences['skin'] = $_REQUEST['skin'];
|
||||||
|
$preferences['autoselection'] = isset($_REQUEST['autoselection'])?1:0;
|
||||||
|
$preferences['quickdelete'] = $_REQUEST['quickdelete'];
|
||||||
|
$preferences['rowlimit'] = $_REQUEST['rowlimit'];
|
||||||
|
$preferences['lang'] = $_REQUEST['lang'];
|
||||||
|
$preferences['flip_pct_display'] = isset($_REQUEST['flip_pct_display'])?1:0;
|
||||||
|
$preferences['pct_comment_flag'] = isset($_REQUEST['pct_comment_flag'])?1:0;
|
||||||
|
$preferences['showIDs'] = isset($_REQUEST['showIDs'])?1:0;
|
||||||
|
$preferences['noFading'] = isset($_REQUEST['noFading'])?1:0;
|
||||||
|
$preferences['user_list_hidden'] = isset($_REQUEST['user_list_hidden'])?1:0;
|
||||||
|
$preferences['hideClearedEntries'] = isset($_REQUEST['hideClearedEntries'])?1:0;
|
||||||
|
$preferences['sublistAnnotations'] = $_REQUEST['sublistAnnotations'];
|
||||||
|
|
||||||
|
usr_set_preferences($preferences,'ui.');
|
||||||
|
usr_set_preferences(array('timezone'=>$_REQUEST['timezone']));
|
||||||
|
|
||||||
|
$rate = str_replace($kga['conf']['decimalSeparator'],'.',$_REQUEST['rate']);
|
||||||
|
if (is_numeric($rate))
|
||||||
|
save_rate($kga['usr']['usr_ID'],null,NULL,$rate);
|
||||||
|
else
|
||||||
|
remove_rate($kga['usr']['usr_ID'],null,NULL);
|
||||||
|
|
||||||
|
// If the password field is empty don't overwrite the old password.
|
||||||
|
if ($_REQUEST['pw'] != "") {
|
||||||
|
$usr_data['pw'] = md5($kga['password_salt'].$_REQUEST['pw'].$kga['password_salt']);
|
||||||
|
usr_edit($kga['usr']['usr_ID'], $usr_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the user changes the timespace it is stored in the database so
|
||||||
|
* it can be restored, when the user reloads the page.
|
||||||
|
*/
|
||||||
|
case 'setTimespace':
|
||||||
|
if (!isset($kga['usr'])) die();
|
||||||
|
|
||||||
|
$timespace = explode('|',$axValue);
|
||||||
|
|
||||||
|
$timespace_in = explode('-',$timespace[0]);
|
||||||
|
$timespace_in = (int)mktime(0,0,0,$timespace_in[0],$timespace_in[1],$timespace_in[2]);
|
||||||
|
if ($timespace_in < 950000000) $timespace_in = $in;
|
||||||
|
|
||||||
|
$timespace_out = explode('-',$timespace[1]);
|
||||||
|
$timespace_out = (int)mktime(23,59,59,$timespace_out[0],$timespace_out[1],$timespace_out[2]);
|
||||||
|
if ($timespace_out < 950000000) $timespace_out = $out;
|
||||||
|
|
||||||
|
save_timespace($timespace_in,$timespace_out,$kga['usr']['usr_ID']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The user started the recording of an event via the buzzer. If this method
|
||||||
|
* is called while another recording is running the first one will be stopped.
|
||||||
|
*/
|
||||||
|
case 'startRecord':
|
||||||
|
if (isset($kga['customer'])) die();
|
||||||
|
|
||||||
|
if (get_rec_state($kga['usr']['usr_ID'])) {
|
||||||
|
stopRecorder();
|
||||||
|
}
|
||||||
|
|
||||||
|
$IDs = explode('|',$axValue);
|
||||||
|
startRecorder($IDs[0],$IDs[1],$id);
|
||||||
|
echo 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop the running recording.
|
||||||
|
*/
|
||||||
|
case 'stopRecord':
|
||||||
|
stopRecorder();
|
||||||
|
echo 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a list of users. Customers are not shown any users. The
|
||||||
|
* type of the current user decides which users are shown to him.
|
||||||
|
* See get_arr_watchable_users.
|
||||||
|
*/
|
||||||
|
case 'reload_usr':
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_usr = array();
|
||||||
|
else
|
||||||
|
$arr_usr = get_arr_watchable_users($kga['usr']['usr_ID']);
|
||||||
|
|
||||||
|
if (count($arr_usr)>0) {
|
||||||
|
$tpl->assign('arr_usr', $arr_usr);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_usr', 0);
|
||||||
|
}
|
||||||
|
$tpl->display("../lists/usr.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a list of customers. A customer can only see himself.
|
||||||
|
*/
|
||||||
|
case 'reload_knd':
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_knd = array(array(
|
||||||
|
'knd_ID'=>$kga['customer']['knd_ID'],
|
||||||
|
'knd_name'=>$kga['customer']['knd_name'],
|
||||||
|
'knd_visible'=>$kga['customer']['knd_visible']));
|
||||||
|
else
|
||||||
|
$arr_knd = get_arr_knd($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
if (count($arr_knd)>0) {
|
||||||
|
$tpl->assign('arr_knd', $arr_knd);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_knd', 0);
|
||||||
|
}
|
||||||
|
$tpl->display("../lists/knd.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a list of projects. Customers are only shown their projects.
|
||||||
|
*/
|
||||||
|
case 'reload_pct':
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_pct = get_arr_pct_by_knd("all",$kga['customer']['knd_ID']);
|
||||||
|
else
|
||||||
|
$arr_pct = get_arr_pct($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
if (count($arr_pct)>0) {
|
||||||
|
$tpl->assign('arr_pct', $arr_pct);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_pct', 0);
|
||||||
|
}
|
||||||
|
$tpl->display("../lists/pct.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a list of tasks. Customers are only shown tasks which are
|
||||||
|
* used for them. If a project is set as filter via the pct parameter
|
||||||
|
* only tasks for that project are shown.
|
||||||
|
*/
|
||||||
|
case 'reload_evt':
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_evt = get_arr_evt_by_knd($kga['customer']['knd_ID']);
|
||||||
|
else if (isset($_REQUEST['pct']))
|
||||||
|
$arr_evt = get_arr_evt_by_pct($kga['usr']['usr_grp'],
|
||||||
|
$_REQUEST['pct']);
|
||||||
|
else
|
||||||
|
$arr_evt = get_arr_evt($kga['usr']['usr_grp']);
|
||||||
|
if (count($arr_evt)>0) {
|
||||||
|
$tpl->assign('arr_evt', $arr_evt);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_evt', 0);
|
||||||
|
}
|
||||||
|
$tpl->display("../lists/evt.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new customer, project or event. This is a core function as it's
|
||||||
|
* used at least by the admin panel and the timesheet extension.
|
||||||
|
*/
|
||||||
|
case 'add_edit_KndPctEvt':
|
||||||
|
|
||||||
|
if(isset($kga['customer']) || $kga['usr']['usr_sts']==2) die(); // only admins and grpleaders can do this ...
|
||||||
|
|
||||||
|
|
||||||
|
switch($axValue) {
|
||||||
|
/**
|
||||||
|
* add or edit a customer
|
||||||
|
*/
|
||||||
|
case "knd":
|
||||||
|
if (count($_REQUEST['knd_grp']) == 0) die(); // no group would mean it is never accessable
|
||||||
|
|
||||||
|
$data['knd_name'] = $_REQUEST['knd_name'];
|
||||||
|
$data['knd_comment'] = $_REQUEST['knd_comment'];
|
||||||
|
$data['knd_company'] = $_REQUEST['knd_company'];
|
||||||
|
$data['knd_vat'] = $_REQUEST['knd_vat'];
|
||||||
|
$data['knd_contact'] = $_REQUEST['knd_contact'];
|
||||||
|
$data['knd_street'] = $_REQUEST['knd_street'];
|
||||||
|
$data['knd_zipcode'] = $_REQUEST['knd_zipcode'];
|
||||||
|
$data['knd_city'] = $_REQUEST['knd_city'];
|
||||||
|
$data['knd_tel'] = $_REQUEST['knd_tel'];
|
||||||
|
$data['knd_fax'] = $_REQUEST['knd_fax'];
|
||||||
|
$data['knd_mobile'] = $_REQUEST['knd_mobile'];
|
||||||
|
$data['knd_mail'] = $_REQUEST['knd_mail'];
|
||||||
|
$data['knd_homepage'] = $_REQUEST['knd_homepage'];
|
||||||
|
$data['knd_visible'] = $_REQUEST['knd_visible'];
|
||||||
|
$data['knd_filter'] = $_REQUEST['knd_filter'];
|
||||||
|
|
||||||
|
// If password field is empty dont overwrite the password.
|
||||||
|
if ($_REQUEST['knd_password'] != "") {
|
||||||
|
$data['knd_password'] = md5($kga['password_salt'].$_REQUEST['knd_password'].$kga['password_salt']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add or update the customer
|
||||||
|
if (!$id) {
|
||||||
|
$id = knd_create($data);
|
||||||
|
} else {
|
||||||
|
knd_edit($id, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the customer group mappings
|
||||||
|
$grp_array = $_REQUEST['knd_grp'];
|
||||||
|
assign_knd2grps($id, $grp_array);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add or edit a project
|
||||||
|
*/
|
||||||
|
case "pct":
|
||||||
|
if (count($_REQUEST['pct_grp']) == 0) die(); // no group would mean it is never accessable
|
||||||
|
|
||||||
|
$data['pct_name'] = $_REQUEST['pct_name'];
|
||||||
|
$data['pct_kndID'] = $_REQUEST['pct_kndID'];
|
||||||
|
$data['pct_comment'] = $_REQUEST['pct_comment'];
|
||||||
|
$data['pct_visible'] = isset($_REQUEST['pct_visible'])?1:0;
|
||||||
|
$data['pct_internal'] = isset($_REQUEST['pct_internal'])?1:0;
|
||||||
|
$data['pct_filter'] = $_REQUEST['pct_filter'];
|
||||||
|
$data['pct_budget'] =
|
||||||
|
str_replace($kga['conf']['decimalSeparator'],'.',$_REQUEST['pct_budget']);
|
||||||
|
$data['pct_default_rate'] =
|
||||||
|
str_replace($kga['conf']['decimalSeparator'],'.',$_REQUEST['pct_default_rate']);
|
||||||
|
$data['pct_my_rate'] =
|
||||||
|
str_replace($kga['conf']['decimalSeparator'],'.',$_REQUEST['pct_my_rate']);
|
||||||
|
|
||||||
|
// add or update the project
|
||||||
|
if (!$id) {
|
||||||
|
$id = pct_create($data);
|
||||||
|
} else {
|
||||||
|
pct_edit($id, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the project group mappings
|
||||||
|
if (isset($_REQUEST['pct_grp']))
|
||||||
|
assign_pct2grps($id, $_REQUEST['pct_grp']);
|
||||||
|
if (isset($_REQUEST['pct_evt']))
|
||||||
|
assign_pct2evts($id, $_REQUEST['pct_evt']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add or edit a task
|
||||||
|
*/
|
||||||
|
case "evt":
|
||||||
|
if (count($_REQUEST['evt_grp']) == 0) die(); // no group would mean it is never accessable
|
||||||
|
|
||||||
|
$data['evt_name'] = $_REQUEST['evt_name'];
|
||||||
|
$data['evt_comment'] = $_REQUEST['evt_comment'];
|
||||||
|
$data['evt_visible'] = $_REQUEST['evt_visible'];
|
||||||
|
$data['evt_filter'] = $_REQUEST['evt_filter'];
|
||||||
|
$data['evt_default_rate'] =
|
||||||
|
str_replace($kga['conf']['decimalSeparator'],'.',$_REQUEST['evt_default_rate']);
|
||||||
|
$data['evt_my_rate'] =
|
||||||
|
str_replace($kga['conf']['decimalSeparator'],'.',$_REQUEST['evt_my_rate']);
|
||||||
|
|
||||||
|
// add or update the project
|
||||||
|
if (!$id) {
|
||||||
|
$id = evt_create($data);
|
||||||
|
} else {
|
||||||
|
evt_edit($id, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the task group and task project mappings
|
||||||
|
if (isset($_REQUEST['evt_grp']))
|
||||||
|
assign_evt2grps($id, $_REQUEST['evt_grp']);
|
||||||
|
else
|
||||||
|
assign_evt2grps($id, array());
|
||||||
|
|
||||||
|
if (isset($_REQUEST['evt_pct']))
|
||||||
|
assign_evt2pcts($id, $_REQUEST['evt_pct']);
|
||||||
|
else
|
||||||
|
assign_evt2pcts($id, array());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
113
css/datePicker.css
Normal file
113
css/datePicker.css
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
table.jCalendar {
|
||||||
|
border: 1px solid #888;
|
||||||
|
background: #aaa;
|
||||||
|
}
|
||||||
|
table.jCalendar th {
|
||||||
|
background: #333;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 3px 5px;
|
||||||
|
}
|
||||||
|
table.jCalendar td {
|
||||||
|
background: #ccc;
|
||||||
|
color: #000;
|
||||||
|
padding: 3px 5px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
table.jCalendar td.other-month {
|
||||||
|
background: #ddd;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
table.jCalendar td.today {
|
||||||
|
background: #666;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
table.jCalendar td.selected {
|
||||||
|
background: #f66;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
table.jCalendar td.selected:hover {
|
||||||
|
background: #f33;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
table.jCalendar td:hover, table.jCalendar td.dp-hover {
|
||||||
|
background: #fff;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
table.jCalendar td.disabled, table.jCalendar td.disabled:hover {
|
||||||
|
background: #bbb;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For the popup */
|
||||||
|
|
||||||
|
/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */
|
||||||
|
|
||||||
|
div#dp-popup {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 4px;
|
||||||
|
min-height: 172px;
|
||||||
|
min-width: 171px;
|
||||||
|
border:1px solid #fff;
|
||||||
|
background-color:#333;
|
||||||
|
z-index: 500;
|
||||||
|
}
|
||||||
|
div#dp-popup h2 {
|
||||||
|
color:#fff;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
margin: 2px 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
a#dp-close {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 4px 0;
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
a#dp-close:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
div#dp-popup a {
|
||||||
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 3px 2px 0;
|
||||||
|
}
|
||||||
|
div#dp-popup div#dp-nav-prev {
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
left: 4px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
div#dp-popup div#dp-nav-prev a {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */
|
||||||
|
div#dp-popup div#dp-nav-prev a, div#dp-popup div#dp-nav-next a {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
div#dp-popup div#dp-nav-prev a.disabled, div#dp-popup div#dp-nav-next a.disabled {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
div#dp-popup div#dp-nav-next {
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 4px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
div#dp-popup div#dp-nav-next a {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
div#dp-popup a.disabled {
|
||||||
|
cursor: default;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
div#dp-popup td {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
div#dp-popup td.disabled {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
46
css/error.css
Normal file
46
css/error.css
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
html{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
background-color:#000;
|
||||||
|
color:#FFF;
|
||||||
|
height: 100%;
|
||||||
|
font: 85%/1.5 "Lucida Grande", Calibri, "Segoe Sans", Futura, "Gill Sans", "Lucida Sans", "News Gothic MT", "Bitstream Vera Sans", "Trebuchet MS", sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error_wrapper {
|
||||||
|
background: url('../grfx/error_bg.jpg') no-repeat;
|
||||||
|
position: absolute;
|
||||||
|
width: 425px;
|
||||||
|
height: 189px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
margin: -94px 0 0 -212px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#error_wrapper h3 {
|
||||||
|
margin:0;
|
||||||
|
margin-bottom:5px;
|
||||||
|
}
|
||||||
|
#error_txt {
|
||||||
|
position:relative;
|
||||||
|
display:block;
|
||||||
|
margin:0;
|
||||||
|
padding:10px;
|
||||||
|
overflow:auto;
|
||||||
|
height:167px;
|
||||||
|
width:296px;
|
||||||
|
top:2px;
|
||||||
|
left:109px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error_button {
|
||||||
|
width:300;
|
||||||
|
margin-top:5px;
|
||||||
|
text-align:right;
|
||||||
|
position:relative;
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
15
css/jquery.tabs-ie.css
Normal file
15
css/jquery.tabs-ie.css
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
Tabs - additional IE specific bug fixes
|
||||||
|
|
||||||
|
Recommended usage (Conditional Comments):
|
||||||
|
<!--[if lte IE 7]>
|
||||||
|
<link rel="stylesheet" href="tabs_ie.css" type="text/css" media="projection, screen" />
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
*/
|
||||||
|
.tabs-nav { /* auto clear */
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.tabs-nav .tabs-disabled a {
|
||||||
|
filter: alpha(opacity=40);
|
||||||
|
}
|
||||||
72
css/jquery.tabs.css
Normal file
72
css/jquery.tabs.css
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/* Caution! Ensure accessibility in print and other media types... */
|
||||||
|
@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */
|
||||||
|
.tabs-hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide useless elements in print layouts... */
|
||||||
|
@media print {
|
||||||
|
.tabs-nav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Skin */
|
||||||
|
.tabs-nav {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 0 65px;
|
||||||
|
}
|
||||||
|
.tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
.tabs-nav li {
|
||||||
|
float: left;
|
||||||
|
margin: 0 0 0 1px;
|
||||||
|
}
|
||||||
|
.tabs-nav a {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
top: 1px;
|
||||||
|
z-index: 300;
|
||||||
|
padding: 6px 2px 0;
|
||||||
|
width: 111px;
|
||||||
|
height: 18px;
|
||||||
|
color: #888;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1.2;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.tabs-nav .tabs-selected a {
|
||||||
|
padding-top: 7px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.tabs-nav .tabs-selected a, .tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active {
|
||||||
|
background-position: 0 -50px;
|
||||||
|
outline: 0; /* @ Firefox, switch off dotted border */
|
||||||
|
}
|
||||||
|
.tabs-nav .tabs-disabled a:hover, .tabs-nav .tabs-disabled a:focus, .tabs-nav .tabs-disabled a:active {
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
.tabs-nav .tabs-selected a:link, .tabs-nav .tabs-selected a:visited,
|
||||||
|
.tabs-nav .tabs-disabled a:link, .tabs-nav .tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
.tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active { /* @ Opera, we need to be explicit again here now... */
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.tabs-nav .tabs-disabled {
|
||||||
|
opacity: .4;
|
||||||
|
}
|
||||||
|
.tabs-container {
|
||||||
|
height:309px;
|
||||||
|
overflow:auto;
|
||||||
|
border-top: 1px solid #97a5b0;
|
||||||
|
padding: 1em 8px;
|
||||||
|
/*background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
|
||||||
|
}
|
||||||
184
css/login.css
Normal file
184
css/login.css
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
html{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
background-color:#000;
|
||||||
|
height: 100%;
|
||||||
|
font: 85%/1.5 "Lucida Grande", Calibri, "Segoe Sans", Futura, "Gill Sans", "Lucida Sans", "News Gothic MT", "Bitstream Vera Sans", "Trebuchet MS", sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#login{
|
||||||
|
position: absolute;
|
||||||
|
width: 526px;
|
||||||
|
height: 400px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
margin: -200px 0 0 -263px;
|
||||||
|
}
|
||||||
|
#login form{
|
||||||
|
background:url(../grfx/login_bg_g3.png) no-repeat;
|
||||||
|
display: block;
|
||||||
|
width: 448px;
|
||||||
|
height: 298px;
|
||||||
|
margin: 0 0 0 38px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#login fieldset {
|
||||||
|
border: 0 none;
|
||||||
|
display: block;
|
||||||
|
margin: 135px 0 0 130px;
|
||||||
|
width: 210px;
|
||||||
|
height: 100px;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
#login label{
|
||||||
|
display: block;
|
||||||
|
color: #999;
|
||||||
|
height:25px;
|
||||||
|
}
|
||||||
|
#login input{
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 2px;
|
||||||
|
display: block;
|
||||||
|
width: 140px;
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
left: 0;
|
||||||
|
top:-2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* of course our best friend needs some special treatment ... */
|
||||||
|
*+html #login input{ left: -130px; top:-5px; }
|
||||||
|
|
||||||
|
#login button{
|
||||||
|
position: absolute;
|
||||||
|
width: 52px;
|
||||||
|
height: 91px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
background: url(../grfx/login_button_g3.png) no-repeat;
|
||||||
|
text-indent: -1000em;
|
||||||
|
border: 0 none;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#login select {
|
||||||
|
position: absolute;
|
||||||
|
width:100px;
|
||||||
|
top:100px;
|
||||||
|
left:0px;
|
||||||
|
border:1px solid silver;
|
||||||
|
}
|
||||||
|
#login button:hover {
|
||||||
|
background: url(../grfx/login_button_g3.png) no-repeat 0 -91px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#login p, #login p>a {
|
||||||
|
font-size:xx-small;
|
||||||
|
color: #555;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#install {
|
||||||
|
color:#FFF;
|
||||||
|
position: absolute;
|
||||||
|
width: 526px;
|
||||||
|
height: 400px;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
margin: -200px 0 0 -263px;
|
||||||
|
}
|
||||||
|
#install .installtext {
|
||||||
|
/* background-color:#f00;*/
|
||||||
|
width:350px;
|
||||||
|
}
|
||||||
|
#install .welcome {
|
||||||
|
font-size:1.3em;
|
||||||
|
font-weight:bold;
|
||||||
|
color:#15F000;
|
||||||
|
margin-bottom:10px;
|
||||||
|
}
|
||||||
|
#install .txt {
|
||||||
|
margin-bottom:7px;
|
||||||
|
}
|
||||||
|
#install form {
|
||||||
|
background:url(../grfx/login_bg_g3.png) no-repeat;
|
||||||
|
display: block;
|
||||||
|
width: 448px;
|
||||||
|
height: 298px;
|
||||||
|
margin: 0 0 0 38px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#install fieldset {
|
||||||
|
border: 0 none;
|
||||||
|
display: block;
|
||||||
|
margin: 105px 0 0 15px;
|
||||||
|
width: 420px;
|
||||||
|
height: 160px;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
#install label{
|
||||||
|
display: block;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
#install input{
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 2px;
|
||||||
|
display: block;
|
||||||
|
width: 140px;
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
#install button{
|
||||||
|
position: absolute;
|
||||||
|
width: 52px;
|
||||||
|
height: 91px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
|
background: url(../grfx/login_button_g3.png) no-repeat;
|
||||||
|
text-indent: -1000em;
|
||||||
|
border: 0 none;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#install button:hover {
|
||||||
|
background: url(../grfx/login_button_g3.png) no-repeat 0 -91px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#install p, #install p>a {
|
||||||
|
font-size:xx-small;
|
||||||
|
color: #555;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#warning {
|
||||||
|
margin:5px 0 0 38px;
|
||||||
|
width:434px;
|
||||||
|
border:2px solid red;
|
||||||
|
padding:10px 5px 5px 5px;
|
||||||
|
background: url(../grfx/bg_warning.gif) repeat-x;
|
||||||
|
}
|
||||||
|
#warning p {
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
444
db_restore.php
Normal file
444
db_restore.php
Normal file
@@ -0,0 +1,444 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file allows the user to create and restore backups. The backups are
|
||||||
|
* kept within the database, so they aren't true backups but more like
|
||||||
|
* snapshots.
|
||||||
|
*/
|
||||||
|
|
||||||
|
require('includes/basics.php');
|
||||||
|
|
||||||
|
$version_temp = get_DBversion();
|
||||||
|
$versionDB = $version_temp[0];
|
||||||
|
$revisionDB = $version_temp[1];
|
||||||
|
|
||||||
|
$p = $kga['server_prefix'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute an sql query in the database. The correct database connection
|
||||||
|
* will be chosen and the query will be logged with the success status.
|
||||||
|
*
|
||||||
|
* @param $query query to execute as string
|
||||||
|
*/
|
||||||
|
function exec_query($query) {
|
||||||
|
global $conn, $pdo_conn, $kga, $errors, $executed_queries;
|
||||||
|
|
||||||
|
$success = false;
|
||||||
|
|
||||||
|
if ($kga['server_conn'] == "pdo") {
|
||||||
|
if (is_object($pdo_conn)) {
|
||||||
|
$pdo_query = $pdo_conn->prepare($query);
|
||||||
|
$success = $pdo_query->execute(array());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$errorInfo = "No connection object.";
|
||||||
|
} else {
|
||||||
|
if (is_object($conn)) {
|
||||||
|
$success = $conn->Query($query);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$errorInfo = "No connection object.";
|
||||||
|
}
|
||||||
|
logfile($query);
|
||||||
|
if (!$success) {
|
||||||
|
logfile($errorInfo);
|
||||||
|
$errors=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_REQUEST['submit']))
|
||||||
|
{
|
||||||
|
if ($_REQUEST['submit'] == $kga['lang']['backup'][8])
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a backup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
logfile("-- begin backup -----------------------------------");
|
||||||
|
$backup_stamp = time();
|
||||||
|
$query = ("SHOW TABLES;");
|
||||||
|
|
||||||
|
if ($kga['server_conn'] == "pdo") {
|
||||||
|
if (is_object($pdo_conn)) {
|
||||||
|
$pdo_query = $pdo_conn->prepare($query);
|
||||||
|
$success = $pdo_query->execute(array());
|
||||||
|
$tables = $pdo_query->fetchAll();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (is_object($conn)) {
|
||||||
|
$success = $conn->Query($query);
|
||||||
|
$tables = $conn->RecordsArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$prefix_length = strlen($p);
|
||||||
|
|
||||||
|
foreach($tables as $row) {
|
||||||
|
if ((substr($row[0], 0, $prefix_length) == $p) && (substr($row[0], 0, 10) != "kimai_bak_")) {
|
||||||
|
|
||||||
|
$primaryKey = "";
|
||||||
|
|
||||||
|
if (strlen(strstr($row[0],"evt"))>0) { $primaryKey = "evt_ID";}
|
||||||
|
if (strlen(strstr($row[0],"grp"))>0) { $primaryKey = "grp_ID";}
|
||||||
|
if (strlen(strstr($row[0],"knd"))>0) { $primaryKey = "knd_ID";}
|
||||||
|
if (strlen(strstr($row[0],"pct"))>0) { $primaryKey = "pct_ID";}
|
||||||
|
if (strlen(strstr($row[0],"zef"))>0) { $primaryKey = "zef_ID";}
|
||||||
|
if (strlen(strstr($row[0],"usr"))>0) { $primaryKey = "usr_name";}
|
||||||
|
if (strlen(strstr($row[0],"var"))>0) { $primaryKey = "var";}
|
||||||
|
if ( (strlen(strstr($row[0],"ldr"))>0)
|
||||||
|
|| (strlen(strstr($row[0],"grp_evt"))>0)
|
||||||
|
|| (strlen(strstr($row[0],"pct_evt"))>0)
|
||||||
|
|| (strlen(strstr($row[0],"grp_knd"))>0)
|
||||||
|
|| (strlen(strstr($row[0],"grp_pct"))>0))
|
||||||
|
{
|
||||||
|
$primaryKey = "uid";
|
||||||
|
}
|
||||||
|
if (strlen(strstr($row[0],"preferences"))>0) { $primaryKey = "userID`,`var"; }
|
||||||
|
|
||||||
|
if ( ((int)$revisionDB < 733) && (strlen(strstr($row[0],"ldr"))>0) ) { $primaryKey = ""; }
|
||||||
|
|
||||||
|
if ($primaryKey!="") {
|
||||||
|
$primaryKey = " (PRIMARY KEY (`" .$primaryKey. "`))";
|
||||||
|
}
|
||||||
|
|
||||||
|
$query = "CREATE TABLE kimai_bak_" . $backup_stamp . "_" . $row[0] . $primaryKey . " SELECT * FROM " . $row[0] . ";";
|
||||||
|
exec_query($query,1);
|
||||||
|
if ($errors) die($kga['lang']['updater'][60]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logfile("-- backup finished -----------------------------------");
|
||||||
|
header("location: db_restore.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_REQUEST['submit'] == $kga['lang']['backup'][3])
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Delete backups.
|
||||||
|
*/
|
||||||
|
$dates = $_REQUEST['dates'];
|
||||||
|
|
||||||
|
$query = ("SHOW TABLES;");
|
||||||
|
|
||||||
|
if ($kga['server_conn'] == "pdo") {
|
||||||
|
if (is_object($pdo_conn)) {
|
||||||
|
$pdo_query = $pdo_conn->prepare($query);
|
||||||
|
$success = $pdo_query->execute(array());
|
||||||
|
$tables = $pdo_query->fetchAll();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (is_object($conn)) {
|
||||||
|
$success = $conn->Query($query);
|
||||||
|
$tables = $conn->RecordsArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($tables as $row)
|
||||||
|
{
|
||||||
|
if ((substr($row[0], 0, 10) == "kimai_bak_"))
|
||||||
|
{
|
||||||
|
if ( in_array(substr($row[0], 10, 10),$dates) )
|
||||||
|
{
|
||||||
|
$arr2[] = "DROP TABLE `".$row[0]."`;";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($kga['server_conn'] == "pdo")
|
||||||
|
{
|
||||||
|
if (is_object($pdo_conn))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$query="";
|
||||||
|
foreach($arr2 AS $row)
|
||||||
|
{
|
||||||
|
$query .= $row;
|
||||||
|
}
|
||||||
|
$pdo_query = $pdo_conn->prepare($query);
|
||||||
|
$success = $pdo_query->execute(array());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (is_object($conn))
|
||||||
|
{
|
||||||
|
foreach($arr2 AS $row)
|
||||||
|
{
|
||||||
|
$success = $conn->Query($row);
|
||||||
|
if (!$success)
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header("location: db_restore.php");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
|
<meta name="robots" value="noindex,nofollow" />
|
||||||
|
<title>Kimai Backup Restore Utility</title>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
body {
|
||||||
|
background: #46E715 url('grfx/ki_twitter_bg.jpg') no-repeat;
|
||||||
|
font-family: sans-serif;
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
div.main {
|
||||||
|
margin-left:420px;
|
||||||
|
}
|
||||||
|
div.warn {
|
||||||
|
padding:5px;
|
||||||
|
background-image: url('skins/standard/grfx/floaterborder.png');
|
||||||
|
color:red;
|
||||||
|
font-weight:bold;
|
||||||
|
text-align:center;
|
||||||
|
border-top:2px solid red;
|
||||||
|
border-bottom:2px solid red;
|
||||||
|
}
|
||||||
|
p.label_checkbox input {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
p.label_checkbox label {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin-left: 10px;
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
p.label_checkbox {
|
||||||
|
clear:left;
|
||||||
|
height:.6em;
|
||||||
|
}
|
||||||
|
p.radio {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
h1.message {
|
||||||
|
border:3px solid white;
|
||||||
|
padding:10px;
|
||||||
|
background-image: url('skins/standard/grfx/floaterborder.png');
|
||||||
|
margin-right:20px;
|
||||||
|
}
|
||||||
|
h1.fail {
|
||||||
|
border:3px solid red;
|
||||||
|
padding:10px;
|
||||||
|
background-image: url('skins/standard/grfx/floaterborder.png');
|
||||||
|
color:red;
|
||||||
|
margin-right:20px;
|
||||||
|
}
|
||||||
|
p.submit {
|
||||||
|
margin-top:25px;
|
||||||
|
}
|
||||||
|
p.caution {
|
||||||
|
font-size:80%;
|
||||||
|
color:#136C00;
|
||||||
|
width:300px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="warn"><?=$kga['lang']['backup'][0]?></div>
|
||||||
|
<div class="main">
|
||||||
|
<?php
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// restore
|
||||||
|
|
||||||
|
if (isset($_REQUEST['submit']))
|
||||||
|
{
|
||||||
|
if (($_REQUEST['submit'] == $kga['lang']['backup'][2]) && (isset($_REQUEST['dates'])))
|
||||||
|
{
|
||||||
|
$dates = $_REQUEST['dates'];
|
||||||
|
|
||||||
|
if (count($dates)>1)
|
||||||
|
{
|
||||||
|
echo "<h1 class='fail'>".$kga['lang']['backup'][5]."</h1>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$query = ("SHOW TABLES;");
|
||||||
|
|
||||||
|
if ($kga['server_conn'] == "pdo") {
|
||||||
|
if (is_object($pdo_conn)) {
|
||||||
|
$pdo_query = $pdo_conn->prepare($query);
|
||||||
|
$success = $pdo_query->execute(array());
|
||||||
|
$tables = $pdo_query->fetchAll();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (is_object($conn)) {
|
||||||
|
$success = $conn->Query($query);
|
||||||
|
$tables = $conn->RecordsArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$arr = array();
|
||||||
|
$arr2 = array();
|
||||||
|
|
||||||
|
foreach ($tables as $row)
|
||||||
|
{
|
||||||
|
if ( (substr($row[0], 0, 10) == "kimai_bak_"))
|
||||||
|
{
|
||||||
|
if ( in_array(substr($row[0], 10, 10),$dates) )
|
||||||
|
{
|
||||||
|
$table = $row[0];
|
||||||
|
$arr[]=$table;
|
||||||
|
$arr2[]=substr($row[0], 21, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
##################
|
||||||
|
// Bis rev 733 gab es in tabelle ldr keinen Primary Key ...
|
||||||
|
|
||||||
|
$query = "SELECT value FROM kimai_bak_" . $dates[0] . "_kimai_var WHERE var = 'revision' LIMIT 0,1;";
|
||||||
|
if ($kga['server_conn'] == "pdo") {
|
||||||
|
if (is_object($pdo_conn)) {
|
||||||
|
$pdo_query = $pdo_conn->prepare($query);
|
||||||
|
$success = $pdo_query->execute(array());
|
||||||
|
$revision = $pdo_query->fetch(PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (is_object($conn)) {
|
||||||
|
$success = $conn->Query($query);
|
||||||
|
$revision = $conn->RowArray(0,MYSQL_ASSOC);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$revision = $revision['value'];
|
||||||
|
##################
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
foreach($arr2 AS $newTable)
|
||||||
|
{
|
||||||
|
|
||||||
|
$primaryKey = "";
|
||||||
|
|
||||||
|
if (strlen(strstr($newTable,"evt"))>0) { $primaryKey = "evt_ID"; }
|
||||||
|
if (strlen(strstr($newTable,"grp"))>0) { $primaryKey = "grp_ID"; }
|
||||||
|
if (strlen(strstr($newTable,"knd"))>0) { $primaryKey = "knd_ID"; }
|
||||||
|
if (strlen(strstr($newTable,"pct"))>0) { $primaryKey = "pct_ID"; }
|
||||||
|
if (strlen(strstr($newTable,"zef"))>0) { $primaryKey = "zef_ID"; }
|
||||||
|
if (strlen(strstr($newTable,"usr"))>0) { $primaryKey = "usr_name"; }
|
||||||
|
if (strlen(strstr($newTable,"var"))>0) { $primaryKey = "var"; }
|
||||||
|
if ( (strlen(strstr($newTable,"ldr"))>0)
|
||||||
|
|| (strlen(strstr($newTable,"grp_evt"))>0)
|
||||||
|
|| (strlen(strstr($newTable,"pct_evt"))>0)
|
||||||
|
|| (strlen(strstr($newTable,"grp_knd"))>0)
|
||||||
|
|| (strlen(strstr($newTable,"grp_pct"))>0))
|
||||||
|
{
|
||||||
|
$primaryKey = "uid";
|
||||||
|
}
|
||||||
|
if (strlen(strstr($newTable,"preferences"))>0) { $primaryKey = "userID`,`var"; }
|
||||||
|
|
||||||
|
if ($primaryKey!="") {
|
||||||
|
$primaryKey = " (PRIMARY KEY (`" .$primaryKey. "`))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ((int)$revision < 733) && (strlen(strstr($newTable,"ldr"))>0) ) {
|
||||||
|
$primaryKey = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
exec_query("DROP TABLE `".$arr2[$i]."`;\n");
|
||||||
|
|
||||||
|
exec_query("CREATE TABLE " . $newTable . $primaryKey . " SELECT * FROM " . $arr[$i] . ";\n");
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
exec_query("ALTER TABLE `kimai_evt` CHANGE `evt_ID` `evt_ID` INT( 10 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_knd` CHANGE `knd_ID` `knd_ID` INT( 10 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_pct` CHANGE `pct_ID` `pct_ID` INT( 10 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_zef` CHANGE `zef_ID` `zef_ID` INT( 10 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_exp` CHANGE `exp_ID` `exp_ID` INT( 10 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_grp` CHANGE `grp_ID` `grp_ID` INT( 10 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_ldr` CHANGE `uid` `uid` INT( 11 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_grp_pct` CHANGE `uid` `uid` INT( 11 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_grp_knd` CHANGE `uid` `uid` INT( 11 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
exec_query("ALTER TABLE `kimai_grp_evt` CHANGE `uid` `uid` INT( 11 ) NOT NULL AUTO_INCREMENT");
|
||||||
|
|
||||||
|
// echo $restorequery;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$date = @date ("d. M Y, H:i:s", $dates[0]);
|
||||||
|
echo "<h1 class='message'>" .$kga['lang']['backup'][6]. " ".$date."<br>" . $kga['lang']['backup'][7] ."</h1>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<h1>" . $kga['lang']['backup'][1] . "</h1>";
|
||||||
|
|
||||||
|
$query = ("SHOW TABLES;");
|
||||||
|
|
||||||
|
$result_backup=@mysql_query($query);
|
||||||
|
|
||||||
|
$arr = array();
|
||||||
|
$arr2 = array();
|
||||||
|
|
||||||
|
while ($row = mysql_fetch_array($result_backup))
|
||||||
|
{
|
||||||
|
if ( (substr($row[0], 0, 10) == "kimai_bak_"))
|
||||||
|
{
|
||||||
|
$time = substr($row[0], 10, 10);
|
||||||
|
$arr[]=$time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$neues_array = array_unique ($arr);
|
||||||
|
|
||||||
|
echo '<form method="post" accept-charset="utf-8">';
|
||||||
|
|
||||||
|
foreach($neues_array AS $date)
|
||||||
|
{
|
||||||
|
$value = @date ("d. M Y - H:i:s", $date);
|
||||||
|
|
||||||
|
if ( @date("dMY", $date) == @date("dMY", time()) )
|
||||||
|
{
|
||||||
|
$label = $kga['lang']['heute'] . @date (" - H:i:s", $date);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$label = $value;
|
||||||
|
}
|
||||||
|
echo<<<EOD
|
||||||
|
<p class="label_checkbox">
|
||||||
|
<input type="checkbox" id="$value " name="dates[]" value="$date">
|
||||||
|
<label for="$value">$label</label>
|
||||||
|
</p>
|
||||||
|
EOD;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<p class="submit">
|
||||||
|
<input type="submit" name="submit" value="<?php echo $kga['lang']['backup'][2]; ?>"> <!-- restore -->
|
||||||
|
<input type="submit" name="submit" value="<?php echo $kga['lang']['backup'][3]; ?>"> <!-- delete -->
|
||||||
|
<input type="submit" name="submit" value="<?php echo $kga['lang']['backup'][8]; ?>"> <!-- backup -->
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<a href="index.php">Login</a>
|
||||||
|
<p class="caution"><?php echo $kga['lang']['backup'][9]; ?></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
46
digital.php
Normal file
46
digital.php
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
require 'includes/autoconf.php';
|
||||||
|
|
||||||
|
if (isset($_GET['from_date'], $_GET['to_date'] , $_GET['kimaiuserid'] , $_GET['reportid'])) {
|
||||||
|
|
||||||
|
$conn = new mysqli($server_hostname, $server_username, $server_password, $server_database);
|
||||||
|
$sql = "SELECT usr_alias FROM kimai15_usr WHERE usr_ID = ". $_GET['kimaiuserid'];
|
||||||
|
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
while($row = $result->fetch_assoc()) {
|
||||||
|
$usr_alias = $row["usr_alias"];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "0 results";
|
||||||
|
}
|
||||||
|
$conn->close();
|
||||||
|
|
||||||
|
$new_filename = 'Timesheet ' . $usr_alias . ' Week Ending '. $_GET['to_date'] ;
|
||||||
|
$curl = curl_init();
|
||||||
|
|
||||||
|
curl_setopt_array($curl, array(
|
||||||
|
//CURLOPT_URL => "http://160.119.100.178:8080/jasperserver/rest_v2/reports/Timesheets/".$_GET['reportid']."_1.pdf?from_date=".$_GET['from_date']."&to_date=".$_GET['to_date']."&KimaiUserId=".$_GET['kimaiuserid']."&j_username=jaco&j_password=Bollie0001",
|
||||||
|
CURLOPT_URL => "https://reportserver.alteram.co.za/jasperserver/rest_v2/reports/Timesheets/".$_GET['reportid']."_1.pdf?from_date=".$_GET['from_date']."&to_date=".$_GET['to_date']."&KimaiUserId=".$_GET['kimaiuserid']."&j_username=jaco&j_password=Bollie0001",
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_ENCODING => "",
|
||||||
|
CURLOPT_MAXREDIRS => 10,
|
||||||
|
CURLOPT_TIMEOUT => 0,
|
||||||
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
|
CURLOPT_CUSTOMREQUEST => "GET",
|
||||||
|
CURLOPT_SSL_VERIFYPEER => false, // Disable peer verification
|
||||||
|
|
||||||
|
CURLOPT_SSL_VERIFYHOST => false,
|
||||||
|
));
|
||||||
|
header('Content-type:application/pdf');
|
||||||
|
header('Content-Disposition: inline; filename="' .$new_filename.'.pdf"');
|
||||||
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
|
curl_close($curl);
|
||||||
|
echo $response;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
56
error.php
Normal file
56
error.php
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// =============================
|
||||||
|
// = Smarty (initialize class) =
|
||||||
|
// =============================
|
||||||
|
require_once('libraries/smarty/Smarty.class.php');
|
||||||
|
$tpl = new Smarty();
|
||||||
|
$tpl->template_dir = 'templates/misc/';
|
||||||
|
$tpl->compile_dir = 'compile/';
|
||||||
|
|
||||||
|
if (!file_exists('includes/autoconf.php')) {
|
||||||
|
$headline = "Fatal Error!";
|
||||||
|
$message = "No config-file found or it doesn't contain any data. Make sure your autoconf.php contains access-data for the database.<br/><br/>Die Konfigurations-Datei konnte nicht gefunden werden oder ist leer.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (!isset($_REQUEST['err']))
|
||||||
|
$_REQUEST['err'] = '';
|
||||||
|
|
||||||
|
switch ($_REQUEST['err']) {
|
||||||
|
|
||||||
|
case 'db':
|
||||||
|
$headline = $kga['lang']['errors'][0]['hdl'];
|
||||||
|
$message = $kga['lang']['errors'][0]['txt'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$headline = "Unknown Error";
|
||||||
|
$message = "No error information was specified.";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->assign('headline', $headline);
|
||||||
|
$tpl->assign('message', $message);
|
||||||
|
|
||||||
|
$tpl->display('error.tpl');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,158 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2017-09-13 18:52:36
|
||||||
|
compiled from edituser.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'edituser.tpl', 44, false),array('modifier', 'number_format', 'edituser.tpl', 92, false),array('function', 'html_options', 'edituser.tpl', 109, false),)), $this); ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
beforeSubmit: function() {
|
||||||
|
|
||||||
|
if ($(\'#password\').val() != \'\' && !validatePassword($(\'#password\').val(),$(\'#retypePassword\').val()))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
floaterClose();
|
||||||
|
},
|
||||||
|
success: function() {
|
||||||
|
hook_chgUsr();
|
||||||
|
ap_ext_refreshSubtab(\'grp\');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(\'#ap_ext_form_editusr\').ajaxForm(options);
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="floater_innerwrap">
|
||||||
|
|
||||||
|
<div id="floater_handle">
|
||||||
|
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['editusr']; ?>
|
||||||
|
</span>
|
||||||
|
<div class="right">
|
||||||
|
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="floater_content">
|
||||||
|
|
||||||
|
<form id="ap_ext_form_editusr" action="../extensions/ki_adminpanel/processor.php" method="post">
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_name"><?php echo $this->_tpl_vars['kga']['lang']['username']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_name" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['usr_details']['usr_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" maxlength=20 size=20 />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_sts"><?php echo $this->_tpl_vars['kga']['lang']['status']; ?>
|
||||||
|
:</label>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['usr_details']['usr_sts'] == 1): ?>
|
||||||
|
<select name="usr_sts">
|
||||||
|
<option value="0" <?php if ($this->_tpl_vars['usr_details']['usr_sts'] == 0): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['adminusr']; ?>
|
||||||
|
(!)</option>
|
||||||
|
<option value="1" <?php if ($this->_tpl_vars['usr_details']['usr_sts'] == 1): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['groupleader']; ?>
|
||||||
|
</option>
|
||||||
|
<option value="2" <?php if ($this->_tpl_vars['usr_details']['usr_sts'] == 2): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['regusr']; ?>
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<?php else: ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['curr_user'] == $this->_tpl_vars['usr_details']['usr_name'] && $this->_tpl_vars['usr_details']['usr_sts'] == 0): ?>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['admWarn']; ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<select name="usr_sts">
|
||||||
|
<option value="0" <?php if ($this->_tpl_vars['usr_details']['usr_sts'] == 0): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['adminusr']; ?>
|
||||||
|
(!)</option>
|
||||||
|
<option value="2" <?php if ($this->_tpl_vars['usr_details']['usr_sts'] == 2): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['regusr']; ?>
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_pw"><?php echo $this->_tpl_vars['kga']['lang']['newPassword']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="password" name="usr_pw" size="9" id="password" /> <?php echo $this->_tpl_vars['kga']['lang']['minLength']; ?>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['usr_details']['usr_pw'] == 'no'): ?>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/caution_mini.png" alt="Caution" valign=middle />
|
||||||
|
<strong style="color:red"><?php echo $this->_tpl_vars['kga']['lang']['nopassword']; ?>
|
||||||
|
</strong>
|
||||||
|
<?php endif; ?>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_pw"><?php echo $this->_tpl_vars['kga']['lang']['retypePassword']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="password" name="retypePassword" id="retypePassword" size="9" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_rate"><?php echo $this->_tpl_vars['kga']['lang']['rate']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_rate" value="<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['usr_details']['usr_rate'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2, $this->_tpl_vars['kga']['conf']['decimalSeparator'], "") : number_format($_tmp, 2, $this->_tpl_vars['kga']['conf']['decimalSeparator'], "")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_mail"><?php echo $this->_tpl_vars['kga']['lang']['mail']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_mail" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['usr_details']['usr_mail'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_alias"><?php echo $this->_tpl_vars['kga']['lang']['alias']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_alias" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['usr_details']['usr_alias'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_grp"><?php echo $this->_tpl_vars['kga']['lang']['group']; ?>
|
||||||
|
:</label>
|
||||||
|
<select class="formfield" name="usr_grp">
|
||||||
|
<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['arr_grp_ID'],'output' => $this->_tpl_vars['arr_grp_name'],'selected' => $this->_tpl_vars['usr_details']['usr_grp']), $this);?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<input name="id" type="hidden" value="<?php echo $this->_tpl_vars['usr_details']['usr_ID']; ?>
|
||||||
|
" />
|
||||||
|
<input name="axAction" type="hidden" value="sendEditUsr" />
|
||||||
|
|
||||||
|
<div id="formbuttons">
|
||||||
|
<input class='btn_norm' type='button' value='<?php echo $this->_tpl_vars['kga']['lang']['cancel']; ?>
|
||||||
|
' onClick='floaterClose(); return false;' />
|
||||||
|
<input class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['submit']; ?>
|
||||||
|
' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
113
extensions/ki_adminpanel/compile/%%32^32B^32BF34C2%%knd.tpl.php
Normal file
113
extensions/ki_adminpanel/compile/%%32^32B^32BF34C2%%knd.tpl.php
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-18 19:25:45
|
||||||
|
compiled from knd.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'knd.tpl', 1, false),array('function', 'cycle', 'knd.tpl', 4, false),)), $this); ?>
|
||||||
|
<a href="#" onClick="floaterShow('floaters.php','add_edit_knd',0,0,450,200); $(this).blur(); return false;"><img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/add.png" width="22" height="16" alt="<?php echo $this->_tpl_vars['kga']['lang']['new_knd']; ?>
|
||||||
|
"></a> <?php echo $this->_tpl_vars['kga']['lang']['new_knd']; ?>
|
||||||
|
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
<?php echo smarty_function_cycle(array('values' => "odd,even",'reset' => true,'print' => false), $this);?>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['options']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['knds']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['contactPerson']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['groups']; ?>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<?php unset($this->_sections['row']);
|
||||||
|
$this->_sections['row']['name'] = 'row';
|
||||||
|
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_knd']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['row']['show'] = true;
|
||||||
|
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||||
|
$this->_sections['row']['step'] = 1;
|
||||||
|
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||||
|
if ($this->_sections['row']['show']) {
|
||||||
|
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||||
|
if ($this->_sections['row']['total'] == 0)
|
||||||
|
$this->_sections['row']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['row']['total'] = 0;
|
||||||
|
if ($this->_sections['row']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||||
|
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||||
|
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||||
|
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||||
|
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||||
|
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||||
|
?>
|
||||||
|
<?php if ($this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_visible'] || $this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['zeit'] != "0:00"): ?>
|
||||||
|
|
||||||
|
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
|
||||||
|
">
|
||||||
|
|
||||||
|
<td class="option">
|
||||||
|
<a href ="#" onClick="editSubject('knd',<?php echo $this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_ID']; ?>
|
||||||
|
); $(this).blur(); return false;">
|
||||||
|
<img src='../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/edit2.gif' width='13' height='13' alt='<?php echo $this->_tpl_vars['kga']['lang']['edit']; ?>
|
||||||
|
' title='<?php echo $this->_tpl_vars['kga']['lang']['edit']; ?>
|
||||||
|
' border='0' />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" id="delete_knd<?php echo $this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_ID']; ?>
|
||||||
|
" onClick="ap_ext_deleteCustomer(<?php echo $this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_ID']; ?>
|
||||||
|
)">
|
||||||
|
<img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/button_trashcan.png" title="<?php echo $this->_tpl_vars['kga']['lang']['delknd']; ?>
|
||||||
|
" width="13" height="13" alt="<?php echo $this->_tpl_vars['kga']['lang']['delknd']; ?>
|
||||||
|
" border="0">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="clients">
|
||||||
|
<?php if ($this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_visible'] != 1): ?><span style="color:#bbb"><?php endif; ?>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_visible'] != 1): ?></span><?php endif; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['knd_contact'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_knd'][$this->_sections['row']['index']]['groups'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['arr_knd'] == '0'): ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan='3'>
|
||||||
|
<strong style="color:red"><?php echo $this->_tpl_vars['kga']['lang']['noItems']; ?>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-18 19:25:45
|
||||||
|
compiled from database.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'database.tpl', 1, false),)), $this); ?>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['DBname']; ?>
|
||||||
|
: <?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['server_database'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<a href="../db_restore.php">Database Backup Utility</a>
|
||||||
124
extensions/ki_adminpanel/compile/%%72^72D^72DAF6E8%%main.tpl.php
Normal file
124
extensions/ki_adminpanel/compile/%%72^72D^72DAF6E8%%main.tpl.php
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2017-09-08 09:07:00
|
||||||
|
compiled from main.tpl */ ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
ap_ext_onload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ap_ext_panel">
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ap_ext_sub5">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(5)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['knds']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s5" class="ap_ext_subtab ap_ext_subject">
|
||||||
|
<?php echo $this->_tpl_vars['knd_display']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ap_ext_sub6">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(6)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['pcts']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s6" class="ap_ext_subtab ap_ext_subject">
|
||||||
|
<?php echo $this->_tpl_vars['pct_display']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ap_ext_sub7">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(7)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['evts']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s7" class="ap_ext_subtab ap_ext_subject">
|
||||||
|
<?php echo $this->_tpl_vars['evt_display']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['kga']['usr']['usr_sts'] == 0): ?>
|
||||||
|
<div id="ap_ext_sub1">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(1)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['users']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s1" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
<?php echo $this->_tpl_vars['admin']['users']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div id="ap_ext_sub2">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(2)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['groups']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s2" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
<?php echo $this->_tpl_vars['admin']['groups']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['kga']['usr']['usr_sts'] == 0): ?>
|
||||||
|
<div id="ap_ext_sub3">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(3)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['advanced']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s3" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
<?php echo $this->_tpl_vars['admin']['advanced']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['kga']['usr']['usr_sts'] == 0): ?>
|
||||||
|
<div id="ap_ext_sub4">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(4)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['database']; ?>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s4" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
<?php echo $this->_tpl_vars['admin']['database']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-18 19:25:45
|
||||||
|
compiled from groups.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'groups.tpl', 19, false),array('modifier', 'escape', 'groups.tpl', 23, false),)), $this); ?>
|
||||||
|
<form>
|
||||||
|
<input type=text id="newgroup" class="formfield"></input>
|
||||||
|
<input class='btn_ok' type=submit value="<?php echo $this->_tpl_vars['kga']['lang']['addgroup']; ?>
|
||||||
|
" onclick="ap_ext_newGroup(); return false;">
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['group']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['options']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['members']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['groupleader']; ?>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
<?php unset($this->_sections['grouparray']);
|
||||||
|
$this->_sections['grouparray']['name'] = 'grouparray';
|
||||||
|
$this->_sections['grouparray']['loop'] = is_array($_loop=$this->_tpl_vars['arr_grp']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['grouparray']['show'] = true;
|
||||||
|
$this->_sections['grouparray']['max'] = $this->_sections['grouparray']['loop'];
|
||||||
|
$this->_sections['grouparray']['step'] = 1;
|
||||||
|
$this->_sections['grouparray']['start'] = $this->_sections['grouparray']['step'] > 0 ? 0 : $this->_sections['grouparray']['loop']-1;
|
||||||
|
if ($this->_sections['grouparray']['show']) {
|
||||||
|
$this->_sections['grouparray']['total'] = $this->_sections['grouparray']['loop'];
|
||||||
|
if ($this->_sections['grouparray']['total'] == 0)
|
||||||
|
$this->_sections['grouparray']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['grouparray']['total'] = 0;
|
||||||
|
if ($this->_sections['grouparray']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['grouparray']['index'] = $this->_sections['grouparray']['start'], $this->_sections['grouparray']['iteration'] = 1;
|
||||||
|
$this->_sections['grouparray']['iteration'] <= $this->_sections['grouparray']['total'];
|
||||||
|
$this->_sections['grouparray']['index'] += $this->_sections['grouparray']['step'], $this->_sections['grouparray']['iteration']++):
|
||||||
|
$this->_sections['grouparray']['rownum'] = $this->_sections['grouparray']['iteration'];
|
||||||
|
$this->_sections['grouparray']['index_prev'] = $this->_sections['grouparray']['index'] - $this->_sections['grouparray']['step'];
|
||||||
|
$this->_sections['grouparray']['index_next'] = $this->_sections['grouparray']['index'] + $this->_sections['grouparray']['step'];
|
||||||
|
$this->_sections['grouparray']['first'] = ($this->_sections['grouparray']['iteration'] == 1);
|
||||||
|
$this->_sections['grouparray']['last'] = ($this->_sections['grouparray']['iteration'] == $this->_sections['grouparray']['total']);
|
||||||
|
?>
|
||||||
|
<tr class='<?php echo smarty_function_cycle(array('values' => "even,odd"), $this);?>
|
||||||
|
'>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php if ($this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['grp_ID'] == 1): ?>
|
||||||
|
<span style="color:red"><?php echo ((is_array($_tmp=$this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['grp_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
</span>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['grp_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td><?php echo '<a href="#" onClick="ap_ext_editGroup(\''; ?><?php echo $this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['grp_ID']; ?><?php echo '\'); $(this).blur(); return false;"><img src="../skins/'; ?><?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?><?php echo '/grfx/edit2.gif" title="'; ?><?php echo $this->_tpl_vars['kga']['lang']['editgrp']; ?><?php echo '" width="13" height="13" alt="'; ?><?php echo $this->_tpl_vars['kga']['lang']['editgrp']; ?><?php echo '" border="0"></a> '; ?><?php echo ''; ?><?php if ($this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['count_users'] == 0): ?><?php echo '<a href="#" onClick="ap_ext_deleteGroup('; ?><?php echo $this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['grp_ID']; ?><?php echo ')"><img src="../skins/'; ?><?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?><?php echo '/grfx/button_trashcan.png" title="'; ?><?php echo $this->_tpl_vars['kga']['lang']['delgrp']; ?><?php echo '" width="13" height="13" alt="'; ?><?php echo $this->_tpl_vars['kga']['lang']['delgrp']; ?><?php echo '" border="0"></a>'; ?><?php else: ?><?php echo '<img src="../skins/'; ?><?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?><?php echo '/grfx/button_trashcan_.png" title="'; ?><?php echo $this->_tpl_vars['kga']['lang']['delgrp']; ?><?php echo '" width="13" height="13" alt="'; ?><?php echo $this->_tpl_vars['kga']['lang']['delgrp']; ?><?php echo '" border="0">'; ?><?php endif; ?><?php echo ''; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td><?php echo $this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['count_users']; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php $_from = $this->_tpl_vars['arr_grp'][$this->_sections['grouparray']['index']]['leader_name']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
|
||||||
|
foreach ($_from as $this->_tpl_vars['leader']):
|
||||||
|
?>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['leader'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
<?php endforeach; endif; unset($_from); ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
112
extensions/ki_adminpanel/compile/%%8B^8B1^8B1878AA%%pct.tpl.php
Normal file
112
extensions/ki_adminpanel/compile/%%8B^8B1^8B1878AA%%pct.tpl.php
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-18 19:25:45
|
||||||
|
compiled from pct.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'pct.tpl', 1, false),array('modifier', 'truncate', 'pct.tpl', 37, false),array('function', 'cycle', 'pct.tpl', 4, false),)), $this); ?>
|
||||||
|
<a href="#" onClick="floaterShow('floaters.php','add_edit_pct',0,0,450,200); $(this).blur(); return false;"><img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/add.png" width="22" height="16" alt="<?php echo $this->_tpl_vars['kga']['lang']['new_pct']; ?>
|
||||||
|
"></a> <?php echo $this->_tpl_vars['kga']['lang']['new_pct']; ?>
|
||||||
|
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
<?php echo smarty_function_cycle(array('values' => "odd,even",'reset' => true,'print' => false), $this);?>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['options']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['pcts']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['groups']; ?>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<?php unset($this->_sections['row']);
|
||||||
|
$this->_sections['row']['name'] = 'row';
|
||||||
|
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_pct']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['row']['show'] = true;
|
||||||
|
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||||
|
$this->_sections['row']['step'] = 1;
|
||||||
|
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||||
|
if ($this->_sections['row']['show']) {
|
||||||
|
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||||
|
if ($this->_sections['row']['total'] == 0)
|
||||||
|
$this->_sections['row']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['row']['total'] = 0;
|
||||||
|
if ($this->_sections['row']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||||
|
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||||
|
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||||
|
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||||
|
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||||
|
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||||
|
?>
|
||||||
|
<?php if ($this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_visible'] || $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['zeit'] != "0:00"): ?>
|
||||||
|
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
|
||||||
|
">
|
||||||
|
|
||||||
|
<td class="option">
|
||||||
|
<a href ="#" onClick="editSubject('pct',<?php echo $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_ID']; ?>
|
||||||
|
); $(this).blur(); return false;">
|
||||||
|
<img src='../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/edit2.gif' width='13' height='13' alt='<?php echo $this->_tpl_vars['kga']['lang']['edit']; ?>
|
||||||
|
' title='<?php echo $this->_tpl_vars['kga']['lang']['edit']; ?>
|
||||||
|
' border='0' />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" id="delete_pct<?php echo $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_ID']; ?>
|
||||||
|
" onClick="ap_ext_deleteProject(<?php echo $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_ID']; ?>
|
||||||
|
)">
|
||||||
|
<img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/button_trashcan.png" title="<?php echo $this->_tpl_vars['kga']['lang']['delpct']; ?>
|
||||||
|
" width="13" height="13" alt="<?php echo $this->_tpl_vars['kga']['lang']['delpct']; ?>
|
||||||
|
" border="0">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="projects">
|
||||||
|
<?php if ($this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_visible'] != 1): ?><span style="color:#bbb"><?php endif; ?>
|
||||||
|
<?php if ($this->_tpl_vars['kga']['conf']['flip_pct_display']): ?>
|
||||||
|
<span class="lighter"><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 30, "...") : smarty_modifier_truncate($_tmp, 30, "...")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
:</span> <?php echo ((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
<span class="lighter">(<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 30, "...") : smarty_modifier_truncate($_tmp, 30, "...")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
)</span>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_visible'] != 1): ?></span><?php endif; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['groups'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['arr_pct'] == '0'): ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan='3'>
|
||||||
|
<strong style="color:red"><?php echo $this->_tpl_vars['kga']['lang']['noItems']; ?>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-19 23:33:08
|
||||||
|
compiled from editgroup.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'editgroup.tpl', 28, false),array('function', 'html_options', 'editgroup.tpl', 34, false),)), $this); ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$(\'#ap_ext_form_editgrp\').ajaxForm(function() {
|
||||||
|
floaterClose();
|
||||||
|
ap_ext_refreshSubtab(\'grp\');
|
||||||
|
ap_ext_refreshSubtab(\'usr\');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="floater_innerwrap">
|
||||||
|
|
||||||
|
<div id="floater_handle">
|
||||||
|
<span id="floater_title"><?php echo $this->_tpl_vars['kga']['lang']['editgrp']; ?>
|
||||||
|
</span>
|
||||||
|
<div class="right">
|
||||||
|
<a href="#" class="close" onClick="floaterClose();"><?php echo $this->_tpl_vars['kga']['lang']['close']; ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="floater_content">
|
||||||
|
<form id="ap_ext_form_editgrp" action="../extensions/ki_adminpanel/processor.php" method="post">
|
||||||
|
<fieldset>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label for="grp_name"><?php echo $this->_tpl_vars['kga']['lang']['groupname']; ?>
|
||||||
|
:</label>
|
||||||
|
<input class="formfield" type="text" name="grp_name" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['grp_details']['grp_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" size=35 />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="grp_leader" ><?php echo $this->_tpl_vars['kga']['lang']['groupleader']; ?>
|
||||||
|
:</label>
|
||||||
|
<select class="formfield" name="grp_leader[]" multiple size='5' style="width:255px">
|
||||||
|
<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['arr_usr_ID'],'output' => $this->_tpl_vars['arr_usr_name'],'selected' => $this->_tpl_vars['grp_selection']), $this);?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<input name="id" type="hidden" value="<?php echo $this->_tpl_vars['grp_details']['grp_ID']; ?>
|
||||||
|
" />
|
||||||
|
<input name="axAction" type="hidden" value="sendEditGrp" />
|
||||||
|
<div id="formbuttons">
|
||||||
|
<input class='btn_norm' type='button' value='<?php echo $this->_tpl_vars['kga']['lang']['cancel']; ?>
|
||||||
|
' onClick='floaterClose(); return false;' />
|
||||||
|
<input class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['submit']; ?>
|
||||||
|
' />
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-18 19:25:45
|
||||||
|
compiled from advanced.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'advanced.tpl', 28, false),array('function', 'html_options', 'advanced.tpl', 43, false),)), $this); ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
function cb(data) {
|
||||||
|
if (data=="ok") {
|
||||||
|
window.location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#ap_ext_form_editadv_submit").blur();
|
||||||
|
$("#ap_ext_output").width($(".ap_ext_panel_header").width()-22);
|
||||||
|
$("#ap_ext_output").fadeIn(fading_enabled?500:0,function(){
|
||||||
|
$("#ap_ext_output").fadeOut(fading_enabled?4000:0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$(document).ready(function() {
|
||||||
|
$(\'#ap_ext_form_editadv\').ajaxForm({target:\'#ap_ext_output\',success:cb});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<div id="ap_ext_output"></div>
|
||||||
|
|
||||||
|
<form id="ap_ext_form_editadv" action="../extensions/ki_adminpanel/processor.php" method="post">
|
||||||
|
|
||||||
|
<fieldset class="ap_ext_advanced">
|
||||||
|
<div>
|
||||||
|
<input type="text" name="adminmail" size="20" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['adminmail'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['adminmail']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="text" name="logintries" size="2" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['loginTries'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['logintries']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="text" name="loginbantime" size="4" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['loginBanTime'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['bantime']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ap_ext_checkupdate">
|
||||||
|
<a href="javascript:ap_ext_checkupdate();"><?php echo $this->_tpl_vars['kga']['lang']['checkupdate']; ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['lang']; ?>
|
||||||
|
: <select name="language" class="formfield">
|
||||||
|
<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['languages'],'output' => $this->_tpl_vars['languages'],'selected' => $this->_tpl_vars['kga']['conf']['language']), $this);?>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_sensible_data" <?php if ($this->_tpl_vars['kga']['show_sensible_data']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['show_sensible_data']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_update_warn" <?php if ($this->_tpl_vars['kga']['show_update_warn']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['show_update_warn']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="check_at_startup" <?php if ($this->_tpl_vars['kga']['check_at_startup']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['check_at_startup']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_daySeperatorLines" <?php if ($this->_tpl_vars['kga']['show_daySeperatorLines']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['show_daySeperatorLines']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_gabBreaks" <?php if ($this->_tpl_vars['kga']['show_gabBreaks']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['show_gabBreaks']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_RecordAgain" <?php if ($this->_tpl_vars['kga']['show_RecordAgain']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['show_RecordAgain']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_TrackingNr" <?php if ($this->_tpl_vars['kga']['show_TrackingNr']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['show_TrackingNr']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="currency_name" size="8" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['currency_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['currency_name']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="currency_sign" size="2" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['currency_sign'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['currency_sign']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="currency_first" <?php if ($this->_tpl_vars['kga']['conf']['currency_first']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['currency_first']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="date_format_2" size="8" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['date_format']['2'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['display_date_format']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="date_format_0" size="8" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['date_format']['0'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['display_currentDate_format']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="date_format_1" size="8" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['date_format']['1'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['table_date_format']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="durationWithSeconds" <?php if ($this->_tpl_vars['kga']['conf']['durationWithSeconds']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['durationWithSeconds']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['round_time']; ?>
|
||||||
|
<select name="roundPrecision" class="formfield">
|
||||||
|
<option value="0" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 0): ?>selected="selected"<?php endif; ?>>-</option>
|
||||||
|
<option value="1" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 1): ?>selected="selected"<?php endif; ?>>1</option>
|
||||||
|
<option value="5" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 5): ?>selected="selected"<?php endif; ?>>5</option>
|
||||||
|
<option value="10" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 10): ?>selected="selected"<?php endif; ?>>10</option>
|
||||||
|
<option value="15" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 15): ?>selected="selected"<?php endif; ?>>15</option>
|
||||||
|
<option value="15" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 20): ?>selected="selected"<?php endif; ?>>20</option>
|
||||||
|
<option value="30" <?php if ($this->_tpl_vars['kga']['conf']['roundPrecision'] == 30): ?>selected="selected"<?php endif; ?>>30</option>
|
||||||
|
</select> <?php echo $this->_tpl_vars['kga']['lang']['round_time_minute']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['decimal_separator']; ?>
|
||||||
|
: <input type="text" name="decimalSeparator" size="1" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['decimalSeparator'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
" class="formfield">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<select name="defaultTimezone">
|
||||||
|
<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['timezones'],'output' => $this->_tpl_vars['timezones'],'selected' => $this->_tpl_vars['kga']['conf']['defaultTimezone']), $this);?>
|
||||||
|
|
||||||
|
</select> <?php echo $this->_tpl_vars['kga']['lang']['defaultTimezone']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="exactSums" <?php if ($this->_tpl_vars['kga']['conf']['exactSums']): ?>checked="checked"<?php endif; ?> value="1" class="formfield"> <?php echo $this->_tpl_vars['kga']['lang']['exactSums']; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<input name="axAction" type="hidden" value="sendEditAdvanced" />
|
||||||
|
|
||||||
|
<div id="formbuttons">
|
||||||
|
<input id="ap_ext_form_editadv_submit" class='btn_ok' type='submit' value='<?php echo $this->_tpl_vars['kga']['lang']['save']; ?>
|
||||||
|
' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
150
extensions/ki_adminpanel/compile/%%ED^EDE^EDE558EB%%evt.tpl.php
Normal file
150
extensions/ki_adminpanel/compile/%%ED^EDE^EDE558EB%%evt.tpl.php
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-18 19:25:45
|
||||||
|
compiled from evt.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'evt.tpl', 2, false),array('modifier', 'truncate', 'evt.tpl', 10, false),array('function', 'cycle', 'evt.tpl', 15, false),)), $this); ?>
|
||||||
|
|
||||||
|
<a href="#" onClick="floaterShow('floaters.php','add_edit_evt',0,0,450,200); $(this).blur(); return false;"><img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/add.png" width="22" height="16" alt="<?php echo $this->_tpl_vars['kga']['lang']['new_evt']; ?>
|
||||||
|
"></a> <?php echo $this->_tpl_vars['kga']['lang']['new_evt']; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php echo $this->_tpl_vars['kga']['lang']['view_filter']; ?>
|
||||||
|
:
|
||||||
|
<select size="1" id="evt_pct_filter" onchange="ap_ext_refreshSubtab('evt');">
|
||||||
|
<option value="-2" <?php if ($this->_tpl_vars['selected_evt_filter'] == -2): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['unassigned']; ?>
|
||||||
|
</option>
|
||||||
|
<option value="-1" <?php if ($this->_tpl_vars['selected_evt_filter'] == -1): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['kga']['lang']['all_events']; ?>
|
||||||
|
</option>
|
||||||
|
<?php unset($this->_sections['row']);
|
||||||
|
$this->_sections['row']['name'] = 'row';
|
||||||
|
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_pct']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['row']['show'] = true;
|
||||||
|
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||||
|
$this->_sections['row']['step'] = 1;
|
||||||
|
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||||
|
if ($this->_sections['row']['show']) {
|
||||||
|
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||||
|
if ($this->_sections['row']['total'] == 0)
|
||||||
|
$this->_sections['row']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['row']['total'] = 0;
|
||||||
|
if ($this->_sections['row']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||||
|
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||||
|
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||||
|
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||||
|
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||||
|
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_ID']; ?>
|
||||||
|
"
|
||||||
|
<?php if ($this->_tpl_vars['selected_evt_filter'] == $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_ID']): ?>selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
(<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['knd_name'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 30, "...") : smarty_modifier_truncate($_tmp, 30, "...")))) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
)</option>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
</select>
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
<?php echo smarty_function_cycle(array('values' => "odd,even",'reset' => true,'print' => false), $this);?>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['options']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['evts']; ?>
|
||||||
|
</th>
|
||||||
|
<th><?php echo $this->_tpl_vars['kga']['lang']['groups']; ?>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<?php unset($this->_sections['row']);
|
||||||
|
$this->_sections['row']['name'] = 'row';
|
||||||
|
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_evt']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['row']['show'] = true;
|
||||||
|
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||||
|
$this->_sections['row']['step'] = 1;
|
||||||
|
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||||
|
if ($this->_sections['row']['show']) {
|
||||||
|
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||||
|
if ($this->_sections['row']['total'] == 0)
|
||||||
|
$this->_sections['row']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['row']['total'] = 0;
|
||||||
|
if ($this->_sections['row']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||||
|
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||||
|
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||||
|
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||||
|
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||||
|
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||||
|
?>
|
||||||
|
<?php if ($this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_visible'] || $this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['zeit'] != "0:00"): ?>
|
||||||
|
|
||||||
|
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
|
||||||
|
">
|
||||||
|
|
||||||
|
<td class="option">
|
||||||
|
<a href ="#" onClick="editSubject('evt',<?php echo $this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_ID']; ?>
|
||||||
|
); $(this).blur(); return false;">
|
||||||
|
<img src='../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/edit2.gif' width='13' height='13' alt='<?php echo $this->_tpl_vars['kga']['lang']['edit']; ?>
|
||||||
|
' title='<?php echo $this->_tpl_vars['kga']['lang']['edit']; ?>
|
||||||
|
' border='0' />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" id="delete_evt<?php echo $this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_ID']; ?>
|
||||||
|
" onClick="ap_ext_deleteEvent(<?php echo $this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_ID']; ?>
|
||||||
|
)">
|
||||||
|
<img src="../skins/<?php echo ((is_array($_tmp=$this->_tpl_vars['kga']['conf']['skin'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
/grfx/button_trashcan.png" title="<?php echo $this->_tpl_vars['kga']['lang']['delevt']; ?>
|
||||||
|
" width="13" height="13" alt="<?php echo $this->_tpl_vars['kga']['lang']['delevt']; ?>
|
||||||
|
" border="0">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="events">
|
||||||
|
<?php if ($this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_visible'] != 1): ?><span style="color:#bbb"><?php endif; ?>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['evt_visible'] != 1): ?></span><?php endif; ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_evt'][$this->_sections['row']['index']]['groups'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php if ($this->_tpl_vars['arr_evt'] == '0'): ?>
|
||||||
|
<tr>
|
||||||
|
<td colspan='3'>
|
||||||
|
<strong style="color:red"><?php echo $this->_tpl_vars['kga']['lang']['noItems']; ?>
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
18
extensions/ki_adminpanel/config.ini
Normal file
18
extensions/ki_adminpanel/config.ini
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
EXTENSION_NAME = "Admin Panel"
|
||||||
|
EXTENSION_KEY = "ap_ext"
|
||||||
|
EXTENSION_DIR = "ki_adminpanel"
|
||||||
|
EXTENSION_INIT_FILE = "ki_adminpanel/init.php"
|
||||||
|
ADMIN_ALLOWED = "1"
|
||||||
|
GROUP_LEADER_ALLOWED = "1"
|
||||||
|
USER_ALLOWED = "0"
|
||||||
|
CUSTOMER_ALLOWED = "0"
|
||||||
|
|
||||||
|
TAB_CHANGE_TRIGGER = "ap_ext_triggerchange();"
|
||||||
|
CHANGE_KND_TRIGGER = "ap_ext_triggerCHK();"
|
||||||
|
CHANGE_PCT_TRIGGER = "ap_ext_triggerCHP();"
|
||||||
|
CHANGE_EVT_TRIGGER = "ap_ext_triggerCHE();"
|
||||||
|
CHANGE_USR_TRIGGER = "ap_ext_triggerUSR();"
|
||||||
|
|
||||||
|
CSS_INCLUDE_FILES = "../extensions/ki_adminpanel/css/styles.css"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_adminpanel/js/ap_func.js"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_adminpanel/js/ap_init.js"
|
||||||
29
extensions/ki_adminpanel/css/advanced.css
Normal file
29
extensions/ki_adminpanel/css/advanced.css
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
fieldset.ap_ext_advanced {
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset.ap_ext_advanced div {
|
||||||
|
border-bottom:1px dotted #666;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset.ap_ext_advanced div#formbuttons {
|
||||||
|
border-bottom:none;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ap_ext_output {
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
height:27px;
|
||||||
|
width:100%;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-bottom: 2px solid black;
|
||||||
|
background:green;
|
||||||
|
display:none;
|
||||||
|
padding:10px;
|
||||||
|
text-align:center;
|
||||||
|
color:white;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
57
extensions/ki_adminpanel/css/setup.css.php
Normal file
57
extensions/ki_adminpanel/css/setup.css.php
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-type: text/css');
|
||||||
|
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||||
|
?>
|
||||||
|
|
||||||
|
#ap_ext_panel {
|
||||||
|
top:120px;
|
||||||
|
z-index:2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ap_ext_panel,
|
||||||
|
#ap_ext_knd,
|
||||||
|
#ap_ext_pct,
|
||||||
|
#ap_ext_evt
|
||||||
|
{
|
||||||
|
border:1px solid black;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
background-color:#eee;
|
||||||
|
position:absolute;
|
||||||
|
overflow:auto;
|
||||||
|
left:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ap_ext_knd,
|
||||||
|
#ap_ext_evt,
|
||||||
|
#ap_ext_pct
|
||||||
|
{
|
||||||
|
width:200px;
|
||||||
|
background-color:#FFF;
|
||||||
|
font-size: 12px;
|
||||||
|
height:175px;
|
||||||
|
border-top:none;
|
||||||
|
z-index:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ap_ext_knd_head,
|
||||||
|
#ap_ext_pct_head,
|
||||||
|
#ap_ext_evt_head
|
||||||
|
{
|
||||||
|
border:1px solid black;
|
||||||
|
border-bottom:none;
|
||||||
|
background-image: url('<?php echo $table_header; ?>');
|
||||||
|
position:absolute;
|
||||||
|
height:25px;
|
||||||
|
text-align:left;
|
||||||
|
color:#FFF;
|
||||||
|
left:10px;
|
||||||
|
font-size:11px;
|
||||||
|
font-weight:bold;
|
||||||
|
padding:3px 0 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ap_ext_panel {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
4
extensions/ki_adminpanel/css/styles.css
Normal file
4
extensions/ki_adminpanel/css/styles.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@import "setup.css.php";
|
||||||
|
@import "subtabs.css.php";
|
||||||
|
@import "tables.css";
|
||||||
|
@import "advanced.css";
|
||||||
44
extensions/ki_adminpanel/css/subtabs.css.php
Normal file
44
extensions/ki_adminpanel/css/subtabs.css.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-type: text/css');
|
||||||
|
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||||
|
$table_header_lighter = "../../../skins/standard/grfx/g3_table_header_lighter.png";
|
||||||
|
?>
|
||||||
|
|
||||||
|
.ap_ext_panel_header {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.ap_ext_panel_header a {
|
||||||
|
background-image: url('<?php echo $table_header_lighter; ?>');
|
||||||
|
height: 19px;
|
||||||
|
text-align: left;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 11px;
|
||||||
|
display: block;
|
||||||
|
padding: 3px;
|
||||||
|
height: 19px;
|
||||||
|
}
|
||||||
|
div.active .ap_ext_panel_header a {
|
||||||
|
background-image: url('<?php echo $table_header; ?>');
|
||||||
|
color: #ffffff !important;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
div.active .ap_ext_panel_header a:hover {
|
||||||
|
background-image: url('<?php echo $table_header; ?>');
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
div.active span.ap_ext_accordeon_triangle {
|
||||||
|
background: url("../grfx/accordion_active.png") no-repeat;
|
||||||
|
background-position: 0px 8px;
|
||||||
|
}
|
||||||
|
.ap_ext_subtab {
|
||||||
|
border-bottom: 1px solid black;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
span.ap_ext_accordeon_triangle {
|
||||||
|
padding: 5px;
|
||||||
|
background: url("../grfx/accordion.png") no-repeat;
|
||||||
|
background-position: 0px 8px;
|
||||||
|
}
|
||||||
|
.ap_ext_advanced_row { margin-bottom: 3px; }
|
||||||
23
extensions/ki_adminpanel/css/tables.css
Normal file
23
extensions/ki_adminpanel/css/tables.css
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#ap_ext_panel table {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #363636;
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
#ap_ext_panel table th {
|
||||||
|
height: 25px;
|
||||||
|
background-color: #92968e;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
#ap_ext_panel table td { padding-left: 5px; }
|
||||||
|
#ap_ext_panel table tr {
|
||||||
|
height: 20px;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
border-bottom: 1px solid #b8b8b8;
|
||||||
|
}
|
||||||
|
#ap_ext_panel table tr.even { background-color: #ffffff; }
|
||||||
|
#ap_ext_panel div.ap_ext_subject td.option { width: 30px; }
|
||||||
|
#ap_ext_panel div.ap_ext_4cols td { width: 25%; }
|
||||||
78
extensions/ki_adminpanel/floaters.php
Normal file
78
extensions/ki_adminpanel/floaters.php
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// insert KSPI
|
||||||
|
$isCoreProcessor = 0;
|
||||||
|
$dir_templates = "templates/floaters/";
|
||||||
|
require("../../includes/kspi.php");
|
||||||
|
|
||||||
|
switch ($axAction) {
|
||||||
|
|
||||||
|
case "editUsr":
|
||||||
|
// =============================
|
||||||
|
// = Builds edit-user dialogue =
|
||||||
|
// =============================
|
||||||
|
|
||||||
|
$usr_details = get_usr($id);
|
||||||
|
$arr = get_arr_grp();
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
foreach ($arr as $row) {
|
||||||
|
$arr_grp_name[$i] = $row['grp_name'];
|
||||||
|
$arr_grp_ID[$i] = $row['grp_ID'];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->assign('arr_grp_ID', $arr_grp_ID);
|
||||||
|
$tpl->assign('arr_grp_name', $arr_grp_name);
|
||||||
|
|
||||||
|
$tpl->assign('usr_details', $usr_details);
|
||||||
|
$tpl->display("edituser.tpl");
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "editGrp":
|
||||||
|
// =============================
|
||||||
|
// = Builds edit-group dialogue =
|
||||||
|
// =============================
|
||||||
|
|
||||||
|
$grp_details = grp_get_data($_REQUEST['id']);
|
||||||
|
$arr = get_arr_usr();
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
foreach ($arr as $row) {
|
||||||
|
$arr_usr_name[$i] = $row['usr_name'];
|
||||||
|
$arr_usr_ID[$i] = $row['usr_ID'];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$grp_selection=grp_get_ldrs($_REQUEST['id']);
|
||||||
|
$tpl->assign('grp_selection', $grp_selection);
|
||||||
|
|
||||||
|
$tpl->assign('arr_usr_ID', $arr_usr_ID);
|
||||||
|
$tpl->assign('arr_usr_name', $arr_usr_name);
|
||||||
|
|
||||||
|
$tpl->assign('grp_details', $grp_details);
|
||||||
|
$tpl->display("editgroup.tpl");
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
BIN
extensions/ki_adminpanel/grfx/accordion.png
Normal file
BIN
extensions/ki_adminpanel/grfx/accordion.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 226 B |
BIN
extensions/ki_adminpanel/grfx/accordion_active.png
Normal file
BIN
extensions/ki_adminpanel/grfx/accordion_active.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 251 B |
144
extensions/ki_adminpanel/init.php
Normal file
144
extensions/ki_adminpanel/init.php
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include Basics
|
||||||
|
include('../../includes/basics.php');
|
||||||
|
|
||||||
|
$usr = checkUser();
|
||||||
|
// ============================================
|
||||||
|
// = initialize currently displayed timespace =
|
||||||
|
// ============================================
|
||||||
|
$timespace = get_timespace();
|
||||||
|
$in = $timespace[0];
|
||||||
|
$out = $timespace[1];
|
||||||
|
|
||||||
|
// set smarty config
|
||||||
|
require_once('../../libraries/smarty/Smarty.class.php');
|
||||||
|
$tpl = new Smarty();
|
||||||
|
$tpl->template_dir = 'templates/';
|
||||||
|
$tpl->compile_dir = 'compile/';
|
||||||
|
|
||||||
|
$tpl->assign('kga', $kga);
|
||||||
|
|
||||||
|
// ==========================
|
||||||
|
// = display customer table =
|
||||||
|
// ==========================
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$arr_knd = get_arr_knd("all");
|
||||||
|
else
|
||||||
|
$arr_knd = get_arr_knd($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
foreach ($arr_knd as $row=>$knd_data) {
|
||||||
|
$grp_names = array();
|
||||||
|
foreach (knd_get_grps($knd_data['knd_ID']) as $grp_id) {
|
||||||
|
$data = grp_get_data($grp_id);
|
||||||
|
$grp_names[] = $data['grp_name'];
|
||||||
|
}
|
||||||
|
$arr_knd[$row]['groups'] = implode(", ",$grp_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($arr_knd)>0) {
|
||||||
|
$tpl->assign('arr_knd', $arr_knd);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_knd', '0');
|
||||||
|
}
|
||||||
|
$tpl->assign('knd_display', $tpl->fetch("knd.tpl"));
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// = display project table =
|
||||||
|
// =========================
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$arr_pct = get_arr_pct("all");
|
||||||
|
else
|
||||||
|
$arr_pct = get_arr_pct($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
foreach ($arr_pct as $row=>$pct_data) {
|
||||||
|
$grp_names = array();
|
||||||
|
foreach (pct_get_grps($pct_data['pct_ID']) as $grp_id) {
|
||||||
|
$data = grp_get_data($grp_id);
|
||||||
|
$grp_names[] = $data['grp_name'];
|
||||||
|
}
|
||||||
|
$arr_pct[$row]['groups'] = implode(", ",$grp_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($arr_pct)>0) {
|
||||||
|
$tpl->assign('arr_pct', $arr_pct);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_pct', '0');
|
||||||
|
}
|
||||||
|
$tpl->assign('pct_display', $tpl->fetch("pct.tpl"));
|
||||||
|
|
||||||
|
// ========================
|
||||||
|
// = display events table =
|
||||||
|
// ========================
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$arr_evt = get_arr_evt_by_pct("all",-2);
|
||||||
|
else
|
||||||
|
$arr_evt = get_arr_evt_by_pct($kga['usr']['usr_grp'],-2);
|
||||||
|
|
||||||
|
foreach ($arr_evt as $row=>$evt_data) {
|
||||||
|
$grp_names = array();
|
||||||
|
foreach (evt_get_grps($evt_data['evt_ID']) as $grp_id) {
|
||||||
|
$data = grp_get_data($grp_id);
|
||||||
|
$grp_names[] = $data['grp_name'];
|
||||||
|
}
|
||||||
|
$arr_evt[$row]['groups'] = implode(", ",$grp_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($arr_evt)>0) {
|
||||||
|
$tpl->assign('arr_evt', $arr_evt);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_evt', '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->assign('evt_display', $tpl->fetch("evt.tpl"));
|
||||||
|
$tpl->assign('selected_evt_filter',-2);
|
||||||
|
|
||||||
|
$tpl->assign('curr_user', $kga['usr']['usr_name']);
|
||||||
|
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$tpl->assign('arr_grp', get_arr_grp(get_cookie('ap_ext_show_deleted_groups',0)));
|
||||||
|
else
|
||||||
|
$tpl->assign('arr_grp', get_arr_grp_by_leader($kga['usr']['usr_ID'],
|
||||||
|
get_cookie('ap_ext_show_deleted_groups',0)));
|
||||||
|
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$tpl->assign('arr_usr', get_arr_usr(get_cookie('ap_ext_show_deleted_users',0)));
|
||||||
|
else
|
||||||
|
$tpl->assign('arr_usr',get_arr_watchable_users($kga['usr']['usr_ID']));
|
||||||
|
$tpl->assign('showDeletedGroups', get_cookie('ap_ext_show_deleted_groups',0));
|
||||||
|
$tpl->assign('showDeletedUsers', get_cookie('ap_ext_show_deleted_users',0));
|
||||||
|
$tpl->assign('languages', langs());
|
||||||
|
|
||||||
|
$tpl->assign('timezones', timezoneList());
|
||||||
|
|
||||||
|
$admin['users'] = $tpl->fetch("users.tpl");
|
||||||
|
$admin['groups'] = $tpl->fetch("groups.tpl");
|
||||||
|
$admin['advanced'] = $tpl->fetch("advanced.tpl");
|
||||||
|
|
||||||
|
if ($kga['show_sensible_data']) {
|
||||||
|
$admin['database'] = $tpl->fetch("database.tpl");
|
||||||
|
} else {
|
||||||
|
$admin['database'] = "You don't have permission to see this information ...";
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->assign('admin', $admin);
|
||||||
|
|
||||||
|
$tpl->display('main.tpl');
|
||||||
|
?>
|
||||||
381
extensions/ki_adminpanel/js/ap_func.js
Normal file
381
extensions/ki_adminpanel/js/ap_func.js
Normal file
@@ -0,0 +1,381 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ===========
|
||||||
|
// ADMIN PANEL
|
||||||
|
// ===========
|
||||||
|
|
||||||
|
function ap_ext_onload() {
|
||||||
|
ap_ext_resize();
|
||||||
|
subactivelink = "#ap_ext_sub1";
|
||||||
|
$("#loader").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_resize() {
|
||||||
|
|
||||||
|
scroller_width = 14;
|
||||||
|
if (navigator.platform.substr(0,3)=='Mac') {
|
||||||
|
scroller_width = 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
pagew = pageWidth();
|
||||||
|
drittel = (pagew-10)/3 - 7 ;
|
||||||
|
|
||||||
|
panel_w = pagew-24;
|
||||||
|
panel_h = pageHeight()-10-headerHeight();
|
||||||
|
|
||||||
|
$(".ap_ext_subtab").css("display", "none");
|
||||||
|
|
||||||
|
$("#ap_ext_panel").css("width", panel_w);
|
||||||
|
$(".ap_ext_panel_header").css("width", panel_w);
|
||||||
|
$("#ap_ext_panel").css("height", panel_h);
|
||||||
|
|
||||||
|
$(".ap_ext_subtab").css("height", panel_h - (7*25)-20-1);
|
||||||
|
|
||||||
|
ap_ext_subtab_autoexpand();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show one of the subtabs. All others are collapsed, so only their header
|
||||||
|
* is visible.
|
||||||
|
*/
|
||||||
|
function ap_ext_subtab_expand(id) {
|
||||||
|
$("#ap_ext_sub1").removeClass("active");
|
||||||
|
$("#ap_ext_sub2").removeClass("active");
|
||||||
|
$("#ap_ext_sub3").removeClass("active");
|
||||||
|
$("#ap_ext_sub4").removeClass("active");
|
||||||
|
$("#ap_ext_sub5").removeClass("active");
|
||||||
|
$("#ap_ext_sub6").removeClass("active");
|
||||||
|
$("#ap_ext_sub7").removeClass("active");
|
||||||
|
$(".ap_ext_subtab").css("display", "none");
|
||||||
|
|
||||||
|
sub_id="#ap_ext_sub" +id;
|
||||||
|
$(sub_id).addClass("active");
|
||||||
|
|
||||||
|
subtab="#ap_ext_s"+id;
|
||||||
|
$(subtab).css("display", "block");
|
||||||
|
|
||||||
|
$.cookie('ap_ext_activePanel_'+usr_ID, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the last subtab, the user has seen. This information is stored in a
|
||||||
|
* cookie. If we're unable to read it show the first subtab.
|
||||||
|
*/
|
||||||
|
function ap_ext_subtab_autoexpand() {
|
||||||
|
ap_ext_activePanel = $.cookie('ap_ext_activePanel_'+usr_ID);
|
||||||
|
if (ap_ext_activePanel) {
|
||||||
|
ap_ext_subtab_expand(ap_ext_activePanel);
|
||||||
|
} else {
|
||||||
|
ap_ext_subtab_expand(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
function ap_ext_triggerchange() {
|
||||||
|
if ($('.ap_ext').css('display') == "block") {
|
||||||
|
ap_ext_refreshSubtab('knd');
|
||||||
|
ap_ext_refreshSubtab('pct');
|
||||||
|
ap_ext_refreshSubtab('evt');
|
||||||
|
} else {
|
||||||
|
tss_hook_flag++;
|
||||||
|
}
|
||||||
|
if (ap_chk_hook_flag) {
|
||||||
|
ap_ext_triggerCHK();
|
||||||
|
}
|
||||||
|
if (ap_chp_hook_flag) {
|
||||||
|
ap_ext_triggerCHP();
|
||||||
|
}
|
||||||
|
if (ap_che_hook_flag) {
|
||||||
|
ap_ext_triggerCHE();
|
||||||
|
}
|
||||||
|
if (ap_usr_hook_flag) {
|
||||||
|
ap_ext_triggerUSR();
|
||||||
|
}
|
||||||
|
|
||||||
|
ap_tss_hook_flag = 0;
|
||||||
|
ap_rec_hook_flag = 0;
|
||||||
|
ap_stp_hook_flag = 0;
|
||||||
|
ap_chk_hook_flag = 0;
|
||||||
|
ap_chp_hook_flag = 0;
|
||||||
|
ap_che_hook_flag = 0;
|
||||||
|
ap_usr_hook_flag = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_triggerCHK() {
|
||||||
|
if ($('.ap_ext').css('display') == "block") {
|
||||||
|
ap_ext_refreshSubtab('knd');
|
||||||
|
ap_ext_refreshSubtab('pct');
|
||||||
|
} else {
|
||||||
|
ap_chk_hook_flag++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_triggerCHP() {
|
||||||
|
if ($('.ap_ext').css('display') == "block") {
|
||||||
|
ap_ext_refreshSubtab('pct');
|
||||||
|
} else {
|
||||||
|
ap_chp_hook_flag++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_triggerCHE() {
|
||||||
|
if ($('.ap_ext').css('display') == "block") {
|
||||||
|
ap_ext_refreshSubtab('evt');
|
||||||
|
} else {
|
||||||
|
ap_che_hook_flag++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_triggerUSR() {
|
||||||
|
if ($('.ap_ext').css('display') == "block") {
|
||||||
|
ap_ext_refreshSubtab('usr');
|
||||||
|
} else {
|
||||||
|
ap_usr_hook_flag++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// graps the value of the newUser input field
|
||||||
|
// and ajaxes it to the createUsr function of the processor
|
||||||
|
//
|
||||||
|
function ap_ext_newUser() {
|
||||||
|
newuser = $("#newuser").val();
|
||||||
|
if (newuser == "") {
|
||||||
|
alert(lang_checkUsername);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "createUsr", axValue: newuser, id: 0 },
|
||||||
|
function(data) {
|
||||||
|
ap_ext_refreshSubtab('usr');
|
||||||
|
ap_ext_editUser(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_showDeletedUsers() {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "toggleDeletedUsers", axValue: 1, id: 0 },
|
||||||
|
function(data) {
|
||||||
|
ap_ext_refreshSubtab('usr');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_hideDeletedUsers() {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "toggleDeletedUsers", axValue: 0, id: 0 },
|
||||||
|
function(data) {
|
||||||
|
ap_ext_refreshSubtab('usr');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// graps the value of the newGroup input field
|
||||||
|
// and ajaxes it to the createGrp function of the processor
|
||||||
|
//
|
||||||
|
function ap_ext_newGroup() {
|
||||||
|
newgroup = $("#newgroup").val();
|
||||||
|
if (newgroup == "") {
|
||||||
|
alert(lang_checkGroupname);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "createGrp", axValue: newgroup, id: 0 },
|
||||||
|
function(data) {
|
||||||
|
ap_ext_refreshSubtab('grp');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// by clicking on the edit button of a user the edit dialogue pops up
|
||||||
|
//
|
||||||
|
function ap_ext_editUser(id) {
|
||||||
|
floaterShow(ap_ext_path + "floaters.php","editUsr",0,id,400,230);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// by clicking on the edit button of a group the edit dialogue pops up
|
||||||
|
//
|
||||||
|
function ap_ext_editGroup(id) {
|
||||||
|
floaterShow(ap_ext_path + "floaters.php","editGrp",0,id,450,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// refreshes either user/group/advanced/DB subtab
|
||||||
|
//
|
||||||
|
function ap_ext_refreshSubtab(tab) {
|
||||||
|
options = { axAction: "refreshSubtab", axValue: tab, id: 0 };
|
||||||
|
if (tab == 'evt') {
|
||||||
|
options.evt_filter = $('#evt_pct_filter').val();
|
||||||
|
}
|
||||||
|
$.post(ap_ext_path + "processor.php", options,
|
||||||
|
function(data) {
|
||||||
|
switch(tab) {
|
||||||
|
case "usr": target = "#ap_ext_s1"; break
|
||||||
|
case "grp": target = "#ap_ext_s2"; break
|
||||||
|
case "adv": target = "#ap_ext_s3"; break
|
||||||
|
case "db": target = "#ap_ext_s4"; break
|
||||||
|
case "knd": target = "#ap_ext_s5"; break
|
||||||
|
case "pct": target = "#ap_ext_s6"; break
|
||||||
|
case "evt": target = "#ap_ext_s7"; break
|
||||||
|
}
|
||||||
|
$(target).html(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// delete user
|
||||||
|
//
|
||||||
|
function ap_ext_deleteUser(id) {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "deleteUsr", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
if (confirm(data)) {
|
||||||
|
$.post(ap_ext_path + "processor.php", {axAction: "deleteUsr", axValue: 1, id: id },
|
||||||
|
function() {
|
||||||
|
ap_ext_refreshSubtab('usr');
|
||||||
|
ap_ext_refreshSubtab('grp');
|
||||||
|
hook_chgUsr(); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// delete group
|
||||||
|
//
|
||||||
|
function ap_ext_deleteGroup(id) {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "deleteGrp", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
if (confirm(data)) {
|
||||||
|
$.post(ap_ext_path + "processor.php", {axAction: "deleteGrp", axValue: 1, id: id },
|
||||||
|
function() { ap_ext_refreshSubtab('grp'); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// delete project
|
||||||
|
//
|
||||||
|
function ap_ext_deleteProject(id) {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "deletePct", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
if (confirm(data)) {
|
||||||
|
if (recstate!=1 && selected_pct == id) {
|
||||||
|
$('#buzzer').addClass('disabled');
|
||||||
|
selected_pct = false;
|
||||||
|
$("#sel_pct").html('');
|
||||||
|
}
|
||||||
|
$.post(ap_ext_path + "processor.php", {axAction: "deletePct", axValue: 1, id: id },
|
||||||
|
function() { ap_ext_refreshSubtab('pct');
|
||||||
|
hook_chgPct(); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// delete customer
|
||||||
|
//
|
||||||
|
function ap_ext_deleteCustomer(id) {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "deleteKnd", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
if (confirm(data)) {
|
||||||
|
if (recstate!=1 && selected_knd == id) {
|
||||||
|
$('#buzzer').addClass('disabled');
|
||||||
|
selected_knd = false;
|
||||||
|
$("#sel_knd").html('');
|
||||||
|
}
|
||||||
|
$.post(ap_ext_path + "processor.php", {axAction: "deleteKnd", axValue: 1, id: id },
|
||||||
|
function() { ap_ext_refreshSubtab('knd');
|
||||||
|
hook_chgKnd(); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// delete event
|
||||||
|
//
|
||||||
|
function ap_ext_deleteEvent(id) {
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "deleteEvt", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
if (confirm(data)) {
|
||||||
|
if (recstate!=1 && selected_evt == id) {
|
||||||
|
$('#buzzer').addClass('disabled');
|
||||||
|
selected_evt = false;
|
||||||
|
$("#sel_evt").html('');
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post(ap_ext_path + "processor.php", {axAction: "deleteEvt", axValue: 1, id: id },
|
||||||
|
function() { ap_ext_refreshSubtab('evt');
|
||||||
|
hook_chgEvt(); }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// activates user for login
|
||||||
|
//
|
||||||
|
function ap_ext_unbanUser(id) {
|
||||||
|
$("#ban"+id).blur();
|
||||||
|
$("#ban"+id).html("<img border='0' width='16' height='16' src='../skins/"+skin+"/grfx/loading13.gif'/>");
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "unbanUsr", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
$("#ban"+id).html(data);
|
||||||
|
$("#ban"+id).attr({ "ONCLICK": "ap_ext_banUser('"+id+"'); return false;" });
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
// toggle ban and unban of users in admin panel
|
||||||
|
//
|
||||||
|
function ap_ext_banUser(id) {
|
||||||
|
$("#ban"+id).blur();
|
||||||
|
$("#ban"+id).html("<img border='0' width='16' height='16' src='../skins/"+skin+"/grfx/loading13.gif'/>");
|
||||||
|
$.post(ap_ext_path + "processor.php", { axAction: "banUsr", axValue: 0, id: id },
|
||||||
|
function(data) {
|
||||||
|
$("#ban"+id).html(data);
|
||||||
|
$("#ban"+id).attr({ "ONCLICK": "ap_ext_unbanUser('"+id+"'); return false;" });
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ap_ext_checkupdate() {
|
||||||
|
$.post("checkupdate.php",
|
||||||
|
function(data) {
|
||||||
|
$('#ap_ext_checkupdate').html(data);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
40
extensions/ki_adminpanel/js/ap_init.js
Normal file
40
extensions/ki_adminpanel/js/ap_init.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// set path of extension
|
||||||
|
var ap_ext_path = "../extensions/ki_adminpanel/";
|
||||||
|
|
||||||
|
var ap_tss_hook_flag = 0;
|
||||||
|
var ap_rec_hook_flag = 0;
|
||||||
|
var ap_stp_hook_flag = 0;
|
||||||
|
var ap_chk_hook_flag = 0;
|
||||||
|
var ap_chp_hook_flag = 0;
|
||||||
|
var ap_che_hook_flag = 0;
|
||||||
|
var ap_usr_hook_flag = 0;
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
var ap_ext_resizeTimer = null;
|
||||||
|
|
||||||
|
$(window).bind('resize', function() {
|
||||||
|
if (ap_ext_resizeTimer) clearTimeout(ap_ext_resizeTimer);
|
||||||
|
ap_ext_resizeTimer = setTimeout(ap_ext_resize, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
319
extensions/ki_adminpanel/processor.php
Normal file
319
extensions/ki_adminpanel/processor.php
Normal file
@@ -0,0 +1,319 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ================
|
||||||
|
// = AP PROCESSOR =
|
||||||
|
// ================
|
||||||
|
|
||||||
|
// insert KSPI
|
||||||
|
$isCoreProcessor = 0;
|
||||||
|
$dir_templates = "templates/";
|
||||||
|
require("../../includes/kspi.php");
|
||||||
|
|
||||||
|
switch ($axAction) {
|
||||||
|
|
||||||
|
case "createUsr":
|
||||||
|
// create new user account
|
||||||
|
$usr_data['usr_name'] = trim($axValue);
|
||||||
|
$usr_data['usr_grp'] = $kga['usr']['usr_grp'];
|
||||||
|
$usr_data['usr_sts'] = 2;
|
||||||
|
$usr_data['usr_active'] = 0;
|
||||||
|
echo usr_create($usr_data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "createGrp":
|
||||||
|
// create new group
|
||||||
|
$grp_data['grp_name'] = trim($axValue);
|
||||||
|
$new_grp_id = grp_create($grp_data);
|
||||||
|
if ($new_grp_id != false) {
|
||||||
|
assign_grp2ldrs($new_grp_id, array($kga['usr']['usr_ID']));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "refreshSubtab":
|
||||||
|
// builds either user/group/advanced/DB subtab
|
||||||
|
$tpl->assign('curr_user', $kga['usr']['usr_name']);
|
||||||
|
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$tpl->assign('arr_grp', get_arr_grp(get_cookie('ap_ext_show_deleted_groups',0)));
|
||||||
|
else
|
||||||
|
$tpl->assign('arr_grp', get_arr_grp_by_leader($kga['usr']['usr_ID'],
|
||||||
|
get_cookie('ap_ext_show_deleted_groups',0)));
|
||||||
|
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$tpl->assign('arr_usr', get_arr_usr(get_cookie('ap_ext_show_deleted_users',0)));
|
||||||
|
else
|
||||||
|
$tpl->assign('arr_usr',get_arr_watchable_users($kga['usr']['usr_ID']));
|
||||||
|
$tpl->assign('showDeletedGroups', get_cookie('ap_ext_show_deleted_groups',0));
|
||||||
|
$tpl->assign('showDeletedUsers', get_cookie('ap_ext_show_deleted_users',0));
|
||||||
|
switch ($axValue) {
|
||||||
|
case "usr": $tpl->display("users.tpl"); break;
|
||||||
|
case "grp": $tpl->display("groups.tpl"); break;
|
||||||
|
case "adv": $tpl->display("advanced.tpl"); break;
|
||||||
|
case "db": $tpl->display("database.tpl"); break;
|
||||||
|
|
||||||
|
case "knd":
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$arr_knd = get_arr_knd("all");
|
||||||
|
else
|
||||||
|
$arr_knd = get_arr_knd($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
foreach ($arr_knd as $row=>$knd_data) {
|
||||||
|
$grp_names = array();
|
||||||
|
foreach (knd_get_grps($knd_data['knd_ID']) as $grp_id) {
|
||||||
|
$data = grp_get_data($grp_id);
|
||||||
|
$grp_names[] = $data['grp_name'];
|
||||||
|
}
|
||||||
|
$arr_knd[$row]['groups'] = implode(", ",$grp_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($arr_knd)>0) {
|
||||||
|
$tpl->assign('arr_knd', $arr_knd);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_knd', '0');
|
||||||
|
}
|
||||||
|
$tpl->display("knd.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "pct":
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$arr_pct = get_arr_pct("all");
|
||||||
|
else
|
||||||
|
$arr_pct = get_arr_pct($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($arr_pct as $row=>$pct_data) {
|
||||||
|
$grp_names = array();
|
||||||
|
foreach (pct_get_grps($pct_data['pct_ID']) as $grp_id) {
|
||||||
|
$data = grp_get_data($grp_id);
|
||||||
|
$grp_names[] = $data['grp_name'];
|
||||||
|
}
|
||||||
|
$arr_pct[$row]['groups'] = implode(", ",$grp_names);
|
||||||
|
}
|
||||||
|
if (count($arr_pct)>0) {
|
||||||
|
$tpl->assign('arr_pct', $arr_pct);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_pct', '0');
|
||||||
|
}
|
||||||
|
$tpl->display("pct.tpl");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "evt":
|
||||||
|
if ($kga['usr']['usr_sts']==0)
|
||||||
|
$group = "all";
|
||||||
|
else
|
||||||
|
$group = $kga['usr']['usr_grp'];
|
||||||
|
if (!isset($_REQUEST['evt_filter']))
|
||||||
|
$arr_evt = get_arr_evt($group);
|
||||||
|
else
|
||||||
|
switch ($_REQUEST['evt_filter']) {
|
||||||
|
case -1:
|
||||||
|
$arr_evt = get_arr_evt($group);
|
||||||
|
break;
|
||||||
|
case -2:
|
||||||
|
// -2 is to get unassigned events. As -2 is never
|
||||||
|
// an id of a project this will give us all unassigned
|
||||||
|
// events.
|
||||||
|
default:
|
||||||
|
$arr_evt =
|
||||||
|
get_arr_evt_by_pct($group,$_REQUEST['evt_filter']);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($arr_evt as $row=>$evt_data) {
|
||||||
|
$grp_names = array();
|
||||||
|
foreach (evt_get_grps($evt_data['evt_ID']) as $grp_id) {
|
||||||
|
$data = grp_get_data($grp_id);
|
||||||
|
$grp_names[] = $data['grp_name'];
|
||||||
|
}
|
||||||
|
$arr_evt[$row]['groups'] = implode(", ",$grp_names);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($arr_evt)>0) {
|
||||||
|
$tpl->assign('arr_evt', $arr_evt);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_evt', '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$arr_pct = get_arr_pct($group);
|
||||||
|
$tpl->assign('arr_pct', $arr_pct);
|
||||||
|
|
||||||
|
$tpl->assign('selected_evt_filter',$_REQUEST['evt_filter']);
|
||||||
|
|
||||||
|
$tpl->display("evt.tpl");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "deleteUsr":
|
||||||
|
// set the trashflag of a user
|
||||||
|
switch ($axValue) {
|
||||||
|
case 0:
|
||||||
|
// Fire JavaScript confirm when a user is about to be deleted
|
||||||
|
echo $kga['lang']['sure'];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// If the confirmation is returned the user gets the trash-flag.
|
||||||
|
// TODO: Users with trashflag can be deleted by 'empty trashcan' or so ...
|
||||||
|
usr_delete($id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "deleteGrp":
|
||||||
|
// set the trashflag of a group
|
||||||
|
switch ($axValue) {
|
||||||
|
case 0:
|
||||||
|
// Fire JavaScript confirm when a group is about to be deleted
|
||||||
|
echo $kga['lang']['sure'];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// If the confirmation is returned the group gets the trash-flag.
|
||||||
|
// TODO: Users with trashflag can be deleted by 'empty trashcan' or so ...
|
||||||
|
grp_delete($id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "deletePct":
|
||||||
|
// set the trashflag of a project
|
||||||
|
switch ($axValue) {
|
||||||
|
case 0:
|
||||||
|
// Fire JavaScript confirm when a project is about to be deleted
|
||||||
|
echo $kga['lang']['sure'];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// If the confirmation is returned the project gets the trash-flag.
|
||||||
|
pct_delete($id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "deleteKnd":
|
||||||
|
// set the trashflag of a customer
|
||||||
|
switch ($axValue) {
|
||||||
|
case 0:
|
||||||
|
// Fire JavaScript confirm when a customer is about to be deleted
|
||||||
|
echo $kga['lang']['sure'];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// If the confirmation is returned the customer gets the trash-flag.
|
||||||
|
knd_delete($id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "deleteEvt":
|
||||||
|
// set the trashflag of an event
|
||||||
|
switch ($axValue) {
|
||||||
|
case 0:
|
||||||
|
// Fire JavaScript confirm when an event is about to be deleted
|
||||||
|
echo $kga['lang']['sure'];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// If the confirmation is returned the event gets the trash-flag.
|
||||||
|
evt_delete($id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "banUsr":
|
||||||
|
// Ban a user from login
|
||||||
|
$sts['usr_active'] = 0;
|
||||||
|
usr_edit($id, $sts);
|
||||||
|
echo sprintf("<img border='0' title='%s' alt='%s' src='../skins/%s/grfx/lock.png' width='16' height='16' />",
|
||||||
|
$kga['lang']['bannedusr'], $kga['lang']['bannedusr'], $kga['conf']['skin']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "unbanUsr":
|
||||||
|
// Unban a user from login
|
||||||
|
$sts['usr_active'] = 1;
|
||||||
|
usr_edit($id, $sts);
|
||||||
|
echo sprintf("<img border='0' title='%s' alt='%s' src='../skins/%s/grfx/jipp.gif' width='16' height='16' />",
|
||||||
|
$kga['lang']['activeusr'], $kga['lang']['activeusr'], $kga['conf']['skin']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "sendEditUsr":
|
||||||
|
// process editUsr form
|
||||||
|
$usr_data['usr_name'] = trim($_REQUEST['usr_name']);
|
||||||
|
$usr_data['usr_grp'] = $_REQUEST['usr_grp'];
|
||||||
|
$usr_data['usr_sts'] = $_REQUEST['usr_sts'];
|
||||||
|
$usr_data['usr_mail'] = $_REQUEST['usr_mail'];
|
||||||
|
$usr_data['usr_alias'] = $_REQUEST['usr_alias'];
|
||||||
|
$usr_data['usr_rate'] = $_REQUEST['usr_rate'];
|
||||||
|
|
||||||
|
// if password field is empty => password unchanged (not overwritten with "")
|
||||||
|
if ($_REQUEST['usr_pw'] != "") {
|
||||||
|
$usr_data['pw'] = md5($kga['password_salt'].$_REQUEST['usr_pw'].$kga['password_salt']);
|
||||||
|
}
|
||||||
|
usr_edit($id, $usr_data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "sendEditGrp":
|
||||||
|
// process editGrp form
|
||||||
|
$grp_data['grp_name'] = trim($_REQUEST['grp_name']);
|
||||||
|
grp_edit($id, $grp_data);
|
||||||
|
|
||||||
|
$ldrs = $_REQUEST['grp_leader'];
|
||||||
|
assign_grp2ldrs($id, $ldrs);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "sendEditAdvanced":
|
||||||
|
// process AdvancedOptions form
|
||||||
|
|
||||||
|
$var_data['adminmail'] = $_REQUEST['adminmail'];
|
||||||
|
$var_data['loginTries'] = $_REQUEST['logintries'];
|
||||||
|
$var_data['loginBanTime'] = $_REQUEST['loginbantime'];
|
||||||
|
$var_data['show_sensible_data'] = isset($_REQUEST['show_sensible_data']);
|
||||||
|
$var_data['show_update_warn'] = isset($_REQUEST['show_update_warn']);
|
||||||
|
$var_data['check_at_startup'] = isset($_REQUEST['check_at_startup']);
|
||||||
|
$var_data['show_daySeperatorLines'] = isset($_REQUEST['show_daySeperatorLines']);
|
||||||
|
$var_data['show_gabBreaks'] = isset($_REQUEST['show_gabBreaks']);
|
||||||
|
$var_data['show_RecordAgain'] = isset($_REQUEST['show_RecordAgain']);
|
||||||
|
$var_data['show_TrackingNr'] = isset($_REQUEST['show_TrackingNr']);
|
||||||
|
$var_data['currency_name'] = $_REQUEST['currency_name'];
|
||||||
|
$var_data['currency_sign'] = $_REQUEST['currency_sign'];
|
||||||
|
$var_data['currency_first'] = isset($_REQUEST['currency_first']);
|
||||||
|
$var_data['date_format_0'] = $_REQUEST['date_format_0'];
|
||||||
|
$var_data['date_format_1'] = $_REQUEST['date_format_1'];
|
||||||
|
$var_data['date_format_2'] = $_REQUEST['date_format_2'];
|
||||||
|
$var_data['language'] = $_REQUEST['language'];
|
||||||
|
$var_data['roundPrecision'] = $_REQUEST['roundPrecision'];
|
||||||
|
$var_data['decimalSeparator'] = $_REQUEST['decimalSeparator'];
|
||||||
|
$var_data['durationWithSeconds'] = isset($_REQUEST['durationWithSeconds']);
|
||||||
|
$var_data['defaultTimezone'] = $_REQUEST['defaultTimezone'];
|
||||||
|
$var_data['exactSums'] = isset($_REQUEST['exactSums']);
|
||||||
|
|
||||||
|
$success = var_edit($var_data);
|
||||||
|
|
||||||
|
// do whatever you like
|
||||||
|
// and return one of these:
|
||||||
|
|
||||||
|
echo $success?"ok":$kga['lang']['error'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case "toggleDeletedUsers":
|
||||||
|
setcookie("ap_ext_show_deleted_users",$axValue);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
140
extensions/ki_adminpanel/templates/advanced.tpl
Normal file
140
extensions/ki_adminpanel/templates/advanced.tpl
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
function cb(data) {
|
||||||
|
if (data=="ok") {
|
||||||
|
window.location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("#ap_ext_form_editadv_submit").blur();
|
||||||
|
$("#ap_ext_output").width($(".ap_ext_panel_header").width()-22);
|
||||||
|
$("#ap_ext_output").fadeIn(fading_enabled?500:0,function(){
|
||||||
|
$("#ap_ext_output").fadeOut(fading_enabled?4000:0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#ap_ext_form_editadv').ajaxForm({target:'#ap_ext_output',success:cb});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<div id="ap_ext_output"></div>
|
||||||
|
|
||||||
|
<form id="ap_ext_form_editadv" action="../extensions/ki_adminpanel/processor.php" method="post">
|
||||||
|
|
||||||
|
<fieldset class="ap_ext_advanced">
|
||||||
|
<div>
|
||||||
|
<input type="text" name="adminmail" size="20" value="{$kga.conf.adminmail|escape:'html'}" class="formfield"> {$kga.lang.adminmail}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="text" name="logintries" size="2" value="{$kga.conf.loginTries|escape:'html'}" class="formfield"> {$kga.lang.logintries}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="text" name="loginbantime" size="4" value="{$kga.conf.loginBanTime|escape:'html'}" class="formfield"> {$kga.lang.bantime}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="ap_ext_checkupdate">
|
||||||
|
<a href="javascript:ap_ext_checkupdate();">{$kga.lang.checkupdate}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{$kga.lang.lang}: <select name="language" class="formfield">
|
||||||
|
{html_options values=$languages output=$languages selected=$kga.conf.language}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_sensible_data" {if $kga.show_sensible_data}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.show_sensible_data}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_update_warn" {if $kga.show_update_warn}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.show_update_warn}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="check_at_startup" {if $kga.check_at_startup}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.check_at_startup}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_daySeperatorLines" {if $kga.show_daySeperatorLines}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.show_daySeperatorLines}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_gabBreaks" {if $kga.show_gabBreaks}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.show_gabBreaks}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_RecordAgain" {if $kga.show_RecordAgain}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.show_RecordAgain}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="show_TrackingNr" {if $kga.show_TrackingNr}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.show_TrackingNr}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="currency_name" size="8" value="{$kga.currency_name|escape:'html'}" class="formfield"> {$kga.lang.currency_name}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="currency_sign" size="2" value="{$kga.currency_sign|escape:'html'}" class="formfield"> {$kga.lang.currency_sign}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="currency_first" {if $kga.conf.currency_first}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.currency_first}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="date_format_2" size="8" value="{$kga.date_format.2|escape:'html'}" class="formfield"> {$kga.lang.display_date_format}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="date_format_0" size="8" value="{$kga.date_format.0|escape:'html'}" class="formfield"> {$kga.lang.display_currentDate_format}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="text" name="date_format_1" size="8" value="{$kga.date_format.1|escape:'html'}" class="formfield"> {$kga.lang.table_date_format}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="durationWithSeconds" {if $kga.conf.durationWithSeconds}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.durationWithSeconds}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{$kga.lang.round_time} <select name="roundPrecision" class="formfield">
|
||||||
|
<option value="0" {if $kga.conf.roundPrecision==0}selected="selected"{/if}>-</option>
|
||||||
|
<option value="1" {if $kga.conf.roundPrecision==1}selected="selected"{/if}>1</option>
|
||||||
|
<option value="5" {if $kga.conf.roundPrecision==5}selected="selected"{/if}>5</option>
|
||||||
|
<option value="10" {if $kga.conf.roundPrecision==10}selected="selected"{/if}>10</option>
|
||||||
|
<option value="15" {if $kga.conf.roundPrecision==15}selected="selected"{/if}>15</option>
|
||||||
|
<option value="15" {if $kga.conf.roundPrecision==20}selected="selected"{/if}>20</option>
|
||||||
|
<option value="30" {if $kga.conf.roundPrecision==30}selected="selected"{/if}>30</option>
|
||||||
|
</select> {$kga.lang.round_time_minute}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{$kga.lang.decimal_separator}: <input type="text" name="decimalSeparator" size="1" value="{$kga.conf.decimalSeparator|escape:'html'}" class="formfield">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<select name="defaultTimezone">
|
||||||
|
{html_options values=$timezones output=$timezones selected=$kga.conf.defaultTimezone}
|
||||||
|
</select> {$kga.lang.defaultTimezone}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="exactSums" {if $kga.conf.exactSums}checked="checked"{/if} value="1" class="formfield"> {$kga.lang.exactSums}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<input name="axAction" type="hidden" value="sendEditAdvanced" />
|
||||||
|
|
||||||
|
<div id="formbuttons">
|
||||||
|
<input id="ap_ext_form_editadv_submit" class='btn_ok' type='submit' value='{$kga.lang.save}' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
21
extensions/ki_adminpanel/templates/database.tpl
Normal file
21
extensions/ki_adminpanel/templates/database.tpl
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{$kga.lang.DBname}: {$kga.server_database|escape:'html'}
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<a href="../db_restore.php">Database Backup Utility</a>
|
||||||
|
|
||||||
|
{*
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
|
{$kga.lang.lastdbbackup}:
|
||||||
|
|
||||||
|
{if $kga.conf.lastdbbackup}
|
||||||
|
{$kga.conf.lastdbbackup|date_format}
|
||||||
|
{else}
|
||||||
|
none
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<input class='btn_ok' type='submit' value='{$kga.lang.runbackup}' onClick='backupAll(); return false;' />
|
||||||
|
|
||||||
|
*}
|
||||||
74
extensions/ki_adminpanel/templates/evt.tpl
Normal file
74
extensions/ki_adminpanel/templates/evt.tpl
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
<a href="#" onClick="floaterShow('floaters.php','add_edit_evt',0,0,450,200); $(this).blur(); return false;"><img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/add.png" width="22" height="16" alt="{$kga.lang.new_evt}"></a> {$kga.lang.new_evt}
|
||||||
|
|
||||||
|
{$kga.lang.view_filter}:
|
||||||
|
<select size="1" id="evt_pct_filter" onchange="ap_ext_refreshSubtab('evt');">
|
||||||
|
<option value="-2" {if $selected_evt_filter==-2}selected="selected"{/if}>{$kga.lang.unassigned}</option>
|
||||||
|
<option value="-1" {if $selected_evt_filter==-1}selected="selected"{/if}>{$kga.lang.all_events}</option>
|
||||||
|
{section name=row loop=$arr_pct}
|
||||||
|
<option value="{$arr_pct[row].pct_ID}"
|
||||||
|
{if $selected_evt_filter==$arr_pct[row].pct_ID}selected="selected"{/if}>{$arr_pct[row].pct_name|escape:'html'} ({$arr_pct[row].knd_name|truncate:30:"..."|escape:'html'})</option>
|
||||||
|
{/section}
|
||||||
|
</select>
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
{cycle values="odd,even" reset=true print=false}
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th>{$kga.lang.options}</th>
|
||||||
|
<th>{$kga.lang.evts}</th>
|
||||||
|
<th>{$kga.lang.groups}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{section name=row loop=$arr_evt}
|
||||||
|
{if $arr_evt[row].evt_visible || $arr_evt[row].zeit != "0:00"}
|
||||||
|
|
||||||
|
<tr class="{cycle values="odd,even"}">
|
||||||
|
|
||||||
|
<td class="option">
|
||||||
|
<a href ="#" onClick="editSubject('evt',{$arr_evt[row].evt_ID}); $(this).blur(); return false;">
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/edit2.gif' width='13' height='13' alt='{$kga.lang.edit}' title='{$kga.lang.edit}' border='0' />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" id="delete_evt{$arr_evt[row].evt_ID}" onClick="ap_ext_deleteEvent({$arr_evt[row].evt_ID})">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan.png" title="{$kga.lang.delevt}" width="13" height="13" alt="{$kga.lang.delevt}" border="0">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="events">
|
||||||
|
{if $arr_evt[row].evt_visible != 1}<span style="color:#bbb">{/if}
|
||||||
|
{$arr_evt[row].evt_name|escape:'html'}
|
||||||
|
{if $arr_evt[row].evt_visible != 1}</span>{/if}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{$arr_evt[row].groups|escape:'html'}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{/if}
|
||||||
|
{/section}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{if $arr_evt == '0'}
|
||||||
|
<tr>
|
||||||
|
<td colspan='3'>
|
||||||
|
<strong style="color:red">{$kga.lang.noItems}</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
48
extensions/ki_adminpanel/templates/floaters/editgroup.tpl
Normal file
48
extensions/ki_adminpanel/templates/floaters/editgroup.tpl
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#ap_ext_form_editgrp').ajaxForm(function() {
|
||||||
|
floaterClose();
|
||||||
|
ap_ext_refreshSubtab('grp');
|
||||||
|
ap_ext_refreshSubtab('usr');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
<div id="floater_innerwrap">
|
||||||
|
|
||||||
|
<div id="floater_handle">
|
||||||
|
<span id="floater_title">{$kga.lang.editgrp}</span>
|
||||||
|
<div class="right">
|
||||||
|
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="floater_content">
|
||||||
|
<form id="ap_ext_form_editgrp" action="../extensions/ki_adminpanel/processor.php" method="post">
|
||||||
|
<fieldset>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label for="grp_name">{$kga.lang.groupname}:</label>
|
||||||
|
<input class="formfield" type="text" name="grp_name" value="{$grp_details.grp_name|escape:'html'}" size=35 />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="grp_leader" >{$kga.lang.groupleader}:</label>
|
||||||
|
<select class="formfield" name="grp_leader[]" multiple size='5' style="width:255px">
|
||||||
|
{html_options values=$arr_usr_ID output=$arr_usr_name selected=$grp_selection}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<input name="id" type="hidden" value="{$grp_details.grp_ID}" />
|
||||||
|
<input name="axAction" type="hidden" value="sendEditGrp" />
|
||||||
|
<div id="formbuttons">
|
||||||
|
<input class='btn_norm' type='button' value='{$kga.lang.cancel}' onClick='floaterClose(); return false;' />
|
||||||
|
<input class='btn_ok' type='submit' value='{$kga.lang.submit}' />
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
126
extensions/ki_adminpanel/templates/floaters/edituser.tpl
Normal file
126
extensions/ki_adminpanel/templates/floaters/edituser.tpl
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
beforeSubmit: function() {
|
||||||
|
|
||||||
|
if ($('#password').val() != '' && !validatePassword($('#password').val(),$('#retypePassword').val()))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
floaterClose();
|
||||||
|
},
|
||||||
|
success: function() {
|
||||||
|
hook_chgUsr();
|
||||||
|
ap_ext_refreshSubtab('grp');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$('#ap_ext_form_editusr').ajaxForm(options);
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
<div id="floater_innerwrap">
|
||||||
|
|
||||||
|
<div id="floater_handle">
|
||||||
|
<span id="floater_title">{$kga.lang.editusr}</span>
|
||||||
|
<div class="right">
|
||||||
|
<a href="#" class="close" onClick="floaterClose();">{$kga.lang.close}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="floater_content">
|
||||||
|
|
||||||
|
<form id="ap_ext_form_editusr" action="../extensions/ki_adminpanel/processor.php" method="post">
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_name">{$kga.lang.username}:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_name" value="{$usr_details.usr_name|escape:'html'}" maxlength=20 size=20 />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_sts">{$kga.lang.status}:</label>
|
||||||
|
|
||||||
|
{if $usr_details.usr_sts == 1}
|
||||||
|
<select name="usr_sts">
|
||||||
|
<option value="0" {if $usr_details.usr_sts == 0}selected{/if}>{$kga.lang.adminusr} (!)</option>
|
||||||
|
<option value="1" {if $usr_details.usr_sts == 1}selected{/if}>{$kga.lang.groupleader}</option>
|
||||||
|
<option value="2" {if $usr_details.usr_sts == 2}selected{/if}>{$kga.lang.regusr}</option>
|
||||||
|
</select>
|
||||||
|
{else}
|
||||||
|
|
||||||
|
|
||||||
|
{if $curr_user == $usr_details.usr_name && $usr_details.usr_sts == 0}
|
||||||
|
{$kga.lang.admWarn}
|
||||||
|
{else}
|
||||||
|
<select name="usr_sts">
|
||||||
|
<option value="0" {if $usr_details.usr_sts == 0}selected{/if}>{$kga.lang.adminusr} (!)</option>
|
||||||
|
<option value="2" {if $usr_details.usr_sts == 2}selected{/if}>{$kga.lang.regusr}</option>
|
||||||
|
</select>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{/if}
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_pw">{$kga.lang.newPassword}:</label>
|
||||||
|
<input class="formfield" type="password" name="usr_pw" size="9" id="password" /> {$kga.lang.minLength}
|
||||||
|
{if $usr_details.usr_pw == "no"}
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/caution_mini.png" alt="Caution" valign=middle />
|
||||||
|
<strong style="color:red">{$kga.lang.nopassword}</strong>
|
||||||
|
{/if}
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_pw">{$kga.lang.retypePassword}:</label>
|
||||||
|
<input class="formfield" type="password" name="retypePassword" id="retypePassword" size="9" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_rate">{$kga.lang.rate}:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_rate" value="{$usr_details.usr_rate|number_format:2:$kga.conf.decimalSeparator:""|escape:'html'}" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_mail">{$kga.lang.mail}:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_mail" value="{$usr_details.usr_mail|escape:'html'}" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_alias">{$kga.lang.alias}:</label>
|
||||||
|
<input class="formfield" type="text" name="usr_alias" value="{$usr_details.usr_alias|escape:'html'}" />
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label for="usr_grp">{$kga.lang.group}:</label>
|
||||||
|
<select class="formfield" name="usr_grp">
|
||||||
|
{html_options values=$arr_grp_ID output=$arr_grp_name selected=$usr_details.usr_grp}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<input name="id" type="hidden" value="{$usr_details.usr_ID}" />
|
||||||
|
<input name="axAction" type="hidden" value="sendEditUsr" />
|
||||||
|
|
||||||
|
<div id="formbuttons">
|
||||||
|
<input class='btn_norm' type='button' value='{$kga.lang.cancel}' onClick='floaterClose(); return false;' />
|
||||||
|
<input class='btn_ok' type='submit' value='{$kga.lang.submit}' />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
86
extensions/ki_adminpanel/templates/groups.tpl
Normal file
86
extensions/ki_adminpanel/templates/groups.tpl
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<form>
|
||||||
|
<input type=text id="newgroup" class="formfield"></input>
|
||||||
|
<input class='btn_ok' type=submit value="{$kga.lang.addgroup}" onclick="ap_ext_newGroup(); return false;">
|
||||||
|
</form>
|
||||||
|
<br />
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th>{$kga.lang.group}</th>
|
||||||
|
<th>{$kga.lang.options}</th>
|
||||||
|
<th>{$kga.lang.members}</th>
|
||||||
|
<th>{$kga.lang.groupleader}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
{section name=grouparray loop=$arr_grp}
|
||||||
|
<tr class='{cycle values="even,odd"}'>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{if $arr_grp[grouparray].grp_ID == 1}
|
||||||
|
<span style="color:red">{$arr_grp[grouparray].grp_name|escape:'html'}</span>
|
||||||
|
{else}
|
||||||
|
{$arr_grp[grouparray].grp_name|escape:'html'}
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td>{strip}
|
||||||
|
<a href="#" onClick="ap_ext_editGroup('{$arr_grp[grouparray].grp_ID}'); $(this).blur(); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/edit2.gif" title="{$kga.lang.editgrp}" width="13" height="13" alt="{$kga.lang.editgrp}" border="0">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
{*
|
||||||
|
<a href="#" onClick="switchGrp('{$arr_grp[grouparray].grp_ID}'); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/auge.png" title="{$kga.lang.switchgrp}" width="16" height="13" alt="{$kga.lang.switchgrp}" border="0">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" onClick="backupGrp({$arr_grp[grouparray].grp_ID}); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_backup.gif" title="{$kga.lang.backupgrp}" width="12" height="13" border="0" alt="{$kga.lang.backupgrp}">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="mailto:{$arr_grp[grouparray].grp_mail|escape:'html'}">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_mail_.gif" title="{$kga.lang.mailgrp}" width="12" height="13" alt="{$kga.lang.mailgrp}" border="0">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
*}
|
||||||
|
|
||||||
|
{if $arr_grp[grouparray].count_users == 0}
|
||||||
|
<a href="#" onClick="ap_ext_deleteGroup({$arr_grp[grouparray].grp_ID})">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan.png" title="{$kga.lang.delgrp}" width="13" height="13" alt="{$kga.lang.delgrp}" border="0">
|
||||||
|
</a>
|
||||||
|
{else}
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan_.png" title="{$kga.lang.delgrp}" width="13" height="13" alt="{$kga.lang.delgrp}" border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{/strip}</td>
|
||||||
|
|
||||||
|
<td>{$arr_grp[grouparray].count_users}</td>
|
||||||
|
|
||||||
|
|
||||||
|
{*Display name(s) of the group-leader(s)*}
|
||||||
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{foreach item=leader from=$arr_grp[grouparray].leader_name}
|
||||||
|
{$leader|escape:'html'}
|
||||||
|
{/foreach}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{/section}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
64
extensions/ki_adminpanel/templates/knd.tpl
Normal file
64
extensions/ki_adminpanel/templates/knd.tpl
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<a href="#" onClick="floaterShow('floaters.php','add_edit_knd',0,0,450,200); $(this).blur(); return false;"><img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/add.png" width="22" height="16" alt="{$kga.lang.new_knd}"></a> {$kga.lang.new_knd}
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
{cycle values="odd,even" reset=true print=false}
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th>{$kga.lang.options}</th>
|
||||||
|
<th>{$kga.lang.knds}</th>
|
||||||
|
<th>{$kga.lang.contactPerson}</th>
|
||||||
|
<th>{$kga.lang.groups}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{section name=row loop=$arr_knd}
|
||||||
|
{if $arr_knd[row].knd_visible || $arr_knd[row].zeit != "0:00"}
|
||||||
|
|
||||||
|
<tr class="{cycle values="odd,even"}">
|
||||||
|
|
||||||
|
<td class="option">
|
||||||
|
<a href ="#" onClick="editSubject('knd',{$arr_knd[row].knd_ID}); $(this).blur(); return false;">
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/edit2.gif' width='13' height='13' alt='{$kga.lang.edit}' title='{$kga.lang.edit}' border='0' />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" id="delete_knd{$arr_knd[row].knd_ID}" onClick="ap_ext_deleteCustomer({$arr_knd[row].knd_ID})">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan.png" title="{$kga.lang.delknd}" width="13" height="13" alt="{$kga.lang.delknd}" border="0">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="clients">
|
||||||
|
{if $arr_knd[row].knd_visible != 1}<span style="color:#bbb">{/if}
|
||||||
|
{$arr_knd[row].knd_name|escape:'html'}
|
||||||
|
{if $arr_knd[row].knd_visible != 1}</span>{/if}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{$arr_knd[row].knd_contact|escape:'html'}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{$arr_knd[row].groups|escape:'html'}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{/section}
|
||||||
|
|
||||||
|
{if $arr_knd == '0'}
|
||||||
|
<tr>
|
||||||
|
<td colspan='3'>
|
||||||
|
<strong style="color:red">{$kga.lang.noItems}</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
115
extensions/ki_adminpanel/templates/main.tpl
Normal file
115
extensions/ki_adminpanel/templates/main.tpl
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
ap_ext_onload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
<div id="ap_ext_panel">
|
||||||
|
|
||||||
|
{* edit customers *}
|
||||||
|
|
||||||
|
<div id="ap_ext_sub5">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(5)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.knds}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s5" class="ap_ext_subtab ap_ext_subject">
|
||||||
|
{$knd_display}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{* edit projects *}
|
||||||
|
|
||||||
|
<div id="ap_ext_sub6">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(6)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.pcts}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s6" class="ap_ext_subtab ap_ext_subject">
|
||||||
|
{$pct_display}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{* edit events *}
|
||||||
|
|
||||||
|
<div id="ap_ext_sub7">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(7)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.evts}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s7" class="ap_ext_subtab ap_ext_subject">
|
||||||
|
{$evt_display}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{* edit users *}
|
||||||
|
{ if $kga.usr.usr_sts == 0 }
|
||||||
|
<div id="ap_ext_sub1">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(1)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.users}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s1" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
{$admin.users}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{* edit groups *}
|
||||||
|
|
||||||
|
<div id="ap_ext_sub2">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(2)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.groups}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s2" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
{$admin.groups}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{* advanced *}
|
||||||
|
{ if $kga.usr.usr_sts == 0 }
|
||||||
|
<div id="ap_ext_sub3">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(3)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.advanced}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s3" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
{$admin.advanced}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{ /if}
|
||||||
|
|
||||||
|
{* DB *}
|
||||||
|
{ if $kga.usr.usr_sts == 0 }
|
||||||
|
<div id="ap_ext_sub4">
|
||||||
|
<div class="ap_ext_panel_header">
|
||||||
|
<a onClick="ap_ext_subtab_expand(4)">
|
||||||
|
<span class="ap_ext_accordeon_triangle"></span>
|
||||||
|
{$kga.lang.database}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div id="ap_ext_s4" class="ap_ext_subtab ap_ext_4cols">
|
||||||
|
{$admin.database}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{ /if}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
62
extensions/ki_adminpanel/templates/pct.tpl
Normal file
62
extensions/ki_adminpanel/templates/pct.tpl
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<a href="#" onClick="floaterShow('floaters.php','add_edit_pct',0,0,450,200); $(this).blur(); return false;"><img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/add.png" width="22" height="16" alt="{$kga.lang.new_pct}"></a> {$kga.lang.new_pct}
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
{cycle values="odd,even" reset=true print=false}
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr class='headerrow'>
|
||||||
|
<th>{$kga.lang.options}</th>
|
||||||
|
<th>{$kga.lang.pcts}</th>
|
||||||
|
<th>{$kga.lang.groups}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{section name=row loop=$arr_pct}
|
||||||
|
{if $arr_pct[row].pct_visible || $arr_pct[row].zeit != "0:00"}
|
||||||
|
<tr class="{cycle values="odd,even"}">
|
||||||
|
|
||||||
|
<td class="option">
|
||||||
|
<a href ="#" onClick="editSubject('pct',{$arr_pct[row].pct_ID}); $(this).blur(); return false;">
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/edit2.gif' width='13' height='13' alt='{$kga.lang.edit}' title='{$kga.lang.edit}' border='0' />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" id="delete_pct{$arr_pct[row].pct_ID}" onClick="ap_ext_deleteProject({$arr_pct[row].pct_ID})">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan.png" title="{$kga.lang.delpct}" width="13" height="13" alt="{$kga.lang.delpct}" border="0">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="projects">
|
||||||
|
{if $arr_pct[row].pct_visible != 1}<span style="color:#bbb">{/if}
|
||||||
|
{if $kga.conf.flip_pct_display}
|
||||||
|
<span class="lighter">{$arr_pct[row].knd_name|truncate:30:"..."|escape:'html'}:</span> {$arr_pct[row].pct_name|escape:'html'}
|
||||||
|
{else}
|
||||||
|
{$arr_pct[row].pct_name|escape:'html'} <span class="lighter">({$arr_pct[row].knd_name|truncate:30:"..."|escape:'html'})</span>
|
||||||
|
{/if}
|
||||||
|
{if $arr_pct[row].pct_visible != 1}</span>{/if}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{$arr_pct[row].groups|escape:'html'}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{/section}
|
||||||
|
|
||||||
|
{if $arr_pct == '0'}
|
||||||
|
<tr>
|
||||||
|
<td colspan='3'>
|
||||||
|
<strong style="color:red">{$kga.lang.noItems}</strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
180
extensions/ki_adminpanel/templates/users.tpl
Normal file
180
extensions/ki_adminpanel/templates/users.tpl
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
{*########## field for add new user ##########*}
|
||||||
|
<form>
|
||||||
|
<input type=text id="newuser" class="formfield"></input>
|
||||||
|
<input class='btn_ok' type="submit" value="{$kga.lang.adduser}" onclick="ap_ext_newUser(); return false;">
|
||||||
|
{if $showDeletedUsers}
|
||||||
|
<input class='btn_ok' type="button" value="{$kga.lang.hidedeletedusers}" onclick="ap_ext_hideDeletedUsers(); return false;">
|
||||||
|
{else}
|
||||||
|
<input class='btn_ok' type="button" value="{$kga.lang.showdeletedusers}" onclick="ap_ext_showDeletedUsers(); return false;">
|
||||||
|
{/if}
|
||||||
|
</form>
|
||||||
|
{*########## field for add new user ##########*}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{$kga.lang.username}</th>
|
||||||
|
<th>{$kga.lang.options}</th>
|
||||||
|
<th>{$kga.lang.status}</th>
|
||||||
|
<th>{$kga.lang.group}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
{section name=userarray loop=$arr_usr}{strip}
|
||||||
|
<tr class='{cycle values="even,odd"}'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{*########## USER NAME ##########*}
|
||||||
|
<td>
|
||||||
|
{if $curr_user == $arr_usr[userarray].usr_name}
|
||||||
|
<strong style="color:#00E600">{$arr_usr[userarray].usr_name|escape:'html'}</strong>
|
||||||
|
{else}
|
||||||
|
{if $arr_usr[userarray].usr_trash}<span style="color:#999">{/if}
|
||||||
|
{$arr_usr[userarray].usr_name|escape:'html'}
|
||||||
|
{if $arr_usr[userarray].usr_trash}</span>{/if}
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
{*########## /USER NAME ##########*}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{*########## Option cells ##########*}
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<a href="#" onClick="ap_ext_editUser('{$arr_usr[userarray].usr_ID}'); $(this).blur(); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/edit2.gif" title="{$kga.lang.editusr}" width="13" height="13" alt="{$kga.lang.editusr}" border="0">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{*
|
||||||
|
{if $curr_user != $arr_usr[userarray].usr_name}
|
||||||
|
<a href="#" onClick="switchUsr('{$arr_usr[userarray].usr_ID}'); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/auge.png" title="{$kga.lang.switchusr}" width="16" height="13" alt="{$kga.lang.switchusr}" border="0">
|
||||||
|
</a>
|
||||||
|
{else}
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/auge_.gif" title="{$kga.lang.switchusr}" width="16" height="13" alt="{$kga.lang.switchusr}" border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" onClick="backupUsr({$arr_usr[userarray].usr_ID}); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_backup.gif" title="{$kga.lang.backupusr}" width="12" height="13" border=0 alt="{$kga.lang.backupusr}">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*}
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_mail}
|
||||||
|
<a href="mailto:{$arr_usr[userarray].usr_mail|escape:'html'}">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_mail.gif" title="{$kga.lang.mailusr}" width="12" height="13" alt="{$kga.lang.mailusr}" border="0">
|
||||||
|
</a>
|
||||||
|
{else}
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_mail_.gif" title="{$kga.lang.mailusr}" width="12" height="13" alt="{$kga.lang.mailusr}" border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{if $curr_user != $arr_usr[userarray].usr_name}
|
||||||
|
<a href="#" id="delete_usr{$arr_usr[userarray].usr_ID}" onClick="ap_ext_deleteUser({$arr_usr[userarray].usr_ID})">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan.png" title="{$kga.lang.delusr}" width="13" height="13" alt="{$kga.lang.delusr}" border="0">
|
||||||
|
</a>
|
||||||
|
{else}
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/button_trashcan_.png" title="{$kga.lang.delusr}" width="13" height="13" alt="{$kga.lang.delusr}" border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
{*########## /Option cells ##########*}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{*########## Status cells ##########*}
|
||||||
|
<td>
|
||||||
|
{if $arr_usr[userarray].usr_sts == 0}
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/crown.png' alt='{$kga.lang.adminusr}' title='{$kga.lang.adminusr}' border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_sts == 1}
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/leader.gif' alt='{$kga.lang.groupleader}' title='{$kga.lang.groupleader}' border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_sts == 2}
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/user.gif' alt='{$kga.lang.regusr}' title='{$kga.lang.regusr}' border="0">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_active == 1}
|
||||||
|
{if $curr_user != $arr_usr[userarray].usr_name}
|
||||||
|
<a href="#" id="ban{$arr_usr[userarray].usr_ID}" onClick="ap_ext_banUser('{$arr_usr[userarray].usr_ID}'); return false;">
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/jipp.gif' alt='{$kga.lang.activeusr}' title='{$kga.lang.activeusr}' border="0" width="16" height="16" />
|
||||||
|
</a>
|
||||||
|
{else}
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/jipp_.gif' alt='{$kga.lang.activeusr}' title='{$kga.lang.activeusr}' border="0" width="16" height="16" />
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_active == 0}
|
||||||
|
<a href="#" id="ban{$arr_usr[userarray].usr_ID}" onClick="ap_ext_unbanUser('{$arr_usr[userarray].usr_ID}'); return false;">
|
||||||
|
<img src='../skins/{$kga.conf.skin|escape:'html'}/grfx/lock.png' alt='{$kga.lang.bannedusr}' title='{$kga.lang.bannedusr}' border="0" width="16" height="16" />
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_pw == "no"}
|
||||||
|
<a href="#" onClick="ap_ext_editUser('{$arr_usr[userarray].usr_ID}'); $(this).blur(); return false;">
|
||||||
|
<img src="../skins/{$kga.conf.skin|escape:'html'}/grfx/caution_mini.png" width="16" height="16" title='{$kga.lang.nopassword}' border="0">
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{if $arr_usr[userarray].usr_trash}
|
||||||
|
<strong style="color:red">X</strong>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
{*########## /Status cells ##########*}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{*########## Group cells ##########*}
|
||||||
|
<td>
|
||||||
|
{if $arr_usr[userarray].usr_grp == 1}
|
||||||
|
<span style="color:red">{$arr_usr[userarray].grp_name|escape:'html'}</span>
|
||||||
|
{else}
|
||||||
|
{$arr_usr[userarray].grp_name|escape:'html'}
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
{*########## Group cells ##########*}
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
{/strip}{/section}
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<p><strong>{$kga.lang.hint}</strong> {$kga.lang.usr_caution1} '{$curr_user|escape:'html'}' {$kga.lang.usr_caution2}</p>
|
||||||
100
extensions/ki_budget/compile/%%45^45E^45E480CD%%index.tpl.php
Normal file
100
extensions/ki_budget/compile/%%45^45E^45E480CD%%index.tpl.php
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-01-20 09:05:44
|
||||||
|
compiled from index.tpl */ ?>
|
||||||
|
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||||
|
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'index.tpl', 24, false),)), $this); ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
bgt_ext_onload();
|
||||||
|
|
||||||
|
plotdata = new Array();
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
<?php $_from = $this->_tpl_vars['arr_plotdata']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
|
||||||
|
foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['value']):
|
||||||
|
?>
|
||||||
|
plotdata[<?php echo $this->_tpl_vars['id']; ?>
|
||||||
|
] = <?php echo $this->_tpl_vars['value']; ?>
|
||||||
|
;
|
||||||
|
<?php endforeach; endif; unset($_from); ?><?php echo '
|
||||||
|
|
||||||
|
chartColors = '; ?>
|
||||||
|
<?php echo $this->_tpl_vars['chartColors']; ?>
|
||||||
|
<?php echo ';
|
||||||
|
|
||||||
|
bgt_ext_plot(plotdata);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="bgt">
|
||||||
|
|
||||||
|
<div class="keys">
|
||||||
|
<?php unset($this->_sections['row']);
|
||||||
|
$this->_sections['row']['name'] = 'row';
|
||||||
|
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_keys']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['row']['show'] = true;
|
||||||
|
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||||
|
$this->_sections['row']['step'] = 1;
|
||||||
|
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||||
|
if ($this->_sections['row']['show']) {
|
||||||
|
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||||
|
if ($this->_sections['row']['total'] == 0)
|
||||||
|
$this->_sections['row']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['row']['total'] = 0;
|
||||||
|
if ($this->_sections['row']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||||
|
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||||
|
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||||
|
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||||
|
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||||
|
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||||
|
?>
|
||||||
|
<div class="key"><div class="key_color" style="background-color:<?php echo $this->_tpl_vars['arr_keys'][$this->_sections['row']['index']]['color']; ?>
|
||||||
|
"></div><?php echo ((is_array($_tmp=$this->_tpl_vars['arr_keys'][$this->_sections['row']['index']]['name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
</div>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
<div class="key_end"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php unset($this->_sections['row']);
|
||||||
|
$this->_sections['row']['name'] = 'row';
|
||||||
|
$this->_sections['row']['loop'] = is_array($_loop=$this->_tpl_vars['arr_pct']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||||
|
$this->_sections['row']['show'] = true;
|
||||||
|
$this->_sections['row']['max'] = $this->_sections['row']['loop'];
|
||||||
|
$this->_sections['row']['step'] = 1;
|
||||||
|
$this->_sections['row']['start'] = $this->_sections['row']['step'] > 0 ? 0 : $this->_sections['row']['loop']-1;
|
||||||
|
if ($this->_sections['row']['show']) {
|
||||||
|
$this->_sections['row']['total'] = $this->_sections['row']['loop'];
|
||||||
|
if ($this->_sections['row']['total'] == 0)
|
||||||
|
$this->_sections['row']['show'] = false;
|
||||||
|
} else
|
||||||
|
$this->_sections['row']['total'] = 0;
|
||||||
|
if ($this->_sections['row']['show']):
|
||||||
|
|
||||||
|
for ($this->_sections['row']['index'] = $this->_sections['row']['start'], $this->_sections['row']['iteration'] = 1;
|
||||||
|
$this->_sections['row']['iteration'] <= $this->_sections['row']['total'];
|
||||||
|
$this->_sections['row']['index'] += $this->_sections['row']['step'], $this->_sections['row']['iteration']++):
|
||||||
|
$this->_sections['row']['rownum'] = $this->_sections['row']['iteration'];
|
||||||
|
$this->_sections['row']['index_prev'] = $this->_sections['row']['index'] - $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['index_next'] = $this->_sections['row']['index'] + $this->_sections['row']['step'];
|
||||||
|
$this->_sections['row']['first'] = ($this->_sections['row']['iteration'] == 1);
|
||||||
|
$this->_sections['row']['last'] = ($this->_sections['row']['iteration'] == $this->_sections['row']['total']);
|
||||||
|
?>
|
||||||
|
<div class="bgt_project">
|
||||||
|
<div class="project_head">
|
||||||
|
<?php echo ((is_array($_tmp=$this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_name'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="bgt_chartdiv_<?php echo $this->_tpl_vars['arr_pct'][$this->_sections['row']['index']]['pct_ID']; ?>
|
||||||
|
" style="height:140px;width:150px; "></div>
|
||||||
|
</div>
|
||||||
|
<?php endfor; endif; ?>
|
||||||
|
<div class="bgt_project_end"/>
|
||||||
|
</div>
|
||||||
13
extensions/ki_budget/config.ini
Normal file
13
extensions/ki_budget/config.ini
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
EXTENSION_NAME = "Budget"
|
||||||
|
EXTENSION_KEY = "ki_budget"
|
||||||
|
EXTENSION_INIT_FILE = "ki_budget/init.php"
|
||||||
|
EXTENSION_DIR = "ki_budget"
|
||||||
|
|
||||||
|
ADMIN_ALLOWED = "1"
|
||||||
|
GROUP_LEADER_ALLOWED = "1"
|
||||||
|
USER_ALLOWED = "1"
|
||||||
|
CUSTOMER_ALLOWED = "1"
|
||||||
|
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_budget/js/bgt_func.js"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_budget/js/bgt_init.js"
|
||||||
|
CSS_INCLUDE_FILES = "../extensions/ki_budget/css/styles.css"
|
||||||
64
extensions/ki_budget/css/setup.css.php
Normal file
64
extensions/ki_budget/css/setup.css.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-type: text/css');
|
||||||
|
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||||
|
?>
|
||||||
|
|
||||||
|
#bgt {
|
||||||
|
border:1px solid black;
|
||||||
|
margin:10px;
|
||||||
|
background-color:#eee;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bgt {
|
||||||
|
top:150px;
|
||||||
|
z-index:2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project_head {
|
||||||
|
background-image: url('<?php echo $table_header; ?>');
|
||||||
|
color:#FFF;
|
||||||
|
font-size:11px;
|
||||||
|
font-weight:bold;
|
||||||
|
padding:3px 4px 4px 6px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgt_project {
|
||||||
|
float:left;
|
||||||
|
/*min-width:150px;
|
||||||
|
height:150px;*/
|
||||||
|
background-color:#fafafa;
|
||||||
|
border:1px solid black;
|
||||||
|
margin:5px;
|
||||||
|
padding:2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgt_project_end {
|
||||||
|
clear:both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keys {
|
||||||
|
background-color:#fafafa;
|
||||||
|
border:1px solid black;
|
||||||
|
margin:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.key {
|
||||||
|
float:left;
|
||||||
|
white-space:nowrap;
|
||||||
|
padding:5px;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.key_color {
|
||||||
|
float:left;
|
||||||
|
width:1em;
|
||||||
|
height:1em;
|
||||||
|
margin-right: 5px;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.key_end {
|
||||||
|
clear:both;
|
||||||
|
}
|
||||||
1
extensions/ki_budget/css/styles.css
Normal file
1
extensions/ki_budget/css/styles.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@import "setup.css.php";
|
||||||
68
extensions/ki_budget/init.php
Normal file
68
extensions/ki_budget/init.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include Basics
|
||||||
|
include('../../includes/basics.php');
|
||||||
|
|
||||||
|
require("private_func.php");
|
||||||
|
|
||||||
|
$usr = checkUser();
|
||||||
|
|
||||||
|
// set smarty config
|
||||||
|
require_once(WEBROOT.'libraries/smarty/Smarty.class.php');
|
||||||
|
$tpl = new Smarty();
|
||||||
|
$tpl->template_dir = 'templates/';
|
||||||
|
$tpl->compile_dir = 'compile/';
|
||||||
|
|
||||||
|
// Get all project for the logged in customer or the current user.
|
||||||
|
if (isset($kga['customer']))
|
||||||
|
$arr_pct = get_arr_pct_by_knd("all",$kga['customer']['knd_ID']);
|
||||||
|
else
|
||||||
|
$arr_pct = get_arr_pct($kga['usr']['usr_grp']);
|
||||||
|
|
||||||
|
$usedEvents = array();
|
||||||
|
$xpensesOccured = false;
|
||||||
|
|
||||||
|
// If there are any projects create the plot data.
|
||||||
|
if (count($arr_pct)>0) {
|
||||||
|
$arr_plotdata = budget_plot_data($arr_pct,$usedEvents,$expensesOccured);
|
||||||
|
$tpl->assign('arr_plotdata', $arr_plotdata);
|
||||||
|
$tpl->assign('arr_pct', $arr_pct);
|
||||||
|
} else {
|
||||||
|
$tpl->assign('arr_pct', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$chartColors = array("#efefef", "#4bb2c5", "#EAA228", "#c5b47f", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc");
|
||||||
|
$tpl->assign('chartColors',json_encode($chartColors));
|
||||||
|
|
||||||
|
// Create the keys which explain to the user which color means what.
|
||||||
|
$keys = array();
|
||||||
|
$keys[] = array('color'=>$chartColors[0], 'name' => $kga['lang']['ext_budget']['unusedBudget']);
|
||||||
|
if ($expensesOccured)
|
||||||
|
$keys[] = array('color'=>$chartColors[1], 'name' => $kga['lang']['xp_ext']['expenses']);
|
||||||
|
for ($i = 0;$i<count($usedEvents);$i++) {
|
||||||
|
$keys[] = array('color'=>$chartColors[($i+2)%(count($chartColors)-1)], 'name' => $usedEvents[$i]['evt_name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tpl->assign('arr_keys',$keys);
|
||||||
|
|
||||||
|
$tpl->display('index.tpl');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
53
extensions/ki_budget/js/bgt_func.js
Normal file
53
extensions/ki_budget/js/bgt_func.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// =============
|
||||||
|
// BGT EXT funcs
|
||||||
|
// =============
|
||||||
|
|
||||||
|
function bgt_ext_onload() {
|
||||||
|
bgt_ext_resize();
|
||||||
|
$("#loader").hide();
|
||||||
|
lists_visible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function bgt_ext_get_dimensions() {
|
||||||
|
bgt_h = pageHeight()-224;//-headerHeight()-28;
|
||||||
|
}
|
||||||
|
|
||||||
|
function bgt_ext_resize() {
|
||||||
|
bgt_ext_get_dimensions();
|
||||||
|
$("#bgt").css("height",bgt_h);
|
||||||
|
}
|
||||||
|
|
||||||
|
function bgt_ext_plot(plotdata) {
|
||||||
|
for (var i in plotdata) {
|
||||||
|
if ($('#bgt_chartdiv_'+i).length == 0) continue;
|
||||||
|
try {
|
||||||
|
$.jqplot('bgt_chartdiv_'+i, [plotdata[i]], {
|
||||||
|
seriesDefaults:{renderer:$.jqplot.PieRenderer,
|
||||||
|
rendererOptions: {padding:10}
|
||||||
|
},
|
||||||
|
seriesColors:chartColors,
|
||||||
|
grid:{background:$('#bgt_chartdiv_'+i).css("background-color"), borderWidth:0, shadow:false}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
42
extensions/ki_budget/js/bgt_init.js
Normal file
42
extensions/ki_budget/js/bgt_init.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ============
|
||||||
|
// BGT EXT init
|
||||||
|
// ============
|
||||||
|
|
||||||
|
// set path of extension
|
||||||
|
var bgt_ext_path = "../extensions/ki_budget/";
|
||||||
|
|
||||||
|
var bgt_w;
|
||||||
|
var bgt_h;
|
||||||
|
|
||||||
|
var chartColors;
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
var bgt_resizeTimer = null;
|
||||||
|
$(window).bind('resize', function() {
|
||||||
|
if (bgt_resizeTimer) clearTimeout(bgt_resizeTimer);
|
||||||
|
bgt_resizeTimer = setTimeout(bgt_ext_resize, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$.jqplot.config.enablePlugins = true;
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
144
extensions/ki_budget/private_func.php
Normal file
144
extensions/ki_budget/private_func.php
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
include('../ki_expenses/private_db_layer_'.$kga['server_conn'].'.php');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sum up expenses for the project.
|
||||||
|
*/
|
||||||
|
function calculate_expenses_sum($projectId) {
|
||||||
|
$expSum = 0;
|
||||||
|
$exp_arr = get_arr_exp(0,time(),null,null,array($projectId));
|
||||||
|
|
||||||
|
foreach ($exp_arr as $exp) {
|
||||||
|
$expSum += $exp['exp_value'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $expSum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an array of arrays which hold the size of the pie chart elements
|
||||||
|
* for every projects.
|
||||||
|
* The first element in the inner arrays represents the unused budget costs,
|
||||||
|
* the second element in the inner arrays represents the expense costs,
|
||||||
|
* the third and all other elements in the inner arrays represents the
|
||||||
|
* costs for individual events.
|
||||||
|
*
|
||||||
|
* An visual example for two projects with the ID 2 and 5:
|
||||||
|
* $array = {
|
||||||
|
* 2 => array (budget left , expenses cost, task1, task2 ),
|
||||||
|
* 5 => array (budget left , expenses cost, task1, task2 ),
|
||||||
|
* };
|
||||||
|
*
|
||||||
|
* @param array $projects IDs of all projects to include in the plot data
|
||||||
|
* @param array $usedEvents array of all used events (each as an array of its data)
|
||||||
|
* @return array containing arrays for every project which hold the size of the pie chart elements
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function budget_plot_data($projects,&$usedEvents,&$expensesOccured) {
|
||||||
|
|
||||||
|
$wages = array();
|
||||||
|
$eventUsage = array(); // track what events are used
|
||||||
|
$usedEvents = array();
|
||||||
|
$expensesOccured = false;
|
||||||
|
|
||||||
|
$events = get_arr_evt("all");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* sum up expenses
|
||||||
|
*/
|
||||||
|
foreach ($projects as $project) {
|
||||||
|
|
||||||
|
$pctId = $project['pct_ID'];
|
||||||
|
$wages[$pctId]['budget'] = $project['pct_budget'];
|
||||||
|
$wages[$pctId]['expenses'] =
|
||||||
|
calculate_expenses_sum($project['pct_ID']);
|
||||||
|
|
||||||
|
if ($wages[$pctId]['expenses'] != 0)
|
||||||
|
$expensesOccured = true;
|
||||||
|
|
||||||
|
if ($wages[$pctId]['budget'] < 0) {
|
||||||
|
//Costs over budget, set remaining budget to 0.
|
||||||
|
$wages[$pctId]['budget'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// initialize entries for every event using its ID
|
||||||
|
foreach($events as $event) {
|
||||||
|
$wages[$pctId][$event['evt_ID']] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* sum up wages for every project and every event
|
||||||
|
*/
|
||||||
|
foreach ($projects as $project) {
|
||||||
|
$projectId = $project['pct_ID'];
|
||||||
|
$zef_arr = get_arr_zef(0,time(),null,null,array($projectId));
|
||||||
|
|
||||||
|
foreach ($zef_arr as $zef) {
|
||||||
|
$pctId = $zef['zef_pctID'];
|
||||||
|
|
||||||
|
if ($zef['wage_decimal'] == 0.00)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (key_exists($zef['zef_evtID'],$wages[$pctId])) {
|
||||||
|
$eventUsage[$zef['zef_evtID']] = true;
|
||||||
|
$wages[$pctId][$zef['zef_evtID']] += $zef['wage_decimal'];
|
||||||
|
$wages[$pctId]['budget'] -= $zef['wage_decimal'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($wages[$pctId]['budget'] < 0) {
|
||||||
|
//Costs over budget, set remaining budget to 0.
|
||||||
|
$wages[$pctId]['budget'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Delete unused events.
|
||||||
|
*/
|
||||||
|
foreach ($events as $event) {
|
||||||
|
if (isset($eventUsage[$event['evt_ID']])) {
|
||||||
|
$usedEvents[] = $event;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($wages as $projectData) {
|
||||||
|
unset($projectData[$event['evt_ID']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert array of wages to javascript array for every project.
|
||||||
|
*/
|
||||||
|
$plot_data = array();
|
||||||
|
foreach ($wages as $project_id => $wage_array) {
|
||||||
|
$plot_data[$project_id] = '['.implode(',',$wage_array).']';
|
||||||
|
}
|
||||||
|
return $plot_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
38
extensions/ki_budget/templates/index.tpl
Normal file
38
extensions/ki_budget/templates/index.tpl
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
bgt_ext_onload();
|
||||||
|
|
||||||
|
plotdata = new Array();
|
||||||
|
{/literal}
|
||||||
|
{foreach key=id item=value from=$arr_plotdata}
|
||||||
|
plotdata[{$id}] = {$value};
|
||||||
|
{/foreach}{literal}
|
||||||
|
|
||||||
|
chartColors = {/literal}{$chartColors}{literal};
|
||||||
|
|
||||||
|
bgt_ext_plot(plotdata);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
|
||||||
|
<div id="bgt">
|
||||||
|
|
||||||
|
<div class="keys">
|
||||||
|
{section name=row loop=$arr_keys}
|
||||||
|
<div class="key"><div class="key_color" style="background-color:{$arr_keys[row].color}"></div>{$arr_keys[row].name|escape:'html'}</div>
|
||||||
|
{/section}
|
||||||
|
<div class="key_end"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{section name=row loop=$arr_pct}
|
||||||
|
<div class="bgt_project">
|
||||||
|
<div class="project_head">
|
||||||
|
{$arr_pct[row].pct_name|escape:'html'}
|
||||||
|
</div>
|
||||||
|
<div id="bgt_chartdiv_{$arr_pct[row].pct_ID}" style="height:140px;width:150px; "></div>
|
||||||
|
</div>
|
||||||
|
{/section}
|
||||||
|
<div class="bgt_project_end"/>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-02-03 08:13:50
|
||||||
|
compiled from index.tpl */ ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
changebillable_ext_onload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="changebillable_ext_wrap" width="100%">
|
||||||
|
<div id ="changebillable_ext" width="100%">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
58
extensions/ki_changebillable/config.ini
Normal file
58
extensions/ki_changebillable/config.ini
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
;= =====================================================================================================
|
||||||
|
;= You can define vars as single values or as array, for array efinition separate string values with [,]
|
||||||
|
;= EXAMPLE_SINGLE_VALUE = "myvar"
|
||||||
|
;= EXAMPLE_ARRAY = "myvar1", "myvar2"
|
||||||
|
;= =====================================================================================================
|
||||||
|
|
||||||
|
;= =====================================================================================================
|
||||||
|
;= Basic Vars you must define
|
||||||
|
;= =====================================================================================================
|
||||||
|
EXTENSION_NAME = "Change Billable Projects"
|
||||||
|
EXTENSION_KEY = "changebillable_ext"
|
||||||
|
EXTENSION_INIT_FILE = "ki_changebillable/init.php"
|
||||||
|
EXTENSION_DIR = "ki_changebillable"
|
||||||
|
|
||||||
|
ADMIN_ALLOWED = "1"
|
||||||
|
GROUP_LEADER_ALLOWED = "1"
|
||||||
|
USER_ALLOWED = "0"
|
||||||
|
CUSTOMER_ALLOWED = "0"
|
||||||
|
|
||||||
|
;= =====================================================================================================
|
||||||
|
;= Hooks
|
||||||
|
;= =====================================================================================================
|
||||||
|
; you may set this to an empty string if you don't want a function called up on tabchange
|
||||||
|
; multiple calls can be added using ";" as delimiter *inside* the quotes
|
||||||
|
|
||||||
|
; Hooklist:
|
||||||
|
; TAB_CHANGE_TRIGGER - gets called when any tab was clicked, regardless if the tab is already active or not
|
||||||
|
; TIMESPACE_CHANGE_TRIGGER - gets called everytime the datepicker picks a date (equally for start and end)
|
||||||
|
; BUZZER_RECORD_TRIGGER - fires when the buzzer was clicked for recording (also true for "record again" in ts_ext)
|
||||||
|
; BUZZER_STOP_TRIGGER - fires when the buzzer was hit in stop-state (true for stops in ts_ext)
|
||||||
|
; CHANGE_KND_TRIGGER - gets called when any change happend on a customer record
|
||||||
|
; CHANGE_PCT_TRIGGER - same for projects
|
||||||
|
; CHANGE_EVT_TRIGGER - same for events/tasks
|
||||||
|
; REG_TIMEOUTS - if you have timeouts running that do not need to run when the tab of your extension
|
||||||
|
; is not active, register them here. they will be terminated on tabchange and you have
|
||||||
|
; to restart them on triggerchange
|
||||||
|
|
||||||
|
; If you need a special hook for your extension please contact the core-team ;)
|
||||||
|
|
||||||
|
|
||||||
|
TAB_CHANGE_TRIGGER = "changebillable_ext_triggerchange();"
|
||||||
|
TIMESPACE_CHANGE_TRIGGER = "changebillable_ext_triggerTSS();"
|
||||||
|
;BUZZER_RECORD_TRIGGER = "changebillable_ext_triggerREC();"
|
||||||
|
;BUZZER_STOP_TRIGGER = "changebillable_ext_triggerSTP();"
|
||||||
|
|
||||||
|
;CHANGE_KND_TRIGGER =
|
||||||
|
;CHANGE_PCT_TRIGGER =
|
||||||
|
;CHANGE_EVT_TRIGGER =
|
||||||
|
;REG_TIMEOUTS =
|
||||||
|
|
||||||
|
;= =====================================================================================================
|
||||||
|
;= Optional Vars you could define
|
||||||
|
;= =====================================================================================================
|
||||||
|
|
||||||
|
CSS_INCLUDE_FILES = "../extensions/ki_changebillable/css/demo.css.php"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_changebillable/js/init.js"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_changebillable/js/func.js"
|
||||||
|
|
||||||
50
extensions/ki_changebillable/css/demo.css.php
Normal file
50
extensions/ki_changebillable/css/demo.css.php
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-type: text/css');
|
||||||
|
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||||
|
?>
|
||||||
|
|
||||||
|
#changebillable_ext_wrap {
|
||||||
|
border:1px solid #000;
|
||||||
|
border-top:none;
|
||||||
|
|
||||||
|
width: 98%;
|
||||||
|
left: 1%;
|
||||||
|
position:absolute;
|
||||||
|
overflow:hidden;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#changebillable_ext {
|
||||||
|
padding:10px;
|
||||||
|
|
||||||
|
background-color: #eee;
|
||||||
|
color:#000;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#changebillable_ext_header {
|
||||||
|
background-image: url('<?php echo $table_header; ?>');
|
||||||
|
border:1px solid #000;
|
||||||
|
color:#fff;
|
||||||
|
padding:5px 10px;
|
||||||
|
height:20px;
|
||||||
|
overflow:hidden;
|
||||||
|
position:absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
#changebillable_ext_advanced {
|
||||||
|
padding:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#changebillable_timespan {
|
||||||
|
padding: 20px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#changebillable_screenshot
|
||||||
|
{
|
||||||
|
float:left;
|
||||||
|
margin-right:10px;
|
||||||
|
}
|
||||||
39
extensions/ki_changebillable/init.php
Normal file
39
extensions/ki_changebillable/init.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include Basics
|
||||||
|
include('../../includes/basics.php');
|
||||||
|
|
||||||
|
$usr = checkUser();
|
||||||
|
// =========================================
|
||||||
|
// = Get the currently displayed timespace =
|
||||||
|
// =========================================
|
||||||
|
$timespace = get_timespace();
|
||||||
|
$in = $timespace[0];
|
||||||
|
$out = $timespace[1];
|
||||||
|
|
||||||
|
// Set smarty config.
|
||||||
|
require_once(WEBROOT.'libraries/smarty/Smarty.class.php');
|
||||||
|
$tpl = new Smarty();
|
||||||
|
$tpl->template_dir = 'templates/';
|
||||||
|
$tpl->compile_dir = 'compile/';
|
||||||
|
|
||||||
|
$tpl->display('index.tpl');
|
||||||
|
include_once './templates/index.php';
|
||||||
|
?>
|
||||||
0
extensions/ki_changebillable/install.php
Normal file
0
extensions/ki_changebillable/install.php
Normal file
52
extensions/ki_changebillable/js/func.js
Normal file
52
extensions/ki_changebillable/js/func.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function changebillable_ext_onload() {
|
||||||
|
$("#loader").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function changebillable_ext_resize() {
|
||||||
|
// function must exist, so init can register it as callback
|
||||||
|
}
|
||||||
|
|
||||||
|
var background = new Array("#000000","#FFFF00","#76EE00","#CD3333","#B23AEE","#CDBE70");
|
||||||
|
var text = new Array("#FFFFFF","#000000","#000000","#FFFFFF","#FFFFFF","#000000");
|
||||||
|
|
||||||
|
function changebillable_ext_triggerchange() {
|
||||||
|
$("#testdiv").append(" This has been put here on tab change.");
|
||||||
|
|
||||||
|
array_target = Math.round(Math.random()*background.length);
|
||||||
|
|
||||||
|
$("#testdiv").css("color",text[array_target]);
|
||||||
|
$("#testdiv").css("background-color",background[array_target]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function changebillable_ext_triggerTSS() {
|
||||||
|
$.post(changebillable_ext_path + "processor.php", { axAction: "test", axValue: 0, id: 0 },
|
||||||
|
function(data) {
|
||||||
|
$('#demo_timespace > span.timespace_target').html(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changebillable_ext_triggerREC() {
|
||||||
|
logfile("trigger REC changebillable_ext");
|
||||||
|
}
|
||||||
|
|
||||||
|
function changebillable_ext_triggerSTP() {
|
||||||
|
logfile("trigger STP changebillable_ext");
|
||||||
|
}
|
||||||
53
extensions/ki_changebillable/js/init.js
Normal file
53
extensions/ki_changebillable/js/init.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************************************
|
||||||
|
*
|
||||||
|
* IMPORTANT NOTE:
|
||||||
|
*
|
||||||
|
* If you like a function to run when your extension is loaded into the extension-frame
|
||||||
|
* you CAN'T use the methods you'd normally use when the dom is ready build! So something like:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* $(document).ready(function(){
|
||||||
|
* [do something stupid...]
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ... won't work here.
|
||||||
|
* This is because the dom is already finished loading BEFORE the extensions are hooked in!
|
||||||
|
* When You want JavaScript or jQuery to do something when your extension is loaded into its
|
||||||
|
* place in the *existing* DOM, you have to put a function-call *into* the content you load.
|
||||||
|
* You can also use the jQuery ready-funktion there!
|
||||||
|
*
|
||||||
|
****************************************************************************************************/
|
||||||
|
|
||||||
|
// set path of extension
|
||||||
|
var changebillable_ext_path = "../extensions/ki_changebillable/";
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
var changebillable_ext_resizeTimer = null;
|
||||||
|
|
||||||
|
$(window).bind('resize', function() {
|
||||||
|
if (changebillable_ext_resizeTimer) clearTimeout(changebillable_ext_resizeTimer);
|
||||||
|
changebillable_ext_resizeTimer = setTimeout(changebillable_ext_resize, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
33
extensions/ki_changebillable/processor.php
Normal file
33
extensions/ki_changebillable/processor.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Always include the Kimai Standard Processor Initialization!
|
||||||
|
|
||||||
|
// insert KSPI
|
||||||
|
$isCoreProcessor = 0;
|
||||||
|
$dir_templates = "templates/";
|
||||||
|
require("../../includes/kspi.php");
|
||||||
|
|
||||||
|
switch ($axAction) {
|
||||||
|
case 'test':
|
||||||
|
echo $kga['usr']['timespace_in'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
64
extensions/ki_changebillable/templates/index.php
Normal file
64
extensions/ki_changebillable/templates/index.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
<div class="CSSTableGenerator" >
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
try {
|
||||||
|
$con = new PDO('mysql:host=localhost;port=3306;dbname=kimai', "kimai", "kimai");
|
||||||
|
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
//ALTER TABLE `kimai15_pct`
|
||||||
|
//ADD COLUMN `pct_billable` TINYINT(1) NOT NULL DEFAULT '0' AFTER `pct_internal`;
|
||||||
|
$query = <<<EOD
|
||||||
|
select DISTINCT
|
||||||
|
k.knd_name as 'Company Name',
|
||||||
|
p.pct_name as 'Project',
|
||||||
|
CASE
|
||||||
|
WHEN p.pct_billable = 0 THEN CONCAT("<input type='radio' name='",p.pct_ID, "' value='0' checked='checked'/>")
|
||||||
|
ELSE CONCAT("<input type='radio' name='",p.pct_ID, "' value='0'/>")
|
||||||
|
END as 'Billabale',
|
||||||
|
CASE
|
||||||
|
WHEN p.pct_billable = 1 THEN CONCAT("<input type='radio' name='",p.pct_ID, "' value='1' checked='checked'/>")
|
||||||
|
ELSE CONCAT("<input type='radio' name='",p.pct_ID, "' value='1'/>")
|
||||||
|
END as 'Non-billable',
|
||||||
|
CASE
|
||||||
|
WHEN p.pct_billable = 2 THEN CONCAT("<input type='radio' name='",p.pct_ID, "' value='2' checked='checked'/>")
|
||||||
|
ELSE CONCAT("<input type='radio' name='",p.pct_ID, "' value='2'/>")
|
||||||
|
END as 'Unproductive'
|
||||||
|
from kimai15_pct p
|
||||||
|
inner join kimai15_knd k on p.pct_kndID=k.knd_ID
|
||||||
|
where p.pct_visible = 1
|
||||||
|
order by k.knd_name, p.pct_name
|
||||||
|
EOD;
|
||||||
|
|
||||||
|
echo "<form method='post'>";
|
||||||
|
//first pass just gets the column names
|
||||||
|
echo '<table id="myTable" border="1" cellpadding="3" cellspacing="0">';
|
||||||
|
$result = $con->query($query);
|
||||||
|
//return only the first row (we only need field names)
|
||||||
|
$row = $result->fetch(PDO::FETCH_ASSOC);
|
||||||
|
echo " <tr> \n";
|
||||||
|
foreach ($row as $field => $value) {
|
||||||
|
echo " <th>$field</th> \n";
|
||||||
|
} // end foreach
|
||||||
|
echo " </tr> \n";
|
||||||
|
//second query gets the data
|
||||||
|
$data = $con->query($query);
|
||||||
|
$data->setFetchMode(PDO::FETCH_ASSOC);
|
||||||
|
foreach ($data as $row) {
|
||||||
|
echo " <tr> \n";
|
||||||
|
foreach ($row as $name => $value) {
|
||||||
|
echo " <td>$value</td> \n";
|
||||||
|
} // end field loop
|
||||||
|
echo " </tr> \n";
|
||||||
|
} // end record loop
|
||||||
|
echo "</table> \n";
|
||||||
|
echo "<input type='submit' name='changebillable_submit' value='SUBMIT'/>";
|
||||||
|
echo "<form>";
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo 'ERROR: ' . $e->getMessage();
|
||||||
|
} // end try
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
22
extensions/ki_changebillable/templates/index.tpl
Normal file
22
extensions/ki_changebillable/templates/index.tpl
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{* IMPORTANT NOTE:
|
||||||
|
Javascript or jQuery stuff that should run when your extension *has finished loading*
|
||||||
|
should sit in an special onload function like this:
|
||||||
|
*}
|
||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
changebillable_ext_onload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="changebillable_ext_wrap" width="100%">
|
||||||
|
<div id ="changebillable_ext" width="100%">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php /* Smarty version 2.6.20, created on 2015-02-09 14:06:41
|
||||||
|
compiled from index.tpl */ ?>
|
||||||
|
<?php echo '
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
changerequest_ext_onload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.mybutton {
|
||||||
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #92968e;
|
||||||
|
font-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
'; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="changerequest_ext_wrap" width="100%">
|
||||||
|
<div id ="changerequest_ext" width="100%">
|
||||||
|
<p></p>
|
||||||
|
<a>Download Sheet</a><a class="mybutton" href="pdf.php">Download</a>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
58
extensions/ki_changerequest/config.ini
Normal file
58
extensions/ki_changerequest/config.ini
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
;= =====================================================================================================
|
||||||
|
;= You can define vars as single values or as array, for array efinition separate string values with [,]
|
||||||
|
;= EXAMPLE_SINGLE_VALUE = "myvar"
|
||||||
|
;= EXAMPLE_ARRAY = "myvar1", "myvar2"
|
||||||
|
;= =====================================================================================================
|
||||||
|
|
||||||
|
;= =====================================================================================================
|
||||||
|
;= Basic Vars you must define
|
||||||
|
;= =====================================================================================================
|
||||||
|
EXTENSION_NAME = "Change Request Form"
|
||||||
|
EXTENSION_KEY = "changerequest_ext"
|
||||||
|
EXTENSION_INIT_FILE = "ki_changerequest/init.php"
|
||||||
|
EXTENSION_DIR = "ki_changerequest"
|
||||||
|
|
||||||
|
ADMIN_ALLOWED = "1"
|
||||||
|
GROUP_LEADER_ALLOWED = "1"
|
||||||
|
USER_ALLOWED = "1"
|
||||||
|
CUSTOMER_ALLOWED = "0"
|
||||||
|
|
||||||
|
;= =====================================================================================================
|
||||||
|
;= Hooks
|
||||||
|
;= =====================================================================================================
|
||||||
|
; you may set this to an empty string if you don't want a function called up on tabchange
|
||||||
|
; multiple calls can be added using ";" as delimiter *inside* the quotes
|
||||||
|
|
||||||
|
; Hooklist:
|
||||||
|
; TAB_CHANGE_TRIGGER - gets called when any tab was clicked, regardless if the tab is already active or not
|
||||||
|
; TIMESPACE_CHANGE_TRIGGER - gets called everytime the datepicker picks a date (equally for start and end)
|
||||||
|
; BUZZER_RECORD_TRIGGER - fires when the buzzer was clicked for recording (also true for "record again" in ts_ext)
|
||||||
|
; BUZZER_STOP_TRIGGER - fires when the buzzer was hit in stop-state (true for stops in ts_ext)
|
||||||
|
; CHANGE_KND_TRIGGER - gets called when any change happend on a customer record
|
||||||
|
; CHANGE_PCT_TRIGGER - same for projects
|
||||||
|
; CHANGE_EVT_TRIGGER - same for events/tasks
|
||||||
|
; REG_TIMEOUTS - if you have timeouts running that do not need to run when the tab of your extension
|
||||||
|
; is not active, register them here. they will be terminated on tabchange and you have
|
||||||
|
; to restart them on triggerchange
|
||||||
|
|
||||||
|
; If you need a special hook for your extension please contact the core-team ;)
|
||||||
|
|
||||||
|
|
||||||
|
TAB_CHANGE_TRIGGER = "changerequest_ext_triggerchange();"
|
||||||
|
TIMESPACE_CHANGE_TRIGGER = "changerequest_ext_triggerTSS();"
|
||||||
|
;BUZZER_RECORD_TRIGGER = "changerequest_ext_triggerREC();"
|
||||||
|
;BUZZER_STOP_TRIGGER = "changerequest_ext_triggerSTP();"
|
||||||
|
|
||||||
|
;CHANGE_KND_TRIGGER =
|
||||||
|
;CHANGE_PCT_TRIGGER =
|
||||||
|
;CHANGE_EVT_TRIGGER =
|
||||||
|
;REG_TIMEOUTS =
|
||||||
|
|
||||||
|
;= =====================================================================================================
|
||||||
|
;= Optional Vars you could define
|
||||||
|
;= =====================================================================================================
|
||||||
|
|
||||||
|
CSS_INCLUDE_FILES = "../extensions/ki_changerequest/css/demo.css.php"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_changerequest/js/init.js"
|
||||||
|
JS_INCLUDE_FILES[] = "../extensions/ki_changerequest/js/func.js"
|
||||||
|
|
||||||
50
extensions/ki_changerequest/css/demo.css.php
Normal file
50
extensions/ki_changerequest/css/demo.css.php
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-type: text/css');
|
||||||
|
$table_header = "../../../skins/standard/grfx/g3_table_header.png";
|
||||||
|
?>
|
||||||
|
|
||||||
|
#changerequest_ext_wrap {
|
||||||
|
border:1px solid #000;
|
||||||
|
border-top:none;
|
||||||
|
|
||||||
|
width: 98%;
|
||||||
|
left: 1%;
|
||||||
|
position:absolute;
|
||||||
|
overflow:hidden;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#changerequest_ext {
|
||||||
|
padding:10px;
|
||||||
|
|
||||||
|
background-color: #eee;
|
||||||
|
color:#000;
|
||||||
|
overflow:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#changerequest_ext_header {
|
||||||
|
background-image: url('<?php echo $table_header; ?>');
|
||||||
|
border:1px solid #000;
|
||||||
|
color:#fff;
|
||||||
|
padding:5px 10px;
|
||||||
|
height:20px;
|
||||||
|
overflow:hidden;
|
||||||
|
position:absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
#changerequest_ext_advanced {
|
||||||
|
padding:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#changerequest_timespan {
|
||||||
|
padding: 20px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#changerequest_screenshot
|
||||||
|
{
|
||||||
|
float:left;
|
||||||
|
margin-right:10px;
|
||||||
|
}
|
||||||
41
extensions/ki_changerequest/init.php
Normal file
41
extensions/ki_changerequest/init.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Include Basics
|
||||||
|
include('../../includes/basics.php');
|
||||||
|
|
||||||
|
$usr = checkUser();
|
||||||
|
// =========================================
|
||||||
|
// = Get the currently displayed timespace =
|
||||||
|
// =========================================
|
||||||
|
$timespace = get_timespace();
|
||||||
|
$in = $timespace[0];
|
||||||
|
$out = $timespace[1];
|
||||||
|
|
||||||
|
|
||||||
|
// Set smarty config.
|
||||||
|
require_once(WEBROOT.'libraries/smarty/Smarty.class.php');
|
||||||
|
$tpl = new Smarty();
|
||||||
|
$tpl->template_dir = 'templates/';
|
||||||
|
$tpl->compile_dir = 'compile/';
|
||||||
|
|
||||||
|
$tpl->display('index.tpl');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
0
extensions/ki_changerequest/install.php
Normal file
0
extensions/ki_changerequest/install.php
Normal file
52
extensions/ki_changerequest/js/func.js
Normal file
52
extensions/ki_changerequest/js/func.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function changerequest_ext_onload() {
|
||||||
|
$("#loader").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function changerequest_ext_resize() {
|
||||||
|
// function must exist, so init can register it as callback
|
||||||
|
}
|
||||||
|
|
||||||
|
var background = new Array("#000000","#FFFF00","#76EE00","#CD3333","#B23AEE","#CDBE70");
|
||||||
|
var text = new Array("#FFFFFF","#000000","#000000","#FFFFFF","#FFFFFF","#000000");
|
||||||
|
|
||||||
|
function changerequest_ext_triggerchange() {
|
||||||
|
$("#testdiv").append(" This has been put here on tab change.");
|
||||||
|
|
||||||
|
array_target = Math.round(Math.random()*background.length);
|
||||||
|
|
||||||
|
$("#testdiv").css("color",text[array_target]);
|
||||||
|
$("#testdiv").css("background-color",background[array_target]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function changerequest_ext_triggerTSS() {
|
||||||
|
$.post(changerequest_ext_path + "processor.php", { axAction: "test", axValue: 0, id: 0 },
|
||||||
|
function(data) {
|
||||||
|
$('#demo_timespace > span.timespace_target').html(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changerequest_ext_triggerREC() {
|
||||||
|
logfile("trigger REC changerequest_ext");
|
||||||
|
}
|
||||||
|
|
||||||
|
function changerequest_ext_triggerSTP() {
|
||||||
|
logfile("trigger STP changerequest_ext");
|
||||||
|
}
|
||||||
53
extensions/ki_changerequest/js/init.js
Normal file
53
extensions/ki_changerequest/js/init.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************************************
|
||||||
|
*
|
||||||
|
* IMPORTANT NOTE:
|
||||||
|
*
|
||||||
|
* If you like a function to run when your extension is loaded into the extension-frame
|
||||||
|
* you CAN'T use the methods you'd normally use when the dom is ready build! So something like:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* $(document).ready(function(){
|
||||||
|
* [do something stupid...]
|
||||||
|
* });
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ... won't work here.
|
||||||
|
* This is because the dom is already finished loading BEFORE the extensions are hooked in!
|
||||||
|
* When You want JavaScript or jQuery to do something when your extension is loaded into its
|
||||||
|
* place in the *existing* DOM, you have to put a function-call *into* the content you load.
|
||||||
|
* You can also use the jQuery ready-funktion there!
|
||||||
|
*
|
||||||
|
****************************************************************************************************/
|
||||||
|
|
||||||
|
// set path of extension
|
||||||
|
var changerequest_ext_path = "../extensions/ki_changerequest/";
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
var changerequest_ext_resizeTimer = null;
|
||||||
|
|
||||||
|
$(window).bind('resize', function() {
|
||||||
|
if (changerequest_ext_resizeTimer) clearTimeout(changerequest_ext_resizeTimer);
|
||||||
|
changerequest_ext_resizeTimer = setTimeout(changerequest_ext_resize, 500);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
33
extensions/ki_changerequest/processor.php
Normal file
33
extensions/ki_changerequest/processor.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This file is part of
|
||||||
|
* Kimai - Open Source Time Tracking // http://www.kimai.org
|
||||||
|
* (c) 2006-2009 Kimai-Development-Team
|
||||||
|
*
|
||||||
|
* Kimai is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; Version 3, 29 June 2007
|
||||||
|
*
|
||||||
|
* Kimai is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Kimai; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Always include the Kimai Standard Processor Initialization!
|
||||||
|
|
||||||
|
// insert KSPI
|
||||||
|
$isCoreProcessor = 0;
|
||||||
|
$dir_templates = "templates/";
|
||||||
|
require("../../includes/kspi.php");
|
||||||
|
|
||||||
|
switch ($axAction) {
|
||||||
|
case 'test':
|
||||||
|
echo $kga['usr']['timespace_in'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
3
extensions/ki_changerequest/templates/index.php
Normal file
3
extensions/ki_changerequest/templates/index.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
38
extensions/ki_changerequest/templates/index.tpl
Normal file
38
extensions/ki_changerequest/templates/index.tpl
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{* IMPORTANT NOTE:
|
||||||
|
Javascript or jQuery stuff that should run when your extension *has finished loading*
|
||||||
|
should sit in an special onload function like this:
|
||||||
|
*}
|
||||||
|
{literal}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
changerequest_ext_onload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.mybutton {
|
||||||
|
margin: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #92968e;
|
||||||
|
font-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
{/literal}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="changerequest_ext_wrap" width="100%">
|
||||||
|
<div id ="changerequest_ext" width="100%">
|
||||||
|
<p></p>
|
||||||
|
<a>Download Sheet</a><a class="mybutton" href="pdf.php">Download</a>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2922
extensions/ki_changerequest/templates/tcpdf/CHANGELOG.TXT
Normal file
2922
extensions/ki_changerequest/templates/tcpdf/CHANGELOG.TXT
Normal file
File diff suppressed because it is too large
Load Diff
858
extensions/ki_changerequest/templates/tcpdf/LICENSE.TXT
Normal file
858
extensions/ki_changerequest/templates/tcpdf/LICENSE.TXT
Normal file
@@ -0,0 +1,858 @@
|
|||||||
|
**********************************************************************
|
||||||
|
* TCPDF LICENSE
|
||||||
|
**********************************************************************
|
||||||
|
|
||||||
|
TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
**********************************************************************
|
||||||
|
**********************************************************************
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
**********************************************************************
|
||||||
|
**********************************************************************
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
|
**********************************************************************
|
||||||
|
**********************************************************************
|
||||||
115
extensions/ki_changerequest/templates/tcpdf/README.TXT
Normal file
115
extensions/ki_changerequest/templates/tcpdf/README.TXT
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
TCPDF - README
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
|
||||||
|
PLEASE MAKE A DONATION:
|
||||||
|
http://sourceforge.net/donate/index.php?group_id=128076
|
||||||
|
|
||||||
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
Name: TCPDF
|
||||||
|
Version: 6.2.6
|
||||||
|
Release date: 2015-01-28
|
||||||
|
Author: Nicola Asuni
|
||||||
|
|
||||||
|
Copyright (c) 2002-2015:
|
||||||
|
Nicola Asuni
|
||||||
|
Tecnick.com LTD
|
||||||
|
www.tecnick.com
|
||||||
|
|
||||||
|
URLs:
|
||||||
|
http://www.tcpdf.org
|
||||||
|
http://www.sourceforge.net/projects/tcpdf
|
||||||
|
|
||||||
|
Description:
|
||||||
|
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
|
||||||
|
This library includes also a class to extract data from existing PDF documents and
|
||||||
|
classes to generate 1D and 2D barcodes in various formats.
|
||||||
|
|
||||||
|
Main Features:
|
||||||
|
* no external libraries are required for the basic functions;
|
||||||
|
* all standard page formats, custom page formats, custom margins and units of measure;
|
||||||
|
* UTF-8 Unicode and Right-To-Left languages;
|
||||||
|
* TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts;
|
||||||
|
* font subsetting;
|
||||||
|
* methods to publish some XHTML + CSS code, Javascript and Forms;
|
||||||
|
* images, graphic (geometric figures) and transformation methods;
|
||||||
|
* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http: www.imagemagick.org/www/formats.html)
|
||||||
|
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
|
||||||
|
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
|
||||||
|
* automatic page header and footer management;
|
||||||
|
* document encryption up to 256 bit and digital signature certifications;
|
||||||
|
* transactions to UNDO commands;
|
||||||
|
* PDF annotations, including links, text and file attachments;
|
||||||
|
* text rendering modes (fill, stroke and clipping);
|
||||||
|
* multiple columns mode;
|
||||||
|
* no-write page regions;
|
||||||
|
* bookmarks, named destinations and table of content;
|
||||||
|
* text hyphenation;
|
||||||
|
* text stretching and spacing (tracking);
|
||||||
|
* automatic page break, line break and text alignments including justification;
|
||||||
|
* automatic page numbering and page groups;
|
||||||
|
* move and delete pages;
|
||||||
|
* page compression (requires php-zlib extension);
|
||||||
|
* XOBject Templates;
|
||||||
|
* Layers and object visibility.
|
||||||
|
* PDF/A-1b support.
|
||||||
|
|
||||||
|
Installation (full instructions on http: www.tcpdf.org):
|
||||||
|
1. copy the folder on your Web server
|
||||||
|
2. set your installation path and other parameters on the config/tcpdf_config.php
|
||||||
|
3. call the examples/example_001.php page with your browser to see an example
|
||||||
|
|
||||||
|
Source Code Documentation:
|
||||||
|
http://www.tcpdf.org
|
||||||
|
|
||||||
|
Additional Documentation:
|
||||||
|
http://www.tcpdf.org
|
||||||
|
|
||||||
|
License:
|
||||||
|
Copyright (C) 2002-2014 Nicola Asuni - Tecnick.com LTD
|
||||||
|
|
||||||
|
TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the License
|
||||||
|
along with TCPDF. If not, see
|
||||||
|
<http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>.
|
||||||
|
|
||||||
|
See LICENSE.TXT file for more information.
|
||||||
|
|
||||||
|
Third party fonts:
|
||||||
|
|
||||||
|
This library may include third party font files released with different licenses.
|
||||||
|
|
||||||
|
All the PHP files on the fonts directory are subject to the general TCPDF license (GNU-LGPLv3),
|
||||||
|
they do not contain any binary data but just a description of the general properties of a particular font.
|
||||||
|
These files can be also generated on the fly using the font utilities and TCPDF methods.
|
||||||
|
|
||||||
|
All the original binary TTF font files have been renamed for compatibility with TCPDF and compressed using the gzcompress PHP function that uses the ZLIB data format (.z files).
|
||||||
|
|
||||||
|
The binary files (.z) that begins with the prefix "free" have been extracted from the GNU FreeFont collection (GNU-GPLv3).
|
||||||
|
The binary files (.z) that begins with the prefix "pdfa" have been derived from the GNU FreeFont, so they are subject to the same license.
|
||||||
|
For the details of Copyright, License and other information, please check the files inside the directory fonts/freefont-20120503
|
||||||
|
Link : http://www.gnu.org/software/freefont/
|
||||||
|
|
||||||
|
The binary files (.z) that begins with the prefix "dejavu" have been extracted from the DejaVu fonts 2.33 (Bitstream) collection.
|
||||||
|
For the details of Copyright, License and other information, please check the files inside the directory fonts/dejavu-fonts-ttf-2.33
|
||||||
|
Link : http://dejavu-fonts.org
|
||||||
|
|
||||||
|
The binary files (.z) that begins with the prefix "ae" have been extracted from the Arabeyes.org collection (GNU-GPLv2).
|
||||||
|
Link : http://projects.arabeyes.org/
|
||||||
|
|
||||||
|
ICC profile:
|
||||||
|
TCPDF includes the sRGB.icc profile from the icc-profiles-free Debian package:
|
||||||
|
https://packages.debian.org/source/stable/icc-profiles-free
|
||||||
|
|
||||||
|
|
||||||
|
============================================================
|
||||||
40
extensions/ki_changerequest/templates/tcpdf/composer.json
Normal file
40
extensions/ki_changerequest/templates/tcpdf/composer.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "tecnick.com/tcpdf",
|
||||||
|
"version": "6.2.6",
|
||||||
|
"homepage": "http://www.tcpdf.org/",
|
||||||
|
"type": "library",
|
||||||
|
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
||||||
|
"keywords": ["PDF","tcpdf","PDFD32000-2008","qrcode","datamatrix","pdf417","barcodes"],
|
||||||
|
"license": "LGPLv3",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicola Asuni",
|
||||||
|
"email": "info@tecnick.com",
|
||||||
|
"homepage": "http://nicolaasuni.tecnick.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"fonts",
|
||||||
|
"config",
|
||||||
|
"include",
|
||||||
|
"tcpdf.php",
|
||||||
|
"tcpdf_parser.php",
|
||||||
|
"tcpdf_import.php",
|
||||||
|
"tcpdf_barcodes_1d.php",
|
||||||
|
"tcpdf_barcodes_2d.php",
|
||||||
|
"include/tcpdf_colors.php",
|
||||||
|
"include/tcpdf_filters.php",
|
||||||
|
"include/tcpdf_font_data.php",
|
||||||
|
"include/tcpdf_fonts.php",
|
||||||
|
"include/tcpdf_images.php",
|
||||||
|
"include/tcpdf_static.php",
|
||||||
|
"include/barcodes/datamatrix.php",
|
||||||
|
"include/barcodes/pdf417.php",
|
||||||
|
"include/barcodes/qrcode.php"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : tcpdf_config.php
|
||||||
|
// Begin : 2004-06-11
|
||||||
|
// Last Update : 2014-12-11
|
||||||
|
//
|
||||||
|
// Description : Configuration file for TCPDF.
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2004-2014 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration file for TCPDF.
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @version 4.9.005
|
||||||
|
* @since 2004-10-27
|
||||||
|
*/
|
||||||
|
|
||||||
|
// IMPORTANT:
|
||||||
|
// If you define the constant K_TCPDF_EXTERNAL_CONFIG, all the following settings will be ignored.
|
||||||
|
// If you use the tcpdf_autoconfig.php, then you can overwrite some values here.
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Installation path (/var/www/tcpdf/).
|
||||||
|
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
||||||
|
*/
|
||||||
|
//define ('K_PATH_MAIN', '');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
|
||||||
|
* By default it is automatically set but you can also set it as a fixed string to improve performances.
|
||||||
|
*/
|
||||||
|
//define ('K_PATH_URL', '');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Path for PDF fonts.
|
||||||
|
* By default it is automatically set but you can also set it as a fixed string to improve performances.
|
||||||
|
*/
|
||||||
|
//define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default images directory.
|
||||||
|
* By default it is automatically set but you can also set it as a fixed string to improve performances.
|
||||||
|
*/
|
||||||
|
//define ('K_PATH_IMAGES', '');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deafult image logo used be the default Header() method.
|
||||||
|
* Please set here your own logo or an empty string to disable it.
|
||||||
|
*/
|
||||||
|
//define ('PDF_HEADER_LOGO', '');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header logo image width in user units.
|
||||||
|
*/
|
||||||
|
//define ('PDF_HEADER_LOGO_WIDTH', 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache directory for temporary files (full path).
|
||||||
|
*/
|
||||||
|
//define ('K_PATH_CACHE', '/tmp/');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic name for a blank image.
|
||||||
|
*/
|
||||||
|
define ('K_BLANK_IMAGE', '_blank.png');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page format.
|
||||||
|
*/
|
||||||
|
define ('PDF_PAGE_FORMAT', 'A4');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page orientation (P=portrait, L=landscape).
|
||||||
|
*/
|
||||||
|
define ('PDF_PAGE_ORIENTATION', 'P');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Document creator.
|
||||||
|
*/
|
||||||
|
define ('PDF_CREATOR', 'TCPDF');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Document author.
|
||||||
|
*/
|
||||||
|
define ('PDF_AUTHOR', 'TCPDF');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header title.
|
||||||
|
*/
|
||||||
|
define ('PDF_HEADER_TITLE', 'TCPDF Example');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header description string.
|
||||||
|
*/
|
||||||
|
define ('PDF_HEADER_STRING', "by Nicola Asuni - Tecnick.com\nwww.tcpdf.org");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].
|
||||||
|
*/
|
||||||
|
define ('PDF_UNIT', 'mm');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Header margin.
|
||||||
|
*/
|
||||||
|
define ('PDF_MARGIN_HEADER', 5);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Footer margin.
|
||||||
|
*/
|
||||||
|
define ('PDF_MARGIN_FOOTER', 10);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Top margin.
|
||||||
|
*/
|
||||||
|
define ('PDF_MARGIN_TOP', 27);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bottom margin.
|
||||||
|
*/
|
||||||
|
define ('PDF_MARGIN_BOTTOM', 25);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Left margin.
|
||||||
|
*/
|
||||||
|
define ('PDF_MARGIN_LEFT', 15);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Right margin.
|
||||||
|
*/
|
||||||
|
define ('PDF_MARGIN_RIGHT', 15);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default main font name.
|
||||||
|
*/
|
||||||
|
define ('PDF_FONT_NAME_MAIN', 'helvetica');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default main font size.
|
||||||
|
*/
|
||||||
|
define ('PDF_FONT_SIZE_MAIN', 10);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default data font name.
|
||||||
|
*/
|
||||||
|
define ('PDF_FONT_NAME_DATA', 'helvetica');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default data font size.
|
||||||
|
*/
|
||||||
|
define ('PDF_FONT_SIZE_DATA', 8);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default monospaced font name.
|
||||||
|
*/
|
||||||
|
define ('PDF_FONT_MONOSPACED', 'courier');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ratio used to adjust the conversion of pixels to user units.
|
||||||
|
*/
|
||||||
|
define ('PDF_IMAGE_SCALE_RATIO', 1.25);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Magnification factor for titles.
|
||||||
|
*/
|
||||||
|
define('HEAD_MAGNIFICATION', 1.1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Height of cell respect font height.
|
||||||
|
*/
|
||||||
|
define('K_CELL_HEIGHT_RATIO', 1.25);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Title magnification respect main font size.
|
||||||
|
*/
|
||||||
|
define('K_TITLE_MAGNIFICATION', 1.3);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reduction factor for small font.
|
||||||
|
*/
|
||||||
|
define('K_SMALL_RATIO', 2/3);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to true to enable the special procedure used to avoid the overlappind of symbols on Thai language.
|
||||||
|
*/
|
||||||
|
define('K_THAI_TOPCHARS', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true allows to call TCPDF methods using HTML syntax
|
||||||
|
* IMPORTANT: For security reason, disable this feature if you are printing user HTML content.
|
||||||
|
*/
|
||||||
|
define('K_TCPDF_CALLS_IN_HTML', false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true and PHP version is greater than 5, then the Error() method throw new exception instead of terminating the execution.
|
||||||
|
*/
|
||||||
|
define('K_TCPDF_THROW_EXCEPTION_ERROR', false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default timezone for datetime functions
|
||||||
|
*/
|
||||||
|
define('K_TIMEZONE', 'UTC');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_1d_html.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.000
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 1D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128');
|
||||||
|
|
||||||
|
// output the barcode as HTML object
|
||||||
|
echo $barcodeobj->getBarcodeHTML(2, 30, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_1d_png.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.000
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 1D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128');
|
||||||
|
|
||||||
|
// output the barcode as PNG image
|
||||||
|
$barcodeobj->getBarcodePNG(2, 30, array(0,0,0));
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_1d_svg.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.000
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 1D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128');
|
||||||
|
|
||||||
|
// output the barcode as SVG image
|
||||||
|
$barcodeobj->getBarcodeSVG(2, 30, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_1d_svgi.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.000
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 1D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_1d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDFBarcode('http://www.tcpdf.org', 'C128');
|
||||||
|
|
||||||
|
// output the barcode as SVG inline code
|
||||||
|
echo $barcodeobj->getBarcodeSVGcode(2, 40, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_2d_html.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.009
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 2D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX');
|
||||||
|
|
||||||
|
// output the barcode as HTML object
|
||||||
|
echo $barcodeobj->getBarcodeHTML(6, 6, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_2d_png.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.009
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 2D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX');
|
||||||
|
|
||||||
|
// output the barcode as PNG image
|
||||||
|
$barcodeobj->getBarcodePNG(6, 6, array(0,0,0));
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_2d_svg.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.009
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 2D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX');
|
||||||
|
|
||||||
|
// output the barcode as SVG image
|
||||||
|
$barcodeobj->getBarcodeSVG(6, 6, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_2d_svgi.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.009
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 2D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'DATAMATRIX');
|
||||||
|
|
||||||
|
// output the barcode as SVG inline code
|
||||||
|
echo $barcodeobj->getBarcodeSVGcode(6, 6, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_2d_html.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.009
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 2D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'PDF417');
|
||||||
|
|
||||||
|
// output the barcode as HTML object
|
||||||
|
echo $barcodeobj->getBarcodeHTML(4, 4, 'black');
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
//============================================================+
|
||||||
|
// File name : example_2d_png.php
|
||||||
|
// Version : 1.0.000
|
||||||
|
// Begin : 2011-07-21
|
||||||
|
// Last Update : 2013-03-19
|
||||||
|
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
|
||||||
|
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Copyright (C) 2009-2013 Nicola Asuni - Tecnick.com LTD
|
||||||
|
//
|
||||||
|
// This file is part of TCPDF software library.
|
||||||
|
//
|
||||||
|
// TCPDF is free software: you can redistribute it and/or modify it
|
||||||
|
// under the terms of the GNU Lesser General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// TCPDF is distributed in the hope that it will be useful, but
|
||||||
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
|
// along with TCPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
// See LICENSE.TXT file for more information.
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Description : Example for tcpdf_barcodes_2d.php class
|
||||||
|
//
|
||||||
|
//============================================================+
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Example for tcpdf_barcodes_2d.php class
|
||||||
|
* @package com.tecnick.tcpdf
|
||||||
|
* @author Nicola Asuni
|
||||||
|
* @version 1.0.009
|
||||||
|
*/
|
||||||
|
|
||||||
|
// include 2D barcode class (search for installation path)
|
||||||
|
require_once(dirname(__FILE__).'/tcpdf_barcodes_2d_include.php');
|
||||||
|
|
||||||
|
// set the barcode content and type
|
||||||
|
$barcodeobj = new TCPDF2DBarcode('http://www.tcpdf.org', 'PDF417');
|
||||||
|
|
||||||
|
// output the barcode as PNG image
|
||||||
|
$barcodeobj->getBarcodePNG(4, 4, array(0,0,0));
|
||||||
|
|
||||||
|
//============================================================+
|
||||||
|
// END OF FILE
|
||||||
|
//============================================================+
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user