Fatal error: Cannot redeclare validate() (previously declared in C:\AppServ\www\store\config.ini:48) in C:\AppServ\www\store\config.ini on line 79
<?php // nazwa organicacji $title = "SKLEP INTERNETOWY"; // what your selling -- appears on the left sidebar on the main page $selling = "Soki"; // kolor tla $bg = "#FFFFFF"; // gorne i boczne ramki $middle = "#99CCFF"; // $tophigh = "#6699CC"; // kolor tekstu $textcolor = "#000000"; // nazwa hosta $host = "localhost"; // database uzytkownik $user = "root"; // database haslo $pass = ""; // database nazwa $database = "sklep"; // adres www $website = "www.soki.pl"; // folder ze sklepem $path = "/localhost/store"; // folder z obrazkami $image_dir = "/store/images"; // some function definitions /* this is the validation function needed by checkout.php3 it validates that all the variables are filled */ function validate($lname,$fname,$address,$city,$state,$zipcode,$country,$email,$telephone) { $status=1;} $status=1;} $status=1;} $status=1;} $status=1;} $status=1;} $status=1;} $status=1;} } /* credit cart validation function This was originally done by Brett@InterWebDesign.com, I modified the code to fit
my needs*/ function credit_card($cardnum, $type = 'none'){ if ($type == 'none') { // Do nothing } elseif ($type == 'mastercard'){ your credit card information."); } return 0; } elseif ($type == 'visa'){ your credit card information."); } return 0; } elseif ($type == 'amex'){ your credit card information."); return 0; } } elseif ($type == 'discover'){ your credit card information."); return 0; } } else { //invalid type entered return -1; } // Start MOD 10 checks $dig = toCharArray($cardnum); $j = 0; for ($i=($numdig-2); $i>=0; $i-=2){ $dbl[$j] = $dig[$i] * 2; $j++; } $validate =0; for ($i=0;$i<$dblsz;$i++){ $add = toCharArray($dbl[$i]); for ($j=0;$j<sizeof($add);$j++){ $validate += $add[$j]; } $add = ''; } for ($i=($numdig-1); $i>=0; $i-=2){ $validate += $dig[$i]; } else return 0; } // takes a string and returns an array of characters function toCharArray($input){ for ($j=0;$j<$len;$j++){ } return ($char); } ?>
Natomias jak zaloze konto przez Mysql i probuje sie zalogowac to dostaje
Warning: include(conn.inc) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\store\login.php3 on line 60
Warning: include() [function.include]: Failed opening 'conn.inc' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\store\login.php3 on line 60
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\AppServ\www\store\login.php3 on line 62
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\store\login.php3 on line 62
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\store\login.php3 on line 63
<? ?> <? require("config.ini"); ?> <body text="#000000" bgcolor="#FFFFFF"> <center> <table border=1 width=500 cellspacing=0 cellpading=8> <tr> <td align=center colspan=2> <font size=5 face="Times"> </td> </tr> <tr> <td align=center colspan=2> Musisz sie zalogowac zanim kupisz. </td> </tr> <tr> <td align=center> <table> <tr> <td> <b>Uzytkownik:</b> </td> <td> <input type=text size=20 name="store_user"> </td> </tr> <tr> <td> <b>Haslo:</b> </td> <td> <input type=password size=20 name="store_user_pw"> </td> </tr> <tr> <td colspan=2> <input type=submit name="login" value="Login"> </td> </tr> <tr> <td colspan=2> Utworz nowe konto <a href="license.php3">click here</a>. </td> </tr> </table> </td> </tr> </table> <? } $password=$store_user_pw; include("conn.inc"); username='$username' and password='$password'"); ?> <body> <center> <table border=1 width=500 cellspacing=0 cellpading=8> <tr> </i></font></td></tr> <tr> <td> <table> <tr><td>Niewlasciwy uzytkownik albo haslo.<br> Musisz sie zalogowac zanim kupisz. Utworz konto(it's free) <a href="license.php3">click here</a>. </td></tr> </table> </td></tr> </table> <? } } elseif($action == "logoff") { } echo "<i>$store_user_cookie</i> is logged in. <a href="login.php3?action=logoff">logoff</a>"; } ?>
pomocy
