Location: PHPKode > projects > QuickTicket > quickticket/qti_ext_statusico.php
<?php

// QuickTicket 2.5 build:20101222

session_start();
require_once('bin/qti_init.php');
include(Translate('qti_adm.php'));

if ( $oVIP->role!='A' ) die(Error(13));

// INITIALISE

$oVIP->selfurl = 'qti_ext_statusico.php';
$oVIP->exiturl = 'qti_adm_statuses.php';
$oVIP->selfname = 'Icons';
$oVIP->exitname = $L['Statuses'];

$arrFiles=array();
$arrStatuses=array();

// --------
// HTML START
// --------

include('qti_adm_p_header.php');

// Browse image file

$intHandle = opendir($_SESSION[QT]['skin_dir']);

$i=0;
while (false !== ($file = readdir($intHandle)))
{
  $file=strtolower($file);
  if ( $file!='.' && $file!='..' ) {
    if ( substr($file,0,6)=='status' )
    {
    $arrStatuses[] = $file;
    }
    else
    {
    if ( substr($file,0,3)!='bg_' && substr($file,0,10)!='background' ) $arrFiles[] = $file;
    }
    $i++;
  }
}
closedir($intHandle);
sort($arrStatuses);
sort($arrFiles);

echo $_SESSION[QT]['skin_dir'],', ',$i,' files<br /><br />';

echo '
<table cellspacing="0" class="hidden">
<tr>
<td style="width:250px;vertical-align:top">
';

echo '<table cellspacing="0" class="hidden" style="background-color:#ffffff">
<groupcol><col></col><col style="width:120px"></col></groupcol>
<tr><td style="padding-left:4px"><b>Icon</b></td><td><b>File</b></td></tr>',N;
foreach($arrStatuses as $key=>$val)
{
  if (strtolower(substr($val,-4,4))=='.gif')
  {
  echo '<tr><td style="padding-left:4px"><img src="',$_SESSION[QT]['skin_dir'],'/',$val,'" /></td><td class="td_icon">',$val,'</td></tr>',N;
  }
}
echo '</table>
';
echo '
</td>
<td style="width:20px;">
<td style="width:250px;vertical-align:top">
';
echo '<table cellspacing="0" class="hidden" style="background-color:#ffffff">
<groupcol><col></col><col style="width:120px"></col></groupcol>
<tr><td style="padding-left:4px"><b>Icon</b></td><td><b>File</b></td></tr>',N;
foreach($arrFiles as $key=>$val)
{
  if (strtolower(substr($val,-4,4))=='.gif')
  {
  echo '<tr><td style="padding-left:4px"><img src="',$_SESSION[QT]['skin_dir'],'/',$val,'" /></td><td class="td_icon">',$val,'</td></tr>',N;
  }
}
echo '</table>
';
echo '
</td>
<td>&nbsp;</td>
</tr>
</table>
';

// HTML END

include('qti_adm_p_footer.php');

?>
Return current item: QuickTicket