[WCDDL] Search by Host

Status
Not open for further replies.

jomasaco

Active Member
192
2008
21
0
2564dit.png

This is an add on to module by t3od0r

First get the new version of search form
http://warezcoders.com/forum/viewtopic.php?f=15&t=803&start=0

Now editions on funcs.php
FIND
public $type, $typeSQL, $typeURL;
After ADD
Code:
public $shost, $shostSQL, $shostURL;
FIND
$this->typeSQL = mysql_real_escape_string($this->type);
$this->typeURL = $this->processURL($this->type);
}
AFTER ADD
Code:
if(isset($_REQUEST['q']) && $_REQUEST['shost'] != "Any Host") {
            $this->shost = $_REQUEST['shost'];
            $this->shostSQL = mysql_real_escape_string($this->shost);
            $this->shostURL = $this->processURL($this->shost);
        }
FIND
$sqlWhere .= " AND type = '".$this->typeSQL."'";
} else {
$sqlWhere = " WHERE type = '".$this->typeSQL."'";
}
}
AFTER ADD
Code:
if(isset($this->q) && isset($this->shost)) {
            if(!empty($sqlWhere)) {
            $sqlWhere .= " AND hosts like '%".$this->shostSQL."%'";
            }
        }
P.S
Still missing the edition to pagination work properly, you can handle whit..
I don't provide any help on hosts mod, to that contact the author
 
3 comments
You'd be surprised, i've seen a couple of sites with such a feature way before katz.
They just weren't popular enough to popularise it.
 
Status
Not open for further replies.
Back
Top