-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMarqueeContainer.php
74 lines (63 loc) · 2.36 KB
/
MarqueeContainer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/* * *********************************************
*
* Project: phpTransformer.com .
* File Location : .
* File Name: .
* Date Created: 00-00-2007.
* Last Modified: 00-00-2007.
* Descriptions: .
* Changes: .
* TODO: CHANGE TO CREATE URL FUNCTION .
* *** Author: Mohsen Mousawi [email protected] .
*
* ********************************************* */
?>
<?php
if (!isset($project)) {
header("location: ");
}
?>
<?php
global $LastLineCode, $idLang, $CustomHead, $Lang, $ThemeName;
$LastLineCode.= '<script src="includes/jquery_news_ticker/includes/jquery.ticker.min.js" type="text/javascript"></script>';
$dbMarque = new db();
$MarqueesLang = $dbMarque->get_results(
"SELECT marqlang.Message ,marques.Link
FROM `marqlang`,marques
WHERE marques.idMarque=marqlang.idmarque
and `idLang`='" . $idLang . "'
and `marques`.`Deleted`<>'1'
and (('" . date('Y-m-d H:i:s') . "' BETWEEN `StartDate` AND `EndDate`)
or `StartDate` = '0000-00-00 00:00:00' )
order by marqlang.idmarque DESC limit 0,10 ;");
$marquee_data = '';
if ($MarqueesLang) {
foreach ($MarqueesLang as $Marquee) {
$Message = $Marquee->Message;
$Message = str_replace(array('"', "'", "\\", "/", ":", "@"), array('', '', '', '', '', ''), $Message);
$Link = $Marquee->Link;
$marquee_data.= '<li class="news-item"><a href="' . $Link . '">' . $Message . '</a></li>';
}//end for
} else {
$marquee_data.= '';
}
$MarqueeText = '<ul id="pt_marquee_ul" class="js-hidden">
' . $marquee_data . '
</ul>
';
//load marqueee theme
$MarqueeTheme = get_include_contents("Themes/$ThemeName/MarqueeContainer.php");
$MarqueeTheme = VarTheme("{ThemeName}", $ThemeName, $MarqueeTheme);
$MarqueeCont = VarTheme("{MarqueeCode}", $MarqueeText, $MarqueeTheme);
$MarqueeCont .= '<script type="text/javascript">
$(function () {
$("#pt_marquee_ul").ticker({
controls: false,
titleText: "' . LatestNews . '",
speed: 0.10,
direction: "' . DirHtml . '"
});
});
</script>';
?>