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

📄 picture_edit.inc.php

📁 phpcms2007很好的cms内容管理系统,操作方便
💻 PHP
字号:
<?php
defined('IN_PHPCMS') or exit('Access Denied');

$pictureid = intval($pictureid);
$pictureid or showmessage($LANG['picture_id_not_null'],$referer);

require PHPCMS_ROOT.'/include/field.class.php';
$field = new field(channel_table('picture', $channelid));

require PHPCMS_ROOT.'/admin/include/position.class.php';
$pos = new position($channelid);

$referer = isset($referer) ? $referer : "?mod=$mod&file=$file&action=manage&channelid=$channelid";
if($dosubmit)
{
	if(empty($picture['title']))
	{
		showmessage($LANG['sorry_short_title_not_null'],'goback');
	}
	if(empty($picture['pictureurls']))
	{
		showmessage($LANG['sorry_picture_url_not_null'],'goback');
	}
	$picture['pictureurls'] = trim($picture['pictureurls']);
	$pictureurls = explode("\n", $picture['pictureurls']);
	$nums = count($pictureurls);
	$picture['pictureurls'] = '';
	foreach($pictureurls as $k => $pictureurl)
	{
		if(empty($pictureurl) || strlen($pictureurl)<10) continue;
		preg_match("/.+\|(.*)(\[d\])/", $pictureurl, $m);
		if(!empty($m) && !strpos($pictureurl, "://"))
		{
			$fileurl = PHPCMS_ROOT.'/'.$CHA['channeldir'].'/'.$MOD['upload_dir'].'/'.$m[1];
			@unlink($fileurl);
			@unlink(dirname($fileurl).'/thumb_'.basename($fileurl));
		}
		else
		{
			$picture['pictureurls'] .= $pictureurl."\n";
		}
		
	}

	if(empty($picture['pictureurls']))
	{
		showmessage($LANG['sorry_picture_url_not_null'],'goback');
	}
	if(isset($addkeywords) && $picture['keywords']) update_keywords($picture['keywords'], $channelid);
	if(isset($addauthor) && $picture['author']) update_author($picture['author'], $channelid);
	if(isset($addcopyfrom) && $picture['copyfrom']) update_copyfrom($picture['copyfrom'], $channelid);
	if($ishtmled) $pic->delete($pictureid, 1);//鍏堝垹闄ゅ凡鐢熸垚鐨勬枃浠

⌨️ 快捷键说明

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