Skip to content

Commit 81feffb

Browse files
Create block-Bootstrap_Slider.php
1 parent 7a732a0 commit 81feffb

File tree

1 file changed

+160
-0
lines changed

1 file changed

+160
-0
lines changed

blocks/block-Bootstrap_Slider.php

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?php
2+
/************************************************************************/
3+
/* PHP-NUKE: Web Portal System */
4+
/* =========================== */
5+
/* */
6+
/* Copyright (c) 2007 by Francisco Burzi */
7+
/* http://phpnuke.org */
8+
/* */
9+
/* This program is free software. You can redistribute it and/or modify */
10+
/* it under the terms of the GNU General Public License as published by */
11+
/* the Free Software Foundation; either version 2 of the License. */
12+
/************************************************************************/
13+
14+
/*
15+
* Nuke Bootstrap Slider
16+
* @version v1.0.0
17+
* @Author Ernest Allen Buffington
18+
* @idea came from TrickedOutSlider Block http://trickedoutnews.com
19+
*
20+
* This program is free software. You can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License.
23+
*/
24+
if (stristr($_SERVER['SCRIPT_NAME'], "block-BootstrapSlider.php"))
25+
{
26+
Header("Location: ../../index.php");
27+
die();
28+
}
29+
30+
require_once('mainfile.php');
31+
global $db, $prefix;
32+
33+
$sql = "SELECT slidertitle1,
34+
slidertitle2,
35+
slidertitle3,
36+
slidertitle4,
37+
slidertitle5,
38+
slidertitle6,
39+
slidercontent1,
40+
slidercontent2,
41+
slidercontent3,
42+
slidercontent4,
43+
slidercontent5,
44+
slidercontent6,
45+
sliderthumb1,
46+
sliderthumb2,
47+
sliderthumb3,
48+
sliderthumb4,
49+
sliderthumb5,
50+
sliderthumb6 FROM ".$prefix."_tonslider";
51+
52+
$result = $db->sql_query($sql);
53+
$row = $db->sql_fetchrow($result);
54+
55+
$slidertitle1 = stripslashes(check_html($row['slidertitle1'], 'nohtml'));
56+
$slidertitle2 = stripslashes(check_html($row['slidertitle2'], 'nohtml'));
57+
$slidertitle3 = stripslashes(check_html($row['slidertitle3'], 'nohtml'));
58+
$slidertitle4 = stripslashes(check_html($row['slidertitle4'], 'nohtml'));
59+
$slidertitle5 = stripslashes(check_html($row['slidertitle5'], 'nohtml'));
60+
$slidertitle6 = stripslashes(check_html($row['slidertitle6'], 'nohtml'));
61+
$slidercontent1 = stripslashes($row['slidercontent1']);
62+
$slidercontent2 = stripslashes($row['slidercontent2']);
63+
$slidercontent3 = stripslashes($row['slidercontent3']);
64+
$slidercontent4 = stripslashes($row['slidercontent4']);
65+
$slidercontent5 = stripslashes($row['slidercontent5']);
66+
$slidercontent6 = stripslashes($row['slidercontent6']);
67+
$sliderthumb1 = stripslashes(check_html($row['sliderthumb1'], 'nohtml'));
68+
$sliderthumb2 = stripslashes(check_html($row['sliderthumb2'], 'nohtml'));
69+
$sliderthumb3 = stripslashes(check_html($row['sliderthumb3'], 'nohtml'));
70+
$sliderthumb4 = stripslashes(check_html($row['sliderthumb4'], 'nohtml'));
71+
$sliderthumb5 = stripslashes(check_html($row['sliderthumb5'], 'nohtml'));
72+
$sliderthumb6 = stripslashes(check_html($row['sliderthumb6'], 'nohtml'));
73+
74+
$content = '<div align="center" style="padding-top:20px;"></div>';
75+
76+
$content .= '<div class="container">';
77+
$content .= '<div id="myCarousel" class="carousel slide" data-ride="carousel">';
78+
$content .= '<!-- NSN Bootsrap Indicators -->';
79+
$content .= '<ol class="carousel-indicators">';
80+
$content .= '<li data-target="#myCarousel" data-slide-to="0" class="active"></li>';
81+
$content .= '<li data-target="#myCarousel" data-slide-to="1"></li>';
82+
$content .= '<li data-target="#myCarousel" data-slide-to="2"></li>';
83+
$content .= '<li data-target="#myCarousel" data-slide-to="3"></li>';
84+
$content .= '<li data-target="#myCarousel" data-slide-to="4"></li>';
85+
$content .= '<li data-target="#myCarousel" data-slide-to="5"></li>';
86+
87+
$content .= '</ol>';
88+
89+
$content .= '<!-- NSN Bootsrap Wrapper for slides -->';
90+
$content .= '<div class="carousel-inner">';
91+
$content .= '<div style="border-radius: 30px;" class="item active">';
92+
$content .= '<img src="images/slider/'.$sliderthumb1.'" alt="'.$slidertitle1.'" style="border-radius: 30px; width:100%;">';
93+
$content .= '<br /><br /><br /><br /><br /><br /><br /><br /><br />';
94+
$content .= '<div class="carousel-caption">';
95+
$content .= '<h3>'.$slidertitle1.'</h3>';
96+
$content .= '<p>'.$slidercontent1.'</p>';
97+
$content .= '</div>';
98+
$content .= '</div>';
99+
100+
$content .= '<div style="border-radius: 30px;" class="item">';
101+
$content .= '<img src="images/slider/'.$sliderthumb2.'" alt="'.$slidertitle2.'" style="border-radius: 30px; width:100%;">';
102+
$content .= '<br /><br /><br /><br /><br /><br /><br /><br /><br />';
103+
$content .= '<div class="carousel-caption">';
104+
$content .= '<h3>'.$slidertitle2.'</h3>';
105+
$content .= '<p>'.$slidercontent2.'</p>';
106+
$content .= '</div>';
107+
$content .= '</div>';
108+
109+
$content .= '<div style="border-radius: 30px;" class="item">';
110+
$content .= '<img src="images/slider/'.$sliderthumb3.'" alt="'.$slidertitle3.'" style="border-radius: 30px; width:100%;">';
111+
$content .= '<br /><br /><br /><br /><br /><br /><br /><br /><br />';
112+
$content .= '<div class="carousel-caption">';
113+
$content .= '<h3>'.$slidertitle3.'</h3>';
114+
$content .= '<p>'.$slidercontent3.'</p>';
115+
$content .= '</div>';
116+
$content .= '</div>';
117+
118+
$content .= '<div style="border-radius: 30px;" class="item">';
119+
$content .= '<img src="images/slider/'.$sliderthumb4.'" alt="'.$slidertitle4.'" style="border-radius: 30px; width:100%;">';
120+
$content .= '<br /><br /><br /><br /><br /><br /><br /><br /><br />';
121+
$content .= '<div class="carousel-caption">';
122+
$content .= '<h3>'.$slidertitle4.'</h3>';
123+
$content .= '<p>'.$slidercontent4.'</p>';
124+
$content .= '</div>';
125+
$content .= '</div>';
126+
127+
$content .= '<div style="border-radius: 30px;" class="item">';
128+
$content .= '<img src="images/slider/'.$sliderthumb5.'" alt="'.$slidertitle5.'" style="border-radius: 30px; width:100%;">';
129+
$content .= '<br /><br /><br /><br /><br /><br /><br /><br /><br />';
130+
$content .= '<div class="carousel-caption">';
131+
$content .= '<h3>'.$slidertitle5.'</h3>';
132+
$content .= '<p>'.$slidercontent5.'</p>';
133+
$content .= '</div>';
134+
$content .= '</div>';
135+
136+
$content .= '<div style="border-radius: 30px;" class="item">';
137+
$content .= '<img src="images/slider/'.$sliderthumb6.'" alt="'.$slidertitle6.'" style="border-radius: 30px; width:100%;">';
138+
$content .= '<br /><br /><br /><br /><br /><br /><br /><br /><br />';
139+
$content .= '<div class="carousel-caption">';
140+
$content .= '<h3>'.$slidertitle6.'</h3>';
141+
$content .= '<p>'.$slidercontent6.'</p>';
142+
$content .= '</div>';
143+
$content .= '</div>';
144+
145+
146+
$content .= '</div>';
147+
148+
$content .= '<!-- NSN Bootsrap Left and right controls -->';
149+
$content .= '<a class="left carousel-control" href="#myCarousel" data-slide="prev">';
150+
$content .= '<span class="glyphicon glyphicon-chevron-left"></span>';
151+
$content .= '<span class="sr-only">Previous</span>';
152+
$content .= '</a>';
153+
$content .= '<a class="right carousel-control" href="#myCarousel" data-slide="next">';
154+
$content .= '<span class="glyphicon glyphicon-chevron-right"></span>';
155+
$content .= '<span class="sr-only">Next</span>';
156+
$content .= '</a>';
157+
$content .= '</div>';
158+
$content .= '</div>';
159+
160+
?>

0 commit comments

Comments
 (0)