Ottimizzazione
This commit is contained in:
parent
025dc5dcd3
commit
f373036f15
|
@ -17,6 +17,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Models\Plugin;
|
||||||
|
|
||||||
include_once __DIR__.'/core.php';
|
include_once __DIR__.'/core.php';
|
||||||
|
|
||||||
if (!empty($id_record) && !empty($id_module)) {
|
if (!empty($id_record) && !empty($id_module)) {
|
||||||
|
@ -51,13 +53,13 @@ echo '
|
||||||
</a>
|
</a>
|
||||||
</li>';
|
</li>';
|
||||||
|
|
||||||
$plugins = $dbo->fetchArray('SELECT `zz_plugins`.`id`,`title` FROM `zz_plugins` LEFT JOIN `zz_plugins_lang` ON (`zz_plugins`.`id` = `zz_plugins_lang`.`id_record` AND `zz_plugins_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `idmodule_to`='.prepare($id_module)." AND `position`='tab_main' AND `enabled` = 1");
|
$plugins = Plugin::where('idmodule_to', $id_module)->where('position', 'tab_main')->where('enabled', 1)->get();
|
||||||
|
|
||||||
// Tab dei plugin
|
// Tab dei plugin
|
||||||
foreach ($plugins as $plugin) {
|
foreach ($plugins as $plugin) {
|
||||||
echo '
|
echo '
|
||||||
<li>
|
<li>
|
||||||
<a data-toggle="tab" href="#tab_'.$plugin['id'].'" id="link-tab_'.$plugin['id'].'">'.$plugin['title'].'</a>
|
<a data-toggle="tab" href="#tab_'.$plugin->id.'" id="link-tab_'.$plugin->id.'">'.$plugin->title.'</a>
|
||||||
</li>';
|
</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,9 +79,9 @@ foreach ($plugins as $plugin) {
|
||||||
$record = $module_record;
|
$record = $module_record;
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div id="tab_'.$plugin['id'].'" class="tab-pane">';
|
<div id="tab_'.$plugin->id.'" class="tab-pane">';
|
||||||
|
|
||||||
$id_plugin = $plugin['id'];
|
$id_plugin = $plugin->id;
|
||||||
|
|
||||||
include base_dir().'/include/manager.php';
|
include base_dir().'/include/manager.php';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue