@@ 652-665 (lines=14) @@ | ||
649 | } else { |
|
650 | exit(); |
|
651 | } |
|
652 | if ($p_pid != 0) { |
|
653 | $sql = 'INSERT INTO ' |
|
654 | . $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') . '_dtypes_x_cat') |
|
655 | . ' (cid, dtypeid) SELECT ' |
|
656 | . $p_catid |
|
657 | . ', d.dtypeid FROM ' |
|
658 | . $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') . '_dtypes') |
|
659 | . ' d, ' |
|
660 | . $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') |
|
661 | . '_dtypes_x_cat') |
|
662 | . ' x WHERE d.dtypeid=x.dtypeid AND x.cid = ' |
|
663 | . $p_pid |
|
664 | . " AND d.defaultyn = '1'"; |
|
665 | } |
|
666 | $xoopsDB->query($sql) or $eh->show('0013'); |
|
667 | redirect_header("categories.php?op=edit&catid=$p_catid", 2, _MD_CAT_UPDATED); |
|
668 | exit(); |
|
@@ 1064-1077 (lines=14) @@ | ||
1061 | function importDtypes($pid = '0', $catid = '0') |
|
1062 | { |
|
1063 | global $xoopsDB, $_POST, $eh; |
|
1064 | if ($pid != 0) { |
|
1065 | $sql = 'INSERT INTO ' |
|
1066 | . $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') . '_dtypes_x_cat') |
|
1067 | . ' (cid, dtypeid) SELECT ' |
|
1068 | . $catid |
|
1069 | . ', d.dtypeid FROM ' |
|
1070 | . $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') . '_dtypes') |
|
1071 | . ' d, ' |
|
1072 | . $xoopsDB->prefix($xoopsModule->getVar('dirname', 'n') |
|
1073 | . '_dtypes_x_cat') |
|
1074 | . ' x WHERE d.dtypeid=x.dtypeid AND x.cid = ' |
|
1075 | . $pid |
|
1076 | . " AND d.defaultyn = '1'"; |
|
1077 | } |
|
1078 | $xoopsDB->query($sql) or $eh->show('0013'); |
|
1079 | } |
|
1080 |