0) $all_tools_list[] = $toolsRow; } else $all_tools_list[] = $toolsRow; } } if(isset($all_tools_list)) { $lnk = ''; foreach($all_tools_list as $toolsRow) { if(!($i%2)) {echo "
';
$link['cmd'] = "hide=yes";
$lnk[] = $link;
}
if($toolsRow['visibility'] == '0' && $toolsRow['admin'] !='1')
{
$link['name'] = '
';
$link['cmd'] = "restore=yes";
$lnk[] = $link;
}
if(!empty($toolsRow['adminlink']))
{
echo '
';
}
}
// Both checks are necessary as is_platform_admin doesn't take student view into account
if( $is_platform_admin && $is_allowed_to_edit)
{
if($toolsRow['admin'] !='1')
{
$link['cmd'] = "hide=yes";
}
}
if(isset($lnk) && is_array($lnk))
{
foreach($lnk as $this_link)
{
if(empty($toolsRow['adminlink']))
{
echo "" . $this_link['name'] . "";
}
}
}
else{ echo ' ';}
// NOTE : table contains only the image file name, not full path
if(!stristr($toolsRow['link'], 'http://') && !stristr($toolsRow['link'], 'https://') && !stristr($toolsRow['link'],'ftp://'))
$toolsRow['link'] = $web_code_path . $toolsRow['link'];
if($toolsRow['visibility'] == '0' && $toolsRow['admin'] != '1')
{
$class="class=\"invisible\"";
$info = pathinfo($toolsRow['image']);
$basename = basename ($toolsRow['image'],'.'.$info['extension']); // $file is set to "index"
$toolsRow['image'] = $basename.'_na.'.$info['extension'];
}
else
$class='';
$qm_or_amp = ((strpos($toolsRow['link'], '?') === FALSE) ? '?' : '&');
//If it's a link, we don't add the cidReq
if($toolsRow['image'] == 'file_html.gif' || $toolsRow['image'] == 'file_html_na.gif'){
$toolsRow['link'] = $toolsRow['link'].$qm_or_amp;
}
else{
$toolsRow['link'] = $toolsRow['link'].$qm_or_amp.api_get_cidreq();
}
if(strpos($toolsRow['name'],'visio_')!==false){
echo "\t" . '   ';
}
else {
echo "\t" . '   ';
}
echo '