ADM Menu Style

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • bin9yuz79 wrote:

      Danter14 wrote:

      It's like it uses the same css for placement I'll do it for you quickly. Are you on my version 2.0?
      Hayır, buradayım. 2moons 2.0 PHP =8 by Jekil
      Ama senin sürüm düzenlersen onu urarım sorun değil, sonuç olarak aynı içerik.

      This is my version he just updated it under php 8 as well as the packages
      But the code remains the same.

      Did you add links in the admin panel?
    • Danter14 wrote:

      bin9yuz79 wrote:

      Danter14 wrote:

      It's like it uses the same css for placement I'll do it for you quickly. Are you on my version 2.0?
      Hayır, buradayım. 2moons 2.0 PHP =8 by JekilAma senin sürüm düzenlersen onu urarım sorun değil, sonuç olarak aynı içerik.

      This is my version he just updated it under php 8 as well as the packagesBut the code remains the same.

      Did you add links in the admin panel?
      Hayır, temiz kurulum. Hiçbir ekleme yapmadım henüz.
    • bin9yuz79 wrote:

      Teşekkür ederim.
      Does that suit you?

      Files

      The post was edited 2 times, last by Danter14: Added file for 2moons 2.0 admin panel online menu ().

    • Danter14 wrote:

      You can use the code available in the game it is possible
      Mutlaka deneyeceğim, teşekkürler ama başka bir sorum var. ADM News Page.

      Line:68


      PHP Source Code: ShowNewsPage.php

      1. $template->assign_vars(array(
      2. 'NewsList' => $NewsList,
      3. 'button_submit' => $LNG['button_submit'],
      4. 'nws_total' => sprintf($LNG['nws_total'], (!isset($NewsList) ? count($NewsList) : 0)),
      5. 'nws_news' => $LNG['nws_news'],
      6. 'nws_id' => $LNG['nws_id'],
      7. 'nws_title' => $LNG['nws_title'],
      8. 'nws_date' => $LNG['nws_date'],
      9. 'nws_from' => $LNG['nws_from'],
      10. 'nws_del' => $LNG['nws_del'],
      11. 'nws_create' => $LNG['nws_create'],
      12. 'nws_content' => $LNG['nws_content'],
      13. ));
      Display All
      Images
      • Adsız.png

        101.19 kB, 927×412, viewed 16 times
    • Fix bug

      PHP Source Code

      1. function ShowNewsPage(){
      2. global $LNG, $USER;
      3. $action = (isset($_GET['action']))?$_GET['action']:'';
      4. $NewsList = [];
      5. if($action == 'send') {
      6. $edit_id = HTTP::_GP('id', 0);
      7. $title = $GLOBALS['DATABASE']->sql_escape(HTTP::_GP('title', '', true));
      8. $text = $GLOBALS['DATABASE']->sql_escape(HTTP::_GP('text', '', true));
      9. $query = ($_GET['mode'] == 2) ? "INSERT INTO ".NEWS." (`id` ,`user` ,`date` ,`title` ,`text`) VALUES ( NULL , '".$USER['username']."', '".TIMESTAMP."', '".$title."', '".$text."');" : "UPDATE ".NEWS." SET `title` = '".$title."', `text` = '".$text."', `date` = '".TIMESTAMP."' WHERE `id` = '".$edit_id."' LIMIT 1;";
      10. $GLOBALS['DATABASE']->query($query);
      11. } elseif($action == 'delete' && isset($_GET['id'])) {
      12. $GLOBALS['DATABASE']->query("DELETE FROM ".NEWS." WHERE `id` = '".HTTP::_GP('id', 0)."';");
      13. }
      14. $query = $GLOBALS['DATABASE']->query("SELECT * FROM ".NEWS." ORDER BY id ASC");
      15. while ($u = $GLOBALS['DATABASE']->fetch_array($query)) {
      16. $NewsList[] = array(
      17. 'id' => $u['id'],
      18. 'title' => $u['title'],
      19. 'date' => _date($LNG['php_tdformat'], $u['date'], $USER['timezone']),
      20. 'user' => $u['user'],
      21. 'confirm' => sprintf($LNG['nws_confirm'], $u['title']),
      22. );
      23. }
      24. $template = new template();
      25. if($action == 'edit' && isset($_GET['id'])) {
      26. $News = $GLOBALS['DATABASE']->getFirstRow("SELECT id, title, text FROM ".NEWS." WHERE id = '".$GLOBALS['DATABASE']->sql_escape($_GET['id'])."';");
      27. $template->assign_vars(array(
      28. 'mode' => 1,
      29. 'nws_head' => sprintf($LNG['nws_head_edit'], $News['title']),
      30. 'news_id' => $News['id'],
      31. 'news_title' => $News['title'],
      32. 'news_text' => $News['text'],
      33. ));
      34. } elseif($action == 'create') {
      35. $template->assign_vars(array(
      36. 'mode' => 2,
      37. 'nws_head' => $LNG['nws_head_create'],
      38. 'news_title' => '',
      39. 'news_text' => ''
      40. ));
      41. }
      42. $template->assign_vars(array(
      43. 'NewsList' => $NewsList,
      44. 'button_submit' => $LNG['button_submit'],
      45. 'nws_total' => sprintf($LNG['nws_total'], (!isset($NewsList) ? count($NewsList) : 0)),
      46. 'nws_news' => $LNG['nws_news'],
      47. 'nws_id' => $LNG['nws_id'],
      48. 'nws_title' => $LNG['nws_title'],
      49. 'nws_date' => $LNG['nws_date'],
      50. 'nws_from' => $LNG['nws_from'],
      51. 'nws_del' => $LNG['nws_del'],
      52. 'nws_create' => $LNG['nws_create'],
      53. 'nws_content' => $LNG['nws_content'],
      54. ));
      55. $template->show('NewsPage.tpl');
      56. }
      Display All
    • Danter14 wrote:

      Fix bug

      PHP Source Code

      1. function ShowNewsPage(){
      2. global $LNG, $USER;
      3. $action = (isset($_GET['action']))?$_GET['action']:'';
      4. $NewsList = [];
      5. if($action == 'send') {
      6. $edit_id = HTTP::_GP('id', 0);
      7. $title = $GLOBALS['DATABASE']->sql_escape(HTTP::_GP('title', '', true));
      8. $text = $GLOBALS['DATABASE']->sql_escape(HTTP::_GP('text', '', true));
      9. $query = ($_GET['mode'] == 2) ? "INSERT INTO ".NEWS." (`id` ,`user` ,`date` ,`title` ,`text`) VALUES ( NULL , '".$USER['username']."', '".TIMESTAMP."', '".$title."', '".$text."');" : "UPDATE ".NEWS." SET `title` = '".$title."', `text` = '".$text."', `date` = '".TIMESTAMP."' WHERE `id` = '".$edit_id."' LIMIT 1;";
      10. $GLOBALS['DATABASE']->query($query);
      11. } elseif($action == 'delete' && isset($_GET['id'])) {
      12. $GLOBALS['DATABASE']->query("DELETE FROM ".NEWS." WHERE `id` = '".HTTP::_GP('id', 0)."';");
      13. }
      14. $query = $GLOBALS['DATABASE']->query("SELECT * FROM ".NEWS." ORDER BY id ASC");
      15. while ($u = $GLOBALS['DATABASE']->fetch_array($query)) {
      16. $NewsList[] = array(
      17. 'id' => $u['id'],
      18. 'title' => $u['title'],
      19. 'date' => _date($LNG['php_tdformat'], $u['date'], $USER['timezone']),
      20. 'user' => $u['user'],
      21. 'confirm' => sprintf($LNG['nws_confirm'], $u['title']),
      22. );
      23. }
      24. $template = new template();
      25. if($action == 'edit' && isset($_GET['id'])) {
      26. $News = $GLOBALS['DATABASE']->getFirstRow("SELECT id, title, text FROM ".NEWS." WHERE id = '".$GLOBALS['DATABASE']->sql_escape($_GET['id'])."';");
      27. $template->assign_vars(array(
      28. 'mode' => 1,
      29. 'nws_head' => sprintf($LNG['nws_head_edit'], $News['title']),
      30. 'news_id' => $News['id'],
      31. 'news_title' => $News['title'],
      32. 'news_text' => $News['text'],
      33. ));
      34. } elseif($action == 'create') {
      35. $template->assign_vars(array(
      36. 'mode' => 2,
      37. 'nws_head' => $LNG['nws_head_create'],
      38. 'news_title' => '',
      39. 'news_text' => ''
      40. ));
      41. }
      42. $template->assign_vars(array(
      43. 'NewsList' => $NewsList,
      44. 'button_submit' => $LNG['button_submit'],
      45. 'nws_total' => sprintf($LNG['nws_total'], (!isset($NewsList) ? count($NewsList) : 0)),
      46. 'nws_news' => $LNG['nws_news'],
      47. 'nws_id' => $LNG['nws_id'],
      48. 'nws_title' => $LNG['nws_title'],
      49. 'nws_date' => $LNG['nws_date'],
      50. 'nws_from' => $LNG['nws_from'],
      51. 'nws_del' => $LNG['nws_del'],
      52. 'nws_create' => $LNG['nws_create'],
      53. 'nws_content' => $LNG['nws_content'],
      54. ));
      55. $template->show('NewsPage.tpl');
      56. }
      Display All
      Sorun çözüldü. Teşekkür ederim.