Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Apr 2003
    Posts
    555

    Default Need The Original Code For This Page

    I made some changes to my change password page for the webmail interface and am having a problem with the Javascript. Can somebody please post the original code for the following file:

    /usr/local/cpanel/base/webmail/webmailpasswd.cgi

  2. #2
    Member
    Join Date
    Sep 2003
    Location
    kernel
    Posts
    55

    Default

    #!/usr/bin/perl


    BEGIN {
    push(@INC,"/usr/local/cpanel");
    }

    use strict;
    use Cpanel;
    use Cpanel::Form qw(parseform);
    use Cpanel::WebMail;

    my $cp = Cpanel->new;
    $cp->initcp((getpwuid($>))[0]);

    my $webmail = Cpanel::WebMail->new();

    $webmail->httpheader();
    $webmail->header();

    print <<EOM;
    <script language="JavaScript"><!--

    function CheckForm()
    {
    var str = document.forms[0].elements[1].value;
    var str2 = document.forms[0].elements[2].value;
    if (str == "")
    {
    alert("The New Password field is blank.\\n\\nPlease enter your Password.");
    document.forms[0].elements[1].select();
    document.forms[0].elements[1].focus();
    return false;
    }
    if (str.length < 5)
    {
    alert("The New Password must be at least 5 characters.");
    document.forms[0].elements[1].select();
    document.forms[0].elements[1].focus();
    return false;
    }
    if (str.length > 15)
    {
    alert("The New Password can only be 15 characters long.");
    document.forms[0].elements[1].select();
    document.forms[0].elements[1].focus();
    return false;
    }
    if (str != str2)
    {
    alert("The New Password fields don't match.");
    document.forms[0].elements[1].select();
    document.forms[0].elements[1].focus();
    return false;
    }
    return true;
    }



    // --></script>
    <body bgcolor=#FFFFFF>
    Changing password<br><br>
    <form action="$webmail->{urlbase}/dowebmailpasswd.cgi" onSubmit="return CheckForm();">
    <table border="0">
    <TBODY>
    <tr>
    <input maxLength="15" name="oldpass" size="8"
    type="hidden" value>
    <td width="50%"><font face="Arial" size="1"><strong>New
    Password:</font></strong></font></td>
    <td width="50%"><font face="Arial"><input maxLength="15" name="newpass" size="8"
    type="password" value></font></td>
    </tr>
    <tr>
    <td width="50%"><font face="Arial" size="1"><strong>New
    Password (again):</font></strong></font></td>
    <td width="50%"><font face="Arial"><input maxLength="15" size="8" type="password" value></font></td>
    </tr>
    </TBODY>
    </table>
    <div align="left"><p><font face="Arial"><br>
    <input name="B1" type="submit" value="Change Password"></font></p>
    </div>
    </form>
    EOM


    print <<EOM;
    <a href="$webmail->{urlbase}/">Return</a>
    EOM


    $webmail->footer();
    ~
    ~

Similar Threads & Tags
Similar threads

  1. suspend page using (i)frame to include original site??
    By simonpearce in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-04-2009, 03:07 AM
  2. where do you find original source code
    By chutney ferret in forum New User Questions
    Replies: 5
    Last Post: 02-09-2009, 02:11 PM
  3. Weird code on my page - possible server hack?
    By dob3rman in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-05-2007, 07:31 PM
  4. Putting AD Code on every page of a hosted site [moved]
    By arroways in forum New User Questions
    Replies: 7
    Last Post: 08-13-2005, 04:04 PM
  5. PHP code in the logout page?
    By mizzizzippi in forum Themes and Branding
    Replies: 2
    Last Post: 12-16-2004, 06:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube