]> _ Git - physioassist-wordpress.git/blob
1c27ce096bf54b8ae85d52e88bb18f72ae55a6a4
[physioassist-wordpress.git] /
1 <?php if((!$this->repository_has_subscription($repository_id) && $match = $this->get_matching_cp($repository)) && $match['exp']): ?>
2 <p class="alignright installer_highlight"><strong><?php printf('Price offers available until %s', date_i18n(get_option( 'date_format' ), $match['exp'])) ?></strong></p>
3 <?php endif; ?>
4
5 <h3 id="repository-<?php echo $repository_id ?>"><?php echo $repository['data']['name'] ?></h3>
6 <?php
7     $generic_product_name = $this->settings['repositories'][$repository_id]['data']['product-name'];
8 ?>
9 <table class="widefat otgs_wp_installer_table" id="installer_repo_<?php echo $repository_id ?>">
10
11     <tr>
12         <td>&nbsp;</td>
13         <td class="otgsi_register_product_wrap" align="center" valign="top">
14             <?php // IF NO SUBSCRIPTION ?>
15             <?php if(!$this->repository_has_subscription($repository_id)): ?>
16
17             <div style="text-align: right;">
18                 <span><?php _e('Already bought?', 'installer'); ?>&nbsp;</span>
19                 <a class="enter_site_key_js button-primary<?php if( WP_Installer::get_repository_hardcoded_site_key( $repository_id ) ): ?> disabled<?php endif ?>" href="#"
20                     <?php if( WP_Installer::get_repository_hardcoded_site_key( $repository_id ) ): ?>
21                         style="cursor: help"
22                         disabled="disabled"
23                         title="<?php printf( esc_attr__("Site-key was set by %s, most likely in wp-config.php. Please remove the constant before attempting to register.", 'installer'), 'OTGS_INSTALLER_SITE_KEY_' . strtoupper($repository_id) ) ?>"
24                     <?php endif; ?>
25                 >
26                     <?php printf(__('Register %s', 'installer'), $generic_product_name); ?>
27                 </a>&nbsp;&nbsp;
28                 <form class="otgsi_site_key_form" method="post">
29                 <input type="hidden" name="action" value="save_site_key" />
30                 <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('save_site_key_' . $repository_id) ?>" />
31                 <input type="hidden" name="repository_id" value="<?php echo $repository_id ?>">
32                 <?php _e('2. Enter your site key', 'installer'); ?>
33                 <input type="text" size="10" name="site_key_<?php echo $repository_id ?>" placeholder="<?php echo esc_attr('site key') ?>" />
34                 <input class="button-primary" type="submit" value="<?php esc_attr_e('OK', 'installer') ?>" />
35                 <input class="button-secondary cancel_site_key_js" type="button" value="<?php esc_attr_e('Cancel', 'installer') ?>" />
36
37                 <div class="alignleft" style="margin-top:6px;"><?php printf(__('1. Go to your %s%s account%s and add this site URL: %s', 'installer'),
38                     '<a href="' . $this->settings['repositories'][$repository_id]['data']['site_keys_management_url'] . '?add='.urlencode($this->get_installer_site_url( $repository_id )).'">',
39                       $generic_product_name, '</a>', $this->get_installer_site_url( $repository_id )); ?></div>
40                 </form>
41
42
43             </div>
44
45             <?php
46                 $site_key = false;
47
48             // IF SUBSCRIPTION
49             else:
50
51                 $site_key = $this->settings['repositories'][$repository_id]['subscription']['key'];
52                 $subscription_type = $this->get_subscription_type_for_repository($repository_id);
53                 $upgrade_options = $this->get_upgrade_options($repository_id);
54                 $expired = false;
55
56             ?>
57
58             <?php if($this->repository_has_expired_subscription($repository_id)): $expired = true; ?>
59                 <div>
60                     <p class="installer-warn-box">
61                         <?php _e('Subscription expired. You need to either purchase a new subscription or upgrade if available.', 'installer') ?>
62                         <span class="alignright">
63                             <a class="update_site_key_js button-secondary" href="#" data-repository=<?php echo $repository_id ?> data-nonce="<?php echo wp_create_nonce('update_site_key_' . $repository_id) ?>">
64                                 <?php  _e('Revalidate subscription', 'installer'); ?>
65                             </a>
66                         </span>
67                         <br />
68                         <span class="details"><?php _e("If you have already purchased or renewed your subscription and you can still see this message, please revalidate your subscription", 'installer') ?></span>
69                     </p>
70                 </div>
71             <?php else: ?>
72                 <?php $this->show_subscription_renew_warning($repository_id, $subscription_type); ?>
73             <?php endif; ?>
74
75             <div class="alignright">
76                 <a class="remove_site_key_js button-secondary" href="#" data-repository=<?php echo $repository_id ?>
77                     data-confirmation="<?php esc_attr_e('Are you sure you want to unregister?', 'installer') ?>"
78                     data-nonce="<?php echo wp_create_nonce('remove_site_key_' . $repository_id) ?>"
79                     <?php if( WP_Installer::get_repository_hardcoded_site_key( $repository_id ) ): ?>
80                      style="cursor: help"
81                      disabled="disabled"
82                      title="<?php printf( esc_attr__("Site-key was set by %s, most likely in wp-config.php. Please remove the constant before attempting to unregister.", 'installer'), 'OTGS_INSTALLER_SITE_KEY_' . strtoupper($repository_id) ) ?>"
83                     <?php endif; ?>
84                     >
85                     <?php printf(__("Unregister %s from this site", 'installer'), $generic_product_name) ?></a>&nbsp;
86                 <a class="update_site_key_js button-secondary" href="#" data-repository=<?php echo $repository_id ?>
87                     data-nonce="<?php echo wp_create_nonce('update_site_key_' . $repository_id) ?>">
88                     <?php _e('Check for updates', 'installer'); ?>
89                 </a>
90             </div>
91
92             <?php if(empty($expired)): ?>
93             <div class="alignleft">
94                 <?php if($expires = $this->settings['repositories'][$repository_id]['subscription']['data']->expires): ?>
95                     <?php printf(__('%s is registered on this site. You will receive automatic updates until %s', 'installer'), $generic_product_name, date_i18n('F j, Y', strtotime($expires))); ?>
96                 <?php else: ?>
97                     <?php printf(__('%s is registered on this site. Your Lifetime account gives you updates for life.', 'installer'), $generic_product_name); ?>
98                 <?php endif; ?>
99             </div>
100             <?php endif; //if(empty($expired)) ?>
101
102             <?php endif; // if(!repository_has_subscription) ?>
103             <br clear="all" />
104             <div class="installer-error-box hidden"></div>
105
106         </td>
107     </tr>
108
109     <?php
110
111     $subscription_type = isset($subscription_type) ? $subscription_type : null;
112     $expired = isset($expired) ? $expired : null;
113     $upgrade_options = isset($upgrade_options) ? $upgrade_options : null;
114     $packages = $this->_render_product_packages($repository['data']['packages'], $subscription_type, $expired, $upgrade_options, $repository_id);
115     if(empty($subscription_type) || $expired){
116         $subpackages_expandable = true;
117     }else{
118         $subpackages_expandable = false;
119     }
120
121     ?>
122
123     <?php foreach($packages as $package): ?>
124     <tr id="repository-<?php echo $repository_id ?>_<?php echo $package['id'] ?>">
125         <td class="installer-repository-image"><img width="140" src="<?php echo $package['image_url'] ?>" /></td>
126         <td>
127             <p><strong><?php echo $package['name'] ?></strong></p>
128             <p><?php echo $package['description'] ?></p>
129
130             <?php if($package['products']): ?>
131                 <?php foreach($package['products'] as $product): ?>
132                 <ul class="installer-products-list" style="display:inline">
133                     <li>
134                         <a class="button-secondary" href="<?php echo $product['url'] ?>"><?php echo $product['label'] ?></a>
135                     </li>
136                 </ul>
137                 <?php endforeach; ?>
138             <?php endif; ?>
139
140                 <?php
141                 if ( $package['downloads'] ) {
142                         WP_Installer_Channels()->load_channel_selector( $repository_id, $package['downloads'] );
143                         include $this->plugin_path() . '/templates/downloads-list.php';
144                 }
145                 ?>
146
147             <?php if(!empty($package['sub-packages'])): ?>
148
149                 <?php $subpackages = $this->_render_product_packages($package['sub-packages'], $subscription_type, $expired, $upgrade_options, $repository_id); ?>
150
151                 <?php if($subpackages): ?>
152
153                 <?php if($subpackages_expandable): ?>
154                 <h5><a class="installer_expand_button" href="#" title="<?php esc_attr_e('Click to see individual components options.', 'installer') ?>"><?php _e('Individual components', 'installer') ?></a></h5>
155                 <?php endif; ?>
156
157                 <table class="otgs_wp_installer_subtable" style="<?php if($subpackages_expandable) echo 'display:none' ?>">
158                 <?php foreach($subpackages as $package): ?>
159                     <tr id="repository-<?php echo $repository_id ?>_<?php echo $package['id'] ?>">
160                         <td><img width="70" height="70" src="<?php echo $package['image_url'] ?>" /></td>
161                         <td>
162                             <p><strong><?php echo $package['name'] ?></strong></p>
163                             <p><?php echo $package['description'] ?></p>
164
165                             <?php if($package['products']): ?>
166                                 <?php foreach($package['products'] as $product): ?>
167                                     <ul class="installer-products-list" style="display:inline">
168                                         <li>
169                                             <a class="button-secondary" href="<?php echo $product['url'] ?>"><?php echo $product['label'] ?></a>
170                                         </li>
171                                     </ul>
172                                 <?php endforeach; ?>
173                             <?php endif; ?>
174
175                             <?php if($package['downloads']): ?>
176                                 <?php include $this->plugin_path() . '/templates/downloads-list.php'; ?>
177                             <?php endif; ?>
178                         </td>
179                     </tr>
180                 <?php endforeach; ?>
181                 </table>
182                 <?php endif; ?>
183
184             <?php endif;  ?>
185
186
187         </td>
188     </tr>
189
190     <?php endforeach; ?>
191
192 </table>
193
194
195 <p><i><?php printf(__('This page lets you install plugins and update existing plugins. To remove any of these plugins, go to the %splugins%s page and if you have the permission to remove plugins you should be able to do this.', 'installer'), '<a href="' . admin_url('plugins.php') . '">' , '</a>'); ?></i></p>
196
197
198
199 <br />