Commit f62ced0b authored by tbrehm's avatar tbrehm
Browse files

Cleanup.

parent b722a1ad
This a play zone with pedro.
Ideas are to create a class that can be easily consumed.
Also make it so it works with smarty on html and JSON for the lugin ;-)
<?php
/* This is a conceptual style code for feedback and work in progress
Translates the lang of the tables also...
Please hack
*/
class ISPConfigClient
{
private $SID;
public function __construct($soap_session_id){
$this->SID = $soap_session_id;
}
//* Get Reseller List
public function reseller_get_list(){
$params = array ( 'sid' => $session_id,
'module' => 'reseller',
'function' => 'reseller_list',
'params' => ''
);
}
public function reseller($ID){
// Get Reseller
$params = array ( 'sid' => $session_id,
'module' => 'reseller',
'function' => 'reseller_get',
'params' => array ( reseller_title => "Reseller1"));
}
}
public function reseller_edit(
// Adding a reseller
$params = array ( 'sid' => $session_id,
'module' => 'reseller',
'function' => 'reseller_add',
'params' => array ( reseller_title => 'Reseller1',
firma => 'Reseller4',
vorname => 'Jens',
limit_user => '50',
limit_disk => '1000',
limit_web => '10',
limit_domain => '10',
name => 'Jensen',
strasse => 'Hauptstr. 1',
plz => '12345',
ort => 'Hauptstadt',
telefon => '0511 5469766',
fax => '0511 9799655',
email => 'test@hostobserver.com',
internet => 'http://www.reseller4.tld',
reseller_user => 'reseller4',
reseller_passwort => 'huhu',
anrede => 'Herr', // Herr, Frau, Firma
land => 'Deutschland',
limit_httpd_include => '1',
limit_dns_manager => '1',
limit_domain_dns => '50',
province => 'Niedersachsen',
limit_shell_access => '0',
limit_cgi => '1',
limit_php => '1',
limit_ssi => '1',
limit_ftp => '1',
limit_mysql => '1',
limit_ssl => '1',
limit_anonftp => '1',
limit_standard_cgis => '1',
limit_wap => '1',
limit_error_pages => '1',
limit_frontpage => '0',
limit_mysql_anzahl_dbs => '100',
limit_slave_dns => '50',
client_salutatory_email_sender_email => '',
client_salutatory_email_sender_name => '',
client_salutatory_email_bcc => '',
client_salutatory_email_subject => '',
client_salutatory_email_message => '',
standard_index => '',
user_standard_index => ''
));
}
?>
\ No newline at end of file
<script language="JavaScript">
<!--
function del_record(link) {
if(window.confirm("")) {
location.href = link;
}
}
//-->
</script>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form action="index.php" method="post" name="login" target="_self" id="login">
<table width="288" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td>&nbsp;</td>
<td>&nbsp;Admin</td>
</tr>
</table>
</form>
<?php
/*
Formular Definition
Tabellendefinition
Datentypen:
- INTEGER (Wandelt Ausdrcke in Int um)
- DOUBLE
- CURRENCY (Formatiert Zahlen nach Whrungsnotation)
- VARCHAR (kein weiterer Format Check)
- TEXT (kein weiterer Format Check)
- DATE (Datumsformat, Timestamp Umwandlung)
Formtype:
- TEXT (normales Textfeld)
- TEXTAREA (normales Textfeld)
- PASSWORD (Feldinhalt wird nicht angezeigt)
- SELECT (Gibt Werte als option Feld aus)
- RADIO
- CHECKBOX
- CHECKBOXARRAY
- FILE
VALUE:
- Wert oder Array
Hinweis:
Das ID-Feld ist nicht bei den Table Values einzufgen.
*/
$form["title"] = "Test";
$form["description"] = "Formular zum editieren der Hndler Adressen.";
$form["name"] = "test";
$form["action"] = "test_edit.php";
$form["db_table"] = "test";
$form["db_table_idx"] = "id";
$form["db_history"] = "yes";
$form["tab_default"] = "adresse";
$form["list_default"] = "test_list.php";
$form["auth"] = 'no';
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['address'] = array (
'title' => "Address",
'width' => 100,
'template' => "templates/reseller_edit_address.htm",
'fields' => array (
##################################
# Begin Datatable fields
##################################
'company' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'title' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
'value' => array('Mrs.' => 'Mrs.','Mr.'=>'Mr.','Company'=>'Company'),
'separator' => '',
'width' => '',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'firstname' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'firstname_error_empty'),
),
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'surname' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'surname_error_empty'),
),
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'street' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'zip' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'city' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'country' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'telephone' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'mobile' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'fax' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'email' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'internet' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'http://',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'icq' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
'separator' => '',
'width' => '30',
'maxlength' => '255',
'rows' => '',
'cols' => ''
),
'notes' => array (
'datatype' => 'TEXT',
'formtype' => 'TEXTAREA',
'default' => '',
'value' => '',
'separator' => '',
'width' => '',
'maxlength' => '',
'rows' => '10',
'cols' => '30'
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['limits'] = array (
'title' => "Limits",
'width' => 80,
'template' => "templates/reseller_edit_limits.htm",
'fields' => array (
##################################
# Beginn Datatable fields
##################################
'limit_client' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_client_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_domain' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_domain_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_subdomain' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_client_subdomain_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_mailbox' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_mailbox_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_mailalias' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_mailalias_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_webquota' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_webquota_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_mailquota' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_mailquota_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_database' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_database_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
##################################
# ENDE Datatable fields
##################################
)
);
$form["tabs"]['users'] = array (
'title' => "CP Users",
'width' => 100,
'template' => "templates/reseller_edit_users.htm",
'fields' => array (
##################################
# Beginn Datatable fields
##################################
##################################
# ENDE Datatable fields
##################################
),
'plugins' => array (
'cpuser_list' => array (
'class' => 'plugin_listview',
'options' => array('listdef' => 'list/users.list.php')
)
)
);
$form["tabs"]['ipaddress'] = array (
'title' => "IP Addresses",
'width' => 100,
'template' => "templates/reseller_edit_ipaddress.htm",
'fields' => array (
##################################
# Beginn Datatable fields
##################################
'ip_address' => array (
'datatype' => 'TEXT',
'formtype' => 'CHECKBOXARRAY',
'default' => '',
'value' => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'),
'separator' => ';'
),
##################################
# ENDE Datatable fields
##################################
)
);
?>
\ No newline at end of file
<?php
?>
\ No newline at end of file
<?php
$wb["KD_Nr_txt"] = 'KD_Nr';
$wb["kdnr_err"] = 'kdnr_err';
$wb["PLZ_Index_txt"] = 'PLZ_Index';
$wb["Name1_txt"] = 'Name1';
$wb["Name2_txt"] = 'Name2';
$wb["Strasse_txt"] = 'Strasse';
$wb["Ort_txt"] = 'Ort';
$wb["Telefon_txt"] = 'Telefon';
$wb["Fax_txt"] = 'Fax';
$wb["email_txt"] = 'email';
$wb["Internet_txt"] = 'Internet';
$wb["Verkauft_txt"] = 'Verkauft';
$wb["bem_txt"] = 'Bemerkungen';
$wb["Typ_txt"] = 'Typ';
$wb["Land_lt_Haendler_txt"] = 'Land laut Hndler';
$wb["Land_dt_txt"] = 'Land (de)';
$wb["Land_int_txt"] = 'Land (int)';
$wb["LK_txt"] = 'Lnderkrzel';
$wb["Region_txt"] = 'Region';
?>
\ No newline at end of file
<?php
$module = array (
'name' => 'test',
'title' => 'Test',
'template' => 'module.tpl.htm',
'navframe_page' => '',
'startpage' => 'test/index.php',
'tab_width' => '',
'nav' =>
array (
0 =>
array (
'title' => 'tespanel',
'open' => 1,
'items' =>
array (
0 =>
array (
'title' => 'Halloooo',
'target' => 'content',
'link' => 'test/hallo.php',
),
),
),
1 =>
array (
'title' => 'm333',
'open' => 1,
'items' =>
array (
0 =>
array (
'title' => 'edit',
'target' => 'content',
'link' => 'resellers/reseller_list.php',
),
1 =>
array (
'title' => 'add',
'target' => '_top',
'link' => 'http://webmail.ensign.de',
),
2 =>
array (
'title' => 'ewtewew',
'target' => 'content',
'link' => 'test/link.php',
),
),
),
2 =>
array (