. */ include("./../config.php"); include("./../include/functions.php"); if( get_remote_address()!=NULL && in_array(get_remote_address(), preg_split("/;/", RUNDAILY_ALLOWED_HOSTS)) ) { $out = ""; if( !is_writable("./../tmp") ) { $out.="!!ERROR!!: 'tmp' directory is not writable, this will prevent certain functionality from functioning properly!\n\n"; } if( !is_writable("./../uploads") ) { $out.="!!ERROR!!: 'uploads' directory is not writable, this will prevent certain functionality from functioning properly!\n\n"; } include("./../include/mysql.php"); include("./../include/setup.php"); include("./../include/globals.php"); include("./../include/deadline.php"); include("./../include/Chart.php"); include("./../include/Mail.php"); if( $setup['AuthSystem']=="" ) { $setup['AuthSystem'] = "None"; } $authClass = "Auth".$setup['AuthSystem']; require_once("./../include/IAuth.php"); require_once("./../include/".$authClass.".php"); $ldap = new $authClass(); include("./mails.php"); include("./statistics.php"); if( is_before_ex("EventDateStart") OR $setup['EventDateStart']=="" ) { include("./../include/numparticipants_func.php"); include("./upd-body.php"); include("./upd-nummem.php"); if( $setup['EventDateStart']!="" ) { include("./contactpwd.php"); include("./chk-parttype.php"); include("./autoselect.php"); } } foreach(array("MemListRundaily", "CurrenciesRundaily") as $rundailyClass) { include("./" . $rundailyClass . ".php"); $rundaily = new $rundailyClass(); if( $rundaily->isEnabled() ) { $out .= "\n\n=== " . $rundaily->getTitle() . " ===\n"; $rundaily->run(); foreach( $rundaily->getMessages() as $message ) { $out .= $message . "\n"; } } } ########### ### End ### ########### $out.="\n\nFinished\n"; $mail = new Mail($setup['MailReturnpath'], $setup['WebmasterEmail']); $mail->setSubject("Rundaily ".$setup['SetupEventType']." application"); $mail->addHeader("To", "\"".Mail::encodeHeader($setup['WebmasterName'])."\" <".$setup['WebmasterEmail'].">"); $mail->addHeader("From", "\"".Mail::encodeHeader($setup['WebmasterName'])."\" <".$setup['WebmasterEmail'].">"); $mail->addHeader("X-Content", "rundaily to webmaster"); $mail->addHeader("X-ApplicationID", "0"); $mail->addHeader("X-Signature", get_signature("rundaily to webmaster", 0)); $mail->setMessage($out); switch( $mail->send(true) ) { case Mail::MAIL_OK: dolog("rundaily", "Rundaily runned - mailed details to webmaster", "info"); break; case Mail::MAIL_QUEUE: dolog("rundaily", "Rundaily runned - mail with details to webmaster has been queued", "warning"); break; default: dolog("rundaily", "Rundaily runned - failed mailing results to webmaster", "error"); break; } echo nl2br($out); }else { echo "You cannot run this page manually. [".get_remote_address()."]"; } function debug($msg) { global $out; echo "!!! $msg !!!\n"; $out .= "!!! $msg !!!\n"; } ?>