Exemplo n.º 1
0
function r_ccids($str, $str1)
{
    return '[ccids' . str2newid($str, 'coids') . '=' . str2newid($str1, 'ccids') . '/]';
}
Exemplo n.º 2
0
         echo "<tr class=\"txt\"><td class=\"txtC w80\">{$k}</td>\n" . "<td class=\"txtC\">{$v['title']}</td>\n" . "<td class=\"txtC\"><select style=\"vertical-align: middle;\" name=\"transtonew[{$k}]\">" . makeoption(array(0 => lang('add')) + fcaidsarr(), empty($idsmap['fcaids'][$k]) ? 0 : $idsmap['fcaids'][$k]) . "</select></td></tr>\n";
     }
     tabfooter();
     echo "<input class=\"button\" type=\"submit\" name=\"bdo\" value=\"" . lang('nextstep') . "\"" . ($do_enable ? '' : ' disabled') . ">&nbsp; &nbsp; ";
     echo "<input class=\"button\" type=\"submit\" name=\"bundo\" value=\"" . lang('undosetting') . "\"" . ($undo_enable ? '' : ' disabled') . ">&nbsp; &nbsp; ";
     echo "</form>\n";
 } elseif (submitcheck('bdo')) {
     foreach ($ofcatalogs as $k => $v) {
         //需要先转栏目字段
         if (empty($transtonew[$k])) {
             $v = oread_cache('fcatalog', $k, '', 'cache');
             $v['chid'] = str2newid($v['chid'], 'fchids');
             $v['rugids'] = str2newid($v['rugids'], 'ugids');
             $v['taxcrid'] = str2newid($v['taxcrid'], 'crids');
             $v['ugids'] = implode(',', $v['ugids']);
             $v['ugids'] = str2newid($v['ugids'], 'ugids');
             $sqlstr = '';
             foreach ($v as $key => $val) {
                 !in_array($key, array('caid')) && ($sqlstr .= (!$sqlstr ? '' : ',') . "{$key}='" . addslashes($val) . "'");
             }
             $db->query("INSERT INTO {$tblprefix}fcatalogs SET {$sqlstr}");
             if (!($fcaid = $db->insert_id())) {
                 continue;
             }
             $stepadds['fcatalogs'][] = $fcaid;
             $idsmap['fcaids'][$k] = $fcaid;
             //将新旧id的对应关系记录在案
         } else {
             $idsmap['fcaids'][$k] = $transtonew[$k];
             //将新旧id的对应关系记录在案
         }