Commit acbf53a3 authored by tbrehm's avatar tbrehm
Browse files

changed client form

parent 81d69be3
<?php <?php
/* /*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors * Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without may be used to endorse or promote products derived from this software without
specific prior written permission. specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 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 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 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, IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 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 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/****************************************** /******************************************
* Begin Form configuration * Begin Form configuration
******************************************/ ******************************************/
$list_def_file = "list/reseller.list.php"; $list_def_file = "list/client.list.php";
$tform_def_file = "form/reseller.tform.php"; $tform_def_file = "form/client.tform.php";
/****************************************** /******************************************
* End Form configuration * End Form configuration
******************************************/ ******************************************/
require_once('../../lib/config.inc.php'); require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php'); require_once('../../lib/app.inc.php');
// Checke Berechtigungen für Modul // Checke Berechtigungen für Modul
if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) { if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
header("Location: ../index.php"); header("Location: ../index.php");
exit; exit;
} }
$app->uses("tform_actions"); $app->uses("tform_actions");
$app->tform_actions->onDelete(); $app->tform_actions->onDelete();
?> ?>
\ No newline at end of file
<?php <?php
/* /*
Copyright (c) 2005, Till Brehm, projektfarm Gmbh Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. and/or other materials provided with the distribution.
* Neither the name of ISPConfig nor the names of its contributors * Neither the name of ISPConfig nor the names of its contributors
may be used to endorse or promote products derived from this software without may be used to endorse or promote products derived from this software without
specific prior written permission. specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 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 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 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, IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 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 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/****************************************** /******************************************
* Begin Form configuration * Begin Form configuration
******************************************/ ******************************************/
$tform_def_file = "form/reseller.tform.php"; $tform_def_file = "form/client.tform.php";
/****************************************** /******************************************
* End Form configuration * End Form configuration
******************************************/ ******************************************/
require_once('../../lib/config.inc.php'); require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php'); require_once('../../lib/app.inc.php');
// Checking module permissions // Checking module permissions
if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) { if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
header("Location: ../index.php"); header("Location: ../index.php");
exit; exit;
} }
// Loading classes // Loading classes
$app->uses('tpl,tform,tform_actions'); $app->uses('tpl,tform,tform_actions');
// let tform_actions handle the page // let tform_actions handle the page
$app->tform_actions->onLoad(); $app->tform_actions->onLoad();
?> ?>
\ No newline at end of file
<?php <?php
require_once('../../lib/config.inc.php'); require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php'); require_once('../../lib/app.inc.php');
/****************************************** /******************************************
* Begin Form configuration * Begin Form configuration
******************************************/ ******************************************/
$list_def_file = "list/reseller.list.php"; $list_def_file = "list/client.list.php";
/****************************************** /******************************************
* End Form configuration * End Form configuration
******************************************/ ******************************************/
// Checking module permissions // Checking module permissions
if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) { if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
header("Location: ../index.php"); header("Location: ../index.php");
exit; exit;
} }
$app->uses('listform_actions'); $app->uses('listform_actions');
$app->listform_actions->onLoad(); $app->listform_actions->onLoad();
?> ?>
\ No newline at end of file
This diff is collapsed.
...@@ -13,6 +13,9 @@ $wb["fax_txt"] = 'Fax'; ...@@ -13,6 +13,9 @@ $wb["fax_txt"] = 'Fax';
$wb["email_txt"] = 'Email'; $wb["email_txt"] = 'Email';
$wb["internet_txt"] = 'Internet'; $wb["internet_txt"] = 'Internet';
$wb["icq_txt"] = 'ICQ'; $wb["icq_txt"] = 'ICQ';
$wb["notes_txt"] = 'Notes';
$wb["btn_save_txt"] = 'Save';
$wb["btn_cancel_txt"] = 'Cancel';
$wb["limit_client_txt"] = 'limit_client'; $wb["limit_client_txt"] = 'limit_client';
$wb["limit_domain_txt"] = 'limit_domain'; $wb["limit_domain_txt"] = 'limit_domain';
$wb["limit_subdomain_txt"] = 'limit_subdomain'; $wb["limit_subdomain_txt"] = 'limit_subdomain';
...@@ -22,16 +25,7 @@ $wb["limit_webquota_txt"] = 'limit_webquota'; ...@@ -22,16 +25,7 @@ $wb["limit_webquota_txt"] = 'limit_webquota';
$wb["limit_mailquota_txt"] = 'limit_mailquota'; $wb["limit_mailquota_txt"] = 'limit_mailquota';
$wb["limit_database_txt"] = 'limit_database'; $wb["limit_database_txt"] = 'limit_database';
$wb["ip_address_txt"] = 'ip_address'; $wb["ip_address_txt"] = 'ip_address';
$wb["notes_txt"] = 'Notes'; $wb["limit_client_error_notint"] = 'Client Limit is not a number.';
$wb["btn_save_txt"] = 'Save'; $wb["firstname_error_empty"] = 'Firstname is empty.';
$wb["btn_cancel_txt"] = 'Cancel'; $wb["surname_error_empty"] = 'Surname is empty.';
// Error Messages
$wb['limit_client_error_notint'] = 'Client Limit is not a number.';
$wb['firstname_error_empty'] = 'Firstname is empty.';
$wb['surname_error_empty'] = 'Surname is empty.';
?> ?>
\ No newline at end of file
<?php
$wb["list_head_txt"] = 'clients';
$wb["company_txt"] = 'company';
$wb["firstname_txt"] = 'firstname';
$wb["surname_txt"] = 'surname';
$wb["city_txt"] = 'city';
$wb["page_txt"] = 'Page';
$wb["page_of_txt"] = 'of';
$wb["page_next_txt"] = 'Next';
$wb["page_back_txt"] = 'Back';
$wb["delete_txt"] = 'Delete';
$wb["filter_txt"] = 'Filter';
?>
\ No newline at end of file
<?php <?php
$module = array ( $module = array (
'name' => 'resellers', 'name' => 'client',
'title' => 'Resellers', 'title' => 'Client',
'template' => 'module.tpl.htm', 'template' => 'module.tpl.htm',
'navframe_page' => '', 'navframe_page' => '',
'startpage' => 'resellers/reseller_list.php', 'startpage' => 'client/client_list.php',
'tab_width' => '', 'tab_width' => '',
'nav' => 'nav' =>
array ( array (
0 => 0 =>
array ( array (
'title' => 'Resellers', 'title' => 'Clients',
'open' => 1, 'open' => 1,
'items' => 'items' =>
array ( array (
0 => 0 =>
array ( array (
'title' => 'Add Reseller', 'title' => 'Add Client',
'target' => 'content', 'target' => 'content',
'link' => 'resellers/reseller_edit.php', 'link' => 'client/client_edit.php',
), ),
1 => 1 =>
array ( array (
'title' => 'Edit Reseller', 'title' => 'Edit Client',
'target' => 'content', 'target' => 'content',
'link' => 'resellers/reseller_list.php', 'link' => 'client/client_list.php',
), ),
), ),
), ),
...@@ -53,5 +53,5 @@ $module = array ( ...@@ -53,5 +53,5 @@ $module = array (
), ),
), ),
), ),
) )
?> ?>
\ No newline at end of file
<?php <?php
/* /*
Datatypes: Datatypes:
- INTEGER - INTEGER
- DOUBLE - DOUBLE
- CURRENCY - CURRENCY
- VARCHAR - VARCHAR
- TEXT - TEXT
- DATE - DATE
*/ */
// Name of the list // Name of the list
$liste["name"] = "resellers"; $liste["name"] = "clients";
// Database table // Database table
$liste["table"] = "reseller"; $liste["table"] = "client";
// Index index field of the database table // Index index field of the database table
$liste["table_idx"] = "reseller_id"; $liste["table_idx"] = "client_id";
// Search Field Prefix // Search Field Prefix
$liste["search_prefix"] = "search_"; $liste["search_prefix"] = "search_";
// Records per page // Records per page
$liste["records_per_page"] = 15; $liste["records_per_page"] = 15;
// Script File of the list // Script File of the list
$liste["file"] = "reseller_list.php"; $liste["file"] = "client_list.php";
// Script file of the edit form // Script file of the edit form
$liste["edit_file"] = "reseller_edit.php"; $liste["edit_file"] = "client_edit.php";
// Script File of the delete script // Script File of the delete script
$liste["delete_file"] = "reseller_del.php"; $liste["delete_file"] = "client_del.php";
// Paging Template // Paging Template
$liste["paging_tpl"] = "templates/paging.tpl.htm"; $liste["paging_tpl"] = "templates/paging.tpl.htm";
// Enable authe // Enable authe
$liste["auth"] = "yes"; $liste["auth"] = "yes";
/***************************************************** /*****************************************************
* Suchfelder * Suchfelder
*****************************************************/ *****************************************************/
$liste["item"][] = array( 'field' => "company", $liste["item"][] = array( 'field' => "company",
'datatype' => "VARCHAR", 'datatype' => "VARCHAR",
'formtype' => "TEXT", 'formtype' => "TEXT",
'op' => "like", 'op' => "like",
'prefix' => "%", 'prefix' => "%",
'suffix' => "%", 'suffix' => "%",
'width' => "", 'width' => "",
'value' => ""); 'value' => "");
$liste["item"][] = array( 'field' => "firstname", $liste["item"][] = array( 'field' => "firstname",
'datatype' => "VARCHAR", 'datatype' => "VARCHAR",
'formtype' => "TEXT", 'formtype' => "TEXT",
'op' => "like", 'op' => "like",
'prefix' => "%", 'prefix' => "%",
'suffix' => "%", 'suffix' => "%",
'width' => "", 'width' => "",
'value' => ""); 'value' => "");
$liste["item"][] = array( 'field' => "surname", $liste["item"][] = array( 'field' => "surname",
'datatype' => "VARCHAR", 'datatype' => "VARCHAR",
'formtype' => "TEXT", 'formtype' => "TEXT",
'op' => "like", 'op' => "like",
'prefix' => "%", 'prefix' => "%",
'suffix' => "%", 'suffix' => "%",
'width' => "", 'width' => "",
'value' => ""); 'value' => "");
$liste["item"][] = array( 'field' => "city", $liste["item"][] = array( 'field' => "city",
'datatype' => "VARCHAR", 'datatype' => "VARCHAR",
'formtype' => "TEXT", 'formtype' => "TEXT",
'op' => "like", 'op' => "like",
'prefix' => "%", 'prefix' => "%",
'suffix' => "%", 'suffix' => "%",
'width' => "", 'width' => "",
'value' => ""); 'value' => "");
?> ?>
\ No newline at end of file
<table width="500" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="126" class="frmText11">{tmpl_var name='company_txt'}:</td>
<td width="366" class="frmText11"><input name="company" type="text" class="text" value="{tmpl_var name='company'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='title_txt'}:</td>
<td width="366" class="frmText11">
<select name="title" class="text">
{tmpl_var name='title'}
</select>
</td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='firstname_txt'}:</td>
<td width="366" class="frmText11"><input name="firstname" type="text" class="text" value="{tmpl_var name='firstname'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='surname_txt'}:</td>
<td width="366" class="frmText11"><input name="surname" type="text" class="text" value="{tmpl_var name='surname'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='street_txt'}:</td>
<td width="366" class="frmText11"><input name="street" type="text" class="text" value="{tmpl_var name='street'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='zip_txt'}:</td>
<td width="366" class="frmText11"><input name="zip" type="text" class="text" value="{tmpl_var name='zip'}" size="10" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='city_txt'}:</td>
<td width="366" class="frmText11"><input name="city" type="text" class="text" value="{tmpl_var name='city'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='country_txt'}:</td>
<td width="366" class="frmText11"><input name="country" type="text" class="text" value="{tmpl_var name='country'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='telephone_txt'}:</td>
<td width="366" class="frmText11"><input name="telephone" type="text" class="text" value="{tmpl_var name='telephone'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='mobile_txt'}:</td>
<td width="366" class="frmText11"><input name="mobile" type="text" class="text" value="{tmpl_var name='mobile'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='fax_txt'}:</td>
<td width="366" class="frmText11"><input name="fax" type="text" class="text" value="{tmpl_var name='fax'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='email_txt'}:</td>
<td width="366" class="frmText11"><input name="email" type="text" class="text" value="{tmpl_var name='email'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='internet_txt'}:</td>
<td width="366" class="frmText11"><input name="internet" type="text" class="text" value="{tmpl_var name='internet'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='icq_txt'}:</td>
<td width="366" class="frmText11"><input name="icq" type="text" class="text" value="{tmpl_var name='icq'}" size="30" maxlength="255"></td>
</tr>
<tr>
<td width="126" class="frmText11">{tmpl_var name='notes_txt'}:</td>
<td width="366" class="frmText11"><textarea name='notes' cols='30' rows='5'>{tmpl_var name='notes'}</textarea></td>
</tr>
<tr>
<td class="frmText11">&nbsp;</td>
<td class="frmText11">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="btn_save" type="submit" class="button" value="{tmpl_var name='btn_save_txt'}">
<input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="self.location.href='reseller_list.php';">
</td>
</tr>
</table>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
\ No newline at end of file