Merge branch 'release' into bug-985 bug-985
authorMichael Tänzer <neo@nhng.de>
Tue, 10 Jan 2012 12:32:37 +0000 (13:32 +0100)
committerMichael Tänzer <neo@nhng.de>
Tue, 10 Jan 2012 12:32:37 +0000 (13:32 +0100)
Conflicts:
www/wot.php

Signed-off-by: Michael Tänzer <neo@nhng.de>
1  2 
includes/account.php
includes/general.php
includes/general_stuff.php
pages/wot/5.php
www/index.php
www/wot.php

Simple merge
Simple merge
Simple merge
diff --cc pages/wot/5.php
Simple merge
diff --cc www/index.php
Simple merge
diff --cc www/wot.php
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */ ?>
  <?
-       require_once("../includes/loggedin.php");
-       require_once("../includes/lib/l10n.php");
++require_once("../includes/loggedin.php");
++require_once("../includes/lib/l10n.php");
 +
-       loadem("account");
  
 -      if($_POST['reminder-lang'] != "" && $_POST['reminder-lang'] != "en_AU")
 -        {
 -              $userlang = $_POST['reminder-lang'];
 -              $_SESSION['_config']['reminder-lang'] = $_POST['reminder-lang'];
 -              putenv("LANG=".$userlang);
 -              setlocale(LC_ALL, $userlang);
 -
 -              $body .= $_SESSION['_config']['translations'][$userlang].":\n\n";
+ function show_page($target,$message,$error)
+ {
+       showheader(_("My CAcert.org Account!"));
+       if ($error != "")
+               $message=_("ERROR").": ".$error;
+       if ($message != "")
+               echo "<p><font color='orange' size='+1'>".$message."</font></p>";
+       switch ($target)
+       {
+               case '0':
+               case 'InfoPage':        includeit(0, "wot");
+                                       break;
+               case '1':
+               case 'ListByCity':      includeit(1, "wot");
+                                       break;
+               case '2':
+               case 'BecomeAssurer':   includeit(2, "wot");
+                                       break;
+               case '3':
+               case 'TrustRules':      includeit(3, "wot");
+                                       break;
+               case '4':
+               case 'ShowTTPInfo':     includeit(4, "wot");
+                                       break;
+               case '5';
+               case 'EnterEmail':      includeit(5, "wot");
+                                       break;
+               case '6':
+               case 'VerifyData':      includeit(6, "wot");
+                                       break;
+ //            case '7':
+ //            case '???':             includeit(7, "wot");
+ //                                    break;
+               case '8':
+               case 'EnterMyInfo':     includeit(8, "wot");
+                                       break;
+               case '9':
+               case 'ContactAssurer':  includeit(9, "wot");
+                                       break;
+               case '10':
+               case 'MyPointsOld':     includeit(10, "wot");
+                                       break;
+ //            case '11':
+ //            case 'OAInfo':          includeit(11, "wot");
+ //                                    break;
+               case '12':
+               case 'SearchAssurer':   includeit(12, "wot");
+                                       break;
+               case '13':
+               case 'EnterMyCity':     includeit(13, "wot");
+                                       break;
+ //            case '14':
+ //            case 'EnterEmail':      includeit(14, "wot");
+ //                                    break;
+               case '15':
+               case 'MyPointsNew':     includeit(15, "wot");
+                                       break;
+       }
+       showfooter();
+ }
+ function send_reminder()
+ {
+       $body = "";
 -              $body .= _("CAcert Support Team");
 -
 -              $body .= "\n\nEnglish:\n\n";
++      $my_translation = L10n::get_translation();
++      
++      $_SESSION['_config']['reminder-lang'] = $_POST['reminder-lang'];
++      
++      $reminder_translations[] = $_POST['reminder-lang'];
++      if ( !in_array("en", $reminder_translations, $strict=true) ) {
++              $reminder_translations[] = "en";
++      }
++      
++      foreach ($reminder_translations as $translation) {
++              L10n::set_translation($translation);
++              
++              $body .= L10n::$translations[$translation].":\n\n";
+               $body .= sprintf(_("This is a short reminder that you filled out forms to become trusted with CAcert.org, and %s has attempted to issue you points. Please create your account at %s as soon as possible and then notify %s so that the points can be issued."), $_SESSION['profile']['fname']." (".$_SESSION['profile']['email'].")", "http://www.cacert.org", $_SESSION['profile']['fname'])."\n\n";
+               $body .= _("Best regards")."\n";
 -
 -      $body .= sprintf("This is a short reminder that you filled out forms to become trusted with CAcert.org, and %s has attempted to issue you points. Please create your account at %s as soon as possible and then notify %s so that the points can be issued.", $_SESSION['profile']['fname']." (".$_SESSION['profile']['email'].")", "http://www.cacert.org", $_SESSION['profile']['fname'])."\n\n";
 -      $body .= "Best regards"."\n";
 -      $body .= "CAcert Support Team";
 -
++              $body .= _("CAcert Support Team")."\n\n";
+       }
 -
 -      if($_POST['reminder-lang'] != "" && $_POST['reminder-lang'] != "en_AU")
 -      {
 -              $userlang = $_SESSION['profile']['language'];
 -              putenv("LANG=".$userlang);
 -              setlocale(LC_ALL, $userlang);
 -      }
 -
++      
++      L10n::set_translation($reminder_translations[0]); // for the subject
+       sendmail($_POST['email'], "[CAcert.org] "._("Reminder Notice"), $body, $_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']);
 -
 -
 -      require_once("../includes/loggedin.php");
 -
++      
++      L10n::set_translation($my_translation);
++      
+       $_SESSION['_config']['remindersent'] = 1;
++      $_SESSION['_config']['error'] = _("A reminder notice has been sent.");
+ }
+       loadem("account");
        if(array_key_exists('date',$_POST) && $_POST['date'] != "")
                $_SESSION['_config']['date'] = $_POST['date'];