var proftxt = new Object();
prof_ids = new Array();
profnames = new Array();
prjinprof = new Array();


<?php 
    $ilast = $i = 0;
    $lastprof = NULL;
    $j = 0;
    if ($prjs) {
        foreach ($prjs as $ikey => $prj) {
            $d_shop = $DB->row('SELECT * FROM shop WHERE portfolio_id=?i', $prj['id']);
            if ($d_shop) {
                $d_shop = shop::GetItem($d_shop['id'], get_uid(), hasPermissions('shop'));
                $prj['shop_category'] = $d_shop['category'];
                $prj['shop_cost_type'] = $d_shop['currency'];
                $prj['shop_cost'] = $d_shop['prise'];
                $prj['shop_tags'] = $d_shop['tags'];
                //$prj['shop_info'] = $d_shop['addit'];
                if ($prj['in_shop'] == 't') {
                    $prj['in_shop'] = 1;
                } else {
                    $prj['in_shop'] = 0;
                }
            } else {
                $prj['in_shop'] = 0;
                $prj['shop_category'] = '';
                $prj['shop_cost_type'] = '';
                $prj['shop_cost'] = '';