Line 1: #pragma checksum "http://server/euranet/_controls/podcasts.ascx" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "457780C6F722C7DDACD0FB985E86492FAC90EDF4"
Line 2: //------------------------------------------------------------------------------
Line 3: // <auto-generated>
Line 4: // This code was generated by a tool.
Line 5: // Runtime Version:4.0.30319.42000
Line 6: //
Line 7: // Changes to this file may cause incorrect behavior and will be lost if
Line 8: // the code is regenerated.
Line 9: // </auto-generated>
Line 10: //------------------------------------------------------------------------------
Line 11:
Line 12: namespace ASP {
Line 13:
Line 14: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 15: using System.Web.UI.WebControls.Expressions;
Line 16:
Line 17: #line default
Line 18: #line hidden
Line 19:
Line 20: #line 325 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 21: using System.Collections;
Line 22:
Line 23: #line default
Line 24: #line hidden
Line 25:
Line 26: #line 6 "http://server/euranet/_controls/podcasts.ascx"
Line 27: using System.Text;
Line 28:
Line 29: #line default
Line 30: #line hidden
Line 31:
Line 32: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 33: using System.Web.UI;
Line 34:
Line 35: #line default
Line 36: #line hidden
Line 37:
Line 38: #line 326 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 39: using System.Collections.Generic;
Line 40:
Line 41: #line default
Line 42: #line hidden
Line 43:
Line 44: #line 330 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 45: using System.Linq;
Line 46:
Line 47: #line default
Line 48: #line hidden
Line 49:
Line 50: #line 343 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 51: using System.Xml.Linq;
Line 52:
Line 53: #line default
Line 54: #line hidden
Line 55:
Line 56: #line 336 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 57: using System.Web.SessionState;
Line 58:
Line 59: #line default
Line 60: #line hidden
Line 61:
Line 62: #line 327 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 63: using System.Collections.Specialized;
Line 64:
Line 65: #line default
Line 66: #line hidden
Line 67:
Line 68: #line 8 "http://server/euranet/_controls/podcasts.ascx"
Line 69: using Functions;
Line 70:
Line 71: #line default
Line 72: #line hidden
Line 73:
Line 74: #line 333 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 75: using System.Web;
Line 76:
Line 77: #line default
Line 78: #line hidden
Line 79:
Line 80: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 81: using System.Web.DynamicData;
Line 82:
Line 83: #line default
Line 84: #line hidden
Line 85:
Line 86: #line 334 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 87: using System.Web.Caching;
Line 88:
Line 89: #line default
Line 90: #line hidden
Line 91:
Line 92: #line 338 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 93: using System.Web.Profile;
Line 94:
Line 95: #line default
Line 96: #line hidden
Line 97:
Line 98: #line 328 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 99: using System.ComponentModel.DataAnnotations;
Line 100:
Line 101: #line default
Line 102: #line hidden
Line 103:
Line 104: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 105: using System.Web.UI.WebControls;
Line 106:
Line 107: #line default
Line 108: #line hidden
Line 109:
Line 110: #line 2 "http://server/euranet/_controls/podcasts.ascx"
Line 111: using System.Data;
Line 112:
Line 113: #line default
Line 114: #line hidden
Line 115:
Line 116: #line 337 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 117: using System.Web.Security;
Line 118:
Line 119: #line default
Line 120: #line hidden
Line 121:
Line 122: #line 324 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 123: using System;
Line 124:
Line 125: #line default
Line 126: #line hidden
Line 127:
Line 128: #line 3 "http://server/euranet/_controls/podcasts.ascx"
Line 129: using System.Data.SqlClient;
Line 130:
Line 131: #line default
Line 132: #line hidden
Line 133:
Line 134: #line 7 "http://server/euranet/_controls/podcasts.ascx"
Line 135: using System.Text.RegularExpressions;
Line 136:
Line 137: #line default
Line 138: #line hidden
Line 139:
Line 140: #line 9 "http://server/euranet/_controls/podcasts.ascx"
Line 141: using DBFacade;
Line 142:
Line 143: #line default
Line 144: #line hidden
Line 145:
Line 146: #line 329 "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config"
Line 147: using System.Configuration;
Line 148:
Line 149: #line default
Line 150: #line hidden
Line 151:
Line 152: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 153: using System.Web.UI.WebControls.WebParts;
Line 154:
Line 155: #line default
Line 156: #line hidden
Line 157:
Line 158: #line 4 "http://server/euranet/_controls/podcasts.ascx"
Line 159: using System.Web.UI.HtmlControls;
Line 160:
Line 161: #line default
Line 162: #line hidden
Line 163:
Line 164:
Line 165: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 166: public class euranet__controls_podcasts_ascx : global::System.Web.UI.UserControl {
Line 167:
Line 168:
Line 169: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 170: protected global::System.Web.UI.WebControls.PlaceHolder podcasts;
Line 171:
Line 172: #line default
Line 173: #line hidden
Line 174:
Line 175: private static bool @__initialized;
Line 176:
Line 177:
Line 178: #line 11 "http://server/euranet/_controls/podcasts.ascx"
Line 179:
Line 180:
Line 181: protected string _DateFormat = "dd.MM.yyyy HH:mm";
Line 182: protected int _leadcut = 0;
Line 183: protected int _titlecut = 0;
Line 184: protected string _titledelete = "";
Line 185: protected int _podcastid = 89;
Line 186: protected int _ile = 5;
Line 187: protected int _ilestatic;
Line 188: protected string _Adres = "";
Line 189: protected bool _linkArticle = false;
Line 190: protected int _od = 0;
Line 191: protected string _data = "0";
Line 192: protected bool _single = false;
Line 193: protected string _helpLink = @"/podcasting/download/";
Line 194: protected string _altText = "wkrótce..";
Line 195:
Line 196: protected string PathWWW = System.Configuration.ConfigurationSettings.AppSettings["PathWWW"]; //sciezka do dokumentow
Line 197: protected string PhisicalPath = System.Configuration.ConfigurationSettings.AppSettings["PhisicalPath"]; //fizyczna sciezka do dokumentow
Line 198: protected string PageWWW = System.Configuration.ConfigurationSettings.AppSettings["PageWWW"];
Line 199:
Line 200: public string DateFormat { set { _DateFormat = value; } }
Line 201: public int LeadCut { set { _leadcut = value; } }
Line 202: public int TitleCut { set { _titlecut = value; } }
Line 203: public string TitleDelete { set { _titledelete = value; } }
Line 204: public int Ile { set { _ile = value; } }
Line 205: public int PodcastId { set { _podcastid = value; } }
Line 206: public bool LinkArticle { set { _linkArticle = value; } }
Line 207: public int Od { set { _od = value; } }
Line 208: public string Data { set { _data = value; } }
Line 209: public bool Single { set { _single = value; } }
Line 210: public string HelpLink { set { _helpLink = value; } }
Line 211: public string AltText { set { _altText = value; } }
Line 212:
Line 213:
Line 214: protected DataTable dt;
Line 215: protected DataTable dtPodcastDesc;
Line 216:
Line 217:
Line 218: protected void Page_Load(object sender, EventArgs e)
Line 219: {
Line 220: _ilestatic = _ile;
Line 221: int _do;
Line 222: _do = _od + _ile;
Line 223:
Line 224: if (_data.Length == 8 & Functions.Check.CheckInt(_data))
Line 225: {
Line 226: dt = getPodcasts(_od, _do, _podcastid, _data);
Line 227: }
Line 228: else
Line 229: {
Line 230: dt = getPodcasts(_od, _do, _podcastid);
Line 231: }
Line 232:
Line 233: dtPodcastDesc = getPodcastDesc(_podcastid);
Line 234:
Line 235: if (dt.Rows != null)
Line 236: {
Line 237: podcasts.Controls.Add(PodcastsList(dt, dtPodcastDesc));
Line 238: }
Line 239: }
Line 240:
Line 241:
Line 242:
Line 243: private PlaceHolder PodcastsList(DataTable dt, DataTable dtPodcastDesc)
Line 244: {
Line 245: bool tmpimg = false;
Line 246:
Line 247: PlaceHolder ph = new PlaceHolder();
Line 248:
Line 249: HtmlGenericControl date;
Line 250: HtmlGenericControl title;
Line 251: HtmlGenericControl description;
Line 252: HtmlGenericControl mp3;
Line 253: HtmlGenericControl player;
Line 254:
Line 255:
Line 256: int _id;
Line 257: string _title;
Line 258: string _date;
Line 259: string _articleAddress;
Line 260: string _mp3Address;
Line 261: string _desc;
Line 262: string _playerLink;
Line 263: string _xmlLink;
Line 264: double _fileSize;
Line 265:
Line 266:
Line 267: if (dt.Rows.Count < _ile)
Line 268: {
Line 269: _ile = dt.Rows.Count;
Line 270: }
Line 271: int licznik = 0;
Line 272:
Line 273: //nagłówek - główne informacje o podcastach
Line 274: ph.Controls.Add(PodcastHeader(dtPodcastDesc.Rows[0]));
Line 275:
Line 276:
Line 277:
Line 278: HtmlGenericControl ul = new HtmlGenericControl("ul");
Line 279: ul.Attributes.Add("class", "podcast_list");
Line 280:
Line 281:
Line 282: if (_data.Length > 1)
Line 283: {
Line 284: DateTime dtData;
Line 285: string InputDateString = _data;
Line 286:
Line 287: int theYear = System.Convert.ToInt32(InputDateString.Substring(0, 4));
Line 288: int theMonth = System.Convert.ToInt32(InputDateString.Substring(4, 2));
Line 289: int theDay = System.Convert.ToInt32(InputDateString.Substring(6, 2));
Line 290:
Line 291: dtData = new DateTime(theYear, theMonth, theDay);
Line 292: HtmlGenericControl dateHeader = new HtmlGenericControl("div");
Line 293: dateHeader.Attributes.Add("class", "dateheader");
Line 294: dateHeader.InnerText = dtData.ToString("d MMMM yyyy");
Line 295:
Line 296: ul.Controls.Add(dateHeader);
Line 297: }
Line 298:
Line 299: if (dt.Rows.Count == 0)
Line 300: {
Line 301: HtmlGenericControl soon = SimpleTag(_altText, "span", "latest");
Line 302: HtmlGenericControl lil = SimpleTag(soon, "li", "");
Line 303: ul.Controls.Add(lil);
Line 304: }
Line 305: foreach (DataRow row in dt.Rows)
Line 306: {
Line 307: _id = int.Parse(row["idtb_item"].ToString());
Line 308: _title = _title = row["item_title"].ToString();
Line 309: if (_titlecut < _title.Length && _titlecut != 0)
Line 310: {
Line 311: _title = Functions.String.Cut(_titlecut, _title) + "...";
Line 312:
Line 313: }
Line 314: _mp3Address = row["file"].ToString();
Line 315: _date = row["pubdate"].ToString();
Line 316: DateTime _DTdate = DateTime.Parse(_date);
Line 317: _date = _DTdate.ToString("d MMMM yyyy HH:mm");
Line 318: _desc = row["item_desc"].ToString();
Line 319: _playerLink = row["player_link"].ToString();
Line 320: _fileSize = double.Parse(row["lenght"].ToString());
Line 321:
Line 322: if (_titlecut < _title.Length && _titlecut != 0)
Line 323: {
Line 324: _title = Functions.String.Cut(_titlecut, _title) + "...";
Line 325: }
Line 326:
Line 327: HtmlGenericControl li = new HtmlGenericControl("li");
Line 328:
Line 329: title = SimpleTag(_title, "span", "title");
Line 330: date = SimpleTag(_date, "span", "date");
Line 331: description = SimpleTag(_desc, "span", "lead");
Line 332: if (_single == true)
Line 333: {
Line 334: HtmlGenericControl latest = SimpleTag("ostatnio dodany", "span", "latest");
Line 335: li.Controls.Add(latest);
Line 336: }
Line 337:
Line 338:
Line 339: if (_linkArticle)
Line 340: {
Line 341: _articleAddress = row["link"].ToString();
Line 342: HtmlGenericControl aArticle = new HtmlGenericControl("a");
Line 343: aArticle.Attributes.Add("class", "articlelink");
Line 344: aArticle.Attributes.Add("href", _articleAddress);
Line 345: aArticle.Controls.Add(title);
Line 346: aArticle.Controls.Add(date);
Line 347: if(_single == false) aArticle.Controls.Add(description);
Line 348: li.Controls.Add(aArticle);
Line 349: }
Line 350: else
Line 351: {
Line 352: li.Controls.Add(title);
Line 353: li.Controls.Add(date);
Line 354: li.Controls.Add(description);
Line 355: }
Line 356:
Line 357: li.Controls.Add(Player(PageWWW, _playerLink, _id.ToString()));
Line 358:
Line 359: if (_single == false)
Line 360: {
Line 361: HtmlGenericControl a = new HtmlGenericControl("a");
Line 362: a.Attributes.Add("class", "link");
Line 363: a.Attributes.Add("href", _mp3Address);
Line 364: a.Attributes.Add("title", _title);
Line 365: a.InnerHtml = "pobierz plik (mp3) <span>" + Functions.Files.FileSize(_fileSize) + "</span><a href=\""+_helpLink+"\" class=\"help\"></a>";
Line 366: li.Controls.Add(a);
Line 367: }
Line 368:
Line 369: ul.Controls.Add(li);
Line 370:
Line 371: //ograniczenie na ilosc newsow
Line 372:
Line 373: licznik++;
Line 374: if (_ile == licznik) break;
Line 375: }
Line 376:
Line 377:
Line 378:
Line 379: ph.Controls.Add(ul);
Line 380:
Line 381: //stronicowanie
Line 382: if (_single == false) ph.Controls.Add(Paging(countPodcasts(_podcastid, _data)));
Line 383:
Line 384: return ph;
Line 385:
Line 386: }
Line 387:
Line 388:
Line 389:
Line 390: private DataTable getPodcasts(int _od, int _do, int sid)
Line 391: {
Line 392: string whereString = "where i.pubdate <= getdate() and i.idtb_podcast = " + sid;
Line 393: DataTable tmp = new DataTable();
Line 394: SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["cnCMS2"]);
Line 395:
Line 396:
Line 397: SqlCommand SQL = new SqlCommand("dbo.SHOW_PODCAST_ITEM_2", cn);
Line 398: SQL.CommandType = CommandType.StoredProcedure;
Line 399: cn.Open();
Line 400:
Line 401: SQL.Parameters.Add(DBFacade.Param.sqlParam("@warunek", SqlDbType.VarChar, ParameterDirection.Input, whereString));
Line 402: SQL.Parameters.Add(DBFacade.Param.sqlParam("@od", SqlDbType.Int, ParameterDirection.Input, _od));
Line 403: SQL.Parameters.Add(DBFacade.Param.sqlParam("@do", SqlDbType.Int, ParameterDirection.Input, _do));
Line 404:
Line 405: SqlDataAdapter DataAdapter = new SqlDataAdapter();
Line 406: DataAdapter.SelectCommand = SQL;
Line 407:
Line 408: SQL.Connection = cn;
Line 409: DataAdapter.Fill(tmp);
Line 410:
Line 411: cn.Close();
Line 412: cn.Dispose();
Line 413:
Line 414: return tmp;
Line 415: }
Line 416:
Line 417: private DataTable getPodcasts(int _od, int _do, int sid, string data)
Line 418: {
Line 419: string whereString = "where i.idtb_podcast = " + sid + " and convert(varchar,i.pubdate,112) = " + data;
Line 420: DataTable tmp = new DataTable();
Line 421: SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["cnCMS2"]);
Line 422:
Line 423:
Line 424: SqlCommand SQL = new SqlCommand("dbo.SHOW_PODCAST_ITEM_DESC", cn);
Line 425: SQL.CommandType = CommandType.StoredProcedure;
Line 426: cn.Open();
Line 427:
Line 428: SQL.Parameters.Add(DBFacade.Param.sqlParam("@warunek", SqlDbType.VarChar, ParameterDirection.Input, whereString));
Line 429: SQL.Parameters.Add(DBFacade.Param.sqlParam("@od", SqlDbType.Int, ParameterDirection.Input, _od));
Line 430: SQL.Parameters.Add(DBFacade.Param.sqlParam("@do", SqlDbType.Int, ParameterDirection.Input, _do));
Line 431:
Line 432: SqlDataAdapter DataAdapter = new SqlDataAdapter();
Line 433: DataAdapter.SelectCommand = SQL;
Line 434:
Line 435: SQL.Connection = cn;
Line 436: DataAdapter.Fill(tmp);
Line 437:
Line 438: cn.Close();
Line 439: cn.Dispose();
Line 440:
Line 441: return tmp;
Line 442: }
Line 443:
Line 444: private DataTable getPodcastDesc(int pid)
Line 445: {
Line 446: string whereString = "where m.idtb_podcast = " + pid;
Line 447: DataTable tmp = new DataTable();
Line 448: SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["cnCMS2"]);
Line 449:
Line 450:
Line 451: SqlCommand SQL = new SqlCommand("dbo.SHOW_PODCAST_MAIN_DESC", cn);
Line 452: SQL.CommandType = CommandType.StoredProcedure;
Line 453: cn.Open();
Line 454:
Line 455:
Line 456: SQL.Parameters.Add(DBFacade.Param.sqlParam("@podcastId", SqlDbType.Int, ParameterDirection.Input, pid));
Line 457:
Line 458: SqlDataAdapter DataAdapter = new SqlDataAdapter();
Line 459: DataAdapter.SelectCommand = SQL;
Line 460:
Line 461: SQL.Connection = cn;
Line 462: DataAdapter.Fill(tmp);
Line 463:
Line 464: cn.Close();
Line 465: cn.Dispose();
Line 466:
Line 467: return tmp;
Line 468: }
Line 469:
Line 470: private int countPodcasts(int pid, string data)
Line 471: {
Line 472: string whereString = "where idtb_podcast = " + pid;
Line 473: if(data.Length == 8 & Functions.Check.CheckInt(data)) whereString += " and convert(varchar, pubdate,112) = " + data;
Line 474:
Line 475: int podcastCount;
Line 476: DataTable tmp = new DataTable();
Line 477: SqlConnection cn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["cnCMS2"]);
Line 478:
Line 479: SqlCommand SQL = new SqlCommand("dbo.SHOW_PODCAST_ITEM_COUNT", cn);
Line 480: SQL.CommandType = CommandType.StoredProcedure;
Line 481: cn.Open();
Line 482:
Line 483: SQL.Parameters.Add(DBFacade.Param.sqlParam("@warunek", SqlDbType.VarChar, ParameterDirection.Input, whereString));
Line 484:
Line 485: podcastCount = Convert.ToInt32(SQL.ExecuteScalar());
Line 486:
Line 487: cn.Close();
Line 488: cn.Dispose();
Line 489:
Line 490: return podcastCount;
Line 491: }
Line 492:
Line 493: private HtmlGenericControl Paging(int itemCount)
Line 494: {
Line 495: HtmlGenericControl divContainer = new HtmlGenericControl("div");
Line 496: divContainer.Attributes.Add("class", "paging");
Line 497: HtmlGenericControl a;
Line 498: int pages;
Line 499: pages = Convert.ToInt16(System.Math.Ceiling(itemCount / _ilestatic));
Line 500:
Line 501: if (pages > 1)
Line 502: {
Line 503: for (int i = 0; i <= pages; i++)
Line 504: {
Line 505: a = new HtmlGenericControl("a");
Line 506: int _start = i * _ilestatic;
Line 507: a.Attributes.Add("href", "podcast.aspx?pid=" + _podcastid + "&start=" + _start.ToString());
Line 508: if ((_od / _ilestatic) == i)
Line 509: {
Line 510: a.Attributes.Add("class", "activep");
Line 511: }
Line 512: a.InnerText = Convert.ToString(i + 1);
Line 513: divContainer.Controls.Add(a);
Line 514: }
Line 515: }
Line 516:
Line 517: return divContainer;
Line 518: }
Line 519:
Line 520: private HtmlGenericControl Image(string src)
Line 521: {
Line 522: HtmlGenericControl img = new HtmlGenericControl("img");
Line 523: img.Attributes.Add("src", Regex.Replace(src,@"www.","www2.",RegexOptions.IgnoreCase));
Line 524: return img;
Line 525: }
Line 526:
Line 527: private HtmlGenericControl SimpleTag(string text, string tag, string css)
Line 528: {
Line 529: HtmlGenericControl title = new HtmlGenericControl(tag);
Line 530: title.Attributes.Add("class", css);
Line 531: title.InnerText = text;
Line 532:
Line 533: return title;
Line 534: }
Line 535:
Line 536: private HtmlGenericControl SimpleTag(HtmlGenericControl nestedTag, string tag, string css)
Line 537: {
Line 538: HtmlGenericControl _tag = new HtmlGenericControl(tag);
Line 539: _tag.Attributes.Add("class", css);
Line 540: _tag.Controls.Add(nestedTag);
Line 541:
Line 542: return _tag;
Line 543: }
Line 544:
Line 545: private HtmlGenericControl AnchorTag(string text, string href, string css)
Line 546: {
Line 547: HtmlGenericControl _a = new HtmlGenericControl("a");
Line 548: _a.Attributes.Add("href", href);
Line 549: _a.Attributes.Add("class", css);
Line 550: _a.InnerText = text;
Line 551:
Line 552: return _a;
Line 553: }
Line 554:
Line 555:
Line 556: private HtmlGenericControl PodcastHeader(DataRow dr)
Line 557: {
Line 558: HtmlGenericControl divHead = new HtmlGenericControl("div");
Line 559: HtmlGenericControl divDesc = new HtmlGenericControl("div");
Line 560: HtmlGenericControl divImg = new HtmlGenericControl("div");
Line 561: HtmlGenericControl divXml;
Line 562: string _xmlLink;
Line 563: string _titleMain;
Line 564:
Line 565: divImg.Controls.Add(Image(dr["image"].ToString()));
Line 566: divImg.Attributes.Add("class", "podcast_box_2");
Line 567: divHead.Controls.Add(divImg);
Line 568:
Line 569: _titleMain = dr["main_title"].ToString();
Line 570: if (_titledelete.Length > 0) _titleMain = _titleMain.Replace(_titledelete, "");
Line 571:
Line 572: divDesc.Controls.Add(SimpleTag(_titleMain, "p", "main_title"));
Line 573: divDesc.Controls.Add(SimpleTag(dr["main_desc"].ToString(), "p", "main_desc"));
Line 574: divDesc.Attributes.Add("class", "podcast_box_1");
Line 575: divHead.Controls.Add(divDesc);
Line 576:
Line 577:
Line 578: //link do xml'a z podcastem
Line 579: _xmlLink = @"/podcast/" + _podcastid + @"/podcast.xml";
Line 580: HtmlGenericControl axml = AnchorTag(_xmlLink, _xmlLink, "");
Line 581: HtmlGenericControl xml = SimpleTag(axml, "div", "podcastxml");
Line 582: divXml = SimpleTag(xml, "div", "podcast_box_3");
Line 583:
Line 584: if (_single == true & dt.Rows.Count>0) divXml.Controls.Add(AnchorTag("poprzednie", "podcast.aspx?pid="+_podcastid, "more"));
Line 585:
Line 586: divHead.Controls.Add(divXml);
Line 587: divHead.Attributes.Add("class", "podcast_head");
Line 588:
Line 589: return divHead;
Line 590: }
Line 591:
Line 592: private HtmlGenericControl Player(string rootPath, string soundPath, string id)
Line 593: {
Line 594: HtmlGenericControl span = new HtmlGenericControl("span");
Line 595: span.Attributes.Add("id", "mp3" + id);
Line 596: span.Attributes.Add("class", "player");
Line 597: StringBuilder sb = new StringBuilder();
Line 598: sb.Append("var _obj" + id + " = new SWFObject(\"" + rootPath + "_swf/player_new.swf?dzwiek=" + soundPath + "\", \"loader"+ id +"\", \"170\", \"30\", 7, \"\"); \r\n");
Line 599: sb.Append(" _obj" + id + ".addParam(\"wmode\", \"transparent\");");
Line 600: sb.Append(" _obj" + id + ".addParam(\"allowScript\", \"always\");");
Line 601: sb.Append(" _obj" + id + ".write(\"mp3" + id + "\");");
Line 602:
Line 603: HtmlGenericControl script = new HtmlGenericControl("script");
Line 604: script.Attributes.Add("type", "text/javascript");
Line 605: script.InnerHtml = sb.ToString();
Line 606: span.Controls.Add(script);
Line 607:
Line 608: return span;
Line 609:
Line 610: }
Line 611:
Line 612:
Line 613: public static string NoteClean(string toclean)
Line 614: {
Line 615: string tekst = Regex.Replace(toclean, @"<FONT[^>]*>", @"",
Line 616: RegexOptions.IgnoreCase);
Line 617: tekst = Regex.Replace(tekst, @"<[buip]>", @"",
Line 618: RegexOptions.IgnoreCase);
Line 619: tekst = Regex.Replace(tekst, @"</[bui]>", @"",
Line 620: RegexOptions.IgnoreCase);
Line 621: tekst = Regex.Replace(tekst, @"</[/p]>", @"<br />",
Line 622: RegexOptions.IgnoreCase);
Line 623: tekst = Regex.Replace(tekst, @"<div[^>]*><img[^>]*></div>",
Line 624: @"", RegexOptions.IgnoreCase);
Line 625: tekst = Regex.Replace(tekst, @"<a[^>]*>.*</a>", @"",
Line 626: RegexOptions.IgnoreCase);
Line 627: tekst = Regex.Replace(tekst, @"<img[^>]*>", @"",
Line 628: RegexOptions.IgnoreCase);
Line 629: tekst = Regex.Replace(tekst, @"<div[^>]*>", @"",
Line 630: RegexOptions.IgnoreCase);
Line 631: tekst = Regex.Replace(tekst, @"</FONT>", @"",
Line 632: RegexOptions.IgnoreCase);
Line 633: tekst = Regex.Replace(tekst, @"\ \;", @"",
Line 634: RegexOptions.IgnoreCase);
Line 635: tekst = Regex.Replace(tekst, "<span style=\"\">", @"<span>",
Line 636: RegexOptions.IgnoreCase);
Line 637: return tekst;
Line 638: }
Line 639:
Line 640:
Line 641: #line default
Line 642: #line hidden
Line 643:
Line 644:
Line 645: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 646: public euranet__controls_podcasts_ascx() {
Line 647: ((global::System.Web.UI.UserControl)(this)).AppRelativeVirtualPath = "~/euranet/_controls/podcasts.ascx";
Line 648: if ((global::ASP.euranet__controls_podcasts_ascx.@__initialized == false)) {
Line 649: global::ASP.euranet__controls_podcasts_ascx.@__initialized = true;
Line 650: }
Line 651: }
Line 652:
Line 653: protected System.Web.Profile.DefaultProfile Profile {
Line 654: get {
Line 655: return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
Line 656: }
Line 657: }
Line 658:
Line 659: protected ASP.global_asax ApplicationInstance {
Line 660: get {
Line 661: return ((ASP.global_asax)(this.Context.ApplicationInstance));
Line 662: }
Line 663: }
Line 664:
Line 665: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 666: private global::System.Web.UI.WebControls.PlaceHolder @__BuildControlpodcasts() {
Line 667: global::System.Web.UI.WebControls.PlaceHolder @__ctrl;
Line 668:
Line 669: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 670: @__ctrl = new global::System.Web.UI.WebControls.PlaceHolder();
Line 671:
Line 672: #line default
Line 673: #line hidden
Line 674: this.podcasts = @__ctrl;
Line 675:
Line 676: #line 474 "http://server/euranet/_controls/podcasts.ascx"
Line 677: @__ctrl.ID = "podcasts";
Line 678:
Line 679: #line default
Line 680: #line hidden
Line 681: return @__ctrl;
Line 682: }
Line 683:
Line 684: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 685: private void @__BuildControlTree(euranet__controls_podcasts_ascx @__ctrl) {
Line 686: global::System.Web.UI.WebControls.PlaceHolder @__ctrl1;
Line 687:
Line 688: #line 1 "http://server/euranet/_controls/podcasts.ascx"
Line 689: @__ctrl1 = this.@__BuildControlpodcasts();
Line 690:
Line 691: #line default
Line 692: #line hidden
Line 693: System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
Line 694:
Line 695: #line 1 "http://server/euranet/_controls/podcasts.ascx"
Line 696: @__parser.AddParsedSubObject(@__ctrl1);
Line 697:
Line 698: #line default
Line 699: #line hidden
Line 700:
Line 701: #line 1 "http://server/euranet/_controls/podcasts.ascx"
Line 702: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n"));
Line 703:
Line 704: #line default
Line 705: #line hidden
Line 706: }
Line 707:
Line 708: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 709: protected override void FrameworkInitialize() {
Line 710: base.FrameworkInitialize();
Line 711: this.@__BuildControlTree(this);
Line 712: }
Line 713: }
Line 714: }
Line 715:
|