Commit b3457ea4383ce529a979b5d981b3c320c1f672a8
1 parent
0ee6abf7
version handling
Showing
5 changed files
with
26 additions
and
11 deletions
INSTALL.md
config/config.php
| 1 | 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 | 211 | if (is_string($path)) { |
| 212 | 212 | $_CONF['smbind_ng'] = $path; |
| 213 | 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 | 216 | $_CONF['marker'] = "Forked by PtY 2015(GPL)"; |
| 216 | 217 | $_CONF['template'] = "default"; |
| 217 | 218 | $_CONF['recaptcha'] = false; | ... | ... |
src/include.php
| ... | ... | @@ -86,7 +86,7 @@ if (isset($_POST['username']) && isset($_POST['password']) && ($cap_rsp == NULL) |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $user = new User(); |
| 89 | -$smarty->assign("loggedinuser",$user->getFullName()); | |
| 89 | +$smarty->assign("loggedinuser",preg_replace('/\s/', ' ', $user->getFullName())); | |
| 90 | 90 | |
| 91 | 91 | if ($user->getId() == 0) { |
| 92 | 92 | login_page($smarty); |
| ... | ... | @@ -100,6 +100,7 @@ if ((isset($_SERVER['PHP_SELF'])) && (basename($_SERVER['PHP_SELF']) != 'index.p |
| 100 | 100 | |
| 101 | 101 | if($user->isAdmin()) { |
| 102 | 102 | $smarty->assign("admin", "yes"); |
| 103 | + $smarty->assign("version", $conf->version); | |
| 103 | 104 | } else { |
| 104 | 105 | $smarty->assign("admin", "no"); |
| 105 | 106 | } | ... | ... |
templates/main.tpl
| ... | ... | @@ -2,4 +2,4 @@ |
| 2 | 2 | <div class=title>{$TITLE}</div> |
| 3 | 3 | <div class=section><p>{$pagetitle}</p></div>{include file="menu.tpl"}{include file=$template} |
| 4 | 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 in as: <strong>{$loggedinuser}</strong>{if $admin} | App engine: <strong>{$version}</strong>{/if}</div>{/if}{include file="footer.tpl"} | ... | ... |