一个SQL管理员的web接口
来源:互联网 发布:乐视清除cache数据中 编辑:程序博客网 时间:2024/05/18 01:28
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
/*************************************************************************************
* SQLAdmin v2.0 - An SQL Administration User Interface for the web *
* Copyright (C) 1997-98 Alessandro Vernet <avernet@scdi.org> *
*************************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; if not, write to the *
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, *
* Boston, MA 02111-1307, USA. *
*************************************************************************************/
/* TODO:
* - Add sort order.
* - Add simple view.
* - Add some documentation.
*/
/* LIMITATIONS:
* - Works only with mSQL.
*/
/* HISTORY:
* - 97-11-05 (avernet) Corrected a bug with quote.
* - 98-01-01 (avernet) Added a sortColumn parameter to
* administrationTable function.
* - 98-03-14 (avernet) Added function addTable to enable users to
* add (but not modify) en entry to the database.
* - 98-05-19 (avernet) Submitted to PX.
* - 98-10-11 (avernet) Now SQLAdmin works with PHP3. The PHP2 version
* will not be mainteained anymore.
* - 98-10-11 (avernet) SQLAdmin is now distributed under the LGPL
* instead of MPL.
*/
function escapeforhtml ($string)
{
$result = $string;
//$result = ereg_replace ("/"", """, $result);
$result = ereg_replace ("<", "<", $result);
$result = ereg_replace (">", ">", $result);
return $result;
}
function displayTuple ($fieldsNumber, $fieldNames,
$fieldLengths, $values, $mode)
{
$result = "";
$result .= "<FORM METHOD=/"post/"><TABLE BORDER><TR>" .
"<TD BGCOLOR=/"#CCCCFF/">";
$result .= "<TABLE CELLSPACING=/"0/" CELLPADDING=/"0/">";
$fieldIndex = 0;
while ($fieldIndex < $fieldsNumber)
{
$result .= "<TR><TD>" . $fieldNames [$fieldIndex] . "</TD><TD>";
if ($fieldLengths [$fieldIndex] <= 128)
{
$result .= "<INPUT TYPE=/"text/" NAME=/"" .
$fieldNames [$fieldIndex] . "/" VALUE=/"" .
$values [$fieldIndex] . "/" SIZE=/"64/">";
}
else
{
$result .= "<TEXTAREA NAME=/"" .
$fieldNames [$fieldIndex] . "/"" .
" COLS=/"64/" ROWS=/"10/" WRAP=/"virtual/">" .
escapeforhtml ($values [$fieldIndex]) . "</TEXTAREA>";
}
$result .= "<INPUT TYPE=/"hidden/" NAME=/"old-" .
$fieldNames [$fieldIndex] .
"/" VALUE=/"" . escapeforhtml ($values [$fieldIndex]) . "/">" .
"</TD></TR>";
$fieldIndex++;
}
$result .= "<TR><TD ALIGN=/"center/" COLSPAN=/"2/">";
if ($mode == "modify")
{
$result .= "<INPUT TYPE=/"submit/" NAME=/"remove/" VALUE=/"Remove/">";
$result .= "<INPUT TYPE=/"submit/" NAME=/"update/" VALUE=/"Update/">";
}
else
{ $result .= "<INPUT TYPE=/"submit/" NAME=/"add/" VALUE=/"Add/">"; }
$result .= "</TABLE></TD></TR></TABLE></FORM>";
return $result;
}
function fieldFromType ($text, $type)
{
if ($type == "int" || $type == "uint" || $type == "real")
{ $result = $text; }
else
{ $result = "'" . AddSlashes ($text) . "'"; }
return $result;
}
function executeMSQL ($database, $command)
{
/*echo "<TT>" . $command . "</TT><HR>";*/
mSQL ($database, $command);
}
function handleRemove ($database, $table, $fieldsNumber,
$fieldNames, $fieldLengths, $fieldTypes)
{
global $remove;
if ($remove != "")
{
$command = "DELETE FROM " . $table . " WHERE ";
$fieldIndex = 0;
while ($fieldIndex < $fieldsNumber)
{
$fieldName = "old-" . $fieldNames [$fieldIndex];
global $$fieldName;
$command .= $fieldNames [$fieldIndex] . "=" .
fieldFromType ($$fieldName, $fieldTypes [$fieldIndex]);
if ($fieldIndex != $fieldsNumber - 1)
{ $command .= " AND "; }
$fieldIndex++; 共3页: 上一页 1 [2] [3] 下一页 <script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<? /*************************************************************************************
* SQLAdmin v2.0 - An SQL Administration User Interface for the web *
* Copyright (C) 1997-98 Alessandro Vernet <avernet@scdi.org> *
*************************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; if not, write to the *
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, *
* Boston, MA 02111-1307, USA. *
*************************************************************************************/
/* TODO:
* - Add sort order.
* - Add simple view.
* - Add some documentation.
*/
/* LIMITATIONS:
* - Works only with mSQL.
*/
/* HISTORY:
* - 97-11-05 (avernet) Corrected a bug with quote.
* - 98-01-01 (avernet) Added a sortColumn parameter to
* administrationTable function.
* - 98-03-14 (avernet) Added function addTable to enable users to
* add (but not modify) en entry to the database.
* - 98-05-19 (avernet) Submitted to PX.
* - 98-10-11 (avernet) Now SQLAdmin works with PHP3. The PHP2 version
* will not be mainteained anymore.
* - 98-10-11 (avernet) SQLAdmin is now distributed under the LGPL
* instead of MPL.
*/
function escapeforhtml ($string)
{
$result = $string;
//$result = ereg_replace ("/"", """, $result);
$result = ereg_replace ("<", "<", $result);
$result = ereg_replace (">", ">", $result);
return $result;
}
function displayTuple ($fieldsNumber, $fieldNames,
$fieldLengths, $values, $mode)
{
$result = "";
$result .= "<FORM METHOD=/"post/"><TABLE BORDER><TR>" .
"<TD BGCOLOR=/"#CCCCFF/">";
$result .= "<TABLE CELLSPACING=/"0/" CELLPADDING=/"0/">";
$fieldIndex = 0;
while ($fieldIndex < $fieldsNumber)
{
$result .= "<TR><TD>" . $fieldNames [$fieldIndex] . "</TD><TD>";
if ($fieldLengths [$fieldIndex] <= 128)
{
$result .= "<INPUT TYPE=/"text/" NAME=/"" .
$fieldNames [$fieldIndex] . "/" VALUE=/"" .
$values [$fieldIndex] . "/" SIZE=/"64/">";
}
else
{
$result .= "<TEXTAREA NAME=/"" .
$fieldNames [$fieldIndex] . "/"" .
" COLS=/"64/" ROWS=/"10/" WRAP=/"virtual/">" .
escapeforhtml ($values [$fieldIndex]) . "</TEXTAREA>";
}
$result .= "<INPUT TYPE=/"hidden/" NAME=/"old-" .
$fieldNames [$fieldIndex] .
"/" VALUE=/"" . escapeforhtml ($values [$fieldIndex]) . "/">" .
"</TD></TR>";
$fieldIndex++;
}
$result .= "<TR><TD ALIGN=/"center/" COLSPAN=/"2/">";
if ($mode == "modify")
{
$result .= "<INPUT TYPE=/"submit/" NAME=/"remove/" VALUE=/"Remove/">";
$result .= "<INPUT TYPE=/"submit/" NAME=/"update/" VALUE=/"Update/">";
}
else
{ $result .= "<INPUT TYPE=/"submit/" NAME=/"add/" VALUE=/"Add/">"; }
$result .= "</TABLE></TD></TR></TABLE></FORM>";
return $result;
}
function fieldFromType ($text, $type)
{
if ($type == "int" || $type == "uint" || $type == "real")
{ $result = $text; }
else
{ $result = "'" . AddSlashes ($text) . "'"; }
return $result;
}
function executeMSQL ($database, $command)
{
/*echo "<TT>" . $command . "</TT><HR>";*/
mSQL ($database, $command);
}
function handleRemove ($database, $table, $fieldsNumber,
$fieldNames, $fieldLengths, $fieldTypes)
{
global $remove;
if ($remove != "")
{
$command = "DELETE FROM " . $table . " WHERE ";
$fieldIndex = 0;
while ($fieldIndex < $fieldsNumber)
{
$fieldName = "old-" . $fieldNames [$fieldIndex];
global $$fieldName;
$command .= $fieldNames [$fieldIndex] . "=" .
fieldFromType ($$fieldName, $fieldTypes [$fieldIndex]);
if ($fieldIndex != $fieldsNumber - 1)
{ $command .= " AND "; }
$fieldIndex++; 共3页: 上一页 1 [2] [3] 下一页 <script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 一个SQL管理员的web接口
- 给mysql添加一个管理员的SQL语句
- 一个配置管理员的困惑
- 发布一个简单的Web Service接口
- 忘记 SQL Server 管理员密码的处理
- 一个超强的网站,网站管理员必备
- 面向Web开发人员和网站管理员的Web缓存指南
- 使用CXF+spring创建一个web的接口项目
- 使用CXF+spring+restful创建一个web的接口项目
- 使用CXF+spring+restful创建一个web的接口项目
- 使用CXF+spring+restful创建一个web的接口项目
- 一个简单的java web程序(servlet实现接口)
- 使用CXF+spring+restful创建一个web的接口项目
- 一个典型web接口处理
- keystone v3接口下,域管理员、项目管理员简单的判断方式
- 面向站长和网站管理员的Web缓存加速指南
- 面向站长和网站管理员的Web缓存加速指南
- 面向站长和网站管理员的Web缓存加速指南
- 通过文字传递创建的图形按钮
- 对C#中正则表达式的一些解读和总结
- 屏蔽浏览器缓存另类方法
- ASP.NET对IIS中的虚拟目录进行操作
- 基于C#的接口基础教程之七
- 一个SQL管理员的web接口
- ASP.NET中数据库的操作初步----增加、删除、修改
- 开发大型PHP项目的方法(一)
- 基于C#的接口基础教程之五
- 结合PHP使用HTML表单(3)
- 基于C#的接口基础教程之六
- 结合PHP使用HTML表单(2)
- 基于C#的接口基础教程之四
- 简单的页面缓冲技术(三)