/* if ( request.querystring.get("fpage") == "vd" || request.querystring.get("fpage") == "" || request.querystring.

get("fpage") == null) { string strxmlpath = bisettings.originalassetunc + "xml/alltypevideos.xml"; // server.mappath("xml/alltypevideos.xml"); videoallinfoviewsxml = videoallinfoviewmanager.getvideoallinfoviewdescorderbycreatedatandtop5(); videoratingcountsviewxml = videoallinfoandratingdetailviewmanager.getvideoratingcountviewbytimeandtop5("all") ; xmltextwriter xmlwriter = new xmltextwriter(strxmlpath, null); xmlwriter.writestartdocument(); xmlwriter.writestartelement("videos"); // creating the <mostrecentvideos> element xmlwriter.writestartelement("mostrecentvideos"); for (int i = 0; i < videoallinfoviewsxml.length; i++) { xmlwriter.writestartelement("video"); xmlwriter.writeattributestring("videoid", videoallinfoviewsxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("userid", videoallinfoviewsxml[i].userid.tostring()); xmlwriter.writeattributestring("title", videoallinfoviewsxml[i].title); xmlwriter.writeattributestring("videourl", "videodetail.aspx?videoid=" + videoallinfoviewsxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("thumbnailpath", optimizedvideoserverpath + videoallinfoviewsxml[i].userid.tostring() + "\\videogallery\\optimizedvideo\\" + videoallinfoviewsxml[i].optimizedvideoid + videoallinfoviewsxml[i].optimizedextension + ".jpg"); xmlwriter.writeendelement(); // </video> } xmlwriter.writeendelement(); // </mostrecentvideos> // creating the <highratedvideos> element xmlwriter.writestartelement("highratedvideos"); for (int i = 0; i < videoratingcountsviewxml.length; i++) { xmlwriter.writestartelement("video"); xmlwriter.writeattributestring("videoid", videoratingcountsviewxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("userid", videoratingcountsviewxml[i].userid.tostring()); xmlwriter.writeattributestring("title", videoratingcountsviewxml[i].title); xmlwriter.writeattributestring("videourl", "videodetail.aspx?videoid=" + videoratingcountsviewxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("thumbnailpath", optimizedvideoserverpath + videoratingcountsviewxml[i].userid.tostring() + "\\videogallery\\optimizedvideo\\" + videoratingcountsviewxml[i].optimizedvideoid + videoratingcountsviewxml[i].optimizedextension + ".jpg"); xmlwriter.writeendelement(); // </video> } xmlwriter.writeendelement(); // </highratedvideos> xmlwriter.writeendelement(); // </videos>

xmlwriter.writeenddocument(); xmlwriter.flush(); xmlwriter.close(); } if (request.querystring.get("fpage") == "myv") { string strxmlpath = bisettings.originalassetunc + _usersessionid.tostring() + "/myvideos.xml"; // server.mappath("xml/myvideos.xml"); videoallinfoviewsmyvxml = videoallinfoviewmanager.getvideoallinfoviewbyuserid(_usersessionid); xmltextwriter xmlwriter = new xmltextwriter(strxmlpath, null); xmlwriter.writestartdocument(); xmlwriter.writestartelement("videos"); // creating the <mostrecentvideos> element xmlwriter.writestartelement("myvideos"); for (int i = 0; i < videoallinfoviewsmyvxml.length; i++) { xmlwriter.writestartelement("video"); xmlwriter.writeattributestring("videoid", videoallinfoviewsmyvxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("userid", videoallinfoviewsmyvxml[i].userid.tostring()); xmlwriter.writeattributestring("title", videoallinfoviewsmyvxml[i].title); xmlwriter.writeattributestring("videourl", "videodetail.aspx?videoid=" + videoallinfoviewsmyvxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("thumbnailpath", optimizedvideoserverpath + videoallinfoviewsmyvxml[i].userid.tostring() + "\\videogallery\\optimizedvideo\\" + videoallinfoviewsmyvxml[i].optimizedvideoid + videoallinfoviewsmyvxml[i].optimizedextension + ".jpg"); xmlwriter.writeendelement(); // </video> } xmlwriter.writeendelement(); // </myvideos> xmlwriter.writeendelement(); xmlwriter.writeenddocument(); xmlwriter.flush(); xmlwriter.close(); // </videos>

} if (request.querystring.get("fpage") == "myf") { string strxmlpath = bisettings.originalassetunc + _usersessionid.tostring() + "/myfavoritevideos.xml"; // server.mappath("xml/myfavoritevideos.xml"); videoallinfoviewandfavoritedetailviewsmyfxml = videoallinfoviewandfavoritedetailviewmanager.getvideoallinfoviewandfavoritedetailv iewbyvideofavoriteuseriddescorderbycreatedat(_usersessionid); xmltextwriter xmlwriter = new xmltextwriter(strxmlpath, null); xmlwriter.writestartdocument(); xmlwriter.writestartelement("videos"); // creating the <myfavoritevideos> element xmlwriter.writestartelement("myfavoritevideos"); for (int i = 0; i < videoallinfoviewandfavoritedetailviewsmyfxml.length; i++) { xmlwriter.writestartelement("video"); xmlwriter.writeattributestring("videoid",

videoallinfoviewandfavoritedetailviewsmyfxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("userid", videoallinfoviewandfavoritedetailviewsmyfxml[i].userid.tostring()); xmlwriter.writeattributestring("title", videoallinfoviewandfavoritedetailviewsmyfxml[i].title); xmlwriter.writeattributestring("videourl", "videodetail.aspx?videoid=" + videoallinfoviewandfavoritedetailviewsmyfxml[i].optimizedvideoid.tostring()); xmlwriter.writeattributestring("thumbnailpath", optimizedvideoserverpath + videoallinfoviewandfavoritedetailviewsmyfxml[i].userid.tostring() + "\\videogallery\\optimizedvideo\\" + videoallinfoviewandfavoritedetailviewsmyfxml[i].optimizedvideoid + videoallinfoviewandfavoritedetailviewsmyfxml[i].optimizedextension + ".jpg"); xmlwriter.writeendelement(); // </video> } xmlwriter.writeendelement(); // </myfavoritevideos> xmlwriter.writeendelement(); xmlwriter.writeenddocument(); xmlwriter.flush(); xmlwriter.close(); */ // </videos>

}

Sign up to vote on this title
UsefulNot useful