|
|
@@ -12,8 +12,13 @@ require_once "../redis/function.php";
|
|
|
require_once "../public/function.php";
|
|
|
|
|
|
if (PHP_SAPI == "cli") {
|
|
|
- if ($argc == 2) {
|
|
|
+ if ($argc >= 2) {
|
|
|
$email = $argv[1];
|
|
|
+ if($argc > 2){
|
|
|
+ $lang = $argv[2];
|
|
|
+ }else{
|
|
|
+ $lang = "cn";
|
|
|
+ }
|
|
|
$redis = redis_connect();
|
|
|
if ($redis == false) {
|
|
|
echo "no redis connect\n";
|
|
|
@@ -30,7 +35,8 @@ if (PHP_SAPI == "cli") {
|
|
|
$irow=0;
|
|
|
$strSubject = "";
|
|
|
$strBody = "";
|
|
|
- if(($fp=fopen("invite_letter.html", "r"))!==FALSE){
|
|
|
+ $filename = "invite_letter_{$lang}.html";
|
|
|
+ if(($fp=fopen($filename, "r"))!==FALSE){
|
|
|
while(($data=fgets($fp))!==FALSE){
|
|
|
$irow++;
|
|
|
if($irow==1){
|