DBHOST,$this->DBUSER,$this->DBPASS);
}catch(Exception $e){
echo $e;
}
try{
mysql_select_db($this->DBNAME,$conn);
}catch(Exception $e){
echo $e;
}
$this->CONN=$conn;
mysql_query("SET NAMES UTF8");
}
public function select($sql=""){
if(empty($sql)) return false;
if(empty($this->CONN)) return false;
try{
$result=mysql_query($sql,$this->CONN);
}catch(Exception $e){
echo $e;
}
if((!$result) or (empty($result))){
@mysql_free_result($result);
return false;
}
$count=0;
$data=array();
while($row=@mysql_fetch_array($result)){
$data[$count]=$row;
$count++;
}
@mysql_free_result($result);
return $data;
}
public function insert($sql=""){
if(empty($sql)) return false;
if(empty($this->CONN)) return false;
try{
$result=mysql_query($sql,$this->CONN);
}catch(Exception $e){
echo $e;
}
if(!$result){
return 0;
}else{
return @mysql_insert_id($this->CONN);
}
}
public function update($sql=""){
if(empty($sql)) return false;
if(empty($this->CONN)) return false;
try{
$result=mysql_query($sql,$this->CONN);
}catch(Exception $e){
echo $e;
}
return $result;
}
public function delete($sql=""){
if(empty($sql)) return false;
if(empty($this->CONN)) return false;
try{
$result=mysql_query($sql,$this->CONN);
}catch(Exception $e){
echo $e;
}
return $result;
}
}
?>
HardSoft-Viewer
select($sql);
if($data){
foreach($data as $key=>$value)
{
?>
ASC硬件管理系統
未搜尋到相關信息! ';
}
exit();
}
elseif ($_POST['action']=='edit'){
$id=mysql_real_escape_string($_POST['id']);
$Factory=mysql_real_escape_string($_POST['Factory']);
$Depart=mysql_real_escape_string($_POST['Depart']);
$Owner=mysql_real_escape_string($_POST['Owner']);
$Account=mysql_real_escape_string($_POST['Account']);
$Locate=mysql_real_escape_string($_POST['Locate']);
$Mark=mysql_real_escape_string($_POST['Mark']);
$Note=mysql_real_escape_string($_POST['Note']);
if (empty($id)) {
echo "";
exit();
}
if (empty($Factory)) {
echo "";
exit();
}
if (empty($Depart)) {
echo "";
exit();
}
if (empty($Locate)) {
echo "";
exit();
}
//查詢是否存在傳遞過來財產編號
$sql="SELECT id from Computers where id = '".$id."'";
$result=mysql_query($sql);
if(empty($result)){
echo "";
exit();
}
//對用戶使用信息進行更改
$sql="UPDATE Computers SET Factory='".$Factory."',Depart='".$Depart."',Owner='".$Owner."',Account='".$Account."',Locate='".$Locate."',Mark='".$Mark."',Note='".$Note."' WHERE id='".$id."'";
$result=$conn->update($sql);
switch(mysql_affected_rows()){
case 1 :
echo "";
break;
case 0 :
echo "";
break;
case -1 :
echo "";
break;
default:
echo "";
}
exit();
}
}
?>
select($sql);
if($softlist){
echo '
';
echo "';
}else{
echo '無財產編號為'.$_GET['id'].'的軟件安裝列表!';
}
exit();
}
if (isset($_GET['id']) && $_GET['action']=='editinfo'){
$sql="SELECT * FROM Computers WHERE id = '".trim($_GET['id'])."'";
$info=$conn->select($sql);
if($info){
echo "
select($sql);
if($data){
foreach($data as $key=>$value)
{
?>
寶成國際集團硬件管理系統
网站名称:HardSoft-ViewerPHP_index.php
标题URL:
http://cxhlcq.com/article/psieec.html