Hi Kristi1 nisi me u potpunosti razumela...
Meni treba nes da prevede nesto ovako
Code:
<?
// Include config.php
include("config.php");
// Set page variables
$pageTitle = "$siteName Account Registration";
$pageDesc = "Register an account at $siteName and start learning today.";
$pageKW = "register, account, create, $siteName";
// Include header
include ('header.php');
////////////////////////
// //
// CONTENT //
// //
////////////////////////
/**
* The user is already logged in, not allowed to register.
*/
if($session->logged_in){
echo '<img src = "images/hErrorReg.png" width = "390" height = "40"
alt = "Already Registered" title = "Already Registered">';
echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
."<a href=\"CPsummary.php\">Back to UserCP</a></p>";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
/* Registration was successful */
if($_SESSION['regsuccess']){
echo '<img src = "images/hRegSucc.png" width = "390" height = "40"
alt = "Registration Successful at $siteName" title = "Registration Successful at $siteName">';
echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, you should now check your e-mail address to <b>activate your account</b>.</p>";
}
/* Registration failed */
else{
echo '<img src = "images/hErrorReg.png" width = "390" height = "40" alt = "Registration Failed">';
echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
."could not be completed.<br>Please try again at a later time.</p>";
}
unset($_SESSION['regsuccess']);
unset($_SESSION['reguname']);
}
/**
* The user has not filled out the registration form yet.
* Below is the page with the sign-up form, the names
* of the input fields are important and should not
* be changed.
*/
else{
print <<<HERE
<img src = "images/hRegister.png" width = "390" height = "40"
alt = "Register an Account at $siteName" title = "Register an Account at $siteName">
<p>Please complete the short registration form below to create an
account at $siteName.</p>
<p><font color = "#FF000"><b>Important</b> :: Please make sure you
use a valid email address as the validation code will be sent here.</font></p>
<!-- Start simple form verification -->
<script type = "text/javascript">
<!-- Hide from older browsers
function checkValues(){
var error_string = "";
var pass = window.document.regForm.pass.value;
var pass2 = window.document.regForm.pass2.value;
var email = window.document.regForm.email.value;
var email2 = window.document.regForm.email2.value;
// Check if passwords match
if (pass != pass2){
error_string += " * Your Passwords Don't Match!\\n";
}
// Check if email addresses match
if (email != email2){
error_string += " * Your Email Addresses Don't Match!";
}
// If no errors found
if (error_string == ""){
return true;
}
// Else errors found
else {
error_string = "We found the following errors:\\n\\n" + error_string;
alert (error_string);
return false;
}
}
// End hide -->
</script>
<!-- End simple form verification -->
<p>
<table width = "300px" bgcolor = "#C0C0C0" cellspacing = "1" cellpadding = "4" align = "center">
<tr>
<td bgcolor = "#F0F0F0">
HERE;
if($form->num_errors > 0){
echo "<p><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></p>";
}
?>
<form action="process.php" method="POST" onSubmit="var the_result=checkValues();return the_result;" name = "regForm">
<table width = "300px" align="center" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>">
</td>
<td>
<? echo $form->error("user"); ?>
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>">
</td>
<td>
<? echo $form->error("pass"); ?>
</td>
</tr>
<tr>
<td>
Confirm Password:
</td>
<td>
<input type="password" name="pass2" maxlength="30">
</td>
<td>
</td>
</tr>
<tr>
<td>
Email:
</td>
<td>
<input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>">
</td>
<td>
<? echo $form->error("email"); ?>
</td>
</tr>
<tr>
<td>
Confirm Email:
</td>
<td>
<input type="text" name="email2" maxlength="50">
</td>
<td>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="hidden" name="subjoin" value="1">
<input type="submit" value="Join!">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?
}
include ("footer.php");
?>
I sad da mi
Code:
alt = "Already Registered" title = "Already Registered">';
ovo prevede automatski, ne da ja prevodim... U svakom slucaju hvala :~)