PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Submissions

Reply
 
Thread Tools
Old 10-07-2007, 01:30 AM   #1
PL_90
Green Mole
 
Join Date: Oct 2007
Posts: 6
[MOD] Admin Search

With this mod you can search the urls in the admin-area..


1. Open /admin/index.php and find:

Code:
<form action="update_frame.php" method="post">
<select class="phpdigSelect" name="site_ids[]" multiple="multiple" size="10">
<?php
//list of sites in the database
$query = "SELECT site_id,site_url,port,locked FROM ".PHPDIG_DB_PREFIX."sites ORDER BY site_url";
$result_id = mysql_query($query,$id_connect);
while (list($id,$url,$port,$locked) = mysql_fetch_row($result_id))
    {
    if ($port)
        $url .= " (port #$port)";
    if ($locked) {
        $url = '*'.phpdigMsg('locked').'* '.$url;
    }
    print "\t<option value='$id'>$url</option>\n";
    }
?>
</select>


2. ... replace it with this code:

Code:
<form action="" method="get">
Search: <input type="text" size="30" name="like"> <input type="submit" value="GO">
</form>

<form action="update_frame.php" method="post">
<select class="phpdigSelect" name="site_ids[]" multiple="multiple" size="10">

<?
$suche_where = (!empty($_REQUEST['like']) ? "WHERE `site_url` LIKE '%".$_REQUEST['like']."%' " : "ORDER BY `upddate` ASC");
$query = "SELECT * FROM ".PHPDIG_DB_PREFIX."sites ".$suche_where;
$result_id = mysql_query($query,$id_connect);
while ($lista = mysql_fetch_array($result_id))
    {
    if ($lista['port'])
        $url .= " (port #$lista[port])";
    if ($lista['locked']) {
        $url = '*'.phpdigMsg('locked').'* '.$lista['site_url'];
    } else {
        $url = $lista['site_url'];
    }
    print "\t<option value='$lista[site_id]'>$url</option>\n";
    }
?>
</select>

Have fun..
PL_90 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimized Search Mod khoisan Mod Submissions 1 11-10-2006 01:20 AM
Looking for Url submission mod for 1.8.7 Gam-Man Mod Requests 0 06-04-2005 01:52 PM
mod: small improvements for 1.8.7 blueyed Mod Submissions 0 01-27-2005 02:59 AM
mod search mikeduff Mod Requests 4 11-19-2003 08:29 PM
Mod Proxy (Version française) Iltud Mod Submissions 1 09-20-2003 11:53 AM


All times are GMT -8. The time now is 07:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.