/**
  * Show media manager
  * @param string The image directory to display
  */
 function showMedia($listdir)
 {
     // get list of directories
     $imgFiles = recursive_listdir(COM_MEDIA_BASE, 'admin_template');
     $images = array();
     $folders = array();
     $folders[] = html_makeOption("/");
     $len = strlen(COM_MEDIA_BASE);
     foreach ($imgFiles as $file) {
         $folders[] = html_makeOption(substr($file, $len));
     }
     if (is_array($folders)) {
         sort($folders);
     }
     // create folder selectlist
     $dirPath = html_selectList($folders, 'dirPath', "class=\"inputbox\" size=\"1\" onchange=\"goUpDir()\" ", 'value', 'text', $listdir);
     $this->load->view('admin_template/' . $this->media_template, array('dirpath' => $dirPath, 'listdir' => $listdir));
 }
/**
 * Writes a yes/no select list
 * @param string The value of the HTML name attribute
 * @param string Additional HTML attributes for the <select> tag
 * @param mixed The key that is selected
 * @returns string HTML for the select list values
 */
function html_yesnoSelectList($tag_name, $tag_attribs, $selected, $yes = _CMN_YES, $no = _CMN_NO)
{
    $arr = array(html_makeOption('0', $no), html_makeOption('1', $yes));
    return html_selectList($arr, $tag_name, $tag_attribs, 'value', 'text', $selected);
}