$officeKmsCmd) { $office[$index] .= PHP_EOL . $activeCmd; } } function showOfficeHelp() { // 命令行输出Office激活帮助 loadOfficeCmd(); global $office, $osppOption, $osppDescription, $osppDescriptionCn; foreach ($office as $index => $officeKmsCmd) { echo str_pad('', 34, ' ') . 'Office Professional Plus ' . $index . ' VL Activation Command' . PHP_EOL; echo str_pad('', 120, '-') . PHP_EOL; echo $officeKmsCmd; echo str_pad('', 120, '-') . PHP_EOL . PHP_EOL; } $length = 0; $length_first = 0; foreach ($osppOption as $index => $option) { // 获取最长的字符串长度 $strLength = strlen($option) + strlen($osppDescription[$index]); if ($length < $strLength) { $length = $strLength; $length_first = strlen($option); } } $title = 'Common activation commands'; echo str_pad('', floor(($length - strlen($title) + 26) / 2), ' ') . $title . PHP_EOL; echo '┏' . str_pad('', $length + 24, '-') . '┓' . PHP_EOL; foreach ($osppOption as $index => $option) { echo '| cscript ospp.vbs ' . str_pad($osppOption[$index], $length_first, ' ') . ' | '; echo str_pad($osppDescription[$index], $length - $length_first + 2, ' ') . ' |' . PHP_EOL; } echo '┗' . str_pad('', $length + 24, '-') . '┛' . PHP_EOL . PHP_EOL; echo 'These commands are only applicable to the VL version of Office.' . PHP_EOL; echo 'If it is a Retail version, please convert it to Volume first.' . PHP_EOL . PHP_EOL; } function webOfficeHelp() { // 网页输出Office激活帮助 loadOfficeCmd(); global $office, $osppOption, $osppDescription, $osppDescriptionCn; echo ''; echo ''; echo 'Office KMS Server'; echo '
'; foreach ($office as $officeVersion => $officeKmsCmd) { echo '

Office Professional Plus ' . $officeVersion . ' VL

' . PHP_EOL; echo '
' . $officeKmsCmd . '
' . PHP_EOL; } echo '

常用激活命令

' . PHP_EOL; echo ''; foreach ($osppOption as $index => $option) { echo ''; echo ''; } echo '
命令说明
cscript ospp.vbs ' . $option . '' . $osppDescriptionCn[$index] . '

' . PHP_EOL; echo '

以上命令仅用于激活VL版本的Office,如果当前为Retail版本,请先转化为批量授权版本。

' . PHP_EOL; echo '
'; } ?>