Esempio n. 1
0
# Technical Support:  Forum - http://www.ijoomla.com/forum/index/
-------------------------------------------------------------------------*/
$items = explode(",", $_GET['saveString']);
define('_JEXEC', 1);
define('JPATH_BASE', 1);
include_once "../../../../../../configuration.php";
include_once "../../../../../../libraries/joomla/base/object.php";
include_once "../../../../../../libraries/joomla/database/database.php";
include_once "../../../../../../libraries/joomla/database/database/mysql.php";
$config = new JConfig();
$options = array("host" => $config->host, "user" => $config->user, "password" => $config->password, "database" => $config->db, "prefix" => $config->dbprefix);
$database = new JDatabaseMySQL($options);
$sql = " SELECT id, days, tasks FROM #__guru_programstatus WHERE pid = 27 ";
$database->setQuery($sql);
if (!$database->query()) {
    echo $database->stderr();
    return;
}
$ids = $database->loadObject();
$the_old_day_order = $ids->days;
$the_old_day_order = explode(';', $the_old_day_order);
$the_old_task_order = $ids->tasks;
$the_old_task_order = explode(';', $the_old_task_order);
$new_daystatus_order = '';
$new_taskstatus_order = '';
foreach ($items as $one_item) {
    //one_item looks like this ->  6-0:false:202:
    $one_item_array = explode(':', $one_item);
    if ($one_item_array[1] == 'false') {
        // saving the new order
        $day_id = $one_item_array[2];