function display_cat_list() { global $CAT_LIST, $CONFIG, $lang_catmgr_php, $lang_common, $CPG_PHP_SELF, $LINEBREAK; $CAT_LIST3 = $CAT_LIST; $loop_counter = 0; list($timestamp, $form_token) = getFormToken(); $form_token = "&form_token={$form_token}&timestamp={$timestamp}"; foreach ($CAT_LIST3 as $key => $category) { if ($category['cid'] == 0) { continue; } if ($loop_counter == 0) { $row_style_class = 'tableb'; } else { $row_style_class = 'tableb tableb_alternate'; } $loop_counter++; if ($loop_counter > 1) { $loop_counter = 0; } echo ' <tr>' . $LINEBREAK; echo ' <td class="' . $row_style_class . '" width="80%"><strong>' . $category['name'] . '</strong></td>' . $LINEBREAK; if ($category['pos'] > 0 && $CONFIG['categories_alpha_sort'] != 1) { echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=movetop&cid1=' . $category['cid'] . '&pos1=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('upup', 0, $lang_common['move_top']) . '</span></a></td>' . $LINEBREAK; echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] - 1) . '&cid2=' . $category['prev'] . '&pos2=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('up', 0, $lang_common['move_up']) . '</span></a></td>' . $LINEBREAK; } else { echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK; echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK; } if ($category['pos'] < $CAT_LIST[$category['parent']]['cat_count'] - 1 && $CONFIG['categories_alpha_sort'] != 1) { echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] + 1) . '&cid2=' . $category['next'] . '&pos2=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('down', 0, $lang_common['move_down']) . '</span></a></td>' . $LINEBREAK; echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=movebottom&cid1=' . $category['cid'] . '&pos1=' . $category['pos'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('downdown', 0, $lang_common['move_bottom']) . '</span></a></td>' . $LINEBREAK; } else { echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK; echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK; } if ($category['cid'] != 1) { echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $CPG_PHP_SELF . '?op=deletecat&cid=' . $category['cid'] . $form_token . '" onclick="return confirmDel(\'' . addslashes(str_replace(' ', '', $category['name'])) . '\')" class="rounded_menu"><span>' . cpg_fetch_icon('delete', 0, $lang_common['delete']) . '</span></a></td>' . $LINEBREAK; } else { echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . $LINEBREAK; } echo ' <td class="' . $row_style_class . '" width="4%">' . '<a href="' . $CPG_PHP_SELF . '?op=editcat&cid=' . $category['cid'] . $form_token . '" class="rounded_menu"><span>' . cpg_fetch_icon('edit', 0, $lang_common['edit']) . '</span></a></td>' . $LINEBREAK; echo ' <td class="' . $row_style_class . '" width="4%">' . $LINEBREAK . cat_list_box($category['cid'], $CAT_LIST3[$category['parent']]) . $LINEBREAK . '</td>' . $LINEBREAK; echo ' </tr>' . $LINEBREAK; } }
function display_cat_list() { global $CAT_LIST, $CONFIG; //$PHP_SELF, $CAT_LIST3 = $CAT_LIST; $loop_counter = 0; foreach ($CAT_LIST3 as $key => $category) { if ($loop_counter == 0) { $row_style_class = 'tableb'; } else { $row_style_class = 'tableb tableb_alternate'; } $loop_counter++; if ($loop_counter > 1) { $loop_counter = 0; } echo " <tr>\n"; echo ' <td class="' . $row_style_class . '" width="80%"><b>' . $category['name'] . '</b></td>' . "\n"; if ($category['pos'] > 0 && $CONFIG['categories_alpha_sort'] != 1) { echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $_SERVER['PHP_SELF'] . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] - 1) . '&cid2=' . $category['prev'] . '&pos2=' . $category['pos'] . '">' . '<img src="images/up.gif" border="0" alt="" />' . '</a></td>' . "\n"; } else { echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . "\n"; } if ($category['pos'] < $category['cat_count'] - 1 && $CONFIG['categories_alpha_sort'] != 1) { echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $_SERVER['PHP_SELF'] . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] + 1) . '&cid2=' . $category['next'] . '&pos2=' . $category['pos'] . '">' . '<img src="images/down.gif" border="0" alt="" />' . '</a></td>' . "\n"; } else { echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . "\n"; } if ($category['cid'] != 1) { echo ' <td class="' . $row_style_class . '" width="4%"><a href="' . $_SERVER['PHP_SELF'] . '?op=deletecat&cid=' . $category['cid'] . '" onClick="return confirmDel(\'' . addslashes(str_replace(' ', '', $category['name'])) . '\')">' . '<img src="images/delete.gif" border="0" alt="" />' . '</a></td>' . "\n"; } else { echo ' <td class="' . $row_style_class . '" width="4%">' . ' ' . '</td>' . "\n"; } echo ' <td class="' . $row_style_class . '" width="4%">' . '<a href="' . $_SERVER['PHP_SELF'] . '?op=editcat&cid=' . $category['cid'] . '">' . '<img src="images/edit.gif" border="0" alt="" />' . '</a></td>' . "\n"; echo ' <td class="' . $row_style_class . '" width="4%">' . "\n" . cat_list_box($category['cid'], $CAT_LIST3[$category['parent']]) . "\n" . '</td>' . "\n"; echo " </tr>\n"; } }
function list_deleted_users() { global $PHP_SELF, $_GET, $xoopsDB; global $CAT_LIST, $member_handler; get_subcat_data(0); $box = cat_list_box(); $sql = "SELECT aid, title, category, pic_count " . "FROM " . $xoopsDB->prefix("xcgal_albums") . " WHERE category > " . FIRST_USER_CAT . ""; //"GROUP BY category"; $result = $xoopsDB->query($sql); if (!$result) { return; } echo "<form method=\"post\" name=\"deluseralb\" action=\"{$PHP_SELF}\">"; echo "<table border='0' cellpadding='0' cellspacing='1' width='100%' class='outer'><tr><th colspan='6'>" . _AM_USERMGR_ULIST . "</th></tr>"; echo "<tr><td class=\"head\">" . _AM_USERMGR_ALB . "</td><td class=\"head\">" . _AM_USERMGR_DELUID . "</td><td class=\"head\" colspan=\"4\">" . _AM_USERMGR_OPT . "</td></tr>"; $tdstyle = "even"; while ($deluser = $xoopsDB->fetchArray($result)) { $deleted =& $member_handler->getUser($deluser['category'] - FIRST_USER_CAT); if (!is_object($deleted)) { if ($tdstyle == "even") { $tdstyle = "odd"; } else { $tdstyle = "even"; } $delid = $deluser['category'] - FIRST_USER_CAT; echo "<tr><td class=\"{$tdstyle}\"><a href=\"../thumbnails.php?album={$deluser['aid']}\">{$deluser['title']}</a></td><td class=\"{$tdstyle}\">{$delid}</td>"; echo "<td class=\"{$tdstyle}\"><a href=\"../delete.php?id={$deluser['aid']}&what=album\">" . _AM_USERMGR_DEL . "</a></td>"; echo "<td class=\"{$tdstyle}\"><a href=\"../modifyalb.php?album={$deluser['aid']}\">" . _AM_USERMGR_PROPS . "</a></td>"; echo "<td class=\"{$tdstyle}\"><a href=\"../editpics.php?album={$deluser['aid']}\">" . _AM_USERMGR_EDITP . "</a></td>"; echo "<td class=\"{$tdstyle}\"><input type=\"hidden\" name=\"album[]\" value=\"{$deluser['aid']}\" />{$box}</td></tr>"; } } echo "<tr><td class=\"foot\" colspan=\"5\"></td><td class=\"foot\"><input type=\"hidden\" name=\"op\" value=\"movealb\" /><input type=\"submit\"></td></tr>"; echo "</table></form>"; }
function display_cat_list() { global $CAT_LIST, $PHP_SELF; $CAT_LIST3 = $CAT_LIST; foreach ($CAT_LIST3 as $key => $category) { echo " <tr>\n"; echo ' <td class="tableb" width="80%"><b>' . $category['name'] . '</b></td>' . "\n"; if ($category['pos'] > 0) { echo ' <td class="tableb" width="4%"><a href="' . $PHP_SELF . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] - 1) . '&cid2=' . $category['prev'] . '&pos2=' . $category['pos'] . '">' . '<img src="images/up.gif" border="0">' . '</a></td>' . "\n"; } else { echo ' <td class="tableb" width="4%">' . ' ' . '</td>' . "\n"; } if ($category['pos'] < $category['cat_count'] - 1) { echo ' <td class="tableb" width="4%"><a href="' . $PHP_SELF . '?op=move&cid1=' . $category['cid'] . '&pos1=' . ($category['pos'] + 1) . '&cid2=' . $category['next'] . '&pos2=' . $category['pos'] . '">' . '<img src="images/down.gif" border="0">' . '</a></td>' . "\n"; } else { echo ' <td class="tableb" width="4%">' . ' ' . '</td>' . "\n"; } if ($category['cid'] != 1) { echo ' <td class="tableb" width="4%"><a href="' . $PHP_SELF . '?op=deletecat&cid=' . $category['cid'] . '" onClick="return confirmDel(\'' . addslashes(str_replace(' ', '', $category['name'])) . '\')">' . '<img src="images/delete.gif" border="0">' . '</a></td>' . "\n"; } else { echo ' <td class="tableb" width="4%">' . ' ' . '</td>' . "\n"; } echo ' <td class="tableb" width="4%">' . '<a href="' . $PHP_SELF . '?op=editcat&cid=' . $category['cid'] . '">' . '<img src="images/edit.gif" border="0">' . '</a></td>' . "\n"; echo ' <td class="tableb" width="4%">' . "\n" . cat_list_box($category['parent'], $category['cid']) . "\n" . '</td>' . "\n"; echo " </tr>\n"; } }
function display_cat_list() { global $CAT_LIST, $opp, $CPG_M_DIR, $THEME_DIR; $CAT_LIST3 = $CAT_LIST; foreach ($CAT_LIST3 as $key => $category) { echo "<tr>\n"; echo '<td class="tableb" width="80%"><b>' . $category['catname'] . '</b></td>' . "\n"; if ($category['pos'] > 0) { echo '<td class="tableb" width="4%" style="float:none;text-align:center"> <form method="post" action="' . URL::index("&file=catmgr", 0, 1) . '" enctype="multipart/form-data" accept-charset="utf-8"> <input type="hidden" name="oppe" value="move" /> <input type="hidden" name="cid1" value="' . $category['cid'] . '" /> <input type="hidden" name="pos1" value="' . ($category['pos'] - 1) . '" /> <input type="hidden" name="cid2" value="' . $category['prev'] . '" /> <input type="hidden" name="pos2" value="' . $category['pos'] . '" /> <input name="submit" type="image" src="' . $THEME_DIR . '/images/up.gif" border="0" /></form>' . "\n"; } else { echo '<td class="tableb" width="4%"> </td>' . "\n"; } if ($category['pos'] < $category['cat_count'] - 1) { echo '<td class="tableb" width="4%" style="float:none;text-align:center"> <form method="post" action="' . URL::index("&file=catmgr", 0, 1) . '" enctype="multipart/form-data" accept-charset="utf-8"> <input type="hidden" name="oppe" value="move" /> <input type="hidden" name="cid1" value="' . $category['cid'] . '" /> <input type="hidden" name="pos1" value="' . ($category['pos'] + 1) . '" /> <input type="hidden" name="cid2" value="' . $category['next'] . '" /> <input type="hidden" name="pos2" value="' . $category['pos'] . '" /> <input name="submit" type="image" src="' . $THEME_DIR . '/images/down.gif" border="0" /></form>' . "\n"; } else { echo '<td class="tableb" width="4%"> </td>' . "\n"; } if ($category['cid'] != 1) { echo '<td class="tableb" width="4%" style="float:none;text-align:center"> <form method="post" action="' . URL::index("&file=catmgr", 0, 1) . '" enctype="multipart/form-data" accept-charset="utf-8"> <input type="hidden" name="oppe" value="deletecat" /> <input type="hidden" name="cid" value="' . $category['cid'] . '" /> <input type="hidden" name="catname" value="' . $category['catname'] . '" /> <input name="submit" title="' . DELETE . '" type="image" src="' . $THEME_DIR . '/images/delete.gif" border="0" /></form>' . "\n"; } else { echo '<td class="tableb" width="4%"> </td>' . "\n"; } echo '<td class="tableb" width="4%" style="float:none;text-align:center"> <form method="post" action="' . URL::index("&file=catmgr", 0, 1) . '" enctype="multipart/form-data" accept-charset="utf-8"> <input type="hidden" name="oppe" value="editcat" /> <input type="hidden" name="cid" value="' . $category['cid'] . '" /> <input name="submit" title="' . EDIT . '" type="image" src="' . $THEME_DIR . '/images/edit.gif" border="0" /></form>' . "\n"; if ($category['cid'] != 1) { echo '<td class="tableb" width="4%" style="float: none; text-align: center">' . "\n" . cat_list_box($category['parent'], $category['cid']) . "\n" . '</td>' . "\n"; } else { echo '<td class="tableb" width="4%"> </td>' . "\n"; } echo "</tr>\n"; } }