$item_photo = system_CleanVars($_POST, 'item_photo', '', 'array'); $item_album = system_CleanVars($_POST, 'item_album', '', 'array'); switch ($op) { case "edit_photo": $main = edit_photo($sn); break; case "edit_album": $main = edit_album($csn); break; case "update_tad_gallery": update_tad_gallery($sn); break; case "delete_tad_gallery": $csn = delete_tad_gallery($sn); mk_rss_xml(); mk_rss_xml($csn); break; case "update_tad_gallery_cate": update_tad_gallery_cate($csn); break; case "delete_tad_gallery_cate": delete_tad_gallery_cate($csn); mk_rss_xml(); break; case "order": save_order($item_photo, $item_album); break; default: break; } echo tg_html5($main);
switch ($op) { case "import_tad_gallery": //die('bbb'); //$_POST['all'][$i]=_TADGAL_UP_IMPORT_DIR.$filename; //$import[$i]['upload']=1 //$import[$i][filename]=filename //$import[$i][dir]=dir //$import[$i][post_date] //$import[$i][width] //$import[$i][height] //$import[$i][size] //$import[$i][exif] //$import[$i][type] $csn = import_tad_gallery($csn_menu, $new_csn, $_POST['all'], $_POST['import']); mk_rss_xml(); mk_rss_xml($csn); header("location: index.php?csn={$csn}"); break; default: echo import_form(); break; } //tad_gallery編輯表單 function import_form() { global $xoopsDB; $myts =& MyTextSanitizer::getInstance(); //找出要匯入的圖 if (is_dir(_TADGAL_UP_IMPORT_DIR)) { $pics = read_dir_pic(_TADGAL_UP_IMPORT_DIR); $total_size = sizef($pics['total_size']);
function mk_csn_rss_xml() { global $xoopsDB, $xoopsModule; $sql = "select csn from " . $xoopsDB->prefix("tad_gallery_cate") . ""; $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error()); while (list($csn) = $xoopsDB->fetchRow($result)) { mk_rss_xml($csn); } }