mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Closes #4907 - Improved interface on database table verification form.
This commit is contained in:
@@ -208,6 +208,29 @@ class system_tools
|
|||||||
|
|
||||||
if(isset($_POST['verify_sql']) || !empty($_POST['verify_table']) || varset($_GET['mode']) =='verify_sql')
|
if(isset($_POST['verify_sql']) || !empty($_POST['verify_table']) || varset($_GET['mode']) =='verify_sql')
|
||||||
{
|
{
|
||||||
|
e107::css('inline', "
|
||||||
|
td.darker { background-color: rgba(0,0,0,0.5) }
|
||||||
|
|
||||||
|
");
|
||||||
|
e107::js('footer-inline', "
|
||||||
|
|
||||||
|
$('#core-db-verify-sql-tables input[type=\"checkbox\"]').click(function(evt){
|
||||||
|
|
||||||
|
if(this.checked)
|
||||||
|
{
|
||||||
|
$(this).closest('td').addClass('darker', 50 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$(this).closest('td').removeClass('darker', 300 );
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
");
|
||||||
|
|
||||||
|
|
||||||
e107::getCache()->clear('Dbverify',true);
|
e107::getCache()->clear('Dbverify',true);
|
||||||
require_once(e_HANDLER."db_verify_class.php");
|
require_once(e_HANDLER."db_verify_class.php");
|
||||||
$dbv = new db_verify;
|
$dbv = new db_verify;
|
||||||
|
@@ -663,7 +663,7 @@ class db_verify
|
|||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
$ns->tablerender(DBVLAN_23.' - '.DBVLAN_16, $mes->render().$text);
|
$ns->tablerender(DBVLAN_23.SEP.DBVLAN_16, $mes->render().$text);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1221,27 +1221,71 @@ class db_verify
|
|||||||
<form method='post' action='".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."' id='core-db-verify-sql-tables-form'>
|
<form method='post' action='".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."' id='core-db-verify-sql-tables-form'>
|
||||||
<fieldset id='core-db-verify-sql-tables'>
|
<fieldset id='core-db-verify-sql-tables'>
|
||||||
<legend>".DBVLAN_14."</legend>
|
<legend>".DBVLAN_14."</legend>
|
||||||
<table class='table table-striped adminlist'>
|
<table class='table table-striped table-hover' >
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style='width: 100%'></col>
|
<col style='width: 33%'></col>
|
||||||
|
<col style='width: 33%'></col>
|
||||||
|
<col style='width: 33%'></col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class='first form-inline'><label for='check-all-verify-jstarget-verify-table'>".$frm->checkbox_toggle('check-all-verify', 'verify_table', false )." ".LAN_CHECKALL.' | '.LAN_UNCHECKALL."</label></th>
|
<th class='first form-inline' colspan='3'><label for='check-all-verify-jstarget-verify-table'>".$frm->checkbox_toggle('check-all-verify', 'verify_table', false )." ".LAN_CHECKALL.' | '.LAN_UNCHECKALL."</label></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
$c = 0;
|
||||||
|
$plg = e107::getPlug();
|
||||||
|
|
||||||
foreach(array_keys($this->sqlFileTables) as $t=>$x)
|
foreach(array_keys($this->sqlFileTables) as $t=>$x)
|
||||||
{
|
{
|
||||||
$text .= "
|
if($x !== 'core')
|
||||||
<tr>
|
{
|
||||||
<td>".$frm->checkbox('verify_table['.$t.']', $x, false, array('label'=>$x))."</td>
|
$plg->load($x);
|
||||||
</tr>
|
if(!$plg->getId()) // no data.
|
||||||
";
|
{
|
||||||
|
$plg->load($x.'_menu');// try menu folder.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$icon = $plg->getIcon();
|
||||||
|
$name = $plg->getName();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$icon = E_16_E107;
|
||||||
|
$name = LAN_CORE;
|
||||||
|
}
|
||||||
|
$text .= ($c === 0) ? "<tr>\n" : '';
|
||||||
|
$text .= "<td title='".$x."'>".$frm->checkbox('verify_table['.$t.']', $x, false, array('label'=>$icon.' '.$name))."</td>";
|
||||||
|
$text .= ($c === 2) ? "</tr>\n" : '';
|
||||||
|
|
||||||
|
$c++;
|
||||||
|
|
||||||
|
if($c > 2)
|
||||||
|
{
|
||||||
|
$c = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
while (($c % 3) !== 0)
|
||||||
|
{
|
||||||
|
$text .= "<td> </td>\n";
|
||||||
|
$text .= (($c+1) % 3 == 0) ? "</tr>" : "";
|
||||||
|
$c++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if($c !== 2)
|
||||||
|
{
|
||||||
|
$add = (3 - $c) + 1;
|
||||||
|
|
||||||
|
$text .= "<td>".$c."</td>";
|
||||||
|
|
||||||
|
$text .= "</tr>";
|
||||||
|
}*/
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -1253,7 +1297,7 @@ class db_verify
|
|||||||
</form>
|
</form>
|
||||||
";
|
";
|
||||||
|
|
||||||
$ns->tablerender(DBVLAN_23.' - '.DBVLAN_16, $mes->render().$text);
|
$ns->tablerender(DBVLAN_23.SEP.DBVLAN_16, $mes->render().$text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user