From cvs w lms.org.pl Wed Feb 3 15:38:02 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 3 Feb 2010 15:38:02 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (domainf.php) Message-ID: <20100203143802.96396302B32A@hydra.altec.pl> Date: Wednesday, February 3, 2010 @ 15:38:02 Author: webvisor Path: /cvsroot/lms/modules Added: domainf.php New functionf.php file with tools for Hosting/Domains Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/domainf.php?rev=1.1 Index: lms/modules/domainf.php diff -u /dev/null lms/modules/domainf.php:1.1 --- /dev/null Wed Feb 3 15:38:02 2010 +++ lms/modules/domainf.php Wed Feb 3 15:38:02 2010 @@ -0,0 +1,152 @@ + for more details. + * + * Copyright 2007-2009 Rejo Zenger + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + * + */ + +$valid_tlds = array( + "ac", "ad", "ae", "aero", "af", "ag", "ai", "al", "am", "an", "ao", "aq", "ar", + "arpa", "as", "asia", "at", "au", "aw", "ax", "az", "ba", "bb", "bd", "be", + "bf", "bg", "bh", "bi", "biz", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", + "bw", "by", "bz", "ca", "cat", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", + "cm", "cn", "co", "com", "coop", "cr", "cu", "cv", "cx", "cy", "cz", "de", "dj", + "dk", "dm", "do", "dz", "ec", "edu", "ee", "eg", "er", "es", "et", "eu", "fi", + "fj", "fk", "fm", "fo", "fr", "ga", "gb", "gd", "ge", "gf", "gg", "gh", "gi", + "gl", "gm", "gn", "gov", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", + "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", "im", "in", "info", "int", "io", + "iq", "ir", "is", "it", "je", "jm", "jo", "jobs", "jp", "ke", "kg", "kh", "ki", + "km", "kn", "kp", "kr", "kw", "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", + "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "me", "mg", "mh", "mil", "mk", + "ml", "mm", "mn", "mo", "mobi", "mp", "mq", "mr", "ms", "mt", "mu", "museum", + "mv", "mw", "mx", "my", "mz", "na", "name", "nc", "ne", "net", "nf", "ng", "ni", + "nl", "no", "np", "nr", "nu", "nz", "om", "org", "pa", "pe", "pf", "pg", "ph", + "pk", "pl", "pm", "pn", "pr", "pro", "ps", "pt", "pw", "py", "qa", "re", "ro", + "rs", "ru", "rw", "sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sj", "sk", + "sl", "sm", "sn", "so", "sr", "st", "su", "sv", "sy", "sz", "tc", "td", "tel", + "tf", "tg", "th", "tj", "tk", "tl", "tm", "tn", "to", "tp", "tr", "travel", + "tt", "tv", "tw", "tz", "ua", "ug", "uk", "um", "us", "uy", "uz", "va", "vc", + "ve", "vg", "vi", "vn", "vu", "wf", "ws", "xn--0zwm56d", "xn--11b5bs3a9aj6g", + "xn--80akhbyknj4f", "xn--9t4b11yi5a", "xn--deba0ad", "xn--g6w251d", + "xn--hgbk6aj7f53bba", "xn--hlcj6aya9esc7a", "xn--jxalpdlp", "xn--kgbechtv", + "xn--zckzah", "ye", "yt", "yu", "za", "zm", "zw"); + + +function is_not_valid_hostname_fqdn($hostname, $wildcard, $dns_strict_tld_check) { + + global $valid_tlds; + $hostname = ereg_replace("\.$","",$hostname); + + if (strlen($hostname) > 255) { + return "The hostname is too long"; + } + + $hostname_labels = explode ('.', $hostname); + $label_count = count($hostname_labels); + + foreach ($hostname_labels as $hostname_label) { + if ($wildcard == 1 && !isset($first)) { + if (!preg_match('/^(\*|[a-zA-Z0-9-\/]+)$/',$hostname_label)) { return "You have invalid characters in your hostname"; } + $first = 1; + } else { + if (!preg_match('/^[a-zA-Z0-9-\/]+$/',$hostname_label)) { return "You have invalid characters in your hostname"; } + } + if (substr($hostname_label, 0, 1) == "-") { return "A hostname can not start or end with a dash"; } + if (substr($hostname_label, -1, 1) == "-") { return "A hostname can not start or end with a dash"; } + if (strlen($hostname_label) < 1 || strlen($hostname_label) > 63) { return "Given hostname or one of the labels is too short or too long"; } + } + + if ($hostname_labels[$label_count-1] == "arpa" && (substr_count($hostname_labels[0], "/") == 1 XOR substr_count($hostname_labels[1], "/") == 1)) { + if (substr_count($hostname_labels[0], "/") == 1) { + $array = explode ("/", $hostname_labels[0]); + } else { + $array = explode ("/", $hostname_labels[1]); + } + if (count($array) != 2) { return "Invalid hostname" ;} + if (!is_numeric($array[0]) || $array[0] < 0 || $array[0] > 255) { return "Invalid hostname"; } + if (!is_numeric($array[1]) || $array[1] < 25 || $array[1] > 31) { return "Invalid hostname"; } + } else { + if (substr_count($hostname, "/") > 0) { return "Given hostname has too many slashes"; } + } + + if ($dns_strict_tld_check == "1" && !in_array($hostname_labels[$label_count-1], $valid_tlds)) { + return "You are using an invalid top level domain"; + } + + return false; +} + + +function update_soa_serial($did){ + +GLOBAL $DB; + +$soarecordq=$DB->GetRow("SELECT * from records where domain_id = $did and type='SOA'"); + +$soa=explode(" ",$soarecordq['content']); + + +if ($soa[2] == "0") { + return true; + } elseif ($soa[2] == date('Ymd') . "99") { + return true; + } else { + $today = date('Ymd'); + + // Determine revision. + if (strncmp($today, $soa[2], 8) === 0) { + // Current serial starts with date of today, so we need to update + // the revision only. To do so, determine current revision first, + // then update counter. + $revision = (int) substr($soa[2], -2); + ++$revision; + } else { + // Current serial did not start of today, so it's either an older + // serial or a serial that does not adhere the recommended syntax + // of RFC-1912. In either way, set a fresh serial + $revision = "00"; + } + + $serial = $today . str_pad($revision, 2, "0", STR_PAD_LEFT);; + + // Change serial in SOA array. + $soa[2] = $serial; + + // Build new SOA record content and update the database. + $content = ""; + for ($i = 0; $i < count($soa); $i++) { + $content .= $soa[$i] . " "; + } + } + + + $DB->Execute('UPDATE records SET content = ? + WHERE id = ?', + array( $content, + $soarecordq['id'], + )); + +} + +?> From cvs w lms.org.pl Wed Feb 3 15:43:03 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 3 Feb 2010 15:43:03 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib (config.php) Message-ID: <20100203144303.751C2302B32B@hydra.altec.pl> Date: Wednesday, February 3, 2010 @ 15:43:03 Author: webvisor Path: /cvsroot/lms/lib Modified: config.php Added some improvements and data validation for Hosting/Domains Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/config.php.diff?&r1=1.6&r2=1.7 Index: lms/lib/config.php diff -u lms/lib/config.php:1.6 lms/lib/config.php:1.7 --- lms/lib/config.php:1.6 Wed Nov 18 15:56:12 2009 +++ lms/lib/config.php Wed Feb 3 15:43:03 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: config.php,v 1.6 2009/11/18 14:56:12 alec Exp $ + * $Id: config.php,v 1.7 2010/02/03 14:43:03 webvisor Exp $ */ function chkconfig($value, $default = FALSE) @@ -141,6 +141,19 @@ 'smtp_host' => '127.0.0.1', 'smtp_port' => '25' ), + 'zones' => array( + 'hostmaster_mail' => 'hostmaster.localhost', + 'master_dns' => 'localhost', + 'slave_dns' => 'localhost', + 'default_ttl' => '3600', + 'ttl_refresh' => '28800', + 'ttl_retry' => '7200', + 'ttl_expire' => '604800', + 'ttl_minimum' => '86400', + 'default_webserver_ip' => '127.0.0.1', + 'default_mailserver_ip' => '127.0.0.1', + 'default_mx' => 'localhost' + ), ); foreach($DEFAULTS as $section => $values) From cvs w lms.org.pl Wed Feb 3 15:43:03 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 3 Feb 2010 15:43:03 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/locale/pl (strings.php) Message-ID: <20100203144303.95474302B32D@hydra.altec.pl> Date: Wednesday, February 3, 2010 @ 15:43:03 Author: webvisor Path: /cvsroot/lms/lib/locale/pl Modified: strings.php Added some improvements and data validation for Hosting/Domains Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/locale/pl/strings.php.diff?&r1=1.344&r2=1.345 Index: lms/lib/locale/pl/strings.php diff -u lms/lib/locale/pl/strings.php:1.344 lms/lib/locale/pl/strings.php:1.345 --- lms/lib/locale/pl/strings.php:1.344 Fri Nov 13 12:29:08 2009 +++ lms/lib/locale/pl/strings.php Wed Feb 3 15:43:03 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: strings.php,v 1.344 2009/11/13 11:29:08 webvisor Exp $ + * $Id: strings.php,v 1.345 2010/02/03 14:43:03 webvisor Exp $ */ $_LANG['$0 ($1 addresses)'] = '$0 ($1 adresów)'; @@ -2268,5 +2268,6 @@ $_LANG['No such records in database.'] = 'Nie ma rekordów w bazie danych'; $_LANG['Domain type:'] = 'Typ domeny:'; $_LANG['Records number:'] = 'Liczba rekordów:'; - +$_LANG['Domain type:'] = 'Typ domeny:'; +$_LANG['Show zones beginning with:'] = 'Pokaż domeny zaczynające się od:'; ?> From cvs w lms.org.pl Wed Feb 3 15:43:03 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 3 Feb 2010 15:43:03 +0100 (CET) Subject: [lms-commits] CVS update of lms/modules (4 files) Message-ID: <20100203144303.C4BBA302B32A@hydra.altec.pl> Date: Wednesday, February 3, 2010 @ 15:43:03 Author: webvisor Path: /cvsroot/lms/modules Modified: configlist.php configload.php domainadd.php domainlist.php Added some improvements and data validation for Hosting/Domains Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/modules/configlist.php.diff?&r1=1.60&r2=1.61 http://cvs.lms.org.pl/viewvc/Development/lms/modules/configload.php.diff?&r1=1.37&r2=1.38 http://cvs.lms.org.pl/viewvc/Development/lms/modules/domainadd.php.diff?&r1=1.21&r2=1.22 http://cvs.lms.org.pl/viewvc/Development/lms/modules/domainlist.php.diff?&r1=1.26&r2=1.27 Index: lms/modules/configlist.php diff -u lms/modules/configlist.php:1.60 lms/modules/configlist.php:1.61 --- lms/modules/configlist.php:1.60 Wed Nov 18 15:56:12 2009 +++ lms/modules/configlist.php Wed Feb 3 15:43:03 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: configlist.php,v 1.60 2009/11/18 14:56:12 alec Exp $ + * $Id: configlist.php,v 1.61 2010/02/03 14:43:03 webvisor Exp $ */ function GetConfigList($order='var,asc', $section='') @@ -474,7 +474,48 @@ break; } //end: var break; - + + case 'zones': + switch($item['var']) + { + case 'hostmaster_mail': + $config[$idx]['description'] = trans('Domain admin e-mail address.'); + break; + case 'master_dns': + $config[$idx]['description'] = trans('Primary Name Server name (should be a FQDN).'); + break; + case 'slave_dns': + $config[$idx]['description'] = trans('Secondary Name Server name (should be a FQDN).'); + break; + case 'default_mx': + $config[$idx]['description'] = trans('Mail Exchange (MX) name record which identifies the name of the server that handles mail for domain (should be a FQDN).'); + break; + case 'default_ttl': + $config[$idx]['description'] = trans('The default expiration time of a resource record. Default 86400.'); + break; + case 'ttl_refresh': + $config[$idx]['description'] = trans('Time after slave server refreshes records. Default 28800.'); + break; + case 'ttl_retry': + $config[$idx]['description'] = trans('Slave server retry time in case of a problem. Default 7200.'); + break; + case 'ttl_expire': + $config[$idx]['description'] = trans('Records expiration time. Default 604800.'); + break; + case 'ttl_minimum': + $config[$idx]['description'] = trans('Minimum caching time in case of failed lookups. Default 86400.'); + break; + case 'default_webserver_ip': + $config[$idx]['description'] = trans('IP address of webserver.'); + break; + case 'default_mailserver_ip': + $config[$idx]['description'] = trans('IP address of mailserver.'); + break; + + + } //end: var + break; + default: $config[$idx]['description'] = trans('Unknown option. No description.'); break; Index: lms/modules/configload.php diff -u lms/modules/configload.php:1.37 lms/modules/configload.php:1.38 --- lms/modules/configload.php:1.37 Wed Nov 18 15:56:12 2009 +++ lms/modules/configload.php Wed Feb 3 15:43:03 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: configload.php,v 1.37 2009/11/18 14:56:12 alec Exp $ + * $Id: configload.php,v 1.38 2010/02/03 14:43:03 webvisor Exp $ */ $SESSION->restore('conls', $section); @@ -114,6 +114,14 @@ ); } +if(!empty($CONFIG['zones']) && (!$section || $section = 'zones')) +foreach($CONFIG['zones'] as $key => $val) +{ + $DB->Execute('INSERT INTO uiconfig(section, var, value) VALUES(?,?,?)', + array('zones', $key, parse_cfg_val($val)) + ); +} + $DB->CommitTrans(); header('Location: ?m=configlist'); Index: lms/modules/domainadd.php diff -u lms/modules/domainadd.php:1.21 lms/modules/domainadd.php:1.22 --- lms/modules/domainadd.php:1.21 Wed Nov 4 15:58:27 2009 +++ lms/modules/domainadd.php Wed Feb 3 15:43:03 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: domainadd.php,v 1.21 2009/11/04 14:58:27 webvisor Exp $ + * $Id: domainadd.php,v 1.22 2010/02/03 14:43:03 webvisor Exp $ */ function GetDomainIdByName($name) @@ -38,26 +38,27 @@ $domainadd['name'] = trim($domainadd['name']); $domainadd['description'] = trim($domainadd['description']); - - if($domainadd['name']=='' && $domainadd['description']=='') - { - $SESSION->redirect('?m=domainlist'); - } - + $domainadd['master'] = trim($domainadd['master']); + if($domainadd['type'] == 'SLAVE'){ if (!check_ip($domainadd['master'])) $error['master'] = trans('IP address of master NS is required!'); } - else + else { $domainadd['master']=""; - + if (!check_ip($domainadd['ipwebserver'])) $error['ipwebserwer'] = trans('IP address of webserver is required!'); + if (!check_ip($domainadd['ipmailserver'])) $error['ipmailserwer'] = trans('IP address of mailserver is required!'); + } + - if($domainadd['name'] == '') - $error['name'] = trans('Domain name is required!'); - elseif(!preg_match('/^[a-z0-9._-]+$/', $domainadd['name'])) - $error['name'] = trans('Domain name contains forbidden characters!'); - elseif(GetDomainIdByName($domainadd['name'])) - $error['name'] = trans('Domain with specified name exists!'); + include('domainf.php'); + + + $errorname=trans(is_not_valid_hostname_fqdn($domainadd['name'],0,1)); + if ($errorname) $error['name']=$errorname; + if(GetDomainIdByName($domainadd['name'])) + $error['name'] = trans('Domain with specified name exists!'); + if($domainadd['ownerid']) { $limits = $LMS->GetHostingLimits($domainadd['ownerid']); @@ -73,6 +74,8 @@ } } + + if(!$error) { $DB->Execute('INSERT INTO domains (name, ownerid, type, master, description) VALUES (?,?,?,?,?)', @@ -81,7 +84,23 @@ $domainadd['type'], $domainadd['master'], $domainadd['description'])); + $lid=$DB->GetOne('SELECT LAST_INSERT_ID() AS lid' ); + + if ($domainadd['type']!="SLAVE"){ + + $tlds=explode(".",$domainadd['name']); + + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'SOA',0,'".$CONFIG['zones']['master_dns']." ".$CONFIG['zones']['hostmaster_mail']." ".date('Ymd')."00 ".$CONFIG['zones']['ttl_refresh']." ".$CONFIG['zones']['ttl_retry']." ".$CONFIG['zones']['ttl_expire']." ".$CONFIG['zones']['ttl_minimum']."')"); + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'NS',0,'".$CONFIG['zones']['master_dns']."')"); + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'NS',0,'".$CONFIG['zones']['slave_dns']."')"); + if ($tlds[count($tlds)-2].$tlds[count($tlds)-1]!="in-addrarpa"){ + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'A',0,'".$domainadd['ipwebserver']."')"); + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'www.$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'A',0,'".$domainadd['ipwebserver']."')"); + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'mail.$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'A',0,'".$domainadd['ipmailserver']."')"); + $DB->Execute("INSERT INTO records(domain_id,name,ttl,type,prio,content) VALUES ($lid,'$domainadd[name]',".$CONFIG['zones']['default_ttl'].",'MX',10,'".$CONFIG['zones']['default_mx']."')"); + } + } if(!isset($domainadd['reuse'])) { $SESSION->redirect('?m=domainlist'); @@ -96,6 +115,14 @@ $domainadd['ownerid'] = intval($_GET['cid']); } + + if (empty($domainadd['ipwebserver'])) + $domainadd['ipwebserver']=$CONFIG['zones']['default_webserver_ip']; + + if (empty($domainadd['ipmailserver'])) + $domainadd['ipmailserver']=$CONFIG['zones']['default_mailserver_ip']; + + $layout['pagetitle'] = trans('New Domain'); $SESSION->save('backto', $_SERVER['QUERY_STRING']); Index: lms/modules/domainlist.php diff -u lms/modules/domainlist.php:1.26 lms/modules/domainlist.php:1.27 --- lms/modules/domainlist.php:1.26 Fri Nov 13 13:35:09 2009 +++ lms/modules/domainlist.php Wed Feb 3 15:43:03 2010 @@ -21,10 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: domainlist.php,v 1.26 2009/11/13 12:35:09 webvisor Exp $ + * $Id: domainlist.php,v 1.27 2010/02/03 14:43:03 webvisor Exp $ */ -function GetDomainList($order='name,asc', $customer='') +function GetDomainList($order='name,asc', $customer='', $filtr='') { global $DB; @@ -57,7 +57,8 @@ .$DB->Concat('lastname', "' '",'c.name').' AS customername FROM domains d LEFT JOIN customers c ON (d.ownerid = c.id) ' - .($customer != '' ? ' WHERE d.ownerid = '.intval($customer) : '') + . ' WHERE d.name '.($filtr==1?' REGEXP "^[0-9]"':' LIKE "'.$filtr.'%" ') + .($customer != '' ? ' AND d.ownerid = '.intval($customer) : '') .($sqlord != '' ? $sqlord : '')); $list['total'] = sizeof($list); @@ -85,8 +86,29 @@ $layout['pagetitle'] = trans('Domains List'); -$domainlist = GetDomainList($o, $c); +if(!isset($_GET['f'])) +$SESSION->restore('dfi', $f); + +else + $f = substr($_GET['f'],0,1); + +$SESSION->save('dfi', $f); + +$domainlist = GetDomainList($o, $c, $f); + +$domainlistcount = GetDomainList($o, $c); +$domaincount=""; + if (is_array($domainlistcount)) + foreach ($domainlistcount as $line){ + if (is_array($line)) + if (is_numeric(substr($line['name'],0,1))) + $domaincount['numeric']+=1; + else + $domaincount[substr($line['name'],0,1)]+=1; + } + + $listdata['total'] = $domainlist['total']; $listdata['order'] = $domainlist['order']; $listdata['direction'] = $domainlist['direction']; @@ -99,6 +121,9 @@ $page = (empty($_GET['page']) ? 1 : $_GET['page']); $pagelimit = (empty($CONFIG['phpui']['domainlist_pagelimit']) ? $listdata['total'] : $CONFIG['phpui']['domainlist_pagelimit']); + + if ($page > ceil($listdata['total']/$pagelimit)) $page=1; + $start = ($page - 1) * $pagelimit; $SESSION->save('dlp', $page); @@ -107,8 +132,10 @@ $SMARTY->assign('pagelimit', $pagelimit); $SMARTY->assign('page', $page); +$SMARTY->assign('f', $f); $SMARTY->assign('start', $start); $SMARTY->assign('domainlist', $domainlist); +$SMARTY->assign('domaincount',$domaincount); $SMARTY->assign('listdata', $listdata); $SMARTY->assign('customerlist',$LMS->GetCustomerNames()); $SMARTY->display('domainlist.html'); From cvs w lms.org.pl Wed Feb 3 15:43:04 2010 From: cvs w lms.org.pl (LMS CVS) Date: Wed, 3 Feb 2010 15:43:04 +0100 (CET) Subject: [lms-commits] CVS update of lms/templates (8 files) Message-ID: <20100203144304.18F7C302B32B@hydra.altec.pl> Date: Wednesday, February 3, 2010 @ 15:43:04 Author: webvisor Path: /cvsroot/lms/templates Modified: configadd.html configedit.html configlist.html domainadd.html domainedit.html domainlist.html recordadd.html recordslist.html Added some improvements and data validation for Hosting/Domains Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/templates/configadd.html.diff?&r1=1.19&r2=1.20 http://cvs.lms.org.pl/viewvc/Development/lms/templates/configedit.html.diff?&r1=1.18&r2=1.19 http://cvs.lms.org.pl/viewvc/Development/lms/templates/configlist.html.diff?&r1=1.20&r2=1.21 http://cvs.lms.org.pl/viewvc/Development/lms/templates/domainadd.html.diff?&r1=1.17&r2=1.18 http://cvs.lms.org.pl/viewvc/Development/lms/templates/domainedit.html.diff?&r1=1.15&r2=1.16 http://cvs.lms.org.pl/viewvc/Development/lms/templates/domainlist.html.diff?&r1=1.21&r2=1.22 http://cvs.lms.org.pl/viewvc/Development/lms/templates/recordadd.html.diff?&r1=1.3&r2=1.4 http://cvs.lms.org.pl/viewvc/Development/lms/templates/recordslist.html.diff?&r1=1.2&r2=1.3 Index: lms/templates/configadd.html diff -u lms/templates/configadd.html:1.19 lms/templates/configadd.html:1.20 --- lms/templates/configadd.html:1.19 Tue Mar 17 14:19:52 2009 +++ lms/templates/configadd.html Wed Feb 3 15:43:03 2010 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

@@ -21,6 +21,7 @@ + Index: lms/templates/configedit.html diff -u lms/templates/configedit.html:1.18 lms/templates/configedit.html:1.19 --- lms/templates/configedit.html:1.18 Tue Mar 17 14:19:52 2009 +++ lms/templates/configedit.html Wed Feb 3 15:43:03 2010 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

@@ -21,6 +21,7 @@ + Index: lms/templates/configlist.html diff -u lms/templates/configlist.html:1.20 lms/templates/configlist.html:1.21 --- lms/templates/configlist.html:1.20 Wed Aug 26 11:22:21 2009 +++ lms/templates/configlist.html Wed Feb 3 15:43:03 2010 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

@@ -31,6 +31,7 @@ + Index: lms/templates/domainadd.html diff -u lms/templates/domainadd.html:1.17 lms/templates/domainadd.html:1.18 --- lms/templates/domainadd.html:1.17 Wed Nov 4 15:58:27 2009 +++ lms/templates/domainadd.html Wed Feb 3 15:43:03 2010 @@ -1,5 +1,5 @@ {include file="header.html"} - +

{$layout.pagetitle}

@@ -8,8 +8,8 @@

- + + + + + + + + + + + + + + -
- {t}Domain:{/t} + + {t}Domain:{/t} @@ -37,25 +37,46 @@ {t}Type:{/t} - -
+ + {t}IP address of webserver:{/t} + + +
+ + {t}IP address of mailserver:{/t} + + +
+ {t}Description:{/t} @@ -71,6 +92,26 @@

+ {literal} + + {/literal} + -  © 2001-2008 LMS Developers +  © 2001-2010 LMS Developers {* omijamy problem z dzialaniem klawisza Enter *} Index: lms/templates/login.html diff -u lms/templates/login.html:1.52.2.1 lms/templates/login.html:1.52.2.2 --- lms/templates/login.html:1.52.2.1 Fri Jan 4 08:58:25 2008 +++ lms/templates/login.html Fri Feb 26 10:39:28 2010 @@ -1,5 +1,5 @@ - + @@ -20,7 +20,7 @@ {t}LMS version{/t} {$layout.lmsv} ({$layout.lmsvr})

- © 2001-2008 LMS Developers



+ © 2001-2010 LMS Developers


{if $error}{$error}{else} {/if}

Index: lms/templates/receipt.html diff -u lms/templates/receipt.html:1.9.2.1 lms/templates/receipt.html:1.9.2.2 --- lms/templates/receipt.html:1.9.2.1 Fri Jan 4 08:58:25 2008 +++ lms/templates/receipt.html Fri Feb 26 10:39:28 2010 @@ -1,4 +1,4 @@ - + {if !$receipt.last}
{/if} {if !$type || $type == "original"}
@@ -133,7 +133,7 @@ - Copyright © 2001-2008 LMS Developers + Copyright © 2001-2010 LMS Developers @@ -273,7 +273,7 @@ - Copyright © 2001-2008 LMS Developers + Copyright © 2001-2010 LMS Developers From cvs w lms.org.pl Fri Feb 26 10:47:00 2010 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 26 Feb 2010 10:47:00 +0100 (CET) Subject: [lms-commits] CVS update of LMS_0110 lms/devel (buildpack.sh) Message-ID: <20100226094701.023673027B29@hydra.altec.pl> Date: Friday, February 26, 2010 @ 10:47:00 Author: alec Path: /cvsroot/lms/devel Tag: LMS_0110 Modified: buildpack.sh - fix link to cvs repository Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/devel/buildpack.sh.diff?&r1=1.32.2.11&r2=1.32.2.12 Index: lms/devel/buildpack.sh diff -u lms/devel/buildpack.sh:1.32.2.11 lms/devel/buildpack.sh:1.32.2.12 --- lms/devel/buildpack.sh:1.32.2.11 Fri Feb 26 10:39:11 2010 +++ lms/devel/buildpack.sh Fri Feb 26 10:47:00 2010 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Id: buildpack.sh,v 1.32.2.11 2010/02/26 09:39:11 alec Exp $ +# $Id: buildpack.sh,v 1.32.2.12 2010/02/26 09:47:00 alec Exp $ # # Bardzo głupi skrypt do budowania paczek z LMS'em # @@ -44,7 +44,7 @@ # pobieramy LMSa X=$RANDOM mkdir -p $TEMPDIR/$X -wget --proxy=off "http://cvs.lms.org.pl/viewvc/lms.tar.gz?view=tar&pathrev=${CVSTAG}" -O $TEMPDIR/$X/lms.tar.gz +wget --proxy=off "http://cvs.lms.org.pl/viewvc/Development/lms.tar.gz?view=tar&pathrev=${CVSTAG}" -O $TEMPDIR/$X/lms.tar.gz umask 022 cd $TEMPDIR/$X/ # ropakowujemy From cvs w lms.org.pl Fri Feb 26 10:47:51 2010 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 26 Feb 2010 10:47:51 +0100 (CET) Subject: [lms-commits] CVS update of lmsweb (download.php, version_names.txt) Message-ID: <20100226094751.878653027B29@hydra.altec.pl> Date: Friday, February 26, 2010 @ 10:47:51 Author: alec Path: /cvsroot/lmsweb Modified: download.php version_names.txt - 1.10.7 Sina Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lmsweb/download.php.diff?&r1=1.101&r2=1.102 http://cvs.lms.org.pl/viewvc/Development/lmsweb/version_names.txt.diff?&r1=1.59&r2=1.60 Index: lmsweb/download.php diff -u lmsweb/download.php:1.101 lmsweb/download.php:1.102 --- lmsweb/download.php:1.101 Wed Oct 28 12:30:20 2009 +++ lmsweb/download.php Fri Feb 26 10:47:51 2010 @@ -9,7 +9,7 @@ return sprintf('%.' . $dec_places . 'f B', $kbytes); } -$ver[] = "2009/03/27:1.10/lms-1.10.6.tar.gz:1.10.6"; +$ver[] = "2010/02/26:1.10/lms-1.10.7.tar.gz:1.10.7"; $ver[] = "2009/10/28:1.11/lms-1.11.9.tar.gz:1.11.9"; switch($lang) Index: lmsweb/version_names.txt diff -u lmsweb/version_names.txt:1.59 lmsweb/version_names.txt:1.60 --- lmsweb/version_names.txt:1.59 Wed Oct 28 10:25:01 2009 +++ lmsweb/version_names.txt Fri Feb 26 10:47:51 2010 @@ -1,4 +1,4 @@ -$Id: version_names.txt,v 1.59 2009/10/28 09:25:01 alec Exp $ +$Id: version_names.txt,v 1.60 2010/02/26 09:47:51 alec Exp $ Yep. Wrzuciłem to tutaj żeby nie było widać tego nigdzie a żeby każdy developer miał do tego dostęp. @@ -156,6 +156,7 @@ 1.10.4 - Pyrus 1.10.5 - Neith 1.10.6 - Hank +1.10.7 - Sina Branch 1.11.x (devel) From cvs w lms.org.pl Fri Feb 26 10:47:51 2010 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 26 Feb 2010 10:47:51 +0100 (CET) Subject: [lms-commits] CVS update of lmsweb/download/1.10 (2 files) Message-ID: <20100226094751.A80893027B2B@hydra.altec.pl> Date: Friday, February 26, 2010 @ 10:47:51 Author: alec Path: /cvsroot/lmsweb/download/1.10 Added: lms-1.10.7.tar.gz lms-1.10.7.tar.gz.md5 - 1.10.7 Sina Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lmsweb/download/1.10/lms-1.10.7.tar.gz?rev=1.1 http://cvs.lms.org.pl/viewvc/Development/lmsweb/download/1.10/lms-1.10.7.tar.gz.md5?rev=1.1 Index: lmsweb/download/1.10/lms-1.10.7.tar.gz <> Index: lmsweb/download/1.10/lms-1.10.7.tar.gz.md5 diff -u /dev/null lmsweb/download/1.10/lms-1.10.7.tar.gz.md5:1.1 --- /dev/null Fri Feb 26 10:47:51 2010 +++ lmsweb/download/1.10/lms-1.10.7.tar.gz.md5 Fri Feb 26 10:47:51 2010 @@ -0,0 +1 @@ +7e096735b0e4fbda9ea9d12e7b4a6c99 lms-1.10.7.tar.gz From cvs w lms.org.pl Fri Feb 26 16:34:02 2010 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 26 Feb 2010 16:34:02 +0100 (CET) Subject: [lms-commits] CVS update of lms/userpanel (index.php) Message-ID: <20100226153402.9AB4C3027B29@hydra.altec.pl> Date: Friday, February 26, 2010 @ 16:34:02 Author: chilek Path: /cvsroot/lms/userpanel Modified: index.php - security fix: add module name validation for userpanel Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/userpanel/index.php.diff?&r1=1.7&r2=1.8 Index: lms/userpanel/index.php diff -u lms/userpanel/index.php:1.7 lms/userpanel/index.php:1.8 --- lms/userpanel/index.php:1.7 Fri Oct 16 13:01:11 2009 +++ lms/userpanel/index.php Fri Feb 26 16:34:02 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: index.php,v 1.7 2009/10/16 11:01:11 alec Exp $ + * $Id: index.php,v 1.8 2010/02/26 15:34:02 chilek Exp $ */ // REPLACE THIS WITH PATH TO YOUR CONFIG FILE @@ -163,7 +163,7 @@ if($SESSION->islogged) { - $module = isset($_GET['m']) ? $_GET['m'] : ''; + $module = isset($_GET['m']) ? preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['m']) : ''; if (isset($USERPANEL->MODULES[$module])) $USERPANEL->MODULES[$module]['selected'] = true; From cvs w lms.org.pl Fri Feb 26 16:38:21 2010 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 26 Feb 2010 16:38:21 +0100 (CET) Subject: [lms-commits] CVS update of lms/userpanel (index.php) Message-ID: <20100226153821.2FFA03027B29@hydra.altec.pl> Date: Friday, February 26, 2010 @ 16:38:21 Author: chilek Path: /cvsroot/lms/userpanel Modified: index.php - revert previous commit as it's not necessary Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/userpanel/index.php.diff?&r1=1.8&r2=1.9 Index: lms/userpanel/index.php diff -u lms/userpanel/index.php:1.8 lms/userpanel/index.php:1.9 --- lms/userpanel/index.php:1.8 Fri Feb 26 16:34:02 2010 +++ lms/userpanel/index.php Fri Feb 26 16:38:21 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: index.php,v 1.8 2010/02/26 15:34:02 chilek Exp $ + * $Id: index.php,v 1.9 2010/02/26 15:38:21 chilek Exp $ */ // REPLACE THIS WITH PATH TO YOUR CONFIG FILE @@ -163,7 +163,7 @@ if($SESSION->islogged) { - $module = isset($_GET['m']) ? preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['m']) : ''; + $module = isset($_GET['m']) ? $_GET['m'] : ''; if (isset($USERPANEL->MODULES[$module])) $USERPANEL->MODULES[$module]['selected'] = true; From cvs w lms.org.pl Fri Feb 26 16:50:04 2010 From: cvs w lms.org.pl (LMS CVS) Date: Fri, 26 Feb 2010 16:50:04 +0100 (CET) Subject: [lms-commits] CVS update of lms/lib/locale/pl (strings.php) Message-ID: <20100226155004.EB2063027B29@hydra.altec.pl> Date: Friday, February 26, 2010 @ 16:50:04 Author: webvisor Path: /cvsroot/lms/lib/locale/pl Modified: strings.php - added some polish translation in Hosting/Domain Diff URLs: http://cvs.lms.org.pl/viewvc/Development/lms/lib/locale/pl/strings.php.diff?&r1=1.347&r2=1.348 Index: lms/lib/locale/pl/strings.php diff -u lms/lib/locale/pl/strings.php:1.347 lms/lib/locale/pl/strings.php:1.348 --- lms/lib/locale/pl/strings.php:1.347 Fri Feb 12 18:42:52 2010 +++ lms/lib/locale/pl/strings.php Fri Feb 26 16:50:04 2010 @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * - * $Id: strings.php,v 1.347 2010/02/12 17:42:52 alec Exp $ + * $Id: strings.php,v 1.348 2010/02/26 15:50:04 webvisor Exp $ */ $_LANG['$0 ($1 addresses)'] = '$0 ($1 adresów)'; @@ -2266,8 +2266,6 @@ $_LANG['No such records in database.'] = 'Nie ma rekordów w bazie danych'; $_LANG['Domain type:'] = 'Typ domeny:'; $_LANG['Records number:'] = 'Liczba rekordów:'; -$_LANG['Domain type:'] = 'Typ domeny:'; -$_LANG['Show zones beginning with:'] = 'Pokaż domeny zaczynające się od:'; $_LANG['You have invalid characters in your hostname'] = 'Nazwa hosta zawiera nieprawidłowe znaki'; $_LANG['The hostname is too long'] = 'Nazwa hosta jest zbyt długa'; $_LANG['A hostname can not start or end with a dash'] = 'Nazwa hosta nie może zaczynać się lub kończyć kreską'; @@ -2275,7 +2273,44 @@ $_LANG['Given hostname has too many slashes'] = 'Podana nazwa hosta ma zbyt wiele ukośników'; $_LANG['You are using an invalid top level domain'] = 'Używasz nieprawidłowej nazwy TLD'; $_LANG['Given hostname or one of the labels is too short or too long'] = 'Podana nazwa hosta lub etykiety jest zbyt krótka lub zbyt długa'; -$_LANG['Are you sure, you want to delete selected operation(s) and/or document item(s)?'] = 'Czy na pewno chcesz usunąć wybrane operacje i/lub pozycje dokumentów?'; +$_LANG['Domain admin e-mail address.'] = 'Adres e-mail administratora domeny.'; +$_LANG['Are you sure you want to delete this record?'] = 'Jesteś pewien, że chcesz skasowac ten rekord?'; +$_LANG['You are using an invalid top level domain'] = 'Używasz nieprawidłowej nazwy domeny najwyższego poziomu'; +$_LANG['You can\'t add PTR record to this domain'] = 'Nie możesz dodać rekordu PTR do tej domeny'; +$_LANG['You have invalid characters in your hostname'] = 'Masz nieprawidłowe znaki w nazwie hosta'; +$_LANG['Enter content'] = 'Wprowadź dane'; +$_LANG['Enter IP address of mailserver'] = 'Wprowadź adres IP serwera pocztowego'; +$_LANG['Enter IP address of master NS'] = 'Wprowadź adres IP głównego serwera nazw'; +$_LANG['Enter IP address of webserver'] = 'wprowadź adres IP serwera www'; +$_LANG['Enter record content'] = 'Wprowadź dane rekordu'; +$_LANG['Enter record name'] = 'Wprowadź nazwę rekordu'; +$_LANG['Enter record TTL'] = 'Wprowadź TTL rekordu'; +$_LANG['Enter TTL'] = 'Wprowadź TTL'; +$_LANG['IP address of mailserver:'] = 'Adres IP serwera pocztowego:'; +$_LANG['IP address of mailserver.'] = 'Adres IP serwera pocztowego.'; +$_LANG['IP address of master NS:'] = 'Adres IP serwera głównego serwera nazw'; +$_LANG['IP address of webserver:'] = 'Adres IP serwera www:'; +$_LANG['IP address of webserver.'] = 'Adres IP serwera www.'; +$_LANG['Wrong Content'] = 'Nieprawidłowa zawartość'; +$_LANG['Wrong record name'] = 'Nieprawidłowa nazwa rekordu'; +$_LANG['Wrong record type'] = 'Nieprawidłowa typ rekordu'; +$_LANG['Wrong TTL'] = 'Nieprawidłowy TTL'; +$_LANG['SOA record already exists'] = 'Rekord SOA już istnieje'; +$_LANG['The hostname is too long'] = 'Nazwa hosta jest zbyt długa'; +$_LANG['Select record type'] = 'Wybierz typ rekordu'; +$_LANG['IP address of webserver is required!'] = 'Adres IP serwera www jest wymagany!'; +$_LANG['IP address of master NS is required!'] = 'Adres IP głównego serwera nazw jest wymagany!'; +$_LANG['IP address of mailserver is required!'] = 'Adres IP serwera pocztowego jest wymagany!'; +$_LANG['Invalid hostname'] = 'Nieprawidłowa nazwa hosta'; +$_LANG['Mail Exchange (MX) name record which identifies the name of the server that handles mail for domain (should be a FQDN).'] = 'MX - nazwa rekordu ktory identyfikuje nazwę serwera pocztowego dla domeny (powinna to być FQDN)'; +$_LANG['Minimum caching time in case of failed lookups. Default 86400.'] = 'Minimalny czas buforowania w przypadku poszukiwań zakończonych niepowodzeniem. Domyślnie 86400.'; +$_LANG['Primary Name Server name (should be a FQDN).'] = 'Nazwa głównego serwera nazw (powinna to być FQDN)'; +$_LANG['Secondary Name Server name (should be a FQDN).'] = 'Nazwa zapasowego serwera nazw (powinna to być FQDN)'; +$_LANG['Records expiration time. Default 604800.'] = 'Czas wygaśnięcia rekordu. Domyśłnie 604800.'; +$_LANG['Slave server retry time in case of a problem. Default 7200.'] = 'Czas ponownego odpytania przez serwer podrzędny w przypadku wystąpienia problemów. Domyślnie 7200.'; +$_LANG['The default expiration time of a resource record. Default 86400.'] = 'Czas wygaśnięcia rekordów. Domyślnie 86400.'; +$_LANG['Time after slave server refreshes records. Default 28800.'] = 'Czas po którym serwer podrzędny oświeży rekordy. Domyślnie 28800.'; +$_LANG['Are you sure you want to delete selected operation(s) and/or document item(s)?'] = 'Czy na pewno chcesz usunąć wybrane operacje i/lub pozycje dokumentów?'; $_LANG['Debit note template file. Default: "note.html". Should be placed in templates directory.'] = 'Szablon noty obciążeniowej. Domyślnie: "note.html". Plik powinien znajdować się w katalogu templates.'; $_LANG['Default documents paytime in days. Default: 14'] = 'Domyślny termin płatności dokumentów (w dniach). Domyślnie: 14'; $_LANG['Default invoices paytype. Default: "CASH"'] = 'Domyślny typ płatności. Domyślnie: "CASH"';