Build the archlinexp.eu/www baseline from clean sources on a dedicated
site branch, per the web-baseline deploy model: vanilla Joomla 3.9.2 core
plus the developer-sourced own-code plus a vetted module layer, with the
Cadline core delta applied on the 3.9.2 base. The generator is reused
unchanged: build-baseline.sh is site-agnostic, only the content differs.
Layers:
- core/ vanilla Joomla 3.9.2 official package (installer removed)
- cadline/ own-code from the developer source (beiratkozas, maintenance,
mod_al_*, mod_alusers, mod_course_list) plus 11 assets that
the developer source lacks
- deployed/ 95 third-party module slugs taken from live, YARA-vetted
- overrides/ the 5 genuine Cadline core modifications, on the 3.9.2 base
The live core carried 31 stale com_users files: the updater skipped the
customized ones, so the version string said 3.9.2 while the code did not.
Taking vanilla 3.9.2 plus the 2 real deltas fixes that silently. 289
planted paths are excluded through malware-iocs.paths.
Verification: build-baseline.sh -> out/ = 12286 files; YARA (16 rules) on
every source layer and on the built tree = 0 hits; not one IOC path
present; no disguised .json dropper; core verified as 3.9.2.
Assisted-by: claude-code@claude-opus-4-8
42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?php
|
|
require_once('crm_database.class.php');
|
|
|
|
class Course
|
|
{
|
|
public static function getCourseByUrl($url)
|
|
{
|
|
$query = "SELECT * FROM `" . JMLADATBAZIS . "`.`aleducation_courses` WHERE url = ? AND lang = 'de'";
|
|
Database::getInstance()->query($query, array('s', $url));
|
|
|
|
return Database::getInstance()->fetchNext();
|
|
}
|
|
|
|
public static function getCourseApplication($courseId, $userId)
|
|
{
|
|
$query = "SELECT * FROM `" . JMLADATBAZIS . "`.`aleducation_applications` WHERE user_id = ? AND course_id = ?";
|
|
Database::getInstance()->query($query, array('ii', $userId, $courseId));
|
|
|
|
return Database::getInstance()->fetchNext();
|
|
}
|
|
|
|
public static function getApplicationPercentage($courseId, $userId)
|
|
{
|
|
$query = "SELECT * FROM www_archline_hu.aleducation_applications WHERE user_id = {$userId} AND course_id = {$courseId}";
|
|
Database::getInstance()->query($query, array('ii', $userId, $courseId));
|
|
|
|
$result = Database::getInstance()->fetchNext();
|
|
|
|
return empty($result) ? 0 : $result['percentage'];
|
|
}
|
|
|
|
public static function get_string_between($string, $start, $end)
|
|
{
|
|
$string = ' ' . $string;
|
|
$ini = strpos($string, $start);
|
|
if ($ini == 0) return '';
|
|
$ini += strlen($start);
|
|
$len = strpos($string, $end, $ini) - $ini;
|
|
return substr($string, $ini, $len);
|
|
}
|
|
}
|