Changeset 1326
- Timestamp:
- 02/08/07 14:56:56 (2 years ago)
- Files:
-
- feedmelinks/FAQ/index.php (modified) (2 diffs)
- feedmelinks/admin/snuff.php (modified) (1 diff)
- feedmelinks/admin/todays-users.php (modified) (3 diffs)
- feedmelinks/compile.php (added)
- feedmelinks/modules/footer.inc.php (modified) (1 diff)
- feedmelinks/modules/menu.inc.php (modified) (1 diff)
- feedmelinks/modules/utils.inc.php (modified) (12 diffs)
- feedmelinks/script/funcs.js (modified) (1 diff)
- feedmelinks/stats.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/FAQ/index.php
r1302 r1326 154 154 Of course! We're all about sharing. The code is a total mess, so, you know -- be forewarned.<p/> 155 155 156 if you just want to <b> read</b> the source code, you can browse it online at: <a href="/code">Download the source to Feed Me Links at <u>feedmelinks.com/code</u></a>157 <p/> 158 if you want to check-out / download it, you'llneed <a href="http://subversion.tigris.org/">Subversion</a>. From a command-line, type: <p/>156 if you just want to <b>look at</b> the source code, you can browse it online at <a href="/code">Tools to Make Tools</a>. 157 <p/> 158 if you want to download a complete working copy, you need <a href="http://subversion.tigris.org/">Subversion</a>. From a command-line, type: <p/> 159 159 <code> 160 svn co http://toolstomaketools.svnrepository.com/svn/codepot/feedmelinks/ 160 svn export <a href="http://toolstomaketools.svnrepository.com/svn/codepot/feedmelinks/">http://toolstomaketools.svnrepository.com/svn/codepot/feedmelinks/</a> 161 <br /> 162 <br /> 163 User: anonymous<br /> 164 Password: <none> 161 165 </code> 166 <br /> 162 167 163 168 </div> … … 172 177 <p /> 173 178 If you're sure you've found a bug, please check first that it hasn't been reported already by someone else. 174 Duplicate bug reports just slow us down. 175 To see the list of reported bugs, view our <a href="/bugs/">bug list in SourceForge</a>. 179 To see the list of reported bugs/issues, view the <a href="/bugs/">list of open tickets</a>. 176 180 <p /> 177 If you don't see it already reported, please 178 <a href="https://sourceforge.net/tracker/?func=add&group_id=153430&atid=787735">report the bug</a>. 181 If you don't see it already reported, please <a href="javascript:;" onClick="openContactUs( 'Report a bug: ' )">Let us know</a>! 179 182 </div> 180 183 <a href="#top">back to top</a> feedmelinks/admin/snuff.php
r1313 r1326 54 54 </form> 55 55 56 <h2>or <a href="/admin">go back to the admin dashboard</a></h2> 57 56 58 <h1> 57 59 snuffing <%= $user %>: <%= $status %> 58 60 </h1> 59 60 61 61 62 62 <% feedmelinks/admin/todays-users.php
r1198 r1326 15 15 background-color: #dddddd;; 16 16 } 17 .header { 18 font-weight: bold; 19 color: white; 20 background-color: black; 21 padding: 15px; 22 font-size: 180%; 23 } 17 24 </style> 18 25 19 26 <table> 27 <th> 28 <tr> 29 <td class="header"> 30 user 31 </td> 32 <td class="header"> 33 # links 34 <td class="header"> 35 # tags 36 </td> 37 <td class="header"> 38 39 </td> 40 </tr> 41 </th> 42 <tbody> 20 43 <% 21 44 $q = run_query( getQuery( "new_users_today" )); … … 27 50 <tr> 28 51 <td <%= $css %>> 29 <%= getUserLink( $user ) %> 52 <big><?= getUserLink( $user ) ?></big> 53 </td> 54 <td <%= $css %>> 55 links: <?= run_count( getQuery( "links_per_user", $user )) ?>, 56 </td> 57 <td <%= $css %>> 58 tags: <?= get_simple_rs( getQuery( "tags_per_user", $user )) - 3 ?> 30 59 </td> 31 60 <td <%= $css %>> … … 38 67 echo $q; 39 68 %> 40 69 </tbody> 41 70 </table> 42 71 feedmelinks/modules/footer.inc.php
r1313 r1326 4 4 <div style="width: 668px;"> 5 5 <div class="left"> 6 [ <a href="/">Feed Me Links</a> is an <a href="http://toolstomaketools.svnrepository.com/codepot/trac.cgi/browser/feedmelinks">Open Source</a> creation by the <a class="hot" href="http://codeswami.com/">Code Swami</a>. ] 6 Something not working? 7 <a href="javascript:;" onClick="openContactUs( 'Something went wrong: ' )">Let us know!</a> 8 [ <a href="/">Feed Me Links</a> is an 9 <a href="http://toolstomaketools.svnrepository.com/codepot/trac.cgi/browser/feedmelinks">Open Source</a> 10 creation by the <a class="hot" href="http://codeswami.com/">Code Swami</a>. ] 7 11 </div> 8 12 <% feedmelinks/modules/menu.inc.php
r1286 r1326 5 5 6 6 <div class="topNav"> 7 <a class="tn" href=" portal">Feed Me Links</a> : Social Bookmarking since 2002.7 <a class="tn" href="/portal">Feed Me Links</a> : Social Bookmarking since 2002. 8 8 9 9 feedmelinks/modules/utils.inc.php
r1313 r1326 91 91 92 92 function report_spammer( $alleged_spammer, $reporter ) { 93 $reporter = $reporter ? $reporter : "anonymous"; 94 log_mesg_to( get_ip() . ": $reporter reported $alleged_spammer as a spammer", "security" ); 93 95 $body = "$alleged_spammer was reported as a spammer (gasp!). 94 96 http://feedmelinks.com/u/$alleged_spammer … … 109 111 110 112 return "Filed Successfully!"; 111 if( $success )112 log_mesg_to( "user $alleged_spammer reported as a spammer by $reporter", "global" );113 113 } 114 114 … … 162 162 $q = run_query( getQuery( "snuff_user", $user )); 163 163 164 log_mesg_to( "snuffed out user $user", "global" );164 log_mesg_to( get_ip() . ": " . get_user() . " snuffed out user $user", "security" ); 165 165 echo get_snuffed_mesg(); 166 166 ?> … … 339 339 } 340 340 341 function get_simple_rs( $qs ) {342 $con = mysql_connect();343 mysql_selectdb( getDBName() );344 $q = mysql_query( $qs );345 if( ! $q )346 return undefined;347 348 return mysql_result($q,0);349 }350 351 341 function get_fuq_threshold() { return 2; } 352 342 … … 418 408 } 419 409 420 function run_query( $qs ) {410 function get_simple_rs( $qs ) { 421 411 $con = mysql_connect(); 422 412 mysql_selectdb( getDBName() ); 423 413 $q = mysql_query( $qs ); 424 return $q; 414 if( ! $q ) 415 return undefined; 416 return mysql_result($q,0); 417 } 418 419 function run_query( $qs ) { 420 return run_query_driver( $qs, 0 ); 421 } 422 423 function run_insert( $qs ) { 424 return run_query_driver( $qs, 1 ); 425 } 426 427 function run_query_driver( $qs, $return_inserted_ID ) { 428 $con = mysql_connect(); 429 mysql_selectdb( getDBName() ); 430 $q = mysql_query( $qs ); 431 return $return_inserted_ID ? $mysql_insert_id : $q; 425 432 } 426 433 … … 1821 1828 return " 1822 1829 UPDATE linksUsers SET disabled = NULL WHERE userid = '" . urlencode( $args[1]) . "';"; 1823 1830 1824 1831 } else if( $argWhichQuery == "last_login_for_user" ) { 1825 1832 return " 1826 1833 SELECT lastLogin FROM linksUsers WHERE userid = '" . urlencode( $args[1]) . "';"; 1827 1834 1828 1835 } else if( $argWhichQuery == "new_login_for_user" ) { 1829 1836 return " … … 1837 1844 return " 1838 1845 SELECT COUNT(id) FROM linksUsers WHERE bornOn < DATE_FORMAT(DATE_ADD(CURRENT_TIMESTAMP(), INTERVAL 1 DAY),'%Y%m%d000000') AND bornOn >= DATE_FORMAT(CURRENT_TIMESTAMP(),'%Y%m%d000000');"; 1846 1847 } else if( $argWhichQuery == "num_new_users_this_week" ) { 1848 return " 1849 SELECT COUNT(id) FROM linksUsers WHERE bornOn < DATE_FORMAT(DATE_ADD(CURRENT_TIMESTAMP(), INTERVAL 7 DAYS),'%Y%m%d000000') AND bornOn >= DATE_FORMAT(CURRENT_TIMESTAMP(),'%Y%m%d000000');"; 1839 1850 1840 1851 } else if( $argWhichQuery == "find_user" ) { … … 2745 2756 #disabled because it got too noisy: 2746 2757 #fire( "Possible spammer-birth in progress!", "Multiple accounts being requested from the same IP ($ip) -- user: http://feedmelinks.com/u/$argUserId, $argEmail" ); 2747 log_mesg_to( " WARN. potential spammer $argUserId ($argEmail) creating multiple accounts from the same IP", "global" );2758 log_mesg_to( "$ip: potential spammer $argUserId ($argEmail) creating multiple accounts from the same IP", "security" ); 2748 2759 $q = run_query( getQuery( "log_ip", $argUserId, $argEmail, $ip )); 2749 2760 return; … … 2877 2888 2878 2889 # spammers and newbies' links are private 2879 if( get_tag_to_link_ratio( $argSubmitter ) > get_max_ttl_ratio() ) 2890 if( get_tag_to_link_ratio( $argSubmitter ) > get_max_ttl_ratio() ) { 2880 2891 $isPrivate = 1; 2881 log_mesg_to( get_ip(), "security" ); 2892 log_mesg_to( get_ip() . ": privatizing new link from $argSubmitter due to T:L ratio", "security" ); 2893 } 2882 2894 2883 2895 $qs = "INSERT INTO links VALUES(NULL,'" . urlencode( $argUrl ) . "','" . urlencode(escapeQuotes($argName)) . "', NULL, NULL,'" . urlencode( $argSubmitter ) . "', NULL, $isPrivate );"; … … 2903 2915 2904 2916 # spammers and newbies' links are private 2905 if( get_tag_to_link_ratio( $argSubmitter ) > get_max_ttl_ratio() ) 2917 if( get_tag_to_link_ratio( $argSubmitter ) > get_max_ttl_ratio() ) { 2906 2918 $isPrivate = 1; 2919 log_mesg_to( get_ip() . ": privatizing new link from $argSubmitter due to T:L ratio", "security" ); 2920 } 2907 2921 2908 2922 mysql_connect(); … … 2914 2928 $isPrivate = 1; 2915 2929 2916 log_mesg_to( get_ip(), "security" );2917 2930 $qs = "INSERT INTO links VALUES(NULL,'$argUrl','$argName', NULL, NULL,'$argSubmitter', $argFolderId, '$argOptions', $isPrivate );"; 2918 2931 $q = mysql_query( $qs ); … … 3582 3595 3583 3596 function get_report_link( $usr, $id ) { 3597 if( $usr == get_user() ) 3598 return ""; 3599 $is_peep = inList( $usr, "contacts", get_cache() ); 3600 if( $is_peep ) 3601 return ""; 3584 3602 if( ! $usr || ! $id ) 3585 3603 return ""; feedmelinks/script/funcs.js
r1288 r1326 60 60 function openContactUs( argSubj ) { 61 61 var u = "/contact-us" + (argSubj ? "?subject=" + argSubj : ""); 62 window.open( u, "contact_us", "width=500,height=600,resizable=1,status=0" ); 62 contactus=window.open( u, "contact_us", "width=500,height=600,resizable=1,status=0" ); 63 if (window.focus) {contactus.focus()} 63 64 } 64 65 feedmelinks/stats.php
r670 r1326 1 < %1 <?php 2 2 # $Id$ 3 3 include_once( "modules/utils.inc.php" ); … … 8 8 $selectMax = 40; 9 9 $max = 10; 10 %>10 ?> 11 11 12 12 <h3> The Top <%= $max %> Busiest Linkers on FEED ME LINKS:</h3> 13 13 14 14 <div class="reminderBox" style="width: 400px;"> 15 <% 15 <?php 16 17 echo getQuery( "num_new_users_this_week" ); 18 16 19 $qs = "SELECT COUNT(*) AS lc, submitter FROM links GROUP BY submitter ORDER BY lc DESC LIMIT $selectMax;"; 17 20 $q = mysql_query( $qs ); … … 19 22 $numRows = mysql_num_rows($q); 20 23 if( $q && $numRows ) { 21 %>24 ?> 22 25 <ol> 23 26 <%