Exemple #1
0

<script type="application/javascript">
    $(document).ready(function() {
        event_element(4741, 1);
    });

</script>

<?php 
session_start();
if (isset($_SESSION['user_session_login'])) {
    echo $_SESSION['user_name'];
    // Грузим доступные элементы;
    echo create_user_element();
    ?>


  <!--  <div id="111" element_id="111" align="center" style="width: 600px;" class="drag">

        <div class="cloud" id="WebFitness" status="0">
            WebFitness
        </div>

        <div id="tasks" align="left" style="display: none; width: 600px; vertical-align: top; position:relative;">

            <div id="task" class="task_completed" status="0">
                <img title="Вы автор этой задачи" src="/icons/crown.png" alt="Вы автор этой задачи"/>

                <div id="task_author" style="display: inline-block; font-size: 12px; font-weight: bold; color: white;">
                    Константин Борисенко
Exemple #2
0
<script type="application/javascript">

        $( ".drag" ).draggable({
            stop: function() {
                $(this).maxZIndex({ inc: 1 });
                save_element_position($(this).attr('id'), 'save', 'id');
            }, cursor: "move" });

</script>
<?php 
session_start();
// Подключение к базе данных;
include $_SERVER['DOCUMENT_ROOT'] . '/systems/connect.php';
if (isset($_SESSION['user_session_login'])) {
    if (isset($_POST['event'])) {
        if ($_POST['event'] == 'new_element') {
            if ($_POST['element_type'] == 'note') {
                echo create_user_element($_POST['element_id']);
            }
        }
    }
}
Exemple #3
0
             $db_inproject->query($sql);
         }
     }
     die;
 }
 // Показываем новые елементы на рабочем столе;
 if ($_POST['event'] == 'get_new_elements') {
     //
     $result = '';
     $ids = '';
     $sql = "SELECT * FROM `note_transfer` WHERE `to_user_id` = '" . $_SESSION['user_session_login'] . "' AND `trans_status` = 'new';";
     $new_elements_array = $db_inproject->all($sql);
     foreach ($new_elements_array as $key => $new_elements) {
         $sql = "SELECT * FROM `elements_position` WHERE `element_id` = '" . $new_elements['element_id'] . "';";
         $elements_pos = $db_inproject->row($sql);
         $result .= create_user_element($new_elements['element_id']) . '&&&' . $new_elements['element_id'] . ';' . $elements_pos['x_pos'] . ';' . $elements_pos['y_pos'] . ';' . $elements_pos['z-index'] . ($key != count($new_elements) - 1 ? '***' : '');
         // $result .= $new_elements['element_id'].';'.$elements_pos['x_pos'].';'.$elements_pos['y_pos'].';'.$elements_pos['z-index'].($key != count($new_elements)-1 ? '&' : '');
         $sql = "UPDATE `note_transfer` SET `trans_status` = 'old' WHERE `element_id` = '" . $new_elements['element_id'] . "';";
         $db_inproject->query($sql);
     }
     echo $result;
     die;
 }
 // Получаем напоминания;
 if ($_POST['event'] == 'get_events') {
     $result = '';
     $sql = "SELECT * FROM `users_events` WHERE `user_id` = '" . $_SESSION['user_session_login'] . "' AND `event_time` = NOW();";
     $events_array = $db_inproject->all($sql);
     foreach ($events_array as $key => $events) {
         $result .= $events['element_id'] . ';' . $events['event_time'] . ($key != count($events) - 1 ? '&' : '');
     }