Compare commits

...

2 Commits

Author SHA1 Message Date
8662c3e46b 相对路径路径 2020-12-03 20:06:11 +08:00
09dea89ba5 转义处理 2020-12-03 20:05:51 +08:00
2 changed files with 7 additions and 5 deletions

View File

@ -31,7 +31,7 @@ if ($act == 'newevent') {
} else if ($act == 'edityunying') {
$id = r('id');
$dict = array(
'yunying_remark' => r('content')
'yunying_remark' => stripslashes(r('content'))
);
$sql = DB::update('calendar', $dict, "id='{$id}'");
@ -40,7 +40,7 @@ if ($act == 'newevent') {
} else if ($act == 'edityanfa') {
$id = r('id');
$dict = array(
'yanfa_remark' => r('content')
'yanfa_remark' => stripslashes(r('content'))
);
$sql = DB::update('calendar', $dict, "id='{$id}'");
@ -49,7 +49,7 @@ if ($act == 'newevent') {
} else if ($act == 'editchanpin') {
$id = r('id');
$dict = array(
'chanpin_remark' => r('content')
'chanpin_remark' => stripslashes(r('content'))
);
$sql = DB::update('calendar', $dict, "id='{$id}'");
@ -785,7 +785,7 @@ if ($act == 'newevent') {
arr = JSON.stringify(arr)
$.ajax({
url: './?app=pmcalendar&act=editchanpin',
dataType: 'json',
dataType: 'application/x-www-form-urlencoded',
type:"post",
async:"true",
data: {
@ -1325,6 +1325,7 @@ if ($act == 'newevent') {
success: function (res) {
$('#pop-title').html('【'+ res.game +'】'+ res.event + ':' + res.title );
// $("#cptext").val(res.yanfa_remark)
// res.chanpin_remark = res.chanpin_remark.replace('\\','')
console.log(res.chanpin_remark)
var chanpin_remark =JSON.parse(res.chanpin_remark)
var yunying_remark = JSON.parse(res.yunying_remark);

View File

@ -4,6 +4,7 @@ $fileData = array();
$cardId = r('id');
$act = r('act');
if ($act == 'add') {
print_r($fujian);
foreach ($fujian['name'] as $idx => $data) {
if ($fujian['error'][$idx] == 0) {
$id = uniqid() . $idx;
@ -18,7 +19,7 @@ if ($act == 'add') {
"bumen" => r('bumen'),
"file" => $newName
);
rename($fujian['tmp_name'][$idx], $newName);
rename($fujian['tmp_name'][$idx], '.'.$newName);
}
}