Functions
A guide to the most useful functions available in the Cash Crusader script for use in programming, or in some cases that can be used directly in your site design. There are other functions not listed here but they are mostly related to internal functioning of the script and of no direct use to you as a user or site owner.
action()
This special function has a category all of its own here on CCI. Find out more about it Here.
site_name()
This simple function will display the site name, as you have it configured in your admin area.
Example:
<?php site_name();?>
domain()
This simple function will display the domain name, as listed in your admin area.
Example:
<?php domain();?>
referral_url()
This simple function will display the referral_url of the currently logged in member.
Example:
<?php referral_url();?>
pages_url()
This simple function will display the URL of the site's 'pages' directory.
Example:
<?php pages_url();?>
delete_user()
This function can be used to delete a user correctly and completely, given the username and upline name.
Example:
<?php delete_user('someuser', 'someuser_upline');?>
inbox_days()
This simple function will display the number of days worth of mail kept in the on-site inboxes, as configured in your admin area.
Example:
<?php inbox_days();?>
show_http_referer()
This function will display the total referrals received by a user broken down by different sources - useful for showing where a member got their (direct) referrals from. By default it uses a simple two column table format to show the output, which can be customised with input parameters.
Examples:
<?php show_http_referer();?>
<?php show_http_referer('', '<tr><td class=ref_count>','</td><td class=ref_source>','</td></tr>');?>
keyword_totals()
This function will display the total members who have selected each interest keyword in their account, either for a single keyword, or for all keywords. By default it uses a simple two column table format to show the output, which can be customised with input parameters.
Examples:
<?php keyword_totals();?>
<?php keyword_totals('search');?>
<?php keyword_totals('search','<tr><td class=keyword>','</td><td class=keyword_count>','</td></tr>');?>
show_autosurf_cash_exposure_count()
This function will display (or return) the number of autoexposure views the current member is able to purchase with their current cash balance. It accepts two variables, the number of the Autosurf (1 to 4) and optionally, 'return'
Examples:
<?php show_autosurf_cash_exposure_count('1');?>
would display the result for Autosurf 1
<?php show_autosurf_cash_exposure_count('2','return');?>
would return the result, for Autosurf 2 (for programming purposes)
show_autosurf_point_exposure_count()
This function will display (or return) the number of autoexposure views the current member is able to purchase with their current point balance. It accepts two variables, the number of the Autosurf (1 to 4) and optionally, 'return'
Examples:
<?php show_autosurf_point_exposure_count('1');?>
would display the result for Autosurf 1
<?php show_autosurf_point_exposure_count('2','return');?>
would return the result, for Autosurf 2 (for programming purposes)
show_autosurf_ratio()
This function will display the ratio of autosurf exposures received to purchased for the current member. It accepts two variables, the number of the Autosurf (1 to 4) and optionally, text to show between the two numbers in the ratio.
Examples:
<?php show_autosurf_ratio('1');?>
would display the ratio for Autosurf 1 in this format: 10:3
<?php show_autosurf_ratio('2',' to ');?>
would display the ratio for Autosurf 2 in this format: 10 to 3
show_autosurf_credit()
This function will display the current rate of point(s) that can be earned for each site visited in the specified autosurf. It accepts one variable, the number of the Autosurf (1 to 4).
Example:
<?php show_autosurf_credit('1');?>
would display the rate of point(s) earnable for Autosurf 1.
show_autosurf_debit()
This function will display the current cost that is charged for each site visit given to the member's site in the specified autosurf. It accepts one variable, the number of the Autosurf (1 to 4).
Example:
<?php show_autosurf_debit('1');?>
would display the current cost for Autosurf 1.
users_autosurf_url()
This function will display the URL to start the specified autosurf for the current user. It accepts one variable, the number of the Autosurf (1 to 4).
Example:
<?php users_autosurf_url('1');?>
would display the start surfing URL for the current member, in Autosurf 1, such as:
http://yourdomain.com/scripts/runner.php?AS=373ffce6username&ID=1&SF=1









CCI Chatterbox RSS Feed