输出 submit 提交表单图片按钮

输出 submit 提交表单图片按钮函数 zen_image_submit($image, $alt = ‘’, $parameters = ‘’, $sec_class = ‘’)
该函数的功能主要就是输出一个提交表单的图片按钮,跟一般的输出图片按钮差不多一样,不一样的是这个函数输出的是类型的按钮,而一般的图片按钮zen_image_button输出的是图片的链接。
参数解析:
$image:输出图片的名字,默认的目录是在模板目录下的buttons/目录下面的图片名字,输入对应的图片名字就可以了
$alt:图片标签的alt属性值。
$parameters:顾名思义就知道了这个是参数的意思,可以是其他属性的值,一般这个很少使用,默认为空
$sec_class:该图片按钮的CSS类,默认为空,只有使用CSS按钮的使用该参数才会用到
函数的原型代码如下: function zen_image_submit($image, $alt = '', $parameters = '', $sec_class = '') { global $template, $current_page_base, $zco_notifier; if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes' && strlen($alt)<30) return zenCssButton($image, $alt, 'submit', $sec_class /*, $parameters = ''*/ ); $zco_notifier->notify('PAGE_OUTPUT_IMAGE_SUBMIT'); $image_submit = '<input type="image" src="' . zen_output_string($template->get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . $image) . '" alt="' . zen_output_string($alt) . '"'; if (zen_not_null($alt)) $image_submit .= ' title=" ' . zen_output_string($alt) . ' "'; if (zen_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= ' />'; return $image_submit; }