Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function xarpages_funcapi_jobstesting($args)
- {
- $arts = xarModAPIFunc('articles','user','getall',array('ptid' => 14, 'fields' => array('aid','cids','summary'),'sort' => 'summary', 'status' => array(2,3)));
- $locations = xarmodapifunc('dynamicdata','user','getitems',array('module' => 182, 'itemtype' => 3));
- $artsdd = xarmodapifunc('dynamicdata','user','getitems',array('module' => 151, 'itemtype' => 14));
- foreach ($arts as $a => $art) {
- foreach ($artsdd as $d => $artdd) {
- if ($d == $art['aid']) {
- $newarts[] = $artdd + $art;
- }
- }
- }
- foreach ($newarts as $n => $newart) {
- if (!empty($newart['location'])) {
- foreach ($locations as $l => $location) {
- if ($newart['location'] == $l) {
- $finalarts[$n] = $newart + $location;
- }
- }
- } else {
- $finalarts[$n] = $newart;
- }
- }
- $args['custom']['arts'] = $finalarts;
- //$args['custom']['locations'] = $locations;
- //$args['custom']['artsdd'] = $artsdd;
- return $args;
- //print_r($hmm);die;
- }
- ?>
Add Comment
Please, Sign In to add comment