From 85e283602a673f3a28888388eceb13d53e4cd856 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 14 Aug 2012 07:32:40 +0000 Subject: [PATCH] + add for chinesize encrypt. --- bin/callback.php | 36 ++++++++++++++++++++++++++++++++++++ bin/encryptext.php | 17 ++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 bin/callback.php diff --git a/bin/callback.php b/bin/callback.php new file mode 100644 index 0000000000..2dce521d7c --- /dev/null +++ b/bin/callback.php @@ -0,0 +1,36 @@ + + + + error + + +

您的软件已经到期

+

网站错误:您的软件已经到期,功能无法继续使用。如果想要继续使用,请续费。

+ + + "; + $server = " + + + + error + + +

软件运行服务器受限制

+

网站错误:软件运行服务器IP受限制,请在正确的IP服务器下运行。

+ + + "; + if($err_code == ION_LICENSE_EXPIRED) + { + echo $expired; + } + elseif($err_code == ION_LICENSE_SERVER_INVALID) + { + echo $server; + } +} diff --git a/bin/encryptext.php b/bin/encryptext.php index 5e36da03cd..1e33deafc3 100644 --- a/bin/encryptext.php +++ b/bin/encryptext.php @@ -151,6 +151,18 @@ if($defaultValue) file_put_contents($defaultDir . basename($filePath) . '.php', $valueFile); } $file = "/tmp/$dirName"; +$noLoader = " +' + + + error + + +

未安装 ioncube loader

+

网站错误:文件'.__file__.'需要安装ioncube php loader 解析,该网站需要安装'.basename(\\\$__ln).'。如果你是网站所有者,请使用ioncube loader安装向导

+ +' +"; /* encrypt file*/ echo "Encrypting extension\n"; @@ -165,8 +177,11 @@ $order->type = $type; $passphrase = PASSWORD; createLicense($order, $dirName, '/tmp/encrypt/'); $withLicense = "--with-license config/license/" . basename($file) . ".txt --passphrase $passphrase"; +$callbackFile = dirname(__FILE__) . "/callback.php"; +echo `cp $callbackFile /tmp/encrypt/$dirName/config/license/`; +$callback = "--callback-file config/license/callback.php"; -exec("/usr/local/ioncube/ioncube_encoder5 --copy config.php --copy phpexcel/ --copy tmp/ --copy hook/ --copy framework/ --copy config/ --copy view/ --copy lang/ $withLicense $file --update-target --into /tmp/encrypt/", $outError); +exec("/usr/local/ioncube/ioncube_encoder5 --copy config.php --copy phpexcel/ --copy tmp/ --copy hook/ --copy framework/ --copy config/ --copy view/ --copy lang/ $withLicense $callback --message-if-no-loader \"$noLoader\" $file --update-target --into /tmp/encrypt/", $outError); foreach($outError as $error) { $errorFile = substr($error, 0 , strpos($error, ':'));