コード例 #1
0
ファイル: cron.php プロジェクト: trabisdementia/xuups
which is considered copyrighted (c) material of the original comment or credit authors.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
 * @copyright       The XUUPS Project http://www.xuups.com
 * @license         http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package         myinviter
 * @since           1.0
 * @author          trabis <*****@*****.**>
 * @version         $Id: index.php 0 2009-11-14 18:47:04Z trabis $
 */
include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
include_once XOOPS_ROOT_PATH . '/modules/myinviter/include/common.php';
$error = false;
if ($GLOBALS['myinviter']->getConfig('hook') == 'cron') {
    $key = Xmf_Request::getString('key');
    if ($key != $GLOBALS['myinviter']->getConfig('cronkey')) {
        $error = true;
        //We can add ?key= on any XOOPS Page while using preload and test if key is working ok
        $GLOBALS['myinviter']->addLog("Hook is set to 'cron' but no valid key was detected");
    }
}
if (!$error) {
    myinviter_sendEmails();
    if ($GLOBALS['myinviter']->getConfig('autocrawl')) {
        myinviter_runJobs();
    }
}
コード例 #2
0
ファイル: index.php プロジェクト: trabisdementia/xuups
function index_send($id = null)
{
    $errors = myinviter_sendEmails($id, true);
    if (count($errors) > 0) {
        $message = '<br />';
        foreach ($errors as $error) {
            $message .= is_array($error) ? implode('<br />', $error) : '<br />' . $error;
        }
        redirect_header('index.php', 4, sprintf(_AM_MYINVITER_ERRORS, $message));
        exit;
    } else {
        redirect_header('index.php', 1, _AM_MYINVITER_DONE);
        exit;
    }
}