Visualizzazione dei risultati da 1 a 7 su 7

Discussione: Classe css in form php

  1. #1

    Classe css in form php

    Vorrei creare un effetto di rollover ad un bottone di submit del form,
    la classe css:
    <style>
    .rollover{
    height: 33px; /*meta dallimmagine*/
    width: 168px;
    text-indent: 10000px;
    overflow: hidden;
    background: url(immagine.gif) top left no-repeat;
    display: block;
    }

    .rollover:hover{
    background-position: bottom left;
    }
    </style>

    come modificare questo php x chiamare la classe?:

    <form name=mail method=post action=?action=signup1>
    <table width=80% border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td width=14% ><font size=-1>Name</font></td>
    <td width=187>
    <input type=text name=name class=formcolviola size=12>


    </td>
    </tr>
    <tr>
    <td width=14%><font size=-1>Email</font></td>
    <td width=187>
    <input type=text name=email class=formcolviola size=12>
    </td>
    </tr>
    <input type=hidden name=subject value=\"$subject_signup\">
    </td>
    </tr>
    <tr>
    <td width=59></td>
    <td>

    <input type=submit value=\"\" style=\"background-image:url(http://www.MIOURL.com/images/Subscribe.jpg); cursor: pointer; background-position:center; width:100px; height:30px; background-color:#000; border: 0;\" />
    </td>
    </tr><tr width=100><td width=250></td><td>
    </tr>
    </table>
    </form>";

    Ho provato cosi ma non va:
    <input name=button type=submit class=rollover id=button value=\"\" />

    che dite voi?!

  2. #2
    Non ho capito che c'entra il PHP...

  3. #3

    Codice completo

    Ho provato a rispnderti....ma il code e' troppo lungo...

  4. #4

    1 parte

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="/2style.css" />
    </head>
    <body>
    <font face=arial>
    <?php
    extract($HTTP_GET_VARS);
    extract($HTTP_POST_VARS);
    if(file_exists("Newsletter/subscribe.txt")){
    }else{
    $roi=fopen("Newsletter/subscribe.txt","w");
    fclose($roi);
    }
    $subject_signup="Verification link for joining mailing list"; //Subject of verification link
    $mo= "Newsletter/pwd.txt";
    $bd = fopen ($mo, "r");
    $psord = fread ($bd, filesize ($mo));
    fclose ($bd);
    $rop=base64_decode($psord);
    $vup=explode("||&@23||password>||&~||",$rop);
    $password=base64_decode($vup[0]);
    $st=time();
    $day =date("D d");
    $month =date("M");
    $year =date("Y");
    $dt="$day-$month-$year";

    print "
    <form name=mail method=post action=?action=signup1>
    <table width=80% border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td width=14% ><font size=-1>Name</font></td>
    <td width=187>
    <input type=text name=name class=formcolviola size=12>


    </td>
    </tr>
    <tr>
    <td width=14%><font size=-1>Email</font></td>
    <td width=187>
    <input type=text name=email class=formcolviola size=12>
    </td>
    </tr>
    <input type=hidden name=subject value=\"$subject_signup\">
    </td>
    </tr>
    <tr>
    <td width=59></td>
    <td>

    <input type=submit value=\"\" style=\"background-image:url(http://www.MIOLINK.com/images/Subscribe.jpg); cursor: pointer; background-position:center; width:100px; height:30px; background-color:#000; border: 0;\" />
    </td>
    </tr><tr width=100><td width=250></td><td>
    </tr>
    </table>
    </form>";


    if ($action == "signup1"){
    $id=time();
    $rand=rand(10000,1000000000);
    if($group!="" && $name!="" && $email!=""){
    $vef=explode("@",$email);
    if(strlen($vef[0])>="2"&&strlen($vef[1])>="2"){
    $lday =date("D d");
    $lmonth =date("M");
    $lyear =date("Y");
    $sdate="$lday-$lmonth-$lyear";
    $g=fopen("Newsletter/subscribers/$group/$id$rand&~@&.php","w");
    fwrite($g,"<?php \n");
    fwrite ($g, '$content="');
    fwrite ($g, $name);
    fwrite ($g, "|Ä0_è|");
    fwrite ($g, $email);
    fwrite ($g, "|Ä0_è|");
    fwrite ($g, $sdate);
    fwrite ($g, "|Ä0_è|");
    fwrite ($g, "\"; ?>");
    fclose ($g);
    echo"<FONT COLOR=blue face=arial>Thank you for your subscription.</FONT>
    ";
    }
    }else{
    echo"<FONT COLOR=red face=arial>Please fill in the form properly.</FONT>
    ";
    }
    $to = $email;
    $extra = "From: Sign up request\r\nReply-To: $email\r\n";
    $mess = "hi $name \n In order to subscribe our mailing you have to verify your email address.\n To Verify your email address just click the link below \n http://${HTTP_HOST}${PHP_SELF}?action=verify&email=$email &sv=$st";
    $sent=mail(trim($to), $subject, $mess, $extra);
    if($sent){
    $fp = fopen ("Newsletter/subscribe.txt", "a+");
    $name = base64_encode($name);
    $email = base64_encode($email);
    $lines = file("Newsletter/subscribe.txt");
    $den = count($lines);
    fwrite ($fp, "\n");
    fwrite ($fp, $email);
    fwrite ($fp, ";");
    fwrite ($fp, $name);
    fwrite ($fp, ";");
    fwrite ($fp, $dt);
    fwrite ($fp, ";");
    fwrite ($fp, $st);
    fwrite ($fp, ";");
    fwrite ($fp, "0");
    fwrite ($fp, ";");
    fwrite ($fp, $den);
    fwrite ($fp, ";");
    fclose ($fp);
    echo("\n");
    }else{
    echo "Please check that you have provided the correct email address, we are unable to send the verification link to your email.";
    }
    }
    if($action=="verify"){
    $user=file("Newsletter/subscribe.txt");
    for($x=0;$x<sizeof($user);$x++) {
    $temp = explode(";",$user[$x]);
    $opp[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];$temp[5];";
    $meta =$email;
    $meta2 =base64_decode($temp[0]);
    if($meta==$meta2 && $sv==$temp[3] && $temp[4]=="0"){
    $lisp[0] = $opp[$x];
    $idt=$temp[5];
    }
    }
    if(sizeof($lisp) != "0") {
    $fp = @fopen("Newsletter/subscribe.txt", 'r');
    $array = explode("\n", fread($fp, filesize("Newsletter/subscribe.txt")));
    for($x=0;$x<sizeof($array);$x++) {
    $temp = explode(";",$array[$x]);
    $line[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];$temp[5];";
    }
    $p=explode(";",$opp[$idt]);
    $line[$idt]="$p[0];$p[1];$dt;$p[3];1;$p[5];";
    $fp = fopen ("Newsletter/subscribe.txt", "w");
    for($i=0; $i<sizeof($line);$i++){
    $ef=explode(";",$line[$i]);
    if($i<(sizeof($line)-1)){
    $ko="\n";
    }else{
    $ko="";
    }
    if(strlen($ef[0])>="3"){
    fwrite ($fp, $line[$i]);
    fwrite ($fp, $ko);
    }elseif(strlen($ef[0])<="0"){
    fwrite ($fp, ";;;;;");
    fwrite ($fp, $ko);
    }
    }
    fclose ($fp);
    print "



    Your email has been verified

    Thank you for joining our mailing list";
    }
    elseif(sizeof($lisp) <= "0"){
    echo "Please make sure that you have entered link in your browser as that has been sent to you in your mailbox.
    Your email verification link expires after one week, so you must verify your email within one week, or else you will have to subscribe again.";
    }
    }
    if ($action=="sendsubscribe"){
    $l=base64_decode($m);
    if ($l==$password){
    $fpb = file("Newsletter/subscribe.txt");
    for($i = 0; $i<=sizeof($fpb);$i++){
    $tempb = explode(";",$fpb[$i]);
    $to = base64_decode($tempb[0]);
    $name = base64_decode($tempb[1]);
    $extra = "From: $email\r\nReply-To: $email\r\n";
    $mess = "Hi $name \n $message \n\n========================================\n This is not spam. You are receiving this email since you have subscribed for our mailing list.\n To remove your email from our mailing list click the link below\n http://${HTTP_HOST}${PHP_SELF}?action=remove&email=$to&sv =$tempb[3]";
    if($tempb[4]=="1"&&strlen($tempb[0])>="1"){
    mail(trim($to), $subject, $mess, $extra);
    }
    }
    echo("Your message has been sent to all the verified subscribers.
    <a href=?action=login&m=$m>Back to main</a>

    </p>

    </p>

    </p>

    </p>
    \n\n\n\n");
    }else{
    echo "Please Login";
    }
    }
    if ($action == "subscribers"){
    $l=base64_decode($m);
    if ($l==$password){
    echo "<h4>Send message to all subscribers</h4>";
    print "
    <form name=mail method=post action=?action=sendsubscribe>
    <table width=80% border=0 cellspacing=0 cellpadding=0>
    <tr>
    <td width=14% ><font size=-1>Your Email:</font></td>
    <td width=187>
    <input type=text name=email size=20>
    </td>
    </tr><tr><td width=14%>
    Subject:</td><td><input type=text name=subject value=''></td></tr>
    <td width=59><font size=2>Message:</font></td>
    <td width=14%>
    <textarea name=message wrap=VIRTUAL cols=45 rows=8></textarea>
    </td>
    </tr>
    <tr>
    <td width=59></td>
    <td>
    <input type=hidden name=m value=$m>
    <input type=submit name=submit value=send!>
    </td>
    </tr>
    </table>
    </form>";

  5. #5

    2 parte

    echo "<a href=?action=login&m=$m>Go back to main</a>
    ";
    }else{
    echo "Please login again";
    }
    }
    if($action=="remove"){
    $user=file("Newsletter/subscribe.txt");
    for($x=0;$x<sizeof($user);$x++) {
    $temp = explode(";",$user[$x]);
    $opp[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];$temp[5];";
    $meta = base64_encode($email);
    $meta2 =$temp[0];
    //if($meta==$meta2 && $temp[8]=="inactive"){
    if($meta==$meta2 && $sv==$temp[3] && $temp[4]=="1"){
    $lisp[0] = $opp[$x];
    $idt=$temp[5];
    }
    }
    if(sizeof($lisp) != "0") {
    $fp = @fopen("Newsletter/subscribe.txt", 'r');
    $array = explode("\n", fread($fp, filesize("Newsletter/subscribe.txt")));
    for($x=0;$x<sizeof($array);$x++) {
    $temp = explode(";",$array[$x]);
    $line[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];$temp[5];";
    }
    $p=explode(";",$opp[$idt]);
    $line[$idt]=";;;;;";
    $fp = fopen ("Newsletter/subscribe.txt", "w");
    for($i=0; $i<sizeof($line);$i++){
    $ef=explode(";",$line[$i]);
    if($i<(sizeof($line)-1)){
    $ko="\n";
    }else{
    $ko="";
    }
    if(strlen($ef[0])>="3"){
    fwrite ($fp, $line[$i]);
    fwrite ($fp, $ko);
    }elseif(strlen($ef[0])<="0"){
    fwrite ($fp, ";;;;;");
    fwrite ($fp, $ko);
    }
    }
    fclose ($fp);
    print "



    Your email has been removed from our mailing list
    You will no longer receive any email from us.";
    }elseif(sizeof($lisp) == "0"){
    echo "Please make sure that you have entered link in your browser as that has been sent to you in your mailbox.";
    }
    }
    if ($action=="admin"){
    echo"<center><font face=\"Verdana, Arial, Hevetica\" size=\"4\" color=\"#333333\">Admin Panel - Login</font>

    Default password is: <font color=blue>administrator</font>
    <form name=\"form\" method=post action=?action=login> <table align=center><tr><td><font face=Verdana, Arial, Hevetica size=2>Password:
    </font><input type=password name=pass></td></tr><tr><td><input type=submit value=Login></form></td></tr></table></center>";
    }
    if ($action == "login") {
    if(strlen($m)>="1"){
    $n=base64_decode($m);
    $pass=$n;
    }
    if($pass==$password){
    $m=base64_encode($password);
    echo "

    Successfully loged in

    ";
    echo "<table width=100% border=1 cellspacing=0 bordercolor=#00000><tr><td>Options:</td></tr><tr><td></td><td><A HREF=?action=subscribers&m=$m>Email Subscribers</td><td><A HREF=?action=change_password&m=$m>Change Password</A></td></tr></table>";
    }else{
    echo "Invalid password";
    }
    }
    $results_per_page=25;
    if($action == "view") {
    $l=base64_decode($m);
    if ($l==$password){
    $user = file("Newsletter/subscribe.txt");
    echo "Viewing All Members";
    echo"
    <a href=?action=login&m=$m><<--Back to Main</a>";
    $lis = 0;
    if(strlen($n) == 0){
    echo "Error!!";
    }
    else{
    for($x=0;$x<sizeof($user);$x++) {
    $temp = explode(";",$user[$x]);
    $opp[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];$temp[5];";
    $such = $temp[0];
    if(strlen($such)>=2) {
    $list[$lis] = $opp[$x];
    $lis++;
    }
    }
    if(sizeof($list) != "0"){
    echo "
    <font face=arial>

    Total ",sizeof($list),"Member(s)
    </p></font>";
    echo "<table width=100%><td bgcolor=#FFCC99><img src=blank.gif width=10 height=1></td><td>= Unverified member</td><td>Warning!! Clicking Delete will permanently delete the member.</td></table>";
    echo "<table width=100% border=1 bordercolor=#6633ff bgcolor=#ffffff cellspacing=0><td width=22%>Name</td><td width=45%>Email</td><td width=26%>Signed up on</td><td><FONT COLOR=red>Delete</FONT></td>";
    }else{
    echo "

    No Member Yet.



    ";
    }
    $latest_max = sizeof($list);
    $u = $a - $latest_max;
    if (is_file("Newsletter/subscribe.txt"))
    {
    $s=sizeof($list);
    if ($page=='' or !$page) { $page=1; }
    $end=$results_per_page*$page;
    $start=$end-$results_per_page;

    if ($start<>'0') {
    $new_page=$page-1;
    $prev="<---Previous page";
    }
    else {
    $prev="";
    }

    if ($end<$s) {
    $new_page1=$page+1;
    $next="Next page--->";
    }
    else {
    $next="";
    }
    $today = time();
    for ($i=$start; $i<$end; $i++){
    if(substr($list[$i], 0, 2 )!="")
    {
    $p=explode(';', $list[$i]);
    if($p[4]=="0"){
    $status_c="#FFCC99";
    }else{
    $status_c="#ffffff";
    }
    $p[0]=base64_decode($p[0]);
    $p[1]=base64_decode($p[1]);
    echo "<tr><td bgcolor=$status_c>$p[1]</td><td>$p[0]</td><td>$p[2]</td><td><a href=?action=delete&id=$p[5]&mame=$p[0]&m=$m>$p[0]</a></td></tr>";
    }
    }
    $pages=$s/$results_per_page;
    $pages1=round($pages, 2);
    $p= explode(".", $pages1);
    $pcount=count($p);
    $ext=$p[$pcount-2];
    if ($ext!=0) {
    $num=$p[0]+1;
    }

    else {
    $num=$p[0];
    }
    echo "<table width='100%'><tr><td align='left'>$prev</td><td align='center'>";
    for ($i=1; $i<=$num; $i++) {
    if ($i==$page) {
    echo "$i ";

    }
    else {
    echo "[$i]";
    }
    }
    echo "</td><td align='right'>$next</td></tr></table>";
    }
    }
    }else{
    echo "Please Login";
    }
    }
    if($_GET['action'] == "delete") {
    $l=base64_decode($m);
    if ($l==$password){
    if($_GET['id'] >= 0){
    $fp = @fopen("Newsletter/subscribe.txt", 'r');
    $array = explode("\n", fread($fp, filesize("Newsletter/subscribe.txt")));
    for($x=0;$x<sizeof($array);$x++) {
    $temp = explode(";",$array[$x]);
    $line[$x] = "$temp[0];$temp[1];$temp[2];$temp[3];$temp[4];$temp[5];";
    }
    $line[$id]= ";;;;;";
    $fp = fopen ("Newsletter/subscribe.txt", "w");
    for($i=0; $i<sizeof($line);$i++){
    $ef=explode(";",$line[$i]);
    if($i<(sizeof($line)-1)){
    $ko="\n";
    }else{
    $ko="";
    }
    if(strlen($ef[0])>="3"){
    fwrite ($fp, $line[$i]);
    fwrite ($fp, $ko);
    }elseif(strlen($ef[0])<="0"){
    fwrite ($fp, ";;;;;");
    fwrite ($fp, $ko);
    }
    }
    fclose ($fp);
    print "



    Account has been deleted successfully

    <a href=?action=login&m=$m>Back to main menu</a>";
    }else{
    print "Error!!! Please go back and try again.
    <a href=?action=login&m=$m>Back to main menu</a>";
    }
    }else{
    echo "Please Login";
    }
    }
    if ($action=="change_password"){
    $l=base64_decode($m);
    if ($l==$password){
    echo "<table><form method=post action=?action=do_change_password><td width=30%>Enter new password</td><td width=70%><input type=password size=18 name=pwd></td><tr><td>Confirm new password</td><td><input type=password size=18 name=qwd></td><tr><td></td><td><input type=hidden name=m value=$m><input type=submit value=Change></form></td><tr><td></td><td><a href=?action=login&m=$m>Back To main Menu</a></td></table>";
    }else{
    echo "Please Login Again";
    }
    }
    if ($action=="do_change_password"){
    $l=base64_decode($m);
    if ($l==$password){
    if($pwd==$qwd && strlen($pwd)>="1"){
    $po="Newsletter/pwd.txt";
    $fgh=base64_encode($pwd);
    $asd=base64_encode($fgh."||&@23||password>||&~||") ;
    $vp = fopen ($po, "w");
    fwrite ($vp, "$asd");
    fclose($vp);
    echo "Password has been successfully changed.
    <a href=?action=admin>Login using new password</a>";
    }else{
    echo "Please go back, change password and confirm new password donot match";
    }
    }else{
    echo "Please Login Again";
    }
    }
    ?>
    <CENTER><FONT SIZE="1" COLOR="#330000" face=arial></FONT></CENTER>
    </body></html>

  6. #6

    Unisci il code

    Unisci il code se puoi aiutarmi grazie

  7. #7
    PHP non c'entra niente, ti sposto
    Addio Aldo, amico mio... [03/12/70 - 16/08/03]

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.