faqts : Computers : Software : FreeTrade : Customization

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

Is it possible to specify which items can be a special item or is it random?

Aug 10th, 2000 06:16
C Walker, Leon, mailing list


function SpecialItem()
        {
                global $DatabaseLink;
                //how often to change item
                $ChangeDays =7;
                //create array of item IDs
                $Item_ID = array(1,2,3);
                //get day of the year (1-365)
                $DayOfYear = date("z");
                //return item ID
                return($Item_ID[(floor($DayOfYear/$ChangeDays)%(count
($Item_ID)))]);
        }
See the line that's commented "create array of item IDs"?  Put the IDs 
of your special items in there instead of just 1,2,3.