Community Support Forums — WordPress® ( Users Helping Users ) — 2011-12-20T09:49:32-05:00 http://www.primothemes.com/forums/feed.php?f=40&t=13013 2011-12-20T09:49:32-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=57723#p57723 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\files.inc.php
Docs updated: December 20, 2011, 9:49 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 20th, 2011, 9:49 am


]]>
2011-12-07T01:02:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=55405#p55405 <![CDATA[s2Member v111206 / Source Code: s2member\i...]]>
s2Member v111206
Source Code: s2member\includes\classes\files.inc.php
Docs updated: December 7, 2011, 1:02 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — December 7th, 2011, 1:02 am


]]>
2011-11-05T19:25:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=51779#p51779 <![CDATA[s2Member v111105 / Source Code: s2member\i...]]>
s2Member v111105
Source Code: s2member\includes\classes\files.inc.php
Docs updated: November 5, 2011, 8:25 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — November 5th, 2011, 7:25 pm


]]>
2011-10-29T20:34:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=49874#p49874 <![CDATA[s2Member v111029 / Source Code: s2member\i...]]>
s2Member v111029
Source Code: s2member\includes\classes\files.inc.php
Docs updated: October 29, 2011, 9:34 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 29th, 2011, 8:34 pm


]]>
2011-10-17T15:38:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=47668#p47668 <![CDATA[s2Member v111017 / Source Code: s2member\i...]]>
s2Member v111017
Source Code: s2member\includes\classes\files.inc.php
Docs updated: October 17, 2011, 1:38 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 17th, 2011, 3:38 pm


]]>
2011-10-11T14:34:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=46068#p46068 <![CDATA[s2Member v111011 / Source Code: s2member\i...]]>
s2Member v111011
Source Code: s2member\includes\classes\files.inc.php
Docs updated: October 11, 2011, 12:34 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 11th, 2011, 2:34 pm


]]>
2011-10-03T15:46:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=44199#p44199 <![CDATA[s2Member v111003 / Source Code: s2member\i...]]>
s2Member v111003
Source Code: s2member\includes\classes\files.inc.php
Docs updated: October 3, 2011, 1:46 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:46 pm


]]>
2011-10-03T03:40:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=42906#p42906 <![CDATA[s2Member v111002 / Source Code: s2member\i...]]>
s2Member v111002
Source Code: s2member\includes\classes\files.inc.php
Docs updated: October 3, 2011, 1:40 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — October 3rd, 2011, 3:40 am


]]>
2011-09-27T05:25:49-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=41152#p41152 <![CDATA[s2Member v110927 / Source Code: s2member\i...]]>
s2Member v110927
Source Code: s2member\includes\classes\files.inc.php
Docs updated: September 27, 2011, 3:25 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 27th, 2011, 5:25 am


]]>
2011-09-26T21:02:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=39908#p39908 <![CDATA[s2Member v110926 / Source Code: s2member\i...]]>
s2Member v110926
Source Code: s2member\includes\classes\files.inc.php
Docs updated: September 26, 2011, 7:02 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 26th, 2011, 9:02 pm


]]>
2011-09-17T16:19:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=38052#p38052 <![CDATA[s2Member v110915 / Source Code: s2member\i...]]>
s2Member v110915
Source Code: s2member\includes\classes\files.inc.php
Docs updated: September 17, 2011, 2:19 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 17th, 2011, 4:19 pm


]]>
2011-09-14T01:27:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=36633#p36633 <![CDATA[s2Member v110913 / Source Code: s2member\i...]]>
s2Member v110913
Source Code: s2member\includes\classes\files.inc.php
Docs updated: September 13, 2011, 11:27 pm

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 14th, 2011, 1:27 am


]]>
2011-09-13T12:02:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=35361#p35361 <![CDATA[s2Member v110912 / Source Code: s2member\i...]]>
s2Member v110912
Source Code: s2member\includes\classes\files.inc.php
Docs updated: September 13, 2011, 10:02 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — September 13th, 2011, 12:02 pm


]]>
2011-08-15T14:11:39-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=31468#p31468 <![CDATA[s2Member v110815 / Source Code: s2member\i...]]>
s2Member v110815
Source Code: s2member\includes\classes\files.inc.php
Docs updated: August 15, 2011, 3:11 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\files.inc.php ?php /** * File Download routines for s2Member. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Files * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_files" ) ) { /** * File Download routines for s2Member. * * @package s2Member\Files * @since 3.5 */ class c_ws_plugin__s2member_files { /** * Handles Download Access permissions. * * @package s2Member\Files * @since 110524RC * * @attaches-to: ``add_action("init");`` * * @return null|inner Return-value of inner routine. */ public static function check_file_download_access ( ) { if ( ! empty ( $_GET [ "s2member_file_download" ] ) ) /* Call inner routine? */ { return c_ws_plugin__s2member_files_in:: check_file_download_access ( ) ; } } /** * Determines the max period ( in days ), for Download Access. * * @package s2Member\Files * @since 3.5 * * @return int Number of days, where 0 means no access to files is allowed. * Will not return a value `365`, because this routine also controls the age of download logs to archives. * * @todo Remove the limitation of `365` days somehow. */ public static function max_download_period ( ) { do_action ( "ws_plugin__s2member_before_max_download_period" , get_defined_vars ( ) ) ; /**/ for ( $n = 0 , $max = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ) ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) if ( ( $days = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) $max = ( $max $days ) ? $days : $max ; /**/ return apply_filters ( "ws_plugin__s2member_max_download_period" , ( ( $max 365 ) ? 365 : $max ) , get_defined_vars ( ) ) ; } /** * Determines the minimum Level required for File Download Access. * * @package s2Member\Files * @since 3.5 * * @return bool|int False if no access is allowed, else Level number (int) 0+. */ public static function min_level_4_downloads ( ) { do_action ( "ws_plugin__s2member_before_min_level_4_downloads" , get_defined_vars ( ) ) ; /**/ for ( $n = 0 , $min = false ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ) ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) if ( ( $min = $n ) = 0 ) break ; /**/ return apply_filters ( "ws_plugin__s2member_min_level_4_downloads" , ( ( is_int ( $min ) ) ? $min : false ) , get_defined_vars ( ) ) ; } /** * Determines how many File Downloads are allowed, also provides some extended details. * * @package s2Member\Files * @since 3.5 * * @param obj $user Optional. Defaults to the current User's object. * @param str $not_counting_this_particular_file Optional. If you want to exclude a particular file. * @param array $log Optional. Prevents another database connection *( i.e. the log does not need to be pulled again )*. * @return array An array with three elements: `allowed`, `allowed_days`, `currently`. */ public static function user_downloads ( $user = FALSE , $not_counting_this_particular_file = FALSE , $log = NULL ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_user_downloads" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $allowed = $allowed_days = $currently = 0 ; /* Initialize all of these to zero. */ /**/ if ( ( is_object ( $user ) || is_object ( $user = ( is_user_logged_in ( ) ) ? wp_get_current_user ( ) : false ) ) && ( $user_id = $user - ID ) ) { for ( $n = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) { if ( $user - has_cap ( "access_s2member_level" . $n ) ) /* Do they have access? */ { if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ) ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) { $allowed = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ; $allowed_days = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ; } if ( $user - has_cap ( "s2member_level" . $n ) ) /* We can stop now, if this is their Role. */ break ; /* Break now. */ } } /**/ $file_download_access_log = ( isset ( $log ) ) ? ( array ) $log : ( array ) get_user_option ( "s2member_file_download_access_log" , $user_id ) ; foreach ( $file_download_access_log as $file_download_access_log_entry_key = $file_download_access_log_entry ) if ( strtotime ( $file_download_access_log_entry [ "date" ] ) = strtotime ( "-" . $allowed_days . " days" ) ) if ( $file_download_access_log_entry [ "file" ] !== $not_counting_this_particular_file ) $currently = $currently + 1 ; } /**/ return apply_filters ( "ws_plugin__s2member_user_downloads" , array ( "allowed" = $allowed , "allowed_days" = $allowed_days , "currently" = $currently ) , get_defined_vars ( ) ) ; } /** * Creates a File Download Key. * * Builds a hash of: ``date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file``. * * @package s2Member\Files * @since 3.5 * * @param str $file Location of your protected file, relative to the `/s2member-files/` directory. * In other words, just the name of the file *(i.e. `file.zip` )*. * @param str $directive Optional. One of `ip-forever|universal|cache-compatible`. * `ip-forever` = a Download Key that never expires, tied only to a specific file and IP address. * `universal` and/or `cache-compatible` = a Download Key which never expires, and is NOT tied to any specific User. Use at your own risk. * @return str A Download Key. MD5 hash, 32 characters, URL-safe. */ public static function file_download_key ( $file = FALSE , $directive = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_file_download_key" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $directive === "ip-forever" ) { $allow_caching = false ; $salt = $file . $_SERVER [ "REMOTE_ADDR" ] ; } else if ( $directive === "universal" || $directive === "cache-compatible" || ! empty ( $directive ) ) { $allow_caching = true ; $salt = $file ; } else /* Otherwise, we use the default ``$salt``. */ { $allow_caching = false ; $salt = date ( "Y-m-d" ) . $_SERVER [ "REMOTE_ADDR" ] . $_SERVER [ "HTTP_USER_AGENT" ] . $file ; } /**/ $key = md5 (c_ws_plugin__s2member_utils_encryption:: xencrypt ( $salt ) ) ; /**/ if ( $allow_caching === false ) /* Disallow caching? */ c_ws_plugin__s2member_no_cache:: no_cache_constants ( true ) ; /**/ return apply_filters ( "ws_plugin__s2member_file_download_key" , $key , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\files.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — August 15th, 2011, 2:11 pm


]]>
2011-07-11T17:28:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=27676#p27676 <![CDATA[s2Member v110710 / Source Code: s2member\i...]]>
s2Member v110710
Source Code: s2member\includes\classes\files.inc.php
Docs updated: July 11, 2011, 6:28 pm

Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member\includes\classes\files.inc.php ?php /** * File Download routines for s2Member. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * Released under the terms of the GNU General Public License. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * @package s2Member\Files * @since 3.5 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /**/ if ( ! class_exists ( "c_ws_plugin__s2member_files" ) ) { /** * File Download routines for s2Member. * * @package s2Member\Files * @since 3.5 */ class c_ws_plugin__s2member_files { /** * Handles Download Access permissions. * * @package s2Member\Files * @since 110524RC * * @attaches-to: ``add_action("init");`` * * @return null|inner Return-value of inner routine. */ public static function check_file_download_access ( ) { if ( ! empty ( $_GET [ "s2member_file_download" ] ) ) /* Call inner routine? */ { return c_ws_plugin__s2member_files_in:: check_file_download_access ( ) ; } } /** * Determines the max period ( in days ), for Download Access. * * @package s2Member\Files * @since 3.5 * * @return int Number of days, where 0 means no access to files is allowed. * Will not return a value `365`, because this routine also controls the age of download logs to archives. * * @todo Remove the limitation of `365` days somehow. */ public static function max_download_period ( ) { do_action ( "ws_plugin__s2member_before_max_download_period" , get_defined_vars ( ) ) ; /**/ for ( $n = 0 , $max = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ) ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) if ( ( $days = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) $max = ( $max $days ) ? $days : $max ; /**/ return apply_filters ( "ws_plugin__s2member_max_download_period" , ( ( $max 365 ) ? 365 : $max ) , get_defined_vars ( ) ) ; } /** * Determines the minimum Level required for File Download Access. * * @package s2Member\Files * @since 3.5 * * @return bool|int False if no access is allowed, else Level number (int) 0+. */ public static function min_level_4_downloads ( ) { do_action ( "ws_plugin__s2member_before_min_level_4_downloads" , get_defined_vars ( ) ) ; /**/ for ( $n = 0 , $min = false ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ) ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) if ( ( $min = $n ) = 0 ) break ; /**/ return apply_filters ( "ws_plugin__s2member_min_level_4_downloads" , ( ( is_int ( $min ) ) ? $min : false ) , get_defined_vars ( ) ) ; } /** * Determines how many File Downloads are allowed, also provides some extended details. * * @package s2Member\Files * @since 3.5 * * @param obj $user Optional. Defaults to the current User's object. * @param str $not_counting_this_particular_file Optional. If you want to exclude a particular file. * @param array $log Optional. Prevents another database connection *( i.e. the log does not need to be pulled again )*. * @return array An array with three elements: `allowed`, `allowed_days`, `currently`. */ public static function user_downloads ( $user = FALSE , $not_counting_this_particular_file = FALSE , $log = NULL ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_user_downloads" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ $allowed = $allowed_days = $currently = 0 ; /* Initialize all of these to zero. */ /**/ if ( ( is_object ( $user ) || is_object ( $user = ( is_user_logged_in ( ) ) ? wp_get_current_user ( ) : false ) ) && ( $user_id = $user - ID ) ) { for ( $n = 0 ; $n = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "c" ] [ "levels" ] ; $n ++ ) { if ( $user - has_cap ( "access_s2member_level" . $n ) ) /* Do they have access? */ { if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ) ) if ( ! empty ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ) ) { $allowed = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed" ] ; $allowed_days = $GLOBALS [ "WS_PLUGIN__" ] [ "s2member" ] [ "o" ] [ "level" . $n . "_file_downloads_allowed_days" ] ; } if ( $user - has_cap ( "s2member_level" . $n ) ) /* We can stop now, if this is their Role. */ break ; /* Break now. */ } } /**/ $file_download_access_log = ( isset ( $log ) ) ? ( array ) $log : ( array ) get_user_option ( "s2member_file_download_access_log" , $user_id ) ; foreach ( $file_download_access_log as $file_download_access_log_entry_key = $file_download_access_log_entry ) if ( strtotime ( $file_download_access_log_entry [ "date" ] ) = strtotime ( "-" . $allowed_days . " days" ) ) if ( $file_download_access_log_entry [ "file" ] !== $not_counting_this_particular_file ) $currently = $currently + 1 ; } /**/ return apply_filters ( "ws_plugin__s2member_user_downloads" , array ( "allowed" = $allowed , "allowed_days" = $allowed_days , "currently" = $currently ) , get_defined_vars ( ) ) ; } /** * Creates a File Download Key. * * Builds a hash of: ``date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file``. * * @package s2Member\Files * @since 3.5 * * @param str $file Location of your protected file, relative to the `/s2member-files/` directory. * In other words, just the name of the file *(i.e. `file.zip` )*. * @param str $directive Optional. One of `ip-forever|universal|cache-compatible`. * `ip-forever` = a Download Key that never expires, tied only to a specific file and IP address. * `universal` and/or `cache-compatible` = a Download Key which never expires, and is NOT tied to any specific User. Use at your own risk. * @return str A Download Key. MD5 hash, 32 characters, URL-safe. */ public static function file_download_key ( $file = FALSE , $directive = FALSE ) { eval ( 'foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;' ) ; do_action ( "ws_plugin__s2member_before_file_download_key" , get_defined_vars ( ) ) ; unset ( $__refs , $__v ) ; /* Unset defined __refs, __v. */ /**/ if ( $directive === "ip-forever" ) { $allow_caching = false ; $salt = $file . $_SERVER [ "REMOTE_ADDR" ] ; } else if ( $directive === "universal" || $directive === "cache-compatible" || ! empty ( $directive ) ) { $allow_caching = true ; $salt = $file ; } else /* Otherwise, we use the default ``$salt``. */ { $allow_caching = false ; $salt = date ( "Y-m-d" ) . $_SERVER [ "REMOTE_ADDR" ] . $_SERVER [ "HTTP_USER_AGENT" ] . $file ; } /**/ $key = md5 (c_ws_plugin__s2member_utils_encryption:: xencrypt ( $salt ) ) ; /**/ if ( $allow_caching === false ) /* Disallow caching? */ c_ws_plugin__s2member_no_cache:: no_cache_constants ( true ) ; /**/ return apply_filters ( "ws_plugin__s2member_file_download_key" , $key , get_defined_vars ( ) ) ; } } } ? [ full view ]s2member\includes\classes\files.inc.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)

Statistics: Posted by System Robot — July 11th, 2011, 5:28 pm


]]>
2011-07-09T06:08:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=13013&p=25308#p25308 <![CDATA[s2Member v111220 / Source Code: s2member\i...]]>
s2Member v111220
Source Code: s2member\includes\classes\files.inc.php
Docs updated: December 20, 2011, 9:49 am

Open for public discussion.
(!-- s-words :: --)n/a(!-- :: s-words --)

Statistics: Posted by System Robot — July 9th, 2011, 6:08 am


]]>