/**
* @ingroup BaseModules
* @brief A good starting point for the main class on yoru site.
* A class that comes preloaded with lots of standard pages to save you time!!
* Contained are: about, contact, TOS, privacy, spam, copyright, and a phpinfo
* page for debugging. Grab this and you're good to go!
*/
abstract class BaseMain extends MyModule
{
/**
* this adds all the extra nifty pages.
*
* about - our about page
* contact - contact page w/ email form
* tos - our premade TOS page
* privacy - a template privacy page
* spam - our spam page
* copyright - copyright legalese page
* phpinfo - a standard php info page
* error - our error reporting page
* recache - recache a cached page
* bbcode - our bbcode example page
* sitesql - sql to create all site tables
* sitexml - xml description of all modules
* sitemap - page that links to all parameters for all modules
*
* @return see BaseModule
*/
function getPagesXml()
{
$xml = parent::getPagesXml();
$xml .= <<
You should define " . get_class($this) . "::drawAboutPage()
"; } /** * draws a basic contact page form. you Config::set('site_admin') to tell it who to send to. */ function drawContactPage() { $form = $this->createContactForm(); if ($form->isSubmitted()) { $form->validate(); if (!$form->hasError()) { //create our email. $subject = "[" . Config::get('site_name') . "] - Contact Form"; $body .= "Recently, " . $form->getData('email') . " filled out the contact form on " . Config::get('site_name') . ". "; $body .= "Here's what they said:\n\n"; $body .= "Subject: " . $form->getData('subject') . "\n\n"; $body .= $form->getData('message') . "\n\n"; $body .= "Thanks,\nThe Happy " . Config::get('site_name') . " Contact Mailer"; //get our mailer and mail it! Mail::send(Config::get('site_admin'), $subject, $body, null, $form->getData('email')); echo "Thank you for contacting us. We have been notified and will respond to your inquiry ASAP.
\n"; } } if ($form->needsDrawn()) $form->drawAll(); } /** * this creates the contact form. * * @return a Form object */ function createContactForm() { $form = new Form(); $form->action = $this->getUrl(".contact"); $form = $this->contactFormAddFields($form); return $form; } /** * adds teh neccessary fields (email, subject, message, submit) to the contact form. * * @param $form the form to add fields to * * @return the form with fields added. */ function contactFormAddFields($form) { $form->add('EmailField', 'email', array( 'required' => true, 'width' => '75%' )); $form->add('TextField', 'subject', array( 'required' => true, 'width' => '75%' )); $form->add('TextAreaField', 'message', array( 'required' => true, 'width' => '75%', 'height' => '150px' )); $form->addSubmit('Contact Us'); return $form; } /** * draws teh TOS for your site. use this TOS at your own risk. we take no * legal liability from any use of it. you are using it COMPLETELY at your * own risk. i provide this merely as a convenience since it is a PITA to * get these things done. */ function drawTosPage() { ?>=Config::get('site_name')?> (the "Website") is a online website. You are responsible for reviewing these Terms of Service ("TOS") and your access to and use of the Website signifies that you have read, understood, agree and consent to be held to the TOS and to abide by them. We reserve the right in our sole discretion to change, modify or alter the TOS at any time and without notice. Your continued access to and use of the Website indicates your consent to any changed, modified or altered TOS. It is your responsibility as a user to regularly review the TOS. If you do not agree to the TOS, do not use or access the Website. We reserve the right to refuse service or terminate any account or membership for any reason at any time.
Your use and access to the Website indicates you consent to, and that you have read and understood our =$this->getLink(array('page' => 'privacy'), 'Privacy Policy');?> which is incorporated herein by this reference.
Your use and continued access is subject to your compliance with our "Code of Conduct," that you are over the age of =Config::get('minimum_age');?>, and that your activities and use on our Website are in compliance with federal, state and local laws and regulations. Your violation of the Code of Conduct permits us to terminate and cancel, or prevent access to, our Website without notice to you.
Your use and access of the Website is subject to you abiding by this Code of Conduct:
We reserve the right to discontinue or change any service or feature on the Website at anytime and without notice.
We are not responsible for any information including the security of that information posted on the Website. We are also not responsible any false or misleading information. It is your responsibility to control access to information that you might find unsuitable. This includes controlling access by minors through your account. We shall not and have no obligation to, although we reserve the right to, to pre-screen content and we are not liable for content provided by others. You expressly agree that for any reason we can edit, delete or modify any content or postings available on or through the Website, however, =Config::get('site_owner')?> shall have no liability for any action or inaction with respect to removing or editing such material. You acknowledge and agree that your use the Website is at your sole and entire own risk.
In no event will =Config::get('site_owner')?> be liable for any direct, indirect, incidental, consequential, special or punitive damages, including, but not limited to, damages for loss of profits, business interruption, loss of programs or information, even if we have been advised of the possibility of such damages, arising out of your access, use or inability to use the Website, any services, any information, transactions provided on or through the Website, downloads from the Website, or any delay of such information, service or access. Further =Config::get('site_owner')?> shall not be liable for any claim attributable to errors, omissions, or other inaccuracies in the service and/or materials or information downloaded through the Website. Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. In such states, =Config::get('site_owner')?> liability is limited to the greatest extent permitted by law.
=Config::get('site_owner')?> makes no representations whatsoever about any other web site which you may access through this one or which may link to this site. When you access a non-=Config::get('site_name')?> web site, please understand that it is independent from =Config::get('site_owner')?> and that =Config::get('site_owner')?> has no control over the content on that web site. In addition, a link to or from the Website does not mean that =Config::get('site_owner')?> has control over, or endorses the content of, the third party web site.
You agree to indemnify, defend and hold =Config::get('site_owner')?> and its affiliates, officers, directors, employees and agents harmless from and against any and all claims, demands, actions, costs, liabilities, losses and damages of any kind, including reasonable attorneys' fees, arising out of or resulting from (i) your use of the Website, (ii) your use of products, services, or information provided on or through the Website, or (iii) your breach of any provision of the TOS. =Config::get('site_owner')?> reserves the right, to assume the exclusive defense and control of any matter otherwise subject to indemnification by you, in which event you will cooperate with us asserting any available defenses.
The Website protected under copyright and owned entirely by =Config::get('site_owner')?>, except for user posts. © =Config::get('site_owner')?> 2006. All copyright, licenses, and idea submissions are covered in our =$this->getLink(array('page' => 'copyright'), 'copyright policy');?> which is incorporated herein by this reference.
The laws of the state of Iowa, exclusive of its conflict of laws provisions, shall govern your access and use of the Website and the enforcement of the TOS. You hereby agree any claim against =Config::get('site_owner')?> will be resolved by the state or federal court having jurisdiction in =Config::get('site_jurisdiction');?>. Further, you also agree and submit to the exercise of personal jurisdiction and venue of such courts for the purpose of litigating any such claim or action.
If any provision of the TOS is determined to be void, invalid or unenforceable, the remainder shall be unaffected and shall be enforceable as if the void, invalid or unenforceable part was not a provision of the TOS. The waiver by =Config::get('site_owner')?> of a breach of any provision of the TOS shall not operate or be construed as a waiver of any subsequent breach.
=Config::get('site_owner')?> does not knowingly collect any information from children under =Config::get('minimum_age');?> years of age through the Website. If you are under =Config::get('minimum_age');?> years of age, you are not permitted to access the Website or submit information on to the Website. Minors between the ages of =Config::get('minimum_age');?>-18 are strongly encouraged to notify their parents before using the Website. If you choose to access the Website from international locations, you are solely responsible for compliance the local laws of that region.
} /** * this draws teh privacy policy page. as with the TOS, we assume no * liability for any trouble this may or may not get you into. we provide * this merely as a convenience, so use it at your own risk. this means get * your own lawyer to look over it. */ function drawPrivacyPage() { ?>We reserve the right to change these terms at any time and without notice to you. Your continued usage of the Website indicates your consent to any amendment or change to the privacy terms. It is your sole responsibility as a user to regularly review these terms.
We collect and analyze aggregate information of visitors, including the domain name, visited pages, referring URLs, and other publicly available information. We use this information to help improve the Website and services, and to customize the content of our pages for each individual customer. IP addresses are gathered for statistical purposes only and are in a non-identifiable to the user. These IP addresses are purged weekly. Further we collect all personal information you voluntarily provide us through registration or postings.
We do not sell or make commercially available specific information about users or their collected data, except in cooperation with law enforcement bodies in regards to content violations or violations of applicable laws. We maintain a database of member information which is used for the functioning of the Website as well as internal purposes such as technical support, notifying members of changes or enhancements to the service and new services and products that may be of interest to them. We do make aggregate user information available to advertisers. =Config::get('site_name')?> may share personally identifiable information with business partners, including any business entity with which we might merge with or be acquired by, or with whom we have a business relationship. However, any use by the business partner shall be subject the same terms and conditions of this policy.
We will never share, sell, or rent any email addresses entered into the system.
We are strongly committed to protecting all data. Only your family and friends as designated are allowed to view the information you enter. We do allow people to view basic information on you in order to build family connections, however you can opt-out of this and only allow extended family to view your profile.
This Anti-Spam Policy Notice governs the use of the Website at and its associated services, web pages, domains and sub-domains, which are owned and operated by =Config::get('site_owner')?>.
This sets forth our policy with regard to the use of "Spam" marketing techniques in connection with Internet Marketing. In the event that we deem you to be in violation of these policies, we shall immediately revoke your rights and close any active account.
We have a strict policy against spamming. We forbid the sending of unsolicited mass Emails or unsolicited Emails of any kind in connection with the marketing of programs, products and services.
We reserve the right to terminate your account and participation in our programs if we deem you to be in violation of our anti-spamming policies. We also reserve the right to suspend your account and participation pending review upon receipt of any complaint or other evidence that you may be engaging in any spamming activity.
We consider spamming to be any activity whereby you directly or indirectly transmit email messages to any email address that has not solicited such email and does not consent to such transmission. We also consider spamming to constitute posting advertisements in newsgroups in violation of the terms of participation in such newsgroup, that are off topic, or in newsgroups that do not specifically permit advertisements. We also consider it spamming when advertisements are placed on message boards or in chat rooms when they are not permitted by the terms of participation in such message boards and chat rooms.
If you are "spammed" by anyone regarding our products, services, Website, or any other matters, please report this activity to =Config::get('site_owner')?>.
The entire contents of the Website are protected by international copyright and trademark laws. The owner of the copyrights and trademarks are =Config::get('site_owner')?>, its affiliates or other third party licensors. YOU MAY NOT MODIFY, COPY, REPRODUCE, REPUBLISH, UPLOAD, POST, TRANSMIT, OR DISTRIBUTE, IN ANY MANNER, THE MATERIAL ON THE WEBSITE, INCLUDING TEXT, GRAPHICS, CODE AND/OR SOFTWARE. You may print and download portions of material from the different areas of the Website solely for your own non-commercial use provided that you agree not to change or delete any copyright or proprietary notices from the materials. You agree to grant to =Config::get('site_owner')?> a non-exclusive, royalty-free, worldwide, perpetual license, with the right to sub-license, to reproduce, distribute, transmit, create derivative works of, publicly display and publicly perform any materials and other information (including, without limitation, ideas contained therein for new or improved products and services) you submit to any public areas of the Website (such as bulletin boards, forums and newsgroups) or by e-mail to =Config::get('site_owner')?> by all means and in any media now known or hereafter developed. You also grant =Config::get('site_owner')?> the right to use your name in connection with the submitted materials and other information as well as in connection with all advertising, marketing and promotional material related thereto. You agree that you shall have no recourse against =Config::get('site_owner')?> for any alleged or actual infringement or misappropriation of any proprietary right in your communications to =Config::get('site_owner')?>.
Pursuant to the requirements of the Digital Millennium Copyright Act, if you feel that your copyright rights are being violated by a user, please provide the following information for our investigation. Please provide the following information:
=Config::get('site_owner')?> agent for notice of claims of copyright infringement is: =Linkify::email(Config::get('copyright_agent'));?>
We have notified an admin about your problem.
Thank you for taking the time to send this error report. We will try to fix it as soon as possible.
"; } } } /** * prep our recache page, and do all the work. */ public function initRecachePage() { //get our url $url = base64_decode($this->params('do')); //delete it. self::deleteCachedPage($url); //send us back home Util::redirect($url); } /** * prep our bbcode page */ public function initBBCodePage() { $this->doCachePage = true; } /** * draw our bbcode example page */ public function drawBBCodePage() { echo '$ar[name] | |
---|---|
Code: " . nl2br(htmlentities($ar['example'])) . " | ";
echo "Result: " . Linkify::process($ar['example']) . " |
//get our modules xml data. $modules = $site->getModulesArray(); foreach ($modules AS $module) { $obj = new $module; $sql = $obj->getCreateTableSql(); //show the module sql. if ($sql) { echo "\t
\n\t\t\n\t
\n"; } } } /** * prep our site xml page */ public function initSiteXMLPage() { $this->pageTitle = get_class($this) . " Module - XML Structure"; $this->setTemplate(new XMLTemplate()); } /** * draw our xml description of the entire site */ public function drawSiteXMLPage() { $site = Site::getSite(); echo $site->getModulesXml(); } /** * draw aset of links to every module paramter page on the site */ public function drawSiteMapPage() { $site = Site::getSite(); //loop thru each module, instantiate and then show its info... $modules = $site->getModulesArray(); foreach ($modules AS $module) { $obj = new $module(); echo "$obj->_Descriptions
"; } } } ?>