namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
	class="w3tc_cdn_rackspace_form">
	<?php 
Util_Ui::hidden('', 'w3tc_action', 'cdn_rackspace_service_actualize_done');
Util_Ui::hidden('', 'user_name', $details['user_name']);
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'access_token', $details['access_token']);
Util_Ui::hidden('', 'access_region_descriptor', $details['access_region_descriptor_serialized']);
Util_Ui::hidden('', 'region', $details['region']);
Util_Ui::hidden('', 'service_id', $details['service_id']);
echo Util_Ui::nonce_field('w3tc');
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>

	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Configure service', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<th>Name:</th>
				<td><?php 
echo $details['name'];
 private function render_zone_boolean_change($details, $field)
 {
     Util_Ui::hidden('', $field, $details[$field]['new']);
     if (!isset($details[$field]['current'])) {
         echo 'will be set to <strong>';
         echo $this->render_zone_boolean($details[$field]['new']);
         echo '</strong>';
     } else {
         if ($details[$field]['current'] == $details[$field]['new']) {
             echo '<strong>';
             echo $this->render_zone_boolean($details[$field]['new']);
             echo '</strong>';
         } else {
             echo 'currently set to <strong>';
             $this->render_zone_boolean($details[$field]['current']);
             echo '</strong><br />';
             echo 'will be changed to <strong>';
             $this->render_zone_boolean($details[$field]['new']);
             echo '</strong><br />';
         }
     }
 }
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
    class="w3tc_cdn_rackspace_form">
    <?php 
Util_Ui::hidden('', 'user_name', $details['user_name']);
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'access_token', $details['access_token']);
Util_Ui::hidden('', 'access_region_descriptor', $details['access_region_descriptor_serialized']);
Util_Ui::hidden('', 'region', $details['region']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Create new service', 'w3-total-cache'));
?>
        <table class="form-table" style="width: 100%">
            <tr>
                <th style="width: 150px">Name:</td>
                <td>
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
    class="w3tc_cdn_rackspace_form">
    <?php 
Util_Ui::hidden('', 'w3tc_action', 'cdn_rackspace_regions_done');
Util_Ui::hidden('', 'user_name', $details['user_name']);
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'access_token', $details['access_token']);
Util_Ui::hidden('', 'region_descriptors', $details['region_descriptors_serialized']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select region', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>Region:</td>
                <td>
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_cdn_rackspace_form" method="post" style="padding: 20px">
	<?php 
Util_Ui::hidden('', 'w3tc_action', 'cdn_rackspace_intro_done');
?>
	<?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Your RackSpace API key', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<th><?php 
_e('Username:'******'w3-total-cache');
?>
</td>
				<td>
					<input name="user_name" type="text" class="w3tc-ignore-change"
						style="width: 100px"
						value="<?php 
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_extension_cloudflare_form" method="post" style="padding: 20px">
	<?php 
Util_Ui::hidden('', 'w3tc_action', 'extension_cloudflare_intro_done');
?>
	<?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Your CloudFlare API key', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<th><?php 
_e('Email:', 'w3-total-cache');
?>
</td>
				<td>
					<input name="email" type="text" class="w3tc-ignore-change"
						style="width: 300px"
						value="<?php 
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_popup_form" method="post">
    <?php 
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'zone_id', $details['zone_id']);
Util_Ui::hidden('', 'name', $details['name']);
?>

    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Configure zone', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>Name:</th>
                <td><?php 
echo $details['name'];
?>
</td>
            </tr>
            <tr>
                <th>Origin URL:</th>
                <td><?php 
$this->render_zone_value_change($details, 'url');
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
    class="w3tc_cdn_highwinds_form">
    <?php 
Util_Ui::hidden('', 'account_hash', $details['account_hash']);
Util_Ui::hidden('', 'api_token', $details['api_token']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select host to use', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Host:</td>
                <td>
                    <?php 
foreach ($details['hosts'] as $host) {
    ?>
예제 #9
0
 /**
  * Renders <tr> element with controls
  * id =>
  * label =>
  * label_class =>
  * <control> => details
  * style - default is label,controls view,
  *         alternative is one-column view
  */
 public static function table_tr($a)
 {
     $id = isset($a['id']) ? $a['id'] : '';
     $a = apply_filters('w3tc_ui_settings_item', $a);
     if (isset($a['style'])) {
         echo '<tr><th colspan="2"';
     } else {
         echo '<tr><th';
         if (isset($a['label_class'])) {
             echo ' class="' . $a['label_class'] . '"';
         }
         echo '>';
         if (isset($a['label'])) {
             Util_Ui::label($id, $a['label']);
         }
         echo "</th>\n<td>\n";
     }
     foreach ($a as $key => $e) {
         if ($key == 'checkbox') {
             Util_Ui::checkbox($id, isset($e['name']) ? $e['name'] : null, $e['value'], isset($e['disabled']) ? $e['disabled'] : false, isset($e['label']) ? $e['label'] : null);
         } elseif ($key == 'description') {
             echo '<br /><span class="description">' . $e . '</span>';
         } elseif ($key == 'hidden') {
             Util_Ui::hidden('', $e['name'], $e['value']);
         } elseif ($key == 'html') {
             echo $e;
         } elseif ($key == 'radiogroup') {
             Util_Ui::radiogroup($e['name'], $e['value'], $e['values']);
         } elseif ($key == 'selectbox') {
             Util_Ui::selectbox($id, $e['name'], $e['value'], $e['values'], isset($e['disabled']) ? $e['disabled'] : false, isset($e['optgroups']) ? $e['optgroups'] : null);
         } elseif ($key == 'textbox') {
             Util_Ui::textbox($id, $e['name'], $e['value'], isset($e['disabled']) ? $e['disabled'] : false, !empty($e['size']) ? $e['size'] : 20);
         } elseif ($key == 'textarea') {
             Util_Ui::textarea($id, $e['name'], $e['value'], isset($e['disabled']) ? $e['disabled'] : false);
         }
     }
     if (isset($a['style'])) {
         echo "</th>";
     } else {
         echo "</td>";
     }
     echo "</tr>\n";
 }
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_popup_form" method="post">
    <?php 
Util_Ui::hidden('', 'api_key', $details['api_key']);
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select zone to use', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Zone:</td>
                <td>
                    <?php 
if (count($details['zones']) > 15) {
    echo '<div style="width: 100%; height: 300px; overflow-y: scroll">';
}
?>

                    <?php 
foreach ($details['zones'] as $zone) {
    ?>
                        <label>
                            <input name="zone_id" type="radio" class="w3tc-ignore-change"
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px">
    <?php 
Util_Ui::hidden('', 'client_id', $client_id);
Util_Ui::hidden('', 'access_token', $access_token);
Util_Ui::hidden('', 'refresh_token', $refresh_token);
echo Util_Ui::nonce_field('w3tc');
?>
    <br /><br />
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select folder', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Folder:</td>
                <td>
                    <?php 
foreach ($folders as $folder) {
    ?>
                        <label>
                            <input name="folder" type="radio" class="w3tc-ignore-change"
                                value="<?php 
    echo $folder->id;
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_popup_form" method="post">
    <?php 
Util_Ui::hidden('', 'access_key', $details['access_key']);
Util_Ui::hidden('', 'secret_key', $details['secret_key']);
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select distribution to use', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Distribution:</td>
                <td>
                    <?php 
if (count($details['distributions']) > 15) {
    echo '<div style="width: 100%; height: 300px; overflow-y: scroll">';
}
?>

                    <?php 
foreach ($details['distributions'] as $distribution) {
    ?>
                        <label>
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_popup_form" method="post">
    <?php 
Util_Ui::hidden('', 'access_key', $details['access_key']);
Util_Ui::hidden('', 'secret_key', $details['secret_key']);
Util_Ui::hidden('', 'distribution_id', $details['distribution_id']);
Util_Ui::hidden('', 'distribution_comment', $details['distribution_comment']);
?>

    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Configure distribution', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>Distribution:</th>
                <td><?php 
echo $details['distribution_comment'];
?>
</td>
            </tr>
            <tr>
                <th>Origin:</th>
                <td><?php 
 private function render_service_value_change($details, $field)
 {
     Util_Ui::hidden('', $field, $details[$field]['new']);
     if (!isset($details[$field]['current']) || $details[$field]['current'] == $details[$field]['new']) {
         echo htmlspecialchars($details[$field]['new']);
     } else {
         echo 'currently set to <strong>' . htmlspecialchars(empty($details[$field]['current']) ? '<empty>' : $details[$field]['current']) . '</strong><br />';
         echo 'will be changed to <strong>' . htmlspecialchars($details[$field]['new']) . '</strong><br />';
     }
 }
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
    class="w3tc_extension_cloudflare_form">
    <?php 
Util_Ui::hidden('', 'w3tc_action', 'extension_cloudflare_zones_done');
Util_Ui::hidden('', 'email', $details['email']);
Util_Ui::hidden('', 'key', $details['key']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select zone', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>Zone:</td>
                <td>
                    <?php 
foreach ($details['zones'] as $z) {
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
    class="w3tc_extension_cloudflare_form">
    <?php 
Util_Ui::hidden('', 'w3tc_action', 'extension_cloudflare_zones_done');
Util_Ui::hidden('', 'email', $details['email']);
Util_Ui::hidden('', 'key', $details['key']);
Util_Ui::hidden('', 'page', '');
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select zone', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Zone:</td>
                <td>
                    <?php