| 171 | | $displayTable->recordoffset=0; |
| 172 | | $tempwhere=""; |
| 173 | | $theids=explode(",",$_POST["theids"]); |
| 174 | | foreach($theids as $theid){ |
| 175 | | $tempwhere.=" or ".$displayTable->thetabledef["maintable"].".id=".$theid; |
| 176 | | } |
| 177 | | $tempwhere=substr($tempwhere,3); |
| 178 | | $displayTable->querywhereclause="(".$displayTable->querywhereclause.") and not (".$tempwhere.")"; |
| | 172 | $displayTable->recordoffset = 0; |
| | 173 | $tempwhere = ""; |
| | 174 | $theids = explode(",",$_POST["theids"]); |
| | 175 | |
| | 176 | foreach($theids as $theid) |
| | 177 | $tempwhere.=" OR ".$displayTable->thetabledef["maintable"].".id=".((int) $theid); |
| | 178 | |
| | 179 | $tempwhere = substr($tempwhere,3); |
| | 180 | |
| | 181 | $displayTable->querywhereclause="(".$displayTable->querywhereclause.") AND NOT (".$tempwhere.")"; |
| 184 | | $displayTable->recordoffset=0; |
| 185 | | $tempwhere=""; |
| 186 | | $theids=explode(",",$_POST["theids"]); |
| 187 | | foreach($theids as $theid){ |
| 188 | | $tempwhere.=" or ".$displayTable->thetabledef["maintable"].".id=".$theid; |
| 189 | | } |
| | 187 | $displayTable->recordoffset = 0; |
| | 188 | $tempwhere = ""; |
| | 189 | $theids = explode(",",$_POST["theids"]); |
| | 190 | |
| | 191 | foreach($theids as $theid) |
| | 192 | $tempwhere.=" or ".$displayTable->thetabledef["maintable"].".id=".((int) $theid); |
| | 193 | |
| | 209 | |
| | 210 | case "run search": |
| | 211 | /** |
| | 212 | * Run a loaded search |
| | 213 | */ |
| | 214 | |
| | 215 | if(!hasRights($displayTable->thetabledef["advsearchroleid"])){ |
| | 216 | /** |
| | 217 | * Need to load search from id, because the |
| | 218 | * person does not have rights to override loaded |
| | 219 | * searches |
| | 220 | */ |
| | 221 | |
| | 222 | $querystatement=" |
| | 223 | SELECT |
| | 224 | sqlclause |
| | 225 | FROM |
| | 226 | usersearches |
| | 227 | WHERE id=".((int) $_POST["LSList"]); |
| | 228 | |
| | 229 | $queryresult = $db->query($querystatement); |
| | 230 | |
| | 231 | $therecord = $db->fetchArray($queryresult); |
| | 232 | |
| | 233 | $_POST["LSSQL"] = $therecord["sqlclause"]; |
| | 234 | |
| | 235 | }//endif |
| | 236 | |
| | 237 | $displayTable->recordoffset=0; |
| | 238 | $displayTable->querywhereclause=stripslashes($_POST["LSSQL"]); |
| | 239 | $displayTable->querytype="advanced search"; |
| | 240 | break; |
| | 241 | break; |