<?php
/**
 * Open Source Social Network
 *
 * @package   (openteknik.com).ossn
 * @author    OSSN Core Team <info@openteknik.com>
 * @copyright (C) OpenTeknik LLC
 * @license   OPENTEKNIK  LLC, COMMERCIAL LICENSE, COMMERCIAL LICENSE https://www.openteknik.com/license/commercial-license-v1
 * @link      https://www.opensource-socialnetwork.org/
 */

// Assume input() function retrieves values from POST or GET requests
$guid = input('guid');
$object = get_worlds_page($guid);

// Check if object is retrieved successfully
if (!$object) {
    echo 0;
    exit();
}

// Update object properties
$object->data->cover_top = input('top');
$object->data->cover_left = input('left');

// Attempt to save changes
if ($object->save()) {
    echo 1;
} else {
    echo 0;
    // Optional: Print error message for debugging
    // echo 'Save operation failed: ' . $object->getLastError();
}
?>
