for ($i = 1; $i < 72; $i++) {
    $opts[$i] = $i;
}
$smarty->assign('input_textsize', $this->CreateInputDropdown($id, 'watermark_textsize', $opts, -1, $this->GetPreference('watermark_textsize', 12)));
$smarty->assign('input_textangle', $this->CreateInputText($id, 'watermark_angle', $this->GetPreference('watermark_textangle', '0'), 3, 3));
// font list
$list = array();
$dir1 = dirname(__FILE__) . '/fonts';
$list1 = cge_dir::file_list_regexp($dir1, '[Tt][Tt][Ff]$');
foreach ($list1 as $one) {
    $list[$one] = $dir1 . '/' . $one;
}
// todo, make this configurable
$config = cms_config::get_instance();
$dir2 = $config['uploads_path'];
$list2 = cge_dir::file_list_regexp($dir2, '[Tt][Tt][Ff]$');
if (!empty($list2)) {
    foreach ($list2 as $one) {
        $list[$one] = $dir2 . '/' . $one;
    }
}
$smarty->assign('input_font', $this->CreateInputDropdown($id, 'watermark_font', $list, -1, $this->GetPreference('watermark_font')));
$smarty->assign('input_textcolor', $this->CreateColorDropdown($id, 'watermark_textcolor', $this->GetPreference('watermark_textcolor', '#00FFFF')));
$smarty->assign('input_bgcolor', $this->CreateColorDropdown($id, 'watermark_bgcolor', $this->GetPreference('watermark_bgcolor', '#FFFFFF')));
$smarty->assign('input_transparent', $this->CreateInputYesNoDropdown($id, 'watermark_transparent', $this->GetPreference('watermark_transparent', 1)));
$smarty->assign('input_image', $this->CreateFileDropdown($id, 'watermark_file', $this->GetPreference('watermark_file'), '', 'jpg,jpeg,png,gif', '1'));
$nums = array();
for ($i = 100; $i > 0; $i--) {
    $nums[$i] = $i;
}
$smarty->assign('input_translucency', $this->CreateInputDropdown($id, 'watermark_translucency', $nums, -1, $this->GetPreference('watermark_translucency', 100)));