/** * Defines user's preferences on how bookmarks should be ordered in the web interface * @global type $input * @global type $repository_path * @global type $user_files_path */ function bookmarks_sort() { global $input; global $repository_path; global $user_files_path; $album = $_SESSION["album"]; $panel = $input['panel']; $new_order = $input["order"]; // init paths ezmam_repository_path($repository_path); user_prefs_repository_path($user_files_path); if (acl_value_get("{$panel}_order") != $new_order) { if (acl_user_is_logged()) { user_prefs_settings_edit($_SESSION['user_login'], "{$panel}_order", $new_order); acl_update_settings(); } else { $_SESSION["acl_user_settings"]["{$panel}_order"] = $new_order; } } // lvl, action, album, panel (official|personal), new_order (chron|reverse_chron) trace_append(array($input['source'] == 'assets' ? '2' : '3', 'bookmarks_sort', $album, $panel, $new_order)); // determines the page to display if ($input['source'] == 'assets') { // the token is needed to display the album assets $input['token'] = ezmam_album_token_get($album); view_album_assets(false); } else { view_asset_details(false); } }
} if (isset($asset_meta['record_type']) && $asset_meta['record_type'] == 'camslide') { ?> <li> <a class="movie-button active" title="®Watch_video®" href="javascript:switch_video('cam');"></a> <a class="slide-button" title="®Watch_slide®" href="javascript:switch_video('slide');"></a> </li> <?php } ?> <li> <a class="high-button" title="®Watch_high®" href="javascript:toggle_video_quality('high');"></a> <a class="low-button active" title="®Watch_low®" href="javascript:toggle_video_quality('low');"></a> </li> <?php if (acl_user_is_logged() && acl_has_album_permissions($album)) { ?> <li> <a class="add-bookmark-button" title="®Add_bookmark®" href="javascript:toggle_bookmark_form('custom');"></a> <?php if (acl_has_album_moderation($album) || acl_is_admin()) { ?> <a class="add-toc-button" title="®Add_toc®" href="javascript:toggle_bookmark_form('official');"></a> <?php } if (acl_display_threads()) { ?> <a class="add-thread-button" title="®Add_discussion®" href="javascript:toggle_thread_form();"></a> <?php } ?>
require template_getpath('div_side_assets.php'); } else { require template_getpath('div_side_details.php'); } ?> </div><!-- div_right END --> <div id="bottom"> <!-- bottom part goes here : trending posts, discussions, ... --> <?php if ($_SESSION['ezplayer_mode'] == 'view_album_assets') { require template_getpath('div_trending_threads.php'); } else { require template_getpath('div_video_description.php'); if (acl_display_threads() && acl_user_is_logged()) { ?> <div id="threads" class="threads_info"> <?php if ($_SESSION['thread_display'] == 'details') { include_once template_getpath('div_thread_details.php'); } else { include_once template_getpath('div_threads_list.php'); } ?> </div><!-- END of #threads_info --> <?php } } ?> </div>
, 'up');" title="®Move_up®"></a> <?php if ($index != count($albums) - 1) { ?> <a class="down-arrow" href="javascript:move_album_token('<?php echo $album['album']; ?> ', <?php echo $index; ?> , 'down');" title="®Move_down®"></a><?php } ?> </div> <?php if (acl_user_is_logged() && acl_show_notifications()) { $count = acl_global_count($album['album']); if ($count - acl_watched_count($album['album']) > 0) { ?> <div class="album_count green" title="<?php print_new_video($count - acl_watched_count($album['album'])); ?> "><?php echo $count - acl_watched_count($album['album']); ?> </div> <?php } } ?>
<a class="button" href="javascript: toggle_edit_bookmark_form('<?php echo $index; ?> ', 'toc');">®Cancel®</a> <a class="button orange" href="javascript: if(check_edit_bookmark_form('<?php echo $index; ?> ', 'toc')) submit_edit_bookmark_form('<?php echo $index; ?> ', 'toc');">®Submit®</a> </div> <br /> </div> <?php if (acl_user_is_logged() && acl_has_album_moderation($album)) { ?> <div class="bookmark_options"> <a class="delete-button" title="®Delete_bookmark®" href="javascript:bookmark_popup('<?php echo $bookmark['album']; ?> ', '<?php echo $bookmark['asset']; ?> ', '<?php echo $bookmark['timecode']; ?> ', 'official', 'details', 'remove')"></a> <a class="edit-button orange" title="®Edit_bookmark®" href="javascript:edit_bookmark('<?php echo $index; ?>
/** * @param bool $assoc(false) If set to true, the function returns an associative array listing every album by its name (key) and its description (value). If set to false, only the album name (value) is returned * @return array|false An array with all the album names the user can use but still hasn't */ function acl_authorized_albums_list_not_created($assoc = false) { if (!acl_user_is_logged()) { error_print_message('Error: acl_authorized_albums_list_not_created: You are not logged in'); return false; } if ($assoc) { return $_SESSION['acl_not_created_albums_descriptions']; } else { return $_SESSION['acl_not_created_albums']; } }
/** * Adds a line in log * @global string $ezplayer_logs Path to the log file * @param string $operation The operation done * @param string $message Additionnal information (parameters) */ function log_append($operation, $message = '') { global $ezplayer_logs; global $user_files_path; // 1) Date/time at which the event occurred $data = date('Y-m-d-H:i'); $data .= ' '; // 2) IP address of the user that provoked the event $data .= isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'noip'; $data .= ' '; // 3) Username and realname of the user that provoked the event // There can be no login if the operation was performed by a CLI tool for instance. // In that case, we display "nologin" instead. if (!isset($_SESSION['user_login']) || empty($_SESSION['user_login'])) { $data .= 'nologin'; } else { if (isset($_SESSION['real_login'])) { $data .= $_SESSION['real_login'] . '/' . $_SESSION['user_login']; } else { $data .= $_SESSION['user_login']; } } $data .= ' '; // 4) Operation performed $data .= $operation; // 5) Optionnal parameters if (!empty($message)) { $data .= ': ' . $message; } // 6) And we add a carriage return for readability $data .= PHP_EOL; // Then we save the new entry file_put_contents($ezplayer_logs, $data, FILE_APPEND | LOCK_EX); if (acl_user_is_logged()) { $logs = $user_files_path . '/' . $_SESSION['user_login'] . '/ezplayer.log'; file_put_contents($logs, $data, FILE_APPEND | LOCK_EX); } }
/** * Checks if the current user is an admin or not. * @return boolean */ function acl_admin_user() { if (!acl_user_is_logged()) { return false; } return isset($_SESSION['user_is_admin']) ? $_SESSION['user_is_admin'] : false; }
?> <span style="float: right; margin: 1px 3px; font-size: 15px;">|</span> <a href="javascript:admin_mode_update()" title="®Admin_mode_update®"> <span class="logout"><?php echo acl_is_admin() ? '®Admin_mode_enabled®' : '®Admin_mode_disabled®'; ?> </span> </a> <?php } ?> <?php if (acl_runas()) { ?> <span style="float: right; margin: 1px 3px; font-size: 15px;">|</span> <span class="logout">®connected_as® <b><?php echo $_SESSION['user_full_name']; ?> </b></span> <?php } ?> </div> </div> <?php if (!acl_user_is_logged() && isset($login_error) && !empty($login_error)) { ?> <script> $('#popup_login').reveal($(this).data());</script> <?php }