Commit 0281b9f7 authored by Till Brehm's avatar Till Brehm

Removed unused files.

parent 3e0fc867
This diff is collapsed.
This empty directory is needed by ISPConfig.
<?php
/*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
//* Check permissions for module
$app->auth->check_module_permissions('designer');
// Lade Template
$app->uses('tpl');
$app->tpl->newTemplate("form.tpl.htm");
$app->tpl->setInclude('content_tpl', 'templates/form_edit.htm');
// Importing variables
$module_name = $_REQUEST["module_name"];
$form_name = $_REQUEST["form_name"];
// Checking imported variables
if(!preg_match('/^[A-Za-z0-9_]{1,50}$/', $module_name)) die("module_name contains invalid chars.");
if(!preg_match('/^[A-Za-z0-9_]{0,50}$/', $form_name)) die("form_name contains invalid chars.");
$id = $form_name;
if(count($_POST) > 1) {
// Bestimme aktion
if($id != '') {
$action = 'UPDATE';
} else {
$action = 'INSERT';
}
if($error == '') {
$filename = "../".$module_name."/form/".$form_name.".tform.php";
$form_new = $_POST["form"];
if(@is_file($filename)) {
include_once $filename;
$tabs = $form["tabs"];
unset($form["tabs"]);
$form_new["tabs"] = $tabs;
}
$file_content = "<?php\r\n".'$form = '.var_export($form_new, true)."\r\n?>";
die($file_content);
// writing module.conf
if (!$handle = fopen($filename, 'w')) {
print "Cannot open file ($filename)";
exit;
}
if (!fwrite($handle, $file_content)) {
print "Cannot write to file ($filename)";
exit;
}
fclose($handle);
// zu Liste springen
header("Location: form_list.php");
exit;
} else {
$app->tpl->setVar("error", "<b>Fehler:</b><br>".$error);
$app->tpl->setVar($_POST);
}
}
if($id != '') {
// Datensatz besteht bereits
// bestehenden Datensatz anzeigen
if($error == '') {
// es liegt ein Fehler vor
include_once "../".$module_name."/form/".$form_name.".tform.php";
//$tabs = $form["tabs"];
unset($form["tabs"]);
$record = $form;
$record["form_name"] = $form_name;
$record["module_name"] = $module_name;
$record["auth_preset_userid"] = $form["auth_preset"]["userid"];
$record["auth_preset_groupid"] = $form["auth_preset"]["groupid"];
$record["auth_preset_perm_user"] = $form["auth_preset"]["perm_user"];
$record["auth_preset_perm_group"] = $form["auth_preset"]["perm_group"];
$record["auth_preset_perm_other"] = $form["auth_preset"]["perm_other"];
} else {
// ein Fehler
$record = $_POST;
//$navi = $_POST["nav"];
unset($_POST["tabs"]);
}
$record["readonly"] = 'style="background-color: #EEEEEE;" readonly';
} else {
// neuer datensatz
if($error == '') {
// es liegt kein Fehler vor
// Pewsets
$record["template"] = "module.tpl.htm";
} else {
// ein Fehler
$record = $_POST;
unset($_POST["tabs"]);
}
$record["readonly"] = '';
}
$record["id"] = $form_name;
$app->tpl->setVar($record);
include_once "lib/lang/".$_SESSION["s"]["language"]."_form_edit.lng";
$app->tpl->setVar($wb);
// Defaultwerte setzen
$app->tpl_defaults();
// Template parsen
$app->tpl->pparse();
?>
<?php
/*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('designer');
$app->uses('tpl');
$app->tpl->newTemplate('form.tpl.htm');
$app->tpl->setInclude('content_tpl', 'templates/form_list.htm');
function getinfo($file, $form_file, $bgcolor) {
$module_name = $file;
include ISPC_WEB_PATH."/$file/form/$form_file";
return array( 'name' => $form['name'],
'title' => $form['title'],
'description' => $form['description'],
'module_name' => $module_name,
'bgcolor' => $bgcolor
);
}
// lese Module aus
$bgcolor = '#FFFFFF';
$modules_list = array();
$handle = @opendir(ISPC_WEB_PATH);
while ($file = @readdir($handle)) {
if ($file != '.' && $file != '..') {
if(@is_dir(ISPC_WEB_PATH."/$file")) {
if(is_file(ISPC_WEB_PATH.'/'.$file.'/lib/module.conf.php') and $file != 'login') {
if(@is_dir(ISPC_WEB_PATH."/$file/form")) {
$handle2 = opendir(ISPC_WEB_PATH."/$file/form");
while ($form_file = @readdir($handle2)) {
if (substr($form_file, 0, 1) != ".") {
//echo ISPC_ROOT_PATH."/web/".$file."/form/$form_file<br>";
//include_once(ISPC_ROOT_PATH."/web/".$file."/form/$form_file");
// Farbwechsel
$bgcolor = ($bgcolor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF';
$modules_list[] = getinfo($file, $form_file, $bgcolor);
}
}
}
}
}
}
}
$app->tpl->setLoop('records', $modules_list);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_form_list.lng';
include $lng_file;
$app->tpl->setVar($wb);
$app->tpl_defaults();
$app->tpl->pparse();
?>
<?php
/*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('designer');
if($_SESSION["s"]["user"]["typ"] != "admin") die("Admin permissions required.");
$app->uses('tpl');
$app->tpl->newTemplate("form.tpl.htm");
$app->tpl->setInclude('content_tpl', 'templates/form_show.htm');
// TODO: Check ID for malicius chars
$module_name = $_REQUEST["module_name"];
$form_name = $_REQUEST["form_name"];
if(!preg_match('/^[A-Za-z0-9_]{1,50}$/', $module_name)) die("module_name contains invalid chars.");
if(!preg_match('/^[A-Za-z0-9_]{1,50}$/', $form_name)) die("form_name contains invalid chars.");
include_once "../".$module_name."/form/".$form_name.".tform.php";
$tabs = $form["tabs"];
unset($form["tabs"]);
$record = $form;
$record["form_name"] = $form_name;
$record["module_name"] = $module_name;
// loading language file
$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_form_show.lng";
include $lng_file;
$app->tpl->setVar($wb);
// baue Tabs navi
$content = "";
$n1 = 0;
$n2 = 0;
if(is_array($tabs)) {
foreach($tabs as $tab_id => $tab) {
$content .= "<tr>
<td colspan='2' class='frmText11'>
<table width='100%'>
<tr>
<td class='tblHead'>$tab[title]</td>
<td class='tblHead' width='220' align='right'>
<input type=\"button\" name=\"bt1$n2\" value=\"$wb[edit_txt]\" onclick=\"location.href='form_tab_edit.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id'\" class=\"button\" />
<input type=\"button\" name=\"bt2$n2\" value=\"$wb[delete_txt]\" onclick=\"del_menu('form_tab_del.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id');\" class=\"button\" />
<input type=\"button\" name=\"bt3$n2\" value=\"$wb[new_txt]\" onclick=\"location.href='form_tab_item_edit.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id'\" class=\"button\" />
<input type=\"button\" name=\"bt4$n2\" value=\"$wb[up_txt]\" onclick=\"location.href='form_tab_flip.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&dir=up'\" class=\"button\" />
<input type=\"button\" name=\"bt5$n2\" value=\"$wb[down_txt]\" onclick=\"location.href='form_tab_flip.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&dir=down'\" class=\"button\" />
</td>
</tr>";
//$content .= "<tr><td bgcolor='#EEEEEE' class='frmText11'>Bereich:</td><td class='frmText11' bgcolor='#EEEEEE'><input name=\"module[nav][$n1][title]\" type=\"text\" class=\"text\" value=\"$section[title]\" size=\"30\" maxlength=\"255\"><input name=\"module[nav][$n1][open]\" type=\"hidden\" value=\"$section[open]\"></td></tr>\r\n";
foreach($tab["fields"] as $field_id => $field) {
//$content .= "<tr><td class='frmText11'>Titel:</td><td class='frmText11'><input name=\"module[nav][$n1][items][$n2][title]\" type=\"text\" class=\"text\" value=\"$item[title]\" size=\"30\" maxlength=\"255\"></td></tr>\r\n";
//$content .= "<tr><td class='frmText11'>Ziel:</td><td class='frmText11'>&nbsp; &nbsp; &nbsp; &nbsp;<input name=\"module[nav][$n1][items][$n2][target]\" type=\"text\" class=\"text\" value=\"$item[target]\" size=\"10\" maxlength=\"255\"></td></tr>\r\n";
//$content .= "<tr><td class='frmText11'>Link:</td><td class='frmText11'>&nbsp; &nbsp; &nbsp; &nbsp;<input name=\"module[nav][$n1][items][$n2][link]\" type=\"text\" class=\"text\" value=\"$item[link]\" size=\"30\" maxlength=\"255\"></td></tr>\r\n";
$content .= "<tr>
<td class='frmText11'>$field_id</td>
<td class='frmText11' width='220' align='right'>
<input type=\"button\" name=\"bt6$n2\" value=\"$wb[edit_txt]\" onclick=\"location.href='form_field_edit.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&field_id=$field_id'\" class=\"button\" />
<input type=\"button\" name=\"bt7$n2\" value=\"$wb[delete_txt]\" onclick=\"del_menuitem('form_field_del.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&field_id=$field_id');\" class=\"button\" />
<input type=\"button\" name=\"bt8$n2\" value=\"$wb[up_txt]\" onclick=\"location.href='form_field_flip.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&field_id=$field_id&dir=up'\" class=\"button\" />
<input type=\"button\" name=\"bt9$n2\" value=\"$wb[down_txt]\" onclick=\"location.href='form_field_flip.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&field_id=$field_id&dir=down'\" class=\"button\" />
</td>
</tr>";
$n2++;
}
$content .= "<tr><td colspan='2' class='tblFooter'>&nbsp;</td></tr>
</table>
</td>
</tr>";
$n1++;
}
}
$record["nav"] = $content;
$app->tpl->setVar($record);
$app->tpl->setLoop('records', $modules_list);
$app->tpl_defaults();
$app->tpl->pparse();
?>
<?php
$wb['name_txt'] = 'Formname';
$wb['title_txt'] = 'Formutitle';
$wb['template_txt'] = 'Template';
$wb['navframe_txt'] = 'NaviFrame';
$wb['startpage_txt'] = 'Startpage';
$wb['tab_width_txt'] = 'Tab width';
$wb['save_txt'] = 'Save';
$wb['cancel_txt'] = 'Cancel';
$wb['header_txt'] = 'Form properties';
$wb['description_txt'] = 'Description';
$wb['action_txt'] = 'Action (script)';
$wb['db_table_txt'] = 'DB Table';
$wb['db_table_idx_txt'] = 'DB Table Index';
$wb['db_history_txt'] = 'Undo Log';
$wb['tab_default_txt'] = 'Default Tab';
$wb['list_default_txt'] = 'Default Liste';
$wb['auth_txt'] = 'Permissions';
$wb['auth_preset_userid_txt'] = 'UserID';
$wb['auth_preset_groupid_txt'] = 'GroupID';
$wb['auth_preset_perm_user_txt'] = 'Perm. User';
$wb['auth_preset_perm_group_txt'] = 'Perm. Group';
$wb['auth_preset_perm_other_txt'] = 'Perm. Other';
?>
<?php
$wb['list_head_txt'] = 'Backend Form';
$wb['form_txt'] = 'Form';
$wb['module_txt'] = 'Module';
$wb['title_txt'] = 'Title';
$wb['description_txt'] = 'Description';
?>
<?php
$wb['header_txt'] = 'Formeditor';
$wb['title_txt'] = 'Formtitle';
$wb['name_txt'] = 'Formname';
$wb['delete_txt'] = 'Delete';
$wb['properties_txt'] = 'Properties';
$wb['new_tab_txt'] = 'Tab new';
$wb['edit_txt'] = 'Edit';
$wb['new_txt'] = 'Neu';
$wb['up_txt'] = '^';
$wb['down_txt'] = 'v';
$wb['module_txt'] = 'Module';
$wb['form_txt'] = 'Form';
$wb['description_txt'] = 'Description';
$wb['module_del_txt'] = 'Delete the module and all subdirectories?';
$wb['menu_del_txt'] = 'Delete menu with all menuitems?';
$wb['item_del_txt'] = 'Delete menuitem?';
?>
<?php
$wb['name_txt'] = 'Modulename';
$wb['title_txt'] = 'Moduletitle';
$wb['template_txt'] = 'Template file';
$wb['navframe_txt'] = 'NaviFrame';
$wb['startpage_txt'] = 'Default page';
$wb['tab_width_txt'] = 'Tab width';
$wb['save_txt'] = 'Save';
$wb['cancel_txt'] = 'Cancel';
$wb['header_txt'] = 'Module properties';
$wb['description_txt'] = '
<b>Description</b>
<br><br>
<b>Modulename:</b> Name of the module directory. Only numbers, chars and underscore allowed.<br>
<b>Moduletitle:</b> Will be shown in the (upper) main navigation.<br>
<b>Template file:</b> Template file of the module. Currently available: module.tpl.htm and module_tree.tpl.htm. Default is module.tpl.htm.<br>
<b>NaviFrame:</b> If module_tree.tpl.htm selected as template file, enter here the path to the script file for the left frame.<br>
<b>Default page:</b> These page will be shown when the module is opened.<br>
<b>Tab width:</b> Width of the Tabs in the main navigation. The field is empty by default. You can enter values absolute in pixel (e.g 20) or relative (e.g 20%).<br>
<b>Hint:</b> All paths are relative to the directory web.
';
?>
<?php
$wb['list_head_txt'] = 'Backend Module';
$wb['module_txt'] = 'Module';
$wb['title_txt'] = 'Title';
?>
<?php
$wb['title_txt'] = 'Title';
$wb['header_txt'] = 'Navi properties';
$wb['save_txt'] = 'Save';
$wb['cancel_txt'] = 'Cancel';
?>
<?php
$wb['title_txt'] = 'Title';
$wb['target_txt'] = 'Target';
$wb['link_txt'] = 'Link';
$wb['header_txt'] = 'Navi properties';
$wb['save_txt'] = 'Save';
$wb['cancel_txt'] = 'Cancel';
?>
<?php
$wb['header_txt'] = 'Menu editor';
$wb['title_txt'] = 'Title';
$wb['name_txt'] = 'Module';
$wb['delete_txt'] = 'Delete';
$wb['properties_txt'] = 'Properties';
$wb['new_menu_txt'] = 'Menu new';
$wb['edit_txt'] = 'Edit';
$wb['new_txt'] = 'New';
$wb['up_txt'] = 'Up';
$wb['down_txt'] = 'Down';
$wb['module_txt'] = 'Module';
$wb['module_del_txt'] = 'Wollen Sie das Modul und alle im Modul angelegten Dateien und Unterverzeichnisse löschen?';
$wb['menu_del_txt'] = 'Wollen Sie das Menü mit allen Untereinträgen löschen?';
$wb['item_del_txt'] = 'Wollen Sie den Menüeintrag löschen?';
?>
<?php
$wb['name_txt'] = 'Име';
$wb['title_txt'] = 'Заглавие';
$wb['template_txt'] = 'Темплейт';
$wb['navframe_txt'] = 'NaviFrame';
$wb['startpage_txt'] = 'Начална страница';
$wb['tab_width_txt'] = 'Широчина на таб-а';
$wb['save_txt'] = 'Запис';
$wb['cancel_txt'] = 'Отказ';
$wb['header_txt'] = 'Характеристики на формата';
$wb['description_txt'] = 'Описание';
$wb['action_txt'] = 'Действие (script)';
$wb['db_table_txt'] = 'DB Table';
$wb['db_table_idx_txt'] = 'DB Table Index';
$wb['db_history_txt'] = 'Undo Log';
$wb['tab_default_txt'] = 'Default Tab';
$wb['list_default_txt'] = 'Default Liste';
$wb['auth_txt'] = 'Разрешения';
$wb['auth_preset_userid_txt'] = 'ПотребителскоID';
$wb['auth_preset_groupid_txt'] = 'ГруповоID';
$wb['auth_preset_perm_user_txt'] = 'Разр. Потребител';
$wb['auth_preset_perm_group_txt'] = 'Разр. Група';
$wb['auth_preset_perm_other_txt'] = 'Разр. Други';