信呼OA版本v2.3.9

This commit is contained in:
雨中磐石
2022-09-05 15:58:07 +08:00
parent e3fcd913e3
commit c09f4dba40
29 changed files with 657 additions and 57 deletions

View File

@@ -514,7 +514,7 @@ abstract class mysql{
public function insert($table,$name,$values,$sel=false)
{
$sql="insert into `$table` ($name) ";
$sql="insert into ".$this->gettables($table)." ($name) ";
if(!$sel){
$sql.="values($values)";
}else{
@@ -526,14 +526,14 @@ abstract class mysql{
public function update($table,$content,$where)
{
$where = $this->getwhere($where);
$sql="update `$table` set $content where $where ";
$sql="update ".$this->gettables($table)." set $content where $where ";
return $this->tranbegin($sql);
}
public function delete($table,$where)
{
$where = $this->getwhere($where);
$sql="delete from `$table` where $where ";
$sql="delete from ".$this->gettables($table)." where $where ";
return $this->tranbegin($sql);
}
@@ -553,15 +553,25 @@ abstract class mysql{
}else{
$cont = $array;
}
$table = $this->gettables($table);
if($addbool){
$sql="insert into `$table` set $cont";
$sql="insert into $table set $cont";
}else{
$where = $this->getwhere($where);
$sql="update `$table` set $cont where $where";
$sql="update $table set $cont where $where";
}
return $this->tranbegin($sql);
}
/**
* 处理表名
*/
public function gettables($str)
{
if(!contain($str,'`'))$str='`'.$str.'`';
return $str;
}
/**
返回总条数
*/

View File

@@ -30,6 +30,7 @@ final class rockClass
{
$this->ip = $this->getclientip();
$this->host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '' ;
if($this->host && substr($this->host,-3)==':80')$this->host = str_replace(':80', '', $this->host);
$this->url = '';
$this->isqywx = false;
$this->win = php_uname();