|
65 | 65 | $time = str_replace(".json", "", $datei); |
66 | 66 | $cont = array(); |
67 | 67 | $json = file_get_contents("../../files/news/".$datei); |
68 | | - $cont = json_decode($json, true); ?> |
| 68 | + $cont = json_decode($json, true); |
69 | 69 |
|
70 | | - <div class="card" id="<?php xssEcho($time); ?>"> |
71 | | - <div class="card-block card-block-header"> |
72 | | - <div style="float:left;"> |
73 | | - <h4 class="card-title"><i class="fa fa-newspaper-o"></i> <?php xssEcho($cont['title']); ?></h4> |
| 70 | + if(ctype_digit($time) != null) { ?> |
| 71 | + |
| 72 | + <div class="card" id="<?php xssEcho($time); ?>"> |
| 73 | + <div class="card-block card-block-header"> |
| 74 | + <div style="float:left;"> |
| 75 | + <h4 class="card-title"><i class="fa fa-newspaper-o"></i> <?php xssEcho($cont['title']); ?></h4> |
| 76 | + </div> |
| 77 | + <div style="float:right;"> |
| 78 | + <?php echo date("d.m.Y (G:i)", $time); ?> |
| 79 | + </div> |
| 80 | + <h6 style="clear:both;" class="card-subtitle text-muted"><?php xssEcho($cont['subtitle']); ?></h6> |
74 | 81 | </div> |
75 | | - <div style="float:right;"> |
76 | | - <?php echo date("d.m.Y (G:i)", $time); ?> |
| 82 | + <div class="card-block"> |
| 83 | + <p style="font-style:normal;"> |
| 84 | + <?php echo $cont['content']; ?> |
| 85 | + </p> |
| 86 | + <?php if($LoggedIn && $user_right['right_hp_main'] == $mysql_keys['right_hp_main']) { ?> |
| 87 | + <div style="width:20%;float:right;"> |
| 88 | + <button onClick="AreYouSure('<?php echo $language['delete_news']; ?>', 'deleteNews(\'<?php echo $time; ?>\');');" style="width:100%;" class="btn btn-danger btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> <font class="hidden-xs-down"><?php echo $language['delete']; ?></font></button> |
| 89 | + </div> |
| 90 | + <div style="clear:both;"></div> |
| 91 | + <?php }; ?> |
77 | 92 | </div> |
78 | | - <h6 style="clear:both;" class="card-subtitle text-muted"><?php xssEcho($cont['subtitle']); ?></h6> |
79 | 93 | </div> |
80 | | - <div class="card-block"> |
81 | | - <p style="font-style:normal;"> |
82 | | - <?php echo $cont['content']; ?> |
83 | | - </p> |
84 | | - <?php if($LoggedIn && $user_right['right_hp_main'] == $mysql_keys['right_hp_main']) { ?> |
85 | | - <div style="width:20%;float:right;"> |
86 | | - <button onClick="AreYouSure('<?php echo $language['delete_news']; ?>', 'deleteNews(\'<?php echo $time; ?>\');');" style="width:100%;" class="btn btn-danger btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> <font class="hidden-xs-down"><?php echo $language['delete']; ?></font></button> |
87 | | - </div> |
88 | | - <div style="clear:both;"></div> |
89 | | - <?php }; ?> |
90 | | - </div> |
91 | | - </div> |
92 | | - |
93 | | - <?php }; |
| 94 | + <?php }; |
| 95 | + }; |
94 | 96 | }; |
95 | 97 | } |
96 | 98 | else if(CUSTOM_NEWS_PAGE == "true") |
|
0 commit comments