46 require(ENANO_ROOT . '/plugins/admin/GroupManager.php'); |
46 require(ENANO_ROOT . '/plugins/admin/GroupManager.php'); |
47 require(ENANO_ROOT . '/plugins/admin/SecurityLog.php'); |
47 require(ENANO_ROOT . '/plugins/admin/SecurityLog.php'); |
48 require(ENANO_ROOT . '/plugins/admin/UserManager.php'); |
48 require(ENANO_ROOT . '/plugins/admin/UserManager.php'); |
49 require(ENANO_ROOT . '/plugins/admin/LangManager.php'); |
49 require(ENANO_ROOT . '/plugins/admin/LangManager.php'); |
50 |
50 |
|
51 // For convenience and nothing more. |
|
52 function acp_start_form() |
|
53 { |
|
54 global $db, $session, $paths, $template, $plugins; // Common objects |
|
55 echo '<form action="'.makeUrl($paths->nslist['Special'].'Administration', ( isset($_GET['sqldbg']) ? 'sqldbg&' : '' ) . ( isset($_GET['nocompress']) ? 'nocompress&' : '' ) . 'module='.$paths->cpage['module']).'" method="post" enctype="multipart/form-data">'; |
|
56 } |
|
57 |
51 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace> |
58 // function names are IMPORTANT!!! The name pattern is: page_<namespace ID>_<page URLname, without namespace> |
52 |
59 |
53 function page_Admin_Home() { |
60 function page_Admin_Home() { |
54 global $db, $session, $paths, $template, $plugins; // Common objects |
61 global $db, $session, $paths, $template, $plugins; // Common objects |
55 global $lang; |
62 global $lang; |
1049 $allowed = fetch_allowed_extensions(); |
1056 $allowed = fetch_allowed_extensions(); |
1050 ?> |
1057 ?> |
1051 <h3><?php echo $lang->get('acpft_heading_main'); ?></h3> |
1058 <h3><?php echo $lang->get('acpft_heading_main'); ?></h3> |
1052 <p><?php echo $lang->get('acpft_hint'); ?></p> |
1059 <p><?php echo $lang->get('acpft_hint'); ?></p> |
1053 <?php |
1060 <?php |
1054 echo '<form action="'.makeUrl($paths->nslist['Special'].'Administration', (( isset($_GET['sqldbg'])) ? 'sqldbg&' : '') .'module='.$paths->cpage['module']).'" method="post">'; |
1061 acp_start_form(); |
1055 $c = -1; |
1062 $c = -1; |
1056 $t = -1; |
1063 $t = -1; |
1057 $cl = 'row1'; |
1064 $cl = 'row1'; |
1058 echo "\n".' <div class="tblholder">'."\n".' <table cellspacing="1" cellpadding="2" style="margin: 0; padding: 0;" border="0">'."\n".' <tr>'."\n "; |
1065 echo "\n".' <div class="tblholder">'."\n".' <table cellspacing="1" cellpadding="2" style="margin: 0; padding: 0;" border="0">'."\n".' <tr>'."\n "; |
1059 ksort($mime_types); |
1066 ksort($mime_types); |
1456 $q = 'SELECT theme_name,default_style FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; |
1463 $q = 'SELECT theme_name,default_style FROM '.table_prefix.'themes WHERE theme_id=\''.$db->escape($_POST['theme_id']).'\''; |
1457 $s = $db->sql_query($q); |
1464 $s = $db->sql_query($q); |
1458 if(!$s) die('Error selecting name value: '.$db->get_error().'<br /><u>SQL:</u><br />'.$q); |
1465 if(!$s) die('Error selecting name value: '.$db->get_error().'<br /><u>SQL:</u><br />'.$q); |
1459 $r = $db->fetchrow_num($s); |
1466 $r = $db->fetchrow_num($s); |
1460 $db->free_result(); |
1467 $db->free_result(); |
1461 echo('<form action="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'" method="post">'); |
1468 acp_start_form(); |
1462 echo('<div class="question-box"> |
1469 echo('<div class="question-box"> |
1463 Theme name displayed to users: <input type="text" name="name" value="'.$r[0].'" /><br /><br /> |
1470 Theme name displayed to users: <input type="text" name="name" value="'.$r[0].'" /><br /><br /> |
1464 Default stylesheet: <select name="defaultcss">'); |
1471 Default stylesheet: <select name="defaultcss">'); |
1465 foreach ($lk as $l) |
1472 foreach ($lk as $l) |
1466 { |
1473 { |
1686 setConfig('coppa_address', $address); |
1693 setConfig('coppa_address', $address); |
1687 |
1694 |
1688 echo '<div class="info-box">' . $lang->get('acpcp_msg_save_success') . '</div>'; |
1695 echo '<div class="info-box">' . $lang->get('acpcp_msg_save_success') . '</div>'; |
1689 } |
1696 } |
1690 |
1697 |
1691 echo '<form action="'.makeUrl($paths->nslist['Special'].'Administration', (( isset($_GET['sqldbg'])) ? 'sqldbg&' : '') .'module='.$paths->cpage['module']).'" method="post">'; |
1698 acp_start_form(); |
1692 |
1699 |
1693 echo '<div class="tblholder">'; |
1700 echo '<div class="tblholder">'; |
1694 echo '<table border="0" cellspacing="1" cellpadding="4">'; |
1701 echo '<table border="0" cellspacing="1" cellpadding="4">'; |
1695 echo '<tr> |
1702 echo '<tr> |
1696 <th colspan="2"> |
1703 <th colspan="2"> |
1885 } |
1892 } |
1886 else if ( isset($_POST['do_send']) && defined('ENANO_DEMO_MODE') ) |
1893 else if ( isset($_POST['do_send']) && defined('ENANO_DEMO_MODE') ) |
1887 { |
1894 { |
1888 echo '<div class="error-box">' . $lang->get('acpmm_err_demo') . '</div>'; |
1895 echo '<div class="error-box">' . $lang->get('acpmm_err_demo') . '</div>'; |
1889 } |
1896 } |
1890 echo '<form action="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'" method="post">'; |
1897 acp_start_form(); |
1891 ?> |
1898 ?> |
1892 <div class="tblholder"> |
1899 <div class="tblholder"> |
1893 <table border="0" cellspacing="1" cellpadding="4"> |
1900 <table border="0" cellspacing="1" cellpadding="4"> |
1894 <tr> |
1901 <tr> |
1895 <th colspan="2"><?php echo $lang->get('acpmm_heading_main'); ?></th> |
1902 <th colspan="2"><?php echo $lang->get('acpmm_heading_main'); ?></th> |
2071 </tr>'; |
2078 </tr>'; |
2072 } |
2079 } |
2073 $db->free_result(); |
2080 $db->free_result(); |
2074 echo '</table></div>'; |
2081 echo '</table></div>'; |
2075 echo '<h3>' . $lang->get('acpbc_heading_create_new') . '</h3>'; |
2082 echo '<h3>' . $lang->get('acpbc_heading_create_new') . '</h3>'; |
2076 echo '<form action="'.makeUrl($paths->nslist['Special'].'Administration', 'module='.$paths->cpage['module']).'" method="post">'; |
2083 acp_start_form(); |
2077 ?> |
2084 ?> |
2078 |
2085 |
2079 <?php echo $lang->get('acpbc_field_type'); ?> |
2086 <?php echo $lang->get('acpbc_field_type'); ?> |
2080 <select name="type"> |
2087 <select name="type"> |
2081 <option value="<?php echo BAN_IP; ?>"><?php echo $lang->get('acpbc_ban_type_ip'); ?></option> |
2088 <option value="<?php echo BAN_IP; ?>"><?php echo $lang->get('acpbc_ban_type_ip'); ?></option> |