$extend_no = $_POST['extend_no']; $content_t = $content_y = $sms_sign[$_CFG['ent_id']][$extend_no]; $new_content_t = $new_content_y = $_POST['new_sms_sign']; if (!isset($sms_sign[$_CFG[ent_id]][$extend_no]) || empty($extend_no)) { sys_msg($_LANG['error_smg'], 1, array(), false); } if (EC_CHARSET != 'utf-8') { $content_t = iconv('gb2312', 'utf-8', $content_y); $new_content_t = iconv('gb2312', 'utf-8', $new_content_y); } $url = 'https://openapi.shopex.cn'; $key = 'qufoxtpr'; $secret = 't66moqjixb2nntiy2io2'; $c = new prism_client($url, $key, $secret); $params = array('shopexid' => $_CFG['ent_id'], 'passwd' => $_CFG['ent_ac'], 'old_content' => $content_t, 'new_content' => $new_content_t, 'content-type' => 'application/x-www-form-urlencoded'); $result = $c->post('api/addcontent/update', $params); $result = json_decode($result, true); if ($result['res'] == 'succ' && !empty($result['data']['new_extend_no'])) { $new_extend_no = $result['data']['new_extend_no']; unset($sms_sign[$_CFG['ent_id']][$extend_no]); $sms_sign[$_CFG['ent_id']][$new_extend_no] = $new_content_y; $sms_sign = serialize($sms_sign); if (empty($_CFG['default_sms_sign'])) { shop_config_update('default_sms_sign', $new_content_y); } shop_config_update('sms_sign', $sms_sign); /* 清除缓存 */ clear_all_files(); sys_msg($_LANG['edit_succ'], 1, array(), false); } else { $error_smg = $result['data'];