$advCommenterName = cot::$L['Anonymous'];
        $advCommenterUrl = '';
        if (cot::$usr['id'] > 0) {
            $advCommenterName = cot_user_full_name(cot::$usr['profile']);
            $advCommenterUrl = cot_url('users', array('m' => 'details', 'id' => cot::$usr['id'], 'u' => htmlspecialchars(cot::$usr['name'])));
            if (!cot_url_check($advCommenterUrl)) {
                $advCommenterUrl = COT_ABSOLUTE_URL . $advCommenterUrl;
            }
        } elseif ($comarray['com_author'] != '') {
            $advCommenterName = $comarray['com_author'];
        }
        // /Автор комментария
        $mailView = new View();
        $mailView->advert = $advert;
        $mailView->owner = $owner;
        $mailView->commentText = $advComText;
        $mailView->commentUrl = $advertUrl . "#c" . $id;
        $mailView->commenter = cot::$usr['id'] > 0 ? cot::$usr['profile'] : array();
        $mailView->commenterName = $advCommenterName;
        $mailView->commenterUrl = $advCommenterUrl;
        $mailView->advertUrl = $advertUrl;
        $mailView->advertEditUrl = $advertEditUrl;
        $mailView->myAdvsUrl = $myAdvsUrl;
        $mailView->advertText = $text;
        $mailSubject = cot::$L['advboard_new_comment'];
        $mailBody = $mailView->render('advboard.notify_comment.' . $userLang . '.' . $advert->category);
        cot_mail($advert->getEmail(false, true), $mailSubject, $mailBody, '', false, null, true);
        // Вернем язык на место
        cot::$L = $tmpL;
    }
}
Example #2
0
        $lang = cot_import('lang', 'P', 'ALP');
        if (empty($lang)) {
            $lang = cot_lang_determine();
        }
    } else {
        $lang = $_SESSION['cot_inst_lang'];
    }
    require_once cot_langfile('main', 'core');
    require_once $cfg['system_dir'] . '/resources.rc.php';
} else {
    $branch = 'siena';
    $prev_branch = 'genoa';
    require_once $cfg['system_dir'] . '/database.php';
    $dbc_port = empty($cfg['mysqlport']) ? '' : ';port=' . $cfg['mysqlport'];
    $db = new CotDB('mysql:host=' . $cfg['mysqlhost'] . $dbc_port . ';dbname=' . $cfg['mysqldb'], $cfg['mysqluser'], $cfg['mysqlpassword']);
    cot::init();
    $sql_install = @$db->query("SHOW TABLES LIKE '{$db_updates}'");
    if ($sql_install->rowCount() != 1) {
        define('COT_UPGRADE', true);
        $cfg['defaulttheme'] = 'nemesis';
        $cfg['defaultscheme'] = 'default';
    }
    require_once $cfg['system_dir'] . '/common.php';
}
require_once cot_incfile('forms');
require_once cot_incfile('extensions');
require_once cot_langfile('install', 'module');
require_once cot_langfile('users', 'core');
require_once cot_langfile('admin', 'core');
require_once cot_incfile('install', 'module', 'resources');
// Various Generic Vars needed to operate as Normal