Changeset 1334
- Timestamp:
- 02/16/07 14:17:21 (2 years ago)
- Files:
-
- feedmelinks/account.php (modified) (2 diffs)
- feedmelinks/action.php (modified) (4 diffs)
- feedmelinks/admin/shortlist.php (modified) (2 diffs)
- feedmelinks/admin/sudo-core.php (modified) (1 diff)
- feedmelinks/admin/userlist.php (modified) (2 diffs)
- feedmelinks/categorize.php (modified) (1 diff)
- feedmelinks/delete.php (modified) (3 diffs)
- feedmelinks/edit-folder.php (modified) (4 diffs)
- feedmelinks/edit.php (deleted)
- feedmelinks/folder-as-rss.php (modified) (7 diffs)
- feedmelinks/folder-by-tag-name.php (modified) (2 diffs)
- feedmelinks/folder.php (modified) (21 diffs)
- feedmelinks/import/processing.php (modified) (4 diffs)
- feedmelinks/index.php (modified) (1 diff)
- feedmelinks/misc/forgot-password.php (modified) (1 diff)
- feedmelinks/modules/folder-list.inc.php (modified) (2 diffs)
- feedmelinks/modules/folder-menu.inc.php (modified) (1 diff)
- feedmelinks/modules/get-option.inc.php (modified) (1 diff)
- feedmelinks/modules/list-public-compact.inc.php (modified) (3 diffs)
- feedmelinks/modules/main-interface.inc.php (modified) (2 diffs)
- feedmelinks/modules/my-recent.inc.php (modified) (6 diffs)
- feedmelinks/modules/public.inc.php (modified) (2 diffs)
- feedmelinks/modules/recent-users.inc.php (modified) (1 diff)
- feedmelinks/modules/tag-cloud.inc.php (modified) (3 diffs)
- feedmelinks/modules/utils.inc.php (modified) (34 diffs)
- feedmelinks/references.php (modified) (1 diff)
- feedmelinks/search-as-xml.php (modified) (2 diffs)
- feedmelinks/search.php (modified) (2 diffs)
- feedmelinks/stats.php (modified) (2 diffs)
- feedmelinks/testing/ajax-test.php (modified) (3 diffs)
- feedmelinks/testing/instrumented.php (modified) (1 diff)
- feedmelinks/testing/search.php (modified) (2 diffs)
- feedmelinks/testing/view-folder.php (modified) (1 diff)
- feedmelinks/wall-of-ancients-uncached.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/account.php
r1313 r1334 16 16 if( $email ) { 17 17 $email = urlencode( $email ); 18 $qs = "UPDATE linksUsers SET email = '$email' WHERE userId = '$u'";18 $qs = "UPDATE users SET email = '$email' WHERE userId = '$u'"; 19 19 $successEmail = mysql_query( $qs ); 20 20 $showForm = 1; … … 41 41 if( $password1 == $password2 ) { 42 42 $password = urlencode( $password1 ); 43 $qs = "UPDATE linksUsers SET password = '$password' WHERE userId = '$u'";43 $qs = "UPDATE users SET password = '$password' WHERE userId = '$u'"; 44 44 $successPass = mysql_query( $qs ); 45 45 %> feedmelinks/action.php
r1331 r1334 31 31 } else { 32 32 $where_clause = preg_replace( "/^ OR /", "", $where_clause); 33 $qs = "DELETE FROM linksGroups WHERE userid = '$u' AND ($where_clause);";33 $qs = "DELETE FROM tags WHERE userid = '$u' AND ($where_clause);"; 34 34 if( $debug ) echo $qs; 35 35 $q = mysql_query( $qs ); … … 169 169 $valuesClause = "$valuesClause($link, $tag) "; 170 170 $c++; 171 $qs = "INSERT INTO links CategoriesXRef VALUES($link, $tag);";171 $qs = "INSERT INTO links_tags_xref VALUES($link, $tag);"; 172 172 $q = mysql_query( $qs ); 173 173 if( ! $q ) { … … 204 204 else 205 205 $whereClause = "$whereClause OR"; 206 $whereClause = "$whereClause (linkID = $link AND catID = $folderID) ";206 $whereClause = "$whereClause (linkID = $link AND tagID = $folderID) "; 207 207 $c++; 208 208 } 209 209 210 $qs = "DELETE FROM links CategoriesXRef $whereClause;";210 $qs = "DELETE FROM links_tags_xref $whereClause;"; 211 211 } else { 212 212 $errors = "Unknown operation parameter: \$op: $op"; … … 227 227 $c++; 228 228 } 229 $qs = "DELETE FROM links CategoriesXRef $whereClause;";229 $qs = "DELETE FROM links_tags_xref $whereClause;"; 230 230 $q = mysql_query( $qs ); 231 231 if( !$q ) feedmelinks/admin/shortlist.php
r1331 r1334 35 35 mysql_selectdb( getDBName() ); 36 36 37 $qs = "SELECT u.userid, u.email, l.ID, l.userid, count(*) from linksUsers as u, links as l WHERE l.userid = u.userid AND disabled IS NULL group by u.userid ORDER BY $orderBy;";37 $qs = "SELECT u.userid, u.email, l.ID, l.userid, count(*) from users as u, links as l WHERE l.userid = u.userid AND disabled IS NULL group by u.userid ORDER BY $orderBy;"; 38 38 39 39 $q = mysql_query( $qs ); … … 59 59 60 60 # count folders 61 $qs2 = "SELECT count(*) FROM linksGroups WHERE userid='$userId'";61 $qs2 = "SELECT count(*) FROM tags WHERE userid='$userId'"; 62 62 $q2 = mysql_query( $qs2 ); 63 63 if( $q2 ) $numFolders = mysql_result($q2,0); feedmelinks/admin/sudo-core.php
r724 r1334 11 11 12 12 if( $who ) { 13 $qs = "SELECT * FROM linksUsers WHERE userid LIKE \"%$who%\"";13 $qs = "SELECT * FROM users WHERE userid LIKE \"%$who%\""; 14 14 if( $debug ) 15 15 e( $qs ); feedmelinks/admin/userlist.php
r1331 r1334 36 36 mysql_selectdb( getDBName() ); 37 37 38 $qs = "SELECT * from linksUsers ORDER BY $orderBy";38 $qs = "SELECT * from users ORDER BY $orderBy"; 39 39 $q = mysql_query( $qs ); 40 40 $numRows = mysql_num_rows($q); … … 59 59 60 60 # count folders 61 $qs2 = "SELECT count(*) FROM linksGroups WHERE userid='$userId'";61 $qs2 = "SELECT count(*) FROM tags WHERE userid='$userId'"; 62 62 $q2 = mysql_query( $qs2 ); 63 63 if( $q2 ) $numFolders = mysql_result($q2,0); feedmelinks/categorize.php
r1331 r1334 304 304 # from=toolbar 305 305 # op=submit 306 # groupid=XXXX307 306 # name=asd 308 307 # url=http%3A//feedmelinks.com/testing/categories.php%3Furl%3Dfoo feedmelinks/delete.php
r1331 r1334 24 24 </script> 25 25 26 < %26 <?php 27 27 $con_delete = mysql_connect(); 28 28 mysql_selectdb( getDBName() ); … … 37 37 $url = $link = urldecode( mysql_result($q,0,"url")) ; 38 38 $private = mysql_result($q,0,"isPrivate"); 39 40 $groupid = mysql_result($q,$i,"groupid"); 41 42 if( $groupid ) { 43 $qs2 = getQuery( "find_tag", $groupid ); 44 $q2 = mysql_query( $qs2 ); 45 $numRows2 = mysql_num_rows($q2); 46 if( $numRows2 ) { 47 $tag = urldecode( mysql_result($q2,0,"name")); 48 $tagID = urldecode( mysql_result($q2,0,"ID")); 49 $isPrivate = urldecode( mysql_result($q2,0,"isPrivate")); 50 } 51 } else 52 $tag = "unnamed"; 39 $tag = "unnamed"; 53 40 $public = 0; 54 41 if( ! $isPrivate ) { … … 65 52 $niceCreateDate = formatTS( $createDate ) ; 66 53 conClose( $con_delete ); 67 %>54 ?> 68 55 <form action="index"> 69 56 <input type="hidden" name="folder" value="<%= $tagID %>" /> feedmelinks/edit-folder.php
r1331 r1334 35 35 $name = urlencode( $name ); 36 36 $isPrivate = $isPrivate ? 1 : "NULL"; 37 $qs = "UPDATE linksGroups SET name = '$name', isPrivate = $isPrivate WHERE id = $id AND userid = '$u'";37 $qs = "UPDATE tags SET name = '$name', isPrivate = $isPrivate WHERE id = $id AND userid = '$u'"; 38 38 39 39 if( $debug ) { … … 99 99 mysql_selectdb( getDBName() ); 100 100 101 $qs = "SELECT userid FROM linksGroups where ID = $id;";101 $qs = "SELECT userid FROM tags where ID = $id;"; 102 102 $q = mysql_query( $qs ); 103 103 if( $q ) … … 118 118 echo "deleting the links<br />"; 119 119 120 $qs = "SELECT linkID FROM links CategoriesXRef WHERE catID = $id;";120 $qs = "SELECT linkID FROM links_tags_xref WHERE tagID = $id;"; 121 121 $q = mysql_query( $qs ); 122 122 if( $q ) { … … 133 133 $fail = "sorry, an error occurred and the links weren't deleted!"; 134 134 } else { 135 # need to also clean the fuck out of links CategoriesXRef135 # need to also clean the fuck out of links_tags_xref 136 136 137 137 $qs = getQuery( "delete_tag_refs", $id ); 138 138 $q = mysql_query( $qs ); 139 139 if( $q ) { 140 #echo "we are just clearing the groupid of the links<br />";141 140 $success = "all links untagged!"; 142 141 } 143 $fail = "ugh. some weird error occurred. i hate being a dumb computer. sorry!";144 $qs = "UPDATE links SET groupid = NULL WHERE userid = '$u' AND groupid = $id";145 142 } 146 if( $debug ) print "DEBUG: $qs<br />\n";147 $q = mysql_query( $qs );148 if( $q ) { echo "$success<br />\n"; } else { echo "$fail<br />\n"; }149 143 %> 150 144 feedmelinks/folder-as-rss.php
r1331 r1334 1 1 <% 2 Header( "Content-type: text/ xml");2 Header( "Content-type: text/plain"); 3 3 # $Id$ 4 4 … … 13 13 $sortOrder = "createDate"; 14 14 $direction = $sortOrder == name ? "ASC" : "DESC"; 15 16 15 17 16 # first, set up options and defaults. … … 64 63 $singleGroupName = substr( $singleGroupName, 2, strlen( $singleGroupName ) ); 65 64 } 66 if( $pubFolder )67 65 $whereClause = " WHERE 68 l.groupid=$folder ";69 else70 $whereClause = " WHERE71 l.groupid=$folder AND72 66 l.userid='$sessionUserId' "; 73 67 if( $debug ) 74 68 echo "whereClause: $whereClause<br />"; 75 69 76 $qs = "SELECT * FROM links AS l, links CategoriesXRef AS x WHERE l.ID = x.linkID AND x.catID = $folder ORDER BY $sortOrder $direction;";70 $qs = "SELECT * FROM links AS l, links_tags_xref AS x WHERE l.ID = x.linkID AND x.tagID = $folder ORDER BY $sortOrder $direction;"; 77 71 } else { 78 72 $errors = 1; … … 82 76 } else { 83 77 84 $qs = "SELECT * FROM linksGroups";78 $qs = "SELECT * FROM tags"; 85 79 $q = mysql_query( $qs ); 86 80 … … 97 91 if( $j != 0 ) 98 92 $whereClause = " $whereClause OR"; 99 $whereClause = "$whereClause groupid=$id";93 $whereClause = "$whereClause"; 100 94 $j++; 101 95 } … … 108 102 $title = $owner . "'s " . $singleGroupName . " - a FeedMeLinks public " . getCatName() . ""; 109 103 %> 110 < <%= "?" %>xml version="1.0"?>104 <!-- <%= "?" %>xml version="1.0"?> 111 105 <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"> 112 <rss version="0.91" >106 <rss version="0.91"--> 113 107 <channel> 114 108 <title><%= $errors ? "private " . getCatName() : $title %></title> … … 136 130 $id = mysql_result($q,$i,"ID"); 137 131 $userId = makeSafeName( mysql_result($q,$i,"userid")); 138 $groupid = mysql_result($q,$i,"groupid");139 $group = $singleGroup ? $singleGroupName : $groups[$groupid];140 $group = $group ? $group : "unfiled";141 if( !$unfiled && $group == "unfiled" )142 break;143 132 if( $prevGroup != $group && $sortOrder == "groupid" ) { 144 133 $bg = "bgcolor='white'"; feedmelinks/folder-by-tag-name.php
r1178 r1334 1 < %1 <?php 2 2 # $Id$ 3 3 include_once( "modules/utils.inc.php" ); 4 4 5 $tok = $authenticated = $_COOKIE["c_pass_token"]; 6 $u = $sessionUserId = ( $user ? $user : $_COOKIE["c_uid"] ); 7 8 # TODO: extend this to do delicious/flickr-style "show this tag for all users" view 5 # FIXME: doesn't work with &'s in tag names 9 6 if( ! $user ) 10 7 croak( "shit, no username!" ); … … 12 9 if( $tok && $tok == md5( getPasswdForUser( $u ))) 13 10 $authed = true; 14 $who_hath = ($authed ? "you have" : "$user has" ); 11 $who_hath = ($authed ? "You have" : "$user has" ); 12 15 13 16 14 if( ! $tag ) 17 15 croak( "shit, no tag!" ); 18 16 19 comment( "user: $user, tag: $tag" );20 $con_t = mysql_connect();21 mysql_selectdb( getDBName() );22 23 # allow authenticated users to view their own private tags24 $taglist_clause = "isPrivate IS NULL" . ($authed ? " ORname = '$tag'" : "");17 comment( "user: $user, tag: $tag" ); 18 $con_t = mysql_connect(); 19 mysql_selectdb( getDBName() ); 20 21 # allow authenticated users to view their own private tags 22 $taglist_clause = "(isPrivate IS NULL OR isPrivate = 0)" . ($authed ? " AND name = '$tag'" : ""); 25 23 26 $qs = getQuery( "tag_by_name", $user, "($taglist_clause)" ); 27 $q = mysql_query( $qs ); 28 if( !$q || !( $numRows = mysql_num_rows($q))) 29 croak( "$who_hath no tag called '$tag', dog!" ); 30 31 # TODO: either handle this case or remove the if/for statements 32 if( $numRows > 1) 33 echo "$who_hath more than one tag called $tag."; 24 $qs = getQuery( "tag_by_name", $user, "($taglist_clause)" ); 34 25 35 for( $i = 0; $i < $numRows; $i++ ) { 36 $folder = $tagID = mysql_result($q, $i, "ID"); 37 comment( "<!-- redirect via folder-by-tag-name -->" ); 38 include( "folder.php" ); 39 } 26 $q = mysql_query( $qs ); 27 if( !$q || !( $numRows = mysql_num_rows($q))) 28 croak( "Sorry, we screwed up. We're currently working on fixing this. $who_hath no tag called '$tag', dog!" ); 29 30 # TODO: either handle this case or remove the if/for statements 31 if( $numRows > 1) 32 echo "$who_hath more than one tag called $tag."; 40 33 41 conClose( $con_t); 42 %> 34 $folder = $tagID = mysql_result($q, $i, "ID"); 35 $singleGroupName = $tag; 36 comment( "<!-- redirect to folder from folder-by-tag-name: tag = $tagID, name = $tag -->" ); 37 include( "folder.php" ); 38 39 conClose( $con_t); 40 ?> feedmelinks/folder.php
r1331 r1334 1 < %1 <?php 2 2 ob_start(); 3 4 $debug = 0; 5 3 6 include_once( "modules/class.gzip_encode.inc.php" ); 4 5 # $Id$6 7 7 include_once( "modules/utils.inc.php" ); 8 8 $site = getSiteUrl(); … … 15 15 16 16 if( $sidebar ) { 17 include _once( "folder-sidebar.php" );17 include( "folder-sidebar.php" ); 18 18 } else { 19 19 … … 78 78 $numRows = $q ? mysql_num_rows($q) : 0; 79 79 if( $q && $numRows ) { 80 $singleGroupName = makeSafeName( mysql_result($q,$i,"name") );80 $singleGroupName = $singleGroupName ? $singleGroupName : makeSafeName( mysql_result($q,$i,"name") ); 81 81 $email = getEmailAddressForUser( mysql_result($q,$i,"userid")); 82 82 } else { 83 83 # cache error for display in the proper place: 84 84 ob_start(); 85 %>85 ?> 86 86 87 87 <div class="attention"> 88 88 Sadly, no such folder exists.<br /> 89 Please double-check the URL, or try visiting the list of <a href=\"/list-public\">public < %= getCatsName() %></a>.90 </div> 91 92 < %89 Please double-check the URL, or try visiting the list of <a href=\"/list-public\">public <?= getCatsName() ?></a>. 90 </div> 91 92 <?php 93 93 $errors = ob_get_clean(); 94 94 } … … 127 127 if( $debug ) 128 128 echo "<br />using the second query<br />"; 129 if( $pubFolder )130 129 $whereClause = " WHERE 131 l.groupid=$folder ";132 else133 $whereClause = " WHERE134 l.groupid=$folder AND135 130 l.userid='$u' "; 136 131 if( $debug ) 137 132 echo "whereClause: $whereClause<br />"; 138 133 139 $qs = "SELECT * FROM links AS l, links CategoriesXRef AS x WHERE l.ID = x.linkID AND x.catID = $folder ORDER BY $sortOrder $direction;";134 $qs = "SELECT * FROM links AS l, links_tags_xref AS x WHERE l.ID = x.linkID AND x.tagID = $folder ORDER BY $sortOrder $direction;"; 140 135 if( $debug ) 141 136 e( "QS: " . $qs ); … … 144 139 } else { 145 140 if( $errors != 1 ) { 141 echo $qs; 146 142 $errors = "Unfortunately, this " . getCatName() . " (#$folder) isn't public, bub.<br /> 147 143 Try <a href='/login'>logging in</a>, <a href=\"mailto:$email\">emailing the owner</a> and asking them to make it public, … … 152 148 } else { 153 149 154 $qs = "SELECT * FROM linksGroups";150 $qs = "SELECT * FROM tags"; 155 151 $q = mysql_query( $qs ); 156 152 … … 167 163 if( $j != 0 ) 168 164 $whereClause = " $whereClause OR"; 169 $whereClause = "$whereClause groupid=$id";165 $whereClause = "$whereClause"; 170 166 $j++; 171 167 } … … 173 169 } 174 170 } 175 $qs = "SELECT * FROM links AS l , linksComments AS x$whereClause ORDER BY $sortOrder $direction";171 $qs = "SELECT * FROM links AS l $whereClause ORDER BY $sortOrder $direction"; 176 172 } 177 173 if( $owned || $public ) 178 $title = "$owner’s links " . getCatPast() . " with $singleGroupName";174 $title = "$owner’s links " . getCatPast() . " with '$fName'"; 179 175 else 180 176 $title = "(a private " . getCatName() . ")"; … … 183 179 $title = "Feed Me Links » $title"; 184 180 if( ! $condensed ) { 185 include _once( "$modules/header.inc.php" );181 include( "$modules/header.inc.php" ); 186 182 } else { 187 include _once( "$modules/header.insecure.inc.php" );188 } 189 %>183 include( "$modules/header.insecure.inc.php" ); 184 } 185 ?> 190 186 191 187 … … 194 190 </style> 195 191 </head> 196 < % if( ! $condensed ) { %>192 <?php if( ! $condensed ) { ?> 197 193 <body> 198 < %199 include _once( "$modules/menu.inc.php" );200 %>194 <?php 195 include( "$modules/menu.inc.php" ); 196 ?> 201 197 <br /> 202 198 <br /> 203 < % } %>204 205 < %199 <?php } ?> 200 201 <?php 206 202 if( $owned ) { 207 %>208 « <a href="/u/< %= $u %>/tags">back to my list of <%= getCatsName() %></a>209 < %203 ?> 204 « <a href="/u/<?= $u ?>/tags">back to my list of <?= getCatsName() ?></a> 205 <?php 210 206 } 211 207 if( ! $errors ) { … … 213 209 $q = mysql_query( $qs ); 214 210 if( $debug) 215 echo d( "ran \$qs " );211 echo d( "ran \$qs $qs" ); 216 212 if( $q ) 217 213 $numRows = mysql_num_rows($q); … … 222 218 if( $numRows ) { 223 219 224 if( $owned && !$condensed ) { %>220 if( $owned && !$condensed ) { ?> 225 221 226 222 <script language="javascript"> 227 223 228 224 var numSelected = 0; 229 var numLinks = < %= $numRows %>;225 var numLinks = <?= $numRows ?>; 230 226 231 227 function updateSelectedTotal( cb ) { … … 284 280 285 281 <form method="post" action="/action" name="folderForm"> 286 (<a href="/edit-folder?op=edit&id=< %= $id %>&name=<%= urlencode( $fName ) %>&options=">click to edit this <%= getCatName() %>'s name</a>)282 (<a href="/edit-folder?op=edit&id=<?= $id ?>&name=<?= urlencode( $fName ) ?>&options=">click to edit this <?= getCatName() ?>'s name</a>) 287 283 <p /> 288 < % } %>284 <?php } ?> 289 285 290 286 <!-- start block --> … … 292 288 <div class="box"> 293 289 <div class="subhead"> 294 < % if( $public && (!$owned)) { %>295 <a class="link" href="/u/< %= $owner %>"><%= $owner %>'s <%= getCatsName() %></a>296 < % } else { %>297 <a class="link" href="/index">my < %= getCatsName() %></a>298 < % } %> / <b><%= makePrettyFolderName( getNameForFolder( $folder )) %></b>299 < %290 <?php if( $public && (!$owned)) { ?> 291 <a class="link" href="/u/<?= $owner ?>"><?= $owner ?>'s <?= getCatsName() ?></a> 292 <?php } else { ?> 293 <a class="link" href="/index">my <?= getCatsName() ?></a> 294 <?php } ?> / <b><?= makePrettyFolderName( getNameForFolder( $folder )) ?></b> 295 <?php 300 296 echo " ($numRows links) "; 301 297 if( ! $public && ! $_internal ) { 302 %><img src="/img/lock" /><%298 ?><img src="/img/lock" /><?php 303 299 } 304 %>300 ?> 305 301 <small> 306 < %307 if( $condensed ) { %>308 (<a class="link" href="/f/< %= $folder %>">view expanded</a>)309 < % } else { %>310 (<a class="link" href="/f/< %= $folder %>/c">view condensed</a>)311 < % } %>312 313 < % if( !$condensed ) { %>314 315 < % if( $sortOrder != "name" ) { %>316 (<a class="link" title="sort by name" href="/f/< %= $folder %>/by-name">sort by name</a>)317 < %}318 319 if( $sortOrder != "createDate" ) { %>320 (<a class="link" title="sort by date" href="/f/< %= $folder %>/by-date">sort by date</a>)321 < % } %>322 323 < % } else { %>324 325 < % if( $sortOrder != "name" ) { %>326 (<a class="link" title="sort by name" href="/f/< %= $folder %>/c/by-name">sort by name</a>)327 < % } %>328 329 < % if( $sortOrder != "createDate" ) { %>330 (<a class="link" title="sort by date" href="/f/< %= $folder %>/c/by-date">sort by date</a>)331 < % } %>332 333 < % } %>302 <?php 303 if( $condensed ) { ?> 304 (<a class="link" href="/f/<?= $folder ?>">view expanded</a>) 305 <?php } else { ?> 306 (<a class="link" href="/f/<?= $folder ?>/c">view condensed</a>) 307 <?php } ?> 308 309 <?php if( !$condensed ) { ?> 310 311 <?php if( $sortOrder != "name" ) { ?> 312 (<a class="link" title="sort by name" href="/f/<?= $folder ?>/by-name">sort by name</a>) 313 <?php } 314 315 if( $sortOrder != "createDate" ) { ?> 316 (<a class="link" title="sort by date" href="/f/<?= $folder ?>/by-date">sort by date</a>) 317 <?php } ?> 318 319 <?php } else { ?> 320 321 <?php if( $sortOrder != "name" ) { ?> 322 (<a class="link" title="sort by name" href="/f/<?= $folder ?>/c/by-name">sort by name</a>) 323 <?php } ?> 324 325 <?php if( $sortOrder != "createDate" ) { ?> 326 (<a class="link" title="sort by date" href="/f/<?= $folder ?>/c/by-date">sort by date</a>) 327 <?php } ?> 328 329 <?php } ?> 334 330 </small> 335 331 336 <% if( $owned ) { %> 337 <% if( !$condensed ) { %> 332 <?php 333 if( $owned ) { 334 if( !$condensed ) { ?> 338 335 <small> select all:</small><input style="margin-bottom: -1px;" type="checkbox" name="selectAll" onChange="selectAllLinks(document.forms.folderForm);"/> 339 < % } %>340 < % } else if( ! $condensed ) { %>336 <?php } ?> 337 <?php } else if( ! $condensed ) { ?> 341 338 | 342 339 snatch 343 < % } %>340 <?php } ?> 344 341 </div> 345 342 <!-- end row --> 346 343 347 < %344 <?php 348 345 $i = 0; 346 349 347 while ($i < $numRows) { 350 348 $id = mysql_result($q,$i,"ID"); 351 349 $userId = makeSafeName( mysql_result($q,$i,"userid")); 352 $folderId = mysql_result($q,$i,"groupid");353 350 $group = $singleGroup ? $singleGroupName : $groups[$folderId]; 354 $group = $ group ? $group : "unfiled";351 $group = $tag ? $tag : ($group ? $group : "unfiled"); 355 352 if( !$unfiled && $group == "unfiled" ) 356 353 break; … … 358 355 $bg = "class='header2'"; 359 356 $prevGroup = $group; 360 %> 361 <% 357 362 358 if( !$owned && !$condensed ) { 363 %>359 ?> 364 360 <!-- start row --> 365 361 <div class="r1"> 366 (owned by <b>< %= makeUserLink( $userId ) %></b>)367 </div> 368 < % } %>362 (owned by <b><?= makeUserLink( $userId ) ?></b>) 363 </div> 364 <?php } ?> 369 365 <!-- end row --> 370 366 371 < %367 <?php 372 368 } 373 369 $group = $group ? $group : "..."; … … 390 386 else 391 387 $bg = "r1"; 392 %>388 ?> 393 389 <!-- start row --> 394 <div style="padding: 4px;" class="< %= $bg %>">395 < %390 <div style="padding: 4px;" class="<?= $bg ?>"> 391 <?php 396 392 if( strlen( $name ) > $MAX_NAME_LENGTH ) { 397 393 $displayName = substr( $name, 0, $MAX_NAME_LENGTH ) . "..."; … … 399 395 } else 400 396 $displayName = $name; 401 %>397 ?> 402 398 <div style="float: left;"> 403 < %= insertImageLinkIcon( $url ) %>404 < %= makeNamedLinkOut( $id, $displayName) %> <%= makePermaLink( $id ) %>399 <?= insertImageLinkIcon( $url ) ?> 400 <?= makeNamedLinkOut( $id, $displayName) ?> <?= makePermaLink( $id ) ?> 405 401 406 402 </div> 407 403 <div style="float: right;"> 408 <span class="subtle">< %= $createDate %></span>409 < %if( ! $owned ) {404 <span class="subtle"><?= $createDate ?></span> 405 <?php if( ! $owned ) { 410 406 if( !$condensed ) { 411 %>412 < %= makeStealItLink( $id ) %>413 < %}407 ?> 408 <?= makeStealItLink( $id ) ?> 409 <?php } 414 410 } else { 415 411 416 412 if( !$condensed ) { 417 %>418 < %= makeEditLink( $id ) %>419 < %= makeDeleteLink( $id ) %>420 <input type="checkbox" name="< %= $id %>" onChange="updateSelectedTotal(this);" />421 < % } %>413 ?> 414 <?= makeEditLink( $id ) ?> 415 <?= makeDeleteLink( $id ) ?> 416 <input type="checkbox" name="<?= $id ?>" onChange="updateSelectedTotal(this);" /> 417 <?php } ?> 422 418 <br clear="all"> 423 < % } %>419 <?php } ?> 424 420 </div> 425 421 … … 427 423 <!-- end row --> 428 424 429 < % $i++; %>430 <% 425 <?php 426 $i++; 431 427 } 432 428 conClose( $con_folder ); 433 %> 434 435 <% if( $owned && !$condensed) { %> 429 ?> 430 431 <?php 432 if( $owned && !$condensed) { ?> 436 433 <!-- start row --> 437 434 <div class="r1 last"> 438 435 439 < %= getCatVerb() %> selected links as:436 <?= getCatVerb() ?> selected links as: 440 437 <select name="newFolderID"> 441 < % include( "$modules/folder-menu.inc.php" ); %>438 <?php include( "$modules/folder-menu.inc.php" ); ?> 442 439 </select> 443 440 <input type="hidden" name="op" value="tag" /> 444 <input type="hidden" name="debug" value="< %= $debug %>" />445 <input type="hidden" name="folderID" value="< %= $folder %>" />441 <input type="hidden" name="debug" value="<?= $debug ?>" /> 442 <input type="hidden" name="folderID" value="<?= $folder ?>" /> 446 443 <input class="button" type="button" name="tagButton" value="tag" onClick="tagSelected()"/> 447 444 </div> … … 464 461 <br> 465 462 466 < %463 <?php 467 464 $rss_url = "/f/$folder/rss"; 468 %>469