Merged brach redesign to master

Signed-off-by: Florian Aders (EleRas) <eleras@froxlor.org>
This commit is contained in:
Florian Aders (EleRas)
2011-02-27 13:06:31 +01:00
653 changed files with 12582 additions and 2924 deletions

1
lib/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
userdata.inc.php

View File

@@ -911,7 +911,7 @@ class ApsParser
if($Error == 1)
{
self::InfoBox($lng['aps']['nospecialchars']);
self::InfoBox($lng['aps']['nospecialchars'], 1);
}
elseif($Error == 2)
{
@@ -948,11 +948,11 @@ class ApsParser
{
if($this->db->num_rows($result) == 1)
{
self::InfoBox(sprintf($lng['aps']['searchoneresult'], $this->db->num_rows($result)));
self::InfoBox(sprintf($lng['aps']['searchoneresult'], $this->db->num_rows($result)), 2);
}
else
{
self::InfoBox(sprintf($lng['aps']['searchmultiresult'], $this->db->num_rows($result)));
self::InfoBox(sprintf($lng['aps']['searchmultiresult'], $this->db->num_rows($result)), 2);
}
while($Row = $this->db->fetch_array($result))
@@ -996,7 +996,7 @@ class ApsParser
//skip if parse of xml has failed
if($Xml == false)continue;
$Icon = './images/default.png';
$Icon = './images/Classic/default.png';
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
@@ -1162,7 +1162,7 @@ class ApsParser
if($this->db->num_rows($result) == 0)
{
self::InfoBox($lng['aps']['erroronnewinstance']);
self::InfoBox($lng['aps']['erroronnewinstance'], 1);
return false;
}
@@ -1194,7 +1194,7 @@ class ApsParser
//update used counter for packages
$this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` + 1 WHERE `customerid` = ' . (int)$CustomerId);
self::InfoBox(sprintf($lng['aps']['successonnewinstance'], $Xml->name));
self::InfoBox(sprintf($lng['aps']['successonnewinstance'], $Xml->name), 2);
unset($Xml);
}
@@ -1735,7 +1735,7 @@ class ApsParser
$Output.= '<li>' . $Entry . '</li>';
}
self::InfoBox(sprintf($lng['aps']['erroronscan'], $Xml->name, $Output));
self::InfoBox(sprintf($lng['aps']['erroronscan'], $Xml->name, $Output), 1);
return false;
}
else
@@ -1819,11 +1819,11 @@ class ApsParser
if($Newer == 1)
{
self::InfoBox(sprintf($lng['aps']['successpackageupdate'], $Xml->name));
self::InfoBox(sprintf($lng['aps']['successpackageupdate'], $Xml->name), 2);
}
else
{
self::InfoBox(sprintf($lng['aps']['successpackageinstall'], $Xml->name));
self::InfoBox(sprintf($lng['aps']['successpackageinstall'], $Xml->name), 2);
}
unset($Xml);
@@ -1870,11 +1870,11 @@ class ApsParser
if(!isset($this->userinfo['customerid']))
{
self::InfoBox(sprintf($lng['aps']['initerror'], $Error));
self::InfoBox(sprintf($lng['aps']['initerror'], $Error), 1);
}
else
{
self::InfoBox($lng['aps']['initerror_customer']);
self::InfoBox($lng['aps']['initerror_customer'], 1);
}
return;
@@ -2139,11 +2139,11 @@ class ApsParser
{
if($i == $_GET['page'])
{
echo ('<span class="pageitem">' . $i . '</span>');
echo ('<span class="pageitem">' . $i . '</span>&nbsp;');
}
else
{
echo ('<span class="pageitem"><a href="' . $filename . '?s=' . $s . '&amp;action=overview&amp;page=' . $i . '">' . $i . '</a></span>');
echo ('<span class="pageitem"><a href="' . $filename . '?s=' . $s . '&amp;action=overview&amp;page=' . $i . '">' . $i . '</a></span>&nbsp;');
}
}
@@ -2177,7 +2177,7 @@ class ApsParser
echo ('<div style="width: 90%; text-align: center;"><br/>');
for ($i = 1;$i < $Pages + 1;$i++)
{
echo ('<span class="pageitem"><a href="' . $filename . '?s=' . $s . '&amp;action=overview&amp;page=' . $i . '">' . $i . '</a></span>');
echo ('<span class="pageitem"><a href="' . $filename . '?s=' . $s . '&amp;action=overview&amp;page=' . $i . '">' . $i . '</a></span>&nbsp;');
}
echo ('</div>');
@@ -2935,7 +2935,7 @@ class ApsParser
//icon for package
$Icon = './images/default.png';
$Icon = './images/Classic/default.png';
if($this->aps_version != '1.0')
{
@@ -3342,7 +3342,7 @@ class ApsParser
//return if parse of xml file has failed
if($Xml == false)return false;
$Icon = './images/default.png';
$Icon = './images/Classic/default.png';
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
@@ -3551,15 +3551,14 @@ class ApsParser
/**
* show a nice looking infobox
*
* @param message message to display in beautifull layout
* @param string $Message message to display in beautifull layout
* @param int $Type 0 = warning, 1 = errror, 2 = success
*
*/
private function InfoBox($Message)
private function InfoBox($Message, $Type = 0)
{
global $lng, $filename, $s, $page, $action;
//shows a box with informations
eval("echo \"" . getTemplate("aps/infobox") . "\";");
}
@@ -3574,5 +3573,3 @@ class ApsParser
return '<div class="fielderror">' . $Error . '</div>';
}
}
?>

View File

@@ -150,6 +150,11 @@ class db
return @mysql_close($this->link_id);
}
function getDbName()
{
return $this->database;
}
/**
* Escapes user input to be used in mysql queries
*

View File

@@ -0,0 +1,246 @@
<?php
/**
* Class Minify_HTML
* @package Minify
*/
/**
* Compress HTML
*
* This is a heavy regex-based removal of whitespace, unnecessary comments and
* tokens. IE conditional comments are preserved. There are also options to have
* STYLE and SCRIPT blocks compressed by callback functions.
*
* A test suite is available.
*
* @package Minify
* @author Stephen Clay <steve@mrclay.org>
*/
class Minify_HTML {
/**
* "Minify" an HTML page
*
* @param string $html
*
* @param array $options
*
* 'cssMinifier' : (optional) callback function to process content of STYLE
* elements.
*
* 'jsMinifier' : (optional) callback function to process content of SCRIPT
* elements. Note: the type attribute is ignored.
*
* 'xhtml' : (optional boolean) should content be treated as XHTML1.0? If
* unset, minify will sniff for an XHTML doctype.
*
* @return string
*/
public static function minify($html, $options = array()) {
$min = new Minify_HTML($html, $options);
return $min->process();
}
/**
* Create a minifier object
*
* @param string $html
*
* @param array $options
*
* 'cssMinifier' : (optional) callback function to process content of STYLE
* elements.
*
* 'jsMinifier' : (optional) callback function to process content of SCRIPT
* elements. Note: the type attribute is ignored.
*
* 'xhtml' : (optional boolean) should content be treated as XHTML1.0? If
* unset, minify will sniff for an XHTML doctype.
*
* @return null
*/
public function __construct($html, $options = array())
{
$this->_html = str_replace("\r\n", "\n", trim($html));
if (isset($options['xhtml'])) {
$this->_isXhtml = (bool)$options['xhtml'];
}
if (isset($options['cssMinifier'])) {
$this->_cssMinifier = $options['cssMinifier'];
}
if (isset($options['jsMinifier'])) {
$this->_jsMinifier = $options['jsMinifier'];
}
}
/**
* Minify the markeup given in the constructor
*
* @return string
*/
public function process()
{
if ($this->_isXhtml === null) {
$this->_isXhtml = (false !== strpos($this->_html, '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML'));
}
$this->_replacementHash = 'MINIFYHTML' . md5($_SERVER['REQUEST_TIME']);
$this->_placeholders = array();
// replace SCRIPTs (and minify) with placeholders
$this->_html = preg_replace_callback(
'/(\\s*)(<script\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/i'
,array($this, '_removeScriptCB')
,$this->_html);
// replace STYLEs (and minify) with placeholders
$this->_html = preg_replace_callback(
'/\\s*(<style\\b[^>]*?>)([\\s\\S]*?)<\\/style>\\s*/i'
,array($this, '_removeStyleCB')
,$this->_html);
// remove HTML comments (not containing IE conditional comments).
$this->_html = preg_replace_callback(
'/<!--([\\s\\S]*?)-->/'
,array($this, '_commentCB')
,$this->_html);
// replace PREs with placeholders
$this->_html = preg_replace_callback('/\\s*(<pre\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/i'
,array($this, '_removePreCB')
,$this->_html);
// replace TEXTAREAs with placeholders
$this->_html = preg_replace_callback(
'/\\s*(<textarea\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
,array($this, '_removeTextareaCB')
,$this->_html);
// trim each line.
// @todo take into account attribute values that span multiple lines.
$this->_html = preg_replace('/^\\s+|\\s+$/m', '', $this->_html);
// remove ws around block/undisplayed elements
$this->_html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body'
.'|caption|center|cite|col(?:group)?|dd|dir|div|dl|dt|fieldset|form'
.'|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
.'|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
.'|ul)\\b[^>]*>)/i', '$1', $this->_html);
// remove ws outside of all elements
$this->_html = preg_replace_callback(
'/>([^<]+)</'
,array($this, '_outsideTagCB')
,$this->_html);
// use newlines before 1st attribute in open tags (to limit line lengths)
$this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html);
// fill placeholders
$this->_html = str_replace(
array_keys($this->_placeholders)
,array_values($this->_placeholders)
,$this->_html
);
return $this->_html;
}
protected function _commentCB($m)
{
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<!['))
? $m[0]
: '';
}
protected function _reservePlace($content)
{
$placeholder = '%' . $this->_replacementHash . count($this->_placeholders) . '%';
$this->_placeholders[$placeholder] = $content;
return $placeholder;
}
protected $_isXhtml = null;
protected $_replacementHash = null;
protected $_placeholders = array();
protected $_cssMinifier = null;
protected $_jsMinifier = null;
protected function _outsideTagCB($m)
{
return '>' . preg_replace('/^\\s+|\\s+$/', ' ', $m[1]) . '<';
}
protected function _removePreCB($m)
{
return $this->_reservePlace($m[1]);
}
protected function _removeTextareaCB($m)
{
return $this->_reservePlace($m[1]);
}
protected function _removeStyleCB($m)
{
$openStyle = $m[1];
$css = $m[2];
// remove HTML comments
$css = preg_replace('/(?:^\\s*<!--|-->\\s*$)/', '', $css);
// remove CDATA section markers
$css = $this->_removeCdata($css);
// minify
$minifier = $this->_cssMinifier
? $this->_cssMinifier
: 'trim';
$css = call_user_func($minifier, $css);
return $this->_reservePlace($this->_needsCdata($css)
? "{$openStyle}/*<![CDATA[*/{$css}/*]]>*/</style>"
: "{$openStyle}{$css}</style>"
);
}
protected function _removeScriptCB($m)
{
$openScript = $m[2];
$js = $m[3];
// whitespace surrounding? preserve at least one space
$ws1 = ($m[1] === '') ? '' : ' ';
$ws2 = ($m[4] === '') ? '' : ' ';
// remove HTML comments (and ending "//" if present)
$js = preg_replace('/(?:^\\s*<!--\\s*|\\s*(?:\\/\\/)?\\s*-->\\s*$)/', '', $js);
// remove CDATA section markers
$js = $this->_removeCdata($js);
// minify
$minifier = $this->_jsMinifier
? $this->_jsMinifier
: 'trim';
$js = call_user_func($minifier, $js);
return $this->_reservePlace($this->_needsCdata($js)
? "{$ws1}{$openScript}/*<![CDATA[*/{$js}/*]]>*/</script>{$ws2}"
: "{$ws1}{$openScript}{$js}</script>{$ws2}"
);
}
protected function _removeCdata($str)
{
return (false !== strpos($str, '<![CDATA['))
? str_replace(array('<![CDATA[', ']]>'), '', $str)
: $str;
}
protected function _needsCdata($str)
{
return ($this->_isXhtml && preg_match('/(?:[<&]|\\-\\-|\\]\\]>)/', $str));
}
}

View File

@@ -0,0 +1,188 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Classes
* @version $Id: class.htmlform.php 130 2010-12-22 00:54:11Z d00p $
*/
class htmlform
{
/**
* internal tmp-variable to store form
* @var string
*/
private static $_form = '';
private static $_filename = '';
public static function genHTMLForm($data = array())
{
global $lng;
self::$_form = '';
foreach($data as $fdata)
{
$sections = $fdata['sections'];
foreach($sections as $section)
{
/*
* here be section title & image
*/
$title = $section['title'];
$image = $section['image'];
if(isset($section['visible']) && $section['visible'] === false)
{
continue;
}
eval("self::\$_form .= \"" . getTemplate("misc/form/table_section", "1") . "\";");
$nexto = false;
foreach($section['fields'] as $fieldname => $fielddata)
{
if(isset($fielddata['visible']) && $fielddata['visible'] === false)
{
continue;
}
if ($nexto === false || (isset($fielddata['next_to']) && $nexto['field'] != $fielddata['next_to'])) {
$label = $fielddata['label'];
$desc = (isset($fielddata['desc']) ? $fielddata['desc'] : '');
$style = (isset($fielddata['style']) ? ' style="'.$fielddata['style'].'"' : '');
$mandatory = self::_getMandatoryFlag($fielddata);
$data_field = self::_parseDataField($fieldname, $fielddata);
$data_field = str_replace("\n", "", $data_field);
$data_field = str_replace("\t", "", $data_field);
if (isset($fielddata['has_nextto'])) {
$nexto = array('field' => $fieldname);
$data_field.='{NEXTTOFIELD_'.$fieldname.'}';
} else {
$nexto = false;
}
eval("self::\$_form .= \"" . getTemplate("misc/form/table_row", "1") . "\";");
} else {
$data_field = self::_parseDataField($fieldname, $fielddata);
$data_field = str_replace("\n", "", $data_field);
$data_field = str_replace("\t", "", $data_field);
$data_field = $fielddata['next_to_prefix'].$data_field;
self::$_form = str_replace(
'{NEXTTOFIELD_'.$fielddata['next_to'].'}',
$data_field,
self::$_form
);
$nexto = false;
}
}
}
}
return self::$_form;
}
private static function _parseDataField($fieldname, $data = array())
{
switch($data['type'])
{
case 'text':
return self::_textBox($fieldname, $data); break;
case 'textul':
return self::_textBox($fieldname, $data, 'text', true); break;
case 'password':
return self::_textBox($fieldname, $data, 'password'); break;
case 'hidden':
return self::_textBox($fieldname, $data, 'hidden'); break;
case 'yesno':
return self::_yesnoBox($data); break;
case 'select':
return self::_selectBox($fieldname, $data); break;
case 'label':
return self::_labelField($data); break;
case 'textarea':
return self::_textArea($fieldname, $data); break;
}
}
private static function _getMandatoryFlag($data = array())
{
if(isset($data['mandatory']))
{
return '&nbsp;<span style="color:#ff0000;">*</span>';
}
elseif(isset($data['mandatory_ex']))
{
return '&nbsp;<span style="color:#ff0000;">**</span>';
}
return '';
}
private static function _textBox($fieldname = '', $data = array(), $type = 'text', $unlimited = false)
{
$return = '';
$extras = '';
if(isset($data['maxlength'])) {
$extras .= ' maxlength="'.$data['maxlength'].'"';
}
if(isset($data['size'])) {
$extras .= ' size="'.$data['size'].'"';
}
$value = isset($data['value']) ? $data['value'] : '';
$ulfield = ($unlimited == true ? '&nbsp;'.$data['ul_field'] : '');
if(isset($data['display']) && $data['display'] != '')
{
$ulfield = '<strong>'.$data['display'].'</strong>';
}
eval("\$return = \"" . getTemplate("misc/form/input_text", "1") . "\";");
return $return;
}
private static function _textArea($fieldname = '', $data = array())
{
$return = '';
$extras = '';
if(isset($data['cols'])) {
$extras .= ' cols="'.$data['cols'].'"';
}
if(isset($data['rows'])) {
$extras .= ' rows="'.$data['rows'].'"';
}
$value = isset($data['value']) ? $data['value'] : '';
eval("\$return = \"" . getTemplate("misc/form/input_textarea", "1") . "\";");
return $return;
}
private static function _yesnoBox($data = array())
{
return $data['yesno_var'];
}
private static function _labelField($data = array())
{
return $data['value'];
}
private static function _selectBox($fieldname = '', $data = array())
{
return '<select
id="'.$fieldname.'"
name="'.$fieldname.'"
'.(isset($data['class']) ? ' class="'.$data['class'] .'" ' : '').'
>'
.$data['select_var'].
'</select>';
}
}

View File

@@ -392,19 +392,22 @@ class paging
function getHtmlSortCode($lng, $break = false)
{
$sortcode = '<select class="dropdown_noborder" name="sortfield">';
$sortcode = '';
$fieldoptions = '';
$orderoptions = '';
foreach($this->fields as $fieldname => $fieldcaption)
{
$sortcode.= makeoption($fieldcaption, $fieldname, $this->sortfield, true, true);
$fieldoptions.= makeoption($fieldcaption, $fieldname, $this->sortfield, true, true);
}
$sortcode.= '</select>' . ($break ? '<br />' : '&nbsp;') . '<select class="dropdown_noborder" name="sortorder">';
$breakorws = ($break ? '<br />' : '&nbsp;');
foreach(array('asc' => $lng['panel']['ascending'], 'desc' => $lng['panel']['decending']) as $sortordertype => $sortorderdescription)
{
$sortcode.= makeoption($sortorderdescription, $sortordertype, $this->sortorder, true, true);
$orderoptions.= makeoption($sortorderdescription, $sortordertype, $this->sortorder, true, true);
}
$sortcode.= '</select>&nbsp;<input type="submit" name="Go" value="Go" />';
eval("\$sortcode =\"" . getTemplate("misc/htmlsortcode", '1') . "\";");
return $sortcode;
}
@@ -421,14 +424,18 @@ class paging
if($field != ''
&& isset($this->fields[$field]))
{
$arrowcode = '<a href="' . htmlspecialchars($baseurl) . '&amp;sortfield=' . htmlspecialchars($field) . '&amp;sortorder=desc"><img src="images/order_desc.gif" border="0" alt="" /></a><a href="' . htmlspecialchars($baseurl) . '&amp;sortfield=' . htmlspecialchars($field) . '&amp;sortorder=asc"><img src="images/order_asc.gif" border="0" alt="" /></a>';
$baseurl = htmlspecialchars($baseurl);
$fieldname = htmlspecialchars($field);
eval("\$arrowcode =\"" . getTemplate("misc/htmlarrowcode", '1') . "\";");
}
else
{
$baseurl = htmlspecialchars($baseurl);
$arrowcode = array();
foreach($this->fields as $fieldname => $fieldcaption)
{
$arrowcode[$fieldname] = '<a href="' . htmlspecialchars($baseurl) . '&amp;sortfield=' . htmlspecialchars($fieldname) . '&amp;sortorder=desc"><img src="images/order_desc.gif" border="0" alt="" /></a><a href="' . htmlspecialchars($baseurl) . '&amp;sortfield=' . htmlspecialchars($fieldname) . '&amp;sortorder=asc"><img src="images/order_asc.gif" border="0" alt="" /></a>';
$fieldname = htmlspecialchars($fieldname);
eval("\$arrowcode[\$fieldname] =\"" . getTemplate("misc/htmlarrowcode", '1') . "\";");
}
}
@@ -444,14 +451,15 @@ class paging
function getHtmlSearchCode($lng)
{
$sortcode = $lng['panel']['search'] . ': <select class="dropdown_noborder" name="searchfield">';
$searchcode = '';
$fieldoptions = '';
$searchtext = htmlspecialchars($this->searchtext);
foreach($this->fields as $fieldname => $fieldcaption)
{
$sortcode.= makeoption($fieldcaption, $fieldname, $this->searchfield, true, true);
$fieldoptions.= makeoption($fieldcaption, $fieldname, $this->searchfield, true, true);
}
$sortcode.= '</select>&nbsp;<input type="text" name="searchtext" value="' . htmlspecialchars($this->searchtext) . '" />&nbsp;<input type="submit" name="Go" value="Go" />';
return $sortcode;
eval("\$searchcode =\"" . getTemplate("misc/htmlsearchcode", '1') . "\";");
return $searchcode;
}
/**
@@ -493,16 +501,16 @@ class paging
$stop = $pages;
}
$pagingcode = '<a href="' . htmlspecialchars($baseurl) . '&amp;pageno=1">&laquo;</a> <a href="' . htmlspecialchars($baseurl) . '&amp;pageno=' . ((intval($this->pageno) - 1) == 0 ? '1' : intval($this->pageno) - 1) . '">&lt;</a> ';
$pagingcode = '<a href="' . htmlspecialchars($baseurl) . '&amp;pageno=1">&laquo;</a> <a href="' . htmlspecialchars($baseurl) . '&amp;pageno=' . ((intval($this->pageno) - 1) == 0 ? '1' : intval($this->pageno) - 1) . '">&lt;</a>&nbsp;';
for ($i = $start;$i <= $stop;$i++)
{
if($i != $this->pageno)
{
$pagingcode.= ' <a href="' . htmlspecialchars($baseurl) . '&amp;pageno=' . $i . '">' . $i . '</a> ';
$pagingcode.= ' <a href="' . htmlspecialchars($baseurl) . '&amp;pageno=' . $i . '">' . $i . '</a>&nbsp;';
}
else
{
$pagingcode.= ' <b>' . $i . '</b> ';
$pagingcode.= ' <strong>' . $i . '</strong>&nbsp;';
}
}

View File

@@ -0,0 +1,211 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.admin_add.php 104 2010-12-08 07:23:22Z d00p $
*/
return array(
'admin_add' => array(
'title' => $lng['admin']['admin_add'],
'image' => 'icons/user_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'text',
'mandatory' => true
),
'admin_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
'mandatory' => true
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory' => true
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'type' => 'select',
'select_var' => $ipaddress
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
'type' => 'yesno',
'yesno_var' => $change_serversettings,
),
'customers' => array(
'label' => $lng['admin']['customers'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $customers_ul
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
'type' => 'yesno',
'yesno_var' => $customers_see_all,
),
'domains' => array(
'label' => $lng['admin']['domains'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $domains_ul
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
'type' => 'yesno',
'yesno_var' => $domains_see_all,
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
'type' => 'yesno',
'yesno_var' => $caneditphpsettings,
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => 0,
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => 0,
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['system']['mail_quota_enabled'],
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'email_autoresponder' => array(
'label' => $lng['customer']['autoresponder'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['autoresponder']['autoresponder_active'],
'ul_field' => $email_autoresponder_ul
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['ticket']['enabled'],
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
),
'can_manage_aps_packages' => array(
'label' => $lng['aps']['canmanagepackages'],
'type' => 'yesno',
'yesno_var' => $can_manage_aps_packages,
'visible' => $settings['aps']['aps_active']
),
'number_of_aps_packages' => array(
'label' => $lng['aps']['numberofapspackages'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['aps']['aps_active'],
'ul_field' => $number_of_aps_packages_ul
)
)
)
)
)
);

View File

@@ -0,0 +1,221 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.admin_edit.php 104 2010-12-08 07:23:22Z d00p $
*/
return array(
'admin_edit' => array(
'title' => $lng['admin']['admin_edit'],
'image' => 'icons/user_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'label',
'value' => $result['loginname']
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
'type' => 'yesno',
'yesno_var' => $deactivated,
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
),
'admin_password' => array(
'label' => $lng['login']['password'].'&nbsp;('.$lng['panel']['emptyfornochanges'].')',
'type' => 'password',
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options,
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory' => true,
'value' => $result['name']
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true,
'value' => $result['email']
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'visible' => ($result['adminid'] != $userinfo['userid'] ? true : false),
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
'type' => 'select',
'select_var' => $ipaddress
),
'change_serversettings' => array(
'label' => $lng['admin']['change_serversettings'],
'type' => 'yesno',
'yesno_var' => $change_serversettings,
),
'customers' => array(
'label' => $lng['admin']['customers'],
'type' => 'textul',
'value' => $result['customers'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $customers_ul
),
'customers_see_all' => array(
'label' => $lng['admin']['customers_see_all'],
'type' => 'yesno',
'yesno_var' => $customers_see_all,
),
'domains' => array(
'label' => $lng['admin']['domains'],
'type' => 'textul',
'value' => $result['domains'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $domains_ul
),
'domains_see_all' => array(
'label' => $lng['admin']['domains_see_all'],
'type' => 'yesno',
'yesno_var' => $domains_see_all,
),
'caneditphpsettings' => array(
'label' => $lng['admin']['caneditphpsettings'],
'type' => 'yesno',
'yesno_var' => $caneditphpsettings,
),
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => $result['diskspace'],
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => $result['traffic'],
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => $result['subdomains'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => $result['emails'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => $result['email_accounts'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => $result['email_forwarders'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => $settings['system']['mail_quota_enabled'],
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'email_autoresponder' => array(
'label' => $lng['customer']['autoresponder'],
'type' => 'textul',
'value' => $result['email_autoresponder'],
'maxlength' => 9,
'visible' => $settings['autoresponder']['autoresponder_active'],
'ul_field' => $email_autoresponder_ul
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => $result['ftps'],
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => $result['tickets'],
'maxlength' => 9,
'visible' => $settings['ticket']['enabled'],
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => $result['mysqls'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
),
'can_manage_aps_packages' => array(
'label' => $lng['aps']['canmanagepackages'],
'type' => 'yesno',
'yesno_var' => $can_manage_aps_packages,
'visible' => $settings['aps']['aps_active']
),
'number_of_aps_packages' => array(
'label' => $lng['aps']['numberofapspackages'],
'type' => 'textul',
'value' => $result['aps_packages'],
'maxlength' => 9,
'visible' => $settings['aps']['aps_active'],
'ul_field' => $number_of_aps_packages_ul
)
)
)
)
)
);

View File

@@ -0,0 +1,51 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.cronjobs_edit.php 105 2010-12-09 08:02:33Z d00p $
*/
return array(
'cronjobs_edit' => array(
'title' => $lng['admin']['cronjob_edit'],
'image' => 'icons/clock_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['cronjob']['cronjobsettings'],
'image' => 'icons/clock_edit.png',
'fields' => array(
'cronfile' => array(
'label' => 'Cronjob',
'type' => ($change_cronfile == 1 ? 'text' : 'label'),
'value' => $result['cronfile']
),
'isactive' => array(
'label' => $lng['admin']['activated'],
'type' => 'yesno',
'yesno_var' => $isactive
),
'interval_value' => array(
'label' => $lng['cronjob']['cronjobintervalv'],
'type' => 'text',
'value' => $interval_value
),
'interval_interval' => array(
'label' => $lng['cronjob']['cronjobinterval'],
'type' => 'select',
'select_var' => $interval_interval
)
)
)
)
)
);

View File

@@ -0,0 +1,233 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.customer_add.php 96 2010-12-07 11:53:52Z d00p $
*/
return array(
'customer_add' => array(
'title' => $lng['admin']['customer_add'],
'image' => 'icons/user_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'new_loginname' => array(
'label' => $lng['login']['username'],
'type' => 'text'
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'].'?',
'type' => 'yesno',
'yesno_var' => $createstdsubdomain
),
'store_defaultindex' => array(
'label' => $lng['admin']['store_defaultindex'].'?',
'type' => 'yesno',
'yesno_var' => $store_defaultindex
),
'new_customer_password' => array(
'label' => $lng['login']['password'],
'type' => 'password'
),
'sendpassword' => array(
'label' => $lng['admin']['sendpassword'],
'type' => 'yesno',
'yesno_var' => $sendpassword
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_add.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory_ex' => true
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
'type' => 'text',
'mandatory_ex' => true
),
'company' => array(
'label' => $lng['customer']['company'],
'type' => 'text',
'mandatory_ex' => true
),
'street' => array(
'label' => $lng['customer']['street'],
'type' => 'text'
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'],
'type' => 'text'
),
'city' => array(
'label' => $lng['customer']['city'],
'type' => 'text'
),
'phone' => array(
'label' => $lng['customer']['phone'],
'type' => 'text'
),
'fax' => array(
'label' => $lng['customer']['fax'],
'type' => 'text'
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
'type' => 'text'
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => 0,
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => 0,
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['system']['mail_quota_enabled'],
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'email_autoresponder' => array(
'label' => $lng['customer']['autoresponder'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['autoresponder']['autoresponder_active'],
'ul_field' => $email_autoresponder_ul
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
'type' => 'yesno',
'yesno_var' => $email_imap,
'mandatory' => true
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
'type' => 'yesno',
'yesno_var' => $email_pop3,
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['ticket']['enabled'],
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'].'?',
'type' => 'yesno',
'yesno_var' => $phpenabled
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'].'?',
'type' => 'yesno',
'yesno_var' => $perlenabled
),
'number_of_aps_packages' => array(
'label' => $lng['aps']['numberofapspackages'],
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => $settings['aps']['aps_active'],
'ul_field' => $number_of_aps_packages_ul
)
)
)
)
)
);

View File

@@ -0,0 +1,244 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.customer_edit.php 100 2010-12-07 12:20:17Z d00p $
*/
return array(
'customer_edit' => array(
'title' => $lng['admin']['customer_edit'],
'image' => 'icons/user_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['accountdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'loginname' => array(
'label' => $lng['login']['username'],
'type' => 'label',
'value' => $result['loginname']
),
'documentroot' => array(
'label' => $lng['customer']['documentroot'],
'type' => 'label',
'value' => $result['documentroot']
),
'createstdsubdomain' => array(
'label' => $lng['admin']['stdsubdomain_add'].'?',
'type' => 'yesno',
'yesno_var' => $createstdsubdomain
),
'deactivated' => array(
'label' => $lng['admin']['deactivated_user'],
'type' => 'yesno',
'yesno_var' => $deactivated
),
'new_customer_password' => array(
'label' => $lng['login']['password'].'&nbsp;('.$lng['panel']['emptyfornochanges'].')',
'type' => 'password'
),
'def_language' => array(
'label' => $lng['login']['language'],
'type' => 'select',
'select_var' => $language_options
)
)
),
'section_b' => array(
'title' => $lng['admin']['contactdata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'name' => array(
'label' => $lng['customer']['name'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['name']
),
'firstname' => array(
'label' => $lng['customer']['firstname'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['firstname']
),
'company' => array(
'label' => $lng['customer']['company'],
'type' => 'text',
'mandatory_ex' => true,
'value' => $result['company']
),
'street' => array(
'label' => $lng['customer']['street'],
'type' => 'text',
'value' => $result['street']
),
'zipcode' => array(
'label' => $lng['customer']['zipcode'],
'type' => 'text',
'value' => $result['zipcode']
),
'city' => array(
'label' => $lng['customer']['city'],
'type' => 'text',
'value' => $result['city']
),
'phone' => array(
'label' => $lng['customer']['phone'],
'type' => 'text',
'value' => $result['phone']
),
'fax' => array(
'label' => $lng['customer']['fax'],
'type' => 'text',
'value' => $result['fax']
),
'email' => array(
'label' => $lng['customer']['email'],
'type' => 'text',
'mandatory' => true,
'value' => $result['email']
),
'customernumber' => array(
'label' => $lng['customer']['customernumber'],
'type' => 'text',
'value' => $result['customernumber']
)
)
),
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_edit.png',
'fields' => array(
'diskspace' => array(
'label' => $lng['customer']['diskspace'],
'type' => 'textul',
'value' => $result['diskspace'],
'maxlength' => 6,
'mandatory' => true,
'ul_field' => $diskspace_ul
),
'traffic' => array(
'label' => $lng['customer']['traffic'],
'type' => 'textul',
'value' => $result['traffic'],
'maxlength' => 4,
'mandatory' => true,
'ul_field' => $traffic_ul
),
'subdomains' => array(
'label' => $lng['customer']['subdomains'],
'type' => 'textul',
'value' => $result['subdomains'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $subdomains_ul
),
'emails' => array(
'label' => $lng['customer']['emails'],
'type' => 'textul',
'value' => $result['emails'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $emails_ul
),
'email_accounts' => array(
'label' => $lng['customer']['accounts'],
'type' => 'textul',
'value' => $result['email_accounts'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_accounts_ul
),
'email_forwarders' => array(
'label' => $lng['customer']['forwarders'],
'type' => 'textul',
'value' => $result['email_forwarders'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $email_forwarders_ul
),
'email_quota' => array(
'label' => $lng['customer']['email_quota'],
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => $settings['system']['mail_quota_enabled'],
'mandatory' => true,
'ul_field' => $email_quota_ul
),
'email_autoresponder' => array(
'label' => $lng['customer']['autoresponder'],
'type' => 'textul',
'value' => $result['email_autoresponder'],
'maxlength' => 9,
'visible' => $settings['autoresponder']['autoresponder_active'],
'ul_field' => $email_autoresponder_ul
),
'email_imap' => array(
'label' => $lng['customer']['email_imap'],
'type' => 'yesno',
'yesno_var' => $email_imap,
'mandatory' => true
),
'email_pop3' => array(
'label' => $lng['customer']['email_pop3'],
'type' => 'yesno',
'yesno_var' => $email_pop3,
'mandatory' => true
),
'ftps' => array(
'label' => $lng['customer']['ftps'],
'type' => 'textul',
'value' => $result['ftps'],
'maxlength' => 9,
'ul_field' => $ftps_ul
),
'tickets' => array(
'label' => $lng['customer']['tickets'],
'type' => 'textul',
'value' => $result['tickets'],
'maxlength' => 9,
'visible' => $settings['ticket']['enabled'],
'ul_field' => $tickets_ul
),
'mysqls' => array(
'label' => $lng['customer']['mysqls'],
'type' => 'textul',
'value' => $result['mysqls'],
'maxlength' => 9,
'mandatory' => true,
'ul_field' => $mysqls_ul
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'].'?',
'type' => 'yesno',
'yesno_var' => $phpenabled
),
'perlenabled' => array(
'label' => $lng['admin']['perlenabled'].'?',
'type' => 'yesno',
'yesno_var' => $perlenabled
),
'number_of_aps_packages' => array(
'label' => $lng['aps']['numberofapspackages'],
'type' => 'textul',
'value' => $result['aps_packages'],
'maxlength' => 9,
'visible' => $settings['aps']['aps_active'],
'ul_field' => $number_of_aps_packages_ul
)
)
)
)
)
);

View File

@@ -0,0 +1,211 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'domain_add' => array(
'title' => $lng['admin']['domain_add'],
'image' => 'icons/domain_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['domainsettings'],
'image' => 'icons/domain_add.png',
'fields' => array(
'domain' => array(
'label' => 'Domain',
'type' => 'text'
),
'customerid' => array(
'label' => $lng['admin']['customer'],
'type' => 'select',
'select_var' => $customers
),
'adminid' => array(
'visible' => ($userinfo['customers_see_all'] == '1' ? true : false),
'label' => $lng['admin']['admin'],
'type' => 'select',
'select_var' => $admins
),
'alias' => array(
'label' => $lng['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $domains
),
'issubof' => array(
'label' => $lng['domains']['issubof'],
'desc' => $lng['domains']['issubofinfo'],
'type' => 'select',
'select_var' => $subtodomains
),
'caneditdomain' => array(
'label' => $lng['admin']['domain_edit'],
'type' => 'yesno',
'yesno_var' => $caneditdomain
),
'add_date' => array(
'label' => $lng['domains']['add_date'],
'desc' => $lng['panel']['dateformat'],
'type' => 'label',
'value' => $add_date
),
'registration_date' => array(
'label' => $lng['domains']['registration_date'],
'desc' => $lng['panel']['dateformat'],
'type' => 'text',
'size' => 10
)
)
),
'section_b' => array(
'title' => $lng['admin']['webserversettings'],
'image' => 'icons/domain_add.png',
'fields' => array(
'documentroot' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'type' => 'text'
),
'ipandport' => array(
'label' => 'IP/Port',
'type' => 'select',
'select_var' => $ipsandports,
),
'ssl' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => 'SSL',
'type' => 'yesno',
'yesno_var' => $ssl
),
'ssl_redirect' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => 'SSL Redirect',
'type' => 'yesno',
'yesno_var' => $ssl_redirect
),
'ssl_ipandport' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => 'SSL IP/Port',
'type' => 'select',
'select_var' => $ssl_ipsandports
),
'no_ssl_available_info' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports == '' ? true : false) : false),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
),
'wwwserveralias' => array(
'label' => $lng['admin']['wwwserveralias'],
'type' => 'yesno',
'yesno_var' => $wwwserveralias
),
'speciallogfile' => array(
'label' => 'Speciallogfile',
'type' => 'yesno',
'yesno_var' => $speciallogfile
),
'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'vertical-align:top;',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
),
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
'image' => 'icons/domain_add.png',
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
'fields' => array(
'openbasedir' => array(
'label' => 'OpenBasedir',
'type' => 'yesno',
'yesno_var' => $openbasedir
),
'safemode' => array(
'label' => 'Safemode',
'type' => 'yesno',
'yesno_var' => $safemode
),
'phpsettingid' => array(
'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs
),
'mod_fcgid_starter' => array(
'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text'
),
'mod_fcgid_maxrequests' => array(
'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text'
)
)
),
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_add.png',
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'fields' => array(
'isbinddomain' => array(
'label' => 'Nameserver',
'type' => 'yesno',
'yesno_var' => $isbinddomain
),
'zonefile' => array(
'label' => 'Zonefile',
'desc' => $lng['panel']['emptyfordefault'],
'type' => 'text'
)
)
),
'section_e' => array(
'title' => $lng['admin']['mailserversettings'],
'image' => 'icons/domain_add.png',
'fields' => array(
'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'],
'type' => 'yesno',
'yesno_var' => $isemaildomain
),
'email_only' => array(
'label' => $lng['admin']['email_only'],
'type' => 'yesno',
'yesno_var' => $email_only
),
'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'],
'type' => 'select',
'select_var' => $subcanemaildomain
),
'dkim' => array(
'visible' => ($settings['dkim']['use_dkim'] == '1' ? true : false),
'label' => 'DomainKeys',
'type' => 'yesno',
'yesno_var' => $dkim
)
)
)
)
)
);

View File

@@ -0,0 +1,233 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_edit.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'domain_edit' => array(
'title' => $lng['admin']['domain_edit'],
'image' => 'icons/domain_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['domainsettings'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'domain' => array(
'label' => 'Domain',
'type' => 'label',
'value' => $result['domain']
),
'customerid' => array(
'label' => $lng['admin']['customer'],
'type' => ($settings['panel']['allow_domain_change_customer'] == '1' ? 'select' : 'label'),
'select_var' => (isset($customers) ? $customers : null),
'value' => (isset($result['customername']) ? $result['customername'] : null)
),
'adminid' => array(
'visible' => ($userinfo['customers_see_all'] == '1' ? true : false),
'label' => $lng['admin']['admin'],
'type' => ($settings['panel']['allow_domain_change_admin'] == '1' ? 'select' : 'label'),
'select_var' => (isset($admins) ? $admins : null),
'value' => (isset($result['adminname']) ? $result['adminname'] : null)
),
'alias' => array(
'visible' => ($alias_check == '0' ? true : false),
'label' => $lng['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $domains
),
'issubof' => array(
'label' => $lng['domains']['issubof'],
'desc' => $lng['domains']['issubofinfo'],
'type' => 'select',
'select_var' => $subtodomains
),
'associated_info' => array(
'label' => $lng['domains']['associated_with_domain'],
'type' => 'label',
'value' => $subdomains.' '.$lng['customer']['subdomains'].', '.$alias_check.' '.$lng['domains']['aliasdomains'].', '.$emails.' '.$lng['customer']['emails'].', '.$email_accounts.' '.$lng['customer']['accounts'].', '.$email_forwarders.' '.$lng['customer']['forwarders']
),
'caneditdomain' => array(
'label' => $lng['admin']['domain_edit'],
'type' => 'yesno',
'yesno_var' => $caneditdomain
),
'add_date' => array(
'label' => $lng['domains']['add_date'],
'desc' => $lng['panel']['dateformat'],
'type' => 'label',
'value' => $result['add_date']
),
'registration_date' => array(
'label' => $lng['domains']['registration_date'],
'desc' => $lng['panel']['dateformat'],
'type' => 'text',
'value' => $result['registration_date'],
'size' => 10
)
)
),
'section_b' => array(
'title' => $lng['admin']['webserversettings'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'documentroot' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'type' => 'text',
'value' => $result['documentroot']
),
'ipandport' => array(
'label' => 'IP/Port',
'type' => 'select',
'select_var' => $ipsandports,
),
'ssl' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => 'SSL',
'type' => 'yesno',
'yesno_var' => $ssl
),
'ssl_redirect' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => 'SSL Redirect',
'type' => 'yesno',
'yesno_var' => $ssl_redirect
),
'ssl_ipandport' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => 'SSL IP/Port',
'type' => 'select',
'select_var' => $ssl_ipsandports
),
'no_ssl_available_info' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports == '' ? true : false) : false),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
),
'wwwserveralias' => array(
'label' => $lng['admin']['wwwserveralias'],
'type' => 'yesno',
'yesno_var' => $wwwserveralias
),
'speciallogfile' => array(
'label' => 'Speciallogfile',
'type' => 'label',
'value' => $speciallogfile
),
'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'vertical-align:top;',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'value' => $result['specialsettings'],
'cols' => 60,
'rows' => 12
),
'specialsettingsforsubdomains' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['specialsettingsforsubdomains'],
'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'],
'type' => 'yesno',
'yesno_var' => $specialsettingsforsubdomains
)
)
),
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
'fields' => array(
'openbasedir' => array(
'label' => 'OpenBasedir',
'type' => 'yesno',
'yesno_var' => $openbasedir
),
'safemode' => array(
'label' => 'Safemode',
'type' => 'yesno',
'yesno_var' => $safemode
),
'phpsettingid' => array(
'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs
),
'mod_fcgid_starter' => array(
'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text',
'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
),
'mod_fcgid_maxrequests' => array(
'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text',
'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
)
)
),
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'fields' => array(
'isbinddomain' => array(
'label' => 'Nameserver',
'type' => 'yesno',
'yesno_var' => $isbinddomain
),
'zonefile' => array(
'label' => 'Zonefile',
'desc' => $lng['panel']['emptyfordefault'],
'type' => 'text',
'value' => $result['zonefile']
)
)
),
'section_e' => array(
'title' => $lng['admin']['mailserversettings'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'],
'type' => 'yesno',
'yesno_var' => $isemaildomain
),
'email_only' => array(
'label' => $lng['admin']['email_only'],
'type' => 'yesno',
'yesno_var' => $email_only
),
'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'],
'type' => 'select',
'select_var' => $subcanemaildomain
),
'dkim' => array(
'visible' => ($settings['dkim']['use_dkim'] == '1' ? true : false),
'label' => 'DomainKeys',
'type' => 'yesno',
'yesno_var' => $dkim
)
)
)
)
)
);

View File

@@ -0,0 +1,121 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.ipsandports_add.php 111 2010-12-14 07:48:33Z d00p $
*/
return array(
'ipsandports_add' => array(
'title' => $lng['admin']['ipsandports']['add'],
'image' => 'icons/ipsports_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['ipsandports']['ipandport'],
'image' => 'icons/ipsports_add.png',
'fields' => array(
'ip' => array(
'label' => $lng['admin']['ipsandports']['ip'],
'type' => 'text'
),
'port' => array(
'label' => $lng['admin']['ipsandports']['port'],
'type' => 'text',
'size' => 5
)
)
),
'section_b' => array(
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
'image' => 'icons/ipsports_add.png',
'fields' => array(
'listen_statement' => array(
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
'type' => 'yesno',
'yesno_var' => $listen_statement
),
'namevirtualhost_statement' => array(
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
'type' => 'yesno',
'yesno_var' => $namevirtualhost_statement,
),
'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
'type' => 'yesno',
'yesno_var' => $vhostcontainer
),
'docroot' => array(
'label' => $lng['admin']['ipsandports']['docroot']['title'],
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
'type' => 'text'
),
'specialsettings' => array(
'style' => 'vertical-align:top;',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'vhostcontainer_servername_statement' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
'type' => 'yesno',
'yesno_var' => $vhostcontainer_servername_statement
)
)
),
'section_c' => array(
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
'image' => 'icons/ipsports_add.png',
'fields' => array(
'default_vhostconf_domain' => array(
'style' => 'vertical-align:top;',
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
),
'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
'image' => 'icons/ipsports_add.png',
'visible' => ($settings['system']['use_ssl'] == 1 ? true : false),
'fields' => array(
'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'],
'type' => 'yesno',
'yesno_var' => $enable_ssl
),
'ssl_cert_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
'type' => 'text'
),
'ssl_key_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
'type' => 'text'
),
'ssl_ca_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
'type' => 'text'
),
'ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'type' => 'text'
)
)
)
)
)
);

View File

@@ -0,0 +1,130 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.ipsandports_edit.php 111 2010-12-14 07:48:33Z d00p $
*/
return array(
'ipsandports_edit' => array(
'title' => $lng['admin']['ipsandports']['edit'],
'image' => 'icons/ipsports_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['ipsandports']['ipandport'],
'image' => 'icons/ipsports_add.png',
'fields' => array(
'ip' => array(
'label' => $lng['admin']['ipsandports']['ip'],
'type' => 'text',
'value' => $result['ip']
),
'port' => array(
'label' => $lng['admin']['ipsandports']['port'],
'type' => 'text',
'value' => $result['port'],
'size' => 5
)
)
),
'section_b' => array(
'title' => $lng['admin']['ipsandports']['webserverdefaultconfig'],
'image' => 'icons/ipsports_edit.png',
'fields' => array(
'listen_statement' => array(
'label' => $lng['admin']['ipsandports']['create_listen_statement'],
'type' => 'yesno',
'yesno_var' => $listen_statement
),
'namevirtualhost_statement' => array(
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
'type' => 'yesno',
'yesno_var' => $namevirtualhost_statement,
),
'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
'type' => 'yesno',
'yesno_var' => $vhostcontainer
),
'docroot' => array(
'label' => $lng['admin']['ipsandports']['docroot']['title'],
'desc' => $lng['admin']['ipsandports']['docroot']['description'],
'type' => 'text',
'value' => $result['docroot']
),
'specialsettings' => array(
'style' => 'vertical-align:top;',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
),
'vhostcontainer_servername_statement' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'],
'type' => 'yesno',
'yesno_var' => $vhostcontainer_servername_statement,
'value' => $result['specialsettings']
)
)
),
'section_c' => array(
'title' => $lng['admin']['ipsandports']['webserverdomainconfig'],
'image' => 'icons/ipsports_edit.png',
'fields' => array(
'default_vhostconf_domain' => array(
'style' => 'vertical-align:top;',
'label' => $lng['admin']['ipsandports']['default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $result['default_vhostconf_domain']
)
)
),
'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
'image' => 'icons/ipsports_edit.png',
'visible' => ($settings['system']['use_ssl'] == 1 ? true : false),
'fields' => array(
'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'],
'type' => 'yesno',
'yesno_var' => $enable_ssl
),
'ssl_cert_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_file'],
'type' => 'text',
'value' => $result['ssl_cert_file']
),
'ssl_key_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_key_file'],
'type' => 'text',
'value' => $result['ssl_key_file']
),
'ssl_ca_file' => array(
'label' => $lng['admin']['ipsandports']['ssl_ca_file'],
'type' => 'text',
'value' => $result['ssl_ca_file']
),
'ssl_cert_chainfile' => array(
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
'type' => 'text',
'value' => $result['ssl_cert_chainfile']
)
)
)
)
)
);

View File

@@ -0,0 +1,65 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.phpconfig_add.php 114 2010-12-21 07:02:45Z d00p $
*/
return array(
'phpconfig_add' => array(
'title' => $lng['admin']['phpsettings']['addsettings'],
'image' => 'icons/phpsettings_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['phpsettings']['addsettings'],
'image' => 'icons/phpsettings_add.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'type' => 'text',
'maxlength' => 50
),
'binary' => array(
'label' => $lng['admin']['phpsettings']['binary'],
'type' => 'text',
'maxlength' => 255,
'value' => '/usr/bin/php-cgi'
),
'file_extensions' => array(
'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
'type' => 'text',
'maxlength' => 255,
'value' => 'php'
),
'mod_fcgid_starter' => array(
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text'
),
'mod_fcgid_maxrequests' => array(
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text'
),
'phpsettings' => array(
'style' => 'vertical-align:top;',
'label' => $lng['admin']['phpsettings']['phpinisettings'],
'type' => 'textarea',
'cols' => 80,
'rows' => 20,
'value' => $result['phpsettings']
)
)
)
)
)
);

View File

@@ -0,0 +1,68 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.phpconfig_edit.php 115 2010-12-21 07:09:28Z d00p $
*/
return array(
'phpconfig_edit' => array(
'title' => $lng['admin']['phpsettings']['editsettings'],
'image' => 'icons/phpsettings_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['phpsettings']['editsettings'],
'image' => 'icons/phpsettings_edit.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'type' => 'text',
'maxlength' => 50,
'value' => $result['description']
),
'binary' => array(
'label' => $lng['admin']['phpsettings']['binary'],
'type' => 'text',
'maxlength' => 255,
'value' => $result['binary']
),
'file_extensions' => array(
'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
'type' => 'text',
'maxlength' => 255,
'value' => $result['file_extensions']
),
'mod_fcgid_starter' => array(
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'text',
'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '')
),
'mod_fcgid_maxrequests' => array(
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text',
'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
),
'phpsettings' => array(
'style' => 'vertical-align:top;',
'label' => $lng['admin']['phpsettings']['phpinisettings'],
'type' => 'textarea',
'cols' => 80,
'rows' => 20,
'value' => $result['phpsettings']
)
)
)
)
)
);

View File

@@ -0,0 +1,42 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.filetemplate_add.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'filetemplate_add' => array(
'title' => $lng['admin']['templates']['template_add'],
'image' => 'icons/templates_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_add'],
'image' => 'icons/templates_add.png',
'fields' => array(
'template' => array(
'label' => $lng['admin']['templates']['action'],
'type' => 'select',
'select_var' => $free_templates
),
'filecontent' => array(
'label' => $lng['admin']['templates']['filecontent'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);

View File

@@ -0,0 +1,44 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.filetemplate_edit.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'filetemplate_edit' => array(
'title' => $lng['admin']['templates']['template_edit'],
'image' => 'icons/templates_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_edit'],
'image' => 'icons/templates_edit.png',
'fields' => array(
'template' => array(
'label' => $lng['admin']['templates']['action'],
'type' => 'hidden',
'value' => $lng['admin']['templates'][$row['varname']],
'display' => $lng['admin']['templates'][$row['varname']]
),
'filecontent' => array(
'label' => $lng['admin']['templates']['filecontent'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $row['value']
)
)
)
)
)
);

View File

@@ -0,0 +1,52 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.template_add.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'template_add' => array(
'title' => $lng['admin']['templates']['template_add'],
'image' => 'icons/templates_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_add'],
'image' => 'icons/templates_add.png',
'fields' => array(
'language' => array(
'label' => $lng['login']['language'],
'type' => 'hidden',
'value' => $language,
'display' => $language
),
'template' => array(
'label' => $lng['admin']['templates']['action'],
'type' => 'select',
'select_var' => $template_options
),
'subject' => array(
'label' => $lng['admin']['templates']['subject'],
'type' => 'text'
),
'mailbody' => array(
'label' => $lng['admin']['templates']['mailbody'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);

View File

@@ -0,0 +1,55 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.template_edit.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'template_edit' => array(
'title' => $lng['admin']['templates']['template_edit'],
'image' => 'icons/templates_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['templates']['template_edit'],
'image' => 'icons/templates_edit.png',
'fields' => array(
'language' => array(
'label' => $lng['login']['language'],
'type' => 'hidden',
'value' => $language,
'display' => $language
),
'template' => array(
'label' => $lng['admin']['templates']['action'],
'type' => 'hidden',
'value' => $template,
'display' => $template
),
'subject' => array(
'label' => $lng['admin']['templates']['subject'],
'type' => 'text',
'value' => $subject
),
'mailbody' => array(
'label' => $lng['admin']['templates']['mailbody'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12,
'value' => $mailbody
)
)
)
)
)
);

View File

@@ -0,0 +1,44 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.category_edit.php 128 2010-12-21 08:45:13Z d00p $
*/
return array(
'category_edit' => array(
'title' => $lng['ticket']['ticket_editcateory'],
'image' => 'icons/category_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_editcateory'],
'image' => 'icons/category_edit.png',
'fields' => array(
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'text',
'maxlength' => 50,
'value' => $row['name']
),
'logicalorder' => array(
'label' => $lng['ticket']['logicalorder'],
'desc' => $lng['ticket']['orderdesc'],
'type' => 'text',
'maxlength' => 3,
'value' => $row['logicalorder']
)
)
)
)
)
);

View File

@@ -0,0 +1,43 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.category_new.php 127 2010-12-21 08:41:31Z d00p $
*/
return array(
'category_new' => array(
'title' => $lng['ticket']['ticket_newcateory'],
'image' => 'icons/category_new.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_newcateory'],
'image' => 'icons/category_new.png',
'fields' => array(
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'text',
'maxlength' => 50
),
'logicalorder' => array(
'label' => $lng['ticket']['logicalorder'],
'desc' => $lng['ticket']['orderdesc'],
'type' => 'text',
'maxlength' => 3,
'value' => $order
)
)
)
)
)
);

View File

@@ -0,0 +1,58 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.ticket_new.php 116 2010-12-21 07:16:35Z d00p $
*/
return array(
'ticket_new' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_new.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_new.png',
'fields' => array(
'customer' => array(
'label' => $lng['ticket']['customer'],
'type' => 'select',
'select_var' => $customers
),
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
'maxlength' => 70
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'select',
'select_var' => $categories
),
'message' => array(
'style' => 'vertical-align:top;',
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);

View File

@@ -0,0 +1,54 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.ticket_reply.php 117 2010-12-21 07:26:58Z d00p $
*/
return array(
'ticket_reply' => array(
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'sections' => array(
'section_a' => array(
'visible' => ($isclosed == 0 ? true : false),
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'fields' => array(
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
'value' => 'Re: '.$subject
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'label',
'value' => $row['name']
),
'message' => array(
'style' => 'vertical-align:top;',
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'cols' => 60,
'rows' => 12
)
)
)
)
)
);

View File

@@ -0,0 +1,76 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_edit.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'domain_add' => array(
'title' => $lng['domains']['subdomain_add'],
'image' => 'icons/domain_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['subdomain_add'],
'image' => 'icons/domain_add.png',
'fields' => array(
'subdomain' => array(
'label' => $lng['domains']['domainname'],
'type' => 'text',
'has_nextto' => true
),
'domain' => array(
'next_to' => 'subdomain',
'next_to_prefix' => '&nbsp;.&nbsp;',
'type' => 'select',
'select_var' => $domains
),
'alias' => array(
'label' => $lng['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $aliasdomains
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value']
),
'url' => array(
'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false),
'label' => $lng['panel']['urloverridespath'],
'type' => 'text'
),
'redirectcode' => array(
'visible' => (($settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1') ? true : false),
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select',
'select_var' => isset($redirectcode) ? $redirectcode : null
),
'ssl_redirect' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? true : false),
'label' => 'SSL Redirect',
'type' => 'yesno',
'yesno_var' => $ssl_redirect
),
'openbasedir_path' => array(
'label' => $lng['domain']['openbasedirpath'],
'type' => 'select',
'select_var' => $openbasedir
)
)
)
)
)
);

View File

@@ -0,0 +1,89 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_edit.php 130 2010-12-22 00:54:11Z d00p $
*/
return array(
'domain_edit' => array(
'title' => $lng['domains']['subdomain_edit'],
'image' => 'icons/domain_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['subdomain_edit'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'domain' => array(
'label' => $lng['domains']['domainname'],
'type' => 'label',
'value' => $result['domain']
),
'dns' => array(
'label' => $lng['dns']['destinationip'],
'type' => 'label',
'value' => $domainip
),
'alias' => array(
'visible' => ($alias_check == '0' ? true : false),
'label' => $lng['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $domains
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value']
),
'url' => array(
'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false),
'label' => $lng['panel']['urloverridespath'],
'type' => 'text',
'value' => $urlvalue
),
'redirectcode' => array(
'visible' => (($settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1') ? true : false),
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select',
'select_var' => $redirectcode
),
'iswildcarddomain' => array(
'visible' => (($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') ? true : false),
'label' => $lng['domains']['wildcarddomain'],
'type' => 'yesno',
'yesno_var' => $iswildcarddomain
),
'isemaildomain' => array(
'visible' => ((( $result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2' ) && $result['parentdomainid'] != '0') ? true : false),
'label' => 'Emaildomain',
'type' => 'yesno',
'yesno_var' => $isemaildomain
),
'ssl_redirect' => array(
'visible' => ($settings['system']['use_ssl'] == '1' ? true : false),
'label' => 'SSL Redirect',
'type' => 'yesno',
'yesno_var' => $ssl_redirect
),
'openbasedir_path' => array(
'label' => $lng['domain']['openbasedirpath'],
'type' => 'select',
'select_var' => $openbasedir
)
)
)
)
)
);

View File

@@ -0,0 +1,40 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'emails_accountchangepasswd' => array(
'title' => $lng['menue']['main']['changepassword'],
'image' => 'icons/email_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['menue']['main']['changepassword'],
'image' => 'icons/email_edit.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'type' => 'label',
'value' => $result['email_full']
),
'email_password' => array(
'label' => $lng['login']['password'],
'type' => 'password'
)
)
)
)
)
);

View File

@@ -0,0 +1,41 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'emails_accountchangequota' => array(
'title' => $lng['emails']['quota_edit'],
'image' => 'icons/email_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['quota_edit'],
'image' => 'icons/email_edit.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'type' => 'label',
'value' => $result['email_full']
),
'email_quota' => array(
'label' => $lng['emails']['quota'].' ('.$lng['panel']['megabyte'].')',
'type' => 'text',
'value' => $result['quota']
)
)
)
)
)
);

View File

@@ -0,0 +1,47 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'emails_add' => array(
'title' => $lng['emails']['emails_add'],
'image' => 'icons/email_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['emails_add'],
'image' => 'icons/email_add.png',
'fields' => array(
'email_part' => array(
'label' => $lng['emails']['emailaddress'],
'type' => 'text',
'has_nextto' => true
),
'domain' => array(
'next_to' => 'email_part',
'next_to_prefix' => '&nbsp;@&nbsp;',
'type' => 'select',
'select_var' => $domains
),
'pathedit' => array(
'label' => $lng['emails']['iscatchall'],
'type' => 'yesno',
'yesno_var' => $iscatchall
)
)
)
)
)
);

View File

@@ -0,0 +1,52 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'emails_addaccount' => array(
'title' => $lng['emails']['account_add'],
'image' => 'icons/email_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['account_add'],
'image' => 'icons/email_add.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'type' => 'label',
'value' => $result['email_full']
),
'email_password' => array(
'label' => $lng['login']['password'],
'type' => 'password'
),
'email_quota' => array(
'visible' => $settings['system']['mail_quota_enabled'],
'label' => $lng['emails']['quota'],
'desc' => $lng['panel']['megabyte'],
'type' => 'text',
'value' => $quota
),
'alternative_email' => array(
'visible' => $settings['panel']['sendalternativemail'],
'label' => $lng['emails']['alternative_emailaddress'],
'type' => 'text'
)
)
)
)
)
);

View File

@@ -0,0 +1,40 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'emails_addforwarder' => array(
'title' => $lng['emails']['forwarder_add'],
'image' => 'icons/autoresponder_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['forwarder_add'],
'image' => 'icons/autoresponder_add.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['from'],
'type' => 'label',
'value' => $result['email_full']
),
'destination' => array(
'label' => $lng['emails']['to'],
'type' => 'text'
)
)
)
)
)
);

View File

@@ -0,0 +1,64 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'emails_edit' => array(
'title' => $lng['emails']['emails_edit'],
'image' => 'icons/email_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['emails']['emails_edit'],
'image' => 'icons/email_edit.png',
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],
'type' => 'label',
'value' => $result['email_full']
),
'account_yes' => array(
'visible' => ($result['popaccountid'] != 0 ? true : false),
'label' => $lng['emails']['account'],
'type' => 'label',
'value' => $lng['panel']['yes'].'&nbsp;[<a href="'.$filename.'?page=accounts&amp;action=changepw&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['menue']['main']['changepassword'].'</a>] [<a href="'.$filename.'?page=accounts&amp;action=delete&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['account_delete'].'</a>]'
),
'account_no' => array(
'visible' => ($result['popaccountid'] == 0 ? true : false),
'label' => $lng['emails']['account'],
'type' => 'label',
'value' => $lng['panel']['no'].'&nbsp;[<a href="'.$filename.'?page=accounts&amp;action=add&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['account_add'].'</a>]'
),
'mail_quota' => array(
'visible' => ($result['popaccountid'] != 0 && $settings['system']['mail_quota_enabled']),
'label' => $lng['customer']['email_quota'],
'type' => 'label',
'value' => $result['quota'].' '.$lng['panel']['megabyte'].' [<a href="'.$filename.'?page=accounts&amp;action=changequota&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['quota_edit'].'</a>]'
),
'mail_catchall' => array(
'label' => $lng['emails']['catchall'],
'type' => 'label',
'value' => ($result['iscatchall'] == 0 ? $lng['panel']['no'] : $lng['panel']['yes']).' [<a href="'.$filename.'?page='.$page.'&amp;action=togglecatchall&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['panel']['toggle'].'</a>]'
),
'mail_fwds' => array(
'label' => $lng['emails']['forwarders'].' ('.$forwarders_count.')',
'type' => 'label',
'value' => $forwarders.' <a href="'.$filename.'?page=forwarders&amp;action=add&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['forwarder_add'].'</a>'
)
)
)
)
)
);

View File

@@ -0,0 +1,65 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'htaccess_add' => array(
'title' => $lng['extras']['pathoptions_add'],
'image' => 'icons/htpasswd_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['pathoptions_add'],
'image' => 'icons/htpasswd_add.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value']
),
'options_indexes' => array(
'label' => $lng['extras']['directory_browsing'],
'type' => 'yesno',
'yesno_var' => $options_indexes
),
'error404path' => array(
'label' => $lng['extras']['errordocument404path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text'
),
'error403path' => array(
'visible' => ($settings['system']['webserver'] == 'apache2'),
'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text'
),
'error500path' => array(
'visible' => ($settings['system']['webserver'] == 'apache2'),
'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text'
),
'options_cgi' => array(
'visible' => ($cperlenabled == 1),
'label' => $lng['extras']['execute_perl'],
'type' => 'yesno',
'yesno_var' => $options_cgi
)
)
)
)
)
);

View File

@@ -0,0 +1,67 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'htaccess_edit' => array(
'title' => $lng['extras']['pathoptions_edit'],
'image' => 'icons/htpasswd_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['pathoptions_edit'],
'image' => 'icons/htpasswd_edit.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'type' => 'label',
'value' => $result['path']
),
'options_indexes' => array(
'label' => $lng['extras']['directory_browsing'],
'type' => 'yesno',
'yesno_var' => $options_indexes
),
'error404path' => array(
'label' => $lng['extras']['errordocument404path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text',
'value' => $result['error404path']
),
'error403path' => array(
'visible' => ($settings['system']['webserver'] == 'apache2'),
'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text',
'value' => $result['error403path']
),
'error500path' => array(
'visible' => ($settings['system']['webserver'] == 'apache2'),
'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text',
'value' => $result['error500path']
),
'options_cgi' => array(
'visible' => ($cperlenabled == 1),
'label' => $lng['extras']['execute_perl'],
'type' => 'yesno',
'yesno_var' => $options_cgi
)
)
)
)
)
);

View File

@@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'htpasswd_add' => array(
'title' => $lng['extras']['directoryprotection_add'],
'image' => 'icons/htpasswd_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['directoryprotection_add'],
'image' => 'icons/htpasswd_add.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value']
),
'username' => array(
'label' => $lng['login']['username'],
'type' => 'text'
),
'directory_password' => array(
'label' => $lng['login']['password'],
'type' => 'password'
),
'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'],
'type' => 'text'
)
)
)
)
)
);

View File

@@ -0,0 +1,50 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
* @version $Id: formfield.domains_add.php 112 2010-12-14 12:11:20Z d00p $
*/
return array(
'htpasswd_edit' => array(
'title' => $lng['extras']['directoryprotection_add'],
'image' => 'icons/htpasswd_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['extras']['directoryprotection_add'],
'image' => 'icons/htpasswd_add.png',
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'type' => 'label',
'value' => $result['path']
),
'username' => array(
'label' => $lng['login']['username'],
'type' => 'label',
'value' => $result['username']
),
'directory_password' => array(
'label' => $lng['login']['password'],
'type' => 'password'
),
'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'],
'type' => 'text',
'value' => $result['authname']
)
)
)
)
)
);

View File

@@ -0,0 +1,56 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ftp_add' => array(
'title' => $lng['ftp']['account_add'],
'image' => 'icons/user_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ftp']['account_add'],
'image' => 'icons/user_add.png',
'fields' => array(
'ftp_username' => array(
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
'label' => $lng['login']['username'],
'type' => 'text'
),
'ftp_domain' => array(
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
'label' => $lng['domains']['domainname'],
'type' => 'select',
'select_var' => (isset($domains) ? $domains : ""),
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value']
),
'ftp_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],
'type' => 'yesno',
'yesno_var' => $sendinfomail,
),
)
)
)
)
);

View File

@@ -0,0 +1,57 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ftp_edit' => array(
'title' => $lng['ftp']['account_edit'],
'image' => 'icons/user_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ftp']['account_edit'],
'image' => 'icons/user_edit.png',
'fields' => array(
'username' => array(
'label' => $lng['login']['username'],
'type' => 'label',
'value' => $result['username'],
),
'ftp_username' => array(
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
'label' => $lng['login']['username'],
'type' => 'text'
),
'ftp_domain' => array(
'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false),
'label' => $lng['domains']['domainname'],
'type' => 'select',
'select_var' => (isset($domains) ? $domains : ""),
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value']
),
'ftp_password' => array(
'label' => $lng['login']['password'],
'desc' => $lng['ftp']['editpassdescription'],
'type' => 'password',
),
)
)
)
)
);

View File

@@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'mysql_add' => array(
'title' => $lng['mysql']['database_create'],
'image' => 'icons/mysql_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['mysql']['database_create'],
'image' => 'icons/mysql_add.png',
'fields' => array(
'description' => array(
'label' => $lng['mysql']['databasedescription'],
'type' => 'text',
),
'mysql_server' => array(
'visible' => (1 < count($sql_root) ? true : false),
'label' => $lng['mysql']['mysql_server'],
'type' => 'select',
'select_var' => $mysql_servers,
),
'mysql_password' => array(
'label' => $lng['login']['password'],
'type' => 'password',
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],
'type' => 'yesno',
'yesno_var' => $sendinfomail,
)
)
)
)
)
);

View File

@@ -0,0 +1,50 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'mysql_edit' => array(
'title' => $lng['mysql']['database_edit'],
'image' => 'icons/mysql_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['mysql']['database_edit'],
'image' => 'icons/mysql_edit.png',
'fields' => array(
'databasename' => array(
'label' => $lng['mysql']['databasename'],
'type' => 'label',
'value' => $result['databasename'],
),
'description' => array(
'label' => $lng['mysql']['databasedescription'],
'type' => 'text',
'value' => $result['description'],
),
'mysql_server' => array(
'visible' => (1 < count($sql_root) ? true : false),
'label' => $lng['mysql']['mysql_server'],
'type' => 'label',
'value' => $sql_root[$result['dbserver']]['caption']
),
'mysql_password' => array(
'label' => $lng['changepassword']['new_password_ifnotempty'],
'type' => 'password',
),
)
)
)
)
);

View File

@@ -0,0 +1,50 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ticket_add' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_new'],
'image' => 'icons/ticket_add.png',
'fields' => array(
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities,
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'select',
'select_var' => $categories,
),
'message' => array(
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'rows' => 12,
'cols' => 60,
)
)
)
)
)
);

View File

@@ -0,0 +1,51 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*/
return array(
'ticket_reply' => array(
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'sections' => array(
'section_a' => array(
'title' => $lng['ticket']['ticket_reply'],
'image' => 'icons/ticket_reply.png',
'fields' => array(
'subject' => array(
'label' => $lng['ticket']['subject'],
'type' => 'text',
'value' => "Re: $subject",
),
'priority' => array(
'label' => $lng['ticket']['priority'],
'type' => 'select',
'select_var' => $priorities,
),
'category' => array(
'label' => $lng['ticket']['category'],
'type' => 'label',
'value' => $row['name'],
),
'message' => array(
'label' => $lng['ticket']['message'],
'type' => 'textarea',
'rows' => 12,
'cols' => 60,
),
)
)
)
)
);

View File

@@ -36,11 +36,15 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
{
global $lng;
$value = str_replace($path, '', $value);
$field = '';
$field = array();
if($fieldType == 'Manual')
{
$field = '<input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
$field = array(
'type' => 'text',
'value' => htmlspecialchars($value)
);
}
elseif($fieldType == 'Dropdown')
{
@@ -58,7 +62,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
{
if(sizeof($dirList) <= 100)
{
$field = '<select name="path">';
$_field = '';
foreach($dirList as $key => $dir)
{
if(strpos($dir, $path) === 0)
@@ -66,23 +70,35 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '')
$dir = makeCorrectDir(substr($dir, strlen($path)));
}
$field.= makeoption($dir, $dir, $value);
$_field.= makeoption($dir, $dir, $value);
}
$field.= '</select>';
$field = array(
'type' => 'select',
'value' => $_field
);
}
else
{
// remove starting slash we added
// for the Dropdown, #225
$value = substr($value, 1);
$field = $lng['panel']['toomanydirs'];
$field.= '<br /><input type="text" name="path" value="' . htmlspecialchars($value) . '" />';
//$field = $lng['panel']['toomanydirs'];
$field = array(
'type' => 'text',
'value' => htmlspecialchars($value),
'note' => $lng['panel']['toomanydirs']
);
}
}
else
{
$field = $lng['panel']['dirsmissing'];
$field.= '<input type="hidden" name="path" value="/" />';
//$field = $lng['panel']['dirsmissing'];
$field = '<input type="hidden" name="path" value="/" />';
$field = array(
'type' => 'hidden',
'value' => '/',
'note' => $lng['panel']['dirsmissing']
);
}
}

View File

@@ -123,11 +123,11 @@ function getCronjobsLastRun()
if($row['lastrun'] > 0) {
$lastrun = date('d.m.Y H:i:s', $row['lastrun']);
}
$cronjobs_last_run .= '<tr>
<td class="field_name_border_left">'.$lng['crondesc'][$row['desc_lng_key']].':</td>
<td class="field_display">'.$lastrun.'</td>
</tr>';
$text = $lng['crondesc'][$row['desc_lng_key']];
$value = $lastrun;
eval("\$cronjobs_last_run .= \"" . getTemplate("index/overview_item") . "\";");
}
return $cronjobs_last_run;
@@ -153,10 +153,7 @@ function getOutstandingTasks()
$query = "SELECT * FROM `".TABLE_PANEL_TASKS."` ORDER BY `type` ASC";
$result = $db->query($query);
$outstanding_tasks = '<tr>
<td class="field_name_border_left">'.$lng['tasks']['outstanding_tasks'].':</td>
<td class="field_display" colspan="2"><ul>';
$value = '<ul class="cronjobtask">';
$tasks = '';
while($row = $db->fetch_array($result))
{
@@ -272,12 +269,14 @@ function getOutstandingTasks()
}
if(trim($tasks) == '') {
$outstanding_tasks .= '<li>'.$lng['tasks']['noneoutstanding'].'</li>';
$value .= '<li>'.$lng['tasks']['noneoutstanding'].'</li>';
} else {
$outstanding_tasks .= $tasks;
$value .= $tasks;
}
$outstanding_tasks .= '</ul></td></tr>';
$value .= '</ul>';
$text = $lng['tasks']['outstanding_tasks'];
eval("\$outstanding_tasks = \"" . getTemplate("index/overview_item") . "\";");
return $outstanding_tasks;
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Functions
* @version $Id: function.getThemes.php 5 2010-11-08 09:35:26Z d00p $
*/
/**
* returns an array for the settings-array
*
* @return array
*/
function getThemes()
{
$themespath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))).'/templates/');
$themes_available = array();
if (is_dir($themespath))
{
$its = new DirectoryIterator($themespath);
foreach ($its as $it)
{
if ($it->isDir()
&& $it->getFilename() != '.'
&& $it->getFilename() != '..'
&& $it->getFilename() != '.svn'
&& $it->getFilename() != 'misc'
) {
$themes_available[] = $it->getFilename();
}
}
}
return $themes_available;
}

View File

@@ -332,14 +332,15 @@ function updateCounters($returndebuginfo = false)
$admin_resources[$admin['adminid']]['aps_packages_used'] = 0;
}
$admin['aps_packages_used_new'] = $admin_resources[$admin['adminid']]['aps_packages_used'];
$admin['subdomains_used_new'] = $admin_resources[$admin['adminid']]['subdomains_used'];
if(!isset($admin_resources[$admin['adminid']]['aps_packages_used']))
{
$admin_resources[$admin['adminid']]['aps_packages_used'] = 0;
}
$admin['subdomains_used_new'] = $admin_resources[$admin['adminid']]['subdomains_used'];
$admin['aps_packages_used_new'] = $admin_resources[$admin['adminid']]['aps_packages_used'];
$db->query('UPDATE
`' . TABLE_PANEL_ADMINS . '`
SET

View File

@@ -28,16 +28,21 @@
function getTemplate($template, $noarea = 0)
{
global $templatecache;
global $templatecache, $theme;
if(!isset($theme) || $theme == '')
{
$theme = 'Froxlor';
}
if($noarea != 1)
{
$template = AREA . '/' . $template;
}
if(!isset($templatecache[$template]))
if(!isset($templatecache[$theme][$template]))
{
$filename = './templates/' . $template . '.tpl';
$filename = './templates/' . $theme . '/' . $template . '.tpl';
if(file_exists($filename)
&& is_readable($filename))
@@ -56,8 +61,9 @@ function getTemplate($template, $noarea = 0)
$templatefile = 'TEMPLATE NOT FOUND: ' . $filename;
}
$templatecache[$template] = $templatefile;
$output = $templatefile; // Minify_HTML::minify($templatefile, array('cssMinifier', 'jsMinifier'));
$templatecache[$theme][$template] = $output;
}
return $templatecache[$template];
return $templatecache[$theme][$template];
}

View File

@@ -39,5 +39,5 @@ function makeyesno($name, $yesvalue, $novalue = '', $yesselected = '', $disabled
} else {
$d = '';
}
return '<select class="dropdown_noborder" name="' . $name . '"'.$d.'><option value="' . $yesvalue . '"' . ($yesselected ? ' selected="selected"' : '') . '>' . $lng['panel']['yes'] . '</option><option value="' . $novalue . '"' . ($yesselected ? '' : ' selected="selected"') . '>' . $lng['panel']['no'] . '</option></select>';
return '<select class="dropdown_noborder" id="' . $name . '" name="' . $name . '"'.$d.'><option value="' . $yesvalue . '"' . ($yesselected ? ' selected="selected"' : '') . '>' . $lng['panel']['yes'] . '</option><option value="' . $novalue . '"' . ($yesselected ? '' : ' selected="selected"') . '>' . $lng['panel']['no'] . '</option></select>';
}

View File

@@ -49,7 +49,7 @@ $filename = basename($_SERVER['PHP_SELF']);
if(!file_exists('./lib/userdata.inc.php'))
{
$config_hint = file_get_contents('./templates/misc/configurehint.tpl');
$config_hint = file_get_contents('./templates/Froxlor/misc/configurehint.tpl');
die($config_hint);
}
@@ -67,7 +67,7 @@ require ('./lib/userdata.inc.php');
if(!isset($sql)
|| !is_array($sql))
{
$config_hint = file_get_contents('./templates/misc/configurehint.tpl');
$config_hint = file_get_contents('./templates/Froxlor/misc/configurehint.tpl');
die($config_hint);
}
@@ -161,23 +161,6 @@ if(get_magic_quotes_gpc())
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
$settings = loadSettings($settings_data, $db);
/*
* when upgrading from syscp, the header-graphic gets lost
*/
if(!isset($settings['admin']['froxlor_graphic'])
|| $settings['admin']['froxlor_graphic'] == ''
) {
if(isset($settings['admin']['syscp_graphic'])
&& $settings['admin']['syscp_graphic'] != ''
){
$settings['admin']['froxlor_graphic'] = $settings['admin']['syscp_graphic'];
}
else
{
$settings['admin']['froxlor_graphic'] = 'images/header.gif';
}
}
/**
* SESSION MANAGEMENT
*/
@@ -261,19 +244,16 @@ $langs = array();
$languages = array();
// query the whole table
$query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` ';
$result = $db->query($query);
// presort languages
while($row = $db->fetch_array($result))
{
$langs[$row['language']][] = $row;
}
// buildup $languages for the login screen
foreach($langs as $key => $value)
{
$languages[$key] = $key;
@@ -306,7 +286,6 @@ else
}
// include every english language file we can get
foreach($langs['English'] as $key => $value)
{
include_once makeSecurePath($value['file']);
@@ -322,6 +301,28 @@ if($language != 'English')
}
}
/**
* global Theme-variable
*/
$theme = isset($settings['panel']['default_theme']) ? $settings['panel']['default_theme'] : 'Froxlor';
/**
* overwrite with customer/admin theme if defined
*/
if(isset($userinfo['theme']) && $userinfo['theme'] != $theme)
{
$theme = $userinfo['theme'];
}
/*
* check for custom header-graphic
*/
$hl_path = 'images/'.$theme;
$header_logo = $hl_path.'/logo.png';
if(file_exists($hl_path.'/logo_custom.png')) {
$header_logo = $hl_path.'/logo_custom.png';
}
/**
* Redirects to index.php (login page) if no session exists
*/
@@ -455,5 +456,3 @@ if(PHPMailer::ValidateAddress($settings['panel']['adminmail']) !== false)
$mail->AddReplyTo($settings['panel']['adminmail_return'], $settings['panel']['adminmail_defname']);
}
}
?>

View File

@@ -21,7 +21,7 @@ return array (
'customer' => array (
'index' => array (
'url' => 'customer_index.php',
'label' => $lng['menue']['main']['main'],
'label' => $lng['admin']['overview'],
'elements' => array (
array (
'label' => $lng['menue']['main']['username'],
@@ -34,6 +34,10 @@ return array (
'url' => 'customer_index.php?page=change_language',
'label' => $lng['menue']['main']['changelanguage'],
),
array (
'url' => 'customer_index.php?page=change_theme',
'label' => $lng['menue']['main']['changetheme'],
),
array (
'url' => 'customer_index.php?action=logout',
'label' => $lng['login']['logout'],
@@ -52,7 +56,7 @@ return array (
array (
'url' => 'customer_email.php?page=emails&action=add',
'label' => $lng['emails']['emails_add'],
'required_resources' => 'emails',
'required_resources' => 'emails'
),
array (
'url' => 'customer_autoresponder.php',
@@ -154,6 +158,10 @@ return array (
'url' => 'admin_index.php?page=change_language',
'label' => $lng['menue']['main']['changelanguage'],
),
array (
'url' => 'admin_index.php?page=change_theme',
'label' => $lng['menue']['main']['changetheme'],
),
array (
'url' => 'admin_index.php?action=logout',
'label' => $lng['login']['logout'],
@@ -250,4 +258,3 @@ return array (
),
),
);
?>

View File

@@ -73,8 +73,6 @@ define('PACKAGE_ENABLED', 2);
// VERSION INFO
$version = '0.9.18-svn1';
$version = '0.9.18-svn2';
$dbversion = '2';
$branding = '';
?>