<?php session_start(); header("Cache-control: private"); //IE 6 Fix include "includes/config.php"; include "includes/checklogin.php"; include "../inc/classes/Sound.php"; include "../inc/classes/SoundTest.php"; include "../inc/classes/Helpers.php"; if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'sort') { $objSoundTest = new SoundTest(); $objSoundTest->SortValues(substr($_REQUEST['action'], 1), substr($_REQUEST['action'], 0, 1)); unset($objSoundTest); } elseif (isset($_REQUEST['dragsort'])) { // handle drag sort ajax request: $objSoundTest = new SoundTest($_REQUEST['id']); $new_sort_order = $_REQUEST['idx'] * 10 + 5; if ($new_sort_order > $objSoundTest->SortOrder) { $new_sort_order += 10; // increasing sort order so must add another 10 } $objSoundTest->SortOrder = $new_sort_order; $objSoundTest->update(); echo "success"; exit; // just exit since this is an ajax request } $objSound = new Sound($_REQUEST['sound']); include "includes/pagetemplate.php"; function PageContent()