common_cadline_libraries (CRM hardlock/db/users classes; upstream cadline_web/cadcommonlib), maintenance/ (ARCHLine.XP license backend; upstream cadline_web/maintenance), maintenance2/. Vetted live files (byte-truth); upstream repos in PROVENANCE.md. NOTE: could be git submodules — kept as live files for byte-fidelity. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
26 lines
569 B
PHP
26 lines
569 B
PHP
<?php
|
|
|
|
class HardlockHelper
|
|
{
|
|
public static $hh;
|
|
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
public static function getInstance()
|
|
{
|
|
if (!empty(self::$hh)) return self::$hh;
|
|
self::$hh = new HardlockHelper();
|
|
return self::$hh;
|
|
}
|
|
|
|
public static function getHardlock($hlNum = 0)
|
|
{
|
|
if ((int)$hlNum == 0) return (FALSE);
|
|
MySqlHelper::getInstance()->query("SELECT * FROM `" . CRMADATBAZIS . "`.`hardlock` WHERE hlNum='" . (int)$hlNum . "' LIMIT 1;");
|
|
$res = MySqlHelper::getInstance()->fetchAssoc();
|
|
return (empty($res) ? FALSE : $res[0]);
|
|
}
|
|
} // end of class
|