ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 6688


Ignore:
Timestamp:
Apr 21, 2008, 9:19:20 PM (12 years ago)
Author:
ebihara
Message:

#2271:アルバム小窓を追加

Location:
OpenPNE/trunk
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/util/util.php

    r6527 r6688  
    848848}
    849849
     850function util_send_header_internal_server_error()
     851{
     852    header('HTTP/1.0 500 Internal Server Error');
     853    exit;
     854}
     855
     856function 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
     876function 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
    850887?>
Note: See TracChangeset for help on using the changeset viewer.