2 Star 2 Fork 4

Tody_Guo/php_issue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ffki_all.php 2.53 KB
一键复制 编辑 原始数据 按行查看 历史
jiahui.guo 提交于 2021-01-25 09:35 . update for netbeans error check
<?php
extract($_POST);
extract($_GET);
unset($_POST,$_GET);
if (isset($ip) && isset($kid)){
$ip=trim($ip);
$kid=trim($kid);
$servername="DRIVER={SQL Server};SERVER=10.100.160.176;DATABASE=ReportServer";
$conn=odbc_connect($servername,'thtfmes',"Mes&thtf",SQL_CUR_USE_ODBC);
if ($conn){
$sql1="SELECT Name FROM Master..SysDatabases";
$exec1=odbc_exec($conn, $sql1);
while(odbc_fetch_row($exec1)){
$sql=" SELECT ProductKeyID, ProductKeyState, ProductKey
FROM ".odbc_result($exec1,"Name").".dbo.ProductKeyInfo
WHERE (ProductKeyID = '$kid')";
$exec=odbc_exec($conn, $sql);
while(odbc_fetch_row($exec))
{
print '<strong>Product Key ID: </strong><font color="red">'.odbc_result($exec,"ProductKeyID").'</font><br \>';
print '<strong>Key State: </strong><font color="red">'.odbc_result($exec,"ProductKeyState").'</font><br \>';
print '<strong>Product Key: </strong><font color="red">'.odbc_result($exec,"ProductKey").'</font><br \><br \>';
odbc_close($conn);
die("MDOS Server---".date("Y-m-d H:i:s"));
}
}
}
// finding in new server
$servername="DRIVER={SQL Server};SERVER=$ip;DATABASE=SmartClient";
$conn=odbc_connect($servername,'thtfmes',"Mes&thtf",SQL_CUR_USE_ODBC);
if ($conn){
$sql="SELECT dbo.ProductKeyInfo.ProductKeyID,dbo.ProductKey.ProductKeyState
FROM dbo.ProductKey INNER JOIN
dbo.ProductKeyInfo ON dbo.ProductKey.ProductKeyID = dbo.ProductKeyInfo.ProductKeyID
WHERE (dbo.ProductKey.MSFTProductKeyID = '$kid')";
$exec=odbc_exec($conn, $sql);
if(odbc_fetch_row($exec)){
print '<strong>Product Key ID: </strong>'.odbc_result($exec, "ProductKeyID").'<br \>';
print '<strong>Key State: </strong><font color="red">'.odbc_result($exec, "ProductKeyState").'</font><br \>';
odbc_close($conn);
die("MSC Server---".date("Y-m-d H:i:s"));
}else{
$sql="SELECT dbo.ProductKey.ProductKeyID,dbo.ProductKey.ProductKeyState
FROM dbo.ProductKey WHERE dbo.ProductKey.MSFTProductKeyID = '$kid'";
$exec=odbc_exec($conn, $sql);
if(odbc_fetch_row($exec)){
print '<strong>Product Key ID: </strong>'.odbc_result($exec, "ProductKeyID").'<br \>';
print '<strong>Key State: </strong><font color="red">'.odbc_result($exec, "ProductKeyState").'</font><br \>';
odbc_close($conn);
die("MSC Server---".date("Y-m-d H:i:s"));
}
}
}
echo "[ERROR]: No KeyID was found";
odbc_close($conn);
}else{
echo "[ERROR]: information issue";
echo "ip=$ip";
echo "act=$act";
echo "kid=$kid";
echo "isNew=$isNew";
}
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/tody_guo/php_issue.git
git@gitee.com:tody_guo/php_issue.git
tody_guo
php_issue
php_issue
master

搜索帮助