Skip to content

Commit

Permalink
dil desteği
Browse files Browse the repository at this point in the history
  • Loading branch information
bakcay committed Apr 29, 2023
1 parent 1eedd63 commit b692599
Show file tree
Hide file tree
Showing 11 changed files with 419 additions and 238 deletions.
15 changes: 11 additions & 4 deletions modules/addons/dnaextended/app/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
class module {




public function makeSync(){

$page_limit = 500;
Expand Down Expand Up @@ -154,7 +156,7 @@ public function generateView($params = [], $layout = 'layout', $viewtype = 'admi
$_LANG = $this->getLanguage();

//$lang = language::parseAll();
$smarty->assign('LANG', $_LANG);
$smarty->assign('_lang', $_LANG);

$smarty->setTemplateDir($viewdir);

Expand Down Expand Up @@ -185,17 +187,22 @@ public function fetchTplFromString($str, $params) {

/** @noinspection PhpIncludeInspection */
public function getLanguage() {
$langfile = MODULE_DIR . "/app/lang/{$this->language}.php";

$this_language = Capsule::table('tbladmins')->where('id', $_SESSION['adminid'])->first()->language;



$langfile = __DIR__ . "/../lang/{$this_language}.php";

$_LANG = [];
if (!is_file($langfile)) {
$langfile = MODULE_DIR . "/app/lang/turkish.php";
$langfile =__DIR__ . "/../lang/english.php";
}

include $langfile;

//$lang = language::parseAll();
return $_LANG;
return $_ADDONLANG;

}

Expand Down
16 changes: 8 additions & 8 deletions modules/addons/dnaextended/app/view/admin/balance.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{if $result !='OK' and 1==2}
<div class="alert alert-warning" role="alert">
Ooops! Something went wrong. Error : {$error.Message} {$error.Details}
{$_lang.something_went_wrong} Error : {$error.Message} {$error.Details}
</div>
{else}
<div class="row">
Expand All @@ -14,21 +14,21 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2">Reseller Info</th>
<th colspan="2">{$_lang.balance_info}</th>
</tr>
</thead>
<tbody>

<tr>
<td>ID</td>
<td>{$_lang.balance_info_id}</td>
<td>{$id}</td>
</tr>
<tr>
<td>Name</td>
<td>{$_lang.balance_info_name}</td>
<td>{$name}</td>
</tr>
<tr>
<td>Status</td>
<td>{$_lang.balance_info_status}</td>
<td>{$active}</td>
</tr>

Expand All @@ -49,7 +49,7 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2">Balance Status</th>
<th colspan="2">{$_lang.balance_status}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -81,13 +81,13 @@
<table class="table table-striped">
<thead>
<tr>
<th colspan="2">Balance Activity</th>
<th colspan="2">{$_lang.balance_activity}</th>
</tr>
</thead>
<tbody>

<tr>
<td colspan="2">Balance activity coming soon</td>
<td colspan="2">{$_lang.balance_activity_soon}</td>
</tr>


Expand Down
8 changes: 4 additions & 4 deletions modules/addons/dnaextended/app/view/admin/dashboard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="panel panel-success">
<div class="panel-heading">
<i class="fa fa-wrench"></i>
Latest Synced Domains
{$_lang.dash_lastsync}
</div>
<div class="panel-body">

Expand All @@ -29,7 +29,7 @@
<div class="panel panel-success">
<div class="panel-heading">
<i class="fa fa-server"></i>
Latest Incoming Transfers ({$incoming_count})
{$_lang.dash_incoming} ({$incoming_count})
</div>
<div class="panel-body">

Expand All @@ -52,7 +52,7 @@
<div class="panel panel-warning">
<div class="panel-heading">
<i class="fa fa-users"></i>
Latest Outgoing Transfers ({$outgoing_count})
{$_lang.dash_outgoing} ({$outgoing_count})
</div>
<div class="panel-body">

Expand All @@ -75,7 +75,7 @@
<div class="panel panel-success">
<div class="panel-heading">
<i class="fa fa-database"></i>
Latest System Check
{$_lang.dash_syscheck}
</div>
<div class="panel-body">

Expand Down
6 changes: 3 additions & 3 deletions modules/addons/dnaextended/app/view/admin/domains.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<thead>
<tr>
<th>#</th>
<th> Domain</th>
<th> Status</th>
<th> Client</th>
<th>{$_lang.domains_list_domain}</th>
<th>{$_lang.domains_list_status}</th>
<th>{$_lang.domains_list_client}</th>
<th> </th>
</tr>
</thead>
Expand Down
42 changes: 38 additions & 4 deletions modules/addons/dnaextended/app/view/admin/layout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@
</ul>

<ul class="nav navbar-nav navbar-right moduletopbarnav">
<li class="active"><a href="#"class="moduleurl" data-target="dashboard" >Dashboard</a></li>
<li><a href="#" class="moduleurl" data-target="balance">Balance & Payments</a></li>
<li><a href="#" class="moduleurl" data-target="domains">All Domains</a></li>
<li><a href="#" class="moduleurl" data-target="settings">Settings</a></li>
<li class="active">
<a href="#"class="moduleurl" data-target="dashboard" >{$_lang.nav_dashboard}</a>
</li>
<li>
<a href="#" class="moduleurl" data-target="balance">{$_lang.nav_balance}</a>
</li>
<li>
<a href="#" class="moduleurl" data-target="domains">{$_lang.nav_domains}</a>
</li>
<li>
<a href="#" class="moduleurl" data-target="settings">{$_lang.nav_settings}</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
Expand Down Expand Up @@ -70,6 +78,32 @@
warning_equal_expirydate : '{$_lang.warning_equal_expirydate}',
text_search_client : '{$_lang.text_search_client}',
syncinfo : '{$_lang.syncinfo}',
loading : '{$_lang.loading}',
btn_sync : '{$_lang.btn_sync}',
btn_contact : '{$_lang.btn_contact}',
btn_ns : '{$_lang.btn_ns}',
btn_lock : '{$_lang.btn_lock}',
btn_approve : '{$_lang.btn_approve}',
btn_reject : '{$_lang.btn_reject}',
btn_cancel : '{$_lang.btn_cancel}',
btn_filter_by_status : '{$_lang.btn_filter_by_status}',
domains : '{$_lang.domains}',
domain : '{$_lang.domain}',
values_with : '{$_lang.values_with}',
client : '{$_lang.client}',
sync : '{$_lang.sync}',
nstxt : '{$_lang.nstxt}',
type : '{$_lang.type}',
locktype : '{$_lang.locktype}',
privacy_protection : '{$_lang.privacy_protection}',
thieft_protection : '{$_lang.thieft_protection}',
enabled : '{$_lang.enabled}',
disabled : '{$_lang.disabled}',
cancel_warning : '{$_lang.cancel_warning}',
reject_warning : '{$_lang.reject_warning}',
approve_warning : '{$_lang.approve_warning}',
manually_run_cron : '{$_lang.manually_run_cron}',
cron_started : '{$_lang.cron_started}',
};
</script>

Expand Down
16 changes: 8 additions & 8 deletions modules/addons/dnaextended/app/view/admin/settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,38 @@
<table class="table table-striped">
<thead>
<trs>
<th colspan="2" class="modheading">Automation settings</th>
<th colspan="2" class="modheading">{$_lang.automation_settings}</th>
</trs>
</thead>
<tbody>

<tr>
<td>Cron Settings</td>
<td>{$_lang.cron_settings}</td>
<td>
<code>*/10 * * * * {$cronfile}</code>


</td>
</tr>
<tr>
<td>Cron Status</td>
<td>{$_lang.cron_status}</td>
<td>
<a href="javascript:void(0)" id="runmanualcron">Run Manually</a> | Last Run : {$latestcron}
<a href="javascript:void(0)" id="runmanualcron">{$_lang.manually_run_cron}</a> | {$_lang.cron_last_run} : {$latestcron}
</td>
</tr>
<tr>
<td>Processing Record</td>
<td>{$_lang.processing_record}</td>
<td>

<div class="input-group" style="max-width: 300px;">
<input id="DNArecordcount" name="DNArecordcount" class="form-control" placeholder="Sync Record count per check" type="number" min="100" max="1500" value="{$settings.DNArecordcount}">
<span class="input-group-addon">records</span>
<span class="input-group-addon">{$_lang.records}</span>
</div>

</td>
</tr>
<tr>
<td>Exclude Deleted records</td>
<td>{$_lang.exclude_deleted}</td>
<td>
<input type="checkbox" id="DNAexcludedeleted" name="DNAexcludedeleted" value="1" {if $settings.DNAexcludedeleted eq '1'}checked{/if}>
</td>
Expand All @@ -49,7 +49,7 @@

</div>
<div style="text-align: center; margin-bottom: 20px">
<a href="javascript:void(0)" id="savesettings" class="btn btn-primary">Save</a>
<a href="javascript:void(0)" id="savesettings" class="btn btn-primary">{$_lang.save}</a>
</div>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions modules/addons/dnaextended/assets/module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,11 @@
font-size: 20px;
font-weight: bold;
}
.cb-quick-action{
scale: 1.2;
}
#domainstable tbody td.sorting_1 {
text-align: center;
}


Loading

0 comments on commit b692599

Please sign in to comment.