Server : nginx/1.22.1
System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : www ( 1000)
PHP Version : 5.6.40
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/www.jkmold.com/phpcms/modules/content/fields/posid/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/www.jkmold.com/phpcms/modules/content/fields/posid/update.inc.php
	function posid($field, $value) {

		if(!empty($value) && is_array($value)) {

			if($_GET['a']=='add') {

				$position_data_db = pc_base::load_model('position_data_model');

				$textcontent = array();

				foreach($value as $r) {

					if($r!='-1') {

						if(empty($textcontent)) {

							foreach($this->fields AS $_key=>$_value) {

								if($_value['isposition']) {

									$textcontent[$_key] = $this->data[$_key];

								}

							}

							$textcontent = array2string($textcontent);

						}

						$thumb = $this->data['thumb'] ? 1 : 0;

						$position_data_db->insert(array('id'=>$this->id,'catid'=>$this->data['catid'],'posid'=>$r,'thumb'=>$thumb,'module'=>'content','modelid'=>$this->modelid,'data'=>$textcontent,'listorder'=>$this->id,'siteid'=>get_siteid()));

					}

				}

			} else {

				$posids = array();

				$catid = $this->data['catid'];

				$push_api = pc_base::load_app_class('push_api','admin');

				foreach($value as $r) {

					if($r!='-1') $posids[] = $r;

				}

				$textcontent = array();

				foreach($this->fields AS $_key=>$_value) {

					if($_value['isposition']) {

						$textcontent[$_key] = $this->data[$_key];

					}

				}

				//颜色选择为隐藏域 在这里进行取值

				$textcontent['style'] = $_POST['style_color'] ? strip_tags($_POST['style_color']) : '';

				$textcontent['inputtime'] = strtotime($textcontent['inputtime']);

				if($_POST['style_font_weight']) $textcontent['style'] = $textcontent['style'].';'.strip_tags($_POST['style_font_weight']);

				$push_api->position_update($this->id, $this->modelid, $catid, $posids, $textcontent,0);

			}

		}

	}