[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 #CMS - CMS Made Simple 3 #(c)2004 by Ted Kulp (wishy@users.sf.net) 4 #This project's homepage is: http://cmsmadesimple.sf.net 5 # 6 #This program is free software; you can redistribute it and/or modify 7 #it under the terms of the GNU General Public License as published by 8 #the Free Software Foundation; either version 2 of the License, or 9 #(at your option) any later version. 10 # 11 #This program is distributed in the hope that it will be useful, 12 #but WITHOUT ANY WARRANTY; without even the implied warranty of 13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 #GNU General Public License for more details. 15 #You should have received a copy of the GNU General Public License 16 #along with this program; if not, write to the Free Software 17 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 # 19 #$Id: listbookmarks.php 3571 2006-12-14 22:30:14Z dittmann $ 20 21 $CMS_ADMIN_PAGE=1; 22 23 require_once ("../include.php"); 24 25 check_login(); 26 27 include_once ("header.php"); 28 29 ?> 30 <div class="pagecontainer"> 31 <div class="pageoverflow"> 32 33 <?php 34 35 $userid = get_userid(); 36 37 global $gCms; 38 $bookops =& $gCms->GetBookmarkOperations(); 39 $marklist = $bookops->LoadBookmarks($userid); 40 41 $page = 1; 42 if (isset($_GET['page'])) $page = $_GET['page']; 43 $limit = 20; 44 45 if (count($marklist) > $limit) 46 { 47 echo "<p class=\"pageshowrows\">".pagination($page, count($marklist), $limit)."</p>"; 48 } 49 echo $themeObject->ShowHeader('bookmarks').'</div>'; 50 51 if (count($marklist) > 0) { 52 53 echo "<table cellspacing=\"0\" class=\"pagetable\">\n"; 54 echo '<thead>'; 55 echo "<tr>\n"; 56 echo "<th class=\"pagew60\">".lang('name')."</th>\n"; 57 echo "<th class=\"pagepos\">".lang('url')."</th>\n"; 58 echo "<th class=\"pageicon\"> </th>\n"; 59 echo "<th class=\"pageicon\"> </th>\n"; 60 echo "</tr>\n"; 61 echo '</thead>'; 62 echo '<tbody>'; 63 64 $currow = "row1"; 65 66 // construct true/false button images 67 $image_true = $themeObject->DisplayImage('icons/system/true.gif', lang('true'),'','','systemicon'); 68 $image_false = $themeObject->DisplayImage('icons/system/false.gif', lang('false'),'','','systemicon'); 69 70 $counter=0; 71 foreach ($marklist as $onemark){ 72 if ($counter < $page*$limit && $counter >= ($page*$limit)-$limit) { 73 echo "<tr class=\"$currow\" onmouseover=\"this.className='".$currow.'hover'."';\" onmouseout=\"this.className='".$currow."';\">\n"; 74 echo "<td><a href=\"editbookmark.php?bookmark_id=".$onemark->bookmark_id."\">".$onemark->title."</a></td>\n"; 75 echo "<td>".$onemark->url."</td>\n"; 76 echo "<td><a href=\"editbookmark.php?bookmark_id=".$onemark->bookmark_id."\">"; 77 echo $themeObject->DisplayImage('icons/system/edit.gif', lang('edit'),'','','systemicon'); 78 echo "</a></td>\n"; 79 echo "<td><a href=\"deletebookmark.php?bookmark_id=".$onemark->bookmark_id."\" onclick=\"return confirm('".lang('deleteconfirm')."');\">"; 80 echo $themeObject->DisplayImage('icons/system/delete.gif', lang('delete'),'','','systemicon'); 81 echo "</a></td>\n"; 82 echo "</tr>\n"; 83 ($currow == "row1"?$currow="row2":$currow="row1"); 84 } 85 $counter++; 86 } 87 88 echo '</tbody>'; 89 echo "</table>\n"; 90 91 } 92 ?> 93 <div class="pageoptions"> 94 <p class="pageoptions"> 95 <a href="addbookmark.php"> 96 <?php 97 echo $themeObject->DisplayImage('icons/system/newobject.gif', lang('addbookmark'),'','','systemicon').'</a>'; 98 echo ' <a class="pageoptions" href="addbookmark.php">'.lang("addbookmark"); 99 ?> 100 </a> 101 </p> 102 </div> 103 </div> 104 <?php 105 echo '<p class="pageback"><a class="pageback" href="'.$themeObject->BackUrl().'">« '.lang('back').'</a></p>'; 106 107 include_once ("footer.php"); 108 109 # vim:ts=4 sw=4 noet 110 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |