Teknik is a suite of services with attractive and functional interfaces. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. $podcast_title = $CONF['podcast_title'];
  3. $podcast_desc = $CONF['podcast_desc'];
  4. $posts_per_load = $CONF['podcasts_per_page'];
  5. $error = "";
  6. $podcast_posts = $db->select('podcast', "1=?", array(1));
  7. if (!$podcast_posts)
  8. {
  9. $error = "There are currently no podcasts.";
  10. }
  11. set_page_title($podcast_title);
  12. ?>
  13. <div class="container">
  14. <div class="row">
  15. <div class="col-sm-12 blog-heading">
  16. <h1 class="podcast-title text-center"><?php echo $podcast_title; ?></h1>
  17. <p class="lead podcast-description text-center text-muted"><?php echo $podcast_desc; ?></p>
  18. </div>
  19. </div>
  20. <div class="row">
  21. <div class="col-sm-12 text-center">
  22. <p>
  23. <a href="<?php echo get_page_url('rss', $CONF).'/podcast/'; ?>"><i class="fa fa-rss fa-2x fa-border"></i></a>
  24. </p>
  25. </div>
  26. </div>
  27. <?php
  28. if ($user->admin)
  29. {
  30. ?>
  31. <div class="row">
  32. <div class="col-sm-12 text-center">
  33. <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#newPodcast">Create Podcast</button>
  34. </div>
  35. </div>
  36. <div class="modal fade" id="newPodcast" tabindex="-1" role="dialog" aria-labelledby="newPodcastLabel" aria-hidden="true">
  37. <div class="modal-dialog">
  38. <div class="modal-content">
  39. <form class="form" action="##" method="post" id="publishPodcast">
  40. <div class="modal-header">
  41. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Cancel</span></button>
  42. <h4 class="modal-title" id="newPodcastLabel">Create a New Podcast</h4>
  43. </div>
  44. <div class="modal-body">
  45. <div class="row">
  46. <div class="form-group col-sm-12">
  47. <label for="podcast_title"><h4>Title</h4></label>
  48. <input class="form-control" name="podcast_title" id="podcast_title" placeholder="Awesome Podcast Title" title="enter a title for the podcast." type="text" />
  49. </div>
  50. </div>
  51. <div class="row">
  52. <div class="form-group col-sm-12">
  53. <label for="podcast_post"><h4>Podcast Description</h4></label>
  54. <textarea class="form-control wmd-input" name="podcast_post" id="podcast_post" placeholder="We talked about awesome stuff." title="enter what the podcast was about." data-provide="markdown" rows="10"></textarea>
  55. </div>
  56. </div>
  57. <div class="row">
  58. <div class="form-group col-sm-12">
  59. <label for="uploadPodcast"><h4>Upload Podcast</h4></label>
  60. <input id="uploadPodcast" name="file" type="file" placeholder="podcast.ogg" title="select the podcast file." />
  61. </div>
  62. </div>
  63. <div class="row">
  64. <div class="form-group col-sm-12" id="uploadedPodcasts"></div>
  65. <input name="podcast_file" id="podcast_file" type="hidden" />
  66. </div>
  67. </div>
  68. <div class="modal-footer">
  69. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  70. <button type="button" class="btn btn-primary" id="podcast_submit">Publish</button>
  71. </div>
  72. </form>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="modal fade" id="editPodcast" tabindex="-1" role="dialog" aria-labelledby="editPodcastLabel" aria-hidden="true">
  77. <div class="modal-dialog">
  78. <div class="modal-content">
  79. <form class="form" action="##" method="post" id="editPodcastForm">
  80. <div class="modal-header">
  81. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Cancel</span></button>
  82. <h4 class="modal-title" id="editPodcastLabel">Edit Your Post</h4>
  83. </div>
  84. <div class="modal-body">
  85. <input name="edit_podcast_postid" id="edit_podcast_postid" type="hidden" />
  86. <div class="row">
  87. <div class="form-group col-sm-12">
  88. <label for="edit_podcast_title"><h4>Title</h4></label>
  89. <input class="form-control" name="edit_podcast_title" id="edit_podcast_title" placeholder="Awesome Podcast Title" title="enter a title for the podcast." type="text" />
  90. </div>
  91. </div>
  92. <div class="row">
  93. <div class="form-group col-sm-12">
  94. <label for="edit_podcast_post"><h4>Podcast Description</h4></label>
  95. <textarea class="form-control wmd-input" name="edit_podcast_post" id="edit_podcast_post" placeholder="We talked about awesome stuff." title="enter what the podcast was about." data-provide="markdown" rows="10"></textarea>
  96. </div>
  97. </div>
  98. <div class="row">
  99. <div class="form-group col-sm-12">
  100. <label for="uploadPodcast"><h4>Upload Podcast</h4></label>
  101. <input id="edit_uploadPodcast" name="file" type="file" placeholder="podcast.ogg" title="select the podcast file." />
  102. </div>
  103. </div>
  104. <div class="row">
  105. <div class="form-group col-sm-12" id="edit_uploadedPodcasts"></div>
  106. <input name="edit_podcast_file" id="edit_podcast_file" type="hidden" />
  107. </div>
  108. </div>
  109. <div class="modal-footer">
  110. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  111. <button type="button" class="btn btn-primary" id="edit_submit">Save</button>
  112. </div>
  113. </form>
  114. </div>
  115. </div>
  116. </div>
  117. <?php
  118. }
  119. if (empty($error))
  120. {
  121. ?>
  122. <div class="podcast-main"></div>
  123. <script>
  124. var posts = <?php echo $posts_per_load; ?>;
  125. var start_post = 0;
  126. loadMorePosts(start_post, posts);
  127. start_post = start_post + posts;
  128. </script>
  129. <?php
  130. }
  131. else
  132. {
  133. ?>
  134. <div class="row">
  135. <div class="col-sm-12 text-center">
  136. <h2><?php echo $error; ?></h2>
  137. </div>
  138. </div>
  139. <?php
  140. }
  141. ?>
  142. </div>