Advertisement
Guest User

UserSpice 4.3 Dev - admin.php

a guest
Sep 26th, 2017
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 23.23 KB | None | 0 0
  1. <?php
  2. /*
  3. UserSpice 4
  4. An Open Source PHP User Management System
  5. by the UserSpice Team at http://UserSpice.com
  6.  
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation, either version 3 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. ?>
  21. <?php require_once 'init.php'; ?>
  22. <?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?>
  23. <?php require_once $abs_us_root.$us_url_root.'users/includes/navigation.php'; ?>
  24.  
  25. <?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>
  26. <link href="css/admin-tabs.css" rel="stylesheet">
  27. <?php
  28. $pagePermissions = fetchPagePermissions(4);
  29. $tab = Input::get('tab');
  30.  
  31. // To make this panel super admin only, uncomment out the lines below
  32. // if($user->data()->id !='1'){
  33. //   Redirect::to('account.php');
  34. // }
  35.  
  36. //PHP Goes Here!
  37. delete_user_online(); //Deletes sessions older than 24 hours
  38. if($_SERVER["REMOTE_ADDR"]=="127.0.0.1" || $_SERVER["REMOTE_ADDR"]=="::1" || $_SERVER["REMOTE_ADDR"]=="localhost"){
  39. $local = True;
  40. }else{
  41. $local = False;
  42. }
  43.  
  44. $errors = $successes = [];
  45.  
  46. //Find users who have logged in in X amount of time.
  47. $date = date("Y-m-d H:i:s");
  48.  
  49. $hour = date("Y-m-d H:i:s", strtotime("-1 hour", strtotime($date)));
  50. $today = date("Y-m-d H:i:s", strtotime("-1 day", strtotime($date)));
  51. $week = date("Y-m-d H:i:s", strtotime("-1 week", strtotime($date)));
  52. $month = date("Y-m-d H:i:s", strtotime("-1 month", strtotime($date)));
  53.  
  54. $last24=time()-86400;
  55.  
  56. $recentUsersQ = $db->query("SELECT * FROM users_online WHERE timestamp > ? ORDER BY timestamp DESC",array($last24));
  57. $recentUsersCount = $recentUsersQ->count();
  58. $recentUsers = $recentUsersQ->results();
  59.  
  60. $usersHourQ = $db->query("SELECT * FROM users WHERE last_login > ?",array($hour));
  61. $usersHour = $usersHourQ->results();
  62. $hourCount = $usersHourQ->count();
  63.  
  64. $usersTodayQ = $db->query("SELECT * FROM users WHERE last_login > ?",array($today));
  65. $dayCount = $usersTodayQ->count();
  66. $usersDay = $usersTodayQ->results();
  67.  
  68. $usersWeekQ = $db->query("SELECT username FROM users WHERE last_login > ?",array($week));
  69. $weekCount = $usersWeekQ->count();
  70.  
  71. $usersMonthQ = $db->query("SELECT username FROM users WHERE last_login > ?",array($month));
  72. $monthCount = $usersMonthQ->count();
  73.  
  74. $usersQ = $db->query("SELECT * FROM users");
  75. $user_count = $usersQ->count();
  76.  
  77. $pagesQ = $db->query("SELECT * FROM pages");
  78. $page_count = $pagesQ->count();
  79.  
  80. $levelsQ = $db->query("SELECT * FROM permissions");
  81. $level_count = $levelsQ->count();
  82.  
  83. $settingsQ = $db->query("SELECT * FROM settings");
  84. $settings = $settingsQ->first();
  85.  
  86. $tomC = $db->query("SELECT * FROM audit")->count();
  87.  
  88. if($settings->recap_public  == "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"  && $settings->recaptcha != 0) {
  89. $recapWarning = 1;
  90. }else{
  91. $recapWarning = 0;
  92. }
  93.  
  94. $pwWarning = $db->query("SELECT password FROM users WHERE id = 1")->first();
  95. if($pwWarning->password == "$2y$12$1v06jm2KMOXuuo3qP7erTuTIJFOnzhpds1Moa8BadnUUeX0RV3ex."){
  96.     $pwWarning = 1;
  97. }else{
  98.     $pwWarning = 0;
  99. }
  100.  
  101.  
  102. if(!emptY($_POST)) {
  103. if(!empty($_POST['settings'])){
  104.     $token = $_POST['csrf'];
  105.     if(!Token::check($token)){
  106.         include('../usersc/scripts/token_error.php');
  107.     }
  108.  
  109.     if($settings->recaptcha != $_POST['recaptcha']) {
  110.         $recaptcha = Input::get('recaptcha');
  111.         $fields=array('recaptcha'=>$recaptcha);
  112.         $db->update('settings',1,$fields);
  113.         $successes[] = "Updated recaptcha.";
  114.         logger($user->data()->id,"Setting Change","Changed recaptcha from $settings->recaptcha to $recaptcha.");
  115.     }
  116.  
  117.     if($settings->recap_public != $_POST['recap_public']) {
  118.         $recap_public = Input::get('recap_public');
  119.         $fields=array('recap_public'=>$recap_public);
  120.         $db->update('settings',1,$fields);
  121.         $successes[] = "Updated recaptcha key.";
  122.         logger($user->data()->id,"Setting Change","Changed recaptcha public key from $settings->recap_public to $recap_public.");
  123.     }
  124.  
  125.     if($settings->recap_private != $_POST['recap_private']) {
  126.         $recap_private = Input::get('recap_private');
  127.         $fields=array('recap_private'=>$recap_private);
  128.         $db->update('settings',1,$fields);
  129.         $successes[] = "Updated recaptcha key.";
  130.         logger($user->data()->id,"Setting Change","Changed recaptcha private key from $settings->recap_private to $recap_private.");
  131.     }
  132.  
  133.     if($settings->messaging != $_POST['messaging']) {
  134.         $messaging = Input::get('messaging');
  135.         $fields=array('messaging'=>$messaging);
  136.         $db->update('settings',1,$fields);
  137.         $successes[] = "Updated messaging.";
  138.         logger($user->data()->id,"Setting Change","Changed messaging from $settings->messaging to $messaging.");
  139.     }
  140.  
  141.     if($settings->echouser != $_POST['echouser']) {
  142.         $echouser = Input::get('echouser');
  143.         $fields=array('echouser'=>$echouser);
  144.         $db->update('settings',1,$fields);
  145.         $successes[] = "Updated echouser.";
  146.         logger($user->data()->id,"Setting Change","Changed echouser from $settings->echouser to $echouser.");
  147.     }
  148.  
  149.     if($settings->wys != $_POST['wys']) {
  150.         $wys = Input::get('wys');
  151.         $fields=array('wys'=>$wys);
  152.         $db->update('settings',1,$fields);
  153.         $successes[] = "Updated wys.";
  154.         logger($user->data()->id,"Setting Change","Changed wys from $settings->wys to $wys.");
  155.     }
  156.  
  157.     if($settings->site_name != $_POST['site_name']) {
  158.         $site_name = Input::get('site_name');
  159.         $fields=array('site_name'=>$site_name);
  160.         $db->update('settings',1,$fields);
  161.         $successes[] = "Updated site_name.";
  162.         logger($user->data()->id,"Setting Change","Changed site_name from $settings->site_name to $site_name.");
  163.     }
  164.  
  165.     if($settings->force_ssl != $_POST['force_ssl']) {
  166.         $force_ssl = Input::get('force_ssl');
  167.         $fields=array('force_ssl'=>$force_ssl);
  168.         $db->update('settings',1,$fields);
  169.         $successes[] = "Updated force_ssl.";
  170.         logger($user->data()->id,"Setting Change","Changed force_ssl from $settings->force_ssl to $force_ssl.");
  171.     }
  172.  
  173.     if( $_POST['force_user_pr'] == 1) {
  174.         $db->query("UPDATE users SET force_pr = 1");
  175.         $successes[] = "Requiring all users to reset their password.";
  176.         logger($user->data()->id,"User Manager","Forcing all users to reset password.");
  177.     }
  178.     if($settings->force_pr != $_POST['force_pr']) {
  179.         $force_pr = Input::get('force_pr');
  180.         $fields=array('force_pr'=>$force_pr);
  181.         $db->update('settings',1,$fields);
  182.         $successes[] = "Updated force_pr.";
  183.         logger($user->data()->id,"Setting Change","Changed force_pr from $settings->force_pr to $force_pr.");
  184.     }
  185.  
  186.     if($settings->site_offline != $_POST['site_offline']) {
  187.         $site_offline = Input::get('site_offline');
  188.         $fields=array('site_offline'=>$site_offline);
  189.         $db->update('settings',1,$fields);
  190.         $successes[] = "Updated site_offline.";
  191.         logger($user->data()->id,"Setting Change","Changed site_offline from $settings->site_offline to $site_offline.");
  192.     }
  193.     if($settings->track_guest != $_POST['track_guest']) {
  194.         $track_guest = Input::get('track_guest');
  195.         $fields=array('track_guest'=>$track_guest);
  196.         $db->update('settings',1,$fields);
  197.         $successes[] = "Updated track_guest.";
  198.         logger($user->data()->id,"Setting Change","Changed track_guest from $settings->track_guest to $track_guest.");
  199.     }
  200.  
  201.     if($settings->permission_restriction != $_POST['permission_restriction']) {
  202.         $permission_restriction = Input::get('permission_restriction');
  203.         if(empty($permission_restriction)) { $permission_restriction==0; }
  204.         $fields=array('permission_restriction'=>$permission_restriction);
  205.         $db->update('settings',1,$fields);
  206.         $successes[] = "Updated permission_restriction.";
  207.         logger($user->data()->id,"Setting Change","Changed permission_restriction from $settings->permission_restriction to $permission_restriction.");
  208.     }
  209.  
  210.     if($settings->page_permission_restriction != $_POST['page_permission_restriction']) {
  211.         $page_permission_restriction = Input::get('page_permission_restriction');
  212.         if(empty($page_permission_restriction)) { $page_permission_restriction==0; }
  213.         $fields=array('page_permission_restriction'=>$page_permission_restriction);
  214.         $db->update('settings',1,$fields);
  215.         $successes[] = "Updated page_permission_restriction.";
  216.         logger($user->data()->id,"Setting Change","Changed page_permission_restriction from $settings->page_permission_restriction to $page_permission_restriction.");
  217.     }
  218.  
  219.     if($settings->page_default_private != $_POST['page_default_private']) {
  220.         $page_default_private = Input::get('page_default_private');
  221.         if(empty($page_default_private)) { $page_default_private==0; }
  222.         $fields=array('page_default_private'=>$page_default_private);
  223.         $db->update('settings',1,$fields);
  224.         $successes[] = "Updated page_default_private.";
  225.         logger($user->data()->id,"Setting Change","Changed page_default_private from $settings->page_default_private to $page_default_private.");
  226.     }
  227.  
  228.     //Redirect::to('admin.php?tab='.$tab);
  229. }
  230.  
  231. if(!empty($_POST['css'])){
  232.     if($settings->us_css1 != $_POST['us_css1']) {
  233.         $us_css1 = Input::get('us_css1');
  234.         $fields=array('us_css1'=>$us_css1);
  235.         $db->update('settings',1,$fields);
  236.         $successes[] = "Updated us_css1.";
  237.         logger($user->data()->id,"Setting Change","Changed us_css1 from $settings->us_css1 to $us_css1.");
  238.     }
  239.     if($settings->us_css2 != $_POST['us_css2']) {
  240.         $us_css2 = Input::get('us_css2');
  241.         $fields=array('us_css2'=>$us_css2);
  242.         $db->update('settings',1,$fields);
  243.         $successes[] = "Updated us_css2.";
  244.         logger($user->data()->id,"Setting Change","Changed us_css2 from $settings->us_css2 to $us_css2.");
  245.     }
  246.  
  247.     if($settings->us_css3 != $_POST['us_css3']) {
  248.         $us_css3 = Input::get('us_css3');
  249.         $fields=array('us_css3'=>$us_css3);
  250.         $db->update('settings',1,$fields);
  251.         $successes[] = "Updated us_css3.";
  252.         logger($user->data()->id,"Setting Change","Changed us_css3 from $settings->us_css3 to $us_css3.");
  253.     }
  254.     //Redirect::to('admin.php?tab='.$tab);
  255. }
  256.  
  257. if(!empty($_POST['register'])){
  258.     if($settings->auto_assign_un != $_POST['auto_assign_un']) {
  259.         $auto_assign_un = Input::get('auto_assign_un');
  260.         if(empty($auto_assign_un)) { $auto_assign_un==0; }
  261.         $fields=array('auto_assign_un'=>$auto_assign_un);
  262.         $db->update('settings',1,$fields);
  263.         $successes[] = "Updated auto_assign_un.";
  264.         logger($user->data()->id,"Setting Change","Changed auto_assign_un from $settings->auto_assign_un to $auto_assign_un.");
  265.     }
  266.  
  267.     if($settings->change_un != $_POST['change_un']) {
  268.         $change_un = Input::get('change_un');
  269.         $fields=array('change_un'=>$change_un);
  270.         $db->update('settings',1,$fields);
  271.         $successes[] = "Updated change_un.";
  272.         logger($user->data()->id,"Setting Change","Changed change_un from $settings->change_un to $change_un.");
  273.     }
  274.  
  275.     if($settings->req_cap != $_POST['req_cap']) {
  276.         $req_cap = Input::get('req_cap');
  277.         $fields=array('req_cap'=>$req_cap);
  278.         $db->update('settings',1,$fields);
  279.         $successes[] = "Updated req_cap.";
  280.         logger($user->data()->id,"Setting Change","Changed req_cap from $settings->req_cap to $req_cap.");
  281.     }
  282.  
  283.     if($settings->req_num != $_POST['req_num']) {
  284.         $req_num = Input::get('req_num');
  285.         $fields=array('req_num'=>$req_num);
  286.         $db->update('settings',1,$fields);
  287.         $successes[] = "Updated req_num.";
  288.         logger($user->data()->id,"Setting Change","Changed req_num from $settings->req_num to $req_num.");
  289.     }
  290.  
  291.     if($settings->min_pw != $_POST['min_pw']) {
  292.         $min_pw = Input::get('min_pw');
  293.         $fields=array('min_pw'=>$min_pw);
  294.         $db->update('settings',1,$fields);
  295.         $successes[] = "Updated min_pw.";
  296.         logger($user->data()->id,"Setting Change","Changed min_pw from $settings->min_pw to $min_pw.");
  297.     }
  298.  
  299.     if($settings->max_pw != $_POST['max_pw']) {
  300.         $max_pw = Input::get('max_pw');
  301.         $fields=array('max_pw'=>$max_pw);
  302.         $db->update('settings',1,$fields);
  303.         $successes[] = "Updated max_pw.";
  304.         logger($user->data()->id,"Setting Change","Changed max_pw from $settings->max_pw to $max_pw.");
  305.     }
  306.  
  307.     if($settings->min_un != $_POST['min_un']) {
  308.         $min_un = Input::get('min_un');
  309.         $fields=array('min_un'=>$min_un);
  310.         $db->update('settings',1,$fields);
  311.         $successes[] = "Updated min_un.";
  312.         logger($user->data()->id,"Setting Change","Changed min_un from $settings->min_un to $min_un.");
  313.     }
  314.  
  315.     if($settings->max_un != $_POST['max_un']) {
  316.         $max_un = Input::get('max_un');
  317.         $fields=array('max_un'=>$max_un);
  318.         $db->update('settings',1,$fields);
  319.         $successes[] = "Updated max_un.";
  320.         logger($user->data()->id,"Setting Change","Changed max_un from $settings->max_un to $max_un.");
  321.     }
  322. }
  323.  
  324. if(!empty($_POST['social'])){
  325.     if($settings->glogin != $_POST['glogin']) {
  326.         $glogin = Input::get('glogin');
  327.         $fields=array('glogin'=>$glogin);
  328.         $db->update('settings',1,$fields);
  329.         $successes[] = "Updated glogin.";
  330.         logger($user->data()->id,"Setting Change","Changed glogin from $settings->glogin to $glogin.");
  331.     }
  332.  
  333.     if($settings->fblogin != $_POST['fblogin']) {
  334.         $fblogin = Input::get('fblogin');
  335.         $fields=array('fblogin'=>$fblogin);
  336.         $db->update('settings',1,$fields);
  337.         $successes[] = "Updated fblogin.";
  338.         logger($user->data()->id,"Setting Change","Changed fblogin from $settings->fblogin to $fblogin.");
  339.     }
  340.  
  341.     if($settings->gid != $_POST['gid']) {
  342.         $gid = Input::get('gid');
  343.         $fields=array('gid'=>$gid);
  344.         $db->update('settings',1,$fields);
  345.         $successes[] = "Updated gid.";
  346.         logger($user->data()->id,"Setting Change","Changed gid from $settings->gid to $gid.");
  347.     }
  348.  
  349.     if($settings->gsecret != $_POST['gsecret']) {
  350.         $gsecret = Input::get('gsecret');
  351.         $fields=array('gsecret'=>$gsecret);
  352.         $db->update('settings',1,$fields);
  353.         $successes[] = "Updated gsecret.";
  354.         logger($user->data()->id,"Setting Change","Changed gsecret from $settings->gsecret to $gsecret.");
  355.     }
  356.  
  357.     if($settings->gredirect != $_POST['gredirect']) {
  358.         $gredirect = Input::get('gredirect');
  359.         $fields=array('gredirect'=>$gredirect);
  360.         $db->update('settings',1,$fields);
  361.         $successes[] = "Updated gredirect.";
  362.         logger($user->data()->id,"Setting Change","Changed gredirect from $settings->gredirect to $gredirect.");
  363.     }
  364.  
  365.     if($settings->ghome != $_POST['ghome']) {
  366.         $ghome = Input::get('ghome');
  367.         $fields=array('ghome'=>$ghome);
  368.         $db->update('settings',1,$fields);
  369.         $successes[] = "Updated ghome.";
  370.         logger($user->data()->id,"Setting Change","Changed ghome from $settings->ghome to $ghome.");
  371.     }
  372.  
  373.     if($settings->fbid != $_POST['fbid']) {
  374.         $fbid = Input::get('fbid');
  375.         $fields=array('fbid'=>$fbid);
  376.         $db->update('settings',1,$fields);
  377.         $successes[] = "Updated fbid.";
  378.         logger($user->data()->id,"Setting Change","Changed fbid from $settings->fbid to $fbid.");
  379.     }
  380.  
  381.     if($settings->fbsecret != $_POST['fbsecret']) {
  382.         $fbsecret = Input::get('fbsecret');
  383.         $fields=array('fbsecret'=>$fbsecret);
  384.         $db->update('settings',1,$fields);
  385.         $successes[] = "Updated fbsecret.";
  386.         logger($user->data()->id,"Setting Change","Changed fbsecret from $settings->fbsecret to $fbsecret.");
  387.     }
  388.  
  389.     if($settings->fbcallback != $_POST['fbcallback']) {
  390.         $fbcallback = Input::get('fbcallback');
  391.         $fields=array('fbcallback'=>$fbcallback);
  392.         $db->update('settings',1,$fields);
  393.         $successes[] = "Updated fbcallback.";
  394.         logger($user->data()->id,"Setting Change","Changed fbcallback from $settings->fbcallback to $fbcallback.");
  395.     }
  396.  
  397.     if($settings->graph_ver != $_POST['graph_ver']) {
  398.         $graph_ver = Input::get('graph_ver');
  399.         $fields=array('graph_ver'=>$graph_ver);
  400.         $db->update('settings',1,$fields);
  401.         $successes[] = "Updated graph_ver.";
  402.         logger($user->data()->id,"Setting Change","Changed graph_ver from $settings->graph_ver to $graph_ver.");
  403.     }
  404.  
  405.     if($settings->finalredir != $_POST['finalredir']) {
  406.         $finalredir = Input::get('finalredir');
  407.         $fields=array('finalredir'=>$finalredir);
  408.         $db->update('settings',1,$fields);
  409.         $successes[] = "Updated finalredir.";
  410.         logger($user->data()->id,"Setting Change","Changed finalredir from $settings->finalredir to $finalredir.");
  411.     }
  412.  
  413.     //Redirect::to('admin.php?tab='.$tab);
  414. }
  415. $settingsQ = $db->query("SELECT * FROM settings");
  416. $settings = $settingsQ->first();
  417. }
  418.  
  419. ?>
  420. <div id="page-wrapper"> <!-- leave in place for full-screen backgrounds etc -->
  421.     <div class="container"> <!-- -fluid -->
  422. <?php
  423. include('includes/migrations.php');
  424. if($pwWarning == 1 && !$local){ ?>
  425.     <div class="alert alert-danger">
  426.       <strong>Warning!</strong> Please change the default password for the user 'admin' by clicking the manage users panel below.
  427.     </div>
  428. <?php } ?>
  429.  
  430. <?php if($recapWarning == 1 && !$local){ ?>
  431.     <div class="alert alert-danger">
  432.       <strong>Warning!</strong> You are using the default reCaptcha keys. Please change them before going live.
  433.     </div>
  434. <?php } ?>
  435.         <h1 class="text-center">UserSpice Dashboard Version <?=$user_spice_ver?></h1>
  436.  
  437.         <div class="well well-lg text-center">
  438.             <a href="check_updates.php" class="btn btn-primary">Check for Updates</a>
  439.             <a href="admin_backup.php" class="btn btn-primary">Backup UserSpice</a>
  440.             <a href="cron_manager.php" class="btn btn-primary">Cron Manager</a>
  441.             <a href="admin_messages.php" class="btn btn-primary">Manage Messages</a>
  442.             <a href="mqtt_settings.php" class="btn btn-primary">MQTT Settings</a>
  443.  
  444.  
  445.         </div>
  446.  
  447.         <?=resultBlock($errors,$successes);?>
  448.  
  449.         <div class="row"> <!-- row for Users, Permissions, Pages, Email settings panels -->
  450.             <h2>Admin Panels</h2>
  451.             <!-- Users Panel -->
  452.             <div class="col-xs-6 col-md-3">
  453.                 <div class="panel panel-default">
  454.                     <div class="panel-heading"><strong>Users</strong></div>
  455.                     <div class="panel-body text-center"><div class="huge"> <i class='fa fa-user fa-1x'></i> <?=$user_count?></div></div>
  456.                     <div class="panel-footer">
  457.                         <span class="pull-left"><a href="admin_users.php">Manage</a></span>
  458.                         <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
  459.                         <div class="clearfix"></div>
  460.                     </div> <!-- /panel-footer -->
  461.                 </div><!-- /panel -->
  462.             </div><!-- /col -->
  463.  
  464.             <!-- Permissions Panel -->
  465.             <div class="col-xs-6 col-md-3">
  466.                 <div class="panel panel-default">
  467.                     <div class="panel-heading"><strong>Permission Levels</strong></div>
  468.                     <div class="panel-body text-center"><div class="huge"> <i class='fa fa-lock fa-1x'></i> <?=$level_count?></div></div>
  469.                     <div class="panel-footer">
  470.                         <span class="pull-left"><a href="admin_permissions.php">Manage</a></span>
  471.                         <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
  472.                         <div class="clearfix"></div>
  473.                     </div> <!-- /panel-footer -->
  474.                 </div><!-- /panel -->
  475.             </div> <!-- /.col -->
  476.  
  477.             <!-- Pages Panel -->
  478.             <div class="col-xs-6 col-md-3">
  479.                 <div class="panel panel-default">
  480.                     <div class="panel-heading"><strong>Pages</strong></div>
  481.                     <div class="panel-body  text-center"><div class="huge"> <i class='fa fa-file-text fa-1x'></i> <?=$page_count?></div></div>
  482.                     <div class="panel-footer">
  483.                         <span class="pull-left"><a href="admin_pages.php">Manage</a></span>
  484.                         <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
  485.                         <div class="clearfix"></div>
  486.                     </div> <!-- /panel-footer -->
  487.                 </div><!-- /panel -->
  488.             </div><!-- /col -->
  489.  
  490.             <!-- Email Settings Panel -->
  491.             <div class="col-xs-6 col-md-3">
  492.                 <div class="panel panel-default">
  493.                     <div class="panel-heading"><strong>Email Settings</strong></div>
  494.                     <div class="panel-body text-center"><div class="huge"> <i class='fa fa-paper-plane fa-1x'></i> 14</div></div>
  495.                     <div class="panel-footer">
  496.                         <span class="pull-left"><a href='email_settings.php'>Manage</a></span>
  497.                         <span class="pull-right"><i class='fa fa-arrow-circle-right'></i></span>
  498.                         <div class="clearfix"></div>
  499.                     </div> <!-- /panel-footer -->
  500.                 </div> <!-- /panel -->
  501.             </div> <!-- /col -->
  502.  
  503.         </div> <!-- /.row -->
  504.  
  505.         <!-- CHECK IF ADDITIONAL ADMIN PAGES ARE PRESENT AND INCLUDE IF AVAILABLE -->
  506.  
  507.         <?php
  508.         if(file_exists($abs_us_root.$us_url_root.'usersc/includes/admin_panels.php')){
  509.             require_once $abs_us_root.$us_url_root.'usersc/includes/admin_panels.php';
  510.         }
  511.         ?>
  512.  
  513.         <!-- /CHECK IF ADDITIONAL ADMIN PAGES ARE PRESENT AND INCLUDE IF AVAILABLE -->
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.     <!-- tabs -->
  522. </div>
  523.     <div class="row">
  524.         <div class="col-md-8 col-md-offset-2">
  525.             <div class="panel with-nav-tabs panel-default">
  526.                 <div class="panel-heading">
  527.                     <ul class="nav nav-tabs">
  528.                     <li <?php if($tab == 1 || $tab == ''){echo "class='active'";} ?>><a href="#tab1default" data-toggle="tab">Statistics</a></li>
  529.                         <li <?php if($tab == 2){echo "class='active'";}?>><a href="#tab2default" data-toggle="tab">Site Settings</a></li>
  530.                         <li <?php if($tab == 3){echo "class='active'";}?>><a href="#tab3default" data-toggle="tab">Registration</a></li>
  531.                         <li <?php if($tab == 4){echo "class='active'";}?>><a href="#tab4default" data-toggle="tab">Social Logins</a></li>
  532.                         <li <?php if($tab == 5){echo "class='active'";}?>><a href="#tab5default" data-toggle="tab">CSS Settings</a></li>
  533.                         <li <?php if($tab == 6){echo "class='active'";}?>><a href="#tab6default" data-toggle="tab">CSS Samples</a></li>
  534.                     </ul>
  535.                 </div>
  536.                 <div class="panel-body">
  537.                     <div class="tab-content">
  538.                         <div class="tab-pane fade <?php if($tab == 1 || $tab == ''){echo "in active";}?>" id="tab1default">
  539.                             <?php include('views/_admin_stats.php');?>
  540.                         </div>
  541.  
  542.                         <div class="tab-pane fade <?php if($tab == 2){echo "in active";}?>" id="tab2default">
  543.                             <?php include('views/_admin_site_settings.php');?>
  544.                         </div>
  545.  
  546.                         <div class="tab-pane fade <?php if($tab == 3){echo "in active";}?>" id="tab3default">
  547.                             <?php include('views/_admin_register_settings.php');?>
  548.                         </div>
  549.  
  550.                         <div class="tab-pane fade <?php if($tab == 4){echo "in active";}?>" id="tab4default">
  551.                             <!-- css settings -->
  552.                             <?php include('views/_admin_login_settings.php');?>
  553.                         </div>
  554.  
  555.                         <div class="tab-pane fade <?php if($tab == 5){echo "in active";}?>" id="tab5default">
  556.                             <!-- css settings -->
  557.                             <?php include('views/_admin_css_settings.php');?>
  558.                         </div>
  559.                         <div class="tab-pane fade <?php if($tab == 6){echo "in active";}?>" id="tab6default">
  560.                             <?php include('views/_admin_css_samples.php');?>
  561.                         </div>
  562.  
  563.  
  564.  
  565.                     </div>
  566.                 </div>
  567.             </div>
  568.         </div>
  569.     </div>
  570. </div>
  571.  
  572. <div class="col-xs-12 col-md-6"> <!-- Site Settings Column -->
  573.  
  574. </div> <!-- /col1/2 -->
  575.  
  576. <div class="col-xs-12 col-md-6"><!-- CSS Settings Column -->
  577.  
  578. </div> <!-- /col1/3 -->
  579. </div> <!-- /row -->
  580.  
  581. <!-- Social Login -->
  582. <div class="col-xs-12 col-md-12">
  583.  
  584. </div> <!-- /col1/3 -->
  585. </div> <!-- /row -->
  586.  
  587.  
  588.  
  589.  
  590. </div> <!-- /container -->
  591. </div> <!-- /#page-wrapper -->
  592.  
  593. <!-- footers -->
  594. <?php require_once $abs_us_root.$us_url_root.'users/includes/page_footer.php'; // the final html footer copyright row + the external js calls ?>
  595.  
  596. <!-- Place any per-page javascript here -->
  597. <script type="text/javascript">
  598. $(document).ready(function(){
  599.  
  600.     $("#times").load("times.php" );
  601.  
  602.     var timesRefresh = setInterval(function(){
  603.         $("#times").load("times.php" );
  604.     }, 30000);
  605.  
  606.  
  607.     $('[data-toggle="tooltip"]').tooltip();
  608.     $('[data-toggle="popover"]').popover();
  609.     // -------------------------------------------------------------------------
  610. });
  611. </script>
  612.  
  613. <?php require_once $abs_us_root.$us_url_root.'users/includes/html_footer.php'; // currently just the closing /body and /html ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement