|
@@ 208-216 (lines=9) @@
|
| 205 |
|
|
| 206 |
|
// get findername from finderid |
| 207 |
|
$options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0; // Ocprop |
| 208 |
|
if (isset($options['finder']) && $options['finderid'] > 0) { |
| 209 |
|
$rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['finderid']); |
| 210 |
|
if (sql_num_rows($rs_name) == 1) { |
| 211 |
|
$record_name = sql_fetch_array($rs_name); |
| 212 |
|
$options['finder'] = $record_name['username']; |
| 213 |
|
} |
| 214 |
|
unset($record_name); |
| 215 |
|
sql_free_result($rs_name); |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
// get ownername from ownerid |
| 219 |
|
$options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop |
|
@@ 220-228 (lines=9) @@
|
| 217 |
|
|
| 218 |
|
// get ownername from ownerid |
| 219 |
|
$options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop |
| 220 |
|
if (isset($options['owner']) && $options['ownerid'] > 0) { |
| 221 |
|
$rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['ownerid']); |
| 222 |
|
if (sql_num_rows($rs_name) == 1) { |
| 223 |
|
$record_name = sql_fetch_array($rs_name); |
| 224 |
|
$options['owner'] = $record_name['username']; |
| 225 |
|
} |
| 226 |
|
unset($record_name); |
| 227 |
|
sql_free_result($rs_name); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
// map obsolete search types |
| 231 |
|
if ($options['searchtype'] == 'bydistance') { |
|
@@ 328-337 (lines=10) @@
|
| 325 |
|
$options['ownerid'] = isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0; |
| 326 |
|
$options['owner'] = isset($_REQUEST['owner']) ? stripslashes($_REQUEST['owner']) : ''; |
| 327 |
|
|
| 328 |
|
if (isset($options['owner'])) { |
| 329 |
|
$rs_name = sql("SELECT `user_id` FROM `user` WHERE `username`='&1'", $options['owner']); |
| 330 |
|
if (sql_num_rows($rs_name) == 1) { |
| 331 |
|
$record_id = sql_fetch_array($rs_name); |
| 332 |
|
$options['ownerid'] = $record_id['user_id']; |
| 333 |
|
$user = new user($options['ownerid']); |
| 334 |
|
} |
| 335 |
|
unset($record_id); |
| 336 |
|
sql_free_result($rs_name); |
| 337 |
|
} |
| 338 |
|
} elseif (isset($_REQUEST['searchbyfinder'])) { // Ocprop |
| 339 |
|
$options['searchtype'] = 'byfinder'; |
| 340 |
|
|
|
@@ 345-354 (lines=10) @@
|
| 342 |
|
$options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : ''; |
| 343 |
|
$options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop |
| 344 |
|
|
| 345 |
|
if (isset($options['finder'])) { |
| 346 |
|
$rs_name = sql("SELECT `user_id` FROM `user` WHERE `username`='&1'", $options['finder']); |
| 347 |
|
if (sql_num_rows($rs_name) == 1) { |
| 348 |
|
$record_id = sql_fetch_array($rs_name); |
| 349 |
|
$options['finderid'] = $record_id['user_id']; |
| 350 |
|
$user = new user($options['finderid']); |
| 351 |
|
} |
| 352 |
|
unset($record_id); |
| 353 |
|
sql_free_result($rs_name); |
| 354 |
|
} |
| 355 |
|
} elseif ((isset($_REQUEST['searchbyortplz']) && is_numeric($_REQUEST['ortplz'])) |
| 356 |
|
|| isset($_REQUEST['searchbyplz'])) { |
| 357 |
|
$options['searchtype'] = 'byplz'; |