Changeset 1348

Show
Ignore:
Timestamp:
02/27/07 19:09:00 (2 years ago)
Author:
jm3
Message:

bulk splinker snuffing by email or URL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/admin/bulk-snuff.php

    r1332 r1348  
    44        include( "$modules/header.inc.php" );  
    55?> 
     6 
     7        <script language="javascript" type="text/javascript" src="/script/bulk-management.js"></script> 
     8        <script language="javascript" type="text/javascript"> 
     9                var numLinks = 1; 
     10        </script> 
     11         
    612 
    713        <title> bulk user-snuffing page </title> 
     
    2632<h3>Snuff users with...</h3> 
    2733<br /> 
     34 
    2835 
    2936<form> 
     
    7784        echo "by (field) : $by"; 
    7885        $qs = $custom ?  getQuery( "user_by_link_criteria", $by, $value ) : getQuery( "user_by_user_criteria", $by, $value ); 
    79         echo "<h1>$qs</h1>"; 
     86        echo "<code class='subtle'>$qs</code>"; 
    8087        echo get_snuffable_list( $qs ); 
    81 ?> 
    82 <hr/> 
    83 <h1> 
    84 users 
    85 :</h1> 
    86 <big> 
    87         <form name="confirm_bulk_snuff_user_form" method="POST"> 
    88                 <input type="hidden" name="confirm" value="true" /> 
    89                 <input type="submit" value="ALL OF 'EM!" /> 
    90         </form> 
    91 </big> 
    92 <hr/> 
     88        exit; 
     89
    9390 
    94 <form> 
    95         <input type="submit" value="Start over." /> 
    96 </form> 
     91if( $confirm ) { 
     92        foreach( $_POST as $paramName => $paramValue ) { 
     93                if( $paramValue == "on" && substr( $paramName, 0, 11 ) == "snuff_user_" ) { 
     94                        $snuffee = preg_replace( "/snuff_user_/", "", $paramName ); 
     95                        echo "$snuffee, <br/>"; 
     96                        if( is_privileged_importer( $snuffee ) || isSuperUser( $snuffee )) 
     97                                warn( "You can't snuff superusers, silly. delete them in the DB" ); 
     98                 else 
     99                        snuff_user( $snuffee ); 
     100                } 
     101        } 
     102        echo "<h1>Done! Thank you!</h1>"; 
     103}  
    97104 
    98 <?php 
    99                 exit; 
    100         } 
    101          
    102         if( $confirm ) { 
    103         echo "<h1> actual snuff needs to be re-implemented as SQL based</h1>"; 
    104                 #foreach ($lines as $line_num => $user) { 
    105                         #$user = chop( $user ); 
    106                         #if( is_privileged_importer( $user ) || isSuperUser( $user )) 
    107                                 #warn( "You can't snuff superusers, silly. delete them in the DB" ); 
    108                  #else 
    109                         #snuff_user( $user ); 
    110                 #}  
    111         }  
    112105?> 
    113106 
    114  
    115107<a href="http://www.feedmelinks.com/admin/FUQ/">FUQers</a> 
  • feedmelinks/contacts/index.php

    r686 r1348  
    1313        if( $tok && $tok == md5( getPasswdForUser( $u ))) { 
    1414                include_once( "$modules/menu.inc.php" ); 
    15                 if( $who == $u ) 
     15                if( $who == $u ) { 
     16                        show_peeps_feed( $u ); 
    1617                        $users = get_contacts( $who ); 
    17                 else 
     18                } else 
    1819                        $users = get_someone_elses_contacts( $who ); 
    1920%> 
  • feedmelinks/folder.php

    r1340 r1348  
    220220                        if( $owned && !$condensed ) { ?> 
    221221 
     222<script language="javascript" type="text/javascript"> 
     223        var numLinks = <?= $numRows ?>; // populated from server-side code 
     224</script> 
    222225<script language="javascript" type="text/javascript" src="/script/bulk-management.js"></script> 
    223226<form method="post" action="/action" name="folderForm"> 
  • feedmelinks/modules/menu.inc.php

    r1331 r1348  
    1313<a class="tn" href="/index">My Links</a> 
    1414<a class="tn" href="/u/<%= $u %>/tags">My Tags</a> 
    15 <a class="tn" href="/contacts/index">My Peeps</a> 
     15<a class="tn" href="/peeps">My Peeps</a> 
    1616<a class="tn" href="/account">My Profile</a> 
    1717 
  • feedmelinks/modules/utils.inc.php

    r1342 r1348  
    66include_once( "env.inc.php" ); 
    77include( get_root() . "/modules/prep-cache.inc.php" ); 
     8 
     9function show_peeps_feed( $user ) { 
     10?> 
     11                <p/> 
     12                <center> 
     13                        <b> 
     14                                New!  
     15                                Subscribe to just your peeps' links: <a href='<?= getSiteUrl() .  get_peeps_feed_url( $user ) ?>'> 
     16                                <img src='/img/rss-sq.png' border='0' />  Feed of my peeps' links </a> 
     17                        </b> 
     18                </center> 
     19                <link rel="alternate" type="application/rss+xml" title="Your Peeps' Recent Links" href="<?= getSiteUrl() . get_peeps_feed_url( $user ) ?>"> 
     20<?php 
     21} 
    822 
    923        function get_splink_value( $user ) { 
     
    5165        </style> 
    5266 
    53  
    54 <form method="post"> 
     67<form method="post" name="snuffables"> 
     68 
     69<div style="text-align: right;"> 
     70        <label> 
     71                Select all: 
     72                <input type="checkbox" name="selectAll" onChange="selectAllLinks(document.forms.snuffables);"/> 
     73        </label> 
     74</div> 
     75 
     76 
    5577<table> 
    5678        <th> 
     
    108130</table> 
    109131<p/> 
    110 <input type="submit" value="Moderate Splinkers"/> 
     132<hr/> 
     133<center> 
     134        <h1>Unleash the hose: <a href="javascript:document.forms.snuffables.submit();"><img src="/img/hose" align="top" /></a> 
     135        Spray 'em!</h1> 
     136        <input type="hidden" name="confirm" value="true" /> 
     137</center> 
    111138</form> 
     139 
     140 
    112141<?php 
    113142                return ob_get_clean(); 
  • feedmelinks/users.php

    r1328 r1348  
    156156<div style="float: right;"> 
    157157<?php 
    158         if( $who == $u ) { 
    159 ?> 
    160                 <p/> 
    161                 <center> 
    162                         <b> 
    163                                 New!  
    164                                 Subscribe to just your peeps' links: <a href='<?= getSiteUrl() .  get_peeps_feed_url( $u ) ?>'> 
    165                                 <img src='/img/xml' border='0' />  Feed of my peeps' links </a> 
    166                         </b> 
    167                 </center> 
    168                 <link rel="alternate" type="application/rss+xml" title="Your Peeps' Recent Links" href="<?= getSiteUrl() . get_peeps_feed_url( $u ) ?>"> 
    169         <?php 
    170         } 
     158        if( $who == $u ) 
     159                show_peeps_feed( $u ); 
    171160?> 
    172161<%= get_contactlist_grid( $users, get_ownoun() . " peeps", $who )  %>