Changeset 563 for trunk/plog-admin/plog-feedback.php
- Timestamp:
- 07/21/08 19:18:07 (2 years ago)
- File:
-
- 1 edited
-
trunk/plog-admin/plog-feedback.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plog-admin/plog-feedback.php
r555 r563 110 110 $url = "?entries_per_page=$_SESSION[entries_per_page]"; 111 111 112 $first_item = ($_REQUEST['plog_page'] - 1) * $_SESSION['entries_per_page']; 112 $plog_page = isset($_REQUEST["plog_page"]) ? $_REQUEST["plog_page"] : 1; 113 114 $first_item = ($plog_page - 1) * $_SESSION['entries_per_page']; 113 115 $limit = "LIMIT $first_item, $_SESSION[entries_per_page]"; 114 116 … … 122 124 $num_comments_im = mysql_result($mod_result, "in_moderation"); 123 125 124 $page = isset($_GET["plog_page"]) ? $_GET["plog_page"] : 1;125 126 126 // filter based on whether were looking at approved comments or unmoderated comments 127 $approved = isset($_GET["moderate"]) ? 0 : 1; 128 129 if ($approved) 130 $pagination_menu = generate_pagination('plog-feedback.php'.$url,$page,$num_comments,$_SESSION['entries_per_page']); 131 else 132 $pagination_menu = generate_pagination('plog-feedback.php'.$url,$page,$num_comments_im,$_SESSION['entries_per_page'],"&moderate=1"); 127 $approved = isset($_REQUEST['moderate']) ? 0 : 1; 128 129 if ($approved) { 130 $pagination_menu = generate_pagination("admin", "feedback", $plog_page, $num_comments, $_SESSION['entries_per_page']); 131 } else { 132 $pagination_menu = generate_pagination("admin", "feedback", $plog_page, $num_comments_im, $_SESSION['entries_per_page'], array("moderate" => 1)); 133 } 134 $pagination_menu = "\n\t\t" . '<div class="pagination">'.$pagination_menu.'</div>'; 133 135 134 136 // generate javascript init function for ajax editing … … 186 188 </table>'; 187 189 190 if (!$empty) { $output .= $pagination_menu; } 191 188 192 $output .= "\n\n\t\t" . '<table style="width: 100%;" cellpadding="4"> 189 193 <tr class="header"> … … 269 273 } 270 274 271 if (!$empty) 272 $output .= "\n\n\t\t" . '< table style="width: 100%;">273 <tr>274 <td><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false;">' . plog_tr('Invert Checkbox Selection') . '</a></td> 275 <td align="right">'.$pagination_menu.'</td> 276 </tr> 277 </table>'; 278 279 $output .= "\n\n\t\t" . '<div><input class="submit" type="submit" name="delete_checked" onclick="return confirm(\''. plog_tr('Are you sure you want to delete the selected comments?') . '\');" value="' . plog_tr('Delete Checked') . '" /><input class="submit" type="submit" name="approve_checked" onclick="return confirm(\'' . plog_tr('Are you sure you want to approve the selected comments?') . '\');" value="' . plog_tr('Approve Checked') . '" /></div>'; 275 if (!$empty) { 276 $output .= "\n\n\t\t" . '<div><a href="#" onclick="checkAll(document.getElementById(\'contentList\')); return false;">' . plog_tr('Invert Checkbox Selection') . '</a></div> 277 '.$pagination_menu; 278 } 279 280 $output .= "\n\n\t\t" . '<div><input class="submit" type="submit" name="delete_checked" onclick="return confirm(\''. plog_tr('Are you sure you want to delete the selected comments?') . '\');" value="' . plog_tr('Delete Checked') . '" />'; 281 if (!$approved) { 282 $output .= '<input class="submit" type="submit" name="approve_checked" onclick="return confirm(\'' . plog_tr('Are you sure you want to approve the selected comments?') . '\');" value="' . plog_tr('Approve Checked') . '" /></div>'; 283 } 280 284 281 285 $output .= "\n\n\t\t" . '</form>'. "\n";
Note: See TracChangeset
for help on using the changeset viewer.
