示例#1
0
function orderModule($uid, $inc, $option, $client = 'admin')
{
    global $database;
    $row = new mosModule($database);
    $row->load((int) $uid);
    if ($client == 'admin') {
        $where = "client_id = 1";
    } else {
        $where = "client_id = 0";
    }
    $row->move($inc, "position = " . $database->Quote($row->position) . " AND ( {$where} )");
    mosCache::cleanCache('com_content');
    $redirect = mosGetParam($_REQUEST, 'redirect', 'index2.php?option=' . $option . '&client=' . $client);
    mosRedirect($redirect);
}
示例#2
0
/**
* Moves the order of a record
* @param integer The unique id of record
* @param integer The increment to reorder by
*/
function orderModule($uid, $inc, $option)
{
    global $database;
    josSpoofCheck();
    $client = strval(mosGetParam($_POST, 'client', ''));
    $row = new mosModule($database);
    $row->load((int) $uid);
    if ($client == 'admin') {
        $where = "client_id = 1";
    } else {
        $where = "client_id = 0";
    }
    $row->move($inc, "position = " . $database->Quote($row->position) . " AND ( {$where} )");
    if ($client) {
        $client = '&client=admin';
    } else {
        $client = '';
    }
    mosCache::cleanCache('com_content');
    mosRedirect('index2.php?option=' . $option . '&client=' . $client);
}
示例#3
0
/**
* Moves the order of a record
* @param integer The unique id of record
* @param integer The increment to reorder by
*/
function orderModule($uid, $inc, $option)
{
    global $database;
    $client = mosGetParam($_POST, 'client', '');
    $row = new mosModule($database);
    $row->load($uid);
    if ($client == 'admin') {
        $where = "client_id='1'";
    } else {
        $where = "client_id='0'";
    }
    $row->move($inc, "position='{$row->position}' AND ({$where})");
    if ($client) {
        $client = '&client=admin';
    } else {
        $client = '';
    }
    mosRedirect('index2.php?option=' . $option . '&client=' . $client);
}