Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Punycode implementation as described in RFC 3492
See also: https://github.com/true/php-punycode
コード例 #1
0
ファイル: punycode.php プロジェクト: honj51/taobaocrm
function encode_punycode_item($name, $useutf8 = true)
{
    if (substr($name, 0, 4) != "xn--") {
        if (!$useutf8) {
            $name = encode_utf8($name);
        }
        $punycode = new Punycode();
        $name = $punycode->encode($name);
    }
    return $name;
}
コード例 #2
0
ファイル: punycode.php プロジェクト: musashi0128/wordpress
function convert_punycode($url, $is_encode = true)
{
    $url_parts = parse_url($url);
    $Punycode = new Punycode();
    if ($is_encode) {
        $host = $Punycode->encode($url_parts['host']);
    } else {
        $host = $Punycode->decode($url_parts['host']);
    }
    $url_parts['host'] = $host;
    return http_build_url($url, $url_parts);
}
コード例 #3
0
ファイル: smbind.class.php プロジェクト: PtY1968/smbind-ng
function hostToIdn($host)
{
    preg_match(IDN_PUNY_PATTERN, $host, $match);
    if (count($match) == 0) {
        return strlen($host) > 4 && substr($host, 0, 4) == 'xn--' ? Punycode::decodeHostName($host) : $host;
    }
    $tags = explode($match[0], $host);
    $ret = array();
    foreach ($tags as $tag) {
        $ret[] = $tag == '' ? '' : hostToIdn($tag, $match[0]);
    }
    return implode($match[0], $ret);
}
コード例 #4
0
ファイル: class.Registry.php プロジェクト: rchicoria/epp-drs
 /**
  * Encode a given ACE string
  *
  * @param string $ace_string
  * @return string UTF-8 or UCS-4
  */
 public function PunycodeDecode($ace_string)
 {
     return Punycode::Decode($ace_string);
 }
コード例 #5
0
ファイル: class-punycode.php プロジェクト: robkub/tc-tools
 public static function set_options($options)
 {
     self::$OPTIONS = array_merge(self::$OPTIONS, (array) $options);
 }
コード例 #6
0
ファイル: PunycodeTest.php プロジェクト: jwslink/restfulapi
 /**
  * Test decoding Punycode
  *
  * @param string $decoded Decoded domain
  * @param string $encoded Encoded domain
  * @dataProvider domainNamesProvider
  */
 public function testDecode($decoded, $encoded)
 {
     $Punycode = new Punycode();
     $result = $Punycode->decode($encoded);
     $this->assertEquals($decoded, $result);
 }
コード例 #7
0
ファイル: whois.php プロジェクト: rchicoria/epp-drs
	    			
	    			$result = @file_get_contents($url);
	    			if (!$result)
	    				$result = _("Cannot retrieve whois information for this domain.");
	    		}
	    		else 
	    		{
	    			// Whois protocol
	    			$text_plain = true;
	    			$result = "";
	    			$sock = @fsockopen($chunks[1], 43, $errno, $errstr, 5);
	    			if (!$sock)
	    				$result = _("Failed to connect to whois server.");
	    			else 
	    			{
	    				$domain_name = Punycode::Encode("{$domainname}.{$TLD}");
	    				@fwrite($sock, "{$domain_name}\n");
	    				while (!feof($sock))
	    				{
	    					$result .= trim(@fread($sock, 1024));
	    				}
	    			}
	    		}
	    		
	    		break;
	    	}
	    }
	}
    
    if (!$result)
    {
コード例 #8
0
ファイル: c_system_event.php プロジェクト: zblogcn/zblogphp
/**
 * 保存网站设置选项
 */
function SaveSetting()
{
    global $zbp;
    foreach ($_POST as $key => $value) {
        if (substr($key, 0, 2) !== 'ZC') {
            continue;
        }
        if ($key == 'ZC_PERMANENT_DOMAIN_ENABLE' || $key == 'ZC_COMMENT_TURNOFF' || $key == 'ZC_COMMENT_REVERSE_ORDER' || $key == 'ZC_COMMENT_AUDIT' || $key == 'ZC_DISPLAY_SUBCATEGORYS' || $key == 'ZC_GZIP_ENABLE' || $key == 'ZC_SYNTAXHIGHLIGHTER_ENABLE' || $key == 'ZC_COMMENT_VERIFY_ENABLE' || $key == 'ZC_CLOSE_SITE') {
            $zbp->option[$key] = (bool) $value;
            continue;
        }
        if ($key == 'ZC_RSS2_COUNT' || $key == 'ZC_UPLOAD_FILESIZE' || $key == 'ZC_DISPLAY_COUNT' || $key == 'ZC_SEARCH_COUNT' || $key == 'ZC_PAGEBAR_COUNT' || $key == 'ZC_COMMENTS_DISPLAY_COUNT' || $key == 'ZC_MANAGE_COUNT') {
            $zbp->option[$key] = (int) $value;
            continue;
        }
        if ($key == 'ZC_UPLOAD_FILETYPE') {
            $value = strtolower($value);
            $value = DelNameInString($value, 'php');
            $value = DelNameInString($value, 'asp');
        }
        if ($key == 'ZC_DEBUG_MODE') {
            if ((bool) $value) {
                $zbp->option['ZC_DEBUG_MODE'] = true;
                $zbp->option['ZC_DEBUG_MODE_STRICT'] = true;
                $zbp->option['ZC_DEBUG_LOG_ERROR'] = true;
            } else {
                $zbp->option['ZC_DEBUG_MODE'] = false;
                $zbp->option['ZC_DEBUG_MODE_STRICT'] = false;
                $zbp->option['ZC_DEBUG_LOG_ERROR'] = false;
            }
        }
        $zbp->option[$key] = trim(str_replace(array("\r", "\n"), array("", ""), $value));
    }
    $Punycode = new Punycode();
    $zbp->option['ZC_BLOG_HOST'] = trim($zbp->option['ZC_BLOG_HOST']);
    $zbp->option['ZC_BLOG_HOST'] = trim($zbp->option['ZC_BLOG_HOST'], '/') . '/';
    if ($zbp->option['ZC_BLOG_HOST'] == '/') {
        $zbp->option['ZC_BLOG_HOST'] = $zbp->host;
    }
    $zbp->option['ZC_BLOG_HOST'] = $Punycode->encode($zbp->option['ZC_BLOG_HOST']);
    $lang = (require $zbp->usersdir . 'language/' . $zbp->option['ZC_BLOG_LANGUAGEPACK'] . '.php');
    $zbp->option['ZC_BLOG_LANGUAGE'] = $lang['lang'];
    $zbp->option['ZC_BLOG_PRODUCT'] = 'Z-BlogPHP';
    $zbp->SaveOption();
}
コード例 #9
0
ファイル: class.Punycode.php プロジェクト: rchicoria/epp-drs
 private static function InitIDNAConverter()
 {
     if (self::$IDNAConverter === null) {
         self::$IDNAConverter = new idna_convert();
     }
 }
コード例 #10
0
ファイル: eppcmd.php プロジェクト: rchicoria/epp-drs
            } catch (RegistryException $e) {
                print "{$e->getMessage()}\n";
            }
        }
        break;
    case "se-cancel-delete":
        if ($Registry && $domainname) {
            $module = $Registry->GetModule();
            try {
                $module->Request("test-domain-delete", array("name" => "{$domainname}.{$tld}", "clientDelete" => 0));
                print "Cancel delete request for '{$domainname}.{$tld}' is sent\n";
            } catch (RegistryException $e) {
                print "{$e->getMessage()}\n";
            }
        }
        break;
    case "idn-decode":
        print Punycode::Decode($argv[2]) . "\n";
        break;
    case "idn-encode":
        print Punycode::Encode($argv[2]) . "\n";
        break;
    case "is-idn":
        print preg_match('/[\\x00-\\x1F\\x7F-\\xFF]+/', $argv[2]) ? "Yes\n" : "No\n";
        break;
    case "decrypt":
        $str = $argv[2];
        $key = $argv[3];
        print $Crypto->Decrypt($str, $key) . "\n";
        break;
}
コード例 #11
0
ファイル: vkapi.php プロジェクト: omodev/hooks
 /**
  * @param $vk_at string
  * @param $post WP_Post
  * @return bool
  */
 private function crosspost($vk_at, $post)
 {
     $body = array();
     // todo-dx: crosspost to facebook, g-plus, twitter
     $body['access_token'] = $vk_at;
     $body['from_group'] = 1;
     $body['signed'] = get_option('vkapi_crosspost_signed');
     $vk_group_id = get_option('vkapi_vk_group');
     if (!is_numeric($vk_group_id)) {
         $params = array();
         $params['group_id'] = $vk_group_id;
         $params['fields'] = 'screen_name';
         $result = wp_remote_get($this->vk_api_buildQuery('groups.getById', $params));
         if (is_wp_error($result)) {
             $msg = $result->get_error_message();
             self::notice_error('CrossPost: ' . $msg . ' wpx' . __LINE__);
             return false;
         }
         $r_data = json_decode($result['body'], true);
         if (!$r_data['response']) {
             $msg = $r_data['error']['error_msg'] . ' ' . $r_data['error']['error_code'];
             self::notice_error('CrossPost: API Error Code: ' . $msg . 'vkx' . __LINE__);
             return false;
         }
         $vk_group_id = $r_data['response'][0]['id'];
         $vk_group_screen_name = $r_data['response'][0]['screen_name'];
     }
     $vk_group_id = -$vk_group_id;
     $body['owner_id'] = $vk_group_id;
     // Attachment
     $att = array();
     // todo(dx): upgrade crosspost_get_image
     $image_path = $this->crosspost_get_image($post->ID);
     if ($image_path) {
         $att[] = $this->vk_upload_photo($vk_at, $vk_group_id, $image_path);
     }
     $temp = isset($_REQUEST['vkapi_crosspost_link']) ? $_REQUEST['vkapi_crosspost_link'] : get_option('vkapi_crosspost_link');
     if (!empty($temp)) {
         $temp = get_permalink($post->ID);
         if (!class_exists('Punycode')) {
             // todo-dx: глянуть, говорят сломалось... потестил, у мну всё замечательно работает. Саботаж?
             require_once $this->plugin_path . 'php/punycode.php';
             $temp = Punycode::urldecode($temp);
         }
         $att[] = $temp;
     }
     if (!empty($att)) {
         $body['attachments'] = implode(',', $att);
     }
     // Text
     $text = do_shortcode($post->post_content);
     $text = $this->html2text($text);
     $text = html_entity_decode($text, ENT_QUOTES);
     $temp = isset($_REQUEST['vkapi_crosspost_length']) ? $_REQUEST['vkapi_crosspost_length'] : get_option('vkapi_crosspost_length');
     if ((int) $temp > 0) {
         $text_len = mb_strlen($text);
         $text = mb_substr($text, 0, (int) $temp);
         $last_pos = strrpos($text, ' ');
         if (!$last_pos) {
             $last_pos = strrpos($text, "\n");
         }
         if ($last_pos) {
             $text = mb_substr($text, 0, $last_pos);
         }
         if (mb_strlen($text) != $text_len) {
             $text .= '...';
         }
         $text = $post->post_title . "\r\n\r\n" . $text;
     } else {
         if ((int) $temp === -1) {
             $text = '';
         }
     }
     $body['message'] = $text;
     // mini-test
     if (mb_strlen($body['attachments']) === 0 && mb_strlen($body['message']) === 0) {
         self::notice_error('Crosspost: (рус) Ни текста ни медиа-приложений.');
     }
     // Call
     $body['v'] = $this->vkapi_version;
     #$body['publish_date'] = unixtime; // $post->post_date_gmt = '2014-12-21 06:39:40';
     $curl = new Wp_Http_Curl();
     $result = $curl->request($this->vkapi_server . 'wall.post', array('body' => $body, 'method' => 'POST'));
     /** @var $result WP_Error */
     if (is_wp_error($result)) {
         $msg = $result->get_error_message();
         self::notice_error('CrossPost: ' . $msg . ' wpx' . __LINE__);
         return false;
     }
     $r_data = json_decode($result['body'], true);
     if (isset($r_data['error'])) {
         if ($r_data['error']['error_code'] == 14) {
             $captcha_sid = $r_data['error']['captcha_sid'];
             $captcha_img = $r_data['error']['captcha_img'];
             $captcha_body = implode($captcha_sid, $body);
             $captcha_action = 'options-general.php?page=vkapi_captcha';
             $captcha_nonce = wp_create_nonce($captcha_sid . $captcha_body);
             $msg = "\n                    Captcha needed: <img src='{$captcha_img}'>\n                    <form method='post' action='{$captcha_action}' target='_blank'>\n                        <input type='text' name='captcha_key'>\n                        <input type='hidden' name='captcha_sid' value='{$captcha_sid}'>\n                        <input type='hidden' name='captcha_body' value='{$captcha_body}'>\n                        <input type='hidden' name='captcha_nonce' value='{$captcha_nonce}'>\n                        <input type='submit' class='button button-primary'>\n                    </form>\n                    ";
             self::notice_error('CrossPost: API Error Code: ' . $msg . 'vkx' . __LINE__);
         } else {
             $msg = $r_data['error']['error_msg'] . ' ' . $r_data['error']['error_code'] . ' _' . $body['attachments'];
             self::notice_error('CrossPost: API Error Code: ' . $msg . 'vkx' . __LINE__);
         }
         return false;
     }
     $temp = isset($vk_group_screen_name) ? $vk_group_screen_name : 'club' . $vk_group_id;
     $post_link = "https://vk.com/{$temp}?w=wall{$vk_group_id}_{$r_data['response']['post_id']}%2Fall";
     $post_href = "<a href='{$post_link}' target='_blank'>{$temp}</a>";
     self::notice_notice('CrossPost: Success ! ' . $post_href);
     update_post_meta($post->ID, 'vkapi_crossposted', $r_data['response']['post_id']);
     return true;
 }
コード例 #12
0
ファイル: c_system_admin.php プロジェクト: zblogcn/zblogphp
/**
 * 后台网站设置管理
 */
function Admin_SettingMng()
{
    global $zbp;
    echo '<div class="divHeader">' . $zbp->lang['msg']['settings'] . '</div>';
    echo '<div class="SubMenu">';
    foreach ($GLOBALS['hooks']['Filter_Plugin_Admin_SettingMng_SubMenu'] as $fpname => &$fpsignal) {
        $fpname();
    }
    echo '</div>';
    ?>

		  <form method="post" action="../cmd.php?act=SettingSav<?php 
    echo '&amp;token=' . $zbp->GetToken();
    ?>
">
			<div id="divMain2">
			  <div class="content-box"><!-- Start Content Box -->

				<div class="content-box-header">
				  <ul class="content-box-tabs">
					<li><a href="#tab1" class="default-tab"><span><?php 
    echo $zbp->lang['msg']['basic_setting'];
    ?>
</span></a></li>
					<li><a href="#tab2"><span><?php 
    echo $zbp->lang['msg']['global_setting'];
    ?>
</span></a></li>
					<li><a href="#tab3"><span><?php 
    echo $zbp->lang['msg']['page_setting'];
    ?>
</span></a></li>
					<li><a href="#tab4"><span><?php 
    echo $zbp->lang['msg']['comment_setting'];
    ?>
</span></a></li>
				  </ul>
				  <div class="clear"></div>
				</div>
				<!-- End .content-box-header -->

				<div class="content-box-content">
<?php 
    $Punycode = new Punycode();
    $decodedBlogHost = $Punycode->decode($zbp->option['ZC_BLOG_HOST']);
    echo '<div class="tab-content default-tab" style="border:none;padding:0px;margin:0;" id="tab1">';
    echo '<table style="padding:0px;margin:0px;width:100%;" class="table_hover table_striped">';
    echo '<tr><td class="td25"><p><b>' . $zbp->lang['msg']['blog_host'] . '</b><br/><span class="note">' . $zbp->lang['msg']['blog_host_add'] . '</span></p></td><td><p><input id="ZC_BLOG_HOST" name="ZC_BLOG_HOST" style="width:600px;" type="text" value="' . $decodedBlogHost . '" ' . ($zbp->option['ZC_PERMANENT_DOMAIN_ENABLE'] ? '' : 'readonly="readonly"') . ' />';
    echo '<p><label onclick="$(\'#ZC_BLOG_HOST\').prop(\'readonly\', $(\'#ZC_PERMANENT_DOMAIN_ENABLE\').val()==0?true:false);"><input type="text" id="ZC_PERMANENT_DOMAIN_ENABLE" name="ZC_PERMANENT_DOMAIN_ENABLE" class="checkbox" value="' . $zbp->option['ZC_PERMANENT_DOMAIN_ENABLE'] . '"/></label>' . $zbp->lang['msg']['permanent_domain'] . '</p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['blog_name'] . '</b></p></td><td><p><input id="ZC_BLOG_NAME" name="ZC_BLOG_NAME" style="width:600px;" type="text" value="' . $zbp->option['ZC_BLOG_NAME'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['blog_subname'] . '</b></p></td><td><p><input id="ZC_BLOG_SUBNAME" name="ZC_BLOG_SUBNAME" style="width:600px;"  type="text" value="' . $zbp->option['ZC_BLOG_SUBNAME'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['copyright'] . '</b><br/><span class="note">' . $zbp->lang['msg']['copyright_add'] . '</span></p></td><td><p><textarea cols="3" rows="6" id="ZC_BLOG_COPYRIGHT" name="ZC_BLOG_COPYRIGHT" style="width:600px;">' . htmlspecialchars($zbp->option['ZC_BLOG_COPYRIGHT']) . '</textarea></p></td></tr>';
    echo '</table>';
    echo '</div>';
    echo '<div class="tab-content" style="border:none;padding:0px;margin:0;" id="tab2">';
    echo '<table style="padding:0px;margin:0px;width:100%;" class="table_hover table_striped">';
    echo '<tr><td class="td25"><p><b>' . $zbp->lang['msg']['blog_timezone'] . '</b></p></td><td><p><select id="ZC_TIME_ZONE_NAME" name="ZC_TIME_ZONE_NAME" style="width:600px;" >';
    echo CreateOptionsOfTimeZone($zbp->option['ZC_TIME_ZONE_NAME']);
    echo '</select></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['blog_language'] . '</b></p></td><td><p><select id="ZC_BLOG_LANGUAGEPACK" name="ZC_BLOG_LANGUAGEPACK" style="width:600px;" >';
    echo CreateOptionsOfLang($zbp->option['ZC_BLOG_LANGUAGEPACK']);
    echo '</select></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['allow_upload_type'] . '</b></p></td><td><p><input id="ZC_UPLOAD_FILETYPE" name="ZC_UPLOAD_FILETYPE" style="width:600px;" type="text" value="' . $zbp->option['ZC_UPLOAD_FILETYPE'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['allow_upload_size'] . '</b></p></td><td><p><input id="ZC_UPLOAD_FILESIZE" name="ZC_UPLOAD_FILESIZE" style="width:600px;" type="text" value="' . $zbp->option['ZC_UPLOAD_FILESIZE'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['debug_mode'] . '</b></p></td><td><p><input id="ZC_DEBUG_MODE" name="ZC_DEBUG_MODE" type="text" value="' . $zbp->option['ZC_DEBUG_MODE'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['gzip_compress'] . '</b></p></td><td><p><input id="ZC_GZIP_ENABLE" name="ZC_GZIP_ENABLE" type="text" value="' . $zbp->option['ZC_GZIP_ENABLE'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['syntax_high_lighter'] . '</b></p></td><td><p><input id="ZC_SYNTAXHIGHLIGHTER_ENABLE" name="ZC_SYNTAXHIGHLIGHTER_ENABLE" type="text" value="' . $zbp->option['ZC_SYNTAXHIGHLIGHTER_ENABLE'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['close_site'] . '</b></p></td><td><p><input id="ZC_CLOSE_SITE" name="ZC_CLOSE_SITE" type="text" value="' . $zbp->option['ZC_CLOSE_SITE'] . '" class="checkbox"/></p></td></tr>';
    echo '</table>';
    echo '</div>';
    echo '<div class="tab-content" style="border:none;padding:0px;margin:0;" id="tab3">';
    echo '<table style="padding:0px;margin:0px;width:100%;" class="table_hover table_striped">';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['display_count'] . '</b></p></td><td><p><input id="ZC_DISPLAY_COUNT" name="ZC_DISPLAY_COUNT" style="width:600px;" type="text" value="' . $zbp->option['ZC_DISPLAY_COUNT'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['display_subcategorys'] . '</b></p></td><td><p><input id="ZC_DISPLAY_SUBCATEGORYS" name="ZC_DISPLAY_SUBCATEGORYS" type="text" value="' . $zbp->option['ZC_DISPLAY_SUBCATEGORYS'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['pagebar_count'] . '</b></p></td><td><p><input id="ZC_PAGEBAR_COUNT" name="ZC_PAGEBAR_COUNT" style="width:600px;" type="text" value="' . $zbp->option['ZC_PAGEBAR_COUNT'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['search_count'] . '</b></p></td><td><p><input id="ZC_SEARCH_COUNT" name="ZC_SEARCH_COUNT" style="width:600px;" type="text" value="' . $zbp->option['ZC_SEARCH_COUNT'] . '" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['manage_count'] . '</b></p></td><td><p><input id="ZC_MANAGE_COUNT" name="ZC_MANAGE_COUNT" style="width:600px;" type="text" value="' . $zbp->option['ZC_MANAGE_COUNT'] . '" /></p></td></tr>';
    echo '</table>';
    echo '</div>';
    echo '<div class="tab-content" style="border:none;padding:0px;margin:0;" id="tab4">';
    echo '<table style="padding:0px;margin:0px;width:100%;" class="table_hover table_striped">';
    echo '<tr><td class="td25"><p><b>' . $zbp->lang['msg']['comment_turnoff'] . '</b></p></td><td><p><input id="ZC_COMMENT_TURNOFF" name="ZC_COMMENT_TURNOFF" type="text" value="' . $zbp->option['ZC_COMMENT_TURNOFF'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td class="td25"><p><b>' . $zbp->lang['msg']['comment_audit'] . '</b><br/><span class="note">' . $zbp->lang['msg']['comment_audit_comment'] . '</span></p></td><td><p><input id="ZC_COMMENT_AUDIT" name="ZC_COMMENT_AUDIT" type="text" value="' . $zbp->option['ZC_COMMENT_AUDIT'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['comment_reverse_order'] . '</b></p></td><td><p><input id="ZC_COMMENT_REVERSE_ORDER" name="ZC_COMMENT_REVERSE_ORDER" type="text" value="' . $zbp->option['ZC_COMMENT_REVERSE_ORDER'] . '" class="checkbox"/></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['comments_display_count'] . '</b></p></td><td><p><input id="ZC_COMMENTS_DISPLAY_COUNT" name="ZC_COMMENTS_DISPLAY_COUNT" type="text" value="' . $zbp->option['ZC_COMMENTS_DISPLAY_COUNT'] . '"  style="width:600px;" /></p></td></tr>';
    echo '<tr><td><p><b>' . $zbp->lang['msg']['comment_verify_enable'] . '</b></p></td><td><p><input id="ZC_COMMENT_VERIFY_ENABLE" name="ZC_COMMENT_VERIFY_ENABLE" type="text" value="' . $zbp->option['ZC_COMMENT_VERIFY_ENABLE'] . '" class="checkbox"/></p></td></tr>';
    echo '</table>';
    echo '</div>';
    ?>
				</div>
				<!-- End .content-box-content -->

			  </div>
			  <hr/>
			  <p><input type="submit" class="button" value="<?php 
    echo $zbp->lang['msg']['submit'];
    ?>
" id="btnPost" onclick="" /></p>
			</div>
		  </form>
<?php 
    echo '<script type="text/javascript">ActiveTopMenu("topmenu2");</script>';
    echo '<script type="text/javascript">AddHeaderIcon("' . $zbp->host . 'zb_system/image/common/setting_32.png' . '");</script>';
}
コード例 #13
0
ファイル: PunycodeTest.php プロジェクト: rhymix/rhymix
 /**
  * Test decoding Punycode in uppercase
  *
  * @param string $decoded Decoded domain
  * @param string $encoded Encoded domain
  * @dataProvider domainNamesProvider
  */
 public function testDecodeUppercase($decoded, $encoded)
 {
     $Punycode = new Punycode();
     $result = $Punycode->decode(strtoupper($encoded));
     $this->assertEquals($decoded, $result);
 }