meraproject/themes/merakomis/test/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

48 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?
namespace controller\themes\merakomis\test;
use themes\merakomis\Emp;
use themes\merakomis\Telegram;
class Api {
public function test2(){
exit;
$a = Emp::getAll();
foreach ($a as $v) {
if($v[Emp::$TG_ACC]) {
echo '<pre>';
echo var_dump($v[Emp::$ID], $v[Emp::$TG_ACC], $v[Emp::$EMAIL]);
echo '</pre>';
}
}
}
public function test()
{
exit;
//*
// Показывать ли все ошибки
error_reporting(E_ALL);
ini_set('display_errors',true);
/*/
ini_set('display_errors','Off');
/**/
$serverName = '10.0.0.124\DATAPROJECT,5220'; //serverName\instanceName
//$connectionInfo = array( "Database"=>"T51", "UID"=>"meraproject", "PWD"=>'~IA}QmLJdwrg');
$connectionInfo = array( "Database"=>"T51", "UID"=>"meraproject", "PWD"=>'dfnRHM346DVkyjk');
$conn =\sqlsrv_connect( $serverName, $connectionInfo);
$q = "SELECT * FROM Апрель_2025";
$r = sqlsrv_query($conn,$q);
while ($row = sqlsrv_fetch_array($r,SQLSRV_FETCH_ASSOC)) {
print_r($row);
}
echo '<pre>';
echo var_dump($r,$conn,sqlsrv_errors());
echo '</pre>';
}
}