<?php
require_once dirname(dirname(dirname(dirname(__DIR__)))) . '/mainfile.php';
require_once dirname(dirname(__DIR__)) . '/function.php';
$sort = 1;
foreach ($_POST['LinkID'] as $LinkID) {
    $sql = 'update ' . $xoopsDB->prefix('tad_web_link') . " set `LinkSort`='{$sort}' where LinkID='{$LinkID}'";
    $xoopsDB->queryF($sql) or die(_TAD_SORT_FAIL . ' (' . date('Y-m-d H:i:s') . ')' . $sql);
    $sort++;
}
echo _TAD_SORTED . '(' . date('Y-m-d H:i:s') . ')';
