Beispiel #1
0
/**
 * First method to call when using the lib_acl
 * @param string $netid the user's netID
 * @return bool error status
 */
function acl_init($netid)
{
    // initializing ezmam (we'll need it later)
    global $repository_path;
    global $user_files_path;
    ezmam_repository_path($repository_path);
    user_prefs_repository_path($user_files_path);
    // Retrieving the permissions
    acl_update_settings();
    acl_update_permissions_list();
    // All is set, we're good to go
    return true;
}
Beispiel #2
0
/**
 * Updates user preferences
 * @global type $input
 * @return boolean
 */
function preferences_update()
{
    /*   global $input;
          $display_new_video_notification = $input['display_new_video_notification'];
          $display_threads = $input['display_threads'];
          $display_thread_notification = $input['display_thread_notification'];
    
          user_prefs_settings_update($_SESSION['user_login'], "display_new_video_notification", $display_new_video_notification);
          user_prefs_settings_update($_SESSION['user_login'], "display_threads", $display_threads);
          user_prefs_settings_update($_SESSION['user_login'], "display_thread_notification", $display_thread_notification);
    
          acl_update_settings();
          include_once template_getpath('div_main_center.php');
          return true;
         */
    global $input;
    global $ezplayer_url;
    $display_new_video_notification = isset($input['display_new_video_notification']) && $input['display_new_video_notification'] === 'on' ? '1' : '0';
    $display_threads = isset($input['display_threads']) && $input['display_threads'] === 'on' ? '1' : '0';
    $display_thread_notification = isset($input['display_thread_notification']) && $input['display_thread_notification'] === 'on' ? '1' : '0';
    user_prefs_settings_update($_SESSION['user_login'], "display_new_video_notification", $display_new_video_notification);
    user_prefs_settings_update($_SESSION['user_login'], "display_threads", $display_threads);
    user_prefs_settings_update($_SESSION['user_login'], "display_thread_notification", $display_thread_notification);
    acl_update_settings();
    trace_append(array('0', 'preferences_update', $display_new_video_notification, $display_threads, $display_thread_notification));
    if ($display_new_video_notification) {
        acl_update_watched_assets();
    } else {
        unset($_SESSION['acl_watched_assets']);
    }
    $input['action'] = $_SESSION['ezplayer_mode'];
    if (count($input) > 0) {
        $ezplayer_url .= '/index.php?';
        foreach ($input as $key => $value) {
            $ezplayer_url .= "{$key}={$value}&";
        }
    }
    // 4) Displaying the previous page
    header("Location: " . $ezplayer_url);
    load_page();
}
Beispiel #3
0
 *
 * This software is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
acl_update_settings();
?>

<form name="submit_settings_form" action="<?php 
global $ezplayer_safe_url;
echo $ezplayer_safe_url;
?>
/index.php" method="post">
    <input type="hidden" name="action" value="edit_settings" />
    <table>
        <th><span class="title left">Notifications</span></th><br/>
        <tr>
            <td><span>®Notification_new_video®</span><td>
            <td><input id="settings_notif_new_asset" name="display_new_video_notification" 
                       type="checkbox" <?php 
echo acl_show_notifications() ? 'checked' : '';