Version Description
- Added transaction id for all forms
- Added rtl merge tags for emails
- Support custom page for callback url
- Fixed some css bugs
- Added wp_session class for more security
- Added Jquery flot for transaction graph
- Added Jalali Class for transaction graph
Download this release
Release Info
Developer | hannanstd |
Plugin | گرویتی فرم فارسی |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- Persian_Gravityforms_By_HANNANStd.php +185 -110
- assets/css/persiangravity.css +7 -0
- assets/js/shamsi_chart.js +1 -0
- include/Post_Content_Merge_Tags.php +170 -0
- include/wp-session.php +237 -0
- languages/Persian_Gravityforms_By_HANNANStd-fa_IR.mo +0 -0
- languages/Persian_Gravityforms_By_HANNANStd-fa_IR.po +419 -0
- readme.txt +19 -1
Persian_Gravityforms_By_HANNANStd.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Persian Gravity Forms
|
4 |
Plugin URI: https://wordpress.org/plugins/persian-gravity-forms/
|
5 |
Description: Gravity Forms for Iranian
|
6 |
-
Version: 1.1.
|
7 |
Requires at least: 3.5
|
8 |
Author: HANNAN Ebrahimi Setoode
|
9 |
Author URI: http://www.gravityforms.ir/
|
@@ -17,6 +17,8 @@ class GravityFormsPersian {
|
|
17 |
private $is_persian;
|
18 |
public function __construct( $file ) {
|
19 |
require_once(self::get_base_path() . "/include/Jalali.php");
|
|
|
|
|
20 |
$this->file = $file;
|
21 |
add_action('init', array( $this, 'init' ), 8 );
|
22 |
add_filter('update_footer', array( $this, 'GravityForms_Footer_Left_By_HANNANStd'), 11);
|
@@ -26,9 +28,7 @@ class GravityFormsPersian {
|
|
26 |
add_filter('gform_address_types', array( $this, 'Gform_IRAN_By_HANNANStd' ) );
|
27 |
add_action('activated_plugin', array( $this, 'Activated_Plugin_By_HANNANStd' ) );
|
28 |
add_action('gform_admin_pre_render', array( $this, 'Add_Merge_Tags_To_List_By_HANNANStd'));
|
29 |
-
add_filter('gform_replace_merge_tags', array( $this, '
|
30 |
-
add_filter('gform_replace_merge_tags', array( $this, 'GformReplaceMergeTags_Simple_By_HANNANStd'), 10, 7);
|
31 |
-
add_filter('gform_replace_merge_tags', array( $this, 'GformReplaceMergeTags_Pack_By_HANNANStd'), 10, 7);
|
32 |
add_action('wp_dashboard_setup', array( $this, 'Persian_GravityForms_Dashboard_By_HANNANStd'));
|
33 |
add_filter('gform_print_styles', array( $this, 'Add_Styles_Print_By_HANNANStd'), 10, 2);
|
34 |
add_action('admin_print_scripts', array( $this, 'GravityForms_Admin_CSS_By_HANNANStd' ));
|
@@ -44,7 +44,9 @@ class GravityFormsPersian {
|
|
44 |
add_filter('gform_editor_js_set_default_values', array( $this, 'Add_Melli_Cart_Field_Label_By_HANNANStd'));
|
45 |
add_filter('gform_field_content', array( $this, 'Add_Melli_Cart_Field_JavaScript_Checker_By_HANNANStd'), 10, 5);
|
46 |
add_action('gform_field_advanced_settings', array( $this, 'Add_Melli_Cart_Field_Setting_By_HANNANStd'), 10, 2);
|
47 |
-
add_filter('gform_field_validation', array( $this, 'Add_Melli_Cart_Field_PHP_Checker_Massage_By_HANNANStd'), 10, 4);
|
|
|
|
|
48 |
}
|
49 |
public function Activated_Plugin_By_HANNANStd() {
|
50 |
$path = str_replace( WP_PLUGIN_DIR . '/', '', $this->file );
|
@@ -315,11 +317,60 @@ class GravityFormsPersian {
|
|
315 |
mergeTags["custom"].tags.push({ tag: '{payment_status_css}', label: '<?php _e("Styled Payment Status", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
316 |
mergeTags["custom"].tags.push({ tag: '{transaction_id_css}', label: '<?php _e("Styled Transaction ID", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
317 |
mergeTags["custom"].tags.push({ tag: '{payment_pack}', label: '<?php _e("Styled Payment Pack", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
|
|
|
|
318 |
return mergeTags;}
|
319 |
</script>
|
320 |
<?php return $form; }
|
321 |
-
|
322 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
324 |
if ($lead['payment_status']=="Active" || $lead['payment_status']=="Paid")
|
325 |
$payment_status = __("Paid", "Persian_Gravityforms_By_HANNANStd");
|
@@ -331,113 +382,63 @@ class GravityFormsPersian {
|
|
331 |
'{payment_gateway}',
|
332 |
'{transaction_id}',
|
333 |
'{payment_status}',
|
334 |
-
);
|
335 |
-
if ( ( $price < 0 ) || !isset($price) || !isset($gateway) ) {
|
336 |
-
$values = array (
|
337 |
-
'',
|
338 |
-
'',
|
339 |
-
'',
|
340 |
-
);}
|
341 |
-
else {
|
342 |
-
$values = array (
|
343 |
-
isset($gateway) ? $gateway : '',
|
344 |
-
isset($lead['transaction_id']) ? $lead['transaction_id'] : '',
|
345 |
-
isset($lead['payment_status']) ? $payment_status : '',
|
346 |
-
);
|
347 |
-
}
|
348 |
-
$text = str_replace($tags, $values, $text);
|
349 |
-
return $text;
|
350 |
-
}
|
351 |
-
public function GformReplaceMergeTags_CSS_By_HANNANStd($text, $form, $lead, $url_encode, $esc_html, $nl2br, $format){
|
352 |
-
$price = $lead['payment_amount'];
|
353 |
-
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
354 |
-
if ($lead['payment_status']=="Active" || $lead['payment_status']=="Paid")
|
355 |
-
$payment_status = __("Paid", "Persian_Gravityforms_By_HANNANStd");
|
356 |
-
if ($lead['payment_status']=="Failed")
|
357 |
-
$payment_status = __("Failed", "Persian_Gravityforms_By_HANNANStd");
|
358 |
-
if ($lead['payment_status']=="Cancelled")
|
359 |
-
$payment_status = __("Cancelled", "Persian_Gravityforms_By_HANNANStd");
|
360 |
-
$tags = array (
|
361 |
'{payment_gateway_css}',
|
362 |
'{transaction_id_css}',
|
363 |
'{payment_status_css}',
|
364 |
-
);
|
365 |
-
if ( ( $price < 0 ) || !isset($price) || !isset($gateway) ) {
|
366 |
-
$values = array (
|
367 |
-
'',
|
368 |
-
'',
|
369 |
-
'',
|
370 |
-
);}
|
371 |
-
else {
|
372 |
-
$values = array (
|
373 |
-
isset($gateway) ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
374 |
-
<tr bgcolor="#EAF2FA">
|
375 |
-
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Gateway', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
376 |
-
</tr>
|
377 |
-
<tr bgcolor="#FFFFFF">
|
378 |
-
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$gateway.'</font></td>
|
379 |
-
</tr></table>' : '',
|
380 |
-
isset($lead['transaction_id']) ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
381 |
-
<tr bgcolor="#EAF2FA">
|
382 |
-
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">
|
383 |
-
<strong>'.__( 'Transaction ID', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
384 |
-
</tr>
|
385 |
-
<tr bgcolor="#FFFFFF">
|
386 |
-
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$lead['transaction_id'].'</font></td></tr>
|
387 |
-
</table>' : '',
|
388 |
-
isset($lead['payment_status']) ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;"><tr bgcolor="#EAF2FA">
|
389 |
-
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Status', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
390 |
-
</tr>
|
391 |
-
<tr bgcolor="#FFFFFF">
|
392 |
-
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$payment_status.'</font></td></tr>
|
393 |
-
</table>' : '',
|
394 |
-
);
|
395 |
-
}
|
396 |
-
$text = str_replace($tags, $values, $text);
|
397 |
-
return $text;
|
398 |
-
}
|
399 |
-
function GformReplaceMergeTags_Pack_By_HANNANStd($text, $form, $lead, $url_encode, $esc_html, $nl2br, $format){
|
400 |
-
$price = $lead['payment_amount'];
|
401 |
-
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
402 |
-
if ($lead['payment_status']=="Active" || $lead['payment_status']=="Paid")
|
403 |
-
$payment_status = __("Paid", "Persian_Gravityforms_By_HANNANStd");
|
404 |
-
if ($lead['payment_status']=="Failed")
|
405 |
-
$payment_status = __("Failed", "Persian_Gravityforms_By_HANNANStd");
|
406 |
-
if ($lead['payment_status']=="Cancelled")
|
407 |
-
$payment_status = __("Cancelled", "Persian_Gravityforms_By_HANNANStd");
|
408 |
-
$tags = array (
|
409 |
'{payment_pack}',
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
'',
|
414 |
-
);}
|
415 |
-
else {
|
416 |
$values = array (
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
);
|
440 |
-
}
|
441 |
$text = str_replace($tags, $values, $text);
|
442 |
return $text;
|
443 |
}
|
@@ -526,6 +527,80 @@ echo "</ul>";
|
|
526 |
$rss->__destruct();
|
527 |
unset($rss);
|
528 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
public function Add_Melli_Cart_Field_By_HANNANStd( $field_groups ) {
|
530 |
foreach( $field_groups as &$group ){
|
531 |
if( $group["name"] == "advanced_fields" ){
|
@@ -581,8 +656,8 @@ return $input;
|
|
581 |
public function Add_Melli_Cart_Field_Setting_By_HANNANStd( $position, $form_id ){
|
582 |
if( $position == 50 ){
|
583 |
?>
|
584 |
-
<hr/>
|
585 |
<li class="mellicart_setting field_setting">
|
|
|
586 |
<input type="checkbox" id="field_mellicart" onclick="SetFieldProperty('field_mellicart', this.checked);" />
|
587 |
<label for="field_mellicart" class="inline">
|
588 |
<?php _e("نمایش زیر نویس فیلد", "gravityforms"); ?>
|
@@ -628,8 +703,8 @@ if( $position == 50 ){
|
|
628 |
</label>
|
629 |
<br/>
|
630 |
<input type="text" id="field_mellicart_sp4" size="35" onkeyup="SetFieldProperty('field_mellicart_sp4', this.value);" />
|
631 |
-
</li>
|
632 |
<hr/>
|
|
|
633 |
<?php
|
634 |
}
|
635 |
}
|
3 |
Plugin Name: Persian Gravity Forms
|
4 |
Plugin URI: https://wordpress.org/plugins/persian-gravity-forms/
|
5 |
Description: Gravity Forms for Iranian
|
6 |
+
Version: 1.1.2
|
7 |
Requires at least: 3.5
|
8 |
Author: HANNAN Ebrahimi Setoode
|
9 |
Author URI: http://www.gravityforms.ir/
|
17 |
private $is_persian;
|
18 |
public function __construct( $file ) {
|
19 |
require_once(self::get_base_path() . "/include/Jalali.php");
|
20 |
+
require_once(self::get_base_path() . "/include/wp-session.php");
|
21 |
+
require_once(self::get_base_path() . "/include/Post_Content_Merge_Tags.php");
|
22 |
$this->file = $file;
|
23 |
add_action('init', array( $this, 'init' ), 8 );
|
24 |
add_filter('update_footer', array( $this, 'GravityForms_Footer_Left_By_HANNANStd'), 11);
|
28 |
add_filter('gform_address_types', array( $this, 'Gform_IRAN_By_HANNANStd' ) );
|
29 |
add_action('activated_plugin', array( $this, 'Activated_Plugin_By_HANNANStd' ) );
|
30 |
add_action('gform_admin_pre_render', array( $this, 'Add_Merge_Tags_To_List_By_HANNANStd'));
|
31 |
+
add_filter('gform_replace_merge_tags', array( $this, 'GformReplaceMergeTags_By_HANNANStd'), 10, 7);
|
|
|
|
|
32 |
add_action('wp_dashboard_setup', array( $this, 'Persian_GravityForms_Dashboard_By_HANNANStd'));
|
33 |
add_filter('gform_print_styles', array( $this, 'Add_Styles_Print_By_HANNANStd'), 10, 2);
|
34 |
add_action('admin_print_scripts', array( $this, 'GravityForms_Admin_CSS_By_HANNANStd' ));
|
44 |
add_filter('gform_editor_js_set_default_values', array( $this, 'Add_Melli_Cart_Field_Label_By_HANNANStd'));
|
45 |
add_filter('gform_field_content', array( $this, 'Add_Melli_Cart_Field_JavaScript_Checker_By_HANNANStd'), 10, 5);
|
46 |
add_action('gform_field_advanced_settings', array( $this, 'Add_Melli_Cart_Field_Setting_By_HANNANStd'), 10, 2);
|
47 |
+
add_filter('gform_field_validation', array( $this, 'Add_Melli_Cart_Field_PHP_Checker_Massage_By_HANNANStd'), 10, 4);
|
48 |
+
add_action('gform_entries_first_column', array($this ,'First_Column_Actions_By_HANNANStd'), 10, 5);
|
49 |
+
add_action('gform_entry_post_save', array($this ,'Update_Lead_No_Gateway_By_HANNANStd'), 10, 2);
|
50 |
}
|
51 |
public function Activated_Plugin_By_HANNANStd() {
|
52 |
$path = str_replace( WP_PLUGIN_DIR . '/', '', $this->file );
|
317 |
mergeTags["custom"].tags.push({ tag: '{payment_status_css}', label: '<?php _e("Styled Payment Status", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
318 |
mergeTags["custom"].tags.push({ tag: '{transaction_id_css}', label: '<?php _e("Styled Transaction ID", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
319 |
mergeTags["custom"].tags.push({ tag: '{payment_pack}', label: '<?php _e("Styled Payment Pack", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
320 |
+
mergeTags["custom"].tags.push({ tag: '{rtl_start}', label: '<?php _e("RTL Start", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
321 |
+
mergeTags["custom"].tags.push({ tag: '{rtl_end}', label: '<?php _e("RTL End", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
322 |
return mergeTags;}
|
323 |
</script>
|
324 |
<?php return $form; }
|
325 |
+
function First_Column_Actions_By_HANNANStd($form_id, $field_id, $value, $lead, $query_string) {
|
326 |
+
$url = get_bloginfo("wpurl") . "/wp-admin/admin.php?page=gf_entries&view=entries&id=" . $form_id;
|
327 |
+
$gateway = gform_get_meta($lead["id"], "payment_gateway");
|
328 |
+
if($lead["payment_status"] == 'Active') {
|
329 |
+
$color = '#008000';
|
330 |
+
$stat = "موفق";
|
331 |
+
}
|
332 |
+
if($lead["payment_status"] == 'Paid') {
|
333 |
+
$color = '#008000';
|
334 |
+
$stat = "موفق";
|
335 |
+
}
|
336 |
+
if($lead["payment_status"] == 'Failed') {
|
337 |
+
$color = '#FF0000';
|
338 |
+
$stat = "ناموفق";
|
339 |
+
}
|
340 |
+
if($lead["payment_status"] == 'Cancelled') {
|
341 |
+
$color = '#FFA500';
|
342 |
+
$stat = "منصرف شده";
|
343 |
+
}
|
344 |
+
if($lead["payment_status"] == 'Processing') {
|
345 |
+
$color = '#3399FF';
|
346 |
+
$stat = "معلق";
|
347 |
+
}
|
348 |
+
if ($gateway)
|
349 |
+
echo '<a class="stat" href="'.$url.'&sort=0&dir=DESC&s=Processing&field_id=payment_status&operator=is" style="color:'.$color.';"> '.$stat.' </a> - <a class="stat" href="'.$url.'&sort=0&dir=DESC&s='.$gateway.'&field_id=payment_gateway&operator=is" style="color:#000000;"> '.$gateway.' </a>';
|
350 |
+
else if ($lead["payment_status"])
|
351 |
+
echo '<a class="stat" href="'.$url.'&sort=0&dir=DESC&s=Processing&field_id=payment_status&operator=is" style="color:'.$color.';"> موفق </a>';
|
352 |
+
}
|
353 |
+
public function Update_Lead_No_Gateway_By_HANNANStd($lead, $form) {
|
354 |
+
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
355 |
+
$method = $lead['payment_method'];
|
356 |
+
$product = self::get_product_price($form, $lead);
|
357 |
+
if (!isset($method) && !$gateway && !isset($lead["transaction_id"]) ) {
|
358 |
+
$lead["transaction_id"] = rand(100000000000000,999999999999999);
|
359 |
+
$lead["is_fulfilled"] = 0;
|
360 |
+
}
|
361 |
+
if ( ($product["yes"]==2) && !isset($method) && !$gateway ) {
|
362 |
+
$lead["payment_amount"] = $product["total"];
|
363 |
+
$lead["payment_date"] = gmdate('Y-m-d H:i:s');
|
364 |
+
$lead["is_fulfilled"] = 1;
|
365 |
+
$lead["payment_status"] = 'Paid';
|
366 |
+
}
|
367 |
+
$wp_session = WP_Session::get_instance();
|
368 |
+
wp_session_unset();
|
369 |
+
$wp_session['refid'] = $lead["transaction_id"];
|
370 |
+
RGFormsModel::update_lead($lead);
|
371 |
+
return $lead;
|
372 |
+
}
|
373 |
+
public function GformReplaceMergeTags_By_HANNANStd($text, $form, $lead, $url_encode, $esc_html, $nl2br, $format){
|
374 |
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
375 |
if ($lead['payment_status']=="Active" || $lead['payment_status']=="Paid")
|
376 |
$payment_status = __("Paid", "Persian_Gravityforms_By_HANNANStd");
|
382 |
'{payment_gateway}',
|
383 |
'{transaction_id}',
|
384 |
'{payment_status}',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
'{payment_gateway_css}',
|
386 |
'{transaction_id_css}',
|
387 |
'{payment_status_css}',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
'{payment_pack}',
|
389 |
+
'{rtl_start}',
|
390 |
+
'{rtl_end}',
|
391 |
+
);
|
|
|
|
|
|
|
392 |
$values = array (
|
393 |
+
$gateway ? $gateway : '',
|
394 |
+
isset($lead['transaction_id']) ? $lead['transaction_id'] : '',
|
395 |
+
isset($lead['payment_status']) ? $payment_status : '',
|
396 |
+
$gateway ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
397 |
+
<tr bgcolor="#EAF2FA">
|
398 |
+
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Gateway', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
399 |
+
</tr>
|
400 |
+
<tr bgcolor="#FFFFFF">
|
401 |
+
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$gateway.'</font></td>
|
402 |
+
</tr></table>' : '',
|
403 |
+
isset($lead['transaction_id']) ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
404 |
+
<tr bgcolor="#EAF2FA">
|
405 |
+
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">
|
406 |
+
<strong>'.__( 'Transaction ID', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
407 |
+
</tr>
|
408 |
+
<tr bgcolor="#FFFFFF">
|
409 |
+
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$lead['transaction_id'].'</font></td></tr>
|
410 |
+
</table>' : '',
|
411 |
+
isset($lead['payment_status']) ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;"><tr bgcolor="#EAF2FA">
|
412 |
+
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Status', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
413 |
+
</tr>
|
414 |
+
<tr bgcolor="#FFFFFF">
|
415 |
+
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$payment_status.'</font></td></tr>
|
416 |
+
</table>' : '',
|
417 |
+
(isset($lead['transaction_id']) && $gateway && isset($lead['payment_status']) ) ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
418 |
+
<tr>
|
419 |
+
<td style="font-size:14px;font-weight:bold;background-color:#eee;border-bottom:1px solid #dfdfdf;padding:7px 7px" colspan="2">'.__( 'Payment Information', 'Persian_Gravityforms_By_HANNANStd' ).'</td>
|
420 |
+
</tr>
|
421 |
+
<tr bgcolor="#EAF2FA">
|
422 |
+
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Gateway', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
423 |
+
</tr>
|
424 |
+
<tr bgcolor="#FFFFFF">
|
425 |
+
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$gateway.'</font></td>
|
426 |
+
</tr>
|
427 |
+
<tr bgcolor="#EAF2FA">
|
428 |
+
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Status', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
429 |
+
</tr>
|
430 |
+
<tr bgcolor="#FFFFFF">
|
431 |
+
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$payment_status.'</font></td>
|
432 |
+
</tr>
|
433 |
+
<tr bgcolor="#EAF2FA">
|
434 |
+
<td colspan="2" style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Transaction ID', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font></td>
|
435 |
+
</tr>
|
436 |
+
<tr bgcolor="#FFFFFF">
|
437 |
+
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$lead['transaction_id'].'</font></td></tr>
|
438 |
+
</table>' : '',
|
439 |
+
'<div style="text-align: right !important; direction: rtl !important;">',
|
440 |
+
'</div>',
|
441 |
);
|
|
|
442 |
$text = str_replace($tags, $values, $text);
|
443 |
return $text;
|
444 |
}
|
527 |
$rss->__destruct();
|
528 |
unset($rss);
|
529 |
}
|
530 |
+
public static function get_product_price($form, $entry){
|
531 |
+
$currency = GFCommon::get_currency();
|
532 |
+
$products = GFCommon::get_product_fields($form, $entry, true);
|
533 |
+
$product_index = 1;
|
534 |
+
$total = 0;
|
535 |
+
$discount = 0;
|
536 |
+
foreach($products["products"] as $product){
|
537 |
+
$option_fields = "";
|
538 |
+
$price = GFCommon::to_number($product["price"]);
|
539 |
+
if(is_array(rgar($product,"options"))){
|
540 |
+
$option_index = 1;
|
541 |
+
foreach($product["options"] as $option){
|
542 |
+
$field_label = urlencode($option["field_label"]);
|
543 |
+
$option_name = urlencode($option["option_name"]);
|
544 |
+
$option_fields .= "&on{$option_index}_{$product_index}={$field_label}&os{$option_index}_{$product_index}={$option_name}";
|
545 |
+
$price += GFCommon::to_number($option["price"]);
|
546 |
+
$option_index++;
|
547 |
+
}
|
548 |
+
}
|
549 |
+
$name = urlencode($product["name"]);
|
550 |
+
if($price > 0)
|
551 |
+
{
|
552 |
+
$total += $price * $product['quantity'];
|
553 |
+
$product_index++;
|
554 |
+
}
|
555 |
+
else{
|
556 |
+
$discount += abs($price) * $product['quantity'];
|
557 |
+
}
|
558 |
+
}
|
559 |
+
if($price) $yes = 2;
|
560 |
+
else $yes = 1;
|
561 |
+
if(!empty($products["shipping"]["price"])) {
|
562 |
+
$total += floatval($products["shipping"]["price"]);
|
563 |
+
}
|
564 |
+
if($discount > 0){
|
565 |
+
if($discount < $total) {
|
566 |
+
$total = $total-$discount;
|
567 |
+
}
|
568 |
+
else {
|
569 |
+
$total = 0;
|
570 |
+
}
|
571 |
+
}
|
572 |
+
else {
|
573 |
+
$total = $total;
|
574 |
+
}
|
575 |
+
return array("total" => $total, "yes" => $yes);
|
576 |
+
}
|
577 |
+
public static function get_mysql_tz_offset(){
|
578 |
+
$tz = get_option('gmt_offset');
|
579 |
+
if ( intval($tz) < 0) $pf = "-";
|
580 |
+
else $pf = "+";
|
581 |
+
$tz = abs($tz) * 3600;
|
582 |
+
$tz = gmdate("H:i", $tz);
|
583 |
+
$tz = $pf.$tz;
|
584 |
+
$today = date('Y-m-d H:i:s');
|
585 |
+
$date = new DateTime($today);
|
586 |
+
$tzb = get_option('gmt_offset');
|
587 |
+
$tzn = abs($tzb) * 3600;
|
588 |
+
$tzh = intval(gmdate("H", $tzn));
|
589 |
+
$tzm = intval(gmdate("i", $tzn));
|
590 |
+
if ( intval($tzb) < 0) {
|
591 |
+
$date->sub(new DateInterval('P0DT'.$tzh.'H'.$tzm.'M'));
|
592 |
+
}else {
|
593 |
+
$date->add(new DateInterval('P0DT'.$tzh.'H'.$tzm.'M'));}
|
594 |
+
$today = $date->format('Y-m-d H:i:s');
|
595 |
+
$today = strtotime ($today);
|
596 |
+
return array("tz" => $tz, "today" => $today);
|
597 |
+
}
|
598 |
+
public static function get_base_url(){
|
599 |
+
return plugins_url( '', __FILE__ );
|
600 |
+
}
|
601 |
+
public function version(){
|
602 |
+
return '1.1.2';
|
603 |
+
}
|
604 |
public function Add_Melli_Cart_Field_By_HANNANStd( $field_groups ) {
|
605 |
foreach( $field_groups as &$group ){
|
606 |
if( $group["name"] == "advanced_fields" ){
|
656 |
public function Add_Melli_Cart_Field_Setting_By_HANNANStd( $position, $form_id ){
|
657 |
if( $position == 50 ){
|
658 |
?>
|
|
|
659 |
<li class="mellicart_setting field_setting">
|
660 |
+
<hr/>
|
661 |
<input type="checkbox" id="field_mellicart" onclick="SetFieldProperty('field_mellicart', this.checked);" />
|
662 |
<label for="field_mellicart" class="inline">
|
663 |
<?php _e("نمایش زیر نویس فیلد", "gravityforms"); ?>
|
703 |
</label>
|
704 |
<br/>
|
705 |
<input type="text" id="field_mellicart_sp4" size="35" onkeyup="SetFieldProperty('field_mellicart_sp4', this.value);" />
|
|
|
706 |
<hr/>
|
707 |
+
</li>
|
708 |
<?php
|
709 |
}
|
710 |
}
|
assets/css/persiangravity.css
CHANGED
@@ -67,4 +67,11 @@ margin-right:415px !important;
|
|
67 |
}
|
68 |
optgroup {
|
69 |
font-style:normal !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
67 |
}
|
68 |
optgroup {
|
69 |
font-style:normal !important;
|
70 |
+
}
|
71 |
+
.choice_with_value_and_price label {
|
72 |
+
margin: 0 60px 0 0 !important;
|
73 |
+
padding-left: 26px !important;
|
74 |
+
}
|
75 |
+
.choice_with_price .gfield_choice_header_label ,.choice_with_value .gfield_choice_header_label {
|
76 |
+
margin: 0 69px 0 99px !important;
|
77 |
}
|
assets/js/shamsi_chart.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
function Currency(e){this.currency=e;this.toNumber=function(e){if(this.isNumeric(e))return parseFloat(e);e=e+" ";e=e.replace(/&.*?;/,"",e);var t="";var n=false;for(var r=0;r<e.length;r++){var i=e.substr(r,1);if(parseInt(i)>=0&&parseInt(i)<=9||i==","||i==".")t+=i;else if(i=="-")n=true}var s="";var o=this.currency&&this.currency["decimal_separator"]?this.currency["decimal_separator"]:".";for(var r=0;r<t.length;r++){var u=t.substr(r,1);if(u>="0"&&u<="9")s+=u;else if(u==o){s+="."}}if(n)s="-"+s;return this.isNumeric(s)?parseFloat(s):false};this.toMoney=function(e){if(!this.isNumeric(e))e=this.toNumber(e);if(e===false)return"";e=e+"";negative="";if(e[0]=="-"){negative="-";e=parseFloat(e.substr(1))}money=this.numberFormat(e,this.currency["decimals"],this.currency["decimal_separator"],this.currency["thousand_separator"]);var t=this.currency["symbol_left"]?this.currency["symbol_left"]+this.currency["symbol_padding"]:"";var n=this.currency["symbol_right"]?this.currency["symbol_padding"]+this.currency["symbol_right"]:"";money=negative+this.htmlDecode(t)+money+this.htmlDecode(n);return money};this.numberFormat=function(e,t,n,r){e=(e+"").replace(",","").replace(" ","");var i=!isFinite(+e)?0:+e,s=!isFinite(+t)?0:Math.abs(t),o=typeof r==="undefined"?",":r,u=typeof n==="undefined"?".":n,a="",f=function(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n};a=(s?f(i,s):""+Math.round(i)).split(".");if(a[0].length>3){a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)}if((a[1]||"").length<s){a[1]=a[1]||"";a[1]+=(new Array(s-a[1].length+1)).join("0")}return a.join(u)};this.isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};this.htmlDecode=function(e){var t,n,r=e;var i=r.match(/&#[0-9]{1,5};/g);if(i!=null){for(var s=0;s<i.length;s++){n=i[s];t=n.substring(2,n.length-1);if(t>=-32768&&t<=65535){r=r.replace(n,String.fromCharCode(t))}else{r=r.replace(n,"")}}}return r}}function gregorian_to_jalali(e,t,n){d_4=e%4;g_a=[0,0,31,59,90,120,151,181,212,243,273,304,334];doy_g=g_a[t]+n;if(d_4==0&&t>2)doy_g++;d_33=parseInt((e-16)%132*.0305);a=d_33==3||d_33<d_4-1||d_4==0?286:287;b=(d_33==1||d_33==2)&&(d_33==d_4||d_4==1)?78:d_33==3&&d_4==0?80:79;if(parseInt((e-10)/63)==30){a--;b++}if(doy_g>b){jy=e-621;doy_j=doy_g-b}else{jy=e-622;doy_j=doy_g+a}if(doy_j<187){jm=parseInt((doy_j-1)/31);jd=doy_j-31*jm++}else{jm=parseInt((doy_j-187)/30);jd=doy_j-186-jm*30;jm+=7}return[jy,jm,jd]}function jalali_to_gregorian(e,t,n){d_4=(e+1)%4;doy_j=t<7?(t-1)*31+n:(t-7)*30+n+186;d_33=parseInt((e-55)%132*.0305);a=d_33!=3&&d_4<=d_33?287:286;b=(d_33==1||d_33==2)&&(d_33==d_4||d_4==1)?78:d_33==3&&d_4==0?80:79;if(parseInt((e-19)/63)==20){a--;b++}if(doy_j<=a){gy=e+621;gd=doy_j+b}else{gy=e+622;gd=doy_j-a}sal_a=[0,31,gy%4==0?29:28,31,30,31,30,31,31,30,31,30,31];for(gm=0;gm<13;gm++){v=sal_a[gm];if(gd<=v)break;gd-=v}return[gy,gm,gd]}(function(){jQuery.color={};jQuery.color.make=function(e,t,n,r){var i={};i.r=e||0;i.g=t||0;i.b=n||0;i.a=r!=null?r:1;i.add=function(e,t){for(var n=0;n<e.length;++n){i[e.charAt(n)]+=t}return i.normalize()};i.scale=function(e,t){for(var n=0;n<e.length;++n){i[e.charAt(n)]*=t}return i.normalize()};i.toString=function(){if(i.a>=1){return"rgb("+[i.r,i.g,i.b].join(",")+")"}else{return"rgba("+[i.r,i.g,i.b,i.a].join(",")+")"}};i.normalize=function(){function e(e,t,n){return t<e?e:t>n?n:t}i.r=e(0,parseInt(i.r),255);i.g=e(0,parseInt(i.g),255);i.b=e(0,parseInt(i.b),255);i.a=e(0,i.a,1);return i};i.clone=function(){return jQuery.color.make(i.r,i.b,i.g,i.a)};return i.normalize()};jQuery.color.extract=function(e,t){var n;do{n=e.css(t).toLowerCase();if(n!=""&&n!="transparent"){break}e=e.parent()}while(!jQuery.nodeName(e.get(0),"body"));if(n=="rgba(0, 0, 0, 0)"){n="transparent"}return jQuery.color.parse(n)};jQuery.color.parse=function(t){var n,r=jQuery.color.make;if(n=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t)){return r(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10))}if(n=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(t)){return r(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4]))}if(n=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t)){return r(parseFloat(n[1])*2.55,parseFloat(n[2])*2.55,parseFloat(n[3])*2.55)}if(n=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(t)){return r(parseFloat(n[1])*2.55,parseFloat(n[2])*2.55,parseFloat(n[3])*2.55,parseFloat(n[4]))}if(n=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t)){return r(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16))}if(n=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t)){return r(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16))}var i=jQuery.trim(t).toLowerCase();if(i=="transparent"){return r(255,255,255,0)}else{n=e[i];return r(n[0],n[1],n[2])}};var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})();(function(e){function t(t,r,s,o){function S(e,t){t=[E].concat(t);for(var n=0;n<e.length;++n){e[n].apply(this,t)}}function x(){for(var t=0;t<o.length;++t){var n=o[t];n.init(E);if(n.options){e.extend(true,a,n.options)}}}function T(t){e.extend(true,a,t);if(a.grid.borderColor==null){a.grid.borderColor=a.grid.color}if(a.xaxis.noTicks&&a.xaxis.ticks==null){a.xaxis.ticks=a.xaxis.noTicks}if(a.yaxis.noTicks&&a.yaxis.ticks==null){a.yaxis.ticks=a.yaxis.noTicks}if(a.grid.coloredAreas){a.grid.markings=a.grid.coloredAreas}if(a.grid.coloredAreasColor){a.grid.markingsColor=a.grid.coloredAreasColor}if(a.lines){e.extend(true,a.series.lines,a.lines)}if(a.points){e.extend(true,a.series.points,a.points)}if(a.bars){e.extend(true,a.series.bars,a.bars)}if(a.shadowSize){a.series.shadowSize=a.shadowSize}for(var n in w){if(a.hooks[n]&&a.hooks[n].length){w[n]=w[n].concat(a.hooks[n])}}S(w.processOptions,[a])}function N(e){u=k(e);O();M()}function k(t){var n=[];for(var r=0;r<t.length;++r){var i=e.extend(true,{},a.series);if(t[r].data){i.data=t[r].data;delete t[r].data;e.extend(true,i,t[r]);t[r].data=i.data}else{i.data=t[r]}n.push(i)}return n}function L(e,t){var n=e[t];if(!n||n==1){return d[t]}if(typeof n=="number"){return d[t.charAt(0)+n+t.slice(1)]}return n}function O(){var t;var n=u.length,r=[],i=[];for(t=0;t<u.length;++t){var s=u[t].color;if(s!=null){--n;if(typeof s=="number"){i.push(s)}else{r.push(e.color.parse(u[t].color))}}}for(t=0;t<i.length;++t){n=Math.max(n,i[t]+1)}var o=[],f=0;t=0;while(o.length<n){var l;if(a.colors.length==t){l=e.color.make(100,100,100)}else{l=e.color.parse(a.colors[t])}var c=f%2==1?-1:1;l.scale("rgb",1+c*Math.ceil(f/2)*.2);o.push(l);++t;if(t>=a.colors.length){t=0;++f}}var h=0,p;for(t=0;t<u.length;++t){p=u[t];if(p.color==null){p.color=o[h].toString();++h}else{if(typeof p.color=="number"){p.color=o[p.color].toString()}}if(p.lines.show==null){var d,v=true;for(d in p){if(p[d].show){v=false;break}}if(v){p.lines.show=true}}p.xaxis=L(p,"xaxis");p.yaxis=L(p,"yaxis")}}function M(){function y(e,t,n){if(t<e.datamin){e.datamin=t}if(n>e.datamax){e.datamax=n}}var e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY,n,r,i,s,o,a,f,l,c,h,p,v,m,g;for(p in d){d[p].datamin=e;d[p].datamax=t;d[p].used=false}for(n=0;n<u.length;++n){a=u[n];a.datapoints={points:[]};S(w.processRawData,[a,a.data,a.datapoints])}for(n=0;n<u.length;++n){a=u[n];var b=a.data,E=a.datapoints.format;if(!E){E=[];E.push({x:true,number:true,required:true});E.push({y:true,number:true,required:true});if(a.bars.show){E.push({y:true,number:true,required:false,defaultValue:0})}a.datapoints.format=E}if(a.datapoints.pointsize!=null){continue}if(a.datapoints.pointsize==null){a.datapoints.pointsize=E.length}l=a.datapoints.pointsize;f=a.datapoints.points;insertSteps=a.lines.show&&a.lines.steps;a.xaxis.used=a.yaxis.used=true;for(r=i=0;r<b.length;++r,i+=l){g=b[r];var x=g==null;if(!x){for(s=0;s<l;++s){v=g[s];m=E[s];if(m){if(m.number&&v!=null){v=+v;if(isNaN(v)){v=null}}if(v==null){if(m.required){x=true}if(m.defaultValue!=null){v=m.defaultValue}}}f[i+s]=v}}if(x){for(s=0;s<l;++s){v=f[i+s];if(v!=null){m=E[s];if(m.x){y(a.xaxis,v,v)}if(m.y){y(a.yaxis,v,v)}}f[i+s]=null}}else{if(insertSteps&&i>0&&f[i-l]!=null&&f[i-l]!=f[i]&&f[i-l+1]!=f[i+1]){for(s=0;s<l;++s){f[i+l+s]=f[i+s]}f[i+1]=f[i-l+1];i+=l}}}}for(n=0;n<u.length;++n){a=u[n];S(w.processDatapoints,[a,a.datapoints])}for(n=0;n<u.length;++n){a=u[n];f=a.datapoints.points,l=a.datapoints.pointsize;var T=e,N=e,C=t,k=t;for(r=0;r<f.length;r+=l){if(f[r]==null){continue}for(s=0;s<l;++s){v=f[r+s];m=E[s];if(!m){continue}if(m.x){if(v<T){T=v}if(v>C){C=v}}if(m.y){if(v<N){N=v}if(v>k){k=v}}}}if(a.bars.show){var L=a.bars.align=="left"?0:-a.bars.barWidth/2;if(a.bars.horizontal){N+=L;k+=L+a.bars.barWidth}else{T+=L;C+=L+a.bars.barWidth}}y(a.xaxis,T,C);y(a.yaxis,N,k)}for(p in d){if(d[p].datamin==e){d[p].datamin=null}if(d[p].datamax==t){d[p].datamax=null}}}function _(){function n(t,n){var r=document.createElement("canvas");r.width=t;r.height=n;if(e.browser.msie){r=window.G_vmlCanvasManager.initElement(r)}return r}m=t.width();g=t.height();t.html("");if(t.css("position")=="static"){t.css("position","relative")}if(m<=0||g<=0){throw"Invalid dimensions for plot, width = "+m+", height = "+g}if(e.browser.msie){window.G_vmlCanvasManager.init_(document)}f=e(n(m,g)).appendTo(t).get(0);h=f.getContext("2d");l=e(n(m,g)).css({position:"absolute",left:0,top:0}).appendTo(t).get(0);p=l.getContext("2d");p.stroke()}function D(){c=e([l,f]);if(a.grid.hoverable){c.mousemove(Y)}if(a.grid.clickable){c.click(Z)}S(w.bindEvents,[c])}function P(){function n(e,t){function n(e){return e}var r,i,s=t.transform||n,o=t.inverseTransform;if(e==d.xaxis||e==d.x2axis){r=e.scale=y/(s(e.max)-s(e.min));i=s(e.min);if(s==n){e.p2c=function(e){return(e-i)*r}}else{e.p2c=function(e){return(s(e)-i)*r}}if(!o){e.c2p=function(e){return i+e/r}}else{e.c2p=function(e){return o(i+e/r)}}}else{r=e.scale=b/(s(e.max)-s(e.min));i=s(e.max);if(s==n){e.p2c=function(e){return(i-e)*r}}else{e.p2c=function(e){return(i-s(e))*r}}if(!o){e.c2p=function(e){return i-e/r}}else{e.c2p=function(e){return o(i-e/r)}}}}function r(n,r){var i,s=[],o;n.labelWidth=r.labelWidth;n.labelHeight=r.labelHeight;if(n==d.xaxis||n==d.x2axis){if(n.labelWidth==null){n.labelWidth=m/(n.ticks.length>0?n.ticks.length:1)}if(n.labelHeight==null){s=[];for(i=0;i<n.ticks.length;++i){o=n.ticks[i].label;if(o){s.push('<div class="tickLabel" style="float:left;width:'+n.labelWidth+'px">'+o+"</div>")}}if(s.length>0){var u=e('<div style="position:absolute;top:-10000px;width:10000px;font-size:smaller">'+s.join("")+'<div style="clear:left"></div></div>').appendTo(t);n.labelHeight=u.height();u.remove()}}}else{if(n.labelWidth==null||n.labelHeight==null){for(i=0;i<n.ticks.length;++i){o=n.ticks[i].label;if(o){s.push('<div class="tickLabel">'+o+"</div>")}}if(s.length>0){var u=e('<div style="position:absolute;top:-10000px;font-size:smaller">'+s.join("")+"</div>").appendTo(t);if(n.labelWidth==null){n.labelWidth=u.width()}if(n.labelHeight==null){n.labelHeight=u.find("div").height()}u.remove()}}}if(n.labelWidth==null){n.labelWidth=0}if(n.labelHeight==null){n.labelHeight=0}}function s(){var e=a.grid.borderWidth;for(i=0;i<u.length;++i){e=Math.max(e,2*(u[i].points.radius+u[i].points.lineWidth/2))}v.left=v.right=v.top=v.bottom=e;var t=a.grid.labelMargin+a.grid.borderWidth;if(d.xaxis.labelHeight>0){v.bottom=Math.max(e,d.xaxis.labelHeight+t)}if(d.yaxis.labelWidth>0){v.left=Math.max(e,d.yaxis.labelWidth+t)}if(d.x2axis.labelHeight>0){v.top=Math.max(e,d.x2axis.labelHeight+t)}if(d.y2axis.labelWidth>0){v.right=Math.max(e,d.y2axis.labelWidth+t)}y=m-v.left-v.right;b=g-v.bottom-v.top}var o;for(o in d){H(d[o],a[o])}if(a.grid.show){for(o in d){B(d[o],a[o]);j(d[o],a[o]);r(d[o],a[o])}s()}else{v.left=v.right=v.top=v.bottom=0;y=m;b=g}for(o in d){n(d[o],a[o])}if(a.grid.show){R()}J()}function H(e,t){var n=+(t.min!=null?t.min:e.datamin),r=+(t.max!=null?t.max:e.datamax),i=r-n;if(i==0){var s=r==0?1:.01;if(t.min==null){n-=s}if(t.max==null||t.min!=null){r+=s}}else{var o=t.autoscaleMargin;if(o!=null){if(t.min==null){n-=i*o;if(n<0&&e.datamin!=null&&e.datamin>=0){n=0}}if(t.max==null){r+=i*o;if(r>0&&e.datamax!=null&&e.datamax<=0){r=0}}}}e.min=n;e.max=r}function B(t,r){var i;if(typeof r.ticks=="number"&&r.ticks>0){i=r.ticks}else{if(t==d.xaxis||t==d.x2axis){i=.3*Math.sqrt(m)}else{i=.3*Math.sqrt(g)}}var s=(t.max-t.min)/i,o,u,a,f,l,c,h;if(r.mode=="time"){var p={second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3,month:30*24*60*60*1e3,year:365.2425*24*60*60*1e3};var v=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var y=0;if(r.minTickSize!=null){if(typeof r.tickSize=="number"){y=r.tickSize}else{y=r.minTickSize[0]*p[r.minTickSize[1]]}}for(l=0;l<v.length-1;++l){if(s<(v[l][0]*p[v[l][1]]+v[l+1][0]*p[v[l+1][1]])/2&&v[l][0]*p[v[l][1]]>=y){break}}o=v[l][0];a=v[l][1];if(a=="year"){c=Math.pow(10,Math.floor(Math.log(s/p.year)/Math.LN10));h=s/p.year/c;if(h<1.5){o=1}else{if(h<3){o=2}else{if(h<7.5){o=5}else{o=10}}}o*=c}if(r.tickSize){o=r.tickSize[0];a=r.tickSize[1]}u=function(e){var t=[],r=e.tickSize[0],i=e.tickSize[1],s=new Date(e.min);var o=r*p[i];if(i=="second"){s.setUTCSeconds(n(s.getUTCSeconds(),r))}if(i=="minute"){s.setUTCMinutes(n(s.getUTCMinutes(),r))}if(i=="hour"){s.setUTCHours(n(s.getUTCHours(),r))}if(i=="month"){s.setUTCMonth(n(s.getUTCMonth(),r))}if(i=="year"){s.setUTCFullYear(n(s.getUTCFullYear(),r))}s.setUTCMilliseconds(0);if(o>=p.minute){s.setUTCSeconds(0)}if(o>=p.hour){s.setUTCMinutes(0)}if(o>=p.day){s.setUTCHours(0)}if(o>=p.day*4){s.setUTCDate(1)}if(o>=p.year){s.setUTCMonth(0)}var u=0,a=Number.NaN,f;do{f=a;a=s.getTime();t.push({v:a,label:e.tickFormatter(a,e)});if(i=="month"){if(r<1){s.setUTCDate(1);var l=s.getTime();s.setUTCMonth(s.getUTCMonth()+1);var c=s.getTime();s.setTime(a+u*p.hour+(c-l)*r);u=s.getUTCHours();s.setUTCHours(0)}else{s.setUTCMonth(s.getUTCMonth()+r)}}else{if(i=="year"){s.setUTCFullYear(s.getUTCFullYear()+r)}else{s.setTime(a+o)}}}while(a<e.max&&a!=f);return t};f=function(t,n){var i=new Date(t);if(r.timeformat!=null){return e.plot.formatDate(i,r.timeformat,r.monthNames)}var s=n.tickSize[0]*p[n.tickSize[1]];var o=n.max-n.min;var u=r.twelveHourClock?" %p":"";if(s<p.minute){fmt="%h:%M:%S"+u}else{if(s<p.day){if(o<2*p.day){fmt="%h:%M"+u}else{fmt="%b %d %h:%M"+u}}else{if(s<p.month){fmt="%b %d"}else{if(s<p.year){if(o<p.year){fmt="%b"}else{fmt="%b %y"}}else{fmt="%y"}}}}return e.plot.formatDate(i,fmt,r.monthNames)}}else{var b=r.tickDecimals;var w=-Math.floor(Math.log(s)/Math.LN10);if(b!=null&&w>b){w=b}c=Math.pow(10,-w);h=s/c;if(h<1.5){o=1}else{if(h<3){o=2;if(h>2.25&&(b==null||w+1<=b)){o=2.5;++w}}else{if(h<7.5){o=5}else{o=10}}}o*=c;if(r.minTickSize!=null&&o<r.minTickSize){o=r.minTickSize}if(r.tickSize!=null){o=r.tickSize}t.tickDecimals=Math.max(0,b!=null?b:w);u=function(e){var t=[];var r=n(e.min,e.tickSize),i=0,s=Number.NaN,o;do{o=s;s=r+i*e.tickSize;t.push({v:s,label:e.tickFormatter(s,e)});++i}while(s<e.max&&s!=o);return t};f=function(e,t){return e.toFixed(t.tickDecimals)}}t.tickSize=a?[o,a]:o;t.tickGenerator=u;if(e.isFunction(r.tickFormatter)){t.tickFormatter=function(e,t){return""+r.tickFormatter(e,t)}}else{t.tickFormatter=f}}function j(t,n){t.ticks=[];if(!t.used){return}if(n.ticks==null){t.ticks=t.tickGenerator(t)}else{if(typeof n.ticks=="number"){if(n.ticks>0){t.ticks=t.tickGenerator(t)}}else{if(n.ticks){var r=n.ticks;if(e.isFunction(r)){r=r({min:t.min,max:t.max})}var i,s;for(i=0;i<r.length;++i){var o=null;var u=r[i];if(typeof u=="object"){s=u[0];if(u.length>1){o=u[1]}}else{s=u}if(o==null){o=t.tickFormatter(s,t)}t.ticks[i]={v:s,label:o}}}}}if(n.autoscaleMargin!=null&&t.ticks.length>0){if(n.min==null){t.min=Math.min(t.min,t.ticks[0].v)}if(n.max==null&&t.ticks.length>1){t.max=Math.max(t.max,t.ticks[t.ticks.length-1].v)}}}function F(){h.clearRect(0,0,m,g);var e=a.grid;if(e.show&&!e.aboveData){q()}for(var t=0;t<u.length;++t){U(u[t])}S(w.draw,[h]);if(e.show&&e.aboveData){q()}}function I(e,t){var n=t+"axis",r=t+"2axis",i,s,o,u;if(e[n]){i=d[n];s=e[n].from;o=e[n].to}else{if(e[r]){i=d[r];s=e[r].from;o=e[r].to}else{i=d[n];s=e[t+"1"];o=e[t+"2"]}}if(s!=null&&o!=null&&s>o){return{from:o,to:s,axis:i}}return{from:s,to:o,axis:i}}function q(){var t;h.save();h.translate(v.left,v.top);if(a.grid.backgroundColor){h.fillStyle=at(a.grid.backgroundColor,b,0,"rgba(255, 255, 255, 0)");h.fillRect(0,0,y,b)}var n=a.grid.markings;if(n){if(e.isFunction(n)){n=n({xmin:d.xaxis.min,xmax:d.xaxis.max,ymin:d.yaxis.min,ymax:d.yaxis.max,xaxis:d.xaxis,yaxis:d.yaxis,x2axis:d.x2axis,y2axis:d.y2axis})}for(t=0;t<n.length;++t){var r=n[t],i=I(r,"x"),s=I(r,"y");if(i.from==null){i.from=i.axis.min}if(i.to==null){i.to=i.axis.max}if(s.from==null){s.from=s.axis.min}if(s.to==null){s.to=s.axis.max}if(i.to<i.axis.min||i.from>i.axis.max||s.to<s.axis.min||s.from>s.axis.max){continue}i.from=Math.max(i.from,i.axis.min);i.to=Math.min(i.to,i.axis.max);s.from=Math.max(s.from,s.axis.min);s.to=Math.min(s.to,s.axis.max);if(i.from==i.to&&s.from==s.to){continue}i.from=i.axis.p2c(i.from);i.to=i.axis.p2c(i.to);s.from=s.axis.p2c(s.from);s.to=s.axis.p2c(s.to);if(i.from==i.to||s.from==s.to){h.beginPath();h.strokeStyle=r.color||a.grid.markingsColor;h.lineWidth=r.lineWidth||a.grid.markingsLineWidth;h.moveTo(i.from,s.from);h.lineTo(i.to,s.to);h.stroke()}else{h.fillStyle=r.color||a.grid.markingsColor;h.fillRect(i.from,s.to,i.to-i.from,s.from-s.to)}}}h.lineWidth=1;h.strokeStyle=a.grid.tickColor;h.beginPath();var o,u=d.xaxis;for(t=0;t<u.ticks.length;++t){o=u.ticks[t].v;if(o<=u.min||o>=d.xaxis.max){continue}h.moveTo(Math.floor(u.p2c(o))+h.lineWidth/2,0);h.lineTo(Math.floor(u.p2c(o))+h.lineWidth/2,b)}u=d.yaxis;for(t=0;t<u.ticks.length;++t){o=u.ticks[t].v;if(o<=u.min||o>=u.max){continue}h.moveTo(0,Math.floor(u.p2c(o))+h.lineWidth/2);h.lineTo(y,Math.floor(u.p2c(o))+h.lineWidth/2)}u=d.x2axis;for(t=0;t<u.ticks.length;++t){o=u.ticks[t].v;if(o<=u.min||o>=u.max){continue}h.moveTo(Math.floor(u.p2c(o))+h.lineWidth/2,-5);h.lineTo(Math.floor(u.p2c(o))+h.lineWidth/2,5)}u=d.y2axis;for(t=0;t<u.ticks.length;++t){o=u.ticks[t].v;if(o<=u.min||o>=u.max){continue}h.moveTo(y-5,Math.floor(u.p2c(o))+h.lineWidth/2);h.lineTo(y+5,Math.floor(u.p2c(o))+h.lineWidth/2)}h.stroke();if(a.grid.borderWidth){var f=a.grid.borderWidth;h.lineWidth=f;h.strokeStyle=a.grid.borderColor;h.strokeRect(-f/2,-f/2,y+f,b+f)}h.restore()}function R(){function n(t,n){for(var r=0;r<t.ticks.length;++r){var i=t.ticks[r];if(!i.label||i.v<t.min||i.v>t.max){continue}e.push(n(i,t))}}t.find(".tickLabels").remove();var e=['<div class="tickLabels" style="font-size:smaller;color:'+a.grid.color+'">'];var r=a.grid.labelMargin+a.grid.borderWidth;n(d.xaxis,function(e,t){return'<div style="position:absolute;top:'+(v.top+b+r)+"px;left:"+Math.round(v.left+t.p2c(e.v)-t.labelWidth/2)+"px;width:"+t.labelWidth+'px;text-align:center" class="tickLabel">'+e.label+"</div>"});n(d.yaxis,function(e,t){return'<div style="position:absolute;top:'+Math.round(v.top+t.p2c(e.v)-t.labelHeight/2)+"px;right:"+(v.right+y+r)+"px;width:"+t.labelWidth+'px;text-align:right" class="tickLabel">'+e.label+"</div>"});n(d.x2axis,function(e,t){return'<div style="position:absolute;bottom:'+(v.bottom+b+r)+"px;left:"+Math.round(v.left+t.p2c(e.v)-t.labelWidth/2)+"px;width:"+t.labelWidth+'px;text-align:center" class="tickLabel">'+e.label+"</div>"});n(d.y2axis,function(e,t){return'<div style="position:absolute;top:'+Math.round(v.top+t.p2c(e.v)-t.labelHeight/2)+"px;left:"+(v.left+y+r)+"px;width:"+t.labelWidth+'px;text-align:left" class="tickLabel">'+e.label+"</div>"});e.push("</div>");t.append(e.join(""))}function U(e){if(e.lines.show){z(e)}if(e.bars.show){V(e)}if(e.points.show){W(e)}}function z(e){function t(e,t,n,r,i){var s=e.points,o=e.pointsize,u=null,a=null;h.beginPath();for(var f=o;f<s.length;f+=o){var l=s[f-o],c=s[f-o+1],p=s[f],d=s[f+1];if(l==null||p==null){continue}if(c<=d&&c<i.min){if(d<i.min){continue}l=(i.min-c)/(d-c)*(p-l)+l;c=i.min}else{if(d<=c&&d<i.min){if(c<i.min){continue}p=(i.min-c)/(d-c)*(p-l)+l;d=i.min}}if(c>=d&&c>i.max){if(d>i.max){continue}l=(i.max-c)/(d-c)*(p-l)+l;c=i.max}else{if(d>=c&&d>i.max){if(c>i.max){continue}p=(i.max-c)/(d-c)*(p-l)+l;d=i.max}}if(l<=p&&l<r.min){if(p<r.min){continue}c=(r.min-l)/(p-l)*(d-c)+c;l=r.min}else{if(p<=l&&p<r.min){if(l<r.min){continue}d=(r.min-l)/(p-l)*(d-c)+c;p=r.min}}if(l>=p&&l>r.max){if(p>r.max){continue}c=(r.max-l)/(p-l)*(d-c)+c;l=r.max}else{if(p>=l&&p>r.max){if(l>r.max){continue}d=(r.max-l)/(p-l)*(d-c)+c;p=r.max}}if(l!=u||c!=a){h.moveTo(r.p2c(l)+t,i.p2c(c)+n)}u=p;a=d;h.lineTo(r.p2c(p)+t,i.p2c(d)+n)}h.stroke()}function n(e,t,n){var r=e.points,i=e.pointsize,s=Math.min(Math.max(0,n.min),n.max),o,u=0,a=false;for(var f=i;f<r.length;f+=i){var l=r[f-i],c=r[f-i+1],p=r[f],d=r[f+1];if(a&&l!=null&&p==null){h.lineTo(t.p2c(u),n.p2c(s));h.fill();a=false;continue}if(l==null||p==null){continue}if(l<=p&&l<t.min){if(p<t.min){continue}c=(t.min-l)/(p-l)*(d-c)+c;l=t.min}else{if(p<=l&&p<t.min){if(l<t.min){continue}d=(t.min-l)/(p-l)*(d-c)+c;p=t.min}}if(l>=p&&l>t.max){if(p>t.max){continue}c=(t.max-l)/(p-l)*(d-c)+c;l=t.max}else{if(p>=l&&p>t.max){if(l>t.max){continue}d=(t.max-l)/(p-l)*(d-c)+c;p=t.max}}if(!a){h.beginPath();h.moveTo(t.p2c(l),n.p2c(s));a=true}if(c>=n.max&&d>=n.max){h.lineTo(t.p2c(l),n.p2c(n.max));h.lineTo(t.p2c(p),n.p2c(n.max));u=p;continue}else{if(c<=n.min&&d<=n.min){h.lineTo(t.p2c(l),n.p2c(n.min));h.lineTo(t.p2c(p),n.p2c(n.min));u=p;continue}}var v=l,m=p;if(c<=d&&c<n.min&&d>=n.min){l=(n.min-c)/(d-c)*(p-l)+l;c=n.min}else{if(d<=c&&d<n.min&&c>=n.min){p=(n.min-c)/(d-c)*(p-l)+l;d=n.min}}if(c>=d&&c>n.max&&d<=n.max){l=(n.max-c)/(d-c)*(p-l)+l;c=n.max}else{if(d>=c&&d>n.max&&c<=n.max){p=(n.max-c)/(d-c)*(p-l)+l;d=n.max}}if(l!=v){if(c<=n.min){o=n.min}else{o=n.max}h.lineTo(t.p2c(v),n.p2c(o));h.lineTo(t.p2c(l),n.p2c(o))}h.lineTo(t.p2c(l),n.p2c(c));h.lineTo(t.p2c(p),n.p2c(d));if(p!=m){if(d<=n.min){o=n.min}else{o=n.max}h.lineTo(t.p2c(p),n.p2c(o));h.lineTo(t.p2c(m),n.p2c(o))}u=Math.max(p,m)}if(a){h.lineTo(t.p2c(u),n.p2c(s));h.fill()}}h.save();h.translate(v.left,v.top);h.lineJoin="round";var r=e.lines.lineWidth,i=e.shadowSize;if(r>0&&i>0){h.lineWidth=i;h.strokeStyle="rgba(0,0,0,0.1)";var s=Math.PI/18;t(e.datapoints,Math.sin(s)*(r/2+i/2),Math.cos(s)*(r/2+i/2),e.xaxis,e.yaxis);h.lineWidth=i/2;t(e.datapoints,Math.sin(s)*(r/2+i/4),Math.cos(s)*(r/2+i/4),e.xaxis,e.yaxis)}h.lineWidth=r;h.strokeStyle=e.color;var o=$(e.lines,e.color,0,b);if(o){h.fillStyle=o;n(e.datapoints,e.xaxis,e.yaxis)}if(r>0){t(e.datapoints,0,0,e.xaxis,e.yaxis)}h.restore()}function W(e){function t(e,t,n,r,i,s,o){var u=e.points,a=e.pointsize;for(var f=0;f<u.length;f+=a){var l=u[f],c=u[f+1];if(l==null||l<s.min||l>s.max||c<o.min||c>o.max){continue}h.beginPath();h.arc(s.p2c(l),o.p2c(c)+r,t,0,i,false);if(n){h.fillStyle=n;h.fill()}h.stroke()}}h.save();h.translate(v.left,v.top);var n=e.lines.lineWidth,r=e.shadowSize,i=e.points.radius;if(n>0&&r>0){var s=r/2;h.lineWidth=s;h.strokeStyle="rgba(0,0,0,0.1)";t(e.datapoints,i,null,s+s/2,Math.PI,e.xaxis,e.yaxis);h.strokeStyle="rgba(0,0,0,0.2)";t(e.datapoints,i,null,s/2,Math.PI,e.xaxis,e.yaxis)}h.lineWidth=n;h.strokeStyle=e.color;t(e.datapoints,i,$(e.points,e.color),0,2*Math.PI,e.xaxis,e.yaxis);h.restore()}function X(e,t,n,r,i,s,o,u,a,f,l){var c,h,p,d,v,m,g,y,b;if(l){y=m=g=true;v=false;c=n;h=e;d=t+r;p=t+i;if(h<c){b=h;h=c;c=b;v=true;m=false}}else{v=m=g=true;y=false;c=e+r;h=e+i;p=n;d=t;if(d<p){b=d;d=p;p=b;y=true;g=false}}if(h<u.min||c>u.max||d<a.min||p>a.max){return}if(c<u.min){c=u.min;v=false}if(h>u.max){h=u.max;m=false}if(p<a.min){p=a.min;y=false}if(d>a.max){d=a.max;g=false}c=u.p2c(c);p=a.p2c(p);h=u.p2c(h);d=a.p2c(d);if(o){f.beginPath();f.moveTo(c,p);f.lineTo(c,d);f.lineTo(h,d);f.lineTo(h,p);f.fillStyle=o(p,d);f.fill()}if(v||m||g||y){f.beginPath();f.moveTo(c,p+s);if(v){f.lineTo(c,d+s)}else{f.moveTo(c,d+s)}if(g){f.lineTo(h,d+s)}else{f.moveTo(h,d+s)}if(m){f.lineTo(h,p+s)}else{f.moveTo(h,p+s)}if(y){f.lineTo(c,p+s)}else{f.moveTo(c,p+s)}f.stroke()}}function V(e){function t(t,n,r,i,s,o,u){var a=t.points,f=t.pointsize;for(var l=0;l<a.length;l+=f){if(a[l]==null){continue}X(a[l],a[l+1],a[l+2],n,r,i,s,o,u,h,e.bars.horizontal)}}h.save();h.translate(v.left,v.top);h.lineWidth=e.bars.lineWidth;h.strokeStyle=e.color;var n=e.bars.align=="left"?0:-e.bars.barWidth/2;var r=e.bars.fill?function(t,n){return $(e.bars,e.color,t,n)}:null;t(e.datapoints,n,n+e.bars.barWidth,0,r,e.xaxis,e.yaxis);h.restore()}function $(t,n,r,i){var s=t.fill;if(!s){return null}if(t.fillColor){return at(t.fillColor,r,i,n)}var o=e.color.parse(n);o.a=typeof s=="number"?s:.4;o.normalize();return o.toString()}function J(){t.find(".legend").remove();if(!a.legend.show){return}var n=[],r=false,s=a.legend.labelFormatter,o,f;for(i=0;i<u.length;++i){o=u[i];f=o.label;if(!f){continue}if(i%a.legend.noColumns==0){if(r){n.push("</tr>")}n.push("<tr>");r=true}if(s){f=s(f,o)}n.push('<td class="legendColorBox"><div style="border:1px solid '+a.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+o.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+f+"</td>")}if(r){n.push("</tr>")}if(n.length==0){return}var l='<table style="font-size:smaller;color:'+a.grid.color+'">'+n.join("")+"</table>";if(a.legend.container!=null){e(a.legend.container).html(l)}else{var c="",h=a.legend.position,p=a.legend.margin;if(p[0]==null){p=[p,p]}if(h.charAt(0)=="n"){c+="top:"+(p[1]+v.top)+"px;"}else{if(h.charAt(0)=="s"){c+="bottom:"+(p[1]+v.bottom)+"px;"}}if(h.charAt(1)=="e"){c+="right:"+(p[0]+v.right)+"px;"}else{if(h.charAt(1)=="w"){c+="left:"+(p[0]+v.left)+"px;"}}var d=e('<div class="legend">'+l.replace('style="','style="position:absolute;'+c+";")+"</div>").appendTo(t);if(a.legend.backgroundOpacity!=0){var m=a.legend.backgroundColor;if(m==null){m=a.grid.backgroundColor;if(m&&typeof m=="string"){m=e.color.parse(m)}else{m=e.color.extract(d,"background-color")}m.a=1;m=m.toString()}var g=d.children();e('<div style="position:absolute;width:'+g.width()+"px;height:"+g.height()+"px;"+c+"background-color:"+m+';"> </div>').prependTo(d).css("opacity",a.legend.backgroundOpacity)}}}function G(e,t,n){var r=a.grid.mouseActiveRadius,i=r*r+1,s=null,o=false,f,l;for(f=0;f<u.length;++f){if(!n(u[f])){continue}var c=u[f],h=c.xaxis,p=c.yaxis,d=c.datapoints.points,v=c.datapoints.pointsize,m=h.c2p(e),g=p.c2p(t),y=r/h.scale,b=r/p.scale;if(c.lines.show||c.points.show){for(l=0;l<d.length;l+=v){var w=d[l],E=d[l+1];if(w==null){continue}if(w-m>y||w-m<-y||E-g>b||E-g<-b){continue}var S=Math.abs(h.p2c(w)-e),x=Math.abs(p.p2c(E)-t),T=S*S+x*x;if(T<=i){i=T;s=[f,l/v]}}}if(c.bars.show&&!s){var N=c.bars.align=="left"?0:-c.bars.barWidth/2,C=N+c.bars.barWidth;for(l=0;l<d.length;l+=v){var w=d[l],E=d[l+1],k=d[l+2];if(w==null){continue}if(u[f].bars.horizontal?m<=Math.max(k,w)&&m>=Math.min(k,w)&&g>=E+N&&g<=E+C:m>=w+N&&m<=w+C&&g>=Math.min(k,E)&&g<=Math.max(k,E)){s=[f,l/v]}}}}if(s){f=s[0];l=s[1];v=u[f].datapoints.pointsize;return{datapoint:u[f].datapoints.points.slice(l*v,(l+1)*v),dataIndex:l,series:u[f],seriesIndex:f}}return null}function Y(e){if(a.grid.hoverable){et("plothover",e,function(e){return e.hoverable!=false})}}function Z(e){et("plotclick",e,function(e){return e.clickable!=false})}function et(e,n,r){var i=c.offset(),s={pageX:n.pageX,pageY:n.pageY},o=n.pageX-i.left-v.left,u=n.pageY-i.top-v.top;if(d.xaxis.used){s.x=d.xaxis.c2p(o)}if(d.yaxis.used){s.y=d.yaxis.c2p(u)}if(d.x2axis.used){s.x2=d.x2axis.c2p(o)}if(d.y2axis.used){s.y2=d.y2axis.c2p(u)}var f=G(o,u,r);if(f){f.pageX=parseInt(f.series.xaxis.p2c(f.datapoint[0])+i.left+v.left);f.pageY=parseInt(f.series.yaxis.p2c(f.datapoint[1])+i.top+v.top)}if(a.grid.autoHighlight){for(var l=0;l<K.length;++l){var h=K[l];if(h.auto==e&&!(f&&h.series==f.series&&h.point==f.datapoint)){it(h.series,h.point)}}if(f){rt(f.series,f.datapoint,e)}}t.trigger(e,[s,f])}function tt(){if(!Q){Q=setTimeout(nt,30)}}function nt(){Q=null;p.save();p.clearRect(0,0,m,g);p.translate(v.left,v.top);var e,t;for(e=0;e<K.length;++e){t=K[e];if(t.series.bars.show){ut(t.series,t.point)}else{ot(t.series,t.point)}}p.restore();S(w.drawOverlay,[p])}function rt(e,t,n){if(typeof e=="number"){e=u[e]}if(typeof t=="number"){t=e.data[t]}var r=st(e,t);if(r==-1){K.push({series:e,point:t,auto:n});tt()}else{if(!n){K[r].auto=false}}}function it(e,t){if(e==null&&t==null){K=[];tt()}if(typeof e=="number"){e=u[e]}if(typeof t=="number"){t=e.data[t]}var n=st(e,t);if(n!=-1){K.splice(n,1);tt()}}function st(e,t){for(var n=0;n<K.length;++n){var r=K[n];if(r.series==e&&r.point[0]==t[0]&&r.point[1]==t[1]){return n}}return-1}function ot(t,n){var r=n[0],i=n[1],s=t.xaxis,o=t.yaxis;if(r<s.min||r>s.max||i<o.min||i>o.max){return}var u=t.points.radius+t.points.lineWidth/2;p.lineWidth=u;p.strokeStyle=e.color.parse(t.color).scale("a",.5).toString();var a=1.5*u;p.beginPath();p.arc(s.p2c(r),o.p2c(i),a,0,2*Math.PI,false);p.stroke()}function ut(t,n){p.lineWidth=t.bars.lineWidth;p.strokeStyle=e.color.parse(t.color).scale("a",.5).toString();var r=e.color.parse(t.color).scale("a",.5).toString();var i=t.bars.align=="left"?0:-t.bars.barWidth/2;X(n[0],n[1],n[2]||0,i,i+t.bars.barWidth,0,function(){return r},t.xaxis,t.yaxis,p,t.bars.horizontal)}function at(t,n,r,i){if(typeof t=="string"){return t}else{var s=h.createLinearGradient(0,r,0,n);for(var o=0,u=t.colors.length;o<u;++o){var a=t.colors[o];if(typeof a!="string"){a=e.color.parse(i).scale("rgb",a.brightness);a.a*=a.opacity;a=a.toString()}s.addColorStop(o/(u-1),a)}return s}}var u=[],a={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85},xaxis:{mode:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:false},yaxis:{autoscaleMargin:.02},x2axis:{autoscaleMargin:null},y2axis:{autoscaleMargin:.02},series:{points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff"},lines:{lineWidth:2,fill:false,fillColor:null,steps:false},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left",horizontal:false},shadowSize:3},grid:{show:true,aboveData:false,color:"#545454",backgroundColor:null,tickColor:"rgba(0,0,0,0.15)",labelMargin:5,borderWidth:2,borderColor:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},hooks:{}},f=null,l=null,c=null,h=null,p=null,d={xaxis:{},yaxis:{},x2axis:{},y2axis:{}},v={left:0,right:0,top:0,bottom:0},m=0,g=0,y=0,b=0,w={processOptions:[],processRawData:[],processDatapoints:[],draw:[],bindEvents:[],drawOverlay:[]},E=this;E.setData=N;E.setupGrid=P;E.draw=F;E.getPlaceholder=function(){return t};E.getCanvas=function(){return f};E.getPlotOffset=function(){return v};E.width=function(){return y};E.height=function(){return b};E.offset=function(){var e=c.offset();e.left+=v.left;e.top+=v.top;return e};E.getData=function(){return u};E.getAxes=function(){return d};E.getOptions=function(){return a};E.highlight=rt;E.unhighlight=it;E.triggerRedrawOverlay=tt;E.pointOffset=function(e){return{left:parseInt(L(e,"xaxis").p2c(+e.x)+v.left),top:parseInt(L(e,"yaxis").p2c(+e.y)+v.top)}};E.hooks=w;x(E);T(s);_();N(r);P();F();D();var K=[],Q=null}function n(e,t){return t*Math.floor(e/t)}e.plot=function(n,r,i){var s=new t(e(n),r,i,e.plot.plugins);return s};e.plot.plugins=[];e.plot.formatDate=function(e,t,n){var r=function(e){e=""+e;return e.length==1?"0"+e:e};var i=[];var s=false;var o=e.getUTCHours();var u=o<12;if(n==null){n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(t.search(/%p|%P/)!=-1){if(o>12){o=o-12}else{if(o==0){o=12}}}for(var a=0;a<t.length;++a){var f=t.charAt(a);if(s){switch(f){case"h":f=""+o;break;case"H":f=r(o);break;case"M":f=r(e.getUTCMinutes());break;case"S":f=r(e.getUTCSeconds());break;case"d":f=""+e.getUTCDate();break;case"m":f=""+(e.getUTCMonth()+1);break;case"y":f=""+e.getUTCFullYear();break;case"b":f=""+n[e.getUTCMonth()];break;case"p":f=u?"am":"pm";break;case"P":f=u?"AM":"PM";break}i.push(f);s=false}else{if(f=="%"){s=true}else{i.push(f)}}}return i.join("")}})(jQuery)
|
include/Post_Content_Merge_Tags.php
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Persian Gravity Forms // Gravity Forms Post Content Merge Tags
|
4 |
+
*
|
5 |
+
* Adds support for using Gravity Form merge tags in your post content. This functionality requires that the entry ID is
|
6 |
+
* is passed to the post via the "id" parameter.
|
7 |
+
*
|
8 |
+
* Setup your confirmation page (requires GFv1.8) or confirmation URL "Redirect Query String" setting to
|
9 |
+
* include this parameter: 'id={entry_id}'. You can then use any entry-based merge tag in your post content.
|
10 |
+
*
|
11 |
+
* @version 1.2
|
12 |
+
* @author HANNAN Std <david@gravitywiz.com>
|
13 |
+
* @license GPL-2.0+
|
14 |
+
* @link http://gravityforms.ir
|
15 |
+
* @video http://gravityforms.ir
|
16 |
+
* @copyright 2014 Persian Gravity Forms
|
17 |
+
*/
|
18 |
+
class PersianGravityForms_Post_Content_Merge_Tags {
|
19 |
+
public static $_entry = null;
|
20 |
+
private static $instance = null;
|
21 |
+
public static function get_instance( $args = array() ) {
|
22 |
+
if( self::$instance == null )
|
23 |
+
self::$instance = new self( $args );
|
24 |
+
return self::$instance;
|
25 |
+
}
|
26 |
+
function __construct( $args ) {
|
27 |
+
if( ! class_exists( 'GFForms' ) )
|
28 |
+
return;
|
29 |
+
$this->_args = wp_parse_args( $args, array(
|
30 |
+
'auto_append_id' => true, // true, false or array of form IDs
|
31 |
+
'encrypt_id' => false,
|
32 |
+
) );
|
33 |
+
add_filter( 'the_content', array( $this, 'replace_merge_tags' ), 1 );
|
34 |
+
add_filter( 'gform_replace_merge_tags', array( $this, 'replace_encrypt_entry_id_merge_tag' ), 10, 3 );
|
35 |
+
if( ! empty( $this->_args['auto_append_id'] ) ) {
|
36 |
+
add_filter( 'gform_confirmation', array( $this, 'append_id_parameter' ), 20, 3 );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
function replace_merge_tags( $post_content ) {
|
40 |
+
$entry = $this->get_entry();
|
41 |
+
if( ! $entry )
|
42 |
+
return $post_content;
|
43 |
+
$form = GFFormsModel::get_form_meta( $entry['form_id'] );
|
44 |
+
$wp_session = WP_Session::get_instance();
|
45 |
+
$post_content = $this->replace_field_label_merge_tags( $post_content, $form );
|
46 |
+
$post_content = GFCommon::replace_variables( $post_content, $form, $entry, false, false, false );
|
47 |
+
if ( $wp_session['refid'] == $entry["transaction_id"] ) {
|
48 |
+
return $post_content;
|
49 |
+
} else {
|
50 |
+
unset($post_content);
|
51 |
+
$post_content = "این تراکنش قبلا به پایان رسیده بود و نتیجه آن نیز اعلام شده بود . بنا به دلایل امنیتی از بازگو کردن وضعیت آن به شما معذوریم .";
|
52 |
+
return $post_content;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
function replace_field_label_merge_tags( $text, $form ) {
|
56 |
+
preg_match_all( '/{([^:]+?)}/', $text, $matches, PREG_SET_ORDER );
|
57 |
+
if( empty( $matches ) )
|
58 |
+
return $text;
|
59 |
+
foreach( $matches as $match ) {
|
60 |
+
list( $search, $field_label ) = $match;
|
61 |
+
foreach( $form['fields'] as $field ) {
|
62 |
+
$full_input_id = false;
|
63 |
+
$matches_admin_label = rgar( $field, 'adminLabel' ) == $field_label;
|
64 |
+
$matches_field_label = false;
|
65 |
+
if( is_array( $field['inputs'] ) ) {
|
66 |
+
foreach( $field['inputs'] as $input ) {
|
67 |
+
if( GFFormsModel::get_label( $field, $input['id'] ) == $field_label ) {
|
68 |
+
$matches_field_label = true;
|
69 |
+
$input_id = $input['id'];
|
70 |
+
break;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
} else {
|
74 |
+
$matches_field_label = GFFormsModel::get_label( $field ) == $field_label;
|
75 |
+
$input_id = $field['id'];
|
76 |
+
}
|
77 |
+
if( ! $matches_admin_label && ! $matches_field_label )
|
78 |
+
continue;
|
79 |
+
$replace = sprintf( '{%s:%s}', $field_label, (string) $input_id );
|
80 |
+
$text = str_replace( $search, $replace, $text );
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
return $text;
|
85 |
+
}
|
86 |
+
function replace_encrypt_entry_id_merge_tag( $text, $form, $entry ) {
|
87 |
+
if( strpos( $text, '{encrypted_entry_id}' ) === false ) {
|
88 |
+
return $text;
|
89 |
+
}
|
90 |
+
// $entry is not always a "full" entry
|
91 |
+
$entry_id = rgar( $entry, 'id' );
|
92 |
+
if( $entry_id ) {
|
93 |
+
$entry_id = $this->prepare_id( $entry['id'], true );
|
94 |
+
}
|
95 |
+
return str_replace( '{encrypted_entry_id}', $entry_id, $text );
|
96 |
+
}
|
97 |
+
function append_id_parameter( $confirmation, $form, $entry ) {
|
98 |
+
$is_ajax_redirect = is_string( $confirmation ) && strpos( $confirmation, 'gformRedirect' );
|
99 |
+
$is_redirect = is_array( $confirmation ) && isset( $confirmation['redirect'] );
|
100 |
+
if( ! $this->is_auto_id_enabled( $form ) || ! ( $is_ajax_redirect || $is_redirect ) ) {
|
101 |
+
return $confirmation;
|
102 |
+
}
|
103 |
+
$id = $this->prepare_id( $entry['id'] );
|
104 |
+
if( $is_ajax_redirect ) {
|
105 |
+
preg_match_all( '/gformRedirect.+?(http.+?)(?=\'|")/', $confirmation, $matches, PREG_SET_ORDER );
|
106 |
+
list( $full_match, $url ) = $matches[0];
|
107 |
+
$redirect_url = add_query_arg( array( 'id' => $id ), $url );
|
108 |
+
$confirmation = str_replace( $url, $redirect_url, $confirmation );
|
109 |
+
} else {
|
110 |
+
$redirect_url = add_query_arg( array( 'id' => $id ), $confirmation['redirect'] );
|
111 |
+
$confirmation['redirect'] = $redirect_url;
|
112 |
+
}
|
113 |
+
|
114 |
+
return $confirmation;
|
115 |
+
}
|
116 |
+
function prepare_id( $entry_id, $force_encrypt = false ) {
|
117 |
+
$id = $entry_id;
|
118 |
+
$do_encrypt = $force_encrypt || $this->_args['encrypt_id'];
|
119 |
+
if( $do_encrypt && is_callable( array( 'GFCommon', 'encrypt' ) ) ) {
|
120 |
+
$id = rawurlencode( GFCommon::encrypt( $id ) );
|
121 |
+
}
|
122 |
+
return $id;
|
123 |
+
}
|
124 |
+
function get_entry() {
|
125 |
+
if( ! self::$_entry ) {
|
126 |
+
$entry_id = $this->get_entry_id();
|
127 |
+
if( ! $entry_id )
|
128 |
+
return false;
|
129 |
+
$entry = GFFormsModel::get_lead( $entry_id );
|
130 |
+
if( empty( $entry ) )
|
131 |
+
return false;
|
132 |
+
self::$_entry = $entry;
|
133 |
+
}
|
134 |
+
return self::$_entry;
|
135 |
+
}
|
136 |
+
function get_entry_id() {
|
137 |
+
$entry_id = rgget( 'id' );
|
138 |
+
if( $entry_id ) {
|
139 |
+
return $this->maybe_decrypt_entry_id( $entry_id );
|
140 |
+
}
|
141 |
+
$post = get_post();
|
142 |
+
if( $post ) {
|
143 |
+
$entry_id = get_post_meta( $post->ID, '_gform-entry-id', true );
|
144 |
+
}
|
145 |
+
return $entry_id ? $entry_id : false;
|
146 |
+
}
|
147 |
+
function maybe_decrypt_entry_id( $entry_id ) {
|
148 |
+
$do_encrypt = $this->_args['encrypt_id'];
|
149 |
+
if( ! $entry_id ) {
|
150 |
+
return null;
|
151 |
+
} else if( ! $do_encrypt && is_numeric( $entry_id ) && intval( $entry_id ) > 0 ) {
|
152 |
+
return $entry_id;
|
153 |
+
} else {
|
154 |
+
$entry_id = is_callable( array( 'GFCommon', 'decrypt' ) ) ? GFCommon::decrypt( $entry_id ) : $entry_id;
|
155 |
+
return intval( $entry_id );
|
156 |
+
}
|
157 |
+
}
|
158 |
+
function is_auto_id_enabled( $form ) {
|
159 |
+
$auto_append_id = $this->_args['auto_append_id'];
|
160 |
+
if( is_bool( $auto_append_id ) && $auto_append_id === true )
|
161 |
+
return true;
|
162 |
+
if( is_array( $auto_append_id ) && in_array( $form['id'], $auto_append_id ) )
|
163 |
+
return true;
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
}
|
167 |
+
function persiangravityforms_post_content_merge_tags( $args = array() ) {
|
168 |
+
return PersianGravityForms_Post_Content_Merge_Tags::get_instance( $args );
|
169 |
+
}
|
170 |
+
persiangravityforms_post_content_merge_tags();
|
include/wp-session.php
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if( ! defined( 'WP_SESSION_COOKIE' ) )
|
3 |
+
define( 'WP_SESSION_COOKIE', '_wp_session' );
|
4 |
+
if ( ! class_exists( 'Recursive_ArrayAccess' ) ) {
|
5 |
+
class Recursive_ArrayAccess implements ArrayAccess {
|
6 |
+
protected $container = array();
|
7 |
+
protected $dirty = false;
|
8 |
+
protected function __construct( $data = array() ) {
|
9 |
+
foreach ( $data as $key => $value ) {
|
10 |
+
$this[ $key ] = $value;
|
11 |
+
}
|
12 |
+
}
|
13 |
+
public function __clone() {
|
14 |
+
foreach ( $this->container as $key => $value ) {
|
15 |
+
if ( $value instanceof self ) {
|
16 |
+
$this[ $key ] = clone $value;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
}
|
20 |
+
public function toArray() {
|
21 |
+
$data = $this->container;
|
22 |
+
foreach ( $data as $key => $value ) {
|
23 |
+
if ( $value instanceof self ) {
|
24 |
+
$data[ $key ] = $value->toArray();
|
25 |
+
}
|
26 |
+
}
|
27 |
+
return $data;
|
28 |
+
}
|
29 |
+
public function offsetExists( $offset ) {
|
30 |
+
return isset( $this->container[ $offset ]) ;
|
31 |
+
}
|
32 |
+
public function offsetGet( $offset ) {
|
33 |
+
return isset( $this->container[ $offset ] ) ? $this->container[ $offset ] : null;
|
34 |
+
}
|
35 |
+
public function offsetSet( $offset, $data ) {
|
36 |
+
if ( is_array( $data ) ) {
|
37 |
+
$data = new self( $data );
|
38 |
+
}
|
39 |
+
if ( $offset === null ) {
|
40 |
+
$this->container[] = $data;
|
41 |
+
} else {
|
42 |
+
$this->container[ $offset ] = $data;
|
43 |
+
}
|
44 |
+
$this->dirty = true;
|
45 |
+
}
|
46 |
+
public function offsetUnset( $offset ) {
|
47 |
+
unset( $this->container[ $offset ] );
|
48 |
+
$this->dirty = true;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
if ( ! class_exists( 'WP_Session' ) ) {
|
53 |
+
final class WP_Session extends Recursive_ArrayAccess implements Iterator, Countable {
|
54 |
+
protected $session_id;
|
55 |
+
protected $expires;
|
56 |
+
protected $exp_variant;
|
57 |
+
private static $instance = false;
|
58 |
+
public static function get_instance() {
|
59 |
+
if ( ! self::$instance ) {
|
60 |
+
self::$instance = new self();
|
61 |
+
}
|
62 |
+
return self::$instance;
|
63 |
+
}
|
64 |
+
protected function __construct() {
|
65 |
+
if ( isset( $_COOKIE[WP_SESSION_COOKIE] ) ) {
|
66 |
+
$cookie = stripslashes( $_COOKIE[WP_SESSION_COOKIE] );
|
67 |
+
$cookie_crumbs = explode( '||', $cookie );
|
68 |
+
$this->session_id = $cookie_crumbs[0];
|
69 |
+
$this->expires = $cookie_crumbs[1];
|
70 |
+
$this->exp_variant = $cookie_crumbs[2];
|
71 |
+
if ( time() > $this->exp_variant ) {
|
72 |
+
$this->set_expiration();
|
73 |
+
delete_option( "_wp_session_expires_{$this->session_id}" );
|
74 |
+
add_option( "_wp_session_expires_{$this->session_id}", $this->expires, '', 'no' );
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
$this->session_id = $this->generate_id();
|
78 |
+
$this->set_expiration();
|
79 |
+
}
|
80 |
+
|
81 |
+
$this->read_data();
|
82 |
+
$this->set_cookie();
|
83 |
+
}
|
84 |
+
protected function set_expiration() {
|
85 |
+
$this->exp_variant = time() + (int) apply_filters( 'wp_session_expiration_variant', 24 * 60 );
|
86 |
+
$this->expires = time() + (int) apply_filters( 'wp_session_expiration', 30 * 60 );
|
87 |
+
}
|
88 |
+
protected function set_cookie() {
|
89 |
+
setcookie( WP_SESSION_COOKIE, $this->session_id . '||' . $this->expires . '||' . $this->exp_variant , $this->expires, COOKIEPATH, COOKIE_DOMAIN );
|
90 |
+
}
|
91 |
+
protected function generate_id() {
|
92 |
+
require_once( ABSPATH . 'wp-includes/class-phpass.php');
|
93 |
+
$hasher = new PasswordHash( 8, false );
|
94 |
+
return md5( $hasher->get_random_bytes( 32 ) );
|
95 |
+
}
|
96 |
+
protected function read_data() {
|
97 |
+
$this->container = get_option( "_wp_session_{$this->session_id}", array() );
|
98 |
+
return $this->container;
|
99 |
+
}
|
100 |
+
public function write_data() {
|
101 |
+
$option_key = "_wp_session_{$this->session_id}";
|
102 |
+
if ( $this->dirty ) {
|
103 |
+
if ( false === get_option( $option_key ) ) {
|
104 |
+
add_option( "_wp_session_{$this->session_id}", $this->container, '', 'no' );
|
105 |
+
add_option( "_wp_session_expires_{$this->session_id}", $this->expires, '', 'no' );
|
106 |
+
} else {
|
107 |
+
delete_option( "_wp_session_{$this->session_id}" );
|
108 |
+
add_option( "_wp_session_{$this->session_id}", $this->container, '', 'no' );
|
109 |
+
}
|
110 |
+
}
|
111 |
+
}
|
112 |
+
public function json_out() {
|
113 |
+
return json_encode( $this->container );
|
114 |
+
}
|
115 |
+
public function json_in( $data ) {
|
116 |
+
$array = json_decode( $data );
|
117 |
+
if ( is_array( $array ) ) {
|
118 |
+
$this->container = $array;
|
119 |
+
return true;
|
120 |
+
}
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
public function regenerate_id( $delete_old = false ) {
|
124 |
+
if ( $delete_old ) {
|
125 |
+
delete_option( "_wp_session_{$this->session_id}" );
|
126 |
+
}
|
127 |
+
$this->session_id = $this->generate_id();
|
128 |
+
$this->set_cookie();
|
129 |
+
}
|
130 |
+
public function session_started() {
|
131 |
+
return !!self::$instance;
|
132 |
+
}
|
133 |
+
public function cache_expiration() {
|
134 |
+
return $this->expires;
|
135 |
+
}
|
136 |
+
public function reset() {
|
137 |
+
$this->container = array();
|
138 |
+
}
|
139 |
+
public function current() {
|
140 |
+
return current( $this->container );
|
141 |
+
}
|
142 |
+
public function key() {
|
143 |
+
return key( $this->container );
|
144 |
+
}
|
145 |
+
public function next() {
|
146 |
+
next( $this->container );
|
147 |
+
}
|
148 |
+
public function rewind() {
|
149 |
+
reset( $this->container );
|
150 |
+
}
|
151 |
+
public function valid() {
|
152 |
+
return $this->offsetExists( $this->key() );
|
153 |
+
}
|
154 |
+
public function count() {
|
155 |
+
return count( $this->container );
|
156 |
+
}
|
157 |
+
}
|
158 |
+
function wp_session_cache_expire() {
|
159 |
+
$wp_session = WP_Session::get_instance();
|
160 |
+
return $wp_session->cache_expiration();
|
161 |
+
}
|
162 |
+
function wp_session_commit() {
|
163 |
+
wp_session_write_close();
|
164 |
+
}
|
165 |
+
function wp_session_decode( $data ) {
|
166 |
+
$wp_session = WP_Session::get_instance();
|
167 |
+
|
168 |
+
return $wp_session->json_in( $data );
|
169 |
+
}
|
170 |
+
function wp_session_encode() {
|
171 |
+
$wp_session = WP_Session::get_instance();
|
172 |
+
|
173 |
+
return $wp_session->json_out();
|
174 |
+
}
|
175 |
+
function wp_session_regenerate_id( $delete_old_session = false ) {
|
176 |
+
$wp_session = WP_Session::get_instance();
|
177 |
+
|
178 |
+
$wp_session->regenerate_id( $delete_old_session );
|
179 |
+
|
180 |
+
return true;
|
181 |
+
}
|
182 |
+
function wp_session_start() {
|
183 |
+
$wp_session = WP_Session::get_instance();
|
184 |
+
do_action( 'wp_session_start' );
|
185 |
+
|
186 |
+
return $wp_session->session_started();
|
187 |
+
}
|
188 |
+
add_action( 'plugins_loaded', 'wp_session_start' );
|
189 |
+
function wp_session_status() {
|
190 |
+
$wp_session = WP_Session::get_instance();
|
191 |
+
if ( $wp_session->session_started() ) {
|
192 |
+
return PHP_SESSION_ACTIVE;
|
193 |
+
}
|
194 |
+
return PHP_SESSION_NONE;
|
195 |
+
}
|
196 |
+
function wp_session_unset() {
|
197 |
+
$wp_session = WP_Session::get_instance();
|
198 |
+
$wp_session->reset();
|
199 |
+
}
|
200 |
+
function wp_session_write_close() {
|
201 |
+
$wp_session = WP_Session::get_instance();
|
202 |
+
$wp_session->write_data();
|
203 |
+
do_action( 'wp_session_commit' );
|
204 |
+
}
|
205 |
+
add_action( 'shutdown', 'wp_session_write_close' );
|
206 |
+
function wp_session_cleanup() {
|
207 |
+
global $wpdb;
|
208 |
+
if ( defined( 'WP_SETUP_CONFIG' ) ) {
|
209 |
+
return;
|
210 |
+
}
|
211 |
+
if ( ! defined( 'WP_INSTALLING' ) ) {
|
212 |
+
$expiration_keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'" );
|
213 |
+
$now = time();
|
214 |
+
$expired_sessions = array();
|
215 |
+
foreach( $expiration_keys as $expiration ) {
|
216 |
+
if ( $now > intval( $expiration->option_value ) ) {
|
217 |
+
$session_id = substr( $expiration->option_name, 20 );
|
218 |
+
$expired_sessions[] = $expiration->option_name;
|
219 |
+
$expired_sessions[] = "_wp_session_$session_id";
|
220 |
+
}
|
221 |
+
}
|
222 |
+
if ( ! empty( $expired_sessions ) ) {
|
223 |
+
$option_names = implode( "','", $expired_sessions );
|
224 |
+
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')" );
|
225 |
+
}
|
226 |
+
}
|
227 |
+
do_action( 'wp_session_cleanup' );
|
228 |
+
}
|
229 |
+
add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' );
|
230 |
+
function wp_session_register_garbage_collection() {
|
231 |
+
if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) {
|
232 |
+
wp_schedule_event( time(), 'hourly', 'wp_session_garbage_collection' );
|
233 |
+
}
|
234 |
+
}
|
235 |
+
add_action( 'wp', 'wp_session_register_garbage_collection' );
|
236 |
+
}
|
237 |
+
?>
|
languages/Persian_Gravityforms_By_HANNANStd-fa_IR.mo
CHANGED
Binary file
|
languages/Persian_Gravityforms_By_HANNANStd-fa_IR.po
ADDED
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Persian Gravity Forms v1.1.1\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2014-12-21 14:22:28+0000\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: CSL v1.x\n"
|
14 |
+
"X-Poedit-Language: \n"
|
15 |
+
"X-Poedit-Country: \n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
18 |
+
"X-Poedit-Basepath: \n"
|
19 |
+
"X-Poedit-Bookmarks: \n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
"X-Textdomain-Support: yes"
|
22 |
+
|
23 |
+
#: Persian_Gravityforms_By_HANNANStd.php:219
|
24 |
+
#, php-format
|
25 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
26 |
+
msgid "%sGravity Forms%s for WordPress is a full featured contact form plugin ."
|
27 |
+
msgstr "از اینکه %sGravity Forms%s فارسی را انتخاب کرده اید خوشحالیم ."
|
28 |
+
|
29 |
+
#: Persian_Gravityforms_By_HANNANStd.php:241
|
30 |
+
#: Persian_Gravityforms_By_HANNANStd.php:277
|
31 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
32 |
+
msgid "Alborz"
|
33 |
+
msgstr "البرز"
|
34 |
+
|
35 |
+
#: Persian_Gravityforms_By_HANNANStd.php:239
|
36 |
+
#: Persian_Gravityforms_By_HANNANStd.php:275
|
37 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
38 |
+
msgid "Ardabil"
|
39 |
+
msgstr "اردبیل"
|
40 |
+
|
41 |
+
#: Persian_Gravityforms_By_HANNANStd.php:237
|
42 |
+
#: Persian_Gravityforms_By_HANNANStd.php:273
|
43 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
44 |
+
msgid "Azarbaijan - East"
|
45 |
+
msgstr "آذربایجان شرقی"
|
46 |
+
|
47 |
+
#: Persian_Gravityforms_By_HANNANStd.php:238
|
48 |
+
#: Persian_Gravityforms_By_HANNANStd.php:274
|
49 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
50 |
+
msgid "Azarbaijan - West"
|
51 |
+
msgstr "آذربایجان غربی"
|
52 |
+
|
53 |
+
#: Persian_Gravityforms_By_HANNANStd.php:243
|
54 |
+
#: Persian_Gravityforms_By_HANNANStd.php:279
|
55 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
56 |
+
msgid "Bushehr"
|
57 |
+
msgstr "بوشهر"
|
58 |
+
|
59 |
+
#: Persian_Gravityforms_By_HANNANStd.php:372
|
60 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
61 |
+
msgid "Cancelled"
|
62 |
+
msgstr "منصرف شده"
|
63 |
+
|
64 |
+
#: Persian_Gravityforms_By_HANNANStd.php:245
|
65 |
+
#: Persian_Gravityforms_By_HANNANStd.php:281
|
66 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
67 |
+
msgid "Chahar Mahaal and Bakhtiari"
|
68 |
+
msgstr "چهارمحال و بختیاری"
|
69 |
+
|
70 |
+
#: Persian_Gravityforms_By_HANNANStd.php:370
|
71 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
72 |
+
msgid "Failed"
|
73 |
+
msgstr "ناموفق"
|
74 |
+
|
75 |
+
#: Persian_Gravityforms_By_HANNANStd.php:253
|
76 |
+
#: Persian_Gravityforms_By_HANNANStd.php:289
|
77 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
78 |
+
msgid "Fars"
|
79 |
+
msgstr "فارس"
|
80 |
+
|
81 |
+
#: Persian_Gravityforms_By_HANNANStd.php:261
|
82 |
+
#: Persian_Gravityforms_By_HANNANStd.php:297
|
83 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
84 |
+
msgid "Gilan"
|
85 |
+
msgstr "گیلان"
|
86 |
+
|
87 |
+
#: Persian_Gravityforms_By_HANNANStd.php:260
|
88 |
+
#: Persian_Gravityforms_By_HANNANStd.php:296
|
89 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
90 |
+
msgid "Golestan"
|
91 |
+
msgstr "گلستان"
|
92 |
+
|
93 |
+
#. translators: plugin header field 'Description'
|
94 |
+
#: Persian_Gravityforms_By_HANNANStd.php:0
|
95 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
96 |
+
msgid "Gravity Forms for Iranian"
|
97 |
+
msgstr "بسته فارسی ساز Gravity Forms + اضافه کردن واحد پولی ایران ، استان های ایران ، برچسب های تراکنش ایمیل و ..."
|
98 |
+
|
99 |
+
#. translators: plugin header field 'Author'
|
100 |
+
#: Persian_Gravityforms_By_HANNANStd.php:0
|
101 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
102 |
+
msgid "HANNAN Ebrahimi Setoode"
|
103 |
+
msgstr "حنان ابراهیمی ستوده"
|
104 |
+
|
105 |
+
#: Persian_Gravityforms_By_HANNANStd.php:266
|
106 |
+
#: Persian_Gravityforms_By_HANNANStd.php:302
|
107 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
108 |
+
msgid "Hamadan"
|
109 |
+
msgstr "همدان"
|
110 |
+
|
111 |
+
#: Persian_Gravityforms_By_HANNANStd.php:265
|
112 |
+
#: Persian_Gravityforms_By_HANNANStd.php:301
|
113 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
114 |
+
msgid "Hormozgān"
|
115 |
+
msgstr "هرمزگان"
|
116 |
+
|
117 |
+
#: Persian_Gravityforms_By_HANNANStd.php:232
|
118 |
+
#: Persian_Gravityforms_By_HANNANStd.php:233
|
119 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
120 |
+
msgid "IRAN"
|
121 |
+
msgstr "ایران"
|
122 |
+
|
123 |
+
#: Persian_Gravityforms_By_HANNANStd.php:242
|
124 |
+
#: Persian_Gravityforms_By_HANNANStd.php:278
|
125 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
126 |
+
msgid "Ilam"
|
127 |
+
msgstr "ایلام"
|
128 |
+
|
129 |
+
#: Persian_Gravityforms_By_HANNANStd.php:226
|
130 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
131 |
+
msgid "Iranian Rial"
|
132 |
+
msgstr "ریال ایران"
|
133 |
+
|
134 |
+
#: Persian_Gravityforms_By_HANNANStd.php:240
|
135 |
+
#: Persian_Gravityforms_By_HANNANStd.php:276
|
136 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
137 |
+
msgid "Isfahan"
|
138 |
+
msgstr "اصفهان"
|
139 |
+
|
140 |
+
#: Persian_Gravityforms_By_HANNANStd.php:257
|
141 |
+
#: Persian_Gravityforms_By_HANNANStd.php:293
|
142 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
143 |
+
msgid "Kerman"
|
144 |
+
msgstr "کرمان"
|
145 |
+
|
146 |
+
#: Persian_Gravityforms_By_HANNANStd.php:258
|
147 |
+
#: Persian_Gravityforms_By_HANNANStd.php:294
|
148 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
149 |
+
msgid "Kermanshah"
|
150 |
+
msgstr "کرمانشاه"
|
151 |
+
|
152 |
+
#: Persian_Gravityforms_By_HANNANStd.php:248
|
153 |
+
#: Persian_Gravityforms_By_HANNANStd.php:284
|
154 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
155 |
+
msgid "Khorasan - North"
|
156 |
+
msgstr "خراسان شمالی"
|
157 |
+
|
158 |
+
#: Persian_Gravityforms_By_HANNANStd.php:247
|
159 |
+
#: Persian_Gravityforms_By_HANNANStd.php:283
|
160 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
161 |
+
msgid "Khorasan - Razavi"
|
162 |
+
msgstr "خراسان رضوی"
|
163 |
+
|
164 |
+
#: Persian_Gravityforms_By_HANNANStd.php:246
|
165 |
+
#: Persian_Gravityforms_By_HANNANStd.php:282
|
166 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
167 |
+
msgid "Khorasan - South"
|
168 |
+
msgstr "خراسان جنوبی"
|
169 |
+
|
170 |
+
#: Persian_Gravityforms_By_HANNANStd.php:249
|
171 |
+
#: Persian_Gravityforms_By_HANNANStd.php:285
|
172 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
173 |
+
msgid "Khuzestan"
|
174 |
+
msgstr "خوزستان"
|
175 |
+
|
176 |
+
#: Persian_Gravityforms_By_HANNANStd.php:259
|
177 |
+
#: Persian_Gravityforms_By_HANNANStd.php:295
|
178 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
179 |
+
msgid "Kohgiluyeh and Boyer-Ahmad"
|
180 |
+
msgstr "کهگیلویه و بویراحمد"
|
181 |
+
|
182 |
+
#: Persian_Gravityforms_By_HANNANStd.php:256
|
183 |
+
#: Persian_Gravityforms_By_HANNANStd.php:292
|
184 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
185 |
+
msgid "Kurdistan"
|
186 |
+
msgstr "کردستان"
|
187 |
+
|
188 |
+
#: Persian_Gravityforms_By_HANNANStd.php:262
|
189 |
+
#: Persian_Gravityforms_By_HANNANStd.php:298
|
190 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
191 |
+
msgid "Lorestan"
|
192 |
+
msgstr "لرستان"
|
193 |
+
|
194 |
+
#: Persian_Gravityforms_By_HANNANStd.php:264
|
195 |
+
#: Persian_Gravityforms_By_HANNANStd.php:300
|
196 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
197 |
+
msgid "Markazi"
|
198 |
+
msgstr "مرکزی"
|
199 |
+
|
200 |
+
#: Persian_Gravityforms_By_HANNANStd.php:263
|
201 |
+
#: Persian_Gravityforms_By_HANNANStd.php:299
|
202 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
203 |
+
msgid "Mazandaran"
|
204 |
+
msgstr "مازندران"
|
205 |
+
|
206 |
+
#: Persian_Gravityforms_By_HANNANStd.php:368
|
207 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
208 |
+
msgid "Paid"
|
209 |
+
msgstr "موفق"
|
210 |
+
|
211 |
+
#: Persian_Gravityforms_By_HANNANStd.php:390
|
212 |
+
#: Persian_Gravityforms_By_HANNANStd.php:414
|
213 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
214 |
+
msgid "Payment Gateway"
|
215 |
+
msgstr "درگاه پرداخت"
|
216 |
+
|
217 |
+
#: Persian_Gravityforms_By_HANNANStd.php:411
|
218 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
219 |
+
msgid "Payment Information"
|
220 |
+
msgstr "اطلاعات پرداخت"
|
221 |
+
|
222 |
+
#: Persian_Gravityforms_By_HANNANStd.php:404
|
223 |
+
#: Persian_Gravityforms_By_HANNANStd.php:420
|
224 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
225 |
+
msgid "Payment Status"
|
226 |
+
msgstr "وضعیت پرداخت"
|
227 |
+
|
228 |
+
#. translators: plugin header field 'Name'
|
229 |
+
#: Persian_Gravityforms_By_HANNANStd.php:0
|
230 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
231 |
+
msgid "Persian Gravity Forms"
|
232 |
+
msgstr "Gravity Forms فارسی"
|
233 |
+
|
234 |
+
#: Persian_Gravityforms_By_HANNANStd.php:461
|
235 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
236 |
+
msgid "Persian Gravity Forms Dashboard"
|
237 |
+
msgstr "آخرین مطالب سایت پشتیبانی Gravity Forms فارسی"
|
238 |
+
|
239 |
+
#: Persian_Gravityforms_By_HANNANStd.php:234
|
240 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
241 |
+
msgid "Postal Code"
|
242 |
+
msgstr "کد پستی"
|
243 |
+
|
244 |
+
#: Persian_Gravityforms_By_HANNANStd.php:222
|
245 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
246 |
+
msgid "Private"
|
247 |
+
msgstr "خصوصی"
|
248 |
+
|
249 |
+
#: Persian_Gravityforms_By_HANNANStd.php:235
|
250 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
251 |
+
msgid "Province"
|
252 |
+
msgstr "استان"
|
253 |
+
|
254 |
+
#: Persian_Gravityforms_By_HANNANStd.php:273
|
255 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
256 |
+
msgid "Provinces of Iran"
|
257 |
+
msgstr "استانهای ایران"
|
258 |
+
|
259 |
+
#: Persian_Gravityforms_By_HANNANStd.php:254
|
260 |
+
#: Persian_Gravityforms_By_HANNANStd.php:290
|
261 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
262 |
+
msgid "Qazvin"
|
263 |
+
msgstr "قزوین"
|
264 |
+
|
265 |
+
#: Persian_Gravityforms_By_HANNANStd.php:255
|
266 |
+
#: Persian_Gravityforms_By_HANNANStd.php:291
|
267 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
268 |
+
msgid "Qom"
|
269 |
+
msgstr "قم"
|
270 |
+
|
271 |
+
#: Persian_Gravityforms_By_HANNANStd.php:251
|
272 |
+
#: Persian_Gravityforms_By_HANNANStd.php:287
|
273 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
274 |
+
msgid "Semnan"
|
275 |
+
msgstr "سمنان"
|
276 |
+
|
277 |
+
#: Persian_Gravityforms_By_HANNANStd.php:310
|
278 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
279 |
+
msgid "Simple Payment Gateway"
|
280 |
+
msgstr "درگاه پرداخت ساده"
|
281 |
+
|
282 |
+
#: Persian_Gravityforms_By_HANNANStd.php:311
|
283 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
284 |
+
msgid "Simple Payment Status"
|
285 |
+
msgstr "وضعیت پرداخت ساده"
|
286 |
+
|
287 |
+
#: Persian_Gravityforms_By_HANNANStd.php:312
|
288 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
289 |
+
msgid "Simple Transaction ID"
|
290 |
+
msgstr "کد رهگیری ساده"
|
291 |
+
|
292 |
+
#: Persian_Gravityforms_By_HANNANStd.php:252
|
293 |
+
#: Persian_Gravityforms_By_HANNANStd.php:288
|
294 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
295 |
+
msgid "Sistan and Baluchistan"
|
296 |
+
msgstr "سیستان و بلوچستان"
|
297 |
+
|
298 |
+
#: Persian_Gravityforms_By_HANNANStd.php:313
|
299 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
300 |
+
msgid "Styled Payment Gateway"
|
301 |
+
msgstr "درگاه پرداخت استایل بندی شده"
|
302 |
+
|
303 |
+
#: Persian_Gravityforms_By_HANNANStd.php:316
|
304 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
305 |
+
msgid "Styled Payment Pack"
|
306 |
+
msgstr "پک اطلاعات درگاه پرداخت"
|
307 |
+
|
308 |
+
#: Persian_Gravityforms_By_HANNANStd.php:314
|
309 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
310 |
+
msgid "Styled Payment Status"
|
311 |
+
msgstr "وضعیت پرداخت استایل بندی شده"
|
312 |
+
|
313 |
+
#: Persian_Gravityforms_By_HANNANStd.php:315
|
314 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
315 |
+
msgid "Styled Transaction ID"
|
316 |
+
msgstr "کد رهگیری استایل بندی شده"
|
317 |
+
|
318 |
+
#: Persian_Gravityforms_By_HANNANStd.php:244
|
319 |
+
#: Persian_Gravityforms_By_HANNANStd.php:280
|
320 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
321 |
+
msgid "Tehran"
|
322 |
+
msgstr "تهران"
|
323 |
+
|
324 |
+
#: Persian_Gravityforms_By_HANNANStd.php:227
|
325 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
326 |
+
msgid "Toman"
|
327 |
+
msgstr "تومان"
|
328 |
+
|
329 |
+
#: Persian_Gravityforms_By_HANNANStd.php:398
|
330 |
+
#: Persian_Gravityforms_By_HANNANStd.php:426
|
331 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
332 |
+
msgid "Transaction ID"
|
333 |
+
msgstr "کد رهگیری"
|
334 |
+
|
335 |
+
#: Persian_Gravityforms_By_HANNANStd.php:267
|
336 |
+
#: Persian_Gravityforms_By_HANNANStd.php:303
|
337 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
338 |
+
msgid "Yazd"
|
339 |
+
msgstr "یزد"
|
340 |
+
|
341 |
+
#: Persian_Gravityforms_By_HANNANStd.php:250
|
342 |
+
#: Persian_Gravityforms_By_HANNANStd.php:286
|
343 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
344 |
+
msgid "Zanjan"
|
345 |
+
msgstr "زنجان"
|
346 |
+
|
347 |
+
#: Persian_Gravityforms_By_HANNANStd.php:159
|
348 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
349 |
+
msgid "Yes"
|
350 |
+
msgstr "استفاده از تاریخ شمسی"
|
351 |
+
|
352 |
+
#: Persian_Gravityforms_By_HANNANStd.php:486
|
353 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
354 |
+
msgid "<strong>RSS Error</strong>"
|
355 |
+
msgstr "در حین دریافت مطالب خطایی رخ داده است ."
|
356 |
+
|
357 |
+
#: Persian_Gravityforms_By_HANNANStd.php:491
|
358 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
359 |
+
msgid "Apparently, There are no updates to show!"
|
360 |
+
msgstr "در حال حاضر هیچ مطلبی وجود ندارد ."
|
361 |
+
|
362 |
+
#. translators: plugin header field 'PluginURI'
|
363 |
+
#: Persian_Gravityforms_By_HANNANStd.php:0
|
364 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
365 |
+
msgid "https://wordpress.org/plugins/persian-gravity-forms/"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#. translators: plugin header field 'AuthorURI'
|
369 |
+
#: Persian_Gravityforms_By_HANNANStd.php:0
|
370 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
371 |
+
msgid "http://www.gravityforms.ir/"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: Persian_Gravityforms_By_HANNANStd.php:655
|
375 |
+
#@ gravityforms
|
376 |
+
msgid "نمایش زیر نویس فیلد"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: Persian_Gravityforms_By_HANNANStd.php:661
|
380 |
+
#@ gravityforms
|
381 |
+
msgid "جدا سازی خودکار ارقام توسط خط فاصله"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: Persian_Gravityforms_By_HANNANStd.php:672
|
385 |
+
#@ gravityforms
|
386 |
+
msgid "مقدار وارد شده شامل کاراکتر غیر عددی باشد"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: Persian_Gravityforms_By_HANNANStd.php:679
|
390 |
+
#@ gravityforms
|
391 |
+
msgid "تعداد ارقام وارد شده استاندارد نباشد"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: Persian_Gravityforms_By_HANNANStd.php:686
|
395 |
+
#@ gravityforms
|
396 |
+
msgid "کد ملی وارد شده قبلا ثبت شده باشد"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: Persian_Gravityforms_By_HANNANStd.php:693
|
400 |
+
#@ gravityforms
|
401 |
+
msgid "کد ملی وارد شده مطابق با الگوی ملی نباشد"
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#. translators: plugin header field 'Version'
|
405 |
+
#: Persian_Gravityforms_By_HANNANStd.php:0
|
406 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
407 |
+
msgid "1.1.1"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: Persian_Gravityforms_By_HANNANStd.php:317
|
411 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
412 |
+
msgid "RTL Start"
|
413 |
+
msgstr "ابتدای راستچین سازی"
|
414 |
+
|
415 |
+
#: Persian_Gravityforms_By_HANNANStd.php:318
|
416 |
+
#@ Persian_Gravityforms_By_HANNANStd
|
417 |
+
msgid "RTL End"
|
418 |
+
msgstr "انتهای راستچین سازی"
|
419 |
+
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gravityforms,gravity forms,persian gravity forms,persian gravityforms,grav
|
|
4 |
Donate link: http://www.gravityforms.ir
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.0.1
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPL 2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
This WordPress plugin extends the Gravity Forms plugin and its addons with the Persian language .
|
@@ -34,6 +34,8 @@ This plugin extends the Gravity Forms and its addons with Persian language
|
|
34 |
* اضافه کردن وضعیت پست خصوصی برای فیلد های ارسال پست .
|
35 |
* اضافه کردن برچسب وضعیت تراکنش ، کد رهگیری و ... به برچسب های ایمیل و صفحه تاییدیه که این برچسب در خود افزونه وجود نداشت .
|
36 |
* افزونه درگاه های ایرانی آن نیز به صورت جدا عرضه خواهد شد ....
|
|
|
|
|
37 |
* ....
|
38 |
|
39 |
= Compatibility =
|
@@ -81,6 +83,14 @@ You can read complete documentations on the [GravityForms.ir](http://www.Gravity
|
|
81 |
19. Iranian National Code field Advanced setting
|
82 |
|
83 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
= 1.1.1 =
|
85 |
* Added Iranian National Code field
|
86 |
* See Screenshots 16-19
|
@@ -92,6 +102,14 @@ You can read complete documentations on the [GravityForms.ir](http://www.Gravity
|
|
92 |
* First version
|
93 |
|
94 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= 1.1.1 =
|
96 |
* Added Iranian National Code field
|
97 |
* See Screenshots 16-19
|
4 |
Donate link: http://www.gravityforms.ir
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.0.1
|
7 |
+
Stable tag: 1.1.2
|
8 |
License: GPL 2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
This WordPress plugin extends the Gravity Forms plugin and its addons with the Persian language .
|
34 |
* اضافه کردن وضعیت پست خصوصی برای فیلد های ارسال پست .
|
35 |
* اضافه کردن برچسب وضعیت تراکنش ، کد رهگیری و ... به برچسب های ایمیل و صفحه تاییدیه که این برچسب در خود افزونه وجود نداشت .
|
36 |
* افزونه درگاه های ایرانی آن نیز به صورت جدا عرضه خواهد شد ....
|
37 |
+
* قرار دادن کد رهگیری برای تمامی فرم ها
|
38 |
+
* رسم نمودار شمسی برای درگاه های پرداخت
|
39 |
* ....
|
40 |
|
41 |
= Compatibility =
|
83 |
19. Iranian National Code field Advanced setting
|
84 |
|
85 |
== Changelog ==
|
86 |
+
= 1.1.2 =
|
87 |
+
* Added transaction id for all forms
|
88 |
+
* Added rtl merge tags for emails
|
89 |
+
* Support custom page for callback url
|
90 |
+
* Fixed some css bugs
|
91 |
+
* Added wp_session class for more security
|
92 |
+
* Added Jquery flot for transaction graph
|
93 |
+
* Added Jalali Class for transaction graph
|
94 |
= 1.1.1 =
|
95 |
* Added Iranian National Code field
|
96 |
* See Screenshots 16-19
|
102 |
* First version
|
103 |
|
104 |
== Upgrade Notice ==
|
105 |
+
= 1.1.2 =
|
106 |
+
* Added transaction id for all forms
|
107 |
+
* Added rtl merge tags for emails
|
108 |
+
* Support custom page for callback url
|
109 |
+
* Fixed some css bugs
|
110 |
+
* Added wp_session class for more security
|
111 |
+
* Added Jquery flot for transaction graph
|
112 |
+
* Added Jalali Class for transaction graph
|
113 |
= 1.1.1 =
|
114 |
* Added Iranian National Code field
|
115 |
* See Screenshots 16-19
|