$db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('insenz', '" . addslashes(serialize($insenz)) . "')");
            require_once DISCUZ_ROOT . './include/cache.func.php';
            updatecache('settings');
            cpmsg('insenz_settings_updated_succeed', $baseurl . '&do=' . $do);
        }
    } elseif ($do == 'softad') {
        if (!submitcheck('settingssubmit')) {
            showtips('insenz_tips_softadsetting');
            echo '<form name="form" action="' . $baseurl . '&do=softad" method="post">
				<input type="hidden" name="formhash" value="' . FORMHASH . '">';
            insenz_showsettings($do);
            echo '</table><br /><center><input type="submit" class="button" name="settingssubmit" value="' . $lang['insenz_campaign_submit'] . '"></center></form>';
        } else {
            $softadstatus = $softadstatus1 ? $softadstatus2 ? 2 : 1 : 0;
            if ($softadstatus && (empty($insenz['lastmodified']) || $timestamp - $insenz['lastmodified'] > 14 * 86400)) {
                if (checkmasks(TRUE)) {
                    $insenz['lastmodified'] = $timestamp;
                }
            }
            if ($insenz['softadstatus'] != $softadstatus) {
                $data = '<cmd id="editsoftadstatus">' . '<softadstatus>' . $softadstatus . '</softadstatus>' . '<autoextend>' . intval($autoextend) . '</autoextend>' . '<s_key>' . md5($authkey . 'Discuz!INSENZ') . '</s_key>' . '</cmd>';
                $response = insenz_request($data);
                if ($response['status']) {
                    cpmsg($response['data']);
                } else {
                    $response = $response['data'];
                    if ($response['response'][0]['status'][0]['VALUE'] == 1) {
                        cpmsg(insenz_convert($response['response'][0]['reason'][0]['VALUE'], 0));
                    }
                }
                insenz_updatesettings();
             $insenz[$item] = ${$item};
         }
         $db->query("REPLACE INTO {$tablepre}settings (variable, value) VALUES ('insenz', '" . addslashes(serialize($insenz)) . "')");
         require_once DISCUZ_ROOT . './include/cache.func.php';
         updatecache('settings');
         cpmsg('insenz_settings_updated_succeed', $baseurl . '&do=' . $do, 'succeed');
     }
 } elseif ($do == 'softad') {
     if (!submitcheck('settingssubmit')) {
         showtips('insenz_tips_softadsetting');
         showformheader('insenz&operation=settings&do=softad');
         insenz_showsettings($do);
     } else {
         $softadstatus = $softadstatus1 ? $softadstatus2 ? 2 : 1 : 0;
         if ($softadstatus) {
             checkmasks(TRUE);
         }
         if ($insenz['softadstatus'] != $softadstatus) {
             $data = '<cmd id="editsoftadstatus">' . '<softadstatus>' . $softadstatus . '</softadstatus>' . '<autoextend>' . intval($autoextend) . '</autoextend>' . '<s_key>' . md5($authkey . 'Discuz!INSENZ') . '</s_key>' . '</cmd>';
             $response = insenz_request($data);
             if ($response['status']) {
                 cpmsg($response['data'], '', 'error');
             } else {
                 $response = $response['data'];
                 if ($response['response'][0]['status'][0]['VALUE'] == 1) {
                     cpmsg(insenz_convert($response['response'][0]['reason'][0]['VALUE'], 0), '', 'error');
                 }
             }
             insenz_updatesettings();
         }
         foreach (array('softadstatus', 'autoextend') as $item) {