diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d2e968b..0000000 --- a/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2016, Kristián Feldsam, FELDSAM s.r.o. -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. \ No newline at end of file diff --git a/form/dns_a_webdns.tform.php b/form/dns_a_webdns.tform.php new file mode 100755 index 0000000..84a2c8f --- /dev/null +++ b/form/dns_a_webdns.tform.php @@ -0,0 +1,171 @@ + 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"]['dns'] = array ( + 'title' => "DNS A", + 'width' => 100, + 'template' => "templates/dns_a_edit.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + 'server_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'zone' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => @$app->functions->intval($_REQUEST["zone"]), + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'name' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'IDNTOASCII'), + 1 => array( 'event' => 'SHOW', + 'type' => 'IDNTOUTF8'), + 2 => array( 'event' => 'SAVE', + 'type' => 'TOLOWER') + ), + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/', + 'errmsg'=> 'name_error_regex'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'type' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => 'A', + 'value' => '', + 'width' => '5', + 'maxlength' => '5' + ), + 'data' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'validators' => array ( + 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'), + 1 => array ( 'type' => 'ISIPV4', 'errmsg'=> 'ip_error_wrong'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + /* + 'aux' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '0', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + */ + 'ttl' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'RANGE', + 'range' => '60:', + 'errmsg'=> 'ttl_range_error'), + ), + 'default' => '3600', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + 'active' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'Y', + 'value' => array(0 => 'N', 1 => 'Y') + ), + /* + 'stamp' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + */ + 'serial' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + //################################# + // ENDE Datatable fields + //################################# + ) +); + + + +?> diff --git a/form/new_service_webdns.tform.php b/form/new_service_webdns.tform.php old mode 100644 new mode 100755 diff --git a/new_service_webdns.php b/new_service_webdns.php index 2293dac..e6de081 100755 --- a/new_service_webdns.php +++ b/new_service_webdns.php @@ -97,9 +97,6 @@ class page_action extends tform_actions { $app->tform->errorMessage = $app->tform->wordbook['error_dominio_mas_puntos']; return; - - //print 'El Dominio ¡¡NO!! es correcto, hay 3 puntos o más.

\n'; - //$this->subdom_error = true; } else if(substr_count($subdom,".") == 2){ @@ -148,15 +145,6 @@ class page_action extends tform_actions { $app->tform->errorMessage = $app->tform->wordbook['error_no_existe_dominio_padre']; $this->onError(); //return; - /*echo '
- - - - - - -
El dominio padre para este subdominio ¡NO EXISTE!
-
';*/ //print 'No existe el dominio'; return $this->subdom_error; @@ -179,8 +167,8 @@ class page_action extends tform_actions { //print "
"; print_r($paramSubDominios); print "
\n"; //$remote = new remote_actions; //Inserto en bbdd usando la clase remoto que se la he pasado en parámetros de la función - $resultado = $remoto->insert_query('../dns/form/dns_a.tform.php', $fields['client_id'], $paramSubDominios); - + //$resultado = $remoto->insert_query('../dns/form/dns_a.tform.php', $fields['client_id'], $paramSubDominios); + $resultado = $remoto->insert_query('form/dns_a_webdns.tform.php', $fields['client_id'], $paramSubDominios); echo '

Se ha dado de alta Web y Subdominio, '.$this->subdominio.', ¡Correctamente!


'; diff --git a/new_service_webdnsOLD.php b/new_service_webdnsOLD.php index 9b4d0f6..5e3960f 100755 --- a/new_service_webdnsOLD.php +++ b/new_service_webdnsOLD.php @@ -1,7 +1,9 @@ -All rights reserved. +PHP por David Ramos García, Open6Hosting +SQL y expresiones regulares por Pablo Sarria Pérez, Open6Hosting + +2017, All rights reserved. */ diff --git a/prueba.txt b/prueba.txt deleted file mode 100644 index 426c4bd..0000000 --- a/prueba.txt +++ /dev/null @@ -1,3 +0,0 @@ -linea1 -linea2 -linea3 \ No newline at end of file