Пример #1
0
 public function run()
 {
     $rndCodeStr = implode(',', YucMath::getCheckCode(5, 2));
     $code = urlencode(base64_encode(YucCrypt::encrypt($rndCodeStr, YucMath::erypt_key())));
     $c_id = YucMath::getMultiSerialId(2, 10);
     $plugin_path = dirname($this->_context->baseDir());
     $imgsrc = YucServer::getServerUrl() . "{$plugin_path}/image.php?I_S={$c_id}&mass={$code}";
     $renderid = $this->_context->get('renderid', '');
     echo "yuc_site_config.{$renderid}=" . json_encode(array('imgsrc' => $imgsrc, 'mass' => $code, "result" => array("code" => 0, 'details' => '')));
 }