Activity Stream
48,167 MEMBERS
6677 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1.     
    #1
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com

    Default WCDDL V1 (Site Editor MOD)

    Heya, i just coded this for some dood as a favour and thought it would be rude not to share so here it is

    Just add all this code bofore the ?> at the end of the funcs.php file
    PHP Code: 
    function admin_edit_sites(){
        global 
    $pg,$limit,$page,$go,$q,$id;
        
    $mode $_GET['mode'];
        switch(
    $mode){
            case 
    '':
            default:
                
    //For Showing all sites
                
    $query "SELECT * FROM wcddl_sites LIMIT ".$pg.",".$limit;
                
    $query mysql_query($query);
                
    $fetched mysql_num_rows($query); // pagination
                
    $out '<table width="100%">';
                
    $out .= "<tr><td>Sitename</td><td>Email</td><td>Rating</td></tr>";
                while(
    $row mysql_fetch_assoc($query)){
                    
    $out .= "<tr>
                        <td>
    <a href=\"?go="
    .$go."&amp;mode=edit&amp;id=".(int)$row['id']."\">".$row['name']."</a></td>
                        <td><a href=\"mailto:"
    .$row['email']."\">".$row['email']."</a></td>
                        </tr>"
    ;
                }
                
    $out .= "</table>";
                
    //Just some fast pagination for you :D
                
    $out .= '<div>';
                if(
    $page 1){$out .= '<a href="?go='.$go.'&amp;page='.($page-1).'">&laquo; Prev</a> ';}
                
    $out .= '<strong>('.$page.')</strong>'// current page
                
    if($fetched >= $limit){    $out .= '<a href="?go='.$go.'&amp;page='.($page+1).'">Next &raquo;</a> ';}
                
    $out .= '</div>';
                echo 
    $out;
            break;
            case 
    'edit':
                
    //Edit Mode
                
    if(isset($id)){
                    
    $query "SELECT * FROM wcddl_sites WHERE id = ".mysql_real_escape_string($id);
                    
    $site_data mysql_fetch_assoc(mysql_query($query)); // single row
                    
    if($site_data !== false){ // Make sure we have download
                        
    $template '<table width="100%">';
                        
    $template .= '<form method="post" action="?go='.$go.'&amp;mode=save&amp;id='.$id.'">';
                            
    //Indepth form items
                            
    $template .= '<input type="hidden" name="update" value="true" />';
                            
    $template .= "<tr><td>Site name</td><td><input type=\"text\" name=\"name\" 
                            value=\""
    .$site_data['name']."\" /></td></tr>";
                            
    $template .= "<tr><td>Site url</td><td><input type=\"text\" name=\"url\" 
                            value=\""
    .$site_data['url']."\" /></td></tr>";
                            
    $template .= "<tr><td>Site email</td><td><input type=\"text\" name=\"email\" 
                            value=\""
    .$site_data['email']."\" /></td></tr>";
                            
    $template .= '<tr><td colspan="2"><input type="submit" value="Update" /></td></tr>';
                        
    $template .= "</form>";
                        
    $template .= "</table>";
                        echo 
    $template;
                    }else{
                        echo 
    "Hmmmm, Download (".$id.") does not exists!";
                    }
                }else{
                    echo 
    "Unable to get id from url!";
                }
            break;
            case 
    'save':
                if(
    $id && isset($_POST)){
                    
    $query "UPDATE wcddl_sites SET name = '%s', url = '%s', email = '%s', WHERE id = %d";
                    
    $query sprintf($query,mysql_real_escape_string($_POST['name']),mysql_real_escape_string($_POST['url'])
                    ,
    mysql_real_escape_string($_POST['email']),(int)$id);
                    
    $check = @mysql_query($query);
                    if(
    $check === false){
                        echo 
    'For some reason we was unable to update the database! no changes were made';
                    }else{
                        echo 
    '('.$_POST["name"].') Updated!, <a href="?go='.$go.'">Go back to editor!</a>';
                    }
                }else{
                    echo 
    'There was an error, please make sure you came here for the edit form';
                }
            break;
        }
        echo 
    '<div style="clear:both;font-waight:bold;text-align:center">Site editor by Litewarez</div>';

    Then open your admin/index.php and find your navigation block and add the link

    Code: 
    <a href="index.php?go=edit_sites">Edit Sites</a> |
    Meh.. enjoy
    litewarez Reviewed by litewarez on . WCDDL V1 (Site Editor MOD) Heya, i just coded this for some dood as a favour and thought it would be rude not to share so here it is Just add all this code bofore the ?> at the end of the funcs.php file function admin_edit_sites(){ global $pg,$limit,$page,$go,$q,$id; $mode = $_GET; switch($mode){ case '': default: Rating: 5
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #2
    Member
    Top Work Litewarez (Y)

    Thanks for doing this for me
    It's amazing, being in a community can cause hate. Competitors or not - DDOS isn't cool :)

  4.     
    #3
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    No problem dood
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  5.     
    #4
    Banned
    Website's:
    nodesales.com quickrls.com directdownloadlinks.net
    Nice modification!

  6.     
    #5
    Member
    Website's:
    zomgbbqpizza.com evilddl.com scenemarket.org
    So people are still using wcddl v1 over v2?? Why?

  7.     
    #6
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Dunno, just was the sys he was running, no point in letting it go waste and some people are established with v1 and too much trouble to upgrade!
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  8.     
    #7
    Too busy :|
    Website's:
    L337Fx.com BeastieBay.net
    Yea ! WCDDL rocks
    Nice Modification corneto

  9.     
    #8
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    thanks, this is the forst time ive touched Wcddl for a looooooooooooooooooooong time lmao
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  10.     
    #9
    Member
    Website's:
    zomgbbqpizza.com evilddl.com scenemarket.org
    Quote Originally Posted by litewarez View Post
    Dunno, just was the sys he was running, no point in letting it go waste and some people are established with v1 and too much trouble to upgrade!
    Ok, was just curious, i am thinking of starting a wcddl site myself to compare results with my ddl cms site.

  11.     
    #10
    Member
    Well some people say they find it easier to use v1 than 2.
    They got accustomed to v1's coding or wateva and say its easier to make themes for etc.
    This is the staff, you have been banned

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Any php editor(text editor) with internal preview
    By torrfriend in forum Webmaster Discussion
    Replies: 5
    Last Post: 18th May 2012, 11:17 PM
  2. HELP: Best html/css/php editor? (code editor)
    By tractor3231 in forum Webmaster Discussion
    Replies: 30
    Last Post: 5th Jan 2012, 10:55 AM
  3. [Buying] Wcddl site
    By systems in forum Completed Transactions
    Replies: 2
    Last Post: 24th Dec 2011, 05:14 AM
  4. Help for wcddl site
    By lawina in forum Technical Help Desk Support
    Replies: 7
    Last Post: 20th Jul 2011, 03:08 PM
  5. Flash Site Editor
    By vBcustomz in forum Webmasters, Money Making
    Replies: 1
    Last Post: 26th Aug 2009, 12:34 PM

Tags for this Thread

BE SOCIAL