|Last Updated||Ratings||Unique User Downloads||Download Rankings|
|2003-10-09 (13 years ago)||55%||Total: 3,249||All time: 1,044 This week: 742|
|command 1.0.0||GNU General Publi...||Content management|
Class that uses your database to manage your main include files using a command/sub-command method. With this you only need one index.php in your document root and the rest of your files can be outside it. This will allow you to dynamically change which page is included based on a commmand/sub-command variable. It also allows for a high level of error checking.
After shortly after the first release of command_class I noticed a number of major errors in the code. More than likely anyone who down loaded my tool needed to do some major rewritting to use it. I have since fixed the errors allow with making some changes to the way the class works. I will use this doc to run down the new features, usage and requirements. New Features I have added a new parameter now instead of use command and sub_command you have a domain as well. This is for things like departments and such so you can logically breakup sections of the site. Take a school web site for example you might have a number of domains such as Math, Science, English, Etc... Usages is still the same as before only adding in that you will need a Domain (Note if no domain is supplied then it will be assumed to be DEFAULT). As a quick recap for usage for people new to command class. $command = new Command_CLASS("DOMAIN","COMMAND","SUB_COMMAND"); $command->load_command(); Requirements This has change a great deal since I wanted to keep all the new features I have added for my use to pass on to everyone else without having to completely rewrite the code to handle every possible situation you may need to use it for. 1) an object called $tools 2) $tools->fatal_error This takes a single arg and returns an error message and then executes a die 3) A main program with define("MAIN",1); set before command_class is loaded. 4) A database with the following set up. DOMAIN,COMMAND,SUB_COMMAND,MODE,FILE,SECURITY,TITLE 5) a $database object 6) a $query object (I use this as a set of methods that are nothing more than querys to allow me to call them from all my other classes) 7) $query->get_command which takes the DOMAIN, COMMAND, and SUB_COMMAND and returns the database row for that set (NOTE this needs to be unique) 8) $database->num_rows takes a query reource and returns the number or rows 9) $database->get_row takes a query resource and returns an object with each of the cols as properties. 10) $tools->clean_text a text cleaner method that takes text and returns it cleaned 11) A command set with the following DOMAIN = DEFAULT COMMAND = LOGIN SUB_COMMAND = VERIFY_LOCK 12) $query->user_lookup takes a user name and returns the row for that user 13) Lock_Key col in your the User table. 14) A command set with the following DOMAIN = DEFAULT COMMAND = LOGIN SUB_COMMAND = LOCK_RELEASE 15) a $security object 16) $security->authenticate to make sure users are authenticated. I may have missed something here. Make sure you read the code before using it. Also if you don't have user logins a number of items can be removed and changed as needed. If you have any questions on how to use this class or would like access to the other classes I have used here please let me know and I will try to provide them for you. The only one I will not provide is my security_class.php because that has a number of methods for site security and I don't want to risk any expose by releasing my security management methods publicly. If you do email me be sure to put COMMAND CLASS in the subject or I might miss it. If I don't respond with in 3 days resend your request.
|Version Control||Unique User Downloads||Download Rankings|