Changeset 6688
- Timestamp:
- Apr 21, 2008, 9:19:20 PM (13 years ago)
- Location:
- OpenPNE/trunk
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/webapp/lib/util/util.php
r6527 r6688 848 848 } 849 849 850 function util_send_header_internal_server_error() 851 { 852 header('HTTP/1.0 500 Internal Server Error'); 853 exit; 854 } 855 856 function util_output_xml4array($data, $root) 857 { 858 require_once 'XML/Serializer.php'; 859 $option = array( 860 'rootName' => $root, 861 ); 862 $serializer = new XML_Serializer($option); 863 864 $result = $serializer->serialize($data); 865 866 if ($result === true) { 867 $xml = $serializer->getSerializedData(); 868 header('Content-Type: application/xml'); 869 echo $xml; 870 exit; 871 } 872 873 util_send_header_internal_server_error(); 874 } 875 876 function util_get_img_url($filename, $width, $height) 877 { 878 require_once 'smarty_plugins/function.t_img_url.php'; 879 $params = array( 880 'filename' => $filename, 881 'w' => $width, 882 'h' => $height, 883 ); 884 return smarty_function_t_img_url($params, $dummy); 885 } 886 850 887 ?>
Note: See TracChangeset
for help on using the changeset viewer.