| @@ 367-383 (lines=17) @@ | ||
| 364 | * @param $locdestid |
|
| 365 | * @return int |
|
| 366 | */ |
|
| 367 | function GetLevelid($locdestid) |
|
| 368 | { |
|
| 369 | global $xoopsDB; |
|
| 370 | $block = array(); |
|
| 371 | $myts = MyTextSanitizer::getInstance(); |
|
| 372 | $result2 = $xoopsDB->query('SELECT locid, levelid FROM ' . $xoopsDB->prefix('dst_loc') . ' WHERE locid = ' . $locdestid . ''); |
|
| 373 | $num_results2 = $GLOBALS['xoopsDB']->getRowsNum($result2); |
|
| 374 | if (!$result2) { |
|
| 375 | return 0; |
|
| 376 | } |
|
| 377 | for ($i = 0; $i < $num_results2; ++$i) { |
|
| 378 | $row2 = $GLOBALS['xoopsDB']->fetchBoth($result2); |
|
| 379 | $levelid = $row2['levelid']; |
|
| 380 | } |
|
| 381 | ||
| 382 | return $levelid; |
|
| 383 | } |
|
| 384 | ||
| 385 | /** |
|
| 386 | * @param $locdestid |
|
| @@ 389-405 (lines=17) @@ | ||
| 386 | * @param $locdestid |
|
| 387 | * @return int |
|
| 388 | */ |
|
| 389 | function GetLocName($locdestid) |
|
| 390 | { |
|
| 391 | global $xoopsDB; |
|
| 392 | $block = array(); |
|
| 393 | $myts = MyTextSanitizer::getInstance(); |
|
| 394 | $result = $xoopsDB->query('SELECT locid, name FROM ' . $xoopsDB->prefix('dst_loc') . ' WHERE locid = ' . $locdestid . ''); |
|
| 395 | $num_results = $GLOBALS['xoopsDB']->getRowsNum($result); |
|
| 396 | if (!$result) { |
|
| 397 | return 0; |
|
| 398 | } |
|
| 399 | for ($i = 0; $i < $num_results; ++$i) { |
|
| 400 | $row = $GLOBALS['xoopsDB']->fetchBoth($result); |
|
| 401 | $locname = $myts->htmlSpecialChars($row['name']); |
|
| 402 | } |
|
| 403 | ||
| 404 | return $locname; |
|
| 405 | } |
|
| 406 | ||
| 407 | include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 408 | ||