id] = $index->order_index; $ids[] = $index->id; } $data = $model::find()->where(['IN', 'id', $ids])->all(); foreach ($data as $m) { if ($m->hasProperty('order_index')) { $m->{'order_index'} = $indexes[$m->{'id'}]; $m->save(); } } exit; } if (isset($_GET['export'])) { $ed = $exportData(); //echo json_encode($ed); //exit; $error = 0; foreach (['data', 'file_name', 'header'] as $d) { if (empty($ed[$d])) $error++; } if ($error == 0) XLSx::toXlsWriter($ed['data'], $ed['file_name'], $ed['file_name'], $ed['header']); } if (isset($_GET['p']) && sizeof($data['list']) == 0) { header('Location: ' . explode('?', $_SERVER['REQUEST_URI'])[0]); exit; } Includes::top($top['title'] ?? null, $top['data'] ?? null); Includes::setListTabs($listTabs); ?>
render('includes/actions', ['actions' => $actions, 'data' => $data, 'exportData' => $exportData]) ?> render('includes/filter', ['filter' => $filter, 'advanced_filter' => $advanced_filter]); ?> $class): ?> $td): ?> > $class): ?>
' : '' ?>
' : '' ?> ' : '' ?> ' : '' ?>
render('includes/pagination', ['data' => $data]) ?>