⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 div_image_insert.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

echo "<html>\r\n";
include_once( "inc/conn.php" );
$tempid = $_GET['tempid'];
$tagdiv = $_POST['bgtag'];
$http_url1 = $_SERVER['DOCUMENT_ROOT'];
$http_url = str_replace( "/", "\\", "{$http_url1}" );
$mulu = $http_url."attachment\\index_img"."\\"."{$tempid}";
if ( file_exists( $mulu ) )
{
}
else
{
	mkdir( $mulu );
	$newmulu = "attachment/index_img/".$tempid;
	echo "<script>alert('新建目录".$newmulu."成功'); </script>";
}
if ( isset( $_FILES['newpic'] ) )
{
	$pt = split( "/", $_FILES['newpic']['type'] );
	if ( $pt[0] != "image" )
	{
		echo "<script>alert('只能传图片'); </script>";
	}
	else
	{
		$img_dir = $mulu."\\";
		if ( copy( $_FILES['newpic']['tmp_name'], "{$img_dir}".$_FILES['newpic']['name'] ) )
		{
			echo "<script>alert('上传成功'); </script>";
			$now_url = "attachment/index_img/"."{$tempid}"."/";
			$imgurl = "/"."{$now_url}".$_FILES['newpic']['name'];
			$sql = "INSERT INTO `index_div` (`DIV_ID`, `IMGURL`, `X_AXES`, `Y_AXES`, `Z_AXES`,`TAGDIV`,`TEMPID`) VALUES (NULL, '{$imgurl}', '50', '50', '1','{$tagdiv}','{$tempid}');";
			$result = exequery( $connection, $sql );
		}
		else
		{
			echo "图片上传失败";
		}
	}
	echo "<s";
	echo "cript type=\"text/javascript\">\r\nwindow.location.href=\"login_index.php?tempid=\"+";
	echo $tempid;
	echo ";\r\n</script>\r\n";
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -