"; if (count($user_albums_list) > 0 ){ $box.= ""; foreach($user_albums_list as $album){ $box.=""; } $box.=""; } if (count($public_albums_list) > 0 ){ $box.= ""; foreach($public_albums_list as $album){ $box.=""; } $box.=""; } if (count($other_user_albums_list) > 0 ){ $box.= ""; $user_handler =& xoops_gethandler('member'); foreach($other_user_albums_list as $album){ $alb_owner =& $user_handler->getUser($album['category']-FIRST_USER_CAT); if (is_object ($alb_owner)) { $box.=""; } } $box.=""; } $box.=""; return $box; } if (GALLERY_ADMIN_MODE) { $public_albums = $xoopsDB->query("SELECT aid, title FROM ".$xoopsDB->prefix("xcgal_albums")." WHERE category < ".FIRST_USER_CAT." ORDER BY title"); } else { $public_albums = $xoopsDB->query("SELECT aid, title FROM ".$xoopsDB->prefix("xcgal_albums")." WHERE category < ".FIRST_USER_CAT." AND uploads='YES' ORDER BY title"); } if ($xoopsDB->getRowsNum($public_albums)) { $public_albums_list=db_fetch_rowset($public_albums); } else { $public_albums_list = array(); } if (USER_ID) { $user_albums = $xoopsDB->query("SELECT aid, title FROM ".$xoopsDB->prefix("xcgal_albums")." WHERE category='".(FIRST_USER_CAT + USER_ID)."' ORDER BY title"); if ($xoopsDB->getRowsNum($user_albums)) { $user_albums_list=db_fetch_rowset($user_albums); } else { $user_albums_list = array(); } } else { $user_albums_list = array(); } get_private_album_set(); $other_user=$xoopsDB->query("SELECT aid, title, category FROM ".$xoopsDB->prefix("xcgal_albums")." WHERE category > ".FIRST_USER_CAT." AND uploads='YES' AND category!='".(FIRST_USER_CAT + USER_ID)."' $ALBUM_SET ORDER BY category"); //var_dump($other_user); if ($xoopsDB->getRowsNum($other_user)) { $other_user_albums_list=db_fetch_rowset($other_user); } else { $other_user_albums_list = array(); } if (!count($public_albums_list) && !count($user_albums_list) && !USER_CAN_CREATE_ALBUMS) { redirect_header('index.php',2,_MD_UPL_ERR_NO_ALB_UPLOAD); } elseif (!count($public_albums_list) && !count($user_albums_list) && USER_CAN_CREATE_ALBUMS) { $USER['am'] = 1; $redirect = "albmgr.php"; redirect_header($redirect,2,_MD_UPL_ERR_NO_ALB_UPLOAD); exit; } $xoopsOption['template_main'] = 'xcgal_upload.html'; include XOOPS_ROOT_PATH."/header.php"; ob_start(); $GLOBALS["caption"] = $myts->makeTareaData4Edit(""); xoopsCodeTarea("caption",37,8); $xoopsTpl->assign('xoops_codes', ob_get_contents()); ob_end_clean(); ob_start(); xoopsSmilies("caption"); $xoopsTpl->assign('xoops_smilies', ob_get_contents()); ob_end_clean(); $xoopsTpl->assign('max_upl',sprintf(_MD_UPL_MAX_FSIZE, $xoopsModuleConfig['max_upl_size'])); $xoopsTpl->assign('lang_upload', _MD_UPL_TITLE); $xoopsTpl->assign('lang_album', _MD_ALBUM); $xoopsTpl->assign('lang_picture', _MD_UPL_PICTURE); $xoopsTpl->assign('lang_picture_title', _MD_UPL_PIC_TITLE); $xoopsTpl->assign('lang_keywords', _MD_UPL_KEYWORDS); $xoopsTpl->assign('max_file_size',$xoopsModuleConfig['max_upl_size']<<10); $xoopsTpl->assign('lang_options', "_MD_OPTIONS"); $xoopsTpl->assign('lang_notify', "_MD_NOTIFYAPPROVE"); $xoopsTpl->assign('lang_description', _MD_UPL_DESCRIPTION); $xoopsTpl->assign('lang_submit', _SUBMIT); $xoopsTpl->assign('lang_cancel', _CANCEL); $xoopsTpl->assign('lang_quote', _QUOTEC); $xoopsTpl->assign('album_selbox', form_alb_list_box()); $xoopsTpl->assign('user1',$xoopsModuleConfig['user_field1_name']); $xoopsTpl->assign('user2',$xoopsModuleConfig['user_field2_name']); $xoopsTpl->assign('user3',$xoopsModuleConfig['user_field3_name']); $xoopsTpl->assign('user4',$xoopsModuleConfig['user_field4_name']); user_save_profile(); $xoopsTpl->assign('gallery', $xoopsModule->getVar('name')); include_once "include/theme_func.php"; main_menu(); do_footer(); include_once "../../footer.php"; ?>