Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Brain cms cant make any news
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="SupahCookie" data-source="post: 401287" data-attributes="member: 56921"><p>[CODE]<?php</p><p> include_once "includes/head.php";</p><p> include_once "includes/header.php";</p><p> include_once "includes/navi.php";</p><p> admin::CheckRank(6);</p><p>?></p><p><aside class="right-side"></p><p> <section class="content"></p><p> <div class="row"></p><p> <div class="col-md-12"></p><p> <section class="panel"></p><p> <header class="panel-heading"></p><p> Maak een niews bericht<br></p><p> <form name="mygallery" action="" method="POST"></p><p> </header></p><p> <div class="panel-body"></p><p> <?php admin::PostNews(); ?></p><p> <div class="form-group"></p><p> <label class="col-sm-2 col-sm-2 control-label">Titel</label></p><p> <div class="col-sm-10"></p><p> <input type="text" value="<?php echo $_SESSION['title']; ?>" name="title"class="form-control"></p><p> </div></p><p> </div><br><br></p><p> <div class="form-group"></p><p> <label class="col-sm-2 col-sm-2 control-label">Klein Verhaal</label></p><p> <div class="col-sm-10"></p><p> <input type="text" value="<?php echo $_SESSION['slogan']; ?>" name="slogan"class="form-control"></p><p> </div></p><p> </div><br><br></p><p> <div class="form-group"></p><p> <label class="col-sm-2 col-sm-2 control-label">Image</label></p><p> <div class="col-sm-10"></p><p> <?php</p><p> echo '<select onChange="showimage()" class="form-control" name="topstory" style=" width: 100%;font-size: 14px;"';</p><p> if ($handle = opendir(''.$_SERVER['DOCUMENT_ROOT'].'/adminpan/img/newsimages'))</p><p> { </p><p> while (false !== ($file = readdir($handle)))</p><p> {</p><p> echo'';</p><p> if ($file == '.' || $file == '..')</p><p> {</p><p> continue;</p><p> } </p><p> echo '<option name="topstory" data-image="'.$config['hotelUrl'].'/adminpan/img/newsimages/' . $file . '" value="'.$config['hotelUrl'].'/adminpan/img/newsimages/' . $file . '"';</p><p> if (isset($_POST['topstory']) && $_POST['topstory'] == $file)</p><p> {</p><p> echo ' selected';</p><p> }</p><p> echo '>' . $file . '</option>';</p><p> }</p><p> }</p><p> echo '</select>';</p><p> ?></p><p> <br></p><p> <style></p><p> .imagebox {</p><p> width: auto;</p><p> background-repeat: repeat-y;</p><p> border-radius: 6px;</p><p> float: left;</p><p> margin-right: 0.72pc;</p><p> margin-bottom: 10px;</p><p> webkit-box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important;</p><p> -moz-box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important;</p><p> box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important;</p><p> }</p><p> </style></p><p> <div class="imagebox"></p><p> <img style="border-radius: 6px;"src="<?= $config['hotelUrl'];?>/adminpan/img/newsimages/choose.gif" name="topstory" border=0></p><p> </div></p><p> <br><br></p><p> </div></p><p> </div></p><p> <br><br></p><p> <script src="<?= $config['hotelUrl'];?>/adminpan/js/ckeditor/ckeditor.js"></script></p><p> <div class="form-group"></p><p> <label class="col-sm-2 col-sm-2 control-label">Nieuws bericht</label></p><p> <div class="col-sm-10"></p><p> <textarea id="editor1" name="news" rows="15" cols="80"><?php echo $_SESSION['news']; ?></textarea></p><p> </div></p><p> </div><br><br></p><p> <button style="width: 130px;</p><p> float: right;</p><p> margin-right: 14px;" name="postnews" type="submit" class="btn btn-success">Bericht Plaatsen</button></p><p> </div></p><p> </section></p><p> </div></p><p> </form></p><p> </header></p><p> <?php</p><p> if (User::userData('rank') > '6')</p><p> {</p><p> ?></p><p> <div class="col-md-12"></p><p> <section class="panel"></p><p> <header class="panel-heading"></p><p> Alle nieuws berichten<br></p><p> <div class="panel-body"></p><p> <?php admin::DeleteNews(); ?></p><p> <table class="table table-striped table-bordered table-condensed"></p><p> <tbody></p><p> <?php</p><p> </p><p> </p><p> </p><p> $getArticles = $dbh->prepare("SELECT * FROM cms_news ORDER BY id DESC");</p><p> $getArticles->execute();</p><p> </p><p> while($news = $getArticles->fetch())</p><p> {</p><p> echo'<tr></p><p> <td>'.$news["id"].'</td></p><p> <td>'.$news["title"].'</td></p><p> <td>'.$news["shortstory"].'</td></p><p> <td>'.$news["author"].'</td></p><p> <td>'. date('d-m-Y', $news['date']).'</td></p><p> <td><center><a href="'.$config['hotelUrl'].'/adminpan/news/edit/'.$news["id"].'"><i style="padding-top: 5px; color:green;" class="fa fa-edit"></i></a></td></p><p> <td><a href='.$config['hotelUrl'].'/adminpan/news/delete/'.$news["id"].'><i style="padding-top: 4px; color:red;" class="fa fa-trash"></i></center></a></td></p><p> </tr>';</p><p> }</p><p> ?></p><p> </p><p> </p><p> </p><p> </p><p> </tbody></p><p> </table></p><p> </div></p><p> <?php</p><p> }</p><p> else{</p><p> ?></p><p> <?php</p><p> }</p><p> ?></p><p> </div></p><p> </div></p><p> <script></p><p> // Replace the <textarea id="editor1"> with a CKEditor</p><p> // instance, using default configuration.</p><p> CKEDITOR.replace( 'editor1' );</p><p> </script></p><p> <?php</p><p> include_once "includes/footer.php";</p><p> include_once "includes/script.php";</p><p> ?>[/CODE]</p><p>[doublepost=1487917289,1487917252][/doublepost]I also have one, for viewing news ( iguess.. same name..) but this one is in the adminpanel</p><p>[doublepost=1487933794][/doublepost]SQL] ALTER TABLE cms_news ADD COLUMN date INT(11) NOT NULL;</p><p>[Err] 1146 - Table 'plus.cms_news' doesn't exist</p><p></p><p>Error if i use that code</p></blockquote><p></p>
[QUOTE="SupahCookie, post: 401287, member: 56921"] [CODE]<?php include_once "includes/head.php"; include_once "includes/header.php"; include_once "includes/navi.php"; admin::CheckRank(6); ?> <aside class="right-side"> <section class="content"> <div class="row"> <div class="col-md-12"> <section class="panel"> <header class="panel-heading"> Maak een niews bericht<br> <form name="mygallery" action="" method="POST"> </header> <div class="panel-body"> <?php admin::PostNews(); ?> <div class="form-group"> <label class="col-sm-2 col-sm-2 control-label">Titel</label> <div class="col-sm-10"> <input type="text" value="<?php echo $_SESSION['title']; ?>" name="title"class="form-control"> </div> </div><br><br> <div class="form-group"> <label class="col-sm-2 col-sm-2 control-label">Klein Verhaal</label> <div class="col-sm-10"> <input type="text" value="<?php echo $_SESSION['slogan']; ?>" name="slogan"class="form-control"> </div> </div><br><br> <div class="form-group"> <label class="col-sm-2 col-sm-2 control-label">Image</label> <div class="col-sm-10"> <?php echo '<select onChange="showimage()" class="form-control" name="topstory" style=" width: 100%;font-size: 14px;"'; if ($handle = opendir(''.$_SERVER['DOCUMENT_ROOT'].'/adminpan/img/newsimages')) { while (false !== ($file = readdir($handle))) { echo''; if ($file == '.' || $file == '..') { continue; } echo '<option name="topstory" data-image="'.$config['hotelUrl'].'/adminpan/img/newsimages/' . $file . '" value="'.$config['hotelUrl'].'/adminpan/img/newsimages/' . $file . '"'; if (isset($_POST['topstory']) && $_POST['topstory'] == $file) { echo ' selected'; } echo '>' . $file . '</option>'; } } echo '</select>'; ?> <br> <style> .imagebox { width: auto; background-repeat: repeat-y; border-radius: 6px; float: left; margin-right: 0.72pc; margin-bottom: 10px; webkit-box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important; -moz-box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important; box-shadow: 0 3px rgba(0,0,0,.17),inset 0px 0px 0px 1px rgba(0,0,0,0.31),inset 0 0 0 2px rgba(255,255,255,0.44)!important; } </style> <div class="imagebox"> <img style="border-radius: 6px;"src="<?= $config['hotelUrl'];?>/adminpan/img/newsimages/choose.gif" name="topstory" border=0> </div> <br><br> </div> </div> <br><br> <script src="<?= $config['hotelUrl'];?>/adminpan/js/ckeditor/ckeditor.js"></script> <div class="form-group"> <label class="col-sm-2 col-sm-2 control-label">Nieuws bericht</label> <div class="col-sm-10"> <textarea id="editor1" name="news" rows="15" cols="80"><?php echo $_SESSION['news']; ?></textarea> </div> </div><br><br> <button style="width: 130px; float: right; margin-right: 14px;" name="postnews" type="submit" class="btn btn-success">Bericht Plaatsen</button> </div> </section> </div> </form> </header> <?php if (User::userData('rank') > '6') { ?> <div class="col-md-12"> <section class="panel"> <header class="panel-heading"> Alle nieuws berichten<br> <div class="panel-body"> <?php admin::DeleteNews(); ?> <table class="table table-striped table-bordered table-condensed"> <tbody> <?php $getArticles = $dbh->prepare("SELECT * FROM cms_news ORDER BY id DESC"); $getArticles->execute(); while($news = $getArticles->fetch()) { echo'<tr> <td>'.$news["id"].'</td> <td>'.$news["title"].'</td> <td>'.$news["shortstory"].'</td> <td>'.$news["author"].'</td> <td>'. date('d-m-Y', $news['date']).'</td> <td><center><a href="'.$config['hotelUrl'].'/adminpan/news/edit/'.$news["id"].'"><i style="padding-top: 5px; color:green;" class="fa fa-edit"></i></a></td> <td><a href='.$config['hotelUrl'].'/adminpan/news/delete/'.$news["id"].'><i style="padding-top: 4px; color:red;" class="fa fa-trash"></i></center></a></td> </tr>'; } ?> </tbody> </table> </div> <?php } else{ ?> <?php } ?> </div> </div> <script> // Replace the <textarea id="editor1"> with a CKEditor // instance, using default configuration. CKEDITOR.replace( 'editor1' ); </script> <?php include_once "includes/footer.php"; include_once "includes/script.php"; ?>[/CODE] [doublepost=1487917289,1487917252][/doublepost]I also have one, for viewing news ( iguess.. same name..) but this one is in the adminpanel [doublepost=1487933794][/doublepost]SQL] ALTER TABLE cms_news ADD COLUMN date INT(11) NOT NULL; [Err] 1146 - Table 'plus.cms_news' doesn't exist Error if i use that code [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Brain cms cant make any news
Top