$photonavinfo = sprintf(_ALBM_AM_PHOTONAVINFO, $pos + 1, $last, $numrows); // Options for the number of photos in a display $numbers = explode('|', $myalbum_perpage); $num_options = ''; foreach ($numbers as $number) { $number = intval($number); if ($number < 1) { continue; } $selected = $number == $num ? "selected='selected'" : ""; $num_options .= "<option value='{$number}' {$selected}>" . sprintf(_ALBM_FMT_PHOTONUM, $number) . "</option>\n"; } myalbum_get_cat_options(); // Options for Selecting a category $cat_options = myalbum_get_cat_options('title', $cid, '--', '----'); $cat_options_for_update = myalbum_get_cat_options('title', 0, '--', _AM_OPT_NOCHANGE); // Options for Selecting a user $user_options = "<option value='0'>" . _AM_OPT_NOCHANGE . "</option>\n"; $urs = $xoopsDB->query("SELECT uid,uname FROM " . $xoopsDB->prefix("users") . " ORDER BY uname"); while (list($uid, $uname) = $xoopsDB->fetchRow($urs)) { $user_options .= "<option value='{$uid}'>" . htmlspecialchars($uname, ENT_QUOTES) . "</option>\n"; } // Start of outputting xoops_cp_header(); include './mymenu.php'; // check $xoopsModule if (!is_object($xoopsModule)) { redirect_header("{$mod_url}/", 1, _NOPERM); } echo "<h3 style='text-align:left;'>" . sprintf(_AM_H3_FMT_PHOTOMANAGER, $xoopsModule->name()) . "</h3>\n"; myalbum_opentable();
include XOOPS_ROOT_PATH . "/header.php"; include 'include/assign_globals.php'; $xoopsTpl->assign($myalbum_assign_globals); if ($global_perms & GPERM_INSERTABLE) { $xoopsTpl->assign('lang_add_photo', _ALBM_ADDPHOTO); } $xoopsTpl->assign('lang_album_main', _ALBM_MAIN); if ($cid > 0) { // GIJ TODO append error check! $rs = $xoopsDB->query("SELECT title FROM {$table_cat} WHERE cid='{$cid}'"); list($cat_title) = $xoopsDB->fetchRow($rs); $xoopsTpl->assign('xoops_pagetitle', $myts->makeTboxData4show($cat_title)); // Category Specified $xoopsTpl->assign('category_id', $cid); $xoopsTpl->assign('subcategories', myalbum_get_sub_categories($cid, $cattree)); $xoopsTpl->assign('category_options', myalbum_get_cat_options()); $cids = $cattree->getAllChildId($cid); array_push($cids, $cid); $photo_total_sum = myalbum_get_photo_total_sum_from_cats($cids, "status>0"); $sub_title = preg_replace("/\\'\\>/", "'><img src='{$mod_url}/images/folder16.gif' alt='' />", $cattree->getNicePathFromId($cid, 'title', "viewcat.php?num={$num}")); $sub_title = preg_replace("/^(.+)folder16/", '$1folder_open', $sub_title); $xoopsTpl->assign('album_sub_title', $sub_title); $where = "cid={$cid}"; $get_append = "cid={$cid}"; $join_append = ''; $select_append = ''; } else { if ($uid != 0) { // This means 'my photo' if ($uid < 0) { $where = "submitter={$my_uid}";
$xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("imagebody") . " SET image_id='{$image_id}',image_body='{$body}'"); } $export_count++; } redirect_header('export.php', 2, sprintf(_AM_FMT_EXPORTSUCCESS, $export_count)); exit; } } // // Form Part // xoops_cp_header(); include './mymenu.php'; echo "<h3 style='text-align:left;'>" . sprintf(_AM_H3_FMT_EXPORTTO, $xoopsModule->name()) . "</h3>\n"; // To imagemanager $sysperm_handler =& xoops_gethandler('groupperm'); if ($sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups())) { // only when user has admin right of system 'imagemanager' $irs = $xoopsDB->query("SELECT c.imgcat_id,c.imgcat_name,c.imgcat_storetype,COUNT(i.image_id) AS imgcat_sum FROM " . $xoopsDB->prefix("imagecategory") . " c NATURAL LEFT JOIN " . $xoopsDB->prefix("image") . " i GROUP BY c.imgcat_id ORDER BY c.imgcat_weight"); $imgcat_options = ''; while (list($imgcat_id, $imgcat_name, $imgcat_storetype, $imgcat_sum) = $xoopsDB->fetchRow($irs)) { $imgcat_options .= "<option value='{$imgcat_id}'>{$imgcat_storetype} : {$imgcat_name} ({$imgcat_sum})</option>\n"; } // Options for Selecting a category in myAlbum-P $myalbum_cat_options = myalbum_get_cat_options('title', 0, '--', '----'); myalbum_opentable(); echo "\n\t\t<h4>" . _AM_FMT_EXPORTTOIMAGEMANAGER . "</h4>\n\t\t<form name='ImageManager' action='export.php' method='POST'>\n\t\t" . $xoopsGTicket->getTicketHtml(__LINE__) . "\n\t\t<select name='cid'>\n\t\t\t{$myalbum_cat_options}\n\t\t</select>\n\t\t" . _AM_FMT_EXPORTIMSRCCAT . "\n\t\t -> \n\t\t<select name='imgcat_id'>\n\t\t\t{$imgcat_options}\n\t\t</select>\n\t\t" . _AM_FMT_EXPORTIMDSTCAT . "\n\t\t<br />\n\t\t<br />\n\t\t<input type='checkbox' name='use_thumb' value='1' checked='checked' />" . _AM_CB_EXPORTTHUMB . "\n\t\t<br />\n\t\t<br />\n\t\t<input type='submit' name='imagemanager_export' value='" . _GO . "' onclick='return confirm(\"" . _AM_MB_EXPORTCONFIRM . "\");' />\n\t\t</form>\n"; myalbum_closetable(); echo "<br />"; } xoops_cp_footer();
include './mymenu.php'; echo "<h3 style='text-align:left;'>" . sprintf(_AM_H3_FMT_IMPORTTO, $xoopsModule->name()) . "</h3>\n"; // From myalbum* $mrs = $xoopsDB->query("SELECT dirname FROM " . $xoopsDB->prefix("modules") . " WHERE dirname like 'myalbum%'"); while (list($src_dirname) = $xoopsDB->fetchRow($mrs)) { if ($mydirname == $src_dirname) { continue; } $module =& $module_handler->getByDirname($src_dirname); if (!is_object($module)) { continue; } if (!$xoopsUser->isAdmin($module->getVar('mid'))) { continue; } $myalbum_cat_options = myalbum_get_cat_options('title', 0, '--', '----', $xoopsDB->prefix("{$src_dirname}_cat"), $xoopsDB->prefix("{$src_dirname}_photos")); myalbum_opentable(); echo "\n\t\t<h4>" . sprintf(_AM_FMT_IMPORTFROMMYALBUMP, $module->name()) . "</h4>\n\t\t<form name='{$src_dirname}' action='import.php' method='POST'>\n\t\t<input type='hidden' name='src_dirname' value='{$src_dirname}' />\n\t\t<input type='radio' name='copyormove' value='copy' checked='checked' />" . _AM_RADIO_IMPORTCOPY . " \n\t\t<input type='radio' name='copyormove' value='move' />" . _AM_RADIO_IMPORTMOVE . "<br /><br />\n\t\t<!-- <input type='checkbox' name='import_recursively' />" . _AM_CB_IMPORTRECURSIVELY . "<br /><br /> -->\n\t\t<select name='cid'>\n\t\t\t{$myalbum_cat_options}\n\t\t</select>\n\t\t<input type='submit' name='myalbum_import' value='" . _GO . "' onclick='return confirm(\"" . _AM_MB_IMPORTCONFIRM . "\");' />\n\t\t</form>\n"; myalbum_closetable(); echo "<br />"; } // From imagemanager $sysperm_handler =& xoops_gethandler('groupperm'); if ($sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups())) { // only when user has admin right of system 'imagemanager' $irs = $xoopsDB->query("SELECT c.imgcat_id,c.imgcat_name,COUNT(i.image_id) AS imgcat_sum FROM " . $xoopsDB->prefix("imagecategory") . " c NATURAL LEFT JOIN " . $xoopsDB->prefix("image") . " i GROUP BY c.imgcat_id ORDER BY c.imgcat_weight"); $imgcat_options = ''; while (list($imgcat_id, $imgcat_name, $imgcat_sum) = $xoopsDB->fetchRow($irs)) { $imgcat_options .= "<option value='{$imgcat_id}'>{$imgcat_name} ({$imgcat_sum})</option>\n"; } myalbum_opentable();