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

📄 sc_image_upload.php

📁 Here is the DHTML tree example with full source code
💻 PHP
字号:
<?php

	include('sc_config.inc.php');

	$id = @$_POST['id'];
	$folder = @$_POST['folder'];
	$image_action = @$_POST['image_action'];

	$picture = @$_FILES['image']['tmp_name'];
	if (!$picture) $picture = @$HTTP_POST_FILES['image']['tmp_name'];


	require_once('class/class.dynaimage.php');

	$pict = new dynaimage($id, $folder, 0, $parent_folder);

	// update an existing picture
	if ($image_action) {

		switch ($image_action) {
			case 'delete':
				$pict->delete($pict->file());
				break;
			case 'update':
				$pict->upload($picture);
				break;
			default:
				break;
		}

	} else { // upload new picture
		$pict->upload($picture);
	}

?><html>
<head>

<script language="JavaScript">

// update cell
//function end_upload() {

var parent_win = window.parent;
var cell_obj = parent_win.document.getElementById('<?php echo @$_POST['sc_cell']; ?>');
var sc_obj = parent_win.SmartCells.get_cell(cell_obj);
//alert(parent_win + ' => ' + cell_obj + ' => ' + sc_obj);

	sc_obj.show_value();

//alert('<?php echo @$_POST['sc_cell']; ?>');
//alert(sc_obj);
//alert(window.parent.location + ' => ' + window.location);

//}

</script>

</head>
<body style="background:#FFFFFF">


</body>
</html>

⌨️ 快捷键说明

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