Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    12

    Default New mysql index.html page voor x.theme

    Personally I find the original index.html page for 'MySQL Account Maintenance' a bit confusing for users. It's a bit of a mess. Especially the 'Add Users To Your Databases:' section. So I made a cleaner version. Nothing has been changed on any cPanel includes in order to be able to change the original one with the code below withoiut negative results. Just plain HTML changes.

    File path: /usr/local/cpanel/base/frontend/x/sql/index.html

    Code:
    <cpanel setvar="headerimg=../images/topmysql.gif">
    <cpanel setvar="dprefix=../">
    <cpanel include="../stdheader.html">
    
    <script>
    function checkprivs() {
    	if (document.adduserdb.ALTER.checked == true ||
    		document.adduserdb.CREATETEMPORARYTABLES.checked == true ||
    		document.adduserdb.CREATE.checked == true ||
    		document.adduserdb.DELETE.checked == true ||
    		document.adduserdb.DROP.checked == true ||
    		document.adduserdb.SELECT.checked == true ||
    		document.adduserdb.INSERT.checked == true ||
    		document.adduserdb.UPDATE.checked == true ||
    		document.adduserdb.REFERENCES.checked == true ||
    		document.adduserdb.INDEX.checked == true ||
    		document.adduserdb.LOCKTABLES.checked == true) {
    	        document.adduserdb.ALL.checked = false;
    	}
    }
    
    function checkallprivs() {
    	if (document.adduserdb.ALL.checked == true) {
    		document.adduserdb.ALTER.checked=false;
    		document.adduserdb.CREATETEMPORARYTABLES.checked=false;
    		document.adduserdb.CREATE.checked=false;
    		document.adduserdb.DELETE.checked=false;
    		document.adduserdb.DROP.checked=false;
    		document.adduserdb.SELECT.checked=false;
    		document.adduserdb.INSERT.checked=false;
    		document.adduserdb.UPDATE.checked=false;
    		document.adduserdb.REFERENCES.checked=false;
    		document.adduserdb.INDEX.checked=false;
    		document.adduserdb.LOCKTABLES.checked=false;
    	}
    
    }
    </script>
    
                    <div align="center">
                    <font class="big">MySQL Account Maintenance</font>
                    <br><br><br>
                    <table width="550" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><hr></td>
                      </tr>
                      <tr>
                        <td align="center"><cpanel Mysql="initcache()"><table>
                          <tr>
                            <td align="center"><font class="big">Current Databases:</font></td>
                          </tr>
                          <tr>
                            <td align="center"><cpanel Mysql="listdbs()"></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="center"><form action="adddb.html"><table>
                          <tr>
                            <td>New Database: <input type="text" name="db"> <input type=submit value="Create Database"></td>
                          </tr>
                        </table></form></td>
                      </tr>
                      <tr>
                        <td><hr></td>
                      </tr>
                      <tr>
                        <td align="center"><table>
                          <tr>
                            <td align="center"><font class="big">Current Users:</font></td>
                          </tr>
                          <tr>
                            <td align="center"><cpanel Mysql="listusers()"></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="center"><form action="adduser.html"><table>
                          <tr>
                            <td>Username:</td>
                            <td><input type="text" name="user"></td>
                            <td></td>
                          </tr>
                          <tr>
                            <td>Password:</td>
                            <td><input type="text" name="pass"></td>
                            <td><input type="submit" value="Create User"></td>
                          </tr>
                        </table></form></td>
                      </tr>
                      <tr>
                        <td><hr></td>
                      </tr>
                      <tr>
                        <td align="center"><form action="addusertodb.html" name="adduserdb"><table>
                          <tr>
                            <td align="center" colspan="4"><font class="big">Add Users To Your Databases:</font></td>
                          </tr>
                          <tr>
                            <td colspan="4">&nbsp;</td>
                          </tr>
                          <tr>
                            <td>User:</td>
                            <td><select name=user><cpanel Mysql="listusersopt()"></select></td>
                            <td>Database:</td>
                            <td><select name=db><cpanel Mysql="listdbsopt()"></select></td>
                          </tr>
                        </table>
                        <table>
                          <tr>
                            <td colspan="5">Privileges:</td>
                          </tr>
                          <tr>
                            <td><input type=checkbox name="ALL" value="ALL" checked onClick="checkallprivs();"> ALL</td>
                            <td width="100" align="center">or</td>
                            <td width="120"><input type=checkbox name="SELECT" value="SELECT" onClick="checkprivs();"> SELECT</td>
                            <td><input type=checkbox name="CREATE" value="CREATE" onClick="checkprivs();"> CREATE</td>
                          </tr>
                          <tr>
                            <td></td>
                            <td></td>
                            <td><input type=checkbox name="INSERT" value="INSERT" onClick="checkprivs();"> INSERT</td>
                            <td><input type=checkbox name="ALTER" value="ALTER" onClick="checkprivs();"> ALTER</td>
                          </tr>
                          <tr>
                            <td></td>
                            <td></td>
                            <td><input type=checkbox name="UPDATE" value="UPDATE" onClick="checkprivs();"> UPDATE</td>
                            <td><input type=checkbox name="DROP" value="DROP" onClick="checkprivs();"> DROP</td>
                          </tr>
                          <tr>
                            <td></td>
                            <td></td>
                            <td><input type=checkbox name="DELETE" value="DELETE" onClick="checkprivs();"> DELETE</td>
                            <td><input type=checkbox name="LOCKTABLES" value="LOCK" onClick="checkprivs();"> LOCK TABLES</td>
                          </tr>
                          <tr>
                            <td></td>
                            <td></td>
                            <td><input type=checkbox name="INDEX" value="INDEX" onClick="checkprivs();"> INDEX</td>
                            <td><input type=checkbox name="REFERENCES" value="REFERENCES" onClick="checkprivs();"> REFERENCES</td>
                          </tr>
                          <tr>
                            <td></td>
                            <td></td>
                            <td colspan="2"><input type=checkbox name="CREATETEMPORARYTABLES" value="TEMPORARY" onClick="checkprivs();"> CREATE TEMPORARY TABLES</td>
                          </tr>
                        </table>
                        <table>
                          <tr>
                            <td><input type="submit" value="Add User To Database"></td>
                          </tr>
                        </table></form></td>
                      </tr>
                      <tr>
                        <td><hr></td>
                      </tr>
                      <tr>
                        <td align="center"><table>
                          <tr>
                            <td align="center"><font class="big">Access Hosts:</font></td>
                          </tr>
                          <tr>
                            <td align="center"><cpanel Mysql="listhosts()"></td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="center"><form action="addhost.html"><table>
                          <tr>
                            <td>Host (% wildcard is allowed):</td>
                            <td><input type="text" name="host"></td>
                            <td><input type=submit value="Add Host"></td>
                          </tr>
                        </table></form></td>
                      </tr>
    <cpanelfeature phpmyadmin>
                      <tr>
                        <td><hr></td>
                      </tr>
                      <tr>
                        <td align="center"><table>
                          <tr>
                            <td align="center"><b><a href="<cpanel Cgi="phpmyadminlink()">" target="_blank">phpMyAdmin</a></b></td>
                          </tr>
                          <tr>
                            <td align="center">You can use phpMyAdmin to administrate your MySQL databases in a web based environment.</td>
                          </tr>
                        </table></td>
                      </tr>
    </cpanelfeature>
                    </table>
                    </div>
                    <center>
                    <br><br><br>
                    <b>[</b> <a href="../index.html"><cpanel langprint="Goback"></a> <b>]</b>
                    </center>
    <cpanel include="../stdfooter.html">
    Note: Unfortunately after every cPanel update the edited index.html file will be replaced by the original version from the x.theme. Hopefully the developers of cPanel will add this change to the x.theme version for everybodies benefit.
    Last edited by Miquel; 08-11-2005 at 04:54 PM.
    Related OS: FreeBSD 5.1-RELEASE

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    If you want to bring it to cPanel's attention you need to log an enhancement request in bugzilla.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Mar 2004
    Location
    Ayr, North Queensland, Australia
    Posts
    328

    Default

    btw; replace 'fa lse' with false in that page, its a typo. It looks pretty darned good. Nice contribution. If you dont want cpanel to overwrite the page, chattr +i it or chflags it.

    Regards,
    Brent

    Talk at cPanel IRC
    cPanel IRC Logs (Publicly available) @ My Site

  4. #4
    Member
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    12

    Default

    The typo was generated by the "code"-option in this forum but thank you for noticing. I'm glad you found it usefull.

    I posted a request at: http://bugzilla.cpanel.net/show_bug.cgi?id=3038 for a replacement of the original sql index.html.
    Related OS: FreeBSD 5.1-RELEASE

  5. #5
    Member Roy@ENHOST's Avatar
    Join Date
    Mar 2002
    Location
    Los Angeles California
    Posts
    495

    Default

    I tink they need to lose the MySQL connection strings.
    I have more than 20 DBs on one of my account so you can just imagine how clutered it is.

    I used REGEX to hide the connection strings in my cpanel skin.
    = = = = = = = = = = = = = = = = = =
    Cpanel XP Evolution (Add DOZENS of functions to your Cpanel NOW!!!) - 21 Languages, User Friendly Interface, Feature Enabled, Highly Customizable, Create Popup Once window, Language Aware, Flash Tutorials, Theme Changer,Integration with Modernbill,WHM AutoPilot,ClientExec,LPanel&WHOISCart

  6. #6
    Member
    Join Date
    Apr 2003
    Posts
    25

    Default

    Very nice change. Thank you

  7. #7
    Member
    Join Date
    Sep 2004
    Location
    Cleveland, Ohio
    Posts
    378

    Default

    Quote Originally Posted by Roy@ENHOST
    I tink they need to lose the MySQL connection strings.
    I also agree with that. No need for it really. If someone really can't figure out the code to connect, they need learn to Google better.

  8. #8
    Member
    Join Date
    Aug 2004
    Posts
    294
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Any chance someone could give me a screenshot of this or a quick peek?

    Thanks

  9. #9
    Member
    Join Date
    Mar 2004
    Location
    Ayr, North Queensland, Australia
    Posts
    328

    Default

    apparently you need to give cpanel a 'copyright release' before they put anything of yours in, aand could cause a lot of legal problems for them and you.

    Regards,
    Brent

    Talk at cPanel IRC
    cPanel IRC Logs (Publicly available) @ My Site

Similar Threads & Tags
Similar threads

  1. want to switch hom page from index.html to index.php
    By websoftbiz in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-12-2008, 07:14 PM
  2. Which page do you want to load first index.html or index.htm?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 22
    Last Post: 04-10-2008, 09:36 AM
  3. Default index.html page
    By rootuser in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-22-2006, 03:38 AM
  4. Is this the way to add an index.html page
    By nikaian in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-10-2005, 02:38 PM
  5. New index.html page on base server name
    By jsteel in forum cPanel and WHM Discussions
    Replies: 25
    Last Post: 02-27-2004, 08:38 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube