<?php
$aid = intval( $_POST['aid'] );
if ( empty( $aid ) ) {
		exit( json_encode( array( 'flag' => 0, 'msg' => '图集参数错误' ) ) );
}
include "../core.php";
saxue_getconfigs( "configs", "article" );
$slidefile = $saxueConfigs['article']['txtdir'] . saxue_getsubdir( $aid ) . '/' . $aid . '.slide';
include SAXUE_ROOT_PATH . "/model/article.php";
$article_handler = &saxuearticlehandler :: getinstance( "saxuearticlehandler" );
$article = $article_handler -> get( $aid );
if ( !is_object( $article ) || !is_file( $slidefile ) || $article -> getvar( 'isslide' ) == 0 ) {
		exit( json_encode( array( 'flag' => 0, 'msg' => '图集不存在' ) ) );
} 
$surl = saxue_geturl( 'slide_show', $aid, $article -> getvar( 'cid' ), $article -> getvar( 'addtime' ), $article -> getvar( 'isslide' ) );
$data = saxue_readfile( $slidefile );
exit( json_encode( array( 'flag' => 1, 'surl' => $surl, 'data' => $data ) ) );