meraproject/themes/merakomis/telegram/controller.php
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

31 lines
692 B
PHP

<?
namespace controller\themes\merakomis\telegram;
use themes\merakomis\Emp;
use themes\merakomis\Telegram;
class Api {
static function getAcc()
{
$a = Emp::getByID(31);
$a = Emp::getAll();
foreach ($a as $v){
if($v[Emp::$TG_ACC]) {
echo '<pre>';
echo var_dump($v[Emp::$NAME],$v[Emp::$ID], $v[Emp::$TG_ACC]);
echo '</pre>';
if( $v[Emp::$TG_ACC]==31){
Emp::updateById($v[Emp::$ID], [Emp::$TG_ACC => 0]);
}
}
}
}
static function test(){
echo Telegram::getStartLink();
Telegram::getUpdates();
}
}