Commit b3457ea4383ce529a979b5d981b3c320c1f672a8

Authored by Péter Szládovics
1 parent 0ee6abf7

version handling

INSTALL.md
1 # SMBind-ng Installation Guide 1 # SMBind-ng Installation Guide
  2 +v0.91c
2 3
3 ## Requirements 4 ## Requirements
4 * Any kind of webserver with php usage abilities (tested on apache2, lighttpd, 5 * Any kind of webserver with php usage abilities (tested on apache2, lighttpd,
config/config.php
1 <?php 1 <?php
2 -$_CONF['db_type'] = '';  
3 -$_CONF['db_user'] = '';  
4 -$_CONF['db_pass'] = '';  
5 -$_CONF['db_host'] = '';  
6 -$_CONF['db_port'] = '';  
7 -$_CONF['db_db'] = '';  
8 -$_CONF['smarty_path'] = '';  
9 -$_CONF['peardb_path'] = ''; 2 +$_CONF['db_type'] = 'mysql';
  3 +$_CONF['db_user'] = 'smbind';
  4 +$_CONF['db_pass'] = 'smbind';
  5 +$_CONF['db_host'] = '10.21.32.7';
  6 +$_CONF['db_port'] = '3306';
  7 +$_CONF['db_db'] = 'smbind';
  8 +$_CONF['smarty_path'] = '/usr/share/php/smarty3/';
  9 +$_CONF['peardb_path'] = '/usr/share/php';
  10 +$_CONF['title'] = 'MyOnline Primary NS management';
  11 +$_CONF['footer'] = '<b>PRIMARY site</b> - Switch to <a class=attention href="https://service.myonline.hu/dnsslave/"><b>SECONDARY site</b></a> | You are from: <b>' . $_SERVER['REMOTE_ADDR'] . '</b>';
  12 +$_CONF['recaptcha'] = true;
  13 +$_CONF['rc_pubkey'] = '6LectQcTAAAAAGLTGJQpjM8eh8YEozuXYFqpLDqG';
  14 +$_CONF['rc_privkey'] = '6LectQcTAAAAAGBDl7u5lrbVQmNYtlF37K2RkArR';
  15 +$_CONF['nocaptcha'] = array (
  16 + '78.131.57.83',
  17 + '194.149.54.36',
  18 + );
  19 +$_CONF['path'] = '/etc/smbind/zones/';
  20 +$_CONF['conf'] = '/etc/smbind/smbind.conf';
  21 +$_CONF['rollerconf'] = '/etc/smbind/rollrec/zones.rollrec';
10 ?> 22 ?>
lib/smbind.class.php
@@ -211,7 +211,8 @@ @@ -211,7 +211,8 @@
211 if (is_string($path)) { 211 if (is_string($path)) {
212 $_CONF['smbind_ng'] = $path; 212 $_CONF['smbind_ng'] = $path;
213 $_CONF['title'] = "SMBind-ng"; 213 $_CONF['title'] = "SMBind-ng";
214 - $_CONF['footer'] = $_CONF['title'] . " v0.91b"; 214 + $_CONF['version'] = 'v0.91c';
  215 + $_CONF['footer'] = $_CONF['title'] . $_CONF['version'];
215 $_CONF['marker'] = "Forked by PtY 2015(GPL)"; 216 $_CONF['marker'] = "Forked by PtY 2015(GPL)";
216 $_CONF['template'] = "default"; 217 $_CONF['template'] = "default";
217 $_CONF['recaptcha'] = false; 218 $_CONF['recaptcha'] = false;
src/include.php
@@ -86,7 +86,7 @@ if (isset($_POST[&#39;username&#39;]) &amp;&amp; isset($_POST[&#39;password&#39;]) &amp;&amp; ($cap_rsp == NULL) @@ -86,7 +86,7 @@ if (isset($_POST[&#39;username&#39;]) &amp;&amp; isset($_POST[&#39;password&#39;]) &amp;&amp; ($cap_rsp == NULL)
86 } 86 }
87 87
88 $user = new User(); 88 $user = new User();
89 -$smarty->assign("loggedinuser",$user->getFullName()); 89 +$smarty->assign("loggedinuser",preg_replace('/\s/', '&nbsp;', $user->getFullName()));
90 90
91 if ($user->getId() == 0) { 91 if ($user->getId() == 0) {
92 login_page($smarty); 92 login_page($smarty);
@@ -100,6 +100,7 @@ if ((isset($_SERVER[&#39;PHP_SELF&#39;])) &amp;&amp; (basename($_SERVER[&#39;PHP_SELF&#39;]) != &#39;index.p @@ -100,6 +100,7 @@ if ((isset($_SERVER[&#39;PHP_SELF&#39;])) &amp;&amp; (basename($_SERVER[&#39;PHP_SELF&#39;]) != &#39;index.p
100 100
101 if($user->isAdmin()) { 101 if($user->isAdmin()) {
102 $smarty->assign("admin", "yes"); 102 $smarty->assign("admin", "yes");
  103 + $smarty->assign("version", $conf->version);
103 } else { 104 } else {
104 $smarty->assign("admin", "no"); 105 $smarty->assign("admin", "no");
105 } 106 }
templates/main.tpl
@@ -2,4 +2,4 @@ @@ -2,4 +2,4 @@
2 <div class=title>{$TITLE}</div> 2 <div class=title>{$TITLE}</div>
3 <div class=section><p>{$pagetitle}</p></div>{include file="menu.tpl"}{include file=$template} 3 <div class=section><p>{$pagetitle}</p></div>{include file="menu.tpl"}{include file=$template}
4 <div class=hint><p>{$help}</p></div> 4 <div class=hint><p>{$help}</p></div>
5 -{if $loggedinuser}<div class=loggeduser>Logged in as: <strong>{$loggedinuser}</strong></div>{/if}{include file="footer.tpl"} 5 +{if $loggedinuser}<div class=loggeduser>Logged&nbsp;in&nbsp;as:&nbsp;<strong>{$loggedinuser}</strong>{if $admin}&nbsp;|&nbsp;App&nbsp;engine:&nbsp;<strong>{$version}</strong>{/if}</div>{/if}{include file="footer.tpl"}