update.inc.php

来自「Phpcms2008 是一款基于 PHP+Mysql 架构的网站内容管理系统」· PHP 代码 · 共 20 行

PHP
20
字号
	function posid($field, $value)
	{
		global $action;
		$this->db->query("DELETE FROM `".DB_PRE."content_position` WHERE `contentid`='$this->contentid'");
		if($value == '-99')
		{
			if($action == 'edit') $this->db->query("UPDATE ".DB_PRE."content SET posids=0 WHERE contentid='$this->contentid'");
			return false;
		}
		if(is_array($value))
		{
			foreach($value as $posid)
			{
				$posid = intval($posid);
				$this->db->query("INSERT INTO `".DB_PRE."content_position` (`contentid`,`posid`) VALUES('$this->contentid','$posid')");
			}
		}
		return true;
	}

⌨️ 快捷键说明

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