static function get_option($rep="SS_ADMIN_TO_USERFILE/userfiles/image/bandeau", $selectval) { $rep = str_replace('SS_ADMIN_TO_USERFILE', SS_ADMIN_TO_USERFILE, $rep); $res = CFunction::list_doc($rep); $html = ''; foreach($res as $tabimg) { $html .= "<option " . CFormImg::get_selected($tabimg, $selectval) . " >" . $tabimg . "</option>"; } return $html; }
static function get_option($rep="SS_ADMIN_TO_USERFILE/userfiles/template", $selectval) { $rep = str_replace('SS_ADMIN_TO_USERFILE', SS_ADMIN_TO_USERFILE, $rep); $res = CFunction::list_doc($rep); $html = ''; foreach($res as $tabimg) { if(in_array(CFile::get_extension($tabimg), array('png', 'gif', 'jpg'))) { $html .= "<option " . CFormImg::get_selected($tabimg, $selectval) . " >" . $tabimg . "</option>"; } } return $html; }